Skip to content

Commit b7992d4

Browse files
committed
Fix OpenSSL error string tests
1 parent 6a23c7f commit b7992d4

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

ext/openssl/tests/openssl_error_string_basic.phpt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ while (($enc_error_new = openssl_error_string()) !== false) {
9494
var_dump($error_queue_size);
9595
echo "\n";
9696

97-
$is_111 = OPENSSL_VERSION_NUMBER >= 0x10101000;
98-
$err_pem_no_start_line = $is_111 ? '0909006C': '0906D06C';
97+
$err_pem_no_start_line = '0909006C';
9998

10099
// PKEY
101100
echo "PKEY errors\n";
@@ -123,7 +122,7 @@ expect_openssl_errors('openssl_private_decrypt', ['04099079']);
123122
// public encrypt and decrypt with failed padding check and padding
124123
@openssl_public_encrypt("data", $crypted, $public_key_file, 1000);
125124
@openssl_public_decrypt("data", $crypted, $public_key_file, OPENSSL_PKCS1_OAEP_PADDING);
126-
expect_openssl_errors('openssl_private_(en|de)crypt padding', [$err_pem_no_start_line, '0408F090', '06089093']);
125+
expect_openssl_errors('openssl_private_(en|de)crypt padding', ['0408F090', '06089093']);
127126

128127
// X509
129128
echo "X509 errors\n";

ext/openssl/tests/openssl_error_string_basic_openssl3.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ expect_openssl_errors('openssl_private_decrypt', ['02000079']);
123123
// public encrypt and decrypt with failed padding check and padding
124124
@openssl_public_encrypt("data", $crypted, $public_key_file, 1000);
125125
@openssl_public_decrypt("data", $crypted, $public_key_file, OPENSSL_PKCS1_OAEP_PADDING);
126-
expect_openssl_errors('openssl_private_(en|de)crypt padding', [$err_pem_no_start_line, '1C8000A5']);
126+
expect_openssl_errors('openssl_private_(en|de)crypt padding', ['1C8000A5']);
127127

128128
// X509
129129
echo "X509 errors\n";

0 commit comments

Comments
 (0)