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