sessionOptions.rejectUnauthorized


如果 true,对等证书会根据提供的 CA 列表进行验证。如果验证失败,将会发出错误;可以通过握手回调中的 validationErrorReasonvalidationErrorCode 字段检查该错误。如果 false,对等证书验证错误将被忽略。

🌐 If true, the peer certificate is verified against the list of supplied CAs. An error is emitted if verification fails; the error can be inspected via the validationErrorReason and validationErrorCode fields in the handshake callback. If false, peer certificate verification errors are ignored.