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

1.1       misho       1: --TEST--
                      2: CVE 2013-4073: Null-byte certificate handling
                      3: --SKIPIF--
                      4: <?php 
                      5: if (!extension_loaded("openssl")) die("skip");
                      6: --FILE--
                      7: <?php
                      8: $cert = file_get_contents(__DIR__ . '/cve2013_4073.pem');
                      9: $info = openssl_x509_parse($cert);
                     10: var_export($info['extensions']);
                     11: 
                     12: --EXPECTF--
                     13: array (
                     14:   'basicConstraints' => 'CA:FALSE',
                     15:   'subjectKeyIdentifier' => '88:5A:55:C0:52:FF:61:CD:52:A3:35:0F:EA:5A:9C:24:38:22:F7:5C',
                     16:   'keyUsage' => 'Digital Signature, Non Repudiation, Key Encipherment',
                     17:   'subjectAltName' => 'DNS:altnull.python.org' . "\0" . 'example.com, email:null@python.org' . "\0" . 'user@example.org, URI:http://null.python.org' . "\0" . 'http://example.org, IP Address:192.0.2.1, IP Address:2001:DB8:0:0:0:0:0:1
                     18: ',
                     19: )

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