This repository was archived by the owner on Dec 19, 2025. It is now read-only.
Use SSL_CERT_FILE env var if set in test builds#62
Merged
nothingmuch merged 2 commits intopayjoin:mainfrom Mar 12, 2025
Merged
Conversation
When the `_test-util` feature is enabled, check to see if `SSL_CERT_FILE` is set and if that's the case use the native roots rustls connector configuration, which expects that variable to point at a pem file. This allows a self signed certificate to be used for testing purposes, without altering the validation path, but retains webpki roots for normal builds or if the environment variable is not set (i.e. the platform supplied root certificates are not used for test builds, the environment variable must be set for this to take effect).
--all-features includes _test-util, so only testing with --all-features risks breaking the default build.
e8052d1 to
d46ad9e
Compare
DanGould
approved these changes
Mar 12, 2025
This was referenced Mar 13, 2025
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
When the _test-util feature is enabled, check to see if SSL_CERT_FILE is set and if that's the case use the native roots rustls connector configuration, which expects that variable to point at a pem file.
This allows a self signed certificate to be used for testing purposes, without altering the validation path, but retains webpki roots for normal builds or if the environment variable is not set (i.e. the platform supplied root certificates are not used for test builds, the environment variable must be set for this to take effect).
Replaces #61