Skip to content

Commit

Permalink
feat: maxVersion ssl option to tls.createSecureContext
Browse files Browse the repository at this point in the history
  • Loading branch information
John Lee committed Mar 2, 2023
1 parent 3cdc83d commit 0c40ef9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/connection.js
Expand Up @@ -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;
Expand Down
5 changes: 5 additions & 0 deletions typings/mysql/lib/Connection.d.ts
Expand Up @@ -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.
Expand Down

0 comments on commit 0c40ef9

Please sign in to comment.