Add ca_root_locations() API to properly handle SSL_CERT_{FILE,DIR}#42
Open
Keno wants to merge 3 commits into
Open
Add ca_root_locations() API to properly handle SSL_CERT_{FILE,DIR}#42Keno wants to merge 3 commits into
Keno wants to merge 3 commits into
Conversation
…CERT_DIR - Add new ca_root_locations() function that returns (files, directories) tuple - ca_root_locations() takes allow_nothing parameter like the deprecated functions - SSL_CERT_FILE is now treated as a single file path (not delimiter-separated) - SSL_CERT_DIR supports delimiter-separated list of directories using keepempty=false - Add deprecation warnings to ca_roots() and ca_roots_path() functions - Simplify _ca_roots() implementation and system CA root locations handling - System CA roots are always files, not directories - Use withenv in tests for proper environment isolation - Add comprehensive tests for the new functionality Fixes JuliaLang#41
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #42 +/- ##
==========================================
+ Coverage 98.14% 98.55% +0.40%
==========================================
Files 3 3
Lines 108 138 +30
==========================================
+ Hits 106 136 +30
Misses 2 2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…SL_CA_ROOTS_PATH="" When JULIA_SSL_CA_ROOTS_PATH is set to empty string, it should return nothing on Windows/macOS (to use system certificates) when allow_nothing is true, not the bundled certificates.
This improves test coverage by testing the case where JULIA_SSL_CA_ROOTS_PATH is set to a directory path, which triggers the isdir() branch in ca_root_locations().
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.
Fixes #41
Per JuliaLang/julia#58666 largely written by Claude.