xref: /PHP-5.6/ext/openssl/tests/bug74651.phpt (revision 89637c6b)
1--TEST--
2Bug #74651: negative-size-param (-1) in memcpy in zif_openssl_seal()
3--SKIPIF--
4<?php
5if (!extension_loaded("openssl")) die("skip openssl not loaded");
6?>
7--FILE--
8<?php
9
10$inputstr = file_get_contents(__DIR__ . "/74651.pem");
11$pub_key_id = openssl_get_publickey($inputstr);
12var_dump($pub_key_id);
13var_dump(openssl_seal($inputstr, $sealed, $ekeys, array($pub_key_id, $pub_key_id), 'AES-128-ECB'));
14?>
15--EXPECTF--
16resource(%d) of type (OpenSSL key)
17bool(false)