xref: /PHP-8.2/ext/openssl/tests/bug74651.phpt (revision 74859783)
1--TEST--
2Bug #74651: negative-size-param (-1) in memcpy in zif_openssl_seal()
3--EXTENSIONS--
4openssl
5--FILE--
6<?php
7
8$inputstr = file_get_contents(__DIR__ . "/74651.pem");
9$pub_key_id = openssl_get_publickey($inputstr);
10var_dump($pub_key_id);
11var_dump(openssl_seal($inputstr, $sealed, $ekeys, array($pub_key_id, $pub_key_id), 'AES-128-ECB'));
12?>
13--EXPECTF--
14object(OpenSSLAsymmetricKey)#%d (0) {
15}
16bool(false)
17