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 <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
itavy authored and MylesBorins committed Nov 16, 2017
1 parent af13678 commit c4176eb
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 c4176eb

Please sign in to comment.