aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-08-02 17:06:29 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-08-02 17:06:29 +0100
commitbad6305f6f173ec9a12d0992ca1956b51e650e27 (patch)
tree122afaea076b8060b748aa9996c857a2cf586d99
parentc3f93833a216cc480ca9faccb76a4d97083c8571 (diff)
downloadrspamd-bad6305f6f173ec9a12d0992ca1956b51e650e27.tar.gz
rspamd-bad6305f6f173ec9a12d0992ca1956b51e650e27.zip
[Fix] Add spaces to dkim signature to allow folding
-rw-r--r--src/libserver/dkim.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libserver/dkim.c b/src/libserver/dkim.c
index 16cb7f371..057d7b33b 100644
--- a/src/libserver/dkim.c
+++ b/src/libserver/dkim.c
@@ -2066,19 +2066,19 @@ rspamd_dkim_sign (struct rspamd_task *task,
}
hdr = g_string_sized_new (255);
- rspamd_printf_gstring (hdr, "v=1;a=rsa-sha256;c=%s/%s;d=%s;s=%s;",
+ rspamd_printf_gstring (hdr, "v=1; a=rsa-sha256; c=%s/%s; d=%s; s=%s; ",
ctx->common.header_canon_type == DKIM_CANON_RELAXED ? "relaxed" : "simple",
ctx->common.body_canon_type == DKIM_CANON_RELAXED ? "relaxed" : "simple",
domain, selector);
if (expire > 0) {
- rspamd_printf_gstring (hdr, "x=%t;", expire);
+ rspamd_printf_gstring (hdr, "x=%t; ", expire);
}
if (len > 0) {
- rspamd_printf_gstring (hdr, "l=%z;", len);
+ rspamd_printf_gstring (hdr, "l=%z; ", len);
}
- rspamd_printf_gstring (hdr, "t=%t;h=", time (NULL));
+ rspamd_printf_gstring (hdr, "t=%t; h=", time (NULL));
/* Now canonize headers */
for (i = 0; i < ctx->common.hlist->len; i++) {
@@ -2101,7 +2101,7 @@ rspamd_dkim_sign (struct rspamd_task *task,
EVP_DigestFinal_ex (ctx->common.body_hash, raw_digest, NULL);
b64_data = rspamd_encode_base64 (raw_digest, dlen, 0, NULL);
- rspamd_printf_gstring (hdr, "bh=%s;b=", b64_data);
+ rspamd_printf_gstring (hdr, " bh=%s; b=", b64_data);
g_free (b64_data);
if (ctx->common.header_canon_type == DKIM_CANON_RELAXED) {