aboutsummaryrefslogtreecommitdiff
path: root/test/fixtures/tls-connect.js
diff options
context:
space:
mode:
authorSam Roberts <vieuxtech@gmail.com>2017-10-11 20:54:26 -0700
committerSam Roberts <vieuxtech@gmail.com>2018-12-11 15:28:54 -0800
commite5878eaf5e6b891907d2cd668637abb4fd389a5e (patch)
treeb4b55f034afea420d882221b83d1a6bc5918a6fe /test/fixtures/tls-connect.js
parent83ec33b9335a7140c1f8b46357303ff7a8122a0d (diff)
downloadandroid-node-v8-e5878eaf5e6b891907d2cd668637abb4fd389a5e.tar.gz
android-node-v8-e5878eaf5e6b891907d2cd668637abb4fd389a5e.tar.bz2
android-node-v8-e5878eaf5e6b891907d2cd668637abb4fd389a5e.zip
test: test TLS client authentication
TLS client authentication should be tested, including failure scenarios. PR-URL: https://github.com/nodejs/node/pull/24733 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'test/fixtures/tls-connect.js')
-rw-r--r--test/fixtures/tls-connect.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/fixtures/tls-connect.js b/test/fixtures/tls-connect.js
index 303061adc3..764bea7703 100644
--- a/test/fixtures/tls-connect.js
+++ b/test/fixtures/tls-connect.js
@@ -26,15 +26,18 @@ const keys = exports.keys = {
agent5: load('agent5', 'ca2'),
agent6: load('agent6', 'ca1'),
agent7: load('agent7', 'fake-cnnic-root'),
+ agent10: load('agent10', 'ca2'),
+ ec10: load('ec10', 'ca5'),
ec: load('ec', 'ec'),
};
-function load(cert, issuer) {
- issuer = issuer || cert; // Assume self-signed if no issuer
+// root is the self-signed root of the trust chain, not an intermediate ca.
+function load(cert, root) {
+ root = root || cert; // Assume self-signed if no issuer
const id = {
key: fixtures.readKey(cert + '-key.pem', 'binary'),
cert: fixtures.readKey(cert + '-cert.pem', 'binary'),
- ca: fixtures.readKey(issuer + '-cert.pem', 'binary'),
+ ca: fixtures.readKey(root + '-cert.pem', 'binary'),
};
return id;
}