Fix bug GH-9517: Compilation error in openssl extension

This commit is contained in:
Jakub Zelenka 2022-09-11 15:40:57 +01:00
parent e9a0d21a06
commit f126769a29
2 changed files with 7 additions and 3 deletions

4
NEWS
View File

@ -10,6 +10,10 @@ PHP NEWS
. Fixed bug GH-9259 (opcache.interned_strings_buffer setting integer
overflow). (Arnaud)
- OpenSSL:
. Fixed bug GH-9517 (Compilation error openssl extension related to PR
GH-9366). (Jakub Zelenka)
- PDO_PGSQL:
. Fixed bug GH-9411 (PgSQL large object resource is incorrectly closed).
(Yurunsoft)

View File

@ -7163,14 +7163,14 @@ static void php_openssl_load_cipher_mode(struct php_openssl_cipher_mode *mode, c
/* Since OpenSSL 1.1, all AEAD ciphers use a common framework. We check for
* EVP_CIPH_OCB_MODE, because LibreSSL does not support it. */
case EVP_CIPH_GCM_MODE:
case EVP_CIPH_CCM_MODE:
# ifdef EVP_CIPH_OCB_MODE
case EVP_CIPH_OCB_MODE:
# endif
case EVP_CIPH_CCM_MODE:
php_openssl_set_aead_flags(mode);
/* For OCB mode, explicitly set the tag length even when decrypting,
* see https://github.com/openssl/openssl/issues/8331. */
mode->set_tag_length_always = cipher_mode == EVP_CIPH_OCB_MODE;
# endif
php_openssl_set_aead_flags(mode);
mode->set_tag_length_when_encrypting = cipher_mode == EVP_CIPH_CCM_MODE;
mode->is_single_run_aead = cipher_mode == EVP_CIPH_CCM_MODE;
break;