File 2521-crypto-EVP_CIPH_FLAG_AEAD_CIPHER-is-not-always-defin.patch of Package erlang
From 76797ec48748bb54f3eae8e114f27dc12a4bbdf1 Mon Sep 17 00:00:00 2001
From: Hans Nilsson <hans@erlang.org>
Date: Thu, 15 Apr 2021 11:04:46 +0200
Subject: [PATCH] crypto: EVP_CIPH_FLAG_AEAD_CIPHER is not always defined
---
lib/crypto/c_src/cipher.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/crypto/c_src/cipher.c b/lib/crypto/c_src/cipher.c
index 132c98f17d..5e7fc88d72 100644
--- a/lib/crypto/c_src/cipher.c
+++ b/lib/crypto/c_src/cipher.c
@@ -230,7 +230,11 @@ ERL_NIF_TERM cipher_info_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]
enif_make_map_put(env, ret, atom_block_size,
enif_make_int(env, EVP_CIPHER_block_size(cipher)), &ret);
enif_make_map_put(env, ret, atom_prop_aead,
+#if defined(HAVE_AEAD)
(((EVP_CIPHER_flags(cipher) & EVP_CIPH_FLAG_AEAD_CIPHER) != 0) ? atom_true : atom_false),
+#else
+ atom_false,
+#endif
&ret);
mode = EVP_CIPHER_mode(cipher);
--
2.26.2