1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/openssl/tests/gh16357.phpt
Christoph M. Becker 549bcdb7fb Fix GH-16357: openssl may modify member types of certificate arrays
We must not use `try_convert_to_string()` on members of unseparated
array arguments; instead of separating, we use `zval_try_get_string()`.

Closes GH-16370.
2024-10-12 16:05:31 +02:00

23 lines
393 B
PHP

--TEST--
GH-16357 (openssl may modify member types of certificate arrays)
--EXTENSIONS--
openssl
--FILE--
<?php
$infile = __DIR__ . "/cert.crt";
$outfile = __DIR__ . "/gh16357.txt";
$certs = [123];
var_dump(openssl_pkcs7_encrypt($infile, $outfile, $certs, null));
var_dump($certs);
?>
--CLEAN--
<?php
unlink(__DIR__ . "/gh16357.txt");
?>
--EXPECT--
bool(false)
array(1) {
[0]=>
int(123)
}