summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/doc-txt/ChangeLog5
-rw-r--r--src/ACKNOWLEDGMENTS3
-rw-r--r--src/src/dk.c20
3 files changed, 19 insertions, 9 deletions
diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index 5d8b2afd5..652d4c17a 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -1,4 +1,4 @@
-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.368 2006/07/06 14:19:50 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.369 2006/07/06 14:28:03 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
@@ -75,6 +75,9 @@ PH/10 Added more information to debugging output for retry time not reached.
PH/11 Applied patch from Arkadiusz Miskiewicz to apply a timeout to read
operations in malware.c.
+PH/12 Applied patch from Magnus Holmgren to include the "h" tag in Domain Keys
+ signatures.
+
Exim version 4.62
-----------------
diff --git a/src/ACKNOWLEDGMENTS b/src/ACKNOWLEDGMENTS
index 24c82c973..7d73b0d1b 100644
--- a/src/ACKNOWLEDGMENTS
+++ b/src/ACKNOWLEDGMENTS
@@ -1,4 +1,4 @@
-$Cambridge: exim/src/ACKNOWLEDGMENTS,v 1.51 2006/07/06 14:19:50 ph10 Exp $
+$Cambridge: exim/src/ACKNOWLEDGMENTS,v 1.52 2006/07/06 14:28:03 ph10 Exp $
EXIM ACKNOWLEDGEMENTS
@@ -159,6 +159,7 @@ Sheldon Hearn Suggested patch for smtp_accept_max_nonmail_hosts
Bryan Henderson Patch to use RM_COMMAND everywhere during building
Jakob Hirsch Patch for % operator
Magnus Holmgren Patch for filter_prepend_home
+ Patch for "h" flag in Domain Keys
Kjetil Torgrim Homme Patch for require_files problem on NFS file systems
Tom Hughes Suggested patch for $n bug in pipe command from filter
Pierre Humblet Continued Cygwin support
diff --git a/src/src/dk.c b/src/src/dk.c
index 5fa57fd3d..ddab48b74 100644
--- a/src/src/dk.c
+++ b/src/src/dk.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/dk.c,v 1.9 2006/02/07 11:19:00 ph10 Exp $ */
+/* $Cambridge: exim/src/src/dk.c,v 1.10 2006/07/06 14:28:04 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -239,6 +239,8 @@ uschar *dk_exim_sign(int dk_fd,
uschar *dk_selector,
uschar *dk_canon) {
uschar *rc = NULL;
+ uschar *headers = NULL;
+ int headers_len;
int dk_canon_int = DK_CANON_SIMPLE;
char c;
int seen_lf = 0;
@@ -398,7 +400,7 @@ uschar *dk_exim_sign(int dk_fd,
}
/* Get the signature. */
- dk_internal_status = dk_getsig(dk_context, dk_private_key, sig, 8192);
+ dk_internal_status = dk_getsig(dk_context, dk_private_key, sig, 1024);
/* Check for unuseable key */
if (dk_internal_status != DK_STAT_OK) {
@@ -407,13 +409,17 @@ uschar *dk_exim_sign(int dk_fd,
goto CLEANUP;
}
- rc = store_get(1024);
+ headers_len = dk_headers(dk_context, NULL);
+ rc = store_get(1024+256+headers_len);
+ headers = store_malloc(headers_len);
+ dk_headers(dk_context, CS headers);
/* Build DomainKey-Signature header to return. */
- (void)string_format(rc, 1024, "DomainKey-Signature: a=rsa-sha1; q=dns; c=%s;\r\n"
- "\ts=%s; d=%s;\r\n"
- "\tb=%s;\r\n", dk_canon, dk_selector, dk_domain, sig);
+ (void)string_format(rc, 1024+256+headers_len, "DomainKey-Signature: a=rsa-sha1; q=dns; c=%s; s=%s; d=%s;\r\n"
+ "\th=%s;\r\n"
+ "\tb=%s;\r\n", dk_canon, dk_selector, dk_domain, headers, sig);
- log_write(0, LOG_MAIN, "DK: message signed using a=rsa-sha1; q=dns; c=%s; s=%s; d=%s;", dk_canon, dk_selector, dk_domain);
+ log_write(0, LOG_MAIN, "DK: message signed using a=rsa-sha1; q=dns; c=%s; s=%s; d=%s; h=%s;", dk_canon, dk_selector, dk_domain, headers);
+ store_free(headers);
CLEANUP:
if (dk_context != NULL) {