]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Some more incompatibilities cleaned up
authorVsevolod Stakhov <vsevolod@rspamd.com>
Wed, 7 Aug 2024 13:50:23 +0000 (14:50 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Wed, 7 Aug 2024 13:50:23 +0000 (14:50 +0100)
src/libserver/dkim.c

index 52ab09d952be383ab1ca6cb195ebbd87eb14be0b..0f2afc950c98430692cfbc39a5e74cf0608e03ca 100644 (file)
@@ -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;