Annotation of embedaddon/php/ext/openssl/tests/bug64802.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #64802: openssl_x509_parse fails to parse subject properly in some cases
3: --SKIPIF--
4: <?php
5: if (!extension_loaded("openssl")) die("skip");
6: ?>
7: --FILE--
8: <?php
9: $cert = file_get_contents(__DIR__.'/bug64802.pem');
10: $r = openssl_x509_parse($cert,$use_short_names=true);
11: sort($r['subject']);
12: var_dump( $r['subject'] );
13: ?>
14: --EXPECTF--
15: array(11) {
16: [0]=>
17: string(14) "1550 Bryant st"
18: [1]=>
19: string(5) "94103"
20: [2]=>
21: string(7) "4586007"
22: [3]=>
23: string(2) "CA"
24: [4]=>
25: string(26) "COMODO EV Multi-Domain SSL"
26: [5]=>
27: string(20) "Private Organization"
28: [6]=>
29: string(10) "Rdio, Inc."
30: [7]=>
31: string(13) "San Francisco"
32: [8]=>
33: string(2) "US"
34: [9]=>
35: array(2) {
36: [0]=>
37: string(2) "US"
38: [1]=>
39: string(8) "Delaware"
40: }
41: [10]=>
42: array(6) {
43: [0]=>
44: string(9) "www.rd.io"
45: [1]=>
46: string(8) "rdio.com"
47: [2]=>
48: string(5) "rd.io"
49: [3]=>
50: string(12) "api.rdio.com"
51: [4]=>
52: string(9) "api.rd.io"
53: [5]=>
54: string(12) "www.rdio.com"
55: }
56: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>