projects
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix non-ARC build
[exim.git]
/
src
/
src
/
dkim_transport.c
diff --git
a/src/src/dkim_transport.c
b/src/src/dkim_transport.c
index f707595cb8449ab9cdaf611ffc13cbb53ad87705..28d567b035936483a111622f10dcc68bf01aa6d8 100644
(file)
--- a/
src/src/dkim_transport.c
+++ b/
src/src/dkim_transport.c
@@
-2,7
+2,7
@@
* Exim - an Internet mail transport agent *
*************************************************/
* Exim - an Internet mail transport agent *
*************************************************/
-/* Copyright (c) University of Cambridge 1995 - 201
7
*/
+/* Copyright (c) University of Cambridge 1995 - 201
8
*/
/* See the file NOTICE for conditions of use and distribution. */
/* Transport shim for dkim signing */
/* See the file NOTICE for conditions of use and distribution. */
/* Transport shim for dkim signing */
@@
-129,6
+129,7
@@
uschar * hdrs;
gstring * dkim_signature;
int hsize;
const uschar * errstr;
gstring * dkim_signature;
int hsize;
const uschar * errstr;
+uschar * verrstr;
BOOL rc;
DEBUG(D_transport) debug_printf("dkim signing direct-mode\n");
BOOL rc;
DEBUG(D_transport) debug_printf("dkim signing direct-mode\n");
@@
-160,6
+161,16
@@
if (!(dkim_signature = dkim_exim_sign(deliver_datafile, SPOOL_DATA_START_OFFSET,
return FALSE;
}
return FALSE;
}
+#ifdef EXPERIMENTAL_ARC
+if (dkim->arc_signspec) /* Prepend ARC headers */
+ if (!(dkim_signature =
+ arc_sign(dkim->arc_signspec, dkim_signature, &verrstr)))
+ {
+ *err = verrstr;
+ return FALSE;
+ }
+#endif
+
/* Write the signature and headers into the deliver-out-buffer. This should
mean they go out in the same packet as the MAIL, RCPT and (first) BDAT commands
(transport_write_message() sizes the BDAT for the buffered amount) - for short
/* Write the signature and headers into the deliver-out-buffer. This should
mean they go out in the same packet as the MAIL, RCPT and (first) BDAT commands
(transport_write_message() sizes the BDAT for the buffered amount) - for short
@@
-268,6
+279,15
@@
if (!(dkim_signature = dkim_exim_sign(dkim_fd, 0, NULL, dkim, &errstr)))
else
dlen = dkim_signature->ptr;
else
dlen = dkim_signature->ptr;
+#ifdef EXPERIMENTAL_ARC
+if (dkim->arc_signspec) /* Prepend ARC headers */
+ {
+ if (!(dkim_signature = arc_sign(dkim->arc_signspec, dkim_signature, USS err)))
+ goto CLEANUP;
+ dlen = dkim_signature->ptr;
+ }
+#endif
+
#ifndef OS_SENDFILE
if (options & topt_use_bdat)
#endif
#ifndef OS_SENDFILE
if (options & topt_use_bdat)
#endif
@@
-351,7
+371,8
@@
dkim_transport_write_message(transport_ctx * tctx,
{
/* If we can't sign, just call the original function. */
{
/* If we can't sign, just call the original function. */
-if (!(dkim->dkim_private_key && dkim->dkim_domain && dkim->dkim_selector))
+if ( !(dkim->dkim_private_key && dkim->dkim_domain && dkim->dkim_selector)
+ && !dkim->force_bodyhash)
return transport_write_message(tctx, 0);
/* If there is no filter command set up, construct the message and calculate
return transport_write_message(tctx, 0);
/* If there is no filter command set up, construct the message and calculate