mirror of
https://github.com/php/php-src.git
synced 2024-09-23 02:47:26 +00:00
Add tests for OpenSSL crash.
This commit is contained in:
parent
622412d8e6
commit
c36926ba4c
13
ext/openssl/tests/openssl_encrypt_crash.phpt
Normal file
13
ext/openssl/tests/openssl_encrypt_crash.phpt
Normal file
@ -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"
|
Loading…
Reference in New Issue
Block a user