Commit Diff


commit - b5d59aa6f5d4946adc16397ae3166d2ab3bfcccf
commit + 37c6191b0e32d7e5f07abc2739d2b8aa0b72d520
blob - 4d56beb1aa39c28bb2cc0143439f50206c940b3c
blob + b25390a190cf3b4fea0d060026f1d6512e999457
--- main.c
+++ main.c
@@ -62,8 +62,30 @@ struct dkim_session {
 RB_HEAD(dkim_sessions, dkim_session) dkim_sessions = RB_INITIALIZER(NULL);
 RB_PROTOTYPE(dkim_sessions, dkim_session, entry, dkim_session_cmp);
 
-static char **sign_headers = NULL;
-static size_t nsign_headers = 0;
+/* RFC 6376 section 5.4.1 */
+static char *dsign_headers[] = {
+	"from",
+	"reply-to",
+	"subject",
+	"date",
+	"to",
+	"cc",
+	"resent-date",
+	"resent-from",
+	"resent-to",
+	"resent-cc",
+	"in-reply-to",
+	"references",
+	"list-id",
+	"list-help",
+	"list-unsubscribe",
+	"list-subscribe",
+	"list-post",
+	"list-owner",
+	"list-archive"
+};
+static char **sign_headers = dsign_headers;
+static size_t nsign_headers = sizeof(dsign_headers) / sizeof(*dsign_headers);
 
 #define HASH_SHA1 0
 #define HASH_SHA256 1