summaryrefslogtreecommitdiffstats
path: root/crypto/rand/randfile.c
AgeCommit message (Collapse)Author
2015-01-23ifdef cleanup part 3: OPENSSL_SYSNAMERich Salz
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 Salz
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 Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22Run util/openssl-format-source -v -c .Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22Further comment changes for reformat (master)Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-06-08Create ~/.rnd with mode 0600 instead of 0666Jakub Wilk
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 Polyakov
PR: 2613 Submitted by: Leena Heino
2011-10-14more vxworks patchesDr. Stephen Henson
2011-03-19After some adjustments, apply the changes OpenSSL 1.0.0d on OpenVMSRichard Levitte
submitted by Steven M. Schweda <sms@antinode.info>
2010-11-18PR: 2372Dr. Stephen Henson
Submitted by: "W.C.A. Wijngaards" <wouter@nlnetlabs.nl> Reviewed by: steve Fix OpenBSD compilation failure.
2010-06-12Fix warnings.Ben Laurie
2010-01-26PR: 2138Dr. Stephen Henson
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 Henson
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 Polyakov
.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 Thorpe
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 Laurie
2008-10-28randfile.c: .rnd can become orphaned on VMS.Andy Polyakov
Submitted by: David North
2008-05-20Correctly adjust location of commentLutz Jänicke
Submitted by: Ben Laurie <ben@links.org>
2008-05-16Another occurance of possible valgrind/purify "uninitialized memory"Lutz Jänicke
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änicke
code checking tools. PR: 1499
2005-11-03Mask libcrypto references to stat with OPENSSL_NO_POSIX_IO.Andy Polyakov
2005-05-21When _XOPEN_SOURCE is defined, make sure it's defined to 500. Required inRichard Levitte
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 Levitte
PR: 854
2004-03-25A couple more cases where RAND_add() gets an integer instead of aRichard Levitte
doule as last argument.
2004-01-29TypoRichard Levitte
2004-01-26S_IFBLK and S_IFCHR may not exist in some places (like Windows), soRichard Levitte
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 Levitte
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 Levitte
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 Laurie
2001-05-03Some platforms (most notably Windows) do not have a $HOME by default.Richard Levitte
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öller
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öller
2001-02-22Since RAND_file_name() uses strlen, make sure the number that'sRichard Levitte
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 Levitte
get a chance to be defined.
2001-02-20Use new-style system-id macros everywhere possible. I hope I haven'tRichard Levitte
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öller
2001-02-08use <= instead of ==Ulf Möller
2001-02-08point out that RAND_load_file() etc are only for seed files, not forUlf Möller
entropy devices or sockets.
2000-09-11Don't include e_os.h before the system headersRichard Levitte
2000-06-16There are compilers that complain if a variable has the same name as aBodo Möller
label. (Reported by Alexei Bakharevski.)
2000-06-01There have been a number of complaints from a number of sources that namesRichard Levitte
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öller
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öller
on Win32.
2000-03-19Make sure an error condition is returned if, for some reason, the fileRichard Levitte
couldn't be opened.
2000-03-11Workaround for Windoze weirdness.Bodo Möller
2000-02-26ftruncate() and fileno() are not supported on all versions of OpenVMSRichard Levitte
(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 Levitte
(actually, much more is needed, like a real config script)
2000-01-30Source code cleanups: Use void * rather than char * in lhash,Ulf Möller
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öller
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öller