aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-06-15 11:14:30 -0400
committerMatt Caswell <matt@openssl.org>2016-06-17 17:26:18 +0100
commit13c03c8d6da334bb1cde6ce4133e7c75b3b76947 (patch)
tree488a74f29a2db17f65502eac3b59926b2e4970c9 /doc
parent4813ad2d245cbf7fed2898d173eaa9e2a00e3e23 (diff)
downloadopenssl-13c03c8d6da334bb1cde6ce4133e7c75b3b76947.tar.gz
Change default directory for storing the .rnd file on Windows
Previously we would try %RANDFILE%, then %HOME% and finally "C:". Unfortunately this often ends up being "C:" which the user may not have write permission for. Now we try %RANDFILE% first, and then the same set of environment vars as GetTempFile() uses, i.e. %TMP%, then %TEMP%, %USERPROFILE% and %SYSTEMROOT%. If all else fails we fall back to %HOME% and only then "C:". Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'doc')
-rw-r--r--doc/crypto/RAND_load_file.pod12
1 files changed, 10 insertions, 2 deletions
diff --git a/doc/crypto/RAND_load_file.pod b/doc/crypto/RAND_load_file.pod
index 133b8d2311..dd79af28ae 100644
--- a/doc/crypto/RAND_load_file.pod
+++ b/doc/crypto/RAND_load_file.pod
@@ -18,8 +18,16 @@ 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/.rnd otherwise. If $HOME is not set either, or B<num> 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<num> is
too small for the path name, an error occurs.
RAND_load_file() reads a number of bytes from file B<filename> and