From 005ebd1b954555c7222ed703d0b591294e84c873 Mon Sep 17 00:00:00 2001 From: Daniel Roethlisberger Date: Tue, 23 Oct 2012 23:04:22 +0200 Subject: [PATCH] Fix syslog for more error cases Also fix issue #6 for target certificate loading error cases. --- main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index a5ac2b5..99509a2 100644 --- a/main.c +++ b/main.c @@ -167,13 +167,15 @@ main_loadtgcrt(const char *filename, void *arg) if (!cert) { log_err_printf("Failed to load cert and key from PEM file " "'%s'\n", filename); - exit(EXIT_FAILURE); + log_fini(); + exit(EXIT_FAILURE); /* XXX */ } if (X509_check_private_key(cert->crt, cert->key) != 1) { log_err_printf("Cert does not match key in PEM file " "'%s':\n", filename); ERR_print_errors_fp(stderr); - exit(EXIT_FAILURE); + log_fini(); + exit(EXIT_FAILURE); /* XXX */ } #ifdef DEBUG_CERTIFICATE