diff options
Diffstat (limited to 'src/crypto/random.c')
-rw-r--r-- | src/crypto/random.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/crypto/random.c b/src/crypto/random.c index d7fcb7e65..6a9f63c12 100644 --- a/src/crypto/random.c +++ b/src/crypto/random.c @@ -45,7 +45,7 @@ static void generate_system_random_bytes(size_t n, void *result); static void generate_system_random_bytes(size_t n, void *result) { HCRYPTPROV prov; -#define must_succeed(x) do if (!(x)) assert(0); while (0) +#define must_succeed(x) do if (!(x)) abort(); while (0) must_succeed(CryptAcquireContext(&prov, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT | CRYPT_SILENT)); must_succeed(CryptGenRandom(prov, (DWORD)n, result)); must_succeed(CryptReleaseContext(prov, 0)); @@ -113,7 +113,7 @@ INITIALIZER(init_random) { #endif } -void generate_random_bytes(size_t n, void *result) { +void generate_random_bytes_not_thread_safe(size_t n, void *result) { #if !defined(NDEBUG) assert(curstate == 1); curstate = 2; |