OPENSSL problem
| From: | eXXos | Date: | Thu, 15 Mar 2001 13:54:46 +0000 |
| Subject: | OPENSSL problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-44024@lists.php.net to get a copy of this message | ||
Hi,
I'm stuck for serveral days now on the following
problem : whatever I try, i can't get
the openssl_seal function to work.
Even the sample code in the documentation
doesn't work.
I precise that the .dll is well loaded,
I don't get any error while trying to call
the functions of the openssl lib.
I use PHP 4.0.4 on a NT4 server, with IIS.
I also tried PHP 4.0.4 on a WIN2K server with IIS and Apache. Same result.
I use the following code :
----------------------------------
$data="test data";
$fp = fopen("test.cer", "r");
$cert = fread($fp, 8192);
fclose($fp);
$k = openssl_get_publickey($cert);
openssl_seal($data, $sealed, $ekeys, array($k));
openssl_free_key($k);
echo $sealed;
-----------------------------------
$k returns a correct id BUT
$sealed and $ekeys remains
ALWAYS blank/false, as if the seal function
didn't work at all.
I used certs generated by openssl.exe on
NT, with bit depth for RSA encoding of
384, 512, and 1024, the result is the same.
$sealed is always blank.
I precise that with the same certs/private
keys couples, the functions openssl_sign
& verify are working perfectly.
So anyone has an idea of the problem ?
Thanks for your help,
eXXos.