curl-and-php
curl: (58) unable to set certificate file (wrong password?)
Date: Thu, 27 Oct 2005 12:01:06 -0500
Hi,
I am new to PHP and curl. I have a problem that has fried me for a week.
I am the client side of a SOAP service. I got the certificate from the
server and I need to access the service using this certificate/key. I am
working on Windows XP. The following code doesn't work. The Error is:
58 - unable to set certificate file (wrong password?)
I gave the multiple settings below for testing. None of them worked.
Any help is greatly appreciated!
================
$url="https://..../postal.asmx?WSDL";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
#curl_setopt($ch, CURLOPT_CAINFO, 'c:\curl-7.15.0\lib\ca-bundle.crt');
#curl_setopt($ch, CURLOPT_CAINFO, 'c:\certificate.pem');
#curl_setopt($ch, CURLOPT_CAINFO,'c:\certnew.cer');
#curl_setopt($ch, CURLOPT_CAINFO,'c:\exportedcertificate.pfx');
#curl_setopt($ch, CURLOPT_CAINFO,'c:\server.keystore');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSLCERT,'c:\certnew.cer');
#curl_setopt($ch, CURLOPT_SSLCERT,'c:\certificate.pem');
#curl_setopt($ch, CURLOPT_SSLCERT,'c:\exportedcertificate.pfx');
#curl_setopt($ch, CURLOPT_SSLCERT,'c:\server.keystore');
curl_setopt($ch, CURLOPT_SSLCERTPASSWD,'mypw');
##curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_POST, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$returned = curl_exec($ch);
echo $returned;
if ($returned == NULL) {
echo "Error:";
echo curl_errno($ch) . " - " . curl_error($ch) . "";
}
curl_close ($ch);
==============================
Thanks a lot in advance
Cynthia
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2005-10-27