-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Cargo: "The SSL certificate is invalid" on Debian 9 (latest stable) #4785
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
Comments
@bluehood mind running something like |
Here it is |
Ok it looks like Cargo is finding |
I don't know, but I guess you can check on packages.debian.org what package
installs that file
…On 6 Dec 2017 20:13, "Alex Crichton" ***@***.***> wrote:
Ok it looks like Cargo is finding /usr/lib/ssl/certs/ca-certificates.crt
first and using that. Do you know why that file exists and why it may not
be valid when the /etc version is valid?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4785 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKfU-mDxTgvlxyEnwg_4F3cOqogdm6uLks5s9udcgaJpZM4Q4Ozm>
.
|
Sorry I'm not very familiar with debian so I wouldn't really know where to start to investigate this :( |
I quickly searched @WhoAteDaCake is on Ubuntu 16.04 and he is also affected. @WhoAteDaCake, do you also have a certificate like that in the same location? I'm wondering how it got there. @alexcrichton, you might know: can these files be safely deleted? |
AFAIK Maybe check out update-ca-certificates ? |
Ah, thank you @lukaslueg, that is certainly the case: To vanquish all doubts: the inode of the two files is the same ~ ls -i /etc/ssl/certs/ca-certificates.crt
146245 /etc/ssl/certs/ca-certificates.crt
~ ls -i /usr/lib/ssl/certs/ca-certificates.crt
146245 /usr/lib/ssl/certs/ca-certificates.crt
~ So it seems Finally, I ran I don't know much about certificates. As far as I know I haven't changed them or installed custom ones. |
Could you post an strace-dump with It's mildly suspicious that Cargo tries to access a hardcoded certificate path to the tune of |
Here you go. |
As an experiment I pulled a docker image of debian stable and tried the cargo binaries on that (same task, compiling i3status-rust, same binaries, downloaded from here). cargo still chokes on the SSL certificates -- so at least we know it was not something I did to my debian installation :D |
one more update: if I install stable cargo via So stable cargo installed with |
The juicy parts can be found by searching for "urandom" in both traces. The working example picks up the cert-file right away, reads it and apparently uses the information later on without problems. The non-working example tries to read a cert-file from It might be possible that the openssl-parts got some of their configuration hardwired into the final build. Maybe @alexcrichton can draw attention from someone more familiar with the subject. |
@bluehood er actually what version of cargo are you using? I think the ones you're using may be ancient by this point, or are you installing with |
As per links provided, I'm downloading the nightly binary builds from http://doc.crates.io/#install-nightly-cargo Installing cargo via |
Yes can you get the version of that Cargo? I think those links are super out of date and need to be removed :( |
Shouldn't you guys know? 😅
|
Ah yes at over a year old that's a pretty out of date Cargo. Can you try using rustup and see if recent versions work for you? |
As per my comments above, rustup works, but requires sudo privileges, which makes it a no-go for deployment on certain machines |
Ok sure, but I think that's the bug, not this. We can't really evaluate whether a year-old Cargo is buggy because of something still present or whether it's been fixed. |
I agree. This issue can be closed as the problem is now clear. |
Ok, I'll close this in that case. Mind opening an issue up on crates.io about removing the install links? |
done |
@alexcrichton the docs are in this repo though, i'm moving that issue back over here :P |
Oh oops, indeed! |
Encountered a similar issue to #598 with the cargo binaries for linux 64 bit on Debian 9.2.
I unpacked the 64-bit binaries for linux found here, and use them to compire a rust project (i3status-rust, but I don't think it matters). The error was the following:
The workaround mentioned in that issue still works: executing
export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
before running cargo fixes the certificate issue.
The text was updated successfully, but these errors were encountered: