diff options
author | Sam Roberts <vieuxtech@gmail.com> | 2019-06-02 20:01:05 +0200 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2019-06-10 18:23:13 +0200 |
commit | ba7551cad8abd2e460763b06efa4207be96a7a19 (patch) | |
tree | 2e4a9b40674dd7aeb195ce307694a51f3cc45828 /test/parallel/test-https-agent-session-eviction.js | |
parent | 94a7c2ab8a191097e28749c44b3aefd2ba6920ee (diff) | |
download | android-node-v8-ba7551cad8abd2e460763b06efa4207be96a7a19.tar.gz android-node-v8-ba7551cad8abd2e460763b06efa4207be96a7a19.tar.bz2 android-node-v8-ba7551cad8abd2e460763b06efa4207be96a7a19.zip |
test: remove workaround for unsupported OpenSSLs
Workaround added in d9b9229d98afb4b is no longer needed, since OpenSSL
versions lower than 1.1.1 are unsupported.
PR-URL: https://github.com/nodejs/node/pull/28085
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'test/parallel/test-https-agent-session-eviction.js')
-rw-r--r-- | test/parallel/test-https-agent-session-eviction.js | 42 |
1 files changed, 7 insertions, 35 deletions
diff --git a/test/parallel/test-https-agent-session-eviction.js b/test/parallel/test-https-agent-session-eviction.js index 8e13b150bb..3f5cd36e8b 100644 --- a/test/parallel/test-https-agent-session-eviction.js +++ b/test/parallel/test-https-agent-session-eviction.js @@ -7,10 +7,8 @@ const { readKey } = require('../common/fixtures'); if (!common.hasCrypto) common.skip('missing crypto'); -const assert = require('assert'); const https = require('https'); -const { OPENSSL_VERSION_NUMBER, SSL_OP_NO_TICKET } = - require('crypto').constants; +const { SSL_OP_NO_TICKET } = require('crypto').constants; const options = { key: readKey('agent1-key.pem'), @@ -60,38 +58,12 @@ function second(server, session) { res.resume(); }); - if (OPENSSL_VERSION_NUMBER >= 0x10100000) { - // Although we have a TLS 1.2 session to offer to the TLS 1.0 server, - // connection to the TLS 1.0 server should work. - req.on('response', common.mustCall(function(res) { - // The test is now complete for OpenSSL 1.1.0. - server.close(); - })); - } else { - // OpenSSL 1.0.x mistakenly locked versions based on the session it was - // offering. This causes this sequent request to fail. Let it fail, but - // test that this is mitigated on the next try by invalidating the session. - req.on('error', common.mustCall(function(err) { - assert(/wrong version number/.test(err.message)); - - req.on('close', function() { - third(server); - }); - })); - } - req.end(); -} - -// Try one more time - session should be evicted! -function third(server) { - const req = https.request({ - port: server.address().port, - rejectUnauthorized: false - }, function(res) { - res.resume(); - assert(!req.socket.isSessionReused()); + // Although we have a TLS 1.2 session to offer to the TLS 1.0 server, + // connection to the TLS 1.0 server should work. + req.on('response', common.mustCall(function(res) { + // The test is now complete for OpenSSL 1.1.0. server.close(); - }); - req.on('error', common.mustNotCall()); + })); + req.end(); } |