Skip to content

Commit

Permalink
When we seed from /proc/sys/kernel/random/uuid, count it as success
Browse files Browse the repository at this point in the history
Found by Joseph Spadavecchia
  • Loading branch information
nmathewson committed Jun 10, 2013
1 parent e826f19 commit e35b540
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arc4random.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ arc4_seed_proc_sys_kernel_random_uuid(void)
}
memset(entropy, 0, sizeof(entropy));
memset(buf, 0, sizeof(buf));
arc4_seeded_ok = 1;
return 0;
}
#endif
Expand Down Expand Up @@ -387,6 +388,7 @@ arc4_stir(void)
*/
for (i = 0; i < 12*256; i++)
(void)arc4_getbyte();

arc4_count = BYTES_BEFORE_RESEED;

return 0;
Expand Down

0 comments on commit e35b540

Please sign in to comment.