From: Florian Mickler Date: Mon, 13 Jan 2020 01:06:49 +0000 (+0100) Subject: openssl srp: make index.txt parsing error more verbose X-Git-Tag: openssl-3.0.0-beta1~406 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e16d9afe4106503ba6c4b22c9b7c5bd367e3b565;p=thirdparty%2Fopenssl.git openssl srp: make index.txt parsing error more verbose If index.txt exists but has some problems (like for example consisting of a single \n character or number of fields wrong in one of the lines) then openssl will just exit. This fixes it by printing an error when load_index returns null. Reviewed-by: Paul Dale Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/15360) --- diff --git a/apps/srp.c b/apps/srp.c index 48b99da2af7..a9466f83028 100644 --- a/apps/srp.c +++ b/apps/srp.c @@ -379,8 +379,10 @@ int srp_main(int argc, char **argv) srpvfile); db = load_index(srpvfile, NULL); - if (db == NULL) + if (db == NULL) { + BIO_printf(bio_err, "Problem with index file: %s (could not load/parse file)\n", srpvfile); goto end; + } /* Lets check some fields */ for (i = 0; i < sk_OPENSSL_PSTRING_num(db->db->data); i++) {