Commit 6f997dc3 authored by Ismo Puustinen's avatar Ismo Puustinen Committed by Rich Salz
Browse files

GH367: use random data if seed too short.

parent 21b538d6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ maximum of 1024 bits.
If B<seed> is B<NULL> or B<seed_len> E<lt> 20, the primes will be
generated at random. Otherwise, the seed is used to generate
them. If the given seed does not yield a prime q, a new random
seed is chosen and placed at B<seed>.
seed is chosen.

DSA_generate_parameters_ex() places the iteration count in
*B<counter_ret> and a counter used for finding a generator in