1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 06:51:18 +02:00
Files
archived-php-src/ext/openssl/tests/bug73711.phpt
Jakub Zelenka 43f0141d74 Make OpenSSL tests less dependent on system config
It fixes dependencies on system config if running tests with OpenSSL 3.0
2021-09-12 20:30:02 +01:00

26 lines
560 B
PHP

--TEST--
Bug #73711: Segfault in openssl_pkey_new when generating DSA or DH key
--EXTENSIONS--
openssl
--FILE--
<?php
$config = __DIR__ . DIRECTORY_SEPARATOR . 'openssl.cnf';
var_dump(openssl_pkey_new([
"private_key_type" => OPENSSL_KEYTYPE_DSA,
"private_key_bits" => 1024,
'config' => $config,
]));
var_dump(openssl_pkey_new([
"private_key_type" => OPENSSL_KEYTYPE_DH,
"private_key_bits" => 512,
'config' => $config,
]));
echo "DONE";
?>
--EXPECTF--
object(OpenSSLAsymmetricKey)#%d (0) {
}
object(OpenSSLAsymmetricKey)#%d (0) {
}
DONE