curl:未知错误(0x80092012)-吊销功能无法检查证书的吊销

LPO*_*Yui 1 ssl ssl-certificate tls1.2

C:\Users\casta>curl https://c5.ppy.sh
curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate.
Run Code Online (Sandbox Code Playgroud)

我已经建立了自己的CA,并从该CA获得了证书。

问题是,当我尝试使用此证书访问网站时,它工作正常!

但是,如果我尝试使用curl或C#应用程序,它将返回错误。

C#错误在这里:

2019-02-28T09:20:33: System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel
2019-02-28T09:20:33: ??: #=zGFbxUFU_LnBci6wJmmCy1$E=.#=z0YcFrd6MZP1A()
2019-02-28T09:20:33: ??: #=zuFHGCPNOLQmjQEcRmqQHLnQ=.#=z3NGNjJ0=()
Run Code Online (Sandbox Code Playgroud)

小智 12

不要惊慌...请检查您的防病毒软件并关闭。发生这种情况是因为您的连接被阻止。

  • 这与阻塞不同。您的防病毒软件可能会执行 MITM 病毒检查,这就是原因。 (2认同)

小智 5

I've been using curl through a mitm proxy for pen-testing and getting the same issue.

I finally figured that curl needs a parameter telling it not to check certificate revocation, so the command looks something like this:

curl "https://www.example.com" --ssl-no-revoke -x 127.0.0.1:8081
Run Code Online (Sandbox Code Playgroud)

The -x parameter passes the proxy details - you may not need this.

hth

  • 但这是一个糟糕的解决方案,因为任何人都可以对你进行中间人攻击,所以使用 https 没有什么意义。 (7认同)

Max*_*Max 5

您可以使用该--ssl标志并像这样省略https

curl --ssl c5.ppy.sh
Run Code Online (Sandbox Code Playgroud)

  • 它尝试使用 ssl,如果失败,则恢复为非安全 [文档](https://curl.se/docs/manpage.html#--ssl)。如果指定 https,则强制curl 仅使用SSL。 (2认同)