summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/crypto/rand/randfile.c
diff options
context:
space:
mode:
authornectar <nectar@FreeBSD.org>2005-02-25 05:39:05 +0000
committernectar <nectar@FreeBSD.org>2005-02-25 05:39:05 +0000
commit78a59572b356f941f9bcb853dafb34829ec8e576 (patch)
tree4a7be4ade5df61ca3631c0937c1fc399944ea1cc /crypto/openssl/crypto/rand/randfile.c
parenta55ec1447ad1b73694515ed74d03a045fdf79313 (diff)
downloadFreeBSD-src-78a59572b356f941f9bcb853dafb34829ec8e576.zip
FreeBSD-src-78a59572b356f941f9bcb853dafb34829ec8e576.tar.gz
Vendor import of OpenSSL 0.9.7e.
Diffstat (limited to 'crypto/openssl/crypto/rand/randfile.c')
-rw-r--r--crypto/openssl/crypto/rand/randfile.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/openssl/crypto/rand/randfile.c b/crypto/openssl/crypto/rand/randfile.c
index f5d0843..c7fba49 100644
--- a/crypto/openssl/crypto/rand/randfile.c
+++ b/crypto/openssl/crypto/rand/randfile.c
@@ -166,6 +166,7 @@ int RAND_write_file(const char *file)
}
#if defined(O_CREAT) && !defined(OPENSSL_SYS_WIN32)
+ {
/* For some reason Win32 can't write to files created this way */
/* chmod(..., 0600) is too late to protect the file,
@@ -173,6 +174,7 @@ int RAND_write_file(const char *file)
int fd = open(file, O_CREAT, 0600);
if (fd != -1)
out = fdopen(fd, "wb");
+ }
#endif
if (out == NULL)
out = fopen(file,"wb");
OpenPOWER on IntegriCloud