summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2017-01-24 10:54:49 +0000
committerBob Beck <beck@cvs.openbsd.org>2017-01-24 10:54:49 +0000
commitec19c09ba5762faeb558e9beb4d7c4b2b62170a3 (patch)
treeaf5b90a711845b42edfcf7a8a4ca59e5a92704ad /usr.sbin
parent57735f4d8ed9841db2ee39e8c722a3ae68d83cfa (diff)
Actually load the cafile when providede, and error message cleanup
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ocspcheck/ocspcheck.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/ocspcheck/ocspcheck.c b/usr.sbin/ocspcheck/ocspcheck.c
index 0d6ebee028c..847477c2d1d 100644
--- a/usr.sbin/ocspcheck/ocspcheck.c
+++ b/usr.sbin/ocspcheck/ocspcheck.c
@@ -190,12 +190,12 @@ read_cacerts(char *file)
}
if ((lookup = X509_STORE_add_lookup(store, X509_LOOKUP_file())) ==
NULL) {
- warnx("Unable to load CA certs from file %s\n", file);
+ warnx("Unable to load CA certs from file %s", file);
goto end;
}
if (file) {
if (!X509_LOOKUP_load_file(lookup, file, X509_FILETYPE_PEM)) {
- warnx("Unable to load CA certs from file %s\n", file);
+ warnx("Unable to load CA certs from file %s", file);
goto end;
}
} else
@@ -203,7 +203,7 @@ read_cacerts(char *file)
if ((lookup = X509_STORE_add_lookup(store, X509_LOOKUP_hash_dir())) ==
NULL) {
- warnx("Unable to load CA certs from file %s\n", file);
+ warnx("Unable to load CA certs from file %s", file);
goto end;
}
X509_LOOKUP_add_dir(lookup, NULL, X509_FILETYPE_DEFAULT);
@@ -556,7 +556,7 @@ main (int argc, char **argv)
* OSCP request based on the full certificate chain
* we have been given to check.
*/
- if ((castore = read_cacerts(NULL)) == NULL)
+ if ((castore = read_cacerts(cafile)) == NULL)
errx(EXIT_FAILURE, "Unable to load %s", cafile);
if ((request = ocsp_request_new_from_cert(certfile, nonce)) == NULL)