Skip to content
Closed
Changes from 3 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
9 changes: 5 additions & 4 deletions test/parallel/test-tls-client-getephemeralkeyinfo.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
'use strict';
const common = require('../common');
const commonFixturesDir = require('../common.fixtures').fixturesDir;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional - it would be nice to use destructuring here as in

const { fixturesDir } = require('../common.fixtures').fixturesDir;

if (!common.hasCrypto)
common.skip('missing crypto');

const assert = require('assert');
const tls = require('tls');
const fs = require('fs');

const key = fs.readFileSync(`${common.fixturesDir}/keys/agent2-key.pem`);
const cert = fs.readFileSync(`${common.fixturesDir}/keys/agent2-cert.pem`);
const key = fs.readFileSync(`${commonFixturesDir}/keys/agent2-key.pem`);
const cert = fs.readFileSync(`${commonFixturesDir}/keys/agent2-cert.pem`);
Copy link
Copy Markdown
Member

@BridgeAR BridgeAR Oct 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should actually use the fixtures.readKey function. I fix this while landing.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@timothywisdom it would actually be nice if you could fix this test.


let ntests = 0;
let nsuccess = 0;

function loadDHParam(n) {
let path = common.fixturesDir;
let path = commonFixturesDir;
if (n !== 'error') path += '/keys';
return fs.readFileSync(`${path}/dh${n}.pem`);
}
Expand Down Expand Up @@ -84,7 +85,7 @@ function testECDHE256() {
}

function testECDHE512() {
test(521, 'ECDH', 'secp521r1', null);
test(512, 'ECDH', 'secp512r1', null);
ntests++;
}

Expand Down