Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c4176eb

Browse filesBrowse files
itavyMylesBorins
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 <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent af13678 commit c4176eb
Copy full SHA for c4176eb

File tree

Expand file treeCollapse file tree

1 file changed

+6
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-3
lines changed
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: test/parallel/test-tls-ecdh-disable.js
+6-3Lines changed: 6 additions & 3 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.