From 8fdd9c31b944e1be9fe401e351336a70d7171bd6 Mon Sep 17 00:00:00 2001 From: Michael Graff Date: Mon, 12 Jun 2000 18:28:25 +0000 Subject: [PATCH] allow blocking when priming the pseudorandom generator --- lib/isc/unix/entropy.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/isc/unix/entropy.c b/lib/isc/unix/entropy.c index a5d973e94b..c2ae34b617 100644 --- a/lib/isc/unix/entropy.c +++ b/lib/isc/unix/entropy.c @@ -545,7 +545,10 @@ isc_entropy_getdata(isc_entropy_t *ent, void *data, unsigned int length, * If we've extracted half our pool size in bits * since the last refresh, try to refresh here. */ - fillpool(ent, 0, ISC_FALSE); + if (ent->initialized < 20) + fillpool(ent, 20, blocking); + else + fillpool(ent, 0, ISC_FALSE); /* * If we've not initialized with enough good random