Commit:    bd7bb973b1f4791f000a890b1c1387fcd28c65ee
Author:    Anatoliy Belsky <a...@php.net>         Wed, 28 Mar 2012 16:04:56 
+0200
Parents:   bd928f05921a9c3595181c9b04e8024ad9ab9303
Branches:  PHP-5.3

Link:       
http://git.php.net/?p=php-src.git;a=commitdiff;h=bd7bb973b1f4791f000a890b1c1387fcd28c65ee

Log:
Fix bug #61404 ext\openssl\tests\021.phpt fails

Bugs:
https://bugs.php.net/61404

Changed paths:
  M  ext/openssl/tests/021.phpt


Diff:
bd7bb973b1f4791f000a890b1c1387fcd28c65ee
diff --git a/ext/openssl/tests/021.phpt b/ext/openssl/tests/021.phpt
index 00e2158..391b6a5 100644
--- a/ext/openssl/tests/021.phpt
+++ b/ext/openssl/tests/021.phpt
@@ -8,6 +8,8 @@ $cert = "file://" . dirname(__FILE__) . "/cert.crt";
 $priv = "file://" . dirname(__FILE__) . "/private.key";
 $wrong = "wrong";
 $pub = "file://" . dirname(__FILE__) . "/public.key";
+$config = __DIR__ . DIRECTORY_SEPARATOR . 'openssl.cnf';
+$config_arg = array('config' => $config);
 
 $dn = array(
        "countryName" => "BR",
@@ -21,14 +23,15 @@ $args = array(
        "digest_alg" => "sha1",
        "private_key_bits" => 2048,
        "private_key_type" => OPENSSL_KEYTYPE_DSA,
-       "encrypt_key" => true
+       "encrypt_key" => true,
+       "config" => $config
        );
 
-$privkey = openssl_pkey_new();
+$privkey = openssl_pkey_new($config_arg);
 $csr = openssl_csr_new($dn, $privkey, $args);
 var_dump(openssl_csr_sign($csr, null, $privkey, 365, $args));
-var_dump(openssl_csr_sign($csr, null, $privkey, 365));
-var_dump(openssl_csr_sign($csr, $cert, $priv, 365));
+var_dump(openssl_csr_sign($csr, null, $privkey, 365, $config_arg));
+var_dump(openssl_csr_sign($csr, $cert, $priv, 365, $config_arg));
 var_dump(openssl_csr_sign($csr, $wrong, $privkey, 365));
 var_dump(openssl_csr_sign($csr, null, $wrong, 365));
 var_dump(openssl_csr_sign($csr, null, $privkey, $wrong));
@@ -38,7 +41,7 @@ var_dump(openssl_csr_sign(array(), null, $privkey, 365));
 var_dump(openssl_csr_sign($csr, array(), $privkey, 365));
 var_dump(openssl_csr_sign($csr, null, array(), 365));
 var_dump(openssl_csr_sign($csr, null, $privkey, array()));
-var_dump(openssl_csr_sign($csr, null, $privkey, 365, array()));
+var_dump(openssl_csr_sign($csr, null, $privkey, 365, $config_arg));
 ?>
 --EXPECTF--
 resource(%d) of type (OpenSSL X.509)


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to