projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0dd0cbf
)
Don't use buffered fread() to read from DEVRANDOM,
author
Bodo Möller
<bodo@openssl.org>
Thu, 24 Feb 2000 20:24:45 +0000
(20:24 +0000)
committer
Bodo Möller
<bodo@openssl.org>
Thu, 24 Feb 2000 20:24:45 +0000
(20:24 +0000)
because this will drain the entropy pool.
crypto/rand/md_rand.c
patch
|
blob
|
history
diff --git
a/crypto/rand/md_rand.c
b/crypto/rand/md_rand.c
index 79438611f284abd48e54b000a54afb6532d3f3ef..ce901759db14bd376ce604cc9a2ac74e67b6138b 100644
(file)
--- a/
crypto/rand/md_rand.c
+++ b/
crypto/rand/md_rand.c
@@
-327,6
+327,7
@@
static void ssleay_rand_initialize(void)
unsigned char tmpbuf[ENTROPY_NEEDED];
int n;
+ setvbuf(fh, NULL, _IONBF, 0);
n=fread((unsigned char *)tmpbuf,1,ENTROPY_NEEDED,fh);
fclose(fh);
RAND_add(tmpbuf,sizeof tmpbuf,n);