X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/5ff854611127e1bd9b8ba4b61935f1550e96db38..1ac6b2e7857d7b6645dbd09047c4c2ac3b6cef1d:/src/src/spool_in.c diff --git a/src/src/spool_in.c b/src/src/spool_in.c index 311d1833c..a546b6521 100644 --- a/src/src/spool_in.c +++ b/src/src/spool_in.c @@ -1,10 +1,8 @@ -/* $Cambridge: exim/src/src/spool_in.c,v 1.23 2009/01/20 16:09:20 fanf2 Exp $ */ - /************************************************* * Exim - an Internet mail transport agent * *************************************************/ -/* Copyright (c) University of Cambridge 1995 - 2007 */ +/* Copyright (c) University of Cambridge 1995 - 2012 */ /* See the file NOTICE for conditions of use and distribution. */ /* Functions for reading spool files. When compiling for a utility (eximon), @@ -278,18 +276,17 @@ bmi_run = 0; bmi_verdicts = NULL; #endif -#ifdef EXPERIMENTAL_DOMAINKEYS -dk_do_verify = 0; -#endif - -#ifdef EXPERIMENTAL_DKIM -dkim_do_verify = 0; +#ifndef DISABLE_DKIM +dkim_signers = NULL; +dkim_disable_verify = FALSE; +dkim_collect_input = FALSE; #endif #ifdef SUPPORT_TLS -tls_certificate_verified = FALSE; -tls_cipher = NULL; -tls_peerdn = NULL; +tls_in.certificate_verified = FALSE; +tls_in.cipher = NULL; +tls_in.peerdn = NULL; +tls_in.sni = NULL; #endif #ifdef WITH_CONTENT_SCAN @@ -548,11 +545,13 @@ for (;;) #ifdef SUPPORT_TLS case 't': if (Ustrncmp(p, "ls_certificate_verified", 23) == 0) - tls_certificate_verified = TRUE; + tls_in.certificate_verified = TRUE; else if (Ustrncmp(p, "ls_cipher", 9) == 0) - tls_cipher = string_copy(big_buffer + 12); + tls_in.cipher = string_copy(big_buffer + 12); else if (Ustrncmp(p, "ls_peerdn", 9) == 0) - tls_peerdn = string_copy(big_buffer + 12); + tls_in.peerdn = string_unprinting(string_copy(big_buffer + 12)); + else if (Ustrncmp(p, "ls_sni", 6) == 0) + tls_in.sni = string_unprinting(string_copy(big_buffer + 9)); break; #endif @@ -719,8 +718,8 @@ while ((n = fgetc(f)) != EOF) int i; if (!isdigit(n)) goto SPOOL_FORMAT_ERROR; - (void)ungetc(n, f); - (void)fscanf(f, "%d%c ", &n, flag); + if(ungetc(n, f) == EOF || fscanf(f, "%d%c ", &n, flag) == EOF) + goto SPOOL_READ_ERROR; if (flag[0] != '*') message_size += n; /* Omit non-transmitted headers */ if (read_headers)