Commit 57358a83 authored by Matt Caswell's avatar Matt Caswell
Browse files

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: default avatarRichard Levitte <levitte@openssl.org>
parent e51329d3
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -499,8 +499,12 @@ int req_main(int argc, char **argv)
            }
        }

        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);