X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsrc%2Fdkim.c;h=171fcccdbe2088d26ab52829df132ae508fba1f2;hb=d6e35dd0017bc6f84aa7123fec76fcf507a04d01;hp=05b5fec56e62073f4f5d1d1640ee42d7ca782bad;hpb=4263f395efd136dece52d765dfcff3c96f17506e;p=exim.git diff --git a/src/src/dkim.c b/src/src/dkim.c index 05b5fec56..171fcccdb 100644 --- a/src/src/dkim.c +++ b/src/src/dkim.c @@ -23,6 +23,7 @@ int dkim_exim_query_dns_txt(char *name, char *answer) { dns_scan dnss; dns_record *rr; + lookup_dnssec_authenticated = NULL; if (dns_lookup(&dnsa, (uschar *)name, T_TXT, NULL) != DNS_SUCCEED) return PDKIM_FAIL; /* Search for TXT record */ @@ -504,7 +505,12 @@ uschar *dkim_exim_sign(int dkim_fd, rc = NULL; goto CLEANUP; } - (void)read(privkey_fd,big_buffer,(big_buffer_size-2)); + if (read(privkey_fd,big_buffer,(big_buffer_size-2)) < 0) { + log_write(0, LOG_MAIN|LOG_PANIC, "unable to read private key file: %s", + dkim_private_key_expanded); + rc = NULL; + goto CLEANUP; + } (void)close(privkey_fd); dkim_private_key_expanded = big_buffer; }