Skip to content

Commit

Permalink
test: replace fixturesDir with usage of fixtures module
Browse files Browse the repository at this point in the history
Repalce common.fixturesDir with usage of the fixtures module in
test-tls-ecdh-disable.

Add a comment explaining the test.

PR-URL: #16810
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
  • Loading branch information
itavy authored and cjihrig committed Nov 6, 2017
1 parent 021ccb4 commit e4b3c00
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/parallel/test-tls-ecdh-disable.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

// Test that the usage of eliptic curves are not permitted if disabled during
// server initialization.

'use strict';
const common = require('../common');
const { readKey } = require('../common/fixtures');
if (!common.hasCrypto)
common.skip('missing crypto');

Expand All @@ -30,11 +34,10 @@ if (!common.opensslCli)
const assert = require('assert');
const tls = require('tls');
const exec = require('child_process').exec;
const fs = require('fs');

const options = {
key: fs.readFileSync(`${common.fixturesDir}/keys/agent2-key.pem`),
cert: fs.readFileSync(`${common.fixturesDir}/keys/agent2-cert.pem`),
key: readKey('agent2-key.pem'),
cert: readKey('agent2-cert.pem'),
ciphers: 'ECDHE-RSA-AES128-SHA',
ecdhCurve: false
};
Expand Down

0 comments on commit e4b3c00

Please sign in to comment.