mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
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:
parent
78edd804ff
commit
c4757e0705
@ -1620,14 +1620,14 @@ crypto_seed_rng(void)
|
||||
if (!provider_set) {
|
||||
if (!CryptAcquireContext(&provider, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
provider_set = 1;
|
||||
}
|
||||
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;
|
||||
}
|
||||
RAND_seed(buf, sizeof(buf));
|
||||
|
Loading…
Reference in New Issue
Block a user