1--TEST--
2openssl_pkey_new() error tests
3--SKIPIF--
4<?php if (!extension_loaded("openssl")) print "skip"; ?>
5--FILE--
6<?php
7/* openssl_pkey_get_details() segfaults when getting the information
8	from openssl_pkey_new() with an empty sub-array arg 		*/
9
10$rsa = array("rsa" => array());
11$dsa = array("dsa" => array());
12$dh = array("dh" => array());
13
14openssl_pkey_get_details(openssl_pkey_new($rsa));
15openssl_pkey_get_details(openssl_pkey_new($dsa));
16openssl_pkey_get_details(openssl_pkey_new($dh));
17?>
18--EXPECTF--
19Warning: openssl_pkey_get_details() expects parameter 1 to be resource, bool given in %s on line %d
20
21Warning: openssl_pkey_get_details() expects parameter 1 to be resource, bool given in %s on line %d
22
23Warning: openssl_pkey_get_details() expects parameter 1 to be resource, bool given in %s on line %d
24