FYI - RAND_bytes(buf, bytes) receives correct parameters as bytes=256 for SHA256.
int RAND_bytes(unsigned char *buf, int num) { const RAND_METHOD *meth = RAND_get_rand_method(); if (meth && meth->bytes) { Print(L" control is here\n");/////<---controll is here return meth->bytes(buf,num); } Print(L" RAND_bytes fails\n"); return(-1); } On Tue, Aug 13, 2013 at 3:35 PM, baban devkate <baban...@gmail.com> wrote: > Hello, > > RAND_bytes() will use the proper OS-provided RNG e.g. /dev/urandom or > /dev/randomon Linux and CryptGenRandom() on Windows. > > I want to know how it works in Pre-boot environement? > > In pre-boot environment, if RAND_bytes() returns zero then what does it > mean? > > Is it because PRNG is not properly seeded? If yes, how to resolve it? > > > ~Baban >