1

我收到错误“SSL 读取:errno-12192”

实际上,以前我的编程工作正常,但过去 1 周我遇到了错误:

SSL 错误:SSL_ERROR_EXPIRED_CERT_ALERT

然后我用新证书替换了我的 .pem 文件,替换后我收到“SSL 读取:errno -12192”错误。我的代码如下:

curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, TRUE);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 1);
curl_setopt($curl, CURLOPT_HEADER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $params ); 
curl_setopt($ch, CURLOPT_CAINFO,  getcwd().'/ca.crt');
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_SSLCERT, getcwd().'/apna_generic_json.pem');
curl_easy_setopt(s, CURLOPT_SSLKEY,'/apna.pem'); 
curl_setopt($ch, CURLOPT_SSLCERTTYPE, "PEM");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
4

0 回答 0