--- fips-1.0/@fips.c 2007-11-29 07:09:47.000000000 -0500 +++ fips-1.0/fips.c 2007-11-29 07:10:37.000000000 -0500 @@ -265,18 +265,16 @@ goto end; } - /* automagically seed PRNG if not already seeded */ - if(!FIPS_rand_seeded()) + /* Always automagically seed PRNG */ + FIPS_rand_method()->cleanup(); + if(RAND_bytes(buf,sizeof buf) <= 0) { - if(RAND_bytes(buf,sizeof buf) <= 0) - { - fips_selftest_fail = 1; - ret = 0; - goto end; - } - FIPS_set_prng_key(buf,buf+8); - FIPS_rand_seed(buf+16,8); + fips_selftest_fail = 1; + ret = 0; + goto end; } + FIPS_set_prng_key(buf,buf+8); + FIPS_rand_seed(buf+16,8); /* now switch into FIPS mode */ fips_set_rand_check(FIPS_rand_method());