1--TEST-- 2openssl_pkey_new() with an empty sub-array arg generates a malformed resource 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-- 19 20Warning: openssl_pkey_get_details() expects parameter 1 to be resource, boolean given in %s on line %d 21 22Warning: openssl_pkey_get_details() expects parameter 1 to be resource, boolean given in %s on line %d 23 24Warning: openssl_pkey_get_details() expects parameter 1 to be resource, boolean given in %s on line %d 25 26