GH367: use random data if seed too short.

Signed-off-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Emilia Käsper <emilia@openssl.org>
This commit is contained in:
Ismo Puustinen
2015-09-18 16:07:23 -04:00
committed by Rich Salz
parent 21b538d616
commit 6f997dc365
2 changed files with 2 additions and 2 deletions

View File

@@ -203,7 +203,7 @@ int dsa_builtin_paramgen(DSA *ret, size_t bits, size_t qbits,
if (!BN_GENCB_call(cb, 0, m++))
goto err;
if (!seed_len) {
if (!seed_len || !seed_in) {
if (RAND_pseudo_bytes(seed, qsize) < 0)
goto err;
seed_is_random = 1;