aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2024-10-20 15:04:20 +0600
committerGitHub <noreply@github.com>2024-10-20 15:04:20 +0600
commit1ad4dba75b5db1e8f3e6677ad68f09706be15a48 (patch)
tree0a3d133d56e62a4e896176bcb442585bf1517805 /src
parentb7f870b6a4629be693eb4dc860fe0930a614a3dd (diff)
parentbfd833c73432dd3e178e773f9f02deb43200bd33 (diff)
downloadrspamd-1ad4dba75b5db1e8f3e6677ad68f09706be15a48.tar.gz
rspamd-1ad4dba75b5db1e8f3e6677ad68f09706be15a48.zip
Merge pull request #5193 from jscissr/fix_arc
[CritFix] Fix ARC-Seal signing
Diffstat (limited to 'src')
-rw-r--r--src/lua/lua_rsa.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lua/lua_rsa.c b/src/lua/lua_rsa.c
index 4b9aa0354..5f7db606f 100644
--- a/src/lua/lua_rsa.c
+++ b/src/lua/lua_rsa.c
@@ -716,6 +716,8 @@ lua_rsa_verify_memory(lua_State *L)
EVP_PKEY_CTX *pctx = EVP_PKEY_CTX_new(pkey, NULL);
g_assert(pctx != NULL);
g_assert(EVP_PKEY_verify_init(pctx) == 1);
+ g_assert(EVP_PKEY_CTX_set_rsa_padding(pctx, RSA_PKCS1_PADDING) == 1);
+ g_assert(EVP_PKEY_CTX_set_signature_md(pctx, EVP_sha256()) == 1);
ret = EVP_PKEY_verify(pctx, signature->str, signature->len, data, sz);
@@ -766,6 +768,8 @@ lua_rsa_sign_memory(lua_State *L)
g_assert(pctx != NULL);
g_assert(EVP_PKEY_sign_init(pctx) == 1);
+ g_assert(EVP_PKEY_CTX_set_rsa_padding(pctx, RSA_PKCS1_PADDING) == 1);
+ g_assert(EVP_PKEY_CTX_set_signature_md(pctx, EVP_sha256()) == 1);
size_t slen = signature->allocated;
ret = EVP_PKEY_sign(pctx, signature->str, &slen, data, sz);