读书人

CentOS Curl提示SSL certificate异常

发布时间: 2012-08-09 15:59:21 作者: rapoo

CentOS Curl提示SSL certificate错误
1、安装RVM 的时候,提示错误:

 curl -L get.rvm.io | bash -s stable  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current                                 Dload  Upload   Total   Spent    Left  Speed100   185  100   185    0     0    206      0 --:--:-- --:--:-- --:--:--     0curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failedMore details here: http://curl.haxx.se/docs/sslcerts.htmlcurl performs SSL certificate verification by default, using a "bundle" of Certificate Authority (CA) public keys (CA certs). The default bundle is named curl-ca-bundle.crt; 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.

在验证证书的时候出现问题,是本地ssl判别证书太旧,导致报ssl证书错误

2、 下载最新的证书文件 、
wget http://curl.haxx.se/ca/cacert.pem
更名为ca-bundle.crt放置到默认目录
mv cacert.pem ca-bundle.crt | mv ca-bundle.crt /etc/pki/tls/certs/

读书人网 >操作系统

热点推荐