Ciao a tutti,
ho un problema con uno script per accedere con un certificato digitale a un sito
se provo ad accedere da linea di comando della shell in questo modo mi entra:


#curl -v --key key.pem --cacert ca.pem --cert client.pemassword2 https://sito.it


se invece faccio lo script in PHP/curl mi da errore




[CODE]
<?php
$ch = curl_init();
$url="https://sito.it";
$passfile="password2";

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST , false);
curl_setopt($ch, CURLOPT_VERBOSE , true);
curl_setopt($ch, CURLOPT_SSLKEY, 'key.pem');

curl_setopt($ch, CURLOPT_SSLCERT, 'client.pem');
curl_setopt($ch, CURLOPT_SSLCERTPASSWD, $passfile);
curl_setopt($ch, CURLOPT_SSLKEYPASSWD, $passfile);

$output = curl_exec($ch);

if(!$output)
{
echo "Curl Error : " . curl_error($ch);
}
else
{
echo htmlentities($output);
}

curl_close($ch);
?>
[/CODE]


l'errore riportato è :
Curl Error : could not load PEM client certificate, OpenSSL error error:02001002:system library:fopen:No such file or directory, (no key found, wrong pass phrase, or wrong file format?)




Mi potete dare un aiuto?
grazie a tutti