Getting error in Curl - Peer certificate cannot be authenticated with known CA certificates

前端 未结 6 2043
长发绾君心
长发绾君心 2021-01-02 03:33

I am getting the below error while making ssl connection with self signed certificate. \"Peer certificate cannot be authenticated with known CA certificates\"

It is

6条回答
  •  猫巷女王i
    2021-01-02 03:59

    By default CURL will generally verify the SSL certificate to see if its valid and issued by an accepted CA. To do this, curl uses a bundled set of CA certificates.

    If you'd like to turn off curl's verification of the certificate, use the -k (or --insecure) option. Here's an example:

    curl --noproxy -k \* -D - https://127.0.0.1:443/some-secure-endpoint
    

提交回复
热议问题