Cargo is unable to download a file due to a SSL connect error

2

When Cargo tries to download a file, it gives the error [35] SSL connect error. I'm using Windows and I'm not using a proxy.

If I try to compile a project with cargo build, it returns the error:

 Downloading crypto-hash v0.2.1
error: unable to get packages from source

Caused by:
  [35] SSL connect error (schannel: next InitializeSecurityContext failed: Unknown error (0x80092013) - Il server di revoca � offline. La funzione richiamata non � in grado di completare il controllo di revoca.)

Is it a problem with curl? I found this article, but I don't know if I have to put some configuration in the .cargo\config file.

windows
ssl
curl
rust
rust-cargo
asked on Stack Overflow Jan 30, 2017 by Marco Andreolli • edited Jan 30, 2017 by Shepmaster

4 Answers

7

Following Marty's answer, this worked for me:

[http]
check-revoke = false
answered on Stack Overflow Jun 7, 2019 by ASB
3

Your error message (automatically translated to English) says:

The revocation server is offline. The callback function will not be able to complete the revocation check

SSL certificates can be revoked at any time, so a client needs to be able to check a server to see what state they are in. For whatever reason, your computer is unable to connect to the server. This is highly unlikely to be a Cargo issue; you probably need to perform normal network troubleshooting to discover why you cannot connect to this server.

There are a number of Cargo issues (2797, 1180, 636, 1689, probably more) around this. Suggestions include:

636 has a comment also specifically about the revocation server.

As of 2016-12-01:

The tl;dr; I believe is that on Windows right now there's no way to get Cargo to accept an invalidate [sic] SSL certificate.

answered on Stack Overflow Jan 30, 2017 by Shepmaster • edited Jan 30, 2017 by Shepmaster
3

Set the environmental variable CARGO_HTTP_CHECK_REVOKE=false. This worked for me. I did try to put the below setting in config but did not work;

[http]
http.check-revoke = false

I'm on Windows 10 x64, build 1903.

answered on Stack Overflow Oct 14, 2019 by Amani
1

You can prevent Cargo from checking for a revoked certificate with an option in ~\.cargo\config:

[http]
check-config = false
answered on Stack Overflow Jul 30, 2018 by Marty Neal • edited Jul 30, 2018 by Shepmaster

User contributions licensed under CC BY-SA 3.0