summaryrefslogtreecommitdiffstats
path: root/crypto/rand/rand_lib.c
AgeCommit message (Collapse)Author
2015-01-22Run util/openssl-format-source -v -c .Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-08-01Fix error discrepancy.Dr. Stephen Henson
We can't rename ssleay_rand_bytes to md_rand_bytes_lock as this will cause an error code discrepancy. Instead keep ssleay_rand_bytes and add an extra parameter: since ssleay_rand_bytes is not part of the public API this wont cause any binary compatibility issues. Reviewed-by: Kurt Roeckx <kurt@openssl.org >
2014-07-30Avoid multiple lock using FIPS DRBG.Dr. Stephen Henson
Don't use multiple locks when SP800-90 DRBG is used outside FIPS mode. PR#3176 Reviewed-by: Rich Salz <rsalz@openssl.org>
2013-09-22Disable Dual EC DRBG.Dr. Stephen Henson
Return an error if an attempt is made to enable the Dual EC DRBG: it is not used by default. (cherry picked from commit a4870de5aaef562c0947494b410a2387f3a6d04d)
2012-08-22PR: 2786Dr. Stephen Henson
Reported by: Tomas Mraz <tmraz@redhat.com> Treat a NULL value passed to drbg_free_entropy callback as non-op. This can happen if the call to fips_get_entropy fails.
2012-06-09Revert "version skew" patches that break FIPS compilationDr. Stephen Henson
2012-06-03Reduce version skew: trivia (I hope).Ben Laurie
2011-09-16Improved error checking for DRBG calls.Dr. Stephen Henson
New functionality to allow default DRBG type to be set during compilation or during runtime.
2011-06-21Don't set FIPS rand method at same time as RAND method as this can causeDr. Stephen Henson
the FIPS library to fail. Applications that want to set the FIPS rand method can do so explicitly and presumably they know what they are doing...
2011-06-13Set rand method in FIPS_mode_set() not in rand library.Dr. Stephen Henson
2011-06-13Redirect RAND to FIPS module in FIPS mode.Dr. Stephen Henson
2011-05-26The first of many changes to make OpenSSL 1.0.1 FIPS capable.Dr. Stephen Henson
Add static build support to openssl utility. Add new "fips" option to Configure. Make use of installed fipsld and fips_standalone_sha1 Initialise FIPS error callbacks, locking and DRBG. Doesn't do anything much yet: no crypto is redirected to the FIPS module. Doesn't completely build either but the openssl utility can enter FIPS mode: which doesn't do anything much either.
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
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
2007-09-24Port from 0.9.8-stableLutz Jänicke
2007-03-02Initialize "buf" to 0 to make valgrind happy :-)Lutz Jänicke
Note: the RAND_bytes() manual page says: RAND_bytes() puts num cryptographically strong pseudo-random bytes into buf. It does not talk about using the previous contents of buf so we are working as documented.
2003-01-30Add the possibility to build without the ENGINE framework.Richard Levitte
PR: 287
2001-09-25This commits changes to various parts of libcrypto required by the recentGeoff Thorpe
ENGINE surgery. DH, DSA, RAND, and RSA now use *both* "method" and ENGINE pointers to manage their hooking with ENGINE. Previously their use of "method" pointers was replaced by use of ENGINE references. See crypto/engine/README for details. Also, remove the ENGINE iterations from evp_test - even when the cipher/digest code is committed in, this functionality would require a different set of API calls.
2001-06-21Fix memory leak when RAND is used: need to cleanupDr. Stephen Henson
RANDs ENGINE reference in ENGINE_cleanup().
2001-04-30In RSA, DSA, DH, and RAND - if the "***_new()" function fails because theGeoff Thorpe
ENGINE code does not return a default, set an error.
2001-04-18Some more tweaks from ENGINE code.Geoff Thorpe
Previously RAND_get_rand_method was returning a non-const pointer, but it should be const. As with all other such cases, METHOD pointers are stored and returned as "const". The only methods one should be able to alter are methods "local" to the relevant code, in which case a non-const handle to the methods should already exist. This change has been forced by the constifying of the ENGINE code (before which RAND_METHOD was the only method pointer in an ENGINE structure that was not constant).
2000-10-26Merge the engine branch into the main trunk. All conflicts resolved.Richard Levitte
At the same time, add VMS support for Rijndael.
2000-03-02Use RAND_METHOD for implementing RAND_status.Bodo Möller
2000-02-19Allow for higher granularity of entropy estimates by using 'double'Bodo Möller
instead of 'unsigned' counters. Seed PRNG in MacOS/GetHTTPS.src/GetHTTPS.cpp. Partially submitted by Yoram Meroz <yoram@mail.idrive.com>.
2000-01-16New function RAND_pseudo_bytes() generated pseudorandom numbers thatUlf Möller
are not guaranteed to be unpredictable.
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-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>
1999-04-23Change #include filenames from <foo.h> to <openssl.h>.Bodo Möller
Submitted by: Reviewed by: PR:
1999-04-19Change functions to ANSI C.Ulf Möller
1999-02-09More exactitude with function arguments.Ben Laurie
1998-12-22Various cleanups and fixed by Marc and Ralf to start the OpenTLS projectRalf S. Engelschall
1998-12-21Import of old SSLeay release: SSLeay 0.9.1b (unreleased)SSLeayRalf S. Engelschall