diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/rand/randfile.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/libcrypto/rand/randfile.c b/src/lib/libcrypto/rand/randfile.c index f5d0843d13..c7fba496a8 100644 --- a/src/lib/libcrypto/rand/randfile.c +++ b/src/lib/libcrypto/rand/randfile.c | |||
| @@ -166,6 +166,7 @@ int RAND_write_file(const char *file) | |||
| 166 | } | 166 | } |
| 167 | 167 | ||
| 168 | #if defined(O_CREAT) && !defined(OPENSSL_SYS_WIN32) | 168 | #if defined(O_CREAT) && !defined(OPENSSL_SYS_WIN32) |
| 169 | { | ||
| 169 | /* For some reason Win32 can't write to files created this way */ | 170 | /* For some reason Win32 can't write to files created this way */ |
| 170 | 171 | ||
| 171 | /* chmod(..., 0600) is too late to protect the file, | 172 | /* chmod(..., 0600) is too late to protect the file, |
| @@ -173,6 +174,7 @@ int RAND_write_file(const char *file) | |||
| 173 | int fd = open(file, O_CREAT, 0600); | 174 | int fd = open(file, O_CREAT, 0600); |
| 174 | if (fd != -1) | 175 | if (fd != -1) |
| 175 | out = fdopen(fd, "wb"); | 176 | out = fdopen(fd, "wb"); |
| 177 | } | ||
| 176 | #endif | 178 | #endif |
| 177 | if (out == NULL) | 179 | if (out == NULL) |
| 178 | out = fopen(file,"wb"); | 180 | out = fopen(file,"wb"); |
