Skip to content

Commit 1cf4fb7

Browse files
committed
Use larger key size for DSA/DH tests
OpenSSL 3 validates allowed sizes strictly, pick minimum sizes that are supported.
1 parent ec4d926 commit 1cf4fb7

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

ext/openssl/tests/bug73711.cnf

Lines changed: 0 additions & 3 deletions
This file was deleted.

ext/openssl/tests/bug73711.phpt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@ Bug #73711: Segfault in openssl_pkey_new when generating DSA or DH key
44
openssl
55
--FILE--
66
<?php
7-
$cnf = __DIR__ . DIRECTORY_SEPARATOR . 'bug73711.cnf';
8-
var_dump(openssl_pkey_new(["private_key_type" => OPENSSL_KEYTYPE_DSA, 'config' => $cnf]));
9-
var_dump(openssl_pkey_new(["private_key_type" => OPENSSL_KEYTYPE_DH, 'config' => $cnf]));
7+
var_dump(openssl_pkey_new([
8+
"private_key_type" => OPENSSL_KEYTYPE_DSA,
9+
"private_key_bits" => 1024,
10+
]));
11+
var_dump(openssl_pkey_new([
12+
"private_key_type" => OPENSSL_KEYTYPE_DH,
13+
"private_key_bits" => 512,
14+
]));
1015
echo "DONE";
1116
?>
1217
--EXPECTF--

0 commit comments

Comments
 (0)