note 27057 rejected from ref.openssl by tix
| From: | tix@php.net | Date: | Thu, 21 Nov 2002 15:19:01 +0000 |
| Subject: | note 27057 rejected from ref.openssl by tix | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-39814@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