* Exim - an Internet mail transport agent *
*************************************************/
-/* Copyright (c) University of Cambridge, 1995 - 2016 */
+/* Copyright (c) University of Cambridge, 1995 - 2017 */
/* See the file NOTICE for conditions of use and distribution. */
/* Code for DKIM support. Other DKIM relevant code is in
pdkim_ctx *dkim_verify_ctx = NULL;
pdkim_signature *dkim_signatures = NULL;
pdkim_signature *dkim_cur_sig = NULL;
+static BOOL dkim_collect_error = FALSE;
static int
dkim_exim_query_dns_txt(char *name, char *answer)
dkim_verify_ctx = pdkim_init_verify(&dkim_exim_query_dns_txt, dot_stuffing);
dkim_collect_input = !!dkim_verify_ctx;
+dkim_collect_error = FALSE;
/* Start feed up with any cached data */
receive_get_cache();
{
log_write(0, LOG_MAIN,
"DKIM: validation error: %.100s", pdkim_errstr(rc));
+ dkim_collect_error = TRUE;
dkim_collect_input = FALSE;
}
store_pool = dkim_verify_oldpool;
dkim_signatures = NULL;
-/* If we have arrived here with dkim_collect_input == FALSE, it
-means there was a processing error somewhere along the way.
-Log the incident and disable futher verification. */
-
-if (!dkim_collect_input)
+if (dkim_collect_error)
{
log_write(0, LOG_MAIN,
"DKIM: Error while running this message through validation,"
sig->algo == PDKIM_ALGO_RSA_SHA256
? "rsa-sha256"
: sig->algo == PDKIM_ALGO_RSA_SHA1 ? "rsa-sha1" : "err",
- (int)sig->sigdata.len > -1 ? sig->sigdata.len * 8 : 0
+ (int)sig->sighash.len > -1 ? sig->sighash.len * 8 : 0
),
sig->identity ? string_sprintf("i=%s ", sig->identity) : US"",
dkim_signing_domain = US sig->domain;
dkim_signing_selector = US sig->selector;
- dkim_key_length = sig->sigdata.len * 8;
+ dkim_key_length = sig->sighash.len * 8;
return;
}
}