-
Notifications
You must be signed in to change notification settings - Fork 150
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
panics "no CA certificates found" #187
Comments
How did you build a configuration? If you used |
@doums Can you provide more information on your configuration so that we can file an issue with rustls-native-certs? |
hola, mi amigos; I ran into a similar issue and am using |
Hi @aaronArinder, thanks for commenting. Can you share more detail? For example, what platform are you running on and which versions of the relevant crates are in play. It would also be helpful if you have a backtrace or a code snippet that reproduces. |
Hi!
Sorry for the response delay. Since our code has changed a lot, and, I don't remember how though, but finally managed to fix/work around the issue. |
Hello, I ran into similar isssue
|
please post:
|
https://github.com/rustls/hyper-rustls/blob/main/src/config.rs#L48 is an assertion which happens if there's no certs locally installed. IMO, this method should return a Result with an error on this case (or an Option, which is None if no certs are locally installed). Checking if certs are locally installed prior to executing this function would require rewriting most of it. |
I want to challenge for a bit that this shouldn't panic. In your particular use case, how are you going to handle an error from this API? |
Falling back to Using If |
If you want a similar effect, you can use the following code fn https_config() -> HttpsConnector<HttpConnector> {
#[cfg(feature = "webpki-roots")]
{
return hyper_rustls::HttpsConnectorBuilder::new()
.with_webpki_roots()
.https_only()
.enable_http1()
.enable_http2()
.build();
}
#[cfg(not(feature = "webpki-roots"))]
{
return hyper_rustls::HttpsConnectorBuilder::new()
.with_native_roots()
.https_only()
.enable_http1()
.enable_http2()
.build();
}
} |
That still panics if the system roots are attempted yet there aren't system roots on the system. That isn't actually falling back at runtime, which is the above discussed flow. |
I was getting the same error as well. Tossed the line below into my Debian based Dockerfile and it fixed the issue: # Update certificate store
RUN apt-get update && apt-get install -y ca-certificates && update-ca-certificates |
Hi,
I have a project which have indirect dependency to
hyper-rustls
. During runtime, the binary panics:The version is
0.22.1
.Note that the crash happens on Android device.
The text was updated successfully, but these errors were encountered: