summaryrefslogtreecommitdiffstats
path: root/crypto/rand/randfile.c
AgeCommit message (Collapse)Author
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
2000-01-23As ftruncate is not availabe on all platforms, switch back toBodo Möller
opening the output file with "wb" to truncate it except on VMS (where the file now keeps its original length because it is opened with "rb+" -- does VMS have ftruncate?)
2000-01-21Document RAND library.Ulf Möller
2000-01-21In RAND_write_file, truncate the file to the no. of bytes writtenBodo Möller
(we're now using fopen(..., "rb+") instead of fopen(..., "wb"), so the file is not truncated automatically).
2000-01-21Check RAND_bytes() return value or use RAND_pseudo_bytes().Ulf Möller
2000-01-13Precautions against using the PRNG uninitialized: RAND_bytes() nowUlf Möller
returns int (1 = ok, 0 = not seeded). New function RAND_add() is the same as RAND_seed() but takes an estimate of the entropy as an additional argument.
1999-10-26Various randomness handling bugfixes and improvements --Bodo Möller
some utilities that should have used RANDFILE did not, and -rand handling was broken except in genrsa.
1999-09-11Initial support for MacOS.Andy Polyakov
This will soon be complemented with MacOS specific source code files and INSTALL.MacOS. I (Andy) have decided to get rid of a number of #include <sys/types.h>. I've verified it's ok (both by examining /usr/include/*.h and compiling) on a number of Unix platforms. Unfortunately I don't have Windows box to verify this on. I really appreciate if somebody could try to compile it and contact me a.s.a.p. in case a problem occurs. Submitted by: Roy Wood <roy@centricsystems.ca> Reviewed by: Andy Polyakov <appro@fy.chalmers.se>