-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc,test: tls .ca option supports multi-PEM files
PR-URL: #10389 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
- Loading branch information
1 parent
542f65c
commit 1fca69c
Showing
2 changed files
with
39 additions
and
4 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
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,24 @@ | ||
'use strict'; | ||
const common = require('../common'); | ||
|
||
// Check ca option can contain concatenated certs by prepending an unrelated | ||
// non-CA cert and showing that agent6's CA root is still found. | ||
|
||
const join = require('path').join; | ||
const { | ||
assert, connect, keys | ||
} = require(join(common.fixturesDir, 'tls-connect'))(); | ||
|
||
connect({ | ||
client: { | ||
checkServerIdentity: (servername, cert) => { }, | ||
ca: keys.agent1.cert + '\n' + keys.agent6.ca, | ||
}, | ||
server: { | ||
cert: keys.agent6.cert, | ||
key: keys.agent6.key, | ||
}, | ||
}, function(err, pair, cleanup) { | ||
assert.ifError(err); | ||
return cleanup(); | ||
}); |