From 0c40ef9f596fa3bc4f046f523c3595fe7065fde3 Mon Sep 17 00:00:00 2001 From: John Lee Date: Wed, 1 Mar 2023 21:50:49 -0600 Subject: [PATCH] feat: maxVersion ssl option to tls.createSecureContext --- lib/connection.js | 3 ++- typings/mysql/lib/Connection.d.ts | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/connection.js b/lib/connection.js index ad79389915..790226a246 100644 --- a/lib/connection.js +++ b/lib/connection.js @@ -347,7 +347,8 @@ class Connection extends EventEmitter { ciphers: this.config.ssl.ciphers, key: this.config.ssl.key, passphrase: this.config.ssl.passphrase, - minVersion: this.config.ssl.minVersion + minVersion: this.config.ssl.minVersion, + maxVersion: this.config.ssl.maxVersion }); const rejectUnauthorized = this.config.ssl.rejectUnauthorized; const verifyIdentity = this.config.ssl.verifyIdentity; diff --git a/typings/mysql/lib/Connection.d.ts b/typings/mysql/lib/Connection.d.ts index 12204cf55a..08a51b4662 100644 --- a/typings/mysql/lib/Connection.d.ts +++ b/typings/mysql/lib/Connection.d.ts @@ -228,6 +228,11 @@ declare namespace Connection { */ minVersion?: string; + /** + * Configure the maximum supported version of SSL, the default is TLSv1.3. + */ + maxVersion?: string; + /** * You can verify the server name identity presented on the server certificate when connecting to a MySQL server. * You should enable this but it is disabled by default right now for backwards compatibility.