File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22openssl_csr_parse() tests
33--EXTENSIONS--
44openssl
5- --SKIPIF--
6- <?php
7- if (OPENSSL_VERSION_NUMBER >= 0x30200000 ) die ('skip For OpenSSL < 3.2 ' );
8- ?>
95--FILE--
106<?php
117$ csr = "file:// " . __DIR__ . "/parse.csr " ;
@@ -17,7 +13,7 @@ var_dump(openssl_csr_parse($csr, false));
1713?>
1814--EXPECTF--
1915bool(true)
20- array(8 ) {
16+ array(9 ) {
2117 ["name"]=>
2218 string(71) "/C=UK/ST=England/L=London/CN=test.php.net/emailAddress=test.php@php.net"
2319 ["subject"]=>
@@ -43,13 +39,32 @@ array(8) {
4339 string(23) "sha256WithRSAEncryption"
4440 ["signatureTypeNID"]=>
4541 int(668)
42+ ["attributes"]=>
43+ array(8) {
44+ ["streetAddress"]=>
45+ string(0) ""
46+ ["facsimileTelephoneNumber"]=>
47+ string(0) ""
48+ ["postalCode"]=>
49+ string(3) "N11"
50+ ["telephoneNumber"]=>
51+ string(9) "012345678"
52+ ["name"]=>
53+ string(12) "Organisation"
54+ ["1.3.6.1.4.1.11278.1150.2.1"]=>
55+ string(8) "11112222"
56+ ["1.3.6.1.4.1.11278.1150.2.2"]=>
57+ string(8) "12345678"
58+ ["emailAddress"]=>
59+ string(16) "info@example.com"
60+ }
4661 ["extensions"]=>
4762 array(1) {
4863 ["basicConstraints"]=>
4964 string(8) "CA:FALSE"
5065 }
5166}
52- array(8 ) {
67+ array(9 ) {
5368 ["name"]=>
5469 string(71) "/C=UK/ST=England/L=London/CN=test.php.net/emailAddress=test.php@php.net"
5570 ["subject"]=>
@@ -75,6 +90,25 @@ array(8) {
7590 string(23) "sha256WithRSAEncryption"
7691 ["signatureTypeNID"]=>
7792 int(668)
93+ ["attributes"]=>
94+ array(8) {
95+ ["streetAddress"]=>
96+ string(0) ""
97+ ["facsimileTelephoneNumber"]=>
98+ string(0) ""
99+ ["postalCode"]=>
100+ string(3) "N11"
101+ ["telephoneNumber"]=>
102+ string(9) "012345678"
103+ ["name"]=>
104+ string(12) "Organisation"
105+ ["1.3.6.1.4.1.11278.1150.2.1"]=>
106+ string(8) "11112222"
107+ ["1.3.6.1.4.1.11278.1150.2.2"]=>
108+ string(8) "12345678"
109+ ["emailAddress"]=>
110+ string(16) "info@example.com"
111+ }
78112 ["extensions"]=>
79113 array(1) {
80114 ["basicConstraints"]=>
You can’t perform that action at this time.
0 commit comments