Annotation of embedaddon/php/ext/openssl/tests/005.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: openssl_csr_get_subject() tests
3: --SKIPIF--
4: <?php
5: if (!extension_loaded("openssl")) die("skip");
6: if (!function_exists("utf8_decode")) die("skip");
7: ?>
8: --FILE--
9: <?php
10:
11: $csr = file_get_contents(dirname(__FILE__) . '/005_crt.txt');
12: if ($out = openssl_csr_get_subject($csr, 1)) {
13: var_dump($out);
14: }
15: echo "\n";
16: $cn = utf8_decode($out['CN']);
17: var_dump($cn);
18: --EXPECTF--
19: array(6) {
20: ["C"]=>
21: string(2) "NL"
22: ["ST"]=>
23: string(13) "Noord Brabant"
24: ["L"]=>
25: string(4) "Uden"
26: ["O"]=>
27: string(10) "Triconnect"
28: ["OU"]=>
29: string(10) "Triconnect"
30: ["CN"]=>
31: string(15) "*.triconnect.nl"
32: }
33:
34: string(15) "*.triconnect.nl"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>