From: Joey Yandle Date: Wed, 23 Dec 2015 18:39:09 +0000 (-0800) Subject: OR flags with CRYPT_SILENT to really make sure no UI pops up X-Git-Tag: OpenSSL_1_1_0-pre6~655 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4447d829de82ac2e26e2a8b3c8e2b248b09f5ac2;p=oweals%2Fopenssl.git 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) --- 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)); }