SSL 证书通道:禁用 VPN 中自动使用客户端证书

thu*_*i39 5 ssl curl ca buildpack

我阅读了很多有关该问题的博客,但没有一个解决方法/解决方案对我有用。

我正在使用如下的curl命令

curl -v  https://golang.org/dl/?mode=json
*   Trying 142.250.80.113:443...
* Connected to golang.org (142.250.80.113) port 443 (#0)
* schannel: disabled automatic use of client certificate
* ALPN: offers http/1.1
* schannel: next InitializeSecurityContext failed: Unknown error (0x80092012) - The revocation function was unable to check revocation for the certificate.
* Closing connection 0
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)

我使用以下命令更改了 gitbash (windows) 中的设置以使用 openssl

git config --global http.sslBackend "openssl"

更改 openssl 后出现以下错误

$ curl -v  https://golang.org/dl/?mode=json
*   Trying 172.253.62.141:443...
* Connected to golang.org (172.253.62.141) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
*  CAfile: C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
*  CApath: C:\Users\AL25229
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (OUT), TLS alert, unknown CA (560):
* SSL certificate problem: self signed certificate in certificate chain
* Closing connection 0
curl: (60) SSL certificate problem: self signed certificate in certificate chain
More details here: https://curl.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
Run Code Online (Sandbox Code Playgroud)

我有我的组织提供的 CA cert/pem 文件。当我连接 VPN 时,我收到所有这些错误消息。连接 VPN 是必需的。禁用VPN后,它就可以正常工作了。

Dei*_*ian -1

你尝试过吗--insecure

这将禁用证书验证并可能起作用。

但请记住,对于生产运行,您应该拥有适当的证书。