且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

卷曲:修正卷曲(51)SSL错误:没有替代的证书使用者名称匹配

更新时间:2023-01-02 10:37:29

通常在证书与主机名不匹配时发生.

It usually happens when the certificate does not match with the host name.

解决方案是与主机联系并要求其修复其证书.
否则,您可以使用-k(或--insecure)选项关闭cURL的证书验证.
请注意,正如选项所说,这是不安全.您不应该使用此选项,因为它允许中间人攻击并破坏HTTPS的目的.

The solution would be to contact the host and ask it to fix its certificate.
Otherwise you can turn off cURL's verification of the certificate, use the -k (or --insecure) option.
Please note that as the option said, it is insecure. You shouldn't use this option because it allows man-in-the-middle attacks and defeats the purpose of HTTPS.

更多信息可以在这里找到: http://curl.haxx.se/docs/sslcerts .html

More can be found in here: http://curl.haxx.se/docs/sslcerts.html