From: Vsevolod Stakhov Date: Wed, 16 May 2018 13:34:04 +0000 (+0100) Subject: [Minor] Fix "invalid key algorithm" warning X-Git-Tag: 1.7.5~13 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=57ae7eea2e0db52f6fd2fbb8e0fcfdf333655953;p=rspamd.git [Minor] Fix "invalid key algorithm" warning --- 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); }