Skip to content

Commit

Permalink
openssl ocsp: make index.txt parsing error more verbose
Browse files Browse the repository at this point in the history
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 <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from openssl#15360)
  • Loading branch information
FlorianMickler authored and t8m committed May 24, 2021
1 parent ca29cc1 commit 2c6e33d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/ocsp.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2c6e33d

Please sign in to comment.