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 3d438f8

Browse filesBrowse files
davidbenevanlucas
authored andcommitted
test: configure certs in tests
OpenSSL 1.1.0 disables anonymous ciphers unless building with enable-weak-crypto. Avoid unnecessary dependencies on these ciphers in tests. PR-URL: #16130 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Rod Vagg <rod@vagg.org>
1 parent 07102ac commit 3d438f8
Copy full SHA for 3d438f8

File tree

Expand file treeCollapse file tree

2 files changed

+10
-6
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+10
-6
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-https-connect-address-family.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-https-connect-address-family.js
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,22 @@ if (!common.hasIPv6)
77
common.skip('no IPv6 support');
88

99
const assert = require('assert');
10+
const fixtures = require('../common/fixtures');
1011
const https = require('https');
1112
const dns = require('dns');
1213

1314
function runTest() {
14-
const ciphers = 'AECDH-NULL-SHA';
15-
https.createServer({ ciphers }, common.mustCall(function(req, res) {
15+
https.createServer({
16+
cert: fixtures.readKey('agent1-cert.pem'),
17+
key: fixtures.readKey('agent1-key.pem'),
18+
}, common.mustCall(function(req, res) {
1619
this.close();
1720
res.end();
1821
})).listen(0, '::1', common.mustCall(function() {
1922
const options = {
2023
host: 'localhost',
2124
port: this.address().port,
2225
family: 6,
23-
ciphers: ciphers,
2426
rejectUnauthorized: false,
2527
};
2628
// Will fail with ECONNREFUSED if the address family is not honored.
Collapse file

‎test/parallel/test-tls-connect-address-family.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-tls-connect-address-family.js
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,21 @@ if (!common.hasIPv6)
77
common.skip('no IPv6 support');
88

99
const assert = require('assert');
10+
const fixtures = require('../common/fixtures');
1011
const tls = require('tls');
1112
const dns = require('dns');
1213

1314
function runTest() {
14-
const ciphers = 'AECDH-NULL-SHA';
15-
tls.createServer({ ciphers }, common.mustCall(function() {
15+
tls.createServer({
16+
cert: fixtures.readKey('agent1-cert.pem'),
17+
key: fixtures.readKey('agent1-key.pem'),
18+
}, common.mustCall(function() {
1619
this.close();
1720
})).listen(0, '::1', common.mustCall(function() {
1821
const options = {
1922
host: 'localhost',
2023
port: this.address().port,
2124
family: 6,
22-
ciphers: ciphers,
2325
rejectUnauthorized: false,
2426
};
2527
// Will fail with ECONNREFUSED if the address family is not honored.

0 commit comments

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