aboutsummaryrefslogtreecommitdiffstats
path: root/test/ssltest_old.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2017-08-03 09:23:28 -0400
committerRich Salz <rsalz@openssl.org>2017-08-03 09:23:28 -0400
commit75e2c877650444fb829547bdb58d46eb1297bc1a (patch)
tree67ad6280bccdca4ae95cc269b1994ea4c1557aa7 /test/ssltest_old.c
parent67dc995eaf538ea309c6292a1a5073465201f55b (diff)
downloadopenssl-75e2c877650444fb829547bdb58d46eb1297bc1a.tar.gz
Switch from ossl_rand to DRBG rand
If RAND_add wraps around, XOR with existing. Add test to drbgtest that does the wrap-around. Re-order seeding and stop after first success. Add RAND_poll_ex() Use the DF and therefore lower RANDOMNESS_NEEDED. Also, for child DRBG's, mix in the address as the personalization bits. Centralize the entropy callbacks, from drbg_lib to rand_lib. (Conceptually, entropy is part of the enclosing application.) Thanks to Dr. Matthias St Pierre for the suggestion. Various code cleanups: -Make state an enum; inline RANDerr calls. -Add RAND_POLL_RETRIES (thanks Pauli for the idea) -Remove most RAND_seed calls from rest of library -Rename DRBG_CTX to RAND_DRBG, etc. -Move some code from drbg_lib to drbg_rand; drbg_lib is now only the implementation of NIST DRBG. -Remove blocklength Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/4019)
Diffstat (limited to 'test/ssltest_old.c')
-rw-r--r--test/ssltest_old.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/test/ssltest_old.c b/test/ssltest_old.c
index 7cfddd2ace..37e980d38f 100644
--- a/test/ssltest_old.c
+++ b/test/ssltest_old.c
@@ -613,8 +613,6 @@ static int custom_ext_3_srv_add_cb(SSL *s, unsigned int ext_type,
static char *cipher = NULL;
static int verbose = 0;
static int debug = 0;
-static const char rnd_seed[] =
- "string to make the random number generator think it has randomness";
int doit_localhost(SSL *s_ssl, SSL *c_ssl, int family,
long bytes, clock_t *s_time, clock_t *c_time);
@@ -928,8 +926,6 @@ int main(int argc, char *argv[])
CRYPTO_set_mem_debug(1);
CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
- RAND_seed(rnd_seed, sizeof rnd_seed);
-
bio_stdout = BIO_new_fp(stdout, BIO_NOCLOSE | BIO_FP_TEXT);
s_cctx = SSL_CONF_CTX_new();