From: Vsevolod Stakhov Date: Sat, 25 Jan 2025 15:31:12 +0000 (+0000) Subject: [Minor] Fix for old OpenSSL, sigh X-Git-Tag: 3.11.1~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f11d9b9e095bd6b48c03af7d0dc892ddba72f78d;p=thirdparty%2Frspamd.git [Minor] Fix for old OpenSSL, sigh --- diff --git a/src/lua/lua_cryptobox.c b/src/lua/lua_cryptobox.c index 0fa9e23c15..721d712564 100644 --- a/src/lua/lua_cryptobox.c +++ b/src/lua/lua_cryptobox.c @@ -1393,7 +1393,12 @@ lua_cryptobox_hash_copy(const struct rspamd_lua_cryptobox_hash *orig) (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x30500000) /* XXX: dunno what to do with this ancient crap */ #else +#if OPENSSL_VERSION_NUMBER >= 0x30000000L nhash->content.hmac_c = EVP_MAC_CTX_dup(orig->content.hmac_c); +#else + nhash->content.hmac_c = HMAC_CTX_new(); + HMAC_CTX_copy(nhash->content.hmac_c, orig->content.hmac_c); +#endif #endif } else if (orig->type == LUA_CRYPTOBOX_HASH_BLAKE2) {