-
Notifications
You must be signed in to change notification settings - Fork 102
SSL peer cerficate or SSH remote key was not OK (SSL certificate problem: unable to get local issuer certificate) in Rust - Cargo. #339
Comments
I cannot reproduce this issue.
|
Yes, other websites works normally. ps. Fedora 35 and Arch are using 1.1.1.l |
Please send exact error output from cargo/rust (whatever is spitting it out). |
'export CARGO_HTTP_CAINFO=/etc/ssl/cert.pem' should fix it, not sure why it's having trouble locating the certs. https://doc.rust-lang.org/cargo/reference/config.html#httpcainfo. Error: https://termbin.com/fa9g, strace: https://termbin.com/qg5t |
It's works. |
I think the issue should be left open since what I posted was just a workaround |
In your strace is seems to find the files in /etc/ but then fails anyway? |
This error seems to be coming indirectly from |
The first 2000 lines of For the record, debug output from Cargo is not very helpful here. |
More oddities:
|
I have manually updated the openssl and curl crates and rebuilt rust but the issue persists. Another thing I have noticed is that cargo can correctly download the registry but not crates. |
Working on another potential fix. Will have results to share in some hours. |
I don't know if it's related, but I get a similar issue with nim's nimble package manager. After a fresh build of nim, and attempting to run
I'm using the nim package from my personal repo. This also affects nim programs that use ssl. Ex: (ex.nim) import httpclient
var client = newHttpClient()
echo client.getContent("https://github.com") And compiling with: |
Can you reproduce the issue with OpenSSL 1.1.1l? |
I get a different error than before, now it seems like it is unable to detect the ca-certificates. For Downloading Official package list
Trying https://github.com/nim-lang/packages/raw/master/packages.json
Warning: Could not download: No SSL/TLS CA certificates found.
Trying https://irclogs.nim-lang.org/packages.json
Trying https://nim-lang.org/nimble/packages.json
Error: Refresh failed
... Could not download: No SSL/TLS CA certificates found.
For ex.nim: /usr/lib/nim/pure/httpclient.nim(557) ex
/usr/lib/nim/pure/httpclient.nim(324) getDefaultSSL
/usr/lib/nim/pure/net.nim(658) newContext
Error: unhandled exception: No SSL/TLS CA certificates found. [IOError] It may be an error with my port. |
@ehawkvu Can you try 'mkdir /etc/ssl/certs/; ln -s ../cert.pem /etc/ssl/certs/ca-certificates.crt |
Both worked (1.1.1l). nimble: Downloading Official package list
Trying https://github.com/nim-lang/packages/raw/master/packages.json
Success Package list downloaded.
|
Rebuilding nim after upgrading back to openssl 3.0.0 results in the same error as before. |
I was trying to install some packages with cargo and I found this error:
SSL peer certificate or SSH remote key was not OK (SSL certificate problem: unable to get local issuer certificate)
when cargo was trying to download from crates.io, so then the build failed.
I also tried installing some rust packages from community repo and I found the same error. I ran /etc/ssl/update-certdata.sh and the issue continued.
The text was updated successfully, but these errors were encountered: