LOG_ERR is for when we know we're going to exit. use LOG_WARN in other

cases.


svn:r5220
This commit is contained in:
Roger Dingledine 2005-10-07 19:53:57 +00:00
parent 78edd804ff
commit c4757e0705

View File

@ -1620,14 +1620,14 @@ crypto_seed_rng(void)
if (!provider_set) { if (!provider_set) {
if (!CryptAcquireContext(&provider, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) { if (!CryptAcquireContext(&provider, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) {
if (GetLastError() != NTE_BAD_KEYSET) { if (GetLastError() != NTE_BAD_KEYSET) {
log_fn(LOG_ERR,"Can't get CryptoAPI provider [1]"); log_fn(LOG_WARN, "Can't get CryptoAPI provider [1]");
return rand_poll_status ? 0 : -1; return rand_poll_status ? 0 : -1;
} }
} }
provider_set = 1; provider_set = 1;
} }
if (!CryptGenRandom(provider, sizeof(buf), buf)) { if (!CryptGenRandom(provider, sizeof(buf), buf)) {
log_fn(LOG_ERR,"Can't get entropy from CryptoAPI."); log_fn(LOG_WARN, "Can't get entropy from CryptoAPI.");
return rand_poll_status ? 0 : -1; return rand_poll_status ? 0 : -1;
} }
RAND_seed(buf, sizeof(buf)); RAND_seed(buf, sizeof(buf));