mirror of
https://github.com/php/php-src.git
synced 2024-11-25 02:44:58 +08:00
Fix bug #61405 ext\openssl\tests\022.phpt fails
This commit is contained in:
parent
e55718b091
commit
b638d3020c
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user