From 9fe6dcf6cc013bf76140aac23a0f400e9b64171e Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 9 Nov 2022 10:29:17 +0100 Subject: [PATCH] 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 Reviewed-By: Rich Trott Reviewed-By: Luigi Pinca Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Michael Dawson --- doc/api/tls.md | 4 ++++ src/crypto/crypto_common.cc | 6 +++++- src/env_properties.h | 1 + test/parallel/test-tls-peer-certificate.js | 2 ++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/doc/api/tls.md b/doc/api/tls.md index a9b23fc97501fc..02e9f53942dba9 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -1173,6 +1173,9 @@ certificate.