-
Notifications
You must be signed in to change notification settings - Fork 79
[BUG] CA chains are not supported with native-tls #100
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
Comments
Thanks for opening @reyk. What OS are you running? There seem to be differences in how native-tls works (or maybe more accurately how schannel and openssl is configured) across Windows, macOS and Linux (Ubuntu) which are captured in cert.rs.
I'm wondering if this might be an issue to fix upstream? |
I‘m using native-tls with OpenSSL (or LibreSSL) under Linux and OpenBSD. It currently doesn’t split the CA bundle and just loads a single cert from it. Maybe this could eventually fix it one day: sfackler/rust-native-tls#168 You can also call reqwest’s add_root_certificate() multiple times as it pushes each new cert to a Vec internally. I’m using a workaround of I wish there would be a better option but I didn’t see one without patching |
That looks promising, thanks for the link! In the meantime though, I don't see harm in splitting a PEM formatted file and calling |
The problem is that you currently embed a single reqwest Certificate in the CertificateValidation. We could fix that by turning it into a Vec as described or by turning it into a newtype. Would you be interested in a change that breaks the current API or should it be done with a new, additional variant? |
ah, yes. Hmm. I'm fine with breaking the API at this stage as it's still an alpha release. I'm thinking that we should introduce our own type that accepts |
See PR #101 |
Describe the bug
Using a CA pem cert
CertificateValidation::Full
only supports a single certificate and breaks with CAs that require an intermediate CA.To Reproduce
Steps to reproduce the behavior:
elasticsearch
client to itExpected behavior
Either accept an array of certs or split the PEM file into individual certs and call the underlying reqwest method multiple times.
Environment (please complete the following information):
native-tls
The text was updated successfully, but these errors were encountered: