diff options
Diffstat (limited to 'ext/openssl/tests/bug28382.phpt')
| -rw-r--r-- | ext/openssl/tests/bug28382.phpt | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/ext/openssl/tests/bug28382.phpt b/ext/openssl/tests/bug28382.phpt new file mode 100644 index 000000000..7302f59fa --- /dev/null +++ b/ext/openssl/tests/bug28382.phpt @@ -0,0 +1,38 @@ +--TEST-- +#28382, openssl_x509_parse extensions support +--SKIPIF-- +<?php +if (!extension_loaded("openssl")) die("skip"); +if (OPENSSL_VERSION_NUMBER<0x009070af) die("skip"); +?> +--FILE-- +<?php +$cert = file_get_contents(dirname(__FILE__) . "/bug28382cert.txt"); +$ext = openssl_x509_parse($cert); +var_dump($ext['extensions']); +?> +--EXPECTF-- +array(11) { + ["basicConstraints"]=> + string(2) "%s" + ["nsComment"]=> + string(40) "%s" + ["nsCertType"]=> + string(4) "%s" + ["crlDistributionPoints"]=> + string(56) "%s" + ["nsCaPolicyUrl"]=> + string(40) "%s" + ["subjectAltName"]=> + string(26) "%s" + ["subjectKeyIdentifier"]=> + string(22) "%s" + ["authorityKeyIdentifier"]=> + string(159) "%s" + ["keyUsage"]=> + string(4) "%s" + ["nsBaseUrl"]=> + string(22) "%s" + ["UNDEF"]=> + string(4) "%s" +} |
