-
Notifications
You must be signed in to change notification settings - Fork 790
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: BadSignature
when installing package from private index using ECDSA SHA-512 SSL cert
#4534
Comments
Could you share your private package index TLS setup to reproduce? Are you using nginx as a reverse proxy? |
@samypr100 thank you for the quick response. 🙏 My private package index's SSL certificate is self-signed by a private CA, and yes I'm using nginx as a reverse proxy where TLS is terminated at the proxy. |
Thanks for confirming @kcon-stackav. Would you be able to share some of the tls settings of the nginx config you're using? (e.g. |
Thanks for the thorough write-up and cross references, that's really helpful. I'd be willing to consider changing backends, though I worry it'd be a breaking change and don't fully understand the implications yet. Would you be interested in opening a pull request to explore the change? |
We are using nginx with certificates managed by cert-manager. Cert-manager is hooked up to AWS private CA as an issuer. Certificate generation is automated for us. Presumably if you use a ECDSA private key with enough bits it will sign the cert with the problematic algorithm. |
Thank you! Sure I'll work on a pull request to try to make the change. 🙏 |
I created this PR to try out using Unfortunately it looks like it won't solve our issue 😞. Although Instead it only supports verifying a ECDSA SHA-512 signature when the subject public key algorithm is ECDSA P521: Or otherwise verifying a ECDSA SHA-384 signature when the subject public key algorithm is ECDSA P384: I'm not sure changing our certs to match one of those combinations will be an option, so now I'm thinking our best option may be to leverage #1339 once it is available. |
@kcon-stackav Have you tried with the recently released rustls 0.23.12 & the aws-lc-rs provider? There have been a handful of related PRs across the ecosystem: |
@cpu thanks for the heads-up, unfortunately it looks like |
@cpu Unrelated, but I just needed to take a moment and appreciate your awesome github handle 🤯 |
I can confirm the support for |
I use a private Python package index server (anonymized as
pypi.internal
in the snippets below) that uses anecdsa-with-SHA512
SSL certificate:I am able to use
pip
to fetch and install Python packages from this index, but when I try to useuv
it fails with the following error:I think this may be the same issue described by rust-lang/rustup#3820, because I understand
uv
depends onreqwest
:uv/Cargo.toml
Line 112 in c28a2c7
which depends on
rustls
using thering
feature: https://github.com/seanmonstar/reqwest/blob/c4ebb073438026e09c99469be02fc1f1a254058a/Cargo.toml#L181and
ring
does not yet support the ECDSA SHA-512 certificate signature algorithm (WIP but has been open for over 8 months so it's not clear when it would land and be released: briansmith/ring#1631).I was reading here that it may be possible to configure
reqwest
to useaws-lc-rs
(which does provide support for the ECDSA SHA-512 algorithm forrustls
) instead ofring
. Here is a draft PR where it looks likerustup
is trying to take this approach: rust-lang/rustup#3898Would ya'll consider switching
uv
from usingring
toaws-lc-rs
to support fetching Python packages from an index server whose SSL certificate uses the ECDSA SHA-512 signature algorithm?The text was updated successfully, but these errors were encountered: