sni_server.phpt fails half the time
Open
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
========DIFF========
string(%d) "cs.php.net"
002- string(%d) "uk.php.net"
003- string(%d) "us.php.net"
002+
003+ Warning: Undefined array key "peer_certificate" in /work/php-src/ext/openssl/tests/ServerClientTestCase.inc(191) : eval()'d code on line 16
004+
005+ Deprecated: openssl_x509_parse(): Passing null to parameter #1 ($certificate) of type OpenSSLCertificate|string is deprecated in /work/php-src/ext/openssl/tests/ServerClientTestCase.inc(191) : eval()'d code on line 17
006+
007+ Warning: Trying to access array offset on false in /work/php-src/ext/openssl/tests/ServerClientTestCase.inc(191) : eval()'d code on line 17
008+
009+ Warning: Trying to access array offset on null in /work/php-src/ext/openssl/tests/ServerClientTestCase.inc(191) : eval()'d code on line 17
010+ NULL
011+
012+ Warning: Undefined array key "peer_certificate" in /work/php-src/ext/openssl/tests/ServerClientTestCase.inc(191) : eval()'d code on line 22
013+
014+ Deprecated: openssl_x509_parse(): Passing null to parameter #1 ($certificate) of type OpenSSLCertificate|string is deprecated in /work/php-src/ext/openssl/tests/ServerClientTestCase.inc(191) : eval()'d code on line 23
015+
016+ Warning: Trying to access array offset on false in /work/php-src/ext/openssl/tests/ServerClientTestCase.inc(191) : eval()'d code on line 23
017+
018+ Warning: Trying to access array offset on null in /work/php-src/ext/openssl/tests/ServerClientTestCase.inc(191) : eval()'d code on line 23
019+ NULL
========DONE========
FAIL sni_server [/work/php-src/ext/openssl/tests/sni_server.phpt]
PHP Version
master
Operating System
Ubuntu 24.04
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with ext/openssl/tests/sni_server.phpt and the surrounding logic in ext/openssl/tests/ServerClientTestCase.inc around line 191. Reproduce the intermittent failure on PHP master and inspect why the peer certificate is unavailable. Done means the test runs reliably without the reported warnings or unexpected NULL output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100