diff --git a/src/rand_urandom_chacha20/rand_urandom_chacha20.c b/src/rand_urandom_chacha20/rand_urandom_chacha20.c index caab249ce..02347ef0d 100755 --- a/src/rand_urandom_chacha20/rand_urandom_chacha20.c +++ b/src/rand_urandom_chacha20/rand_urandom_chacha20.c @@ -65,8 +65,8 @@ static OQS_RAND_urandom_chacha20_ctx *OQS_RAND_urandom_chacha20_ctx_new() { goto err; } #if defined(WINDOWS) - if (!CryptAcquireContext(&hCryptProv, NULL, NULL, PROV_RSA_FULL, 0) || - !CryptGenRandom(hCryptProv, 32, rand_ctx->key)) { + if (!CryptAcquireContext(&hCryptProv, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT) || + !CryptGenRandom(hCryptProv, 32, rand_ctx->key)) { goto err; } #else