Skip to content

Commit 2c2b0ab

Browse files
committed
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4: Fix openssl_x509_checkpurpose_basic.phpt
2 parents 6f42c07 + 98175fc commit 2c2b0ab

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
@@ -8,10 +8,14 @@ if (OPENSSL_VERSION_NUMBER < 0x10000000) die("skip Output requires OpenSSL 1.0")
88
?>
99
--FILE--
1010
<?php
11+
include 'CertificateGenerator.inc';
12+
$certificateGenerator = new CertificateGenerator();
13+
$certificateGenerator->saveCaCert(__DIR__ . "/san-cert.pem");
14+
1115
$cert = "file://" . __DIR__ . "/cert.crt";
1216
$bert = "file://" . __DIR__ . "/bug41033.pem";
1317
$sert = "file://" . __DIR__ . "/san-cert.pem";
14-
$cpca = __DIR__ . "/san-ca.pem";
18+
$cpca = __DIR__ . "/san-cert.pem";
1519
$utfl = __DIR__ . "/sni_server_uk.pem";
1620
$rcrt = openssl_x509_read($cert);
1721

@@ -84,6 +88,10 @@ var_dump(openssl_x509_checkpurpose($sert, X509_PURPOSE_SMIME_ENCRYPT, array($cpc
8488
var_dump(openssl_x509_checkpurpose($sert, X509_PURPOSE_CRL_SIGN, array($cpca), $utfl));
8589
var_dump(openssl_x509_checkpurpose($sert, X509_PURPOSE_ANY, array($cpca), $utfl));
8690
?>
91+
--CLEAN--
92+
<?php
93+
@unlink(__DIR__ . "/san-cert.pem");
94+
?>
8795
--EXPECT--
8896
bool(false)
8997
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)