7

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.

2
  • 2
    We're missing some important details: does that happen in any project? If not, which one? Can you download the same packages using another application?
    – E_net4
    Commented Jan 30, 2017 at 13:59
  • Yes for any project, also if I try "cargo install racer" Commented Jan 30, 2017 at 14:09

4 Answers 4

14

Following Marty's answer, this worked for me:

[http]
check-revoke = false
13

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.

2
  • I'm on a corporate network with self-signed certificates. The environment variable works for me also, nothing else did. Commented Jan 12, 2022 at 16:11
  • This is the only solution that did help me as well.
    – s0mbre
    Commented Jul 10 at 1:19
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.

3
  • Ok, probably is network/windows problem, but is it possible exclude this check? With curl there is --ssl-no-revoke flag Commented Jan 30, 2017 at 14:44
  • @MarcoAndreolli probably not (see my updates). You should not strive to disable SSL (or any security, really), instead, you should strive to fix the problem. SSL security is vitally important in the world today.
    – Shepmaster
    Commented Jan 30, 2017 at 14:52
  • 1
    1. I don't have a proxy, 2. I disable proxy and AntiVirus, 3. config seems don' do anything... but I don't know if I get the correct .pem file Commented Jan 30, 2017 at 15:24
0

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

[http]
check-config = false
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.