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

UnknownIssuer error with private CA #224

Closed
austinbutler opened this issue Jan 19, 2022 · 4 comments · Fixed by #225
Closed

UnknownIssuer error with private CA #224

austinbutler opened this issue Jan 19, 2022 · 4 comments · Fixed by #225

Comments

@austinbutler
Copy link
Contributor

With a private CA chain added to /etc/pki/tls/certs/ca-bundle.crt I get error trying to connect: invalid certificate: UnknownIssuer. The same request works with curl or httpie. If I use the --native-tls flag with xh it works.

Without being all that familiar with rustls, two potential suggestions:

  1. Better documentation around how SSL certs are found/used?
  2. Integrate rustls-native-certs so that system certificate store just works?
@ducaale
Copy link
Owner

ducaale commented Jan 20, 2022

By default, the reqwest library uses webpki-roots but can also integrate with rustls-native-certs via the rustls-native-certs feature.

@austinbutler can you try compiling xh after adding both rustls-tls-webpki-roots and rustls-tls-native-roots to reqwests's enabled features? thanks

[dependencies.reqwest]
version = "0.11.6"
default-features = false
- features = ["rustls-tls", "json", "gzip", "brotli", "deflate", "multipart", "blocking", "socks", "cookies"]
+ features = ["rustls-tls", "rustls-tls-webpki-roots", "rustls-tls-native-roots", "json", "gzip", "brotli", "deflate", "multipart", "blocking", "socks", "cookies"]

@austinbutler
Copy link
Contributor Author

Yep that seems to do it. Should I open a PR?

@ducaale
Copy link
Owner

ducaale commented Jan 21, 2022

Yes, that would be very much appreciated!

@ducaale
Copy link
Owner

ducaale commented Jan 27, 2022

This is now fixed in xh v0.15.0

@ducaale ducaale closed this as completed Jan 27, 2022
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