From 4447d829de82ac2e26e2a8b3c8e2b248b09f5ac2 Mon Sep 17 00:00:00 2001 From: Joey Yandle Date: Wed, 23 Dec 2015 10:39:09 -0800 Subject: [PATCH] OR flags with CRYPT_SILENT to really make sure no UI pops up Reviewed-by: Matt Caswell Reviewed-by: Tim Hudson Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/1079) --- crypto/rand/rand_win.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/rand/rand_win.c b/crypto/rand/rand_win.c index d4398ec244..812ca9d2c8 100644 --- a/crypto/rand/rand_win.c +++ b/crypto/rand/rand_win.c @@ -68,7 +68,7 @@ int RAND_poll(void) /* poll the CryptoAPI PRNG */ /* The CryptoAPI returns sizeof(buf) bytes of randomness */ - if (CryptAcquireContextW(&hProvider, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) { + if (CryptAcquireContextW(&hProvider, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT | CRYPT_SILENT)) { if (CryptGenRandom(hProvider, sizeof(buf), buf) != 0) { RAND_add(buf, sizeof(buf), sizeof(buf)); } @@ -76,7 +76,7 @@ int RAND_poll(void) } /* poll the Pentium PRG with CryptoAPI */ - if (CryptAcquireContextW(&hProvider, NULL, INTEL_DEF_PROV, PROV_INTEL_SEC, CRYPT_VERIFYCONTEXT)) { + if (CryptAcquireContextW(&hProvider, NULL, INTEL_DEF_PROV, PROV_INTEL_SEC, CRYPT_VERIFYCONTEXT | CRYPT_SILENT)) { if (CryptGenRandom(hProvider, sizeof(buf), buf) != 0) { RAND_add(buf, sizeof(buf), sizeof(buf)); } -- 2.25.1