com php-src: improve test: ext/openssl/tests/openssl_csr_ne w_basic.phpt

From: Date: Tue, 16 Feb 2016 07:05:16 +0000
Subject: com php-src: improve test: ext/openssl/tests/openssl_csr_ne w_basic.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-91065@lists.php.net to get a copy of this message
Commit: 974dea5e88c689320190dd91f5c51fc4dff07e49 Author: Anatol Belski <ab@php.net> Tue, 16 Feb 2016 08:05:16 +0100 Parents: 11102e26534d5a8ff91a50917cca00c51435ffb2 Branches: PHP-5.6 PHP-7.0 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=974dea5e88c689320190dd91f5c51fc4dff07e49 Log: improve test Changed paths: M ext/openssl/tests/openssl_csr_new_basic.phpt Diff: diff --git a/ext/openssl/tests/openssl_csr_new_basic.phpt b/ext/openssl/tests/openssl_csr_new_basic.phpt index a3a4746..e0f52d7 100644 --- a/ext/openssl/tests/openssl_csr_new_basic.phpt +++ b/ext/openssl/tests/openssl_csr_new_basic.phpt @@ -9,16 +9,18 @@ $a = 1; var_dump(openssl_csr_new(1,$a)); var_dump(openssl_csr_new(1,$a,1,1)); $a = array(); -var_dump(openssl_csr_new(array(), $a, array('config' => __DIR__ . DIRECTORY_SEPARATOR . 'openssl.cnf'), array())); + +$conf = array('config' => dirname(__FILE__) . DIRECTORY_SEPARATOR . 'openssl.cnf'); +var_dump(openssl_csr_new(array(), $a, $conf, array())); // this leaks $a = array(1,2); $b = array(1,2); -var_dump(openssl_csr_new($a, $b, array('config' => __DIR__ . DIRECTORY_SEPARATOR . 'openssl.cnf'))); +var_dump(openssl_csr_new($a, $b, $conf)); // options type check -$x = openssl_pkey_new(); -var_dump(openssl_csr_new(["countryName" => "DE"], $x, ["x509_extensions" => 0xDEADBEEF])); +$x = openssl_pkey_new($conf); +var_dump(openssl_csr_new(["countryName" => "DE"], $x, $conf + ["x509_extensions" => 0xDEADBEEF])); echo "Done\n";

« previous php.cvs (#91065) next »