Curl Error: unable to set private key file: 'test.pem' type PEM

前端 未结 1 810
孤街浪徒
孤街浪徒 2021-01-23 10:54

My Pem file is in this format.

Bag Attributes
localKeyID:
friendlyName: test
subject=/C=GB/ST=London/L=Soho/O=Rightmove/OU=RTDF/CN=cmexpertise
issuer=/C=GB/ST=L         


        
1条回答
  •  时光说笑
    2021-01-23 11:05

    There are two errors.

    • one error was of pem file there is a error in pem file generation.
    • another error is i didn't include CURLOPT_SSLCERTPASSWD() in code.

    Code,

        curl_setopt($ch,CURLOPT_SSLCERTTYPE,"PEM");
        curl_setopt($ch, CURLOPT_SSLCERT, "test.pem");  
        curl_setopt($ch, CURLOPT_SSLCERTPASSWD, '******'); // password
    

    0 讨论(0)
提交回复
热议问题