php / php/php-src

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.

Bug Category: Tests Extension: openssl Status: Needs Triage
Dominant language
C
Stars
40.4k
Forks
8.1k
Avg merge
2d 13h
Merged PRs (30d)
96

Description

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

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.

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.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.