diff options
Diffstat (limited to 'ext/openssl/tests')
-rw-r--r-- | ext/openssl/tests/bug38255.phpt | 20 | ||||
-rw-r--r-- | ext/openssl/tests/bug38261.phpt | 4 | ||||
-rw-r--r-- | ext/openssl/tests/openssl_csr_export_bacis.phpt | 14 | ||||
-rw-r--r-- | ext/openssl/tests/openssl_csr_export_to_file_basic.phpt | 14 | ||||
-rw-r--r-- | ext/openssl/tests/openssl_csr_new_basic.phpt | 9 | ||||
-rw-r--r-- | ext/openssl/tests/openssl_csr_sign_basic.phpt | 12 | ||||
-rw-r--r-- | ext/openssl/tests/openssl_decrypt_error.phpt | 12 | ||||
-rw-r--r-- | ext/openssl/tests/openssl_encrypt_error.phpt | 24 | ||||
-rw-r--r-- | ext/openssl/tests/openssl_pkcs7_encrypt_basic.phpt | 10 | ||||
-rw-r--r-- | ext/openssl/tests/openssl_pkcs7_read_basic.phpt | 9 | ||||
-rw-r--r-- | ext/openssl/tests/openssl_pkcs7_sign_basic.phpt | 8 | ||||
-rw-r--r-- | ext/openssl/tests/openssl_pkey_new_error.phpt | 28 | ||||
-rw-r--r-- | ext/openssl/tests/openssl_seal_basic.phpt | 12 | ||||
-rw-r--r-- | ext/openssl/tests/openssl_sign_basic.phpt | 4 | ||||
-rw-r--r-- | ext/openssl/tests/openssl_x509_fingerprint_basic.phpt | 7 | ||||
-rw-r--r-- | ext/openssl/tests/openssl_x509_free_basic.phpt | 3 |
16 files changed, 33 insertions, 157 deletions
diff --git a/ext/openssl/tests/bug38255.phpt b/ext/openssl/tests/bug38255.phpt index f49b77485c..03f9f29a03 100644 --- a/ext/openssl/tests/bug38255.phpt +++ b/ext/openssl/tests/bug38255.phpt @@ -20,11 +20,6 @@ $t = new test; var_dump(openssl_verify("foo", $signature, $pub_key_id, OPENSSL_ALGO_MD5)); var_dump(openssl_verify("foo", $t, $pub_key_id, OPENSSL_ALGO_MD5)); -var_dump(openssl_verify("foo", new stdClass, $pub_key_id, OPENSSL_ALGO_MD5)); -var_dump(openssl_verify("foo", new stdClass, array(), OPENSSL_ALGO_MD5)); -var_dump(openssl_verify("foo", array(), array(), OPENSSL_ALGO_MD5)); -var_dump(openssl_verify()); -var_dump(openssl_verify(new stdClass, new stdClass, array(), 10000)); echo "Done\n"; @@ -37,19 +32,4 @@ bool(false) Warning: openssl_verify(): supplied key param cannot be coerced into a public key in %s on line %d bool(false) - -Warning: openssl_verify() expects parameter 2 to be string, object given in %s on line %d -NULL - -Warning: openssl_verify() expects parameter 2 to be string, object given in %s on line %d -NULL - -Warning: openssl_verify() expects parameter 2 to be string, array given in %s on line %d -NULL - -Warning: openssl_verify() expects at least 3 parameters, 0 given in %s on line %d -NULL - -Warning: openssl_verify() expects parameter 1 to be string, object given in %s on line %d -NULL Done diff --git a/ext/openssl/tests/bug38261.phpt b/ext/openssl/tests/bug38261.phpt index fa25d93d62..41a881cc86 100644 --- a/ext/openssl/tests/bug38261.phpt +++ b/ext/openssl/tests/bug38261.phpt @@ -17,7 +17,6 @@ $t = new test; var_dump(openssl_x509_parse("foo")); var_dump(openssl_x509_parse($t)); var_dump(openssl_x509_parse(array())); -var_dump(openssl_x509_parse()); var_dump(openssl_x509_parse($cert)); var_dump(openssl_x509_parse(new stdClass)); @@ -26,9 +25,6 @@ var_dump(openssl_x509_parse(new stdClass)); bool(false) bool(false) bool(false) - -Warning: openssl_x509_parse() expects at least 1 parameter, 0 given in %sbug38261.php on line %d -NULL bool(false) Recoverable fatal error: Object of class stdClass could not be converted to string in %sbug38261.php on line %d diff --git a/ext/openssl/tests/openssl_csr_export_bacis.phpt b/ext/openssl/tests/openssl_csr_export_bacis.phpt index 228a173764..e9c89d6c01 100644 --- a/ext/openssl/tests/openssl_csr_export_bacis.phpt +++ b/ext/openssl/tests/openssl_csr_export_bacis.phpt @@ -27,22 +27,20 @@ $args = array( $privkey = openssl_pkey_new($config_arg); $csr = openssl_csr_new($dn, $privkey, $args); var_dump(openssl_csr_export($csr, $output)); -var_dump(openssl_csr_export($wrong, $output)); +try { + var_dump(openssl_csr_export($wrong, $output)); +} catch (TypeError $e) { + echo $e->getMessage(), "\n"; +} var_dump(openssl_csr_export($privkey, $output)); -var_dump(openssl_csr_export(array(), $output)); var_dump(openssl_csr_export($csr, $output, false)); ?> --EXPECTF-- bool(true) - -Warning: openssl_csr_export() expects parameter 1 to be resource, string given in %s on line %d -NULL +openssl_csr_export() expects parameter 1 to be resource, string given Warning: openssl_csr_export(): supplied resource is not a valid OpenSSL X.509 CSR resource in %s on line %d Warning: openssl_csr_export(): cannot get CSR from parameter 1 in %s on line %d bool(false) - -Warning: openssl_csr_export() expects parameter 1 to be resource, array given in %s on line %d -NULL bool(true) diff --git a/ext/openssl/tests/openssl_csr_export_to_file_basic.phpt b/ext/openssl/tests/openssl_csr_export_to_file_basic.phpt index ccbd00f49a..a0c50fc5a1 100644 --- a/ext/openssl/tests/openssl_csr_export_to_file_basic.phpt +++ b/ext/openssl/tests/openssl_csr_export_to_file_basic.phpt @@ -36,9 +36,12 @@ $privkey_file = 'file://' . dirname(__FILE__) . '/private_rsa_2048.key'; $csr = openssl_csr_new($dn, $privkey_file, $args); var_dump(openssl_csr_export_to_file($csr, $csrfile)); var_dump(file_get_contents($csrfile)); -var_dump(openssl_csr_export_to_file($wrong, $csrfile)); +try { + var_dump(openssl_csr_export_to_file($wrong, $csrfile)); +} catch (TypeError $e) { + echo $e->getMessage(), "\n"; +} var_dump(openssl_csr_export_to_file($dh, $csrfile)); -var_dump(openssl_csr_export_to_file(array(), $csrfile)); var_dump(openssl_csr_export_to_file($csr, $csrfile, false)); ?> --CLEAN-- @@ -69,15 +72,10 @@ sfBgVeqg0P4SWez5fHXqBNcjMdMI5f0bikcDZSIfTHS8FX+PMurLBC8UPB0YNIOl JViHkCA9x6m8RJXAFvqmgLlWlUzbDv/cRrDfjWjR -----END CERTIFICATE REQUEST----- " - -Warning: openssl_csr_export_to_file() expects parameter 1 to be resource, string given in %s on line %d -NULL +openssl_csr_export_to_file() expects parameter 1 to be resource, string given Warning: openssl_csr_export_to_file(): supplied resource is not a valid OpenSSL X.509 CSR resource in %s on line %d Warning: openssl_csr_export_to_file(): cannot get CSR from parameter 1 in %s on line %d bool(false) - -Warning: openssl_csr_export_to_file() expects parameter 1 to be resource, array given in %s on line %d -NULL bool(true) diff --git a/ext/openssl/tests/openssl_csr_new_basic.phpt b/ext/openssl/tests/openssl_csr_new_basic.phpt index 816c6f9d90..1fadc00f27 100644 --- a/ext/openssl/tests/openssl_csr_new_basic.phpt +++ b/ext/openssl/tests/openssl_csr_new_basic.phpt @@ -5,9 +5,6 @@ openssl_csr_new() tests --FILE-- <?php -$a = 1; -var_dump(openssl_csr_new(1,$a)); -var_dump(openssl_csr_new(1,$a,1,1)); $a = array(); $conf = array('config' => dirname(__FILE__) . DIRECTORY_SEPARATOR . 'openssl.cnf'); @@ -26,12 +23,6 @@ var_dump(openssl_csr_new(["countryName" => "DE"], $x, $conf + ["x509_extensions" echo "Done\n"; ?> --EXPECTF-- -Warning: openssl_csr_new() expects parameter 1 to be array, int given in %s on line %d -NULL - -Warning: openssl_csr_new() expects parameter 1 to be array, int given in %s on line %d -NULL - Warning: openssl_csr_new(): key array must be of the form array(0 => key, 1 => phrase) in %s on line %d Warning: openssl_csr_new(): add1_attr_by_txt challengePassword_min -> 4 (failed; check error queue and value of string_mask OpenSSL option if illegal characters are reported) in %s on line %d diff --git a/ext/openssl/tests/openssl_csr_sign_basic.phpt b/ext/openssl/tests/openssl_csr_sign_basic.phpt index 57c9e75c0e..c585eb14f6 100644 --- a/ext/openssl/tests/openssl_csr_sign_basic.phpt +++ b/ext/openssl/tests/openssl_csr_sign_basic.phpt @@ -35,13 +35,10 @@ var_dump(openssl_csr_sign($csr, $cert, $priv, 365, $config_arg)); var_dump(openssl_csr_sign($csr, openssl_x509_read($cert), $priv, 365, $config_arg)); var_dump(openssl_csr_sign($csr, $wrong, $privkey, 365)); var_dump(openssl_csr_sign($csr, null, $wrong, 365)); -var_dump(openssl_csr_sign($csr, null, $privkey, $wrong)); -var_dump(openssl_csr_sign($csr, null, $privkey, 365, $wrong)); var_dump(openssl_csr_sign($wrong, null, $privkey, 365)); var_dump(openssl_csr_sign(array(), null, $privkey, 365)); var_dump(openssl_csr_sign($csr, array(), $privkey, 365)); var_dump(openssl_csr_sign($csr, null, array(), 365)); -var_dump(openssl_csr_sign($csr, null, $privkey, array())); var_dump(openssl_csr_sign($csr, null, $privkey, 365, $config_arg)); ?> --EXPECTF-- @@ -56,12 +53,6 @@ bool(false) Warning: openssl_csr_sign(): cannot get private key from parameter 3 in %s on line %d bool(false) -Warning: openssl_csr_sign() expects parameter 4 to be int, string given in %s on line %d -NULL - -Warning: openssl_csr_sign() expects parameter 5 to be array, string given in %s on line %d -NULL - Warning: openssl_csr_sign(): cannot get CSR from parameter 1 in %s on line %d bool(false) @@ -75,7 +66,4 @@ Warning: openssl_csr_sign(): key array must be of the form array(0 => key, 1 => Warning: openssl_csr_sign(): cannot get private key from parameter 3 in %s on line %d bool(false) - -Warning: openssl_csr_sign() expects parameter 4 to be int, array given in %s on line %d -NULL resource(%d) of type (OpenSSL X.509) diff --git a/ext/openssl/tests/openssl_decrypt_error.phpt b/ext/openssl/tests/openssl_decrypt_error.phpt index be40f8080f..5f79cd86c2 100644 --- a/ext/openssl/tests/openssl_decrypt_error.phpt +++ b/ext/openssl/tests/openssl_decrypt_error.phpt @@ -19,9 +19,6 @@ var_dump(openssl_decrypt($wrong, $method, $password)); var_dump(openssl_decrypt($wrong, $wrong, $password)); var_dump(openssl_decrypt($encrypted, $wrong, $wrong)); var_dump(openssl_decrypt($wrong, $wrong, $wrong)); -var_dump(openssl_decrypt(array(), $method, $password)); -var_dump(openssl_decrypt($encrypted, array(), $password)); -var_dump(openssl_decrypt($encrypted, $method, array())); // invalid using of an authentication tag var_dump(openssl_encrypt($data, $method, $password, 0, $iv, $wrong)); @@ -45,14 +42,5 @@ bool(false) Warning: openssl_decrypt(): Unknown cipher algorithm in %s on line %d bool(false) -Warning: openssl_decrypt() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: openssl_decrypt() expects parameter 2 to be string, array given in %s on line %d -NULL - -Warning: openssl_decrypt() expects parameter 3 to be string, array given in %s on line %d -NULL - Warning: openssl_encrypt(): The authenticated tag cannot be provided for cipher that doesn not support AEAD in %s on line %d string(44) "yof6cPPH4mLee6TOc0YQSrh4dvywMqxGUyjp0lV6+aM=" diff --git a/ext/openssl/tests/openssl_encrypt_error.phpt b/ext/openssl/tests/openssl_encrypt_error.phpt index ea39bff604..53bc371f46 100644 --- a/ext/openssl/tests/openssl_encrypt_error.phpt +++ b/ext/openssl/tests/openssl_encrypt_error.phpt @@ -14,12 +14,6 @@ $arr = array(1); // wrong parameters tests var_dump(openssl_encrypt($data, $wrong, $password)); -var_dump(openssl_encrypt($object, $method, $password)); -var_dump(openssl_encrypt($data, $object, $password)); -var_dump(openssl_encrypt($data, $method, $object)); -var_dump(openssl_encrypt($arr, $method, $object)); -var_dump(openssl_encrypt($data, $arr, $object)); -var_dump(openssl_encrypt($data, $method, $arr)); // invalid using of an authentication tag var_dump(openssl_encrypt($data, $method, $password, 0, $iv, $wrong)); @@ -31,24 +25,6 @@ var_dump(openssl_encrypt($data, $method, $password, OPENSSL_DONT_ZERO_PAD_KEY, $ Warning: openssl_encrypt(): Unknown cipher algorithm in %s on line %d bool(false) -Warning: openssl_encrypt() expects parameter 1 to be string, object given in %s on line %d -NULL - -Warning: openssl_encrypt() expects parameter 2 to be string, object given in %s on line %d -NULL - -Warning: openssl_encrypt() expects parameter 3 to be string, object given in %s on line %d -NULL - -Warning: openssl_encrypt() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: openssl_encrypt() expects parameter 2 to be string, array given in %s on line %d -NULL - -Warning: openssl_encrypt() expects parameter 3 to be string, array given in %s on line %d -NULL - Warning: openssl_encrypt(): The authenticated tag cannot be provided for cipher that doesn not support AEAD in %s on line %d string(44) "iPR4HulskuaP5Z6me5uImk6BqVyJG73+63tkPauVZYk=" diff --git a/ext/openssl/tests/openssl_pkcs7_encrypt_basic.phpt b/ext/openssl/tests/openssl_pkcs7_encrypt_basic.phpt index 2132b402aa..099596c033 100644 --- a/ext/openssl/tests/openssl_pkcs7_encrypt_basic.phpt +++ b/ext/openssl/tests/openssl_pkcs7_encrypt_basic.phpt @@ -26,13 +26,11 @@ var_dump(openssl_pkcs7_encrypt($infile, $outfile, openssl_x509_read($single_cert var_dump(openssl_pkcs7_decrypt($outfile, $outfile2, $single_cert, $privkey)); var_dump(openssl_pkcs7_encrypt($infile, $outfile, $single_cert, $assoc_headers)); var_dump(openssl_pkcs7_encrypt($infile, $outfile, $single_cert, $empty_headers)); -var_dump(openssl_pkcs7_encrypt($infile, $outfile, $single_cert, $wrong)); var_dump(openssl_pkcs7_encrypt($wrong, $outfile, $single_cert, $headers)); var_dump(openssl_pkcs7_encrypt($empty, $outfile, $single_cert, $headers)); var_dump(openssl_pkcs7_encrypt($infile, $empty, $single_cert, $headers)); var_dump(openssl_pkcs7_encrypt($infile, $outfile, $wrong, $headers)); var_dump(openssl_pkcs7_encrypt($infile, $outfile, $empty, $headers)); -var_dump(openssl_pkcs7_encrypt($infile, $outfile, $single_cert, $empty)); var_dump(openssl_pkcs7_encrypt($infile, $outfile, $multi_certs, $headers)); var_dump(openssl_pkcs7_encrypt($infile, $outfile, array_map('openssl_x509_read', $multi_certs) , $headers)); @@ -45,23 +43,17 @@ if (file_exists($outfile2)) { unlink($outfile2); } ?> ---EXPECTF-- +--EXPECT-- bool(true) bool(true) bool(true) bool(true) bool(true) - -Warning: openssl_pkcs7_encrypt() expects parameter 4 to be array, string given in %s on line %d -bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) - -Warning: openssl_pkcs7_encrypt() expects parameter 4 to be array, string given in %s on line %d -bool(false) bool(true) bool(true) true diff --git a/ext/openssl/tests/openssl_pkcs7_read_basic.phpt b/ext/openssl/tests/openssl_pkcs7_read_basic.phpt index 64c7c2c130..9ee745434d 100644 --- a/ext/openssl/tests/openssl_pkcs7_read_basic.phpt +++ b/ext/openssl/tests/openssl_pkcs7_read_basic.phpt @@ -8,19 +8,12 @@ $infile = file_get_contents(dirname(__FILE__) . "/cert.p7b"); $certfile = file_get_contents(dirname(__FILE__) . "/cert.crt"); $result = []; -var_dump(openssl_pkcs7_read()); -var_dump(openssl_pkcs7_read("")); var_dump(openssl_pkcs7_read("", $result)); var_dump(openssl_pkcs7_read($certfile, $result)); var_dump(openssl_pkcs7_read($infile, $result)); var_dump($result); ?> ---EXPECTF-- -Warning: openssl_pkcs7_read() expects exactly 2 parameters, 0 given in %s on line %d -NULL - -Warning: openssl_pkcs7_read() expects exactly 2 parameters, 1 given in %s on line %d -NULL +--EXPECT-- bool(false) bool(false) bool(true) diff --git a/ext/openssl/tests/openssl_pkcs7_sign_basic.phpt b/ext/openssl/tests/openssl_pkcs7_sign_basic.phpt index 0e29901c7e..bd8bb48464 100644 --- a/ext/openssl/tests/openssl_pkcs7_sign_basic.phpt +++ b/ext/openssl/tests/openssl_pkcs7_sign_basic.phpt @@ -22,13 +22,11 @@ var_dump(openssl_pkcs7_sign($infile, $outfile, openssl_x509_read($single_cert), var_dump(openssl_pkcs7_sign($infile, $outfile, $single_cert, $privkey, $headers)); var_dump(openssl_pkcs7_sign($infile, $outfile, $single_cert, $privkey, $assoc_headers)); var_dump(openssl_pkcs7_sign($infile, $outfile, $single_cert, $privkey, $empty_headers)); -var_dump(openssl_pkcs7_sign($infile, $outfile, $single_cert, $privkey, $wrong)); var_dump(openssl_pkcs7_sign($wrong, $outfile, $single_cert, $privkey, $headers)); var_dump(openssl_pkcs7_sign($empty, $outfile, $single_cert, $privkey, $headers)); var_dump(openssl_pkcs7_sign($infile, $empty, $single_cert, $privkey, $headers)); var_dump(openssl_pkcs7_sign($infile, $outfile, $wrong, $privkey, $headers)); var_dump(openssl_pkcs7_sign($infile, $outfile, $empty, $privkey, $headers)); -var_dump(openssl_pkcs7_sign($infile, $outfile, $single_cert, $privkey, $empty)); var_dump(openssl_pkcs7_sign($infile, $outfile, $single_cert, $wrong, $headers)); if (file_exists($outfile)) { @@ -42,9 +40,6 @@ bool(true) bool(true) bool(true) -Warning: openssl_pkcs7_sign() expects parameter 5 to be array, string given in %s on line %d -NULL - Warning: openssl_pkcs7_sign(): error opening input file %s in %s on line %d bool(false) @@ -60,9 +55,6 @@ bool(false) Warning: openssl_pkcs7_sign(): error getting cert in %s on line %d bool(false) -Warning: openssl_pkcs7_sign() expects parameter 5 to be array, string given in %s on line %d -NULL - Warning: openssl_pkcs7_sign(): error getting private key in %s on line %d bool(false) true diff --git a/ext/openssl/tests/openssl_pkey_new_error.phpt b/ext/openssl/tests/openssl_pkey_new_error.phpt index c7dc193d53..9249f252d8 100644 --- a/ext/openssl/tests/openssl_pkey_new_error.phpt +++ b/ext/openssl/tests/openssl_pkey_new_error.phpt @@ -11,13 +11,23 @@ $rsa = array("rsa" => array()); $dsa = array("dsa" => array()); $dh = array("dh" => array()); -openssl_pkey_get_details(openssl_pkey_new($rsa)); -openssl_pkey_get_details(openssl_pkey_new($dsa)); -openssl_pkey_get_details(openssl_pkey_new($dh)); +try { + openssl_pkey_get_details(openssl_pkey_new($rsa)); +} catch (TypeError $e) { + echo $e->getMessage(), "\n"; +} +try { + openssl_pkey_get_details(openssl_pkey_new($dsa)); +} catch (TypeError $e) { + echo $e->getMessage(), "\n"; +} +try { + openssl_pkey_get_details(openssl_pkey_new($dh)); +} catch (TypeError $e) { + echo $e->getMessage(), "\n"; +} ?> ---EXPECTF-- -Warning: openssl_pkey_get_details() expects parameter 1 to be resource, bool given in %s on line %d - -Warning: openssl_pkey_get_details() expects parameter 1 to be resource, bool given in %s on line %d - -Warning: openssl_pkey_get_details() expects parameter 1 to be resource, bool given in %s on line %d +--EXPECT-- +openssl_pkey_get_details() expects parameter 1 to be resource, bool given +openssl_pkey_get_details() expects parameter 1 to be resource, bool given +openssl_pkey_get_details() expects parameter 1 to be resource, bool given diff --git a/ext/openssl/tests/openssl_seal_basic.phpt b/ext/openssl/tests/openssl_seal_basic.phpt index 1899ebac3b..c3c79214fe 100644 --- a/ext/openssl/tests/openssl_seal_basic.phpt +++ b/ext/openssl/tests/openssl_seal_basic.phpt @@ -12,8 +12,6 @@ $d = array(1); var_dump(openssl_seal($a, $b, $c, $d)); var_dump(openssl_seal($a, $a, $a, array())); -var_dump(openssl_seal($c, $c, $c, 1)); -var_dump(openssl_seal($b, $b, $b, "")); // tests with cert $data = "openssl_open() test"; @@ -23,7 +21,6 @@ $wrong = "wrong"; var_dump(openssl_seal($data, $sealed, $ekeys, array($pub_key))); // no output var_dump(openssl_seal($data, $sealed, $ekeys, array($pub_key, $pub_key))); // no output var_dump(openssl_seal($data, $sealed, $ekeys, array($pub_key, $wrong))); -var_dump(openssl_seal($data, $sealed, $ekeys, $pub_key)); var_dump(openssl_seal($data, $sealed, $ekeys, array())); var_dump(openssl_seal($data, $sealed, $ekeys, array($wrong))); @@ -35,21 +32,12 @@ bool(false) Warning: openssl_seal(): Fourth argument to openssl_seal() must be a non-empty array in %s on line %d bool(false) - -Warning: openssl_seal() expects parameter 1 to be string, array given in %s on line %d -NULL - -Warning: openssl_seal() expects parameter 1 to be string, array given in %s on line %d -NULL int(19) int(19) Warning: openssl_seal(): not a public key (2th member of pubkeys) in %s on line %d bool(false) -Warning: openssl_seal() expects parameter 4 to be array, string given in %s on line %d -NULL - Warning: openssl_seal(): Fourth argument to openssl_seal() must be a non-empty array in %s on line %d bool(false) diff --git a/ext/openssl/tests/openssl_sign_basic.phpt b/ext/openssl/tests/openssl_sign_basic.phpt index 0200e5ba6e..36655dd61a 100644 --- a/ext/openssl/tests/openssl_sign_basic.phpt +++ b/ext/openssl/tests/openssl_sign_basic.phpt @@ -10,13 +10,9 @@ $wrong = "wrong"; var_dump(openssl_sign($data, $sign, $privkey)); // no output var_dump(openssl_sign($data, $sign, $wrong)); -var_dump(openssl_sign(array(), $sign, $privkey)); ?> --EXPECTF-- bool(true) Warning: openssl_sign(): supplied key param cannot be coerced into a private key in %s on line %d bool(false) - -Warning: openssl_sign() expects parameter 1 to be string, array given in %s on line %d -NULL diff --git a/ext/openssl/tests/openssl_x509_fingerprint_basic.phpt b/ext/openssl/tests/openssl_x509_fingerprint_basic.phpt index ceaafc2234..fa3fce36ab 100644 --- a/ext/openssl/tests/openssl_x509_fingerprint_basic.phpt +++ b/ext/openssl/tests/openssl_x509_fingerprint_basic.phpt @@ -7,9 +7,6 @@ openssl_x509_fingerprint() tests $cert = "file://" . dirname(__FILE__) . "/cert.crt"; -echo "** Testing with no parameters **\n"; -var_dump(openssl_x509_fingerprint()); - echo "** Testing default functionality **\n"; var_dump(openssl_x509_fingerprint($cert)); @@ -29,10 +26,6 @@ echo "** Testing bad hash method **\n"; var_dump(openssl_x509_fingerprint($cert, 'xx45')); ?> --EXPECTF-- -** Testing with no parameters ** - -Warning: openssl_x509_fingerprint() expects at least 1 parameter, 0 given in %s on line %d -NULL ** Testing default functionality ** string(40) "6e6fd1ea10a5a23071d61c728ee9b40df6dbc33c" ** Testing hash method md5 ** diff --git a/ext/openssl/tests/openssl_x509_free_basic.phpt b/ext/openssl/tests/openssl_x509_free_basic.phpt index 663adccc2c..59acb090c3 100644 --- a/ext/openssl/tests/openssl_x509_free_basic.phpt +++ b/ext/openssl/tests/openssl_x509_free_basic.phpt @@ -7,10 +7,7 @@ openssl_x509_free() tests var_dump($res = openssl_x509_read("file://" . dirname(__FILE__) . "/cert.crt")); openssl_x509_free($res); var_dump($res); -openssl_x509_free(false); ?> --EXPECTF-- resource(%d) of type (OpenSSL X.509) resource(%d) of type (Unknown) - -Warning: openssl_x509_free() expects parameter 1 to be resource, bool given in %s on line %d |