diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2025-01-25 15:31:12 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2025-01-25 15:31:12 +0000 |
commit | f11d9b9e095bd6b48c03af7d0dc892ddba72f78d (patch) | |
tree | bbdb4c89f246b18877eccec6cd14661fb25b1621 | |
parent | fc4a1c0256da7140bf07c3fb5e8b987529515f89 (diff) | |
download | rspamd-f11d9b9e095bd6b48c03af7d0dc892ddba72f78d.tar.gz rspamd-f11d9b9e095bd6b48c03af7d0dc892ddba72f78d.zip |
[Minor] Fix for old OpenSSL, sigh
-rw-r--r-- | src/lua/lua_cryptobox.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lua/lua_cryptobox.c b/src/lua/lua_cryptobox.c index 0fa9e23c1..721d71256 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) { |