mirror of
https://github.com/php/php-src.git
synced 2024-12-28 03:10:16 +08:00
ded3d984c6
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
21 lines
393 B
PHP
21 lines
393 B
PHP
--TEST--
|
|
Bug #74099 Memory leak with openssl_encrypt()
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded("openssl")) die("skip");
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
$aad = random_bytes(32);
|
|
$iv = random_bytes(16);
|
|
$key = random_bytes(32);
|
|
|
|
$plaintext = '';
|
|
$tag = null;
|
|
|
|
$ciphertext = openssl_encrypt($plaintext, 'aes-256-gcm', $key, \OPENSSL_RAW_DATA, $iv, $tag, $aad);
|
|
var_dump($ciphertext);
|
|
?>
|
|
--EXPECT--
|
|
string(0) ""
|