mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Fix OpenSSL error string tests
This commit is contained in:
@@ -94,8 +94,7 @@ while (($enc_error_new = openssl_error_string()) !== false) {
|
||||
var_dump($error_queue_size);
|
||||
echo "\n";
|
||||
|
||||
$is_111 = OPENSSL_VERSION_NUMBER >= 0x10101000;
|
||||
$err_pem_no_start_line = $is_111 ? '0909006C': '0906D06C';
|
||||
$err_pem_no_start_line = '0909006C';
|
||||
|
||||
// PKEY
|
||||
echo "PKEY errors\n";
|
||||
@@ -123,7 +122,7 @@ expect_openssl_errors('openssl_private_decrypt', ['04099079']);
|
||||
// public encrypt and decrypt with failed padding check and padding
|
||||
@openssl_public_encrypt("data", $crypted, $public_key_file, 1000);
|
||||
@openssl_public_decrypt("data", $crypted, $public_key_file, OPENSSL_PKCS1_OAEP_PADDING);
|
||||
expect_openssl_errors('openssl_private_(en|de)crypt padding', [$err_pem_no_start_line, '0408F090', '06089093']);
|
||||
expect_openssl_errors('openssl_private_(en|de)crypt padding', ['0408F090', '06089093']);
|
||||
|
||||
// X509
|
||||
echo "X509 errors\n";
|
||||
|
||||
@@ -123,7 +123,7 @@ expect_openssl_errors('openssl_private_decrypt', ['02000079']);
|
||||
// public encrypt and decrypt with failed padding check and padding
|
||||
@openssl_public_encrypt("data", $crypted, $public_key_file, 1000);
|
||||
@openssl_public_decrypt("data", $crypted, $public_key_file, OPENSSL_PKCS1_OAEP_PADDING);
|
||||
expect_openssl_errors('openssl_private_(en|de)crypt padding', [$err_pem_no_start_line, '1C8000A5']);
|
||||
expect_openssl_errors('openssl_private_(en|de)crypt padding', ['1C8000A5']);
|
||||
|
||||
// X509
|
||||
echo "X509 errors\n";
|
||||
|
||||
Reference in New Issue
Block a user