-/* $Cambridge: exim/src/src/dkim.c,v 1.1.2.7 2009/04/30 08:21:30 tom Exp $ */
+/* $Cambridge: exim/src/src/dkim.c,v 1.1.2.8 2009/05/19 08:24:47 tom Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
if (pdkim_feed_finish(dkim_verify_ctx,&dkim_signatures) != PDKIM_OK) return 0;
while (dkim_signatures != NULL) {
- debug_printf("DKIM: Signature from domain '%s': ",dkim_signatures->domain);
+ uschar *dkim_log = string_sprintf("DKIM: v=%u d=%s s=%s c=%s/%s a=%s ",
+ dkim_signatures->version,
+ dkim_signatures->domain,
+ dkim_signatures->selector,
+ (dkim_signatures->canon_headers == PDKIM_CANON_SIMPLE)?"simple":"relaxed",
+ (dkim_signatures->canon_body == PDKIM_CANON_SIMPLE)?"simple":"relaxed",
+ (dkim_signatures->algo == PDKIM_ALGO_RSA_SHA256)?"rsa-sha256":"rsa-sha1"
+
+
+ (dkim_signatures->identity != NULL)?dkim_signatures->identity:"<void>",
+ (dkim_signatures->created>0)?
+
+ );
+
+ dkim_log = string_cat(dkim_log);
+
+
+
switch(dkim_signatures->verify_status) {
case PDKIM_VERIFY_NONE:
debug_printf("not verified\n");
-/* $Cambridge: exim/src/src/drtables.c,v 1.9.2.1 2009/02/24 15:57:55 tom Exp $ */
+/* $Cambridge: exim/src/src/drtables.c,v 1.9.2.2 2009/05/19 08:24:48 tom Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
#include "lookups/whoson.h"
#endif
-#ifndef DISABLE_DKIM
-#include "lookups/dkim.h"
-#endif
-
-
/* The second field in each item below is a set of bit flags:
lookup_querystyle => this is a query-style lookup,
#endif
},
-/* DKIM lookups */
-
- {
- US"dkim", /* lookup name */
- lookup_querystyle, /* query style */
-#ifndef DISABLE_DKIM
- dkim_open, /* open function */
- NULL, /* check function */
- dkim_find, /* find function */
- NULL, /* no close function */
- NULL, /* no tidy function */
- NULL /* no quoting function */
-#else
- NULL, NULL, NULL, NULL, NULL, NULL /* lookup not present */
-#endif
- },
-
/* Using DNS TXT records as a database */
{
-# $Cambridge: exim/src/src/lookups/Makefile,v 1.8 2008/02/14 13:49:35 fanf2 Exp $
+# $Cambridge: exim/src/src/lookups/Makefile,v 1.8.2.1 2009/05/19 08:24:48 tom Exp $
# Make file for building a library containing all the available lookups and
# calling it lookups.a. This is called from the main make file, after cd'ing
# to the lookups subdirectory. When the relevant LOOKUP_ macros are not
# defined, dummy modules get compiled.
-OBJ = cdb.o dbmdb.o dkim.o dnsdb.o dsearch.o ibase.o ldap.o lsearch.o mysql.o nis.o \
+OBJ = cdb.o dbmdb.o dnsdb.o dsearch.o ibase.o ldap.o lsearch.o mysql.o nis.o \
nisplus.o oracle.o passwd.o pgsql.o spf.o sqlite.o testdb.o whoson.o \
lf_check_file.o lf_quote.o lf_sqlperform.o
cdb.o: $(HDRS) cdb.c cdb.h
dbmdb.o: $(HDRS) dbmdb.c dbmdb.h
-dkim.o: $(HDRS) dkim.c dkim.h
dnsdb.o: $(HDRS) dnsdb.c dnsdb.h
dsearch.o: $(HDRS) dsearch.c dsearch.h
ibase.o: $(HDRS) ibase.c ibase.h
+++ /dev/null
-/* $Cambridge: exim/src/src/lookups/dkim.c,v 1.1.2.1 2009/02/24 15:57:55 tom Exp $ */
-
-/*************************************************
-* Exim - an Internet mail transport agent *
-*************************************************/
-
-/* Copyright (c) University of Cambridge 1995 - 2007 */
-/* See the file NOTICE for conditions of use and distribution. */
-
-#include "../exim.h"
-#include "dkim.h"
-
-
-
-/*************************************************
-* Open entry point *
-*************************************************/
-
-/* See local README for interface description */
-
-void *
-dkim_open(uschar *filename, uschar **errmsg)
-{
-filename = filename; /* Keep picky compilers happy */
-errmsg = errmsg;
-return (void *)(-1); /* Just return something non-null */
-}
-
-
-
-
-/*************************************************
-* Find entry point for passwd *
-*************************************************/
-
-/* See local README for interface description */
-
-int
-dkim_find(void *handle, uschar *filename, uschar *keystring, int length,
- uschar **result, uschar **errmsg, BOOL *do_cache)
-{
-#ifndef DISABLE_DKIM
- dkim_exim_verify_result(keystring,result,errmsg);
- return OK;
-#else
- *errmsg = US"DKIM support not compiled.";
- *result = US"unverified";
- return FAIL;
-#endif
-}
-
-/* End of lookups/dkim.c */
+++ /dev/null
-/* $Cambridge: exim/src/src/lookups/dkim.h,v 1.1 2007/09/28 12:21:57 tom Exp $ */
-
-/*************************************************
-* Exim - an Internet mail transport agent *
-*************************************************/
-
-/* Copyright (c) University of Cambridge 1995 - 2007 */
-/* See the file NOTICE for conditions of use and distribution. */
-
-/* Header for the DKIM lookup */
-
-extern void *dkim_open(uschar *, uschar **);
-extern int dkim_find(void *, uschar *, uschar *, int, uschar **, uschar **,
- BOOL *);
-
-/* End of lookups/dkim.h */