File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,16 +60,16 @@ function readCaBundle(caPath) {
6060
6161/**
6262 * Node `https.request` options implementing the profile's policy.
63- * In `pinned`/`insecure` mode Node's own chain check is disabled and replaced by
64- * the fingerprint check in `checkPeerCertificate` — never skip that follow-up .
63+ * Certificate validation must remain enabled; additional checks (like pinning)
64+ * are additive and must not replace TLS verification .
6565 */
6666function nodeTlsOptions ( profile ) {
6767 const mode = profile ?. tls ?. mode || 'system' ;
6868 if ( mode === 'custom-ca' ) {
6969 return { ca : readCaBundle ( profile . tls . caPath ) , rejectUnauthorized : true } ;
7070 }
7171 if ( mode === 'pinned' || mode === 'insecure' ) {
72- return { rejectUnauthorized : false } ;
72+ return { rejectUnauthorized : true } ;
7373 }
7474 return { rejectUnauthorized : true } ;
7575}
You can’t perform that action at this time.
0 commit comments