diff options
author | Scott MacVicar <scottmac@php.net> | 2011-12-19 03:09:05 +0000 |
---|---|---|
committer | Scott MacVicar <scottmac@php.net> | 2011-12-19 03:09:05 +0000 |
commit | 6c841dfda3ee836b33a9b12971b22c6a6a77cd28 (patch) | |
tree | 474137a41f823beff2e848131982b166b9c4ddf2 /ext/openssl | |
parent | 095cbc48a8f0090f3b0abc6155f2b61943c9eafb (diff) | |
download | php-git-6c841dfda3ee836b33a9b12971b22c6a6a77cd28.tar.gz |
Add tests for OpenSSL crash.
Diffstat (limited to 'ext/openssl')
-rw-r--r-- | ext/openssl/tests/openssl_encrypt_crash.phpt | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ext/openssl/tests/openssl_encrypt_crash.phpt b/ext/openssl/tests/openssl_encrypt_crash.phpt new file mode 100644 index 0000000000..b88782b0b2 --- /dev/null +++ b/ext/openssl/tests/openssl_encrypt_crash.phpt @@ -0,0 +1,13 @@ +--TEST-- +openssl_encrypt() crash with old OpenSSL +--SKIPIF-- +<?php if (!extension_loaded("openssl")) print "skip"; ?> +--FILE-- +<?php +openssl_encrypt('', 'AES-128-CBC', 'foo'); +var_dump("done"); +?> +--EXPECTF-- + +Warning: openssl_encrypt(): Using an empty Initialization Vector (iv) is potentially insecure and not recommended in %s on line %d +string(4) "done"
\ No newline at end of file |