aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2024-09-24 09:30:22 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2024-09-24 09:30:22 +0100
commit004c3475ac14bd84580ea114824dfedafea20a5e (patch)
tree228fdbed755db7f1bb24d4f816e507623266d089 /src
parent635f02770eec0a11440f77650834fead025dd684 (diff)
downloadrspamd-004c3475ac14bd84580ea114824dfedafea20a5e.tar.gz
rspamd-004c3475ac14bd84580ea114824dfedafea20a5e.zip
[Minor] Another compatibility fix
Diffstat (limited to 'src')
-rw-r--r--src/lua/lua_cryptobox.c4
1 files changed, 4 insertions, 0 deletions
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 || \