From 8debd793ddeb151ec716584c62cb61dc4e9ad68c 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 4902dca33bba1a..48c03982c30f7f 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -1173,6 +1173,9 @@ certificate.