]> granicus.if.org Git - libevent/commitdiff
When we seed from /proc/sys/kernel/random/uuid, count it as success
authorNick Mathewson <nickm@torproject.org>
Mon, 10 Jun 2013 14:33:56 +0000 (10:33 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 10 Jun 2013 14:33:56 +0000 (10:33 -0400)
Found by Joseph Spadavecchia

arc4random.c

index cabc46f4b80a299858cb3e0accb22fd1905a6434..33ddc2c7efcbeda06b5bf3d78a27f75d06a655b5 100644 (file)
@@ -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
@@ -387,6 +388,7 @@ arc4_stir(void)
         */
        for (i = 0; i < 12*256; i++)
                (void)arc4_getbyte();
+
        arc4_count = BYTES_BEFORE_RESEED;
 
        return 0;