-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src: modify SecureContext::SetCACert to not use root_certs
- Loading branch information
1 parent
8253290
commit 5efa9aa
Showing
2 changed files
with
85 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
'use strict'; | ||
const common = require('../common.js'); | ||
const fixtures = require('../../test/common/fixtures'); | ||
const tls = require('tls'); | ||
|
||
const bench = common.createBenchmark(main, { | ||
n: [1, 5], | ||
ca: [0, 1], | ||
}); | ||
|
||
function main(conf) { | ||
const n = conf.n; | ||
|
||
const options = { | ||
key: fixtures.readKey('rsa_private.pem'), | ||
cert: fixtures.readKey('rsa_cert.crt'), | ||
ca: conf.ca === 1 ? [fixtures.readKey('rsa_ca.crt')] : undefined, | ||
}; | ||
|
||
bench.start(); | ||
tls.createSecureContext(options); | ||
bench.end(n); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters