How to use openssl_pkcs12_read()

Hello, i'm trying to use the function openssl_pkcs12_read() but always
return false and there's no examples in documentation:

$cert = array();

if ( openssl_pkcs12_read('mycert.p12', $cert, 'mypassword') )
{
echo 'success';
}

else
{
echo 'fail';

}

what's wrong?
mmacia [ Mi, 26 Dezember 2007 13:21 ] [ ID #1893909 ]

Re: How to use openssl_pkcs12_read()

The correct way is:

$file = '/home/mmacia/mycert.p12';
$handle = fopen($file, 'r');
$p12buf = fread($handle, filesize($file));
fclose($handle);
openssl_pkcs12_read($p12buf, $p12arr, 'passphrase');
mmacia [ Mi, 26 Dezember 2007 15:12 ] [ ID #1893910 ]
PHP » alt.php » How to use openssl_pkcs12_read()

Vorheriges Thema: sending e-mail form !?HELP!
Nächstes Thema: php5 and php4 together in localhost