Annotation of embedaddon/php/ext/openssl/tests/018.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: openssl_sign() tests
! 3: --SKIPIF--
! 4: <?php if (!extension_loaded("openssl")) print "skip"; ?>
! 5: --FILE--
! 6: <?php
! 7: $data = "Testing openssl_sign()";
! 8: $privkey = "file://" . dirname(__FILE__) . "/private.key";
! 9: $wrong = "wrong";
! 10:
! 11: var_dump(openssl_sign($data, $sign, $privkey)); // no output
! 12: var_dump(openssl_sign($data, $sign, $wrong));
! 13: var_dump(openssl_sign(array(), $sign, $privkey));
! 14: ?>
! 15: --EXPECTF--
! 16: bool(true)
! 17:
! 18: Warning: openssl_sign(): supplied key param cannot be coerced into a private key in %s on line %d
! 19: bool(false)
! 20:
! 21: Warning: openssl_sign() expects parameter 1 to be string, array given in %s on line %d
! 22: NULL
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>