Skip to content

Make rustls-platform-verifier an optional feature#3018

Open
faern wants to merge 1 commit into
seanmonstar:masterfrom
mullvad:optional-platform-verifier
Open

Make rustls-platform-verifier an optional feature#3018
faern wants to merge 1 commit into
seanmonstar:masterfrom
mullvad:optional-platform-verifier

Conversation

@faern
Copy link
Copy Markdown

@faern faern commented Apr 22, 2026

Split rustls-platform-verifier out of the rustls and rustls-no-provider feature lists into its own rustls-platform-verifier feature. The default behaviour is preserved via default-tls pulling both rustls and rustls-platform-verifier.

This lets users that set default-features = false and select only rustls (or rustls-no-provider) drop rustls-platform-verifier and its transitive deps (rustls-native-certs, openssl-probe and other problematic stuff) from the build. Such callers must now either enable rustls-platform-verifier or, more likely what they want: supply trust roots with tls_certs_only().

Breaking per Cargo semver rules because dep:rustls-platform-verifier is removed from existing feature lists.

This solves #2948.
This is an alternative implementation to #3008.

I personally do not really believe in the no-X style features. I think that's what caused the feature explosion we have seen here in the past. rustls-no-x-no-y scales badly. For the same reason, if reqwest is making a breaking release, I believe it would be possible to design this without rustls-no-provider also.

Split rustls-platform-verifier out of the rustls and rustls-no-provider
feature lists into its own rustls-platform-verifier feature. The default
behaviour is preserved via default-tls pulling both rustls and
rustls-platform-verifier.

This lets users that set default-features = false and select only
rustls (or rustls-no-provider) drop rustls-platform-verifier and its
transitive deps (rustls-native-certs, openssl-probe) from the build.
Such callers must now either enable rustls-platform-verifier or supply
trust roots with tls_certs_only().

Breaking per Cargo semver rules because dep:rustls-platform-verifier
is removed from existing feature lists.
@seanmonstar
Copy link
Copy Markdown
Owner

I don't like the no-X features either. I hate them. But I messed it up again. They're needed until another breaking change, and I'd rather not make one so soon after the previous one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants