[openssl-commits] [openssl] master update

Matt Caswell matt at openssl.org
Wed Jun 1 12:10:58 UTC 2016


The branch master has been updated
       via  57358a83a401ef469353b7ebdae0cf3b870a4d5e (commit)
      from  e51329d3815df95bf0ff66925c3961794f4c66d1 (commit)


- Log -----------------------------------------------------------------
commit 57358a83a401ef469353b7ebdae0cf3b870a4d5e
Author: Matt Caswell <matt at openssl.org>
Date:   Wed Jun 1 10:48:36 2016 +0100

    req command incorrectly displays the bits for an EC key
    
    When the "req" command is used to generate a new EC key using the -newkey
    option it will incorrectly display:
    
     Generating a 2048 bit EC private key
    
    This commit fixes the message to not display the bit length for EC keys
    because we don't currently support getting that during generation.
    
    GitHub Issue #1068
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>

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

Summary of changes:
 apps/req.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/apps/req.c b/apps/req.c
index aaca43a..ca8a9af 100644
--- a/apps/req.c
+++ b/apps/req.c
@@ -499,8 +499,12 @@ int req_main(int argc, char **argv)
             }
         }
 
-        BIO_printf(bio_err, "Generating a %ld bit %s private key\n",
-                   newkey, keyalgstr);
+        if (pkey_type == EVP_PKEY_EC) {
+            BIO_printf(bio_err, "Generating an EC private key\n");
+        } else {
+            BIO_printf(bio_err, "Generating a %ld bit %s private key\n",
+                       newkey, keyalgstr);
+        }
 
         EVP_PKEY_CTX_set_cb(genctx, genpkey_cb);
         EVP_PKEY_CTX_set_app_data(genctx, bio_err);


More information about the openssl-commits mailing list