Repository navigation
test: Wire TLS skip-verify and custom CA options in the contract test service - #212
Open
kinyoklion wants to merge 1 commit into
Open
kinyoklion wants to merge 1 commit into
kinyoklion wants to merge 1 commit into
Conversation
… service Parse tls.skipVerifyPeer and tls.customCAFile and build a per-client connector for them. TLS-enabled builds declare tls:verify-peer and tls:skip-verify-peer; the native-tls build also declares tls:custom-ca. Generated-by: termag
kinyoklion
marked this pull request as ready for review
November 3, 2026 18:04
keelerm84
approved these changes
Nov 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tls.skipVerifyPeerandtls.customCAFileand builds a per-client connector for them: for rustls, a verifier that accepts any certificate or a root store holding only the custom CA; for native-tls,danger_accept_invalid_certsor the custom CA with the built-in roots disabled.tls:verify-peerandtls:skip-verify-peer, so the{streaming,polling,events}/requests/invalid tls certificatetests and thehttps-skip-verify-peervariants of themethod and headerstests run. The native-tls build also declarestls:custom-ca(thehttps-verify-peer-custom-cavariants). The rustls builds do not, because rustls rejects the harness certificate: it has no subjectAltName.rustlsandtokio-native-tlsbecome direct optional dependencies of the contract-tests crate. Both were already in its dependency graph with the same features.Tested locally against harness v2.42.0 and v3.2.0-alpha.15 with the default, native-tls, webpki-roots, native-roots and openssl crypto builds: no test that passed before fails, and every newly enabled test passes.
Opened from termag
Note
Overview
The contract test HTTP service now accepts
tls.skipVerifyPeerandtls.customCAFileon client configuration and builds a per-instance HTTPS connector instead of always reusing the default verifying connector.A new
tlsmodule implements that behavior for rustls (custom cert verifier or PEM-only root store) and native-tls (danger_accept_invalid_certsor custom CA with built-in roots disabled)./statuscapabilities are feature-gated: TLS builds advertisetls:verify-peerandtls:skip-verify-peer;tls:custom-cais only on native-tls because rustls rejects the harness cert without SAN.rustlsandtokio-native-tlsare declared as direct optional dependencies on the contract-tests crate for the relevant feature flags.Reviewed by Cursor Bugbot for commit 1510cca. Bugbot is set up for automated code reviews on this repo. Configure here.