summaryrefslogtreecommitdiffstats
path: root/crypto/rand
AgeCommit message (Collapse)Author
2016-06-16RT4545: Backport 2877 to 1.0.2Rich Salz
Sender verified that the fix works. This is a backport/cherry-pick of just the bugfix part of 0f91e1dff4ab2e7c25bbae5a48dfabbd1a4eae3c Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-20rand/randfile.c: remove _XOPEN_SOURCE definition.Andy Polyakov
Defintions of macros similar to _XOPEN_SOURCE belong in command line or in worst case prior first #include directive in source. As for macros is was allegedly controlling. One can argue that we are probably better off demanding S_IS* macros but there are systems that just don't comply, hence this compromise solution... Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 2e6d7799ffc47604d06e0465afeb84b91aff8006)
2015-12-18Remove the "eay" c-file-style indicatorsRichard Levitte
Since we don't use the eay style any more, there's no point tryint to tell emacs to use it. Reviewed-by: Ben Laurie <ben@openssl.org>
2015-09-15RT4044: Remove .cvsignore files.Rich Salz
Reviewed-by: Matt Caswell <matt@openssl.org>
2015-05-23Fix the update target and remove duplicate file updatesRichard Levitte
We had updates of certain header files in both Makefile.org and the Makefile in the directory the header file lived in. This is error prone and also sometimes generates slightly different results (usually just a comment that differs) depending on which way the update was done. This removes the file update targets from the top level Makefile, adds an update: target in all Makefiles and has it depend on the depend: or local_depend: targets, whichever is appropriate, so we don't get a double run through the whole file tree. Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 0f539dc1a2f45580435c39dada44dd276e79cb88) Conflicts: Makefile.org apps/Makefile test/Makefile
2015-04-16Code style: space after 'if'Viktor Dukhovni
Reviewed-by: Matt Caswell <gitlab@openssl.org>
2015-03-05Unchecked malloc fixesMatt Caswell
Miscellaneous unchecked malloc fixes. Also fixed some mem leaks on error paths as I spotted them along the way. Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit 918bb8652969fd53f0c390c1cd909265ed502c7e) Conflicts: crypto/bio/bss_dgram.c
2015-02-12RT3684: rand_egd needs stddef.hRich Salz
Reviewed-by: Andy Polyakov <appro@openssl.org>
2015-01-22Re-align some comments after running the reformat script.OpenSSL_1_0_2-post-reformatMatt Caswell
This should be a one off operation (subsequent invokation of the script should not move them) This commit is for the 1.0.2 changes 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
Conflicts: crypto/dsa/dsa.h demos/engines/ibmca/hw_ibmca.c ssl/ssl_locl.h Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22indent has problems with comments that are on the right hand side of a line.Matt Caswell
Sometimes it fails to format them very well, and sometimes it corrupts them! This commit moves some particularly problematic ones. Conflicts: crypto/bn/bn.h crypto/ec/ec_lcl.h crypto/rsa/rsa.h demos/engines/ibmca/hw_ibmca.c ssl/ssl.h ssl/ssl3.h Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22Additional comment changes for reformat of 1.0.2Matt Caswell
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22Further comment amendments to preserve formatting prior to source reformatMatt Caswell
(cherry picked from commit 4a7fa26ffd65bf36beb8d1cb8f29fc0ae203f5c5) Conflicts: crypto/x509v3/pcy_tree.c Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-22mark all block comments that need format preserving so thatTim Hudson
indent will not alter them when reformatting comments (cherry picked from commit 1d97c8435171a7af575f73c526d79e1ef0ee5960) Conflicts: crypto/bn/bn_lcl.h crypto/bn/bn_prime.c crypto/engine/eng_all.c crypto/rc4/rc4_utl.c crypto/sha/sha.h ssl/kssl.c ssl/t1_lib.c Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-13Avoid deprecation problems in Visual Studio 13Matt Caswell
Reviewed-by: Andy Polyakov <appro@openssl.org> (cherry picked from commit 86d21d0b9577322ac5da0114c5fac16eb49b4cef)
2014-09-18RT2301: GetDIBits, not GetBitmapBits in rand_winJake Goulding
GetDIBits has been around since Windows2000 and BitBitmapBits is an old Win16 compatibility function that is much slower. Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit 99b00fd99330afb0be46265c3e28f25f938d3221)
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>
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>.
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-02-25Avoid Windows 8 Getversion deprecated errors.Dr. Stephen Henson
Windows 8 SDKs complain that GetVersion() is deprecated. We only use GetVersion like this: (GetVersion() < 0x80000000) which checks if the Windows version is NT based. Use a macro check_winnt() which uses GetVersion() on older SDK versions and true otherwise. (cherry picked from commit a4cc3c8041104896d51ae12ef7b678c31808ce52)
2013-12-10Get FIPS checking logic right.Dr. Stephen Henson
We need to lock when *not* in FIPS mode.
2013-12-08Avoid multiple locks in FIPS mode.Dr. Stephen Henson
PR: 3176. In FIPS mode ssleay_rand_bytes is only used for PRNG seeding and is performed in either a single threaded context (when the PRNG is first initialised) or under a lock (reseeding). To avoid multiple locks disable use of CRYPTO_LOCK_RAND in FIPS mode in ssleay_rand_bytes.
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
2012-01-15Fix OPNESSL vs. OPENSSL typos [from HEAD].Andy Polyakov
PR: 2613 Submitted by: Leena Heino
2011-12-19PR: 2563Dr. Stephen Henson
Submitted by: Paul Green <Paul.Green@stratus.com> Reviewed by: steve Improved PRNG seeding for VOS.
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-03-19Apply all the changes submitted by Steven M. Schweda <sms@antinode.info>Richard Levitte
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-11-18PR: 2372Dr. Stephen Henson
Submitted by: "W.C.A. Wijngaards" <wouter@nlnetlabs.nl> Reviewed by: steve Fix OpenBSD compilation failure.
2010-07-08rand_nw.c: compensate for gcc bug (using %edx instead of %eax at -O3)Andy Polyakov
[from HEAD]. PR: 2296
2010-06-16clarify commentDr. Stephen Henson
2010-06-15Fix warnings (From HEAD, original patch by Ben).Dr. Stephen Henson
2010-03-22rand_win.c: fix logical bug in readscreen [from HEAD].Andy Polyakov
2010-02-17PR: 2100Dr. Stephen Henson
Submitted by: James Baker <jbaker@tableausoftware.com> et al. Workaround for slow Heap32Next on some versions of Windows.
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.
2010-01-19rand_win.c: handel GetTickCount wrap-around [from HEAD].Andy Polyakov
2009-09-20Don't use __try+__except unless on VC++Dr. Stephen Henson
2009-07-24Update from 0.9.8-stable.Dr. Stephen Henson
2009-06-15Update from HEAD.Dr. Stephen Henson
2009-04-22PR: 1903Dr. Stephen Henson
Submitted by: "Paul Smedley" <pauldespam@despamsmedley.id.au> Approved by: steve@openssl.org OS/2 fixes (excludes Makefile.shared patch for now).
2009-04-06PR: 1890Dr. Stephen Henson
Submitted by: "Green, Paul" <Paul.Green@stratus.com> Approved by: steve@openssl.org Fixes to --with-zlib-include and --with-zlib-lib and init PRNG for VOS.