Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Support the use of custom CA cert via the env variable REQUESTS_CA_BUNDLE or CURL_CA_BUNDLE or CARGO_HTTP_CAINFO #103

Closed
Owen-CH-Leung opened this issue Nov 4, 2023 · 1 comment · Fixed by #104

Comments

@Owen-CH-Leung
Copy link
Contributor

I was trying to build a rust project and compile it into a python window wheel using maturin and I encountered the issue as described below:

PyO3/maturin#1836

From the erroneous output, I notice that there's an error whenever it tried to reach the domain https://aka.ms to download the microsoft CRT files. As described in the above issue, even though the env variables such as MATURIN_CA_BUNDLE, REQUESTS_CA_BUNDLE, CURL_CA_BUNDLE, CARGO_HTTP_CAINFO, SSL_CERT_FILE have been set, there're still the error tls connection init failed: invalid peer certificate: UnknownIssuer. But network-wise, it's able to reach the domain, proven by the valid output from the command curl --ca-cert [path-to-ca-cert] https://aka.ms

Since maturin uses this crate as part of their dependency, I have looked at the source code of this repo to understand how the http request is fired out. From what I understand, it doesn't seem to support the use of custom cert:

https://github.com/Jake-Shadle/xwin/blob/main/src/manifest.rs#L118
https://github.com/Jake-Shadle/xwin/blob/main/src/ctx.rs#L136

I'm not sure if I read it correctly, so feel free to correct me if I'm wrong. Meanwhile, can I ask if we can add the feature to support the use of custom CA cert (possibly by respecting the presence of env variable such as REQUESTS_CA_BUNDLE, CURL_CA_BUNDLE, CARGO_HTTP_CAINFO, SSL_CERT_FILE ? )

Thanks

@Jake-Shadle
Copy link
Owner

I don't have time to work on this now, please file a PR if this is critical for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants