Skip to content

Fix GH-20175: use 2048-bit default key size in OpenSSL test config#21212

Open
ThanhNguyxn wants to merge 1 commit intophp:PHP-8.3from
ThanhNguyxn:fix/gh-20175-openssl-test-default-bits
Open

Fix GH-20175: use 2048-bit default key size in OpenSSL test config#21212
ThanhNguyxn wants to merge 1 commit intophp:PHP-8.3from
ThanhNguyxn:fix/gh-20175-openssl-test-default-bits

Conversation

@ThanhNguyxn
Copy link

Summary

OpenSSL 3.2+ defaults to security level 2, which rejects 1024-bit keys. ext/openssl/tests/CertificateGenerator.inc still generated a per-test config with default_bits = 1024, causing failures in tests like gh10495.phpt when default openssl.cnf is not provided.

This updates the generated test config to use default_bits = 2048.

Changes

  • ext/openssl/tests/CertificateGenerator.inc
    • default_bits = 1024 -> default_bits = 2048

Related

OpenSSL 3.2+ defaults to security level 2, which rejects 1024-bit keys.
Update the test helper config to use 2048-bit default key size so
ext/openssl tests relying on generated config remain compatible.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant