mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-12 11:26:25 +08:00
Add PHP Extension for GmSSL
View http://gmssl.org/docs/php-api.html for more info.
This commit is contained in:
23
php/ext/openssl/tests/bug67403.phpt
Normal file
23
php/ext/openssl/tests/bug67403.phpt
Normal file
@@ -0,0 +1,23 @@
|
||||
--TEST--
|
||||
Bug #67403: Add signatureType to openssl_x509_parse
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded("openssl")) die("skip");
|
||||
--FILE--
|
||||
<?php
|
||||
$r = openssl_x509_parse(file_get_contents(__DIR__.'/bug64802.pem'));
|
||||
var_dump($r['signatureTypeSN']);
|
||||
var_dump($r['signatureTypeLN']);
|
||||
var_dump($r['signatureTypeNID']);
|
||||
|
||||
$r = openssl_x509_parse(file_get_contents(__DIR__.'/bug37820cert.pem'));
|
||||
var_dump($r['signatureTypeSN']);
|
||||
var_dump($r['signatureTypeLN']);
|
||||
var_dump($r['signatureTypeNID']);
|
||||
--EXPECTF--
|
||||
string(8) "RSA-SHA1"
|
||||
string(21) "sha1WithRSAEncryption"
|
||||
int(65)
|
||||
string(7) "RSA-MD5"
|
||||
string(20) "md5WithRSAEncryption"
|
||||
int(8)
|
||||
Reference in New Issue
Block a user