Annotation of embedaddon/php/ext/openssl/tests/bug28382.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Bug #28382 (openssl_x509_parse extensions support)
                      3: --SKIPIF--
                      4: <?php 
                      5: if (!extension_loaded("openssl")) die("skip"); 
                      6: if (OPENSSL_VERSION_NUMBER<0x009070af) die("skip");
                      7: ?>
                      8: --FILE--
                      9: <?php
                     10: $cert = file_get_contents(dirname(__FILE__) . "/bug28382cert.txt");
                     11: $ext = openssl_x509_parse($cert);
                     12: var_dump($ext['extensions']);
                     13: ?>
                     14: --EXPECTF--
                     15: array(11) {
                     16:   ["basicConstraints"]=>
                     17:   string(8) "CA:FALSE"
                     18:   ["nsComment"]=>
                     19:   string(38) "For Grid use only; request tag userTag"
                     20:   ["nsCertType"]=>
                     21:   string(30) "SSL Client, SSL Server, S/MIME"
                     22:   ["crlDistributionPoints"]=>
                     23:   string(51) "URI:http://mobile.blue-software.ro:90/ca/crl.shtml
                     24: "
                     25:   ["nsCaPolicyUrl"]=>
                     26:   string(38) "http://mobile.blue-software.ro:90/pub/"
                     27:   ["subjectAltName"]=>
                     28:   string(28) "email:sergiu@bluesoftware.ro"
                     29:   ["subjectKeyIdentifier"]=>
                     30:   string(59) "B0:A7:FF:F9:41:15:DE:23:39:BD:DD:31:0F:97:A0:B2:A2:74:E0:FC"
                     31:   ["authorityKeyIdentifier"]=>
                     32:   string(115) "DirName:/C=RO/ST=Romania/L=Craiova/O=Sergiu/OU=Sergiu SRL/CN=Sergiu CA/emailAddress=n_sergiu@hotmail.com
                     33: serial:00
                     34: "
                     35:   ["keyUsage"]=>
                     36:   string(71) "Digital Signature, Non Repudiation, Key Encipherment, Data Encipherment"
                     37:   ["nsBaseUrl"]=>
                     38:   string(20) "http://62.231.98.52/"
                     39:   ["1.2.3.4"]=>
                     40:   string(4) "%s"
                     41: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>