curl-and-php
php SSL Problem
Date: Wed, 9 Jul 2003 17:35:04 +0200
Hello,
Please we need some help in programming curl in PHP. We have this code:
<?
$ch = curl_init();
$fp = fopen("php_homepage.txt", "w");
curl_setopt($ch, CURLOPT_URL, " <https://ssl.XXXX.com/WebService/MWeb>
https://ssl.XXXX.com/WebService");
curl_setopt($ch, CURLOPT_SSLVERSION, 3);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSLCERTTYPE, 'PEM');
curl_setopt($ch, CURLOPT_SSLCERT, '/var/www/html/XXXXX/file02pub.pem');
curl_setopt($ch, CURLOPT_SSLCERTPASSWD, '????????');
//curl_setopt($ch, CURLOPT_SSLKEYTYPE, 'PEM');
curl_setopt($ch, CURLOPT_SSLKEY, '/var/www/html/XXXXX/file02priv.pem');
curl_setopt($ch, CURLOPT_FILE, $fp);
ob_start();
curl_exec($ch);
ob_end_flush();
if(curl_error($ch)) {
printf("Se ha producido un error: [%s] %s", curl_errno($ch),
curl_error($ch));
}
curl_close($ch);
fclose($fp);
?>
The result of this page is always the same:
error: [58] unable to set private key file:
'/var/www/html/XXXXX/file02priv.pem' type PEM
What's the problem?
Thank's in advance
-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps
Received on 2003-07-09