Annotation of embedaddon/php/ext/openssl/tests/006.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: openssl_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:
! 14: openssl_pkey_get_details(openssl_pkey_new($rsa));
! 15: openssl_pkey_get_details(openssl_pkey_new($dsa));
! 16: openssl_pkey_get_details(openssl_pkey_new($dh));
! 17: ?>
! 18: --EXPECTF--
! 19:
! 20: Warning: openssl_pkey_get_details() expects parameter 1 to be resource, boolean given in %s on line %d
! 21:
! 22: Warning: openssl_pkey_get_details() expects parameter 1 to be resource, boolean given in %s on line %d
! 23:
! 24: Warning: openssl_pkey_get_details() expects parameter 1 to be resource, boolean given in %s on line %d
! 25:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>