#39956 [Opn->Bgs]: Verifying the signature of the certificate
| From: | pajoye@php.net | Date: | Fri, 05 Jan 2007 21:06:05 +0000 |
| Subject: | #39956 [Opn->Bgs]: Verifying the signature of the certificate | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-107211@lists.php.net to get a copy of this message | ||
ID: 39956
Updated by: pajoye@php.net
Reported By: bassijunior at yahoo dot com dot br
-Status: Open
+Status: Bogus
Bug Type: Feature/Change Request
Operating System: Windows XP
PHP Version: 5.2.0
-Assigned To:
+Assigned To: pajoye
New Comment:
"The openssl_verify function verifies a string."
$cert = file_get_contents($pem_filename);
...
$ok = openssl_verify($data, $signature, $cert);
if ($ok)...
assuming that $data and $signature are filled.
But this is not a bug but a support question > bogus.
Previous Comments:
------------------------------------------------------------------------
[2007-01-05 19:18:50] bassijunior at yahoo dot com dot br
Hi,
Some news?
I need a help.
Thanks
------------------------------------------------------------------------
[2006-12-26 21:30:03] bassijunior at yahoo dot com dot br
Description:
------------
Hi,
I was developing a code that need some openssl functions.
I was studying the openssl functions of PHP and I did not find nothing
to verifying the signature of X.509 certificate.
The openssl_verify function verifies a string.
But, what can I do to verify the signature of a certificate, like
this:
-----BEGIN CERTIFICATE-----
MIICxjCCAi+gAwIBAgIBADANBgkqhkiG9w0BAQQFADCBqDEPMA0GA1UEAxMGRk9S
QklTMQswCQYDVQQGEwJMVDEQMA4GA1UEBxMHVklMTklVUzEQMA4GA1UECBMHVklM
TklVUzEoMCYGA1UEChMfVVpEQVJPSkkgQUtDSU5FIEJFTkRST1ZFIEZPUkJJUzEU
MBIGA1UECxMLSU5URUdSQVRJT04xJDAiBgkqhkiG9w0BCQEWFUwuSlVaSUtFTkFT
QEZPUkJJUy5MVDAeFw0wNDAzMjIxNTE2MDNaFw0wNDA0MjExNTE2MDNaMIGoMQ8w
DQYDVQQDEwZGT1JCSVMxCzAJBgNVBAYTAkxUMRAwDgYDVQQHEwdWSUxOSVVTMRAw
DgYDVQQIEwdWSUxOSVVTMSgwJgYDVQQKEx9VWkRBUk9KSSBBS0NJTkUgQkVORFJP
VkUgRk9SQklTMRQwEgYDVQQLEwtJTlRFR1JBVElPTjEkMCIGCSqGSIb3DQEJARYV
TC5KVVpJS0VOQVNARk9SQklTLkxUMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKB
gQCrbyCkLdo1gfT3d5JjwrLYC8WAXNI50afTGx9+ncjfnONGtScsbwlQ5Qw55neH
TUe1TbI/QJc8KZ7PU5/sJAVNpuJW9JEI0y1xX6egfVSWkDGv/GgSb2JebnD1+Nw2
fw8lU0v4F6/IjHU9FOfSTBAIN58g5FqTweAZg5BU7uN9XwIDAQABMA0GCSqGSIb3
DQEBBAUAA4GBACh8eFBJ/8p8f1t8TWlh6lX4hpGpyej0h+0BW45icxkpDplfGbFx
47OClHjzgROo6zFx7Axn5JC1IWPiiyylbSbahpyCpcasuQchErcXJ72ctq8nBXqV
s7sPhlunemdfpFuZLBNFbw5xaUs+lt9tAZFi6EHnhjCFGilH4u5aRcta -----END
CERTIFICATE-----
I have the public key to verify it. But I do not Know how I use it.
Thanks!
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39956&edit=1