Commit graph

56 commits

Author SHA1 Message Date
Richard Levitte
d309394447 Make sure that 'initialized' is zeroed as well when cleaning up. 2000-08-08 15:06:44 +00:00
Richard Levitte
d6ade7422a Looks like Win32 builds do not define THREADS. However, they're still
supporting threads, which means that th assertion is supperbly
dangerous, so make sure it's not compiled under Win32, period.
2000-07-27 20:14:39 +00:00
Richard Levitte
a4125514f5 There's a deadlock when ssleay_rand_bytes is called the first time, since
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-26 08:32:00 +00:00
Ulf Möller
8ad7635ec9 Move RNG initialization to RAND_poll(), and shared definitions to
rand_lcl.h
2000-07-19 21:43:23 +00:00
Richard Levitte
3b3bc455d0 That's it, I've seen questions about this one time too many for
today.  Time to add extra info so the poor users know where to
go with their troubles.
2000-06-28 14:32:12 +00:00
Bodo Möller
2ace287dea Move Windows seeding functions into a separate file.
They have nothing to do with the particular PRNG (md_rand.c).
2000-05-31 12:48:35 +00:00
Bodo Möller
361ee9733f Improve PRNG robustness. 2000-05-30 21:44:36 +00:00
Bodo Möller
b841e0acd8 'entropy >= ENTROPY_NEEDED' should be evaluated while the
variables are locked.
2000-03-30 06:11:54 +00:00
Richard Levitte
7ae634de49 Since ssleay_rand_initialize() unlocks then locks CRYPTO_LOCK_RAND,
it's a good thing if ssleay_rand_status() would do the corresponding
lock and unlock as everyone else...
2000-03-29 17:25:52 +00:00
Ulf Möller
a6aa71ff5f Bug fix: RAND_write_file() failed to write to files created by open()
on Win32.
2000-03-19 22:57:07 +00:00
Ulf Möller
f3f3cc0cca oops. don't use "entropy" directly. 2000-03-19 17:20:26 +00:00
Ulf Möller
c97b11f4b3 New function RAND_event() collects entropy from Windows events. 2000-03-19 17:14:25 +00:00
Bodo Möller
863fe2ecac cleaning up a little 2000-03-12 23:27:14 +00:00
Bodo Möller
5eb8ca4d92 Use RAND_METHOD for implementing RAND_status. 2000-03-02 14:34:58 +00:00
Ulf Möller
e64dceab74 Switch for turning on the predictable "random" number generator. 2000-02-28 20:19:39 +00:00
Bodo Möller
c6709c6b0f handle entropy estimate correctly 2000-02-25 07:40:53 +00:00
Bodo Möller
1a33f6da8b Don't use buffered fread() to read from DEVRANDOM,
because this will drain the entropy pool.
2000-02-24 20:24:45 +00:00
Ulf Möller
4ec2d4d2b3 Support EGD. 2000-02-24 02:51:47 +00:00
Bodo Möller
853f757ece Allow for higher granularity of entropy estimates by using 'double'
instead of 'unsigned' counters.
Seed PRNG in MacOS/GetHTTPS.src/GetHTTPS.cpp.

Partially submitted by Yoram Meroz <yoram@mail.idrive.com>.
2000-02-19 15:22:53 +00:00
Bodo Möller
0a751d8ce8 16 * 8 = 128. 2000-02-10 21:47:06 +00:00
Ulf Möller
657e60fa00 ispell (and minor modifications) 2000-02-03 23:23:24 +00:00
Bodo Möller
c88a900fa1 update PRNG documentation/comments 2000-01-22 23:11:13 +00:00
Ulf Möller
0b5cfe32e9 Use comment from md_rand.c in rand.pod 2000-01-21 23:36:40 +00:00
Bodo Möller
2c8aeddc5d change comments 2000-01-21 20:18:09 +00:00
Bodo Möller
720b3598d6 Avoid integer overflow in entropy counter.
Slightly clarify the RAND_... documentation.
2000-01-21 19:54:22 +00:00
Ulf Möller
60b5245360 Document RAND library. 2000-01-21 17:50:27 +00:00
Ulf Möller
373b575f5a New function RAND_pseudo_bytes() generated pseudorandom numbers that
are not guaranteed to be unpredictable.
2000-01-16 15:58:17 +00:00
Bodo Möller
2f878669b7 Avoid shadowing variables,
and re-enable seeding with more data than read from DEVRANDOM -- just
don't pretend it contains entropy.
2000-01-14 09:08:39 +00:00
Ulf Möller
f2b86c955c minor change for the prng 2000-01-14 02:31:32 +00:00
Ulf Möller
eb952088f0 Precautions against using the PRNG uninitialized: RAND_bytes() now
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.
2000-01-13 20:59:17 +00:00
Andy Polyakov
9a1e34e5de MacOS updates. 1999-12-19 16:07:19 +00:00
Bodo Möller
62ac293801 Always hash the pid in the first iteration in ssleay_rand_bytes,
don't try to detect fork()s by looking at getpid().
The reason is that threads sharing the same memory can have different
PIDs; it's inefficient to run RAND_seed each time a different thread
calls RAND_bytes.
1999-10-26 16:26:48 +00:00
Bodo Möller
c1e744b912 Make md_rand.c more robust. 1999-10-26 14:49:12 +00:00
Bodo Möller
023c8d0b0a Use of DEVRANDOM must be #ifdef'ed (the #ifdef was commented out
between SSLeay 0.8.1b and 0.9.0b with no apparent reason).
If we *want* an error when DEVRANDOM is not defined (it always is with
the current e_os.h) we should use #error.
1999-10-14 17:31:53 +00:00
Andy Polyakov
17f389bbbf Initial support for MacOS.
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-09-11 17:54:18 +00:00
Bodo Möller
7e70181723 It was a very bad idea to use #include "../e_os.h" -- when this occurs
in cryptlib.h (which is often included as "../cryptlib.h"), then the
question remains relative to which directory this is to be interpreted.
gcc went one further directory up, as intended; but makedepend thinks
differently, and so probably do some C compilers.  So the ../ must go away;
thus e_os.h goes back into include/openssl (but I now use
#include "openssl/e_os.h" instead of <openssl/e_os.h> to make the point) --
and we have another huge bunch of dependency changes.  Argh.
1999-05-21 11:16:48 +00:00
Bodo Möller
d6847aed10 Add a kludge :-(
There were problems with putting e_os.h just into the top directory,
because the test programs are compiled within test/ in the "standard"
case in in their original directories in the makefile.one case;
and in the latter symlinks may not be available.
1999-05-20 22:18:49 +00:00
Bodo Möller
17e3dd1c62 Don't install e_os.h in include/openssl, use it only as a local
include file.
1999-05-20 21:59:20 +00:00
Ulf Möller
d02f751ce1 Message digest stuff. 1999-04-27 04:18:53 +00:00
Dr. Stephen Henson
a1e464f94a Fixes so it will compile again under Win32. 1999-04-25 20:57:09 +00:00
Bodo Möller
ec577822f9 Change #include filenames from <foo.h> to <openssl.h>.
Submitted by:
Reviewed by:
PR:
1999-04-23 22:13:45 +00:00
Bodo Möller
5cc146f344 Fixed some race conditions.
Submitted by:
Reviewed by:
PR:
1999-04-22 13:37:46 +00:00
Ulf Möller
6b691a5c85 Change functions to ANSI C. 1999-04-19 21:31:43 +00:00
Ben Laurie
e778802f53 Massive constification. 1999-04-17 21:25:43 +00:00
Ben Laurie
b4cadc6e13 Fix security hole. 1999-03-22 12:22:14 +00:00
Ralf S. Engelschall
74d7abc2ab Get rid of remaining C++-style comments which strict C compilers hate.
(Pointed out by Carlos Amengual).
1999-02-27 12:17:40 +00:00
Dr. Stephen Henson
5c00879ef0 More Win32 fixes and upsdate INSTALL.W32 documentation. 1999-02-14 00:40:13 +00:00
Ben Laurie
bf5dcd135f More exactitude with function arguments. 1999-02-09 23:01:08 +00:00
Ben Laurie
a224de3f5d Reduce header dependencies. 1999-01-25 21:19:12 +00:00
Ralf S. Engelschall
9cb0969f65 Fix version stuff:
1. The already released version was 0.9.1c and not 0.9.1b

2. The next release should be 0.9.2 and not 0.9.1d, because
   first the changes are already too large, second we should avoid any more
   0.9.1x confusions and third, the Apache version semantics of
   VERSION.REVISION.PATCHLEVEL for the version string is reasonable (and here
   .2 is already just a patchlevel and not major change).
tVS: ----------------------------------------------------------------------
1998-12-31 09:36:40 +00:00