svn: /php/php-src/ branches/PHP_5_3/ext/openssl/tests/openssl_encrypt_crash.phpt branches/PHP_5_4/ext/openssl/tests/openssl_encrypt_crash.phpt
trunk/ext/openssl/tests/openssl_encrypt_crash.phpt
| From: | Scott MacVicar | Date: | Mon, 19 Dec 2011 03:09:05 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_3/ext/openssl/tests/openssl_encrypt_crash.phpt branches/PHP_5_4/ext/openssl/tests/openssl_encrypt_crash.phpt trunk/ext/openssl/tests/openssl_encrypt_crash.phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-67306@lists.php.net to get a copy of this message | ||
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