Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions test/addons/openssl-client-cert-engine/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ const agentKey = fs.readFileSync(fixture.path('/keys/agent1-key.pem'));
const agentCert = fs.readFileSync(fixture.path('/keys/agent1-cert.pem'));
const agentCa = fs.readFileSync(fixture.path('/keys/ca1-cert.pem'));

const port = common.PORT;

const serverOptions = {
key: agentKey,
cert: agentCert,
Expand All @@ -34,11 +32,11 @@ const serverOptions = {
const server = https.createServer(serverOptions, (req, res) => {
res.writeHead(200);
res.end('hello world');
}).listen(port, common.localhostIPv4, () => {
}).listen(0, common.localhostIPv4, () => {
const clientOptions = {
method: 'GET',
host: common.localhostIPv4,
port: port,
port: server.address().port,
path: '/test',
clientCertEngine: engine, // engine will provide key+cert
rejectUnauthorized: false, // prevent failing on self-signed certificates
Expand Down