curl: (60) SSL certificate problem: unable to get local issuer certificate

前端 未结 26 2726
我寻月下人不归
我寻月下人不归 2020-11-22 08:09
root@sclrdev:/home/sclr/certs/FreshCerts# curl --ftp-ssl --verbose ftp://{abc}/ -u trup:trup --cacert /etc/ssl/certs/ca-certificates.crt
* About to connect() to {abc         


        
26条回答
  •  无人共我
    2020-11-22 08:45

    According to cURL docs you can also pass the certificate to the curl command:

    Get a CA certificate that can verify the remote server and use the proper option to point out this CA cert for verification when connecting. For libcurl hackers: curl_easy_setopt(curl, CURLOPT_CAPATH, capath);

    With the curl command line tool: --cacert [file]


    For example:

    curl --cacert mycertificate.cer -v https://www.stackoverflow.com
    

提交回复
热议问题