Skip to content

Commit f19250a

Browse files
committed
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0: Fix openssl_x509_checkpurpose_basic.phpt
2 parents 7daf012 + 2c2b0ab commit f19250a

File tree

3 files changed

+9
-47
lines changed

3 files changed

+9
-47
lines changed

ext/openssl/tests/openssl_x509_checkpurpose_basic.phpt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,14 @@ openssl
99
?>
1010
--FILE--
1111
<?php
12+
include 'CertificateGenerator.inc';
13+
$certificateGenerator = new CertificateGenerator();
14+
$certificateGenerator->saveCaCert(__DIR__ . "/san-cert.pem");
15+
1216
$cert = "file://" . __DIR__ . "/cert.crt";
1317
$bert = "file://" . __DIR__ . "/bug41033.pem";
1418
$sert = "file://" . __DIR__ . "/san-cert.pem";
15-
$cpca = __DIR__ . "/san-ca.pem";
19+
$cpca = __DIR__ . "/san-cert.pem";
1620
$utfl = __DIR__ . "/sni_server_uk.pem";
1721
$rcrt = openssl_x509_read($cert);
1822

@@ -85,6 +89,10 @@ var_dump(openssl_x509_checkpurpose($sert, X509_PURPOSE_SMIME_ENCRYPT, array($cpc
8589
var_dump(openssl_x509_checkpurpose($sert, X509_PURPOSE_CRL_SIGN, array($cpca), $utfl));
8690
var_dump(openssl_x509_checkpurpose($sert, X509_PURPOSE_ANY, array($cpca), $utfl));
8791
?>
92+
--CLEAN--
93+
<?php
94+
@unlink(__DIR__ . "/san-cert.pem");
95+
?>
8896
--EXPECT--
8997
bool(false)
9098
bool(false)

ext/openssl/tests/san-ca.pem

Lines changed: 0 additions & 15 deletions
This file was deleted.

ext/openssl/tests/san-cert.pem

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)