property
quic.SessionOptions.verifyPeer
Controls how the client handles server certificate validation:
'strict'— OpenSSL aborts the TLS handshake immediately if the server's certificate fails validation. Thesession.openedpromise rejects with a TLS error. The application cannot inspect the certificate or the error details. This is the most secure mode.'auto'— The TLS handshake completes regardless of validation result. If validation fails, thesession.openedpromise is rejected with an error containing the validation reason, and the session is destroyed. Theonhandshakecallback (if set) fires before rejection, allowing diagnostic logging. This is the default and matches the behavior oftls.connect()withrejectUnauthorized: true.'manual'— The TLS handshake completes regardless of validation result. Thesession.openedpromise resolves with the handshake info, which includesvalidationErrorReasonandvalidationErrorCodeif validation failed. The application is responsible for checking these values and deciding whether to continue. Use this mode for custom validation logic, certificate pinning, or intentionally accepting self-signed certificates.