3

我已经从这里下载了适用于 Windows 的 cURL 。我选择了Win64 - Generic没有SSL. 我尝试从命令行运行curl https://www.google.com,但出现以下错误:curl: (1) Protocol https not supported or disabled in libcurl.

好的!接下来,我决定下载SSL并安装该版本。我尝试运行与上面相同的命令,但出现以下错误:

curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle" of Certificate
Authority (CA) public keys (CA certs). If the default bundle file isn't adequate, you
can specify an alternate file using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option. 

接下来我该怎么办?

4

1 回答 1

3

这是我为解决问题所做的。

我从这里获得了 Mozilla 使用的 CA 根证书捆绑包。我从页面复制了数据并将其保存在一个新文件curl-ca-bundle.crt中,该文件位于该文件所在的curl.exe文件夹中。这解决了问题。

当然,这些说明也可以在SSL 证书的 cURL 文档页面上找到,也就是说明4 和 5。

希望有帮助。

于 2012-11-14T21:01:12.547 回答