curl 的 ca 認證問題

curl 訪問加密網頁時需要如果出現ca認證問題,那可以用添加 -k 參數來略過,如果不行,那就得采用如下辦法:


參考而已 比如裏面的curl-ca-bundle.crt 會變成 ca-bundle.crt

$ curl-config--ca# show path to the certificate
/usr/local/share/curl/curl-ca-bundle.crt
$ cd /usr/local/share/curl/# go to that path
$ cp curl-ca-bundle.crt curl-ca-bundle.crt.bak# backup certificate
$ curl http://curl.haxx.se/ca/cacert.pem -o curl-ca-bundle.crt # download new


Reference:

http://curl.haxx.se

http://stackoverflow.com/questions/6414232/curl-certificate-error-when-using-rvm-to-install-ruby-1-9-2


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章