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