scottmac Mon, 19 Dec 2011 03:09:05 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=321148
Log:
Add tests for OpenSSL crash.
Changed paths:
A
php/php-src/branches/PHP_5_3/ext/openssl/tests/openssl_encrypt_crash.phpt
A
php/php-src/branches/PHP_5_4/ext/openssl/tests/openssl_encrypt_crash.phpt
A php/php-src/trunk/ext/openssl/tests/openssl_encrypt_crash.phpt
Added: php/php-src/branches/PHP_5_3/ext/openssl/tests/openssl_encrypt_crash.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/openssl/tests/openssl_encrypt_crash.phpt
(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/openssl/tests/openssl_encrypt_crash.phpt
2011-12-19 03:09:05 UTC (rev 321148)
@@ -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
Added: php/php-src/branches/PHP_5_4/ext/openssl/tests/openssl_encrypt_crash.phpt
===================================================================
--- php/php-src/branches/PHP_5_4/ext/openssl/tests/openssl_encrypt_crash.phpt
(rev 0)
+++ php/php-src/branches/PHP_5_4/ext/openssl/tests/openssl_encrypt_crash.phpt
2011-12-19 03:09:05 UTC (rev 321148)
@@ -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
Added: php/php-src/trunk/ext/openssl/tests/openssl_encrypt_crash.phpt
===================================================================
--- php/php-src/trunk/ext/openssl/tests/openssl_encrypt_crash.phpt
(rev 0)
+++ php/php-src/trunk/ext/openssl/tests/openssl_encrypt_crash.phpt
2011-12-19 03:09:05 UTC (rev 321148)
@@ -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
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php