-
Notifications
You must be signed in to change notification settings - Fork 114
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
"Invalid peer certificate" when run on network which substitutes certs #764
Comments
Likely happened after #719. As I don't know much about these topics and can't reproduce, I leave this to others to figure out and fix. |
I believe all that should be needed would be to update the feature selection on If you want to enable their use but make it opt-in for users, then you'd add the feature but call Hope that helps! |
I got the same error, I still don't understand what should be done on client side to get around with it. |
I think applying the following patch might work, but I haven't checked it.
|
Unfortunately it does NOT work. My laptop is using Zscaler VPN. My rust version is: OS: My older MacBook Pro installed rust 1.75.0 but the same version of cargo-release which works well using the same VPN. Is there any way to specify Zscaler Certificate for usage when using Or can the TLS be turned off? |
(I should say that my attempt at a patch was my initial guess from reviewing the way things appeared to work; I'm not a Reqwest (and Rustls under the hood) definitely allows for configuration of the trusted certificates, so the question I think is how to expose that functionality to Some things I've seen in other tools:
These could then be done via:
I haven't explored how In short: yes I believe this could be implemented, but there'd be implementation work to figure out:
|
In our config layering, we support a user-wide config which it seems something like this would work. We could potentially also have a CLI flag that is layered in with this. Whether to use CLI or config is dependent on how transient the state is and if there are one time exceptions. If this is a set-and-forget type of thing, config makes sense. In proposing a config or CLI, I would like prior art shown of how other commands tend to represent this so we can be consistent on terms to make adoption easier. |
I think putting it in configuration makes sense. In general I don't expect that modifications of the set of trusted certificates are a common thing to set transiently. Rather, you'd want to do a one-time configuration to link For prior art, I'd say Git's configuration around this is a good example. You can see some of the relevant configuration here: https://git-scm.com/docs/git-config#Documentation/git-config.txt-httpsslCAInfo |
I'm happy to do an implementation around this if that's helpful. This is now blocking for me to publish versions of a crate I'm working on, so I'd like to get it resolved. |
If you'd be able to. As I can't reproduce this problem, I'm not in a good position to verify that its fixed. |
This issue appears to have arisen between
v0.20.5
andv0.25.6
(it worked for me on the former version, and now doesn't on the latter).Basically, I'm running on a network where certificates for sites are substituted with a chain managed by the network operator. I have the root for this chain installed in my system certificate store.
I can confirm with the
-vv
flag thatrustls
under the hood is picking up my network's substitute chain, which it then fails to verify.It looks like
cargo-release
useswebpki_roots
throughreqwest
, which only considers the Mozilla root certificate list, and does not incorporate what certs are trusted in the system store.I believe the solution would be to modify how
reqwest
is used to incorporaterustls_native_certs
instead.The text was updated successfully, but these errors were encountered: