src: suggest --use-system-ca when a certificate error occurs

PR-URL: https://github.com/nodejs/node/pull/57362
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This commit is contained in:
Aditi authored and GitHub committed 2025-03-12 13:21:22 +00:00
1 parent 59f00d7132
commit d615a3cfcb
7 files changed
+34 -17

No files matched your search

+6
View File
@@ -547,6 +547,12 @@ description are taken from deps/openssl/openssl/crypto/x509/x509_txt.c
* `'CERT_REJECTED'`: Certificate rejected.
* `'HOSTNAME_MISMATCH'`: Hostname mismatch.
When certificate errors like `UNABLE_TO_VERIFY_LEAF_SIGNATURE`,
`DEPTH_ZERO_SELF_SIGNED_CERT`, or `UNABLE_TO_GET_ISSUER_CERT` occur, Node.js
appends a hint suggesting that if the root CA is installed locally,
try running with the `--use-system-ca` flag to direct developers towards a
secure solution, to prevent unsafe workarounds.
## Class: `tls.CryptoStream`
<!-- YAML