]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: ssl: define EVP_CTRL_AEAD_GET_TAG for older versions
authorWilly Tarreau <w@1wt.eu>
Fri, 8 Mar 2024 17:21:14 +0000 (18:21 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 8 Mar 2024 17:23:34 +0000 (18:23 +0100)
Amaury reported that previous commit 08ac282375 ("MINOR: Add aes_gcm_enc
converter") broke the CI on OpenSSL 1.0.2 due to the define above not
existing there. Let's just map it to its older name when not existing.
For reference, these were renamed when switching to 1.1.0:

    https://marc.info/?l=openssl-cvs&m=142244190907706&w=2

No backport is needed.

include/haproxy/openssl-compat.h

index 01d4ec471aeb79f7fda132d6d6d0b91226d91fc8..48160e832621395a458e4529b3239739ce40f023 100644 (file)
@@ -381,6 +381,10 @@ static inline unsigned long ERR_peek_error_func(const char **func)
 #define EVP_CTRL_AEAD_SET_TAG   EVP_CTRL_GCM_SET_TAG
 #endif
 
+#if !defined(EVP_CTRL_AEAD_GET_TAG)
+#define EVP_CTRL_AEAD_GET_TAG EVP_CTRL_GCM_GET_TAG
+#endif
+
 /* Supported hash function for TLS tickets */
 #ifdef OPENSSL_NO_SHA256
 #define TLS_TICKET_HASH_FUNCT EVP_sha1