mirror of
https://github.com/php/php-src.git
synced 2026-04-25 17:08:14 +02:00
Extend openssl_x509_parse to cover cert resource
This commit is contained in:
@@ -8,10 +8,13 @@ if (OPENSSL_VERSION_NUMBER < 0x10000000) die("skip Output requires OpenSSL 1.0")
|
||||
<?php
|
||||
$cert = "file://" . dirname(__FILE__) . "/cert.crt";
|
||||
|
||||
var_dump(openssl_x509_parse($cert));
|
||||
$parsedCert = openssl_x509_parse($cert);
|
||||
var_dump($parsedCert === openssl_x509_parse(openssl_x509_read($cert)));
|
||||
var_dump($parsedCert);
|
||||
var_dump(openssl_x509_parse($cert, false));
|
||||
?>
|
||||
--EXPECTF--
|
||||
bool(true)
|
||||
array(16) {
|
||||
["name"]=>
|
||||
string(96) "/C=BR/ST=Rio Grande do Sul/L=Porto Alegre/CN=Henrique do N. Angelo/emailAddress=hnangelo@php.net"
|
||||
|
||||
Reference in New Issue
Block a user