Skip to content

Commit e4b3c00

Browse files
itavycjihrig
authored andcommitted
test: replace fixturesDir with usage of fixtures module
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]>
1 parent 021ccb4 commit e4b3c00

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/parallel/test-tls-ecdh-disable.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@
1919
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

22+
// Test that the usage of eliptic curves are not permitted if disabled during
23+
// server initialization.
24+
2225
'use strict';
2326
const common = require('../common');
27+
const { readKey } = require('../common/fixtures');
2428
if (!common.hasCrypto)
2529
common.skip('missing crypto');
2630

@@ -30,11 +34,10 @@ if (!common.opensslCli)
3034
const assert = require('assert');
3135
const tls = require('tls');
3236
const exec = require('child_process').exec;
33-
const fs = require('fs');
3437

3538
const options = {
36-
key: fs.readFileSync(`${common.fixturesDir}/keys/agent2-key.pem`),
37-
cert: fs.readFileSync(`${common.fixturesDir}/keys/agent2-cert.pem`),
39+
key: readKey('agent2-key.pem'),
40+
cert: readKey('agent2-cert.pem'),
3841
ciphers: 'ECDHE-RSA-AES128-SHA',
3942
ecdhCurve: false
4043
};

0 commit comments

Comments
 (0)