diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-09-16 14:30:45 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-09-16 14:30:45 +0100 |
commit | 7351103009045a1bb2e291dfd137e328a8e845dd (patch) | |
tree | 06bff4c3669e3934754b8f5799902c5e7cc40427 | |
parent | 726935dc509f08d29288b597da363b0d6764eea4 (diff) | |
download | rspamd-7351103009045a1bb2e291dfd137e328a8e845dd.tar.gz rspamd-7351103009045a1bb2e291dfd137e328a8e845dd.zip |
Fix multiple DKIM signatures for relaxed method.
-rw-r--r-- | src/libserver/dkim.c | 6 | ||||
-rw-r--r-- | src/libserver/dkim.h | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/libserver/dkim.c b/src/libserver/dkim.c index 7c31bb929..0263eeb20 100644 --- a/src/libserver/dkim.c +++ b/src/libserver/dkim.c @@ -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); } diff --git a/src/libserver/dkim.h b/src/libserver/dkim.h index 07d9483fc..97f54b912 100644 --- a/src/libserver/dkim.h +++ b/src/libserver/dkim.h @@ -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; |