Use native-tls/native-certs features of ureq crate #98
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.
Hello!
We use this crate on one of our projects, once we bumped it to version 0.10.7, we started getting failures for the license checks in cargo-deny, since openblas-build now uses
ureq
for downloading the openblas source, which brings in a dependency with a MPL-2.0 license to the Cargo.lock file (it has been brought up in ureq repo as well algesten/ureq#478).ureq
does have some feature flags that provide the possibility to use native-tls, the lib doesn't implement the default tls config when usingnative-tls
feature flag (https://github.com/algesten/ureq/blob/main/src/lib.rs#L377-L397), but it allows to setup an agent explicitly by providing the tls config (as it is done in this test https://github.com/algesten/ureq/blob/main/src/lib.rs#L583-L595).There was a proposal for adding feature flag in
ureq
that includesrustls
with thenative-certs
flag so that the default agent can work with thenative-certs
(algesten/ureq#482), but it was rejected, so currently it is not possible to just tweak the feature flags onureq
and exclude the unwanted sub-dependencies.The idea of this PR is to add feature flags to
openblas-src
andopenblas-build
that allows users to choose which tls config they want to use. This PR introduces 2 feature flags (tls
which includes the default tls thatureq
uses, andnative-certs
which usesnative-tls
andnative-certs
feature flags inureq
).The default flags are set to use the
tls
feature flag, but worth to note is that this would probably be a breaking change when the default features are disabled and neither of these flags are enabled.Any thoughts on this?
I look forward to you feedback!