feat: Add support for using the OS trust store in SSL verification#4151
Open
millsks wants to merge 4 commits intomamba-org:mainfrom
Open
feat: Add support for using the OS trust store in SSL verification#4151millsks wants to merge 4 commits intomamba-org:mainfrom
millsks wants to merge 4 commits intomamba-org:mainfrom
Conversation
Author
|
@jjerphan ready for review. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4151 +/- ##
=======================================
Coverage 51.13% 51.14%
=======================================
Files 236 236
Lines 27645 27652 +7
Branches 2832 2833 +1
=======================================
+ Hits 14137 14143 +6
- Misses 13505 13506 +1
Partials 3 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Klaim
approved these changes
Feb 3, 2026
Member
Klaim
left a comment
There was a problem hiding this comment.
LGTM but I would like another team member review too before merging
jjerphan
requested changes
Feb 3, 2026
Comment on lines
+86
to
+87
| else if (remote_fetch_params.ssl_verify == "<system>" | ||
| || remote_fetch_params.ssl_verify == "<truststore>") |
Member
There was a problem hiding this comment.
Please document why <truststore> takes this code-path.
Comment on lines
88
to
+104
| #ifdef LIBMAMBA_STATIC_DEPS | ||
| curl_easy_setopt(handle, CURLOPT_CAINFO, nullptr); | ||
| if (proxy) | ||
| { | ||
| curl_easy_setopt(handle, CURLOPT_PROXY_CAINFO, nullptr); | ||
| } | ||
| #endif | ||
| } | ||
| else if (ssl_verify == "<truststore>") | ||
| { | ||
| // Use OS trust store (Schannel on Windows, system certs on Unix) | ||
| #ifdef LIBMAMBA_STATIC_DEPS | ||
| curl_easy_setopt(handle, CURLOPT_CAINFO, nullptr); | ||
| if (proxy) | ||
| { | ||
| curl_easy_setopt(handle, CURLOPT_PROXY_CAINFO, nullptr); | ||
| } |
Member
There was a problem hiding this comment.
Nit: This could be factorized and comments could be added.
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.
Description
This pull request adds support for using the operating system trust store for SSL certificate verification via a new
truststoreoption for thessl_verifyconfiguration. It updates the configuration logic, command-line interface, and download handling to recognize and correctly process thetruststoresetting. Comprehensive tests are added to ensure the new behavior works as intended.Support for OS trust store in SSL verification:
truststoreas a valid value for thessl_verifyconfiguration, allowing users to specify the use of the OS trust store for SSL certificate verification. The value is normalized internally as<truststore>. [1] [2]'truststore'as an option for--ssl-verify.Download logic enhancements:
curl.cppanddownloader.cppto handle the<truststore>value, ensuring that the appropriate system trust store is used during HTTPS requests. [1] [2]Testing improvements:
truststoreoption, including its precedence rules and interaction with other configuration options and environment variables.Related Issue
Resolves #2857
Type of Change
Checklist
pre-commit run --alllocally in the source folder and confirmed that there are no linter errors.