diff options
author | Alex Aubuchon <alex@aub.dev> | 2019-05-29 21:43:44 +0300 |
---|---|---|
committer | Ali Ijaz Sheikh <ofrobots@google.com> | 2019-06-05 21:37:43 +0300 |
commit | 5d0869744d32fe7901daa568403396a1af12aff9 (patch) | |
tree | ad5e1edf50674bf8b83169ef0a55fe79828bc92c /benchmark/tls/tls-connect.js | |
parent | b250085df30a1dc64bef51c88d76ed13597b4088 (diff) |
test: move test_[key|ca|cert] to fixtures/keys/
Lots of changes, but mostly just search/replace of
fixtures.readSync(...) to fixtures.readKey([new key]...)
Benchmarks modified to use fixtures.readKey(...):
benchmark/tls/throughput.js
benchmark/tls/tls-connect.js
benchmark/tls/secure-pair.js
Also be sure to review the change to L16 of
test/parallel/test-crypto-sign-verify.js
PR-URL: https://github.com/nodejs/node/pull/27962
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'benchmark/tls/tls-connect.js')
-rw-r--r-- | benchmark/tls/tls-connect.js | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/benchmark/tls/tls-connect.js b/benchmark/tls/tls-connect.js index fa6e2cb80ab..4300f6841f0 100644 --- a/benchmark/tls/tls-connect.js +++ b/benchmark/tls/tls-connect.js @@ -1,6 +1,5 @@ 'use strict'; -const fs = require('fs'); -const path = require('path'); +const fixtures = require('../../test/common/fixtures'); const tls = require('tls'); const common = require('../common.js'); @@ -18,11 +17,10 @@ var running = true; function main(conf) { dur = conf.dur; concurrency = conf.concurrency; - const cert_dir = path.resolve(__dirname, '../../test/fixtures'); const options = { - key: fs.readFileSync(`${cert_dir}/test_key.pem`), - cert: fs.readFileSync(`${cert_dir}/test_cert.pem`), - ca: [ fs.readFileSync(`${cert_dir}/test_ca.pem`) ], + key: fixtures.readKey('rsa_private.pem'), + cert: fixtures.readKey('rsa_cert.crt'), + ca: fixtures.readKey('rsa_ca.crt'), ciphers: 'AES256-GCM-SHA384' }; |