aboutsummaryrefslogtreecommitdiff
path: root/crypto/rand/randfile.c
AgeCommit message (Collapse)AuthorFilesLines
2015-01-23ifdef cleanup part 3: OPENSSL_SYSNAMERich Salz1-1/+1
Rename OPENSSL_SYSNAME_xxx to OPENSSL_SYS_xxx Remove MS_STATIC; it's a relic from platforms <32 bits. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22ifdef cleanup, 2 remove OPENSSL_NO_SETVBUF_IONBFRich Salz1-3/+1
Use setbuf(fp, NULL) instead of setvbuf(). This removes some ifdef complexity because all of our platforms support setbuf. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-01-22More comment realignmentmaster-post-reformatMatt Caswell1-4/+4
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22Run util/openssl-format-source -v -c .Matt Caswell1-195/+201
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22Further comment changes for reformat (master)Matt Caswell1-2/+4
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-06-08Create ~/.rnd with mode 0600 instead of 0666Jakub Wilk1-0/+1
Because of a missing include <fcntl.h> we don't have O_CREATE and don't create the file with open() using mode 0600 but fall back to using fopen() with the default umask followed by a chmod(). Problem found by Jakub Wilk <jwilk@debian.org>.
2012-01-15Fix OPNESSL vs. OPENSSL typos.Andy Polyakov1-1/+1
PR: 2613 Submitted by: Leena Heino
2011-10-14more vxworks patchesDr. Stephen Henson1-1/+4
2011-03-19After some adjustments, apply the changes OpenSSL 1.0.0d on OpenVMSRichard Levitte1-0/+2
submitted by Steven M. Schweda <sms@antinode.info>
2010-11-18PR: 2372Dr. Stephen Henson1-1/+1
Submitted by: "W.C.A. Wijngaards" <wouter@nlnetlabs.nl> Reviewed by: steve Fix OpenBSD compilation failure.
2010-06-12Fix warnings.Ben Laurie1-2/+0
2010-01-26PR: 2138Dr. Stephen Henson1-0/+8
Submitted by: Kevin Regan <k.regan@f5.com> Clear stat structure if -DPURIFY is set to avoid problems on some platforms which include unitialised fields.
2009-06-13PR: 1952Dr. Stephen Henson1-2/+2
Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de> Reviewed by: steve@openssl.org ECDH negotiation bug.
2008-12-22This _WIN32-specific patch makes it possible to "wrap" OpenSSL in anotherAndy Polyakov1-0/+7
.DLL, in particular static build. The issue has been discussed in RT#1230 and later on openssl-dev, and mutually exclusive approaches were suggested. This completes compromise solution suggested in RT#1230. PR: 1230
2008-11-12Revert the size_t modifications from HEAD that had led to moreGeoff Thorpe1-6/+4
knock-on work than expected - they've been extracted into a patch series that can be completed elsewhere, or in a different branch, before merging back to HEAD.
2008-11-01More size_tification.Ben Laurie1-4/+6
2008-10-28randfile.c: .rnd can become orphaned on VMS.Andy Polyakov1-23/+43
Submitted by: David North
2008-05-20Correctly adjust location of commentLutz Jänicke1-1/+1
Submitted by: Ben Laurie <ben@links.org>
2008-05-16Another occurance of possible valgrind/purify "uninitialized memory"Lutz Jänicke1-0/+4
complaint related to the PRNG: with PURIFY policy don't feed uninitialized memory into the PRNG. Submitted by: Bodo Moeller <bmoeller@openssl.org> :-)
2007-03-02Do not use uninitialized memory to seed the PRNG as it may confuseLutz Jänicke1-3/+1
code checking tools. PR: 1499
2005-11-03Mask libcrypto references to stat with OPENSSL_NO_POSIX_IO.Andy Polyakov1-5/+9
2005-05-21When _XOPEN_SOURCE is defined, make sure it's defined to 500. Required inRichard Levitte1-1/+1
http://www.opengroup.org/onlinepubs/007908799/xsh/compilation.html. Notified by David Wolfe <dwolfe5272@yahoo.com>
2004-03-25Wrap code starting with a definition.Richard Levitte1-0/+2
PR: 854
2004-03-25A couple more cases where RAND_add() gets an integer instead of aRichard Levitte1-2/+2
doule as last argument.
2004-01-29TypoRichard Levitte1-2/+2
2004-01-26S_IFBLK and S_IFCHR may not exist in some places (like Windows), soRichard Levitte1-0/+4
let's check for those macros, and if they aren't defined, let's assume there aren't Unixly devices on this platform.
2003-12-27Check if a random "file" is really a device file, and treat itRichard Levitte1-11/+56
specially if it is. Add a few OpenBSD-specific cases. This is part of a large change submitted by Markus Friedl <markus@openbsd.org>
2002-11-28Cleanse memory using the new OPENSSL_cleanse() function.Richard Levitte1-2/+2
I've covered all the memset()s I felt safe modifying, but may have missed some.
2002-11-13Security fixes brought forward from 0.9.7.Ben Laurie1-2/+3
2001-05-03Some platforms (most notably Windows) do not have a $HOME by default.Richard Levitte1-1/+7
For those, unless the environment variables RANDFILE or HOME are defined (the default case!), RAND_file_name() will return NULL. This change adds a default HOME for those platforms. To add a default HOME for any platform, just define DEFAULT_HOME in the proper place, wrapped in appropriate #ifdef..#endif, in e_os.h.
2001-02-22undo previous change: "e_os.h" is now the official name for the fileBodo Möller1-1/+1
to include (but the OpenSSL_0_9_6-stable branche still has inconsistencies)
2001-02-22include e_os.h as "openssl/e_os.h" (as elsewhere)Bodo Möller1-1/+1
2001-02-22Since RAND_file_name() uses strlen, make sure the number that'sRichard Levitte1-2/+2
compared to it has the type size_t. Included the needed headers to make that happen.
2001-02-20Include OpenSSL header files earlier so macros like OPENSSL_SYS_VMSRichard Levitte1-4/+4
get a chance to be defined.
2001-02-20Use new-style system-id macros everywhere possible. I hope I haven'tRichard Levitte1-5/+5
missed any. This compiles and runs on Linux, and external applications have no problems with it. The definite test will be to build this on VMS.
2001-02-14New function OPENSSL_issetugid(). Needs more work.Ulf Möller1-10/+14
2001-02-08use <= instead of ==Ulf Möller1-1/+1
2001-02-08point out that RAND_load_file() etc are only for seed files, not forUlf Möller1-0/+3
entropy devices or sockets.
2000-09-11Don't include e_os.h before the system headersRichard Levitte1-2/+1
2000-06-16There are compilers that complain if a variable has the same name as aBodo Möller1-3/+3
label. (Reported by Alexei Bakharevski.)
2000-06-01There have been a number of complaints from a number of sources that namesRichard Levitte1-1/+1
like Malloc, Realloc and especially Free conflict with already existing names on some operating systems or other packages. That is reason enough to change the names of the OpenSSL memory allocation macros to something that has a better chance of being unique, like prepending them with OPENSSL_. This change includes all the name changes needed throughout all C files.
2000-05-11When open()ing 'file' in RAND_write_file, don't use O_EXCL.Bodo Möller1-10/+10
This is superfluous now that we don't have to avoid creating multiple versions of the file on VMS (because older versions are now deleted).
2000-03-19Bug fix: RAND_write_file() failed to write to files created by open()Ulf Möller1-42/+14
on Win32.
2000-03-19Make sure an error condition is returned if, for some reason, the fileRichard Levitte1-1/+5
couldn't be opened.
2000-03-11Workaround for Windoze weirdness.Bodo Möller1-2/+4
2000-02-26ftruncate() and fileno() are not supported on all versions of OpenVMSRichard Levitte1-1/+30
(they don't really exist before version 7), so that solution was toast. Instead, let's do it the way it's done on Unix, but then remove older versions of the file. That new mechanism *may* fail for some unixly formated file spec, although I wouldn't worry too much about it.
2000-02-25Changes to synchronise with Unix.Richard Levitte1-0/+1
(actually, much more is needed, like a real config script)
2000-01-30Source code cleanups: Use void * rather than char * in lhash,Ulf Möller1-1/+1
eliminate some of the -Wcast-qual warnings (debug-ben-strict target)
2000-01-24RAND_load_file(..., -1) now means "read the complete file";Bodo Möller1-4/+13
this is what we now use to read $RANDFILE / $HOME/.rnd. (Previously, after 'cat'ting lots of stuff into .rnd only the first MB would be looked at.) Bugfix for apps/enc.c: Continue if RAND_pseudo_bytes returns 0 (only -1 is an error).
2000-01-23Under VMS, ftruncate should be availableBodo Möller1-0/+7