[openssl] master update

tomas at openssl.org tomas at openssl.org
Mon May 24 12:37:35 UTC 2021


The branch master has been updated
       via  e16d9afe4106503ba6c4b22c9b7c5bd367e3b565 (commit)
       via  2c6e33d86362e1b1201edef62205237f1c8e3724 (commit)
       via  ca29cc1453945fe92c86a312c0f94a8976a46856 (commit)
      from  669967fdd8e2174ed2b812df8488715c82f21360 (commit)


- Log -----------------------------------------------------------------
commit e16d9afe4106503ba6c4b22c9b7c5bd367e3b565
Author: Florian Mickler <florian at mickler.org>
Date:   Mon Jan 13 02:06:49 2020 +0100

    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 <pauli at openssl.org>
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/15360)

commit 2c6e33d86362e1b1201edef62205237f1c8e3724
Author: Florian Mickler <florian at mickler.org>
Date:   Mon Jan 13 02:05:22 2020 +0100

    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 <pauli at openssl.org>
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/15360)

commit ca29cc1453945fe92c86a312c0f94a8976a46856
Author: Florian Mickler <florian at mickler.org>
Date:   Mon Jan 13 01:44:24 2020 +0100

    openssl ca: make index.txt parsing error more verbose
    
    If index.txt exists but has some problems (like for example a single \n character in it) openssl will just exit without any error message.
    
    Bug at least expirienced twice: https://superuser.com/questions/1327848/openssl-ca-fails-after-password-without-error-message
    
    Reviewed-by: Paul Dale <pauli at openssl.org>
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/15360)

-----------------------------------------------------------------------

Summary of changes:
 apps/ca.c   | 8 ++++++--
 apps/ocsp.c | 3 +++
 apps/srp.c  | 4 +++-
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/apps/ca.c b/apps/ca.c
index 923ede4cde..32abc021a6 100755
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -556,8 +556,10 @@ end_of_options:
             goto end;
 
         db = load_index(dbfile, &db_attr);
-        if (db == NULL)
+        if (db == NULL) {
+            BIO_printf(bio_err, "Problem with index file: %s (could not load/parse file)\n", dbfile);
             goto end;
+        }
 
         if (index_index(db) <= 0)
             goto end;
@@ -684,8 +686,10 @@ end_of_options:
         goto end;
 
     db = load_index(dbfile, &db_attr);
-    if (db == NULL)
+    if (db == NULL) {
+        BIO_printf(bio_err, "Problem with index file: %s (could not load/parse file)\n", dbfile);
         goto end;
+    }
 
     /* Lets check some fields */
     for (i = 0; i < sk_OPENSSL_PSTRING_num(db->db->data); i++) {
diff --git a/apps/ocsp.c b/apps/ocsp.c
index c7cee0faf0..cf4f629db1 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;
         }
diff --git a/apps/srp.c b/apps/srp.c
index 48b99da2af..a9466f8302 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++) {


More information about the openssl-commits mailing list