note 27057 added to ref.openssl
| From: | bym at kmit dot sk | Date: | Thu, 21 Nov 2002 14:55:17 +0000 |
| Subject: | note 27057 added to ref.openssl | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-39812@lists.php.net to get a copy of this message | ||
We have a problem with reading the serialNumber of the certificate.
When we use the function
$fp = fopen("cert.pem", "r");
$cert = fread($fp, 8192);
fclose($fp);
$val=openssl_x509_parse($cert,true);
foreach ($val as $key => $value) {
echo "Key: $key; Value: $value<br>\n";
}
the "serialNumber" value is displayed as: -1
But the command
openssl x509 -in cert.pem -noout -serial
returns correct serialNumber value.
Where is the problem???
thnx
--
http://www.php.net/manual/en/ref.openssl.php
http://master.php.net/manage/user-notes.php?action=edit+27057
http://master.php.net/manage/user-notes.php?action=delete+27057
http://master.php.net/manage/user-notes.php?action=reject+27057