Use defaults bits in req when not given
authorKurt Roeckx <kurt@roeckx.be>
Mon, 23 Dec 2013 18:45:26 +0000 (19:45 +0100)
committerDr. Stephen Henson <steve@openssl.org>
Fri, 14 Feb 2014 22:30:27 +0000 (22:30 +0000)
commit3343220327664680420d4068e1fbe46d2236f1b0
tree75dec7062de29f998a54214da65d5e208b9a0a2c
parente547c45f1c74e976656c042ec9d873f6eea0e756
Use defaults bits in req when not given

If you use "-newkey rsa" it's supposed to read the default number of bits from the
config file.  However the value isn't used to generate the key, but it does
print it's generating such a key.  The set_keygen_ctx() doesn't call
EVP_PKEY_CTX_set_rsa_keygen_bits() and you end up with the default set in
pkey_rsa_init() (1024).  Afterwards the number of bits gets read from the config
file, but nothing is done with that anymore.

We now read the config first and use the value from the config file when no size
is given.

PR: 2592
apps/req.c