Fix bug #61405 ext\openssl\tests\022.phpt fails

This commit is contained in:
Anatoliy Belsky 2012-03-27 16:05:05 +02:00
parent e55718b091
commit b638d3020c

View File

@ -5,6 +5,8 @@ openssl_csr_export() tests
--FILE--
<?php
$wrong = "wrong";
$config = __DIR__ . DIRECTORY_SEPARATOR . 'openssl.cnf';
$config_arg = array('config' => $config);
$dn = array(
"countryName" => "BR",
@ -18,10 +20,11 @@ $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_export($csr, $output));
var_dump(openssl_csr_export($wrong, $output));