diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2018-06-21 17:03:38 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2018-06-21 17:09:41 +0100 |
commit | 49e56fb37f587bf0e69d2fbe76fa0793f898c26f (patch) | |
tree | d67eedd2e7f7ed8b475a583f22c8db8b51e66005 /src | |
parent | 79f9c6442c53839fb74d3414af4cb5c226bc6ce6 (diff) |
DKIM: Fix signing for body lines starting with a pair of dots. Bug 2284
Broken-by: 42055a3385
Diffstat (limited to 'src')
-rw-r--r-- | src/src/dkim_transport.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/src/dkim_transport.c b/src/src/dkim_transport.c index c35ba1eff..0e9c3818c 100644 --- a/src/src/dkim_transport.c +++ b/src/src/dkim_transport.c @@ -154,7 +154,10 @@ if (!rc) return FALSE; arc_sign_init(); #endif -dkim->dot_stuffed = !!(save_options & topt_end_dot); +/* The dotstuffed status of the datafile depends on whether it was stored +in wireformat. */ + +dkim->dot_stuffed = spool_file_wireformat; if (!(dkim_signature = dkim_exim_sign(deliver_datafile, SPOOL_DATA_START_OFFSET, hdrs, dkim, &errstr))) if (!(rc = dkt_sign_fail(dkim, &errno))) @@ -272,7 +275,9 @@ if (!rc) arc_sign_init(); #endif -/* Feed the file to the goats^W DKIM lib */ +/* Feed the file to the goats^W DKIM lib. At this point the dotstuffed +status of the file depends on the output of transport_write_message() just +above, which should be the result of the end_dot flag in tctx->options. */ dkim->dot_stuffed = !!(options & topt_end_dot); if (!(dkim_signature = dkim_exim_sign(dkim_fd, 0, NULL, dkim, &errstr))) |