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

fragile loading of native certs on MacOS with tls-roots #519

Closed
NAlexPear opened this issue Jan 1, 2021 · 0 comments · Fixed by #520
Closed

fragile loading of native certs on MacOS with tls-roots #519

NAlexPear opened this issue Jan 1, 2021 · 0 comments · Fixed by #520

Comments

@NAlexPear
Copy link
Contributor

Bug Report

When using the tls-roots feature, many MacOS users will run into this issue.

Version

tonic v0.3.1
tonic-build v0.2.0

Platform

Linux (Arch, btw)

Crates

tonic (specifically this line)

Description

Failure to parse a cert can happen for a variety of reasons, some of which are outlined in that thread. But failure to parse a single cert from the MacOS Trust Record should not result in failing to load any cert at all if there are other trusted certs in the store.

Prescription

tonic should use the best-effort strategy described in this comment on the previous thread and implemented in hyper-rustls. Happy to make a PR for this if it would get merged!

NAlexPear added a commit to NAlexPear/tonic that referenced this issue Jan 1, 2021
Instead of failing and bailing when a bad cert is found, ignore one-off
errors for bad certs and continue to load the rest of the store.

These one-off errors mostly affect MacOS users, as found in this
rustls-native-certs issue: rustls/rustls-native-certs#4

Fixes: hyperium#519
LucioFranco pushed a commit that referenced this issue Jan 7, 2021
Instead of failing and bailing when a bad cert is found, ignore one-off
errors for bad certs and continue to load the rest of the store.

These one-off errors mostly affect MacOS users, as found in this
rustls-native-certs issue: rustls/rustls-native-certs#4

Fixes: #519
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment