aboutsummaryrefslogtreecommitdiff
path: root/test/parallel/test-tls-pfx-authorizationerror.js
diff options
context:
space:
mode:
authorSam Roberts <vieuxtech@gmail.com>2018-11-08 13:40:46 -0800
committerSam Roberts <vieuxtech@gmail.com>2018-11-13 20:42:57 -0800
commitdb35fee1e1ca909f0f33940c0d9501a72baf2375 (patch)
tree789d1749dffbbd7fa28da4751edd21a314cce9f5 /test/parallel/test-tls-pfx-authorizationerror.js
parent98278584ee2c322655849e6d673ac1739e720b53 (diff)
downloadandroid-node-v8-db35fee1e1ca909f0f33940c0d9501a72baf2375.tar.gz
android-node-v8-db35fee1e1ca909f0f33940c0d9501a72baf2375.tar.bz2
android-node-v8-db35fee1e1ca909f0f33940c0d9501a72baf2375.zip
tls: get the local certificate after tls handshake
Add an API to get the local certificate chosen during TLS handshake from the SSL context. Fix: https://github.com/nodejs/node/issues/24095 PR-URL: https://github.com/nodejs/node/pull/24261 Fixes: https://github.com/nodejs/node/issues/24095 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Diffstat (limited to 'test/parallel/test-tls-pfx-authorizationerror.js')
-rw-r--r--test/parallel/test-tls-pfx-authorizationerror.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/parallel/test-tls-pfx-authorizationerror.js b/test/parallel/test-tls-pfx-authorizationerror.js
index 64b6e1485d..a4ea97f104 100644
--- a/test/parallel/test-tls-pfx-authorizationerror.js
+++ b/test/parallel/test-tls-pfx-authorizationerror.js
@@ -22,6 +22,8 @@ const server = tls
rejectUnauthorized: false
},
common.mustCall(function(c) {
+ assert.strictEqual(c.getPeerCertificate().serialNumber,
+ 'FAD50CC6A07F516C');
assert.strictEqual(c.authorizationError, null);
c.end();
})
@@ -35,6 +37,8 @@ const server = tls
rejectUnauthorized: false
},
function() {
+ assert.strictEqual(client.getCertificate().serialNumber,
+ 'FAD50CC6A07F516C');
client.end();
server.close();
}