Skip to content

Commit 4e50174

Browse files
committed
Check for EVP_CIPH_SIV_MODE in switch
1 parent 344b75d commit 4e50174

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

ext/openssl/openssl_backend_common.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1650,16 +1650,13 @@ void php_openssl_load_cipher_mode(struct php_openssl_cipher_mode *mode, const EV
16501650
int cipher_mode = EVP_CIPHER_mode(cipher_type);
16511651
memset(mode, 0, sizeof(struct php_openssl_cipher_mode));
16521652

1653-
#if defined(EVP_CIPH_FLAG_AEAD_CIPHER)
1654-
if (EVP_CIPHER_flags(cipher_type) & EVP_CIPH_FLAG_AEAD_CIPHER) {
1655-
php_openssl_set_aead_flags(mode);
1656-
}
1657-
#endif
1658-
16591653
switch (cipher_mode) {
16601654
case EVP_CIPH_GCM_MODE:
16611655
case EVP_CIPH_CCM_MODE:
1662-
/* We check for EVP_CIPH_OCB_MODE, because LibreSSL does not support it. */
1656+
/* We check for EVP_CIPH_SIV_MODE and EVP_CIPH_SIV_MODE, because LibreSSL does not support it. */
1657+
#ifdef EVP_CIPH_SIV_MODE
1658+
case EVP_CIPH_SIV_MODE:
1659+
#endif
16631660
#ifdef EVP_CIPH_OCB_MODE
16641661
case EVP_CIPH_OCB_MODE:
16651662
/* For OCB mode, explicitly set the tag length even when decrypting,

0 commit comments

Comments
 (0)