Skip to content

Commit 974dea5

Browse files
committed
improve test
1 parent 11102e2 commit 974dea5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

ext/openssl/tests/openssl_csr_new_basic.phpt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,18 @@ $a = 1;
99
var_dump(openssl_csr_new(1,$a));
1010
var_dump(openssl_csr_new(1,$a,1,1));
1111
$a = array();
12-
var_dump(openssl_csr_new(array(), $a, array('config' => __DIR__ . DIRECTORY_SEPARATOR . 'openssl.cnf'), array()));
12+
13+
$conf = array('config' => dirname(__FILE__) . DIRECTORY_SEPARATOR . 'openssl.cnf');
14+
var_dump(openssl_csr_new(array(), $a, $conf, array()));
1315

1416
// this leaks
1517
$a = array(1,2);
1618
$b = array(1,2);
17-
var_dump(openssl_csr_new($a, $b, array('config' => __DIR__ . DIRECTORY_SEPARATOR . 'openssl.cnf')));
19+
var_dump(openssl_csr_new($a, $b, $conf));
1820

1921
// options type check
20-
$x = openssl_pkey_new();
21-
var_dump(openssl_csr_new(["countryName" => "DE"], $x, ["x509_extensions" => 0xDEADBEEF]));
22+
$x = openssl_pkey_new($conf);
23+
var_dump(openssl_csr_new(["countryName" => "DE"], $x, $conf + ["x509_extensions" => 0xDEADBEEF]));
2224

2325

2426
echo "Done\n";

0 commit comments

Comments
 (0)