Curl certificate revocation - revocation function

0

I am trying to get a response from a website (any website really), but I keep getting the following error:

curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate.

The command I am using is:

curl -i https://www.gmit.ie

I could get it to work, until I tried to get a response from the api.twitter.com site. After that it keeps returning the error.

I can change the command to:

curl -i "https://www.gmit.ie" --ssl-no-revoke

This does work, and gives me a quasi correct response, with the header, but also the entire html code for the site.

How can I get the curl command to work again, correctly?

Additional notes:

  • Using Cmder to send curls.
  • Using multiple networks, none with proxies.
  • Python can get correct responses back.
curl
asked on Stack Overflow Dec 18, 2019 by Clauric

1 Answer

1

I'm late to respond, but I thought it could be worth pointing at a possible confusion you had.

The revocation function was unable to check revocation for the certificate.

You'll get it only for "https", I doubt there's any other reason why it appeared after going to twitter. There are other questions around for that problem, you found the workaround --ssl-no-revoke already.

gives me a quasi correct response, with the header, but also the entire html code for the site.

You forgot to say what the "correct response" is. You will get the document ("html code" quite often) for the URL you requested (not the entire site).

Depending on your curl version, you have the documentation here for example: https://www.mit.edu/afs.new/sipb/user/ssen/src/curl-7.11.1/docs/curl.html

I change to http to get a shorter document and provide what I believe to be correct output.

curl -i http://www.gmit.ie
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   178  100   178    0     0    178      0  0:00:01 --:--:--  0:00:01  1034
HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Mon, 21 Sep 2020 15:57:06 GMT
Content-Type: text/html
Content-Length: 178
Connection: keep-alive
Location: https://www.gmit.ie/

<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>

Did you mean to use -I/--head instead of -i/--include?

curl -I http://www.gmit.ie  --ssl-no-revoke
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0   178    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
HTTP/1.1 301 Moved Permanently
Server: nginx
Date: Mon, 21 Sep 2020 15:56:40 GMT
Content-Type: text/html
Content-Length: 178
Connection: keep-alive
Location: https://www.gmit.ie/

If you get the same, rest assured that you have the correct output.

curl -i "https://www.gmit.ie" --ssl-no-revoke

PS. As documentation states, please make it a habit to put the options before the URL, even though it worked like this too.

answered on Stack Overflow Sep 21, 2020 by JAG

User contributions licensed under CC BY-SA 3.0