summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-10-09 10:57:19 -0400
committerNick Mathewson <nickm@torproject.org>2014-10-09 10:57:19 -0400
commit90bce702ba61c3339e55cfedb4cc6f355b3049c7 (patch)
treee77b8995eee6e85dfa8e4cede4e1fc3c7fdd3455 /src
parente5f9f287ced36e18241e250d4b63603b9c4f006f (diff)
parent42350968a9d7afb1259dfdfb4d4ec5f9aa806711 (diff)
downloadtor-90bce702ba61c3339e55cfedb4cc6f355b3049c7.tar.gz
tor-90bce702ba61c3339e55cfedb4cc6f355b3049c7.zip
Merge remote-tracking branch 'public/bug10816'
Diffstat (limited to 'src')
-rw-r--r--src/common/crypto.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c
index fa91f6dd82..f128336e50 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -2454,10 +2454,8 @@ crypto_strongest_rand(uint8_t *out, size_t out_len)
if (!provider_set) {
if (!CryptAcquireContext(&provider, NULL, NULL, PROV_RSA_FULL,
CRYPT_VERIFYCONTEXT)) {
- if ((unsigned long)GetLastError() != (unsigned long)NTE_BAD_KEYSET) {
- log_warn(LD_CRYPTO, "Can't get CryptoAPI provider [1]");
- return -1;
- }
+ log_warn(LD_CRYPTO, "Can't get CryptoAPI provider [1]");
+ return -1;
}
provider_set = 1;
}