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#61
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).
DanGould
approved these changes
Mar 12, 2025
Collaborator
DanGould
left a comment
There was a problem hiding this comment.
utACK a564c7e
Should we be testing that builds work without _test-util in CI after this change? I did manually test that they do, but I can see how that might break and not get caught by CI if we only build with --all-features
--all-features includes _test-util, so only testing with --all-features risks breaking the default build.
Collaborator
|
did you read op? gonna merge |
Collaborator
Author
|
Oh FFS, I didn't see any CI failures on the PR page, but that's because the job itself was errorneous |
Collaborator
Author
|
This PR's merge commit was removed from branch main, #62 replaces it |
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-utilfeature is enabled, check to see ifSSL_CERT_FILEis 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).