Commits

scot...@c90b9560-bf6c-de11-be94-00142212c4b1  committed 1b58a91

Add tests for OpenSSL crash.

  • Participants
  • Parent commits fc2d0b3
  • Branches PHP_5_3

Comments (0)

Files changed (1)

File ext/openssl/tests/openssl_encrypt_crash.phpt

+--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"