]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Fix multiple DKIM signatures for relaxed method.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 16 Sep 2015 13:30:45 +0000 (14:30 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 16 Sep 2015 13:30:45 +0000 (14:30 +0100)
src/libserver/dkim.c
src/libserver/dkim.h

index 7c31bb9297d49e86fec51554b201141874c2f0f6..0263eeb2074fda6944fc29c13f5dc42e7be1f396 100644 (file)
@@ -819,6 +819,8 @@ rspamd_create_dkim_context (const gchar *sig,
                (rspamd_mempool_destruct_t)g_checksum_free,
                ctx->headers_hash);
 
+       ctx->dkim_header = sig;
+
        return ctx;
 }
 
@@ -1576,9 +1578,9 @@ rspamd_dkim_canonize_header (rspamd_dkim_context_t *ctx,
                                }
                        }
                        else {
-                               /* For signature check just use the first dkim header */
+                               /* For signature check just use the saved dkim header */
                                rspamd_dkim_canonize_header_relaxed (ctx,
-                                       rh->value,
+                                       ctx->dkim_header,
                                        header_name,
                                        is_sig);
                        }
index 07d9483fc6c7b602509f248ef614d9440f802697..97f54b912a69ad63e5f3acab8d13e8b59ad9a1e7 100644 (file)
@@ -147,6 +147,7 @@ typedef struct rspamd_dkim_context_s {
        GPtrArray *hlist;
        guint ver;
        gchar *dns_key;
+       const gchar *dkim_header;
        GChecksum *headers_hash;
        GChecksum *body_hash;
 } rspamd_dkim_context_t;