我已从here下载了适用于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.
接下来我该怎么做?
答案 0 :(得分:3)
以下是我为解决问题所做的工作。
我从here获得了Mozilla使用的捆绑的CA根证书。我从页面复制了数据并将其保存在curl-ca-bundle.crt
文件所在的文件夹中名为curl.exe
的新文件中。这解决了这个问题。
当然,这些说明也可以在cURL documentation page for SSL certificates上找到,正是说明4和5。
希望有所帮助。