From 22238913eb72f646d5584ab443d54609ac034188 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 7 Aug 2024 14:50:23 +0100 Subject: [PATCH] [Minor] Some more incompatibilities cleaned up --- src/libserver/dkim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libserver/dkim.c b/src/libserver/dkim.c index 52ab09d95..0f2afc950 100644 --- a/src/libserver/dkim.c +++ b/src/libserver/dkim.c @@ -3484,7 +3484,7 @@ rspamd_dkim_sign(struct rspamd_task *task, const char *selector, EVP_DigestFinal_ex(ctx->common.headers_hash, raw_digest, NULL); if (ctx->key->type == RSPAMD_DKIM_KEY_RSA) { - sig_len = EVP_PKEY_get_size(ctx->key->specific.key_ssl.key_evp); + sig_len = EVP_PKEY_size(ctx->key->specific.key_ssl.key_evp); sig_buf = g_alloca(sig_len); EVP_PKEY_CTX *pctx = EVP_PKEY_CTX_new(ctx->key->specific.key_ssl.key_evp, NULL); if (EVP_PKEY_sign_init(pctx) <= 0) { @@ -3576,7 +3576,7 @@ rspamd_dkim_match_keys(rspamd_dkim_key_t *pk, return FALSE; } #else - else if (EVP_PKEY_cmp(pk->key_evp, sk->key_evp) != 1) { + else if (EVP_PKEY_cmp(pk->specific.key_ssl.key_evp, sk->specific.key_ssl.key_evp) != 1) { g_set_error(err, dkim_error_quark(), DKIM_SIGERROR_KEYHASHMISMATCH, "pubkey does not match private key"); return FALSE; -- 2.39.5