X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=doc%2Fcrypto%2FRAND_load_file.pod;h=dd79af28ae374324424e6c357f151f17d9750d6e;hp=3e7585516096fba4332f000d090b82c6d837e3a5;hb=13c03c8d6da334bb1cde6ce4133e7c75b3b76947;hpb=74235cc9ec3123ee7f51211ea054632ca0cf7c91 diff --git a/doc/crypto/RAND_load_file.pod b/doc/crypto/RAND_load_file.pod index 3e75855160..dd79af28ae 100644 --- a/doc/crypto/RAND_load_file.pod +++ b/doc/crypto/RAND_load_file.pod @@ -8,7 +8,7 @@ RAND_load_file, RAND_write_file, RAND_file_name - PRNG seed file #include - const char *RAND_file_name(char *buf, int num); + const char *RAND_file_name(char *buf, size_t num); int RAND_load_file(const char *filename, long max_bytes); @@ -18,14 +18,22 @@ 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 points to a buffer of size B in which to store the -filename. The seed file is $RANDFILE if that environment variable is -set, $HOME/.rnd otherwise. If $HOME is not set either, or B is +filename. + +On Windows the seed file is %RANDFILE% if that environment variable is set. +Otherwise the file is called ".rnd" in one of the following locations (in order +of preference): %TMP%, %TEMP%, %USERPROFILE%, %SYSTEMROOT%, %HOME%, "C:". + +On all other systems the seed file is $RANDFILE if that environment variable is +set, $HOME/.rnd otherwise. + +If $HOME (on non Windows systems) is not set either, or B is too small for the path name, an error occurs. RAND_load_file() reads a number of bytes from file B and adds them to the PRNG. If B is non-negative, -up to to B are read; if B is -1, the complete file -is read. +up to B are read; +if B is -1, the complete file is read. RAND_write_file() writes a number of random bytes (currently 1024) to file B which can be used to initialize the PRNG by calling @@ -43,11 +51,15 @@ error. =head1 SEE ALSO -L, L, L +L, L, L + +=head1 COPYRIGHT -=head1 HISTORY +Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved. -RAND_load_file(), RAND_write_file() and RAND_file_name() are available in -all versions of SSLeay and OpenSSL. +Licensed under the OpenSSL license (the "License"). You may not use +this file except in compliance with the License. You can obtain a copy +in the file LICENSE in the source distribution or at +L. =cut