Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 14bd26c

Browse filesBrowse files
sam-githubBridgeAR
authored andcommitted
test: remove workaround for unsupported OpenSSLs
Workaround added in d9b9229 is no longer needed, since OpenSSL versions lower than 1.1.1 are unsupported. PR-URL: #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>
1 parent 8984b73 commit 14bd26c
Copy full SHA for 14bd26c

File tree

Expand file treeCollapse file tree

1 file changed

+7
-35
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-35
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-https-agent-session-eviction.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-https-agent-session-eviction.js
+7-35Lines changed: 7 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ const { readKey } = require('../common/fixtures');
77
if (!common.hasCrypto)
88
common.skip('missing crypto');
99

10-
const assert = require('assert');
1110
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;
1412

1513
const options = {
1614
key: readKey('agent1-key.pem'),
@@ -60,38 +58,12 @@ function second(server, session) {
6058
res.resume();
6159
});
6260

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.
9365
server.close();
94-
});
95-
req.on('error', common.mustNotCall());
66+
}));
67+
9668
req.end();
9769
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.