Commit e0a675e2 authored by Todd Short's avatar Todd Short
Browse files

Clean up RAND_bytes() calls



When RAND_pseudo_bytes() was replaced with RAND_bytes(), this case
was not reduced to a simple RAND_bytes() call.

Reviewed-by: default avatarMatt Caswell <matt@openssl.org>
Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1117)
parent 0a618df0
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -44,13 +44,8 @@ static int bnrand(int pseudorand, BIGNUM *rnd, int bits, int top, int bottom)
    time(&tim);
    RAND_add(&tim, sizeof(tim), 0.0);

    if (pseudorand) {
    if (RAND_bytes(buf, bytes) <= 0)
        goto err;
    } else {
        if (RAND_bytes(buf, bytes) <= 0)
            goto err;
    }

    if (pseudorand == 2) {
        /*