Skip to content

Commit 0c0df1a

Browse files
committed
[misc] test TLS minimum version change in order to test old mysql server with Node.js 12
1 parent 0f542cc commit 0c0df1a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/integration/test-ssl.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ describe('ssl', function() {
2222
//TLSv1.2 is supported on windows only since MariaDB 10.4
2323
//TLSv1.2 is supported in MySQL only since 8.0 (unix/windows)
2424
//so if testing with Node.js 12, force possible TLS1.1
25-
tls.DEFAULT_MIN_VERSION = 'TLSv1.1';
25+
if (!shareConn.info.isMariaDB() && !shareConn.info.hasMinVersion(5, 7, 0)) {
26+
//MySQL 5.5 and MySQL 5.6 needs TLSv1
27+
tls.DEFAULT_MIN_VERSION = 'TLSv1';
28+
} else {
29+
tls.DEFAULT_MIN_VERSION = 'TLSv1.1';
30+
}
2631
}
2732

2833
if (process.env.TEST_SSL_CA_FILE) {

0 commit comments

Comments
 (0)