Skip to content

Commit 19a44ff

Browse files
committed
Sync with behavior change in OpenSSL 1.1.1b
A behavior change in revealed by some openssl_decrypt() based test, where an encrypt API is used with a decrypt context. The EVP_Cipher* functions will automatically choose the right operation depending on the context passed.
1 parent 9ad9cc7 commit 19a44ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/openssl/openssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6494,7 +6494,7 @@ static int php_openssl_cipher_update(const EVP_CIPHER *cipher_type,
64946494
{
64956495
int i = 0;
64966496

6497-
if (mode->is_single_run_aead && !EVP_EncryptUpdate(cipher_ctx, NULL, &i, NULL, (int)data_len)) {
6497+
if (mode->is_single_run_aead && !EVP_CipherUpdate(cipher_ctx, NULL, &i, NULL, (int)data_len)) {
64986498
php_openssl_store_errors();
64996499
php_error_docref(NULL, E_WARNING, "Setting of data length failed");
65006500
return FAILURE;

0 commit comments

Comments
 (0)