| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 8984b73 commit 14bd26c
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,10 +7,8 @@ const { readKey } = require('../common/fixtures'); | |||
| 7 | 7 | if (!common.hasCrypto) | |
| 8 | 8 | common.skip('missing crypto'); | |
| 9 | 9 | ||
| 10 | - const assert = require('assert'); | ||
| 11 | 10 | const https = require('https'); | |
| 12 | - const { OPENSSL_VERSION_NUMBER, SSL_OP_NO_TICKET } = | ||
| 13 | - require('crypto').constants; | ||
| 11 | + const { SSL_OP_NO_TICKET } = require('crypto').constants; | ||
| 14 | 12 | ||
| 15 | 13 | const options = { | |
| 16 | 14 | key: readKey('agent1-key.pem'), | |
@@ -60,38 +58,12 @@ function second(server, session) { | |||
| 60 | 58 | res.resume(); | |
| 61 | 59 | }); | |
| 62 | 60 | ||
| 63 | - if (OPENSSL_VERSION_NUMBER >= 0x10100000) { | ||
| 64 | - // Although we have a TLS 1.2 session to offer to the TLS 1.0 server, | ||
| 65 | - // connection to the TLS 1.0 server should work. | ||
| 66 | - req.on('response', common.mustCall(function(res) { | ||
| 67 | - // The test is now complete for OpenSSL 1.1.0. | ||
| 68 | - server.close(); | ||
| 69 | - })); | ||
| 70 | - } else { | ||
| 71 | - // OpenSSL 1.0.x mistakenly locked versions based on the session it was | ||
| 72 | - // offering. This causes this sequent request to fail. Let it fail, but | ||
| 73 | - // test that this is mitigated on the next try by invalidating the session. | ||
| 74 | - req.on('error', common.mustCall(function(err) { | ||
| 75 | - assert(/wrong version number/.test(err.message)); | ||
| 76 | - | ||
| 77 | - req.on('close', function() { | ||
| 78 | - third(server); | ||
| 79 | - }); | ||
| 80 | - })); | ||
| 81 | - } | ||
| 82 | - req.end(); | ||
| 83 | - } | ||
| 84 | - | ||
| 85 | - // Try one more time - session should be evicted! | ||
| 86 | - function third(server) { | ||
| 87 | - const req = https.request({ | ||
| 88 | - port: server.address().port, | ||
| 89 | - rejectUnauthorized: false | ||
| 90 | - }, function(res) { | ||
| 91 | - res.resume(); | ||
| 92 | - assert(!req.socket.isSessionReused()); | ||
| 61 | + // Although we have a TLS 1.2 session to offer to the TLS 1.0 server, | ||
| 62 | + // connection to the TLS 1.0 server should work. | ||
| 63 | + req.on('response', common.mustCall(function(res) { | ||
| 64 | + // The test is now complete for OpenSSL 1.1.0. | ||
| 93 | 65 | server.close(); | |
| 94 | - }); | ||
| 95 | - req.on('error', common.mustNotCall()); | ||
| 66 | + })); | ||
| 67 | + | ||
| 96 | 68 | req.end(); | |
| 97 | 69 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments