xref: /PHP-5.6/ext/openssl/tests/bug67403.phpt (revision 94140afa)
1--TEST--
2Bug #67403: Add signatureType to openssl_x509_parse
3--SKIPIF--
4<?php
5if (!extension_loaded("openssl")) die("skip");
6--FILE--
7<?php
8$r = openssl_x509_parse(file_get_contents(__DIR__.'/bug64802.pem'));
9var_dump($r['signatureTypeSN']);
10var_dump($r['signatureTypeLN']);
11var_dump($r['signatureTypeNID']);
12
13$r = openssl_x509_parse(file_get_contents(__DIR__.'/bug37820cert.pem'));
14var_dump($r['signatureTypeSN']);
15var_dump($r['signatureTypeLN']);
16var_dump($r['signatureTypeNID']);
17--EXPECTF--
18string(8) "RSA-SHA1"
19string(21) "sha1WithRSAEncryption"
20int(65)
21string(7) "RSA-MD5"
22string(20) "md5WithRSAEncryption"
23int(8)
24