Module:
md_rand.c

Function:
static int ssleay_rand_bytes(unsigned char *buf, int num)

Synopsis:
The function always fails when entropy < ENTROPY_NEEDED

Description:
The variable "ok" is set as follows:

    ok = (entropy >= ENTROPY_NEEDED)

When I was tracing the code, "ok" was set to 0. It then proceeded through the
rest of the code such as completing the entire for loop. However, on completion
with no errors, the function failed because ok was still 0; "ok" was not reset:

    if (ok)
        return(1);
    else
        {
        RANDerr(RAND_F_SSLEAY_RAND_BYTES,RAND_R_PRNG_NOT_SEEDED);
        return(0);
        }

Best Regards,
Mark Olesen

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to