PHP  
 PHP_5_3
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for ext/openssl/tests/022.phpt ('openssl_csr_export() tests')

Script

1: <?php
2: $wrong 
"wrong";
3:
$config __DIR__ DIRECTORY_SEPARATOR 'openssl.cnf';
4:
$config_arg = array('config' => $config);
5:
6:
$dn = array(
7:     
"countryName" => "BR",
8:     
"stateOrProvinceName" => "Rio Grande do Sul",
9:     
"localityName" => "Porto Alegre",
10:     
"commonName" => "Henrique do N. Angelo",
11:     
"emailAddress" => "hnangelo@php.net"
12:     
);
13:
14:
$args = array(
15:     
"digest_alg" => "sha1",
16:     
"private_key_bits" => 2048,
17:     
"private_key_type" => OPENSSL_KEYTYPE_DSA,
18:     
"encrypt_key" => true,
19:     
"config" => $config,
20:     );
21:
22:
$privkey openssl_pkey_new($config_arg);
23:
$csr openssl_csr_new($dn$privkey$args);
24:
var_dump(openssl_csr_export($csr$output));
25:
var_dump(openssl_csr_export($wrong$output));
26:
var_dump(openssl_csr_export($privkey$output));
27:
var_dump(openssl_csr_export(array(), $output));
28:
var_dump(openssl_csr_export($csr$outputfalse));
29:
?>
30:

Expected

bool(true)

Warning: openssl_csr_export() expects parameter 1 to be resource, string given in %s on line %d
NULL

Warning: openssl_csr_export(): supplied resource is not a valid OpenSSL X.509 CSR resource in %s on line %d

Warning: openssl_csr_export(): cannot get CSR from parameter 1 in %s on line %d
bool(false)

Warning: openssl_csr_export() expects parameter 1 to be resource, array given in %s on line %d
NULL
bool(true)

Output

** ERROR: process timed out **

Diff

001+ ** ERROR: process timed out **
001- bool(true)
002- 
003- Warning: openssl_csr_export() expects parameter 1 to be resource, string given in %s on line %d
004- NULL
005- 
006- Warning: openssl_csr_export(): supplied resource is not a valid OpenSSL X.509 CSR resource in %s on line %d
007- 
008- Warning: openssl_csr_export(): cannot get CSR from parameter 1 in %s on line %d
009- bool(false)
010- 
011- Warning: openssl_csr_export() expects parameter 1 to be resource, array given in %s on line %d
012- NULL
013- bool(true)

 

Generated at Sun, 16 Jun 2013 17:01:47 +0000 (2 days ago)

Copyright © 2005-2013 The PHP Group
All rights reserved.