diff options
author | ache <ache@FreeBSD.org> | 2008-07-21 10:31:28 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2008-07-21 10:31:28 +0000 |
commit | 4497a308d1b105200afe2b2fd35e6ebfba8b5e0f (patch) | |
tree | 52f7ee1849b874b0900fcdf14d2031949506882e /lib | |
parent | 06823fc47f777ad5ada06b0f782243a07d9edebc (diff) | |
download | FreeBSD-src-4497a308d1b105200afe2b2fd35e6ebfba8b5e0f.zip FreeBSD-src-4497a308d1b105200afe2b2fd35e6ebfba8b5e0f.tar.gz |
1) Set stired flag after forced initialization.
2) Increase arc4_count to the limit OpenBSD use.
Submitted by: Thorsten Glaser <tg@mirbsd.de> (1)
Obtained from: OpenBSD (2)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/gen/arc4random.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/gen/arc4random.c b/lib/libc/gen/arc4random.c index 21dd09f..c9f1e7f 100644 --- a/lib/libc/gen/arc4random.c +++ b/lib/libc/gen/arc4random.c @@ -124,7 +124,7 @@ arc4_stir(struct arc4_stream *as) */ for (n = 0; n < 1024; n++) (void) arc4_getbyte(as); - arc4_count = 400000; + arc4_count = 1600000; } static inline u_int8_t @@ -179,6 +179,7 @@ arc4random_stir(void) THREAD_LOCK(); arc4_check_init(); arc4_stir(&rs); + rs_stired = 1; THREAD_UNLOCK(); } |