From 2c6e33d86362e1b1201edef62205237f1c8e3724 Mon Sep 17 00:00:00 2001 From: Florian Mickler Date: Mon, 13 Jan 2020 02:05:22 +0100 Subject: [PATCH] openssl ocsp: make index.txt parsing error more verbose If index.txt exists but has some problems (like for example consisting of a single \n character in it, or some field-number error in one of the lines) openssl will just exit without any error message. Reviewed-by: Paul Dale Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/15360) --- apps/ocsp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/ocsp.c b/apps/ocsp.c index c7cee0faf03..cf4f629db14 100644 --- a/apps/ocsp.c +++ b/apps/ocsp.c @@ -620,6 +620,9 @@ int ocsp_main(int argc, char **argv) if (ridx_filename != NULL) { rdb = load_index(ridx_filename, NULL); if (rdb == NULL || index_index(rdb) <= 0) { + BIO_printf(bio_err, + "Problem with index file: %s (could not load/parse file)\n", + ridx_filename); ret = 1; goto end; } -- 2.47.2