openssl/util
Dr. Matthias St. Pierre c16de9d832 Fix reseeding issues of the public RAND_DRBG
Reseeding is handled very differently by the classic RAND_METHOD API
and the new RAND_DRBG api. These differences led to some problems when
the new RAND_DRBG was made the default OpenSSL RNG. In particular,
RAND_add() did not work as expected anymore. These issues are discussed
on the thread '[openssl-dev] Plea for a new public OpenSSL RNG API'
and in Pull Request #4328. This commit fixes the mentioned issues,
introducing the following changes:

- Replace the fixed size RAND_BYTES_BUFFER by a new RAND_POOL API which
  facilitates collecting entropy by the get_entropy() callback.
- Don't use RAND_poll()/RAND_add() for collecting entropy from the
  get_entropy() callback anymore. Instead, replace RAND_poll() by
  RAND_POOL_acquire_entropy().
- Add a new function rand_drbg_restart() which tries to get the DRBG
  in an instantiated state by all means, regardless of the current
  state (uninstantiated, error, ...) the DRBG is in. If the caller
  provides entropy or additional input, it will be used for reseeding.
- Restore the original documented behaviour of RAND_add() and RAND_poll()
  (namely to reseed the DRBG immediately) by a new implementation based
  on rand_drbg_restart().
- Add automatic error recovery from temporary failures of the entropy
  source to RAND_DRBG_generate() using the rand_drbg_restart() function.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
(Merged from https://github.com/openssl/openssl/pull/4328)
2017-10-18 08:39:20 -05:00
..
perl Remove email addresses from source code. 2017-10-13 10:06:59 -04:00
build.info VMS: throw away [.util]shareable_image_wrap.c.in and add replacement scripts 2017-03-14 22:27:17 +01:00
ck_errf.pl Perltidy ck_errf 2017-05-03 14:16:58 -04:00
copy.pl Remove trailing whitespace from some files. 2016-10-10 23:36:21 +01:00
dofile.pl Consolidate the locations where we have our internal perl modules 2017-08-15 11:30:47 +02:00
find-doc-nits Fix util/find-doc-nits to correctly parse function signature typedefs 2017-10-09 14:31:59 +02:00
find-unused-errs Add -f -r flags to find-unused-errs 2017-04-16 07:57:12 -04:00
indent.pro Added support for ESSCertIDv2 2017-05-03 09:04:23 +02:00
libcrypto.num Fix reseeding issues of the public RAND_DRBG 2017-10-18 08:39:20 -05:00
libssl.num Rename SSL_CTX_set_early_cb to SSL_CTX_set_client_hello_cb. 2017-09-08 13:58:59 -05:00
local_shlib.com.in VMS: don't use /DSF, turn off CALL_DEBUG instead 2017-03-15 03:09:57 +01:00
mkbuildinf.pl
mkdef.pl util/mkdef.pl: handle line terminators correctly 2017-08-31 19:20:30 +02:00
mkdir-p.pl
mkerr.pl util/mkerr.pl: avoid getting an annoying warning about negative count 2017-06-27 14:49:06 +02:00
mkrc.pl Fix curly braces on util/mkrc.pl 2017-05-03 14:16:58 -04:00
openssl-format-source Fix some Typos and indents 2017-08-11 10:16:33 -04:00
opensslwrap.sh
private.num Add RFC7919 documentation. 2017-10-12 02:40:30 +01:00
process_docs.pl File::Glob option ':bsd_glob' doesn't work everywhere, replace w/ a wrapper 2017-08-15 11:31:18 +02:00
shlib_wrap.sh.in Remove automatic RPATH - adapt shlib_wrap.sh 2016-10-13 02:21:51 +02:00
su-filter.pl Remove trailing whitespace from some files. 2016-10-10 23:36:21 +01:00
unlocal_shlib.com.in VMS: don't use /DSF, turn off CALL_DEBUG instead 2017-03-15 03:09:57 +01:00