mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
tls: add "ca" property to certificate object
The objects returned by getPeerCertificate() now have an additional "ca" boolean property that indicates whether the certificate is a Certificate Authority certificate or not. Fixes: https://github.com/nodejs/node/issues/44905 PR-URL: https://github.com/nodejs/node/pull/44935 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <midawson@redhat.com>
This commit is contained in:
1 parent
0e9bad97cc
commit
bf868fdfab
4 files changed
+12
-1
No files matched your search
@@ -52,6 +52,8 @@ connect({
|
||||
debug('peerCert:\n', peerCert);
|
||||
|
||||
assert.ok(peerCert.issuerCertificate);
|
||||
assert.strictEqual(peerCert.ca, false);
|
||||
assert.strictEqual(peerCert.issuerCertificate.ca, true);
|
||||
assert.strictEqual(peerCert.subject.emailAddress, 'ry@tinyclouds.org');
|
||||
assert.strictEqual(peerCert.serialNumber, '147D36C1C2F74206DE9FAB5F2226D78ADB00A426');
|
||||
assert.strictEqual(peerCert.exponent, '0x10001');
|
||||
|
||||
Reference in new issue
Block a user