diff options
author | Shreyas Kalyan <shreyas.kalyan@mongodb.com> | 2019-10-31 17:29:43 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-10-31 17:29:43 +0000 |
commit | d8b18ea6033234870b09a7051cde98b41482a0ef (patch) | |
tree | 2e6f83f0144eb798d58af5d1e0fbf86e3dda7d94 /jstests/ssl | |
parent | ae9747e4572976c713f2bc2eb02436eae4f36352 (diff) | |
download | mongo-d8b18ea6033234870b09a7051cde98b41482a0ef.tar.gz |
SERVER-41045 Add SNI support for windows SSL
Diffstat (limited to 'jstests/ssl')
-rw-r--r-- | jstests/ssl/sni_name_advertisement.js | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/jstests/ssl/sni_name_advertisement.js b/jstests/ssl/sni_name_advertisement.js index 53891bc0457..72c2fd90d56 100644 --- a/jstests/ssl/sni_name_advertisement.js +++ b/jstests/ssl/sni_name_advertisement.js @@ -61,24 +61,19 @@ function getSNISharded(params) { return sni; } -// TODO SERVER-41045 remove if-statement once SNI is supported on Windows -if (!_isWindows()) { - jsTestLog("Testing mongod bound to host " + testURL); - assert.eq(testURL, getSNI(urlParams), "Hostname is not advertised as SNI name in basic mongod"); - jsTestLog("Testing sharded configuration bound to host " + testURL); - assert.eq(testURL, - getSNISharded(urlParams), - "Hostname is not advertised as SNI name in sharded mongod"); +jsTestLog("Testing mongod bound to host " + testURL); +assert.eq(testURL, getSNI(urlParams), "Hostname is not advertised as SNI name in basic mongod"); +jsTestLog("Testing sharded configuration bound to host " + testURL); +assert.eq( + testURL, getSNISharded(urlParams), "Hostname is not advertised as SNI name in sharded mongod"); - // apple's TLS stack does not allow us to selectively remove SNI names, so IP addresses are - // still advertised - const desiredOutput = determineSSLProvider() === "apple" ? testIP : false; - jsTestLog("Testing mongod bound to IP " + testIP); - assert.eq( - desiredOutput, getSNI(ipParams), "IP address is advertised as SNI name in basic mongod"); - jsTestLog("Testing sharded configuration bound to IP " + testIP); - assert.eq(desiredOutput, - getSNISharded(ipParams), - "IP address is advertised as SNI name in sharded mongod"); -} +// apple's TLS stack does not allow us to selectively remove SNI names, so IP addresses are +// still advertised +const desiredOutput = determineSSLProvider() === "apple" ? testIP : false; +jsTestLog("Testing mongod bound to IP " + testIP); +assert.eq(desiredOutput, getSNI(ipParams), "IP address is advertised as SNI name in basic mongod"); +jsTestLog("Testing sharded configuration bound to IP " + testIP); +assert.eq(desiredOutput, + getSNISharded(ipParams), + "IP address is advertised as SNI name in sharded mongod"); })();
\ No newline at end of file |