diff options
author | marha <marha@users.sourceforge.net> | 2014-04-14 23:15:59 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-04-14 23:15:59 +0200 |
commit | 242d48135a12fc9167430f391ba0d27d9ad44c6b (patch) | |
tree | 95c65b0c4b195842adfd8dcf4c10c8f46b24e044 /openssl/apps/req.c | |
parent | d2ad10d03be8e6d4b150bbdf2a28ea3d5a18a2ed (diff) | |
download | vcxsrv-242d48135a12fc9167430f391ba0d27d9ad44c6b.tar.gz vcxsrv-242d48135a12fc9167430f391ba0d27d9ad44c6b.tar.bz2 vcxsrv-242d48135a12fc9167430f391ba0d27d9ad44c6b.zip |
Updated openssl to version 1.0.1g
Diffstat (limited to 'openssl/apps/req.c')
-rw-r--r-- | openssl/apps/req.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/openssl/apps/req.c b/openssl/apps/req.c index 85526581c..5e034a85e 100644 --- a/openssl/apps/req.c +++ b/openssl/apps/req.c @@ -644,6 +644,11 @@ bad: if (inrand) app_RAND_load_files(inrand); + if (!NCONF_get_number(req_conf,SECTION,BITS, &newkey)) + { + newkey=DEFAULT_KEY_LENGTH; + } + if (keyalg) { genctx = set_keygen_ctx(bio_err, keyalg, &pkey_type, &newkey, @@ -652,12 +657,6 @@ bad: goto end; } - if (newkey <= 0) - { - if (!NCONF_get_number(req_conf,SECTION,BITS, &newkey)) - newkey=DEFAULT_KEY_LENGTH; - } - if (newkey < MIN_KEY_LENGTH && (pkey_type == EVP_PKEY_RSA || pkey_type == EVP_PKEY_DSA)) { BIO_printf(bio_err,"private key length is too short,\n"); @@ -1649,6 +1648,8 @@ static EVP_PKEY_CTX *set_keygen_ctx(BIO *err, const char *gstr, int *pkey_type, keylen = atol(p + 1); *pkeylen = keylen; } + else + keylen = *pkeylen; } else if (p) paramfile = p + 1; |