mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 12:04:38 +08:00
Change default directory for the .rnd file on Windows and VMS
The previous change for Windows wasn't quite right. Corrected to use %HOME%, %USERPROFILE% and %SYSTEMPROFILE%, in that order. Also adding the default home for VMS, SYS$LOGIN: Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Andy Polyakov <appro@openssl.org>
This commit is contained in:
parent
a8db2cfa4b
commit
b8f304f70d
4
CHANGES
4
CHANGES
@ -6,8 +6,8 @@
|
||||
|
||||
*) The method for finding the storage location for the Windows RAND seed file
|
||||
has changed. First we check %RANDFILE%. If that is not set then we check
|
||||
the directories %TMP%, %TEMP%, %USERPROFILE%, %SYSTEMROOT% and %HOME% in
|
||||
that order. If all else fails we fall back to "C:".
|
||||
the directories %HOME%, %USERPROFILE% and %SYSTEMROOT% in that order. If
|
||||
all else fails we fall back to C:\.
|
||||
[Matt Caswell]
|
||||
|
||||
*) The EVP_EncryptUpdate() function has had its return type changed from void
|
||||
|
@ -292,11 +292,9 @@ const char *RAND_file_name(char *buf, size_t size)
|
||||
* uses TCHARs, but getenv() gives us chars so its easier to do it this
|
||||
* way
|
||||
*/
|
||||
if ((s = getenv("TMP")) == NULL
|
||||
&& (s = getenv("TEMP")) == NULL
|
||||
&& (s = getenv("USERPROFILE")) == NULL
|
||||
&& (s = getenv("SYSTEMROOT")) == NULL) {
|
||||
s = getenv("HOME");
|
||||
if ((s = getenv("HOME")) == NULL
|
||||
&& (s = getenv("USERPROFILE")) == NULL) {
|
||||
s = getenv("SYSTEMROOT");
|
||||
}
|
||||
#else
|
||||
if (OPENSSL_issetugid() == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user