summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/ca.c
diff options
context:
space:
mode:
authorEric Faurot <eric@cvs.openbsd.org>2013-11-21 08:36:52 +0000
committerEric Faurot <eric@cvs.openbsd.org>2013-11-21 08:36:52 +0000
commita60e478d85e751a9a8ec99e9984ced71909cc3d6 (patch)
tree5843de1bbeeda6bb269ae7d0cf48782d4a51828c /usr.sbin/smtpd/ca.c
parent6c268530f376bc9fa8f890726b47d32a6d1e4870 (diff)
fail if lka can't load cert file
Diffstat (limited to 'usr.sbin/smtpd/ca.c')
-rw-r--r--usr.sbin/smtpd/ca.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/ca.c b/usr.sbin/smtpd/ca.c
index 0b643832693..32fb84c00c5 100644
--- a/usr.sbin/smtpd/ca.c
+++ b/usr.sbin/smtpd/ca.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ca.c,v 1.2 2013/10/28 17:02:08 eric Exp $ */
+/* $OpenBSD: ca.c,v 1.3 2013/11/21 08:36:51 eric Exp $ */
/*
* Copyright (c) 2012 Gilles Chehade <gilles@poolp.org>
@@ -60,7 +60,10 @@ ca_X509_verify(X509 *certificate, STACK_OF(X509) *chain, const char *CAfile,
if ((store = X509_STORE_new()) == NULL)
goto end;
- X509_STORE_load_locations(store, CAfile, NULL);
+ if (! X509_STORE_load_locations(store, CAfile, NULL)) {
+ log_warn("warn: unable to load CA file %s", CAfile);
+ goto end;
+ }
X509_STORE_set_default_paths(store);
if ((xsc = X509_STORE_CTX_new()) == NULL)