Skip to content

Commit

Permalink
Fix bug GH-9517: Compilation error in openssl extension
Browse files Browse the repository at this point in the history
  • Loading branch information
bukka committed Sep 11, 2022
1 parent e9a0d21 commit f126769
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions ext/openssl/openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f126769

Please sign in to comment.