summaryrefslogtreecommitdiffstats
path: root/crypto/rand/md_rand.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-22Run util/openssl-format-source -v -c .Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22Move more comments that confuse indentMatt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-12-08remove OPENSSL_FIPSAPIDr. Stephen Henson
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-04-09ssleay_rand_add returns a value in 1.1.0Dr. Stephen Henson
2014-04-07Return if ssleay_rand_add called with zero num.Dr. Stephen Henson
Treat a zero length passed to ssleay_rand_add a no op: the existing logic zeroes the md value which is very bad. OpenSSL itself never does this internally and the actual call doesn't make sense as it would be passing zero bytes of entropy. Thanks to Marcus Meissner <meissner@suse.de> for reporting this bug. (cherry picked from commit 5be1ae28ef3c4bdec95b94f14e0e939157be550a)
2014-01-12typoDr. Stephen Henson
2014-01-11Use rdrand as additional entropy source.Dr. Stephen Henson
If available rdrand is used as an additional entropy source for the PRNG and for additional input in FIPS mode.
2013-10-20Time value for various platforms.Dr. Stephen Henson
The function gettimeofday() is not supported on all platforms. Use more portable versions. Adapted from FIPS code.
2013-09-20Mix time into the pool to avoid repetition of the Android duplicated PID ↵Ben Laurie
problem.
2011-02-16Experimental symbol renaming to avoid clashes with regular OpenSSL.Dr. Stephen Henson
Make sure crypto.h is included first in any affected files.
2011-01-27Update source files to handle new FIPS_lock() location. Add FIPS_lock()Dr. Stephen Henson
definition. Remove stale function references from fips.h
2011-01-27Change OPENSSL_FIPSEVP to OPENSSL_FIPSAPI as it doesn't just referDr. Stephen Henson
to EVP any more. Move locking #define into fips.h. Set FIPS locking callbacks at same time as OpenSSL locking callbacks.
2011-01-26FIPS mode changes to make RNG compile (this will need updating later as weDr. Stephen Henson
need a whole new PRNG for FIPS). 1. avoid use of ERR_peek(). 2. If compiling with FIPS use small FIPS EVP and disable ENGINE
2010-06-16clarify commentDr. Stephen Henson
2009-09-23Audit libcrypto for unchecked return values: fix all cases enounteredDr. Stephen Henson
2009-01-03VMS stuff I forgot...Richard Levitte
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-04Only one of these needs to be signed.Ben Laurie
2008-11-02Not sure about this one... seems to be needed to make 64 bit releaseDr. Stephen Henson
builds work properly...
2008-11-01More size_tification.Ben Laurie
2008-08-06Remove the dual-callback scheme for numeric and pointer thread IDs,Geoff Thorpe
deprecate the original (numeric-only) scheme, and replace with the CRYPTO_THREADID object. This hides the platform-specifics and should reduce the possibility for programming errors (where failing to explicitly check both thread ID forms could create subtle, platform-specific bugs). Thanks to Bodo, for invaluable review and feedback.
2008-07-03Revert my earlier CRYPTO_THREADID commit, I will commit a reworkedGeoff Thorpe
version some time soon.
2008-03-28There was a need to support thread ID types that couldn't be reliably castGeoff Thorpe
to 'unsigned long' (ie. odd platforms/compilers), so a pointer-typed version was added but it required portable code to check *both* modes to determine equality. This commit maintains the availability of both thread ID types, but deprecates the type-specific accessor APIs that invoke the callbacks - instead a single type-independent API is used. This simplifies software that calls into this interface, and should also make it less error-prone - as forgetting to call and compare *both* thread ID accessors could have led to hard-to-debug/infrequent bugs (that might only affect certain platforms or thread implementations). As the CHANGES note says, there were corresponding deprecations and replacements in the thread-related functions for BN_BLINDING and ERR too.
2007-01-21Constify version strings and some structures.Dr. Stephen Henson
2006-06-23New functions CRYPTO_set_idptr_callback(),Bodo Möller
CRYPTO_get_idptr_callback(), CRYPTO_thread_idptr() for a 'void *' type thread ID, since the 'unsigned long' type of the existing thread ID does not always work well.
2005-04-07make sure error queue is totally emptiedNils Larsch
PR: 359
2004-03-15It was just pointed out to me that it's better to cast to double...Richard Levitte
2004-03-15Make sure that the last argument to RAND_add() is a float, or someRichard Levitte
compilers may complain.
2003-10-29A general spring-cleaning (in autumn) to fix up signed/unsigned warnings.Geoff Thorpe
I have tried to convert 'len' type variable declarations to unsigned as a means to address these warnings when appropriate, but when in doubt I have used casts in the comparisons instead. The better solution (that would get us all lynched by API users) would be to go through and convert all the function prototypes and structure definitions to use unsigned variables except when signed is necessary. The proliferation of (signed) "int" for strictly non-negative uses is unfortunate.
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.
2001-09-10copyrightBodo Möller
2001-09-07The various hash #includes in rand_lcl.h *are* needed despiteBodo Möller
<openssl/evp.h> is now used (MD_DIGEST_LENGTH definitions!). No need to include such headers directly in md_rand.c.
2001-09-07Now need sha.h for some reason.Ben Laurie
2001-08-05Start to reduce some of the header bloat.Ben Laurie
2001-07-30Really add the EVP and all of the DES changes.Ben Laurie
2001-07-25md_rand.c thread safetyBodo Möller
2001-07-24Avoid race condition.Bodo Möller
Submitted by: Travis Vitek <vitek@roguewave.com>
2001-07-10Fix PRNG.Bodo Möller
2001-06-19Change all calls to low level digest routines in the library andDr. Stephen Henson
applications to use EVP. Add missing calls to HMAC_cleanup() and don't assume HMAC_CTX can be copied using memcpy(). Note: this is almost identical to the patch submitted to openssl-dev by Verdon Walker <VWalker@novell.com> except some redundant EVP_add_digest_()/EVP_cleanup() calls were removed and some changes made to avoid compiler warnings.
2001-06-07ERR_peek_error() returns "unsigned long".Lutz Jänicke
2001-04-18fix md_rand.c locking bugsBodo Möller
2001-03-15error codes are longs, not intsBodo Möller
2001-02-22e_os.h does not belong with the exported headers. Do not put it thereRichard Levitte
and make all files the depend on it include it without prefixing it with openssl/. This means that all Makefiles will have $(TOP) as one of the include directories.
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-19Make all configuration macros available for application by makingRichard Levitte
sure they are available in opensslconf.h, by giving them names starting with "OPENSSL_" to avoid conflicts with other packages and by making sure e_os2.h will cover all platform-specific cases together with opensslconf.h. I've checked fairly well that nothing breaks with this (apart from external software that will adapt if they have used something like NO_KRB5), but I can't guarantee it completely, so a review of this change would be a good thing.
2000-08-08Make sure that 'initialized' is zeroed as well when cleaning up.Richard Levitte
2000-07-27Looks like Win32 builds do not define THREADS. However, they're stillRichard Levitte
supporting threads, which means that th assertion is supperbly dangerous, so make sure it's not compiled under Win32, period.
2000-07-26There's a deadlock when ssleay_rand_bytes is called the first time, sinceRichard Levitte
it wants to stir the pool using ssleay_rand_add. This fix provides the possibility to call ssleay_rand_add inside a locked state by simply telling it not to do any locking through a static variable. This isn't the most elegant way one could do this, but it does retain thread safety during the stirring process.
2000-07-19Move RNG initialization to RAND_poll(), and shared definitions toUlf Möller
rand_lcl.h