From 004c3475ac14bd84580ea114824dfedafea20a5e Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 24 Sep 2024 09:30:22 +0100 Subject: [PATCH] [Minor] Another compatibility fix --- src/lua/lua_cryptobox.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lua/lua_cryptobox.c b/src/lua/lua_cryptobox.c index 96a8db074..9600a4732 100644 --- a/src/lua/lua_cryptobox.c +++ b/src/lua/lua_cryptobox.c @@ -1438,7 +1438,11 @@ lua_cryptobox_hash_reset(lua_State *L) rspamd_cryptobox_hash_init(h->content.h, NULL, 0); break; case LUA_CRYPTOBOX_HASH_SSL: +#if OPENSSL_VERSION_MAJOR >= 3 EVP_DigestInit(h->content.c, EVP_MD_CTX_get0_md(h->content.c)); +#else + EVP_DigestInit(h->content.c, EVP_MD_CTX_md(h->content.c)); +#endif break; case LUA_CRYPTOBOX_HASH_HMAC: #if OPENSSL_VERSION_NUMBER < 0x10100000L || \ -- 2.39.5