|
|
@@ -141,17 +141,14 @@ static void rand_get_seed(struct rand_thread_state *state, |
|
|
|
* generator test” which causes the program to randomly abort. Hopefully the |
|
|
|
* rate of failure is small enough not to be a problem in practice. */ |
|
|
|
if (CRYPTO_memcmp(state->last_block, entropy, CRNGT_BLOCK_SIZE) == 0) { |
|
|
|
for (;;) { |
|
|
|
exit(1); |
|
|
|
abort(); |
|
|
|
} |
|
|
|
BORINGSSL_FIPS_abort(); |
|
|
|
} |
|
|
|
|
|
|
|
for (size_t i = CRNGT_BLOCK_SIZE; i < sizeof(entropy); |
|
|
|
i += CRNGT_BLOCK_SIZE) { |
|
|
|
if (CRYPTO_memcmp(entropy + i - CRNGT_BLOCK_SIZE, entropy + i, |
|
|
|
CRNGT_BLOCK_SIZE) == 0) { |
|
|
|
abort(); |
|
|
|
BORINGSSL_FIPS_abort(); |
|
|
|
} |
|
|
|
} |
|
|
|
OPENSSL_memcpy(state->last_block, |
|
|
|