cargo: Peer certificate cannot be authenticated with given CA certificates (SSL certificate problem: certificate has expired)
Problem
I was trying to run my bevy learning project when I get this error after runing cargo run:
error: failed to download from `https://crates.io/api/v1/crates/bevy_derive/0.9.1/download`
Caused by:
[60] Peer certificate cannot be authenticated with given CA certificates (SSL certificate problem: certificate has expired)
Steps
- Init a new project with
cargo new - Add dependencies
- Run
cargo run
Possible Solution(s)
No response
Notes
No response
Version
cargo 1.67.0 (8ecd4f20a 2023-01-10)
release: 1.67.0
commit-hash: 8ecd4f20a9efb626975ac18a016d480dc7183d9b
commit-date: 2023-01-10
host: x86_64-apple-darwin
libgit2: 1.5.0 (sys:0.16.0 vendored)
libcurl: 7.54.0 (sys:0.4.59+curl-7.86.0 system ssl:LibreSSL/2.0.20)
os: Mac OS 10.13.6 [64-bit]
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 21 (11 by maintainers)
Apologies for the inconvenience, folks. Please know that I’m working on this.
I did some more research and testing yesterday, and eventually found this post by a member of Let’s Encrypt’s staff that confirms @ehuss suspicion that the issue has to do with the cross-signed root certificate. Quickly summarized, OpenSSL < 1.1 and LibreSSL < 3.2 will just not work with Let’s Encrypt’s default chain.
I’m now in the process of switching our staging environment over to a certificate provided by GlobalSign. If we can confirm that this resolves the issue with older OpenSSL versions, we’ll roll it out to production as well.
Sorry for the wait, everyone! It took a few days to confirm the fix on staging and test the rollout process to production.
Our Fastly service for
static.crates.ionow serves a certificate signed by Global Sign.This has resolved the above issues on macOS 10.13 (or other systems that still rely on OpenSSL < 1.1) in my test environment. If you continue to experience issues, please let me know so that we can investigate.
After running the new certificates in production for four weeks, I’m gonna close this issue. If anyone runs into this or a similar issue in the future, feel free to create a new issue.
Thank you so much for the fix, @jdno. Also thanks to @ehuss! Really appreciate it.
I just tested it now (had to wait a bit till the GlobalSign one got picked):
and I was able to fetch and build with no problems:
Thank you!
Go ahead to close this issue in order to make the issue backlog less scary. Thank you for the help of investigation! If you still encounter the issue or have finally figured out the cause, let us know and we can consider re-open.