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/secure-pair.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/secure-pair.js')
-rw-r--r-- | benchmark/tls/secure-pair.js | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/benchmark/tls/secure-pair.js b/benchmark/tls/secure-pair.js index ed678b90609..c0409febacd 100644 --- a/benchmark/tls/secure-pair.js +++ b/benchmark/tls/secure-pair.js @@ -6,21 +6,19 @@ const bench = common.createBenchmark(main, { size: [2, 1024, 1024 * 1024] }); -const fs = require('fs'); +const fixtures = require('../../test/common/fixtures'); const tls = require('tls'); const net = require('net'); -const path = require('path'); -const cert_dir = path.resolve(__dirname, '../../test/fixtures'); const REDIRECT_PORT = 28347; function main({ dur, size, securing }) { const chunk = Buffer.alloc(size, 'b'); 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', isServer: true, requestCert: true, |