From 57ae7eea2e0db52f6fd2fbb8e0fcfdf333655953 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 16 May 2018 14:34:04 +0100 Subject: [PATCH] [Minor] Fix "invalid key algorithm" warning --- src/libserver/dkim.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libserver/dkim.c b/src/libserver/dkim.c index a51399a31..5af61daf7 100644 --- a/src/libserver/dkim.c +++ b/src/libserver/dkim.c @@ -1430,6 +1430,7 @@ rspamd_dkim_parse_key (rspamd_dkim_context_t *ctx, const gchar *txt, if (alglen == 0 || alg == NULL) { alg = "rsa"; /* Implicit */ + alglen = 3; } if (alglen == 8 && rspamd_lc_cmp (alg, "ecdsa256", alglen) == 0) { @@ -1445,6 +1446,7 @@ rspamd_dkim_parse_key (rspamd_dkim_context_t *ctx, const gchar *txt, if (alglen != 3 || rspamd_lc_cmp (alg, "rsa", alglen) != 0) { msg_info_dkim ("invalid key algorithm: %*s", (gint)alglen, alg); } + return rspamd_dkim_make_key (ctx, c, klen, RSPAMD_DKIM_KEY_RSA, err); } -- 2.39.5