DKIM: use string-allocate facilities for DNS lookup
[exim.git] / src / src / pdkim / pdkim.h
index a34999ad83d42afbfebcf51b7a4d2bb75ee1dccd..ece86cba5088dccea8c9212c61ab23d5704e8873 100644 (file)
 #include "../blob.h"
 #include "../hash.h"
 
+#define PDKIM_DEFAULT_SIGN_HEADERS "From:Sender:Reply-To:Subject:Date:"\
+                             "Message-ID:To:Cc:MIME-Version:Content-Type:"\
+                             "Content-Transfer-Encoding:Content-ID:"\
+                             "Content-Description:Resent-Date:Resent-From:"\
+                             "Resent-Sender:Resent-To:Resent-Cc:"\
+                             "Resent-Message-ID:In-Reply-To:References:"\
+                             "List-Id:List-Help:List-Unsubscribe:"\
+                             "List-Subscribe:List-Post:List-Owner:List-Archive"
+
 /* -------------------------------------------------------------------------- */
 /* Length of the preallocated buffer for the "answer" from the dns/txt
    callback function. This should match the maximum RDLENGTH from DNS. */
@@ -256,7 +265,7 @@ typedef struct pdkim_ctx {
   pdkim_signature *sig;
 
   /* Callback for dns/txt query method (verification only) */
-  int(*dns_txt_callback)(char *, char *);
+  uschar * (*dns_txt_callback)(char *);
 
   /* Coder's little helpers */
   gstring   *cur_header;
@@ -278,7 +287,7 @@ extern "C" {
 
 void      pdkim_init         (void);
 
-void      pdkim_init_context (pdkim_ctx *, BOOL, int(*)(char *, char *));
+void      pdkim_init_context (pdkim_ctx *, BOOL, uschar * (*)(char *));
 
 DLLEXPORT
 pdkim_signature *pdkim_init_sign    (pdkim_ctx *,
@@ -286,7 +295,7 @@ pdkim_signature *pdkim_init_sign    (pdkim_ctx *,
                               const uschar **);
 
 DLLEXPORT
-pdkim_ctx *pdkim_init_verify  (int(*)(char *, char *), BOOL);
+pdkim_ctx *pdkim_init_verify  (uschar * (*)(char *), BOOL);
 
 DLLEXPORT
 void       pdkim_set_optional (pdkim_signature *, char *, char *,int, int,