default_bits=1024 causes test failure with OpenSSL 3.2+

Open Beginner friendly
#20,175 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
php

Research direction

Start with ext/openssl/tests/CertificateGenerator.inc and inspect the default_bits=1024 setting referenced by the issue. Run ext/openssl/tests/gh10495.phpt on a system using OpenSSL 3.2+ without the default openssl.cnf. Done means the test no longer fails because the generated key is rejected at security level 2.

Written by the indexing model from the issue text.

Description

Bug Category: Tests Extension: openssl Status: Needs Triage
Description

ext/openssl/tests/gh10495.phpt test fails on systems with OpenSSL 3.2+ if the default openssl.cnf is not provided.

This is caused by the default_bits=1024 setting in ext/openssl/tests/CertificateGenerator.inc.
OpenSSL starting from 3.2 requires 2048-bit keys on the default security level 2 (https://docs.openssl.org/3.2/man3/SSL_CTX_set_security_level/#description).

Image
PHP Version
PHP 8.4.13
Operating System

WSL with Arch Linux

Dominant language
C
Stars
40.4k
Forks
8.2k
Avg merge
2d 14h
Merged PRs (30d)
112

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from php/php-src

All issues in php/php-src

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.