Conversation
Make the low-level TLS client config secure by default, keep the fake-certificate tests on an explicit opt-out path, and align the chain-validation spec note with the actual default. Co-authored-by: Codex <noreply@openai.com>
There was a problem hiding this comment.
Pull request overview
This PR hardens the TLS 1.3 client defaults by enabling certificate and CertificateVerify validation unless callers explicitly opt out, and updates loopback tests/spec docs to reflect that safer default.
Changes:
- Flip
TlsConfig.skip_cert_verifydefault fromtruetofalse. - Update loopback handshake tests to explicitly set
skip_cert_verify = truefor fake/self-signed cert scenarios. - Update the RFC 5280 chain-validation spec note to match the new default behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/quic/tls13.zig |
Changes the default TLS verification behavior and adjusts/adds tests to keep loopback coverage working under the safer default. |
SPEC/RFC5280_CHAIN_VALIDATION.md |
Updates documentation to reflect the new default and opt-out guidance. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Codex <noreply@openai.com>
There was a problem hiding this comment.
Pull request overview
This PR hardens the TLS 1.3 client defaults by enabling certificate-chain and CertificateVerify validation unless callers explicitly opt out, aligning behavior with the documented security contract.
Changes:
- Flip
TlsConfig.skip_cert_verifydefault tofalseand tighten client-side certificate/CV failure handling. - Update loopback tests to explicitly opt out of verification when using fake/self-signed cert material.
- Update the RFC 5280 chain-validation spec note to match the new default behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/quic/tls13.zig |
Enables cert verification by default, enforces CA bundle presence during validation, and updates tests for the new secure default. |
SPEC/RFC5280_CHAIN_VALIDATION.md |
Updates documentation to reflect the new default for skip_cert_verify. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Update the RFC 5280 status note so it reflects the branch's fail-closed ca_bundle requirement and the remaining gap around automatic system trust loading. Co-authored-by: Codex <noreply@openai.com>
Summary
TlsConfig.skip_cert_verifydefault tofalseso client certificate andCertificateVerifyvalidation are on by defaultVulnerability
The TLS 1.3 client implementation has certificate-chain and
CertificateVerifyverification code, but the low-levelTlsConfigstill defaultsskip_cert_verifytotrue. That means any caller that constructsTlsConfigwithout explicitly overriding the field silently disables server authentication by default.Concrete examples:
server_name, ALPN, and key material will still skip certificate validation unless it remembers to overrideskip_cert_verifyskip_cert_verifyas defaulting tofalseand “testing only” when enabledValidation
zig build testzig buildzig build fuzzgh issue list --repo endel/quic-zig --search "TlsConfig skip_cert_verify default false" --limit 20References