RAND_load_file(..., -1) now means "read the complete file";
this is what we now use to read $RANDFILE / $HOME/.rnd. (Previously, after 'cat'ting lots of stuff into .rnd only the first MB would be looked at.) Bugfix for apps/enc.c: Continue if RAND_pseudo_bytes returns 0 (only -1 is an error).
This commit is contained in:
@@ -18,12 +18,14 @@ RAND_load_file, RAND_write_file, RAND_file_name - PRNG seed file
|
||||
|
||||
RAND_file_name() generates a default path for the random seed
|
||||
file. B<buf> points to a buffer of size B<num> in which to store the
|
||||
filename. The seed file is $RANDFILE, if that environment variable is
|
||||
set, $HOME/.rand otherwise. If $HOME is not set either, or B<num> is
|
||||
filename. The seed file is $RANDFILE if that environment variable is
|
||||
set, $HOME/.rnd otherwise. If $HOME is not set either, or B<num> is
|
||||
too small for the path name, an error occurs.
|
||||
|
||||
RAND_load_file() reads up to B<max_bytes> from file B<filename> and
|
||||
adds them to the PRNG.
|
||||
RAND_load_file() reads a number of bytes from file B<filename> and
|
||||
adds them to the PRNG. If B<max_bytes> is non-negative,
|
||||
up to to B<max_bytes> are read; if B<max_bytes> is -1, the complete file
|
||||
is read.
|
||||
|
||||
RAND_write_file() writes a number of random bytes (currently 1024) to
|
||||
file B<filename> which can be used to initialze the PRNG by calling
|
||||
|
||||
Reference in New Issue
Block a user