php-src icon indicating copy to clipboard operation
php-src copied to clipboard

openssl_x509_checkpurpose_basic.phpt fails, because san-cert.pem expired on 2021-12-11

Open rainerjung opened this issue 4 years ago • 1 comments

Description

Unit test ext/openssl/tests/openssl_x509_checkpurpose_basic.phpt fails. Diff file is:

-- int(-1) int(-1) int(-1) 036- bool(true) 037- bool(true) 038- bool(true) 039- bool(true) 040- bool(true) 041- bool(true) 042- bool(true) 036+ bool(false) 037+ bool(false) 038+ bool(false) 039+ bool(false) 040+ bool(false) 041+ bool(false) 042+ bool(false) bool(false) bool(false) bool(false)

 int(-1)
 int(-1)
 int(-1)

057+ bool(false) 058+ bool(false) 059+ bool(false) 060+ bool(false) 061+ bool(false) 062+ bool(false) 063+ bool(false) 057- bool(true) 058- bool(true) 059- bool(true) 060- bool(true) 061- bool(true) 062- bool(true) 063- bool(true)

The failing tests are all for the certificate

... $sert = "file://" . DIR . "/san-cert.pem"; ...

and "openssl x509 -text" for this cert reveals:

$ openssl x509 -in /path/to/ext/openssl/tests/san-cert.pem -text Certificate: Data: Version: 3 (0x2) Serial Number: 86:aa:c6:d6:39:77:08:ed Signature Algorithm: sha1WithRSAEncryption Issuer: C=US, ST=MN, L=Minneapolis, OU=Domain Control Validated Validity Not Before: Sep 24 08:05:51 2013 GMT Not After : Dec 11 08:05:51 2021 GMT ...

So this test cert expired a few days ago.

PHP Version

PHP 8.1.1, 8.0.14, 7.4.27

Operating System

Linux (several variants), Solaris Sparc

rainerjung avatar Dec 19 '21 11:12 rainerjung

This has already been fixed by https://github.com/php/php-src/commit/98175fc7f1623873ceb2e9a017a319d19bfb3912.

nikic avatar Dec 19 '21 11:12 nikic