mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- fix compat/getentropy_win.c check if CryptGenRandom works and no
immediate exit on windows. git-svn-id: file:///svn/unbound/trunk@3276 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
67a3c4933c
commit
02b6373a7e
2 changed files with 6 additions and 2 deletions
|
|
@ -41,9 +41,9 @@ getentropy(void *buf, size_t len)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CryptAcquireContext(&provider, NULL, NULL, PROV_RSA_FULL,
|
if (CryptAcquireContext(&provider, NULL, NULL, PROV_RSA_FULL,
|
||||||
CRYPT_VERIFYCONTEXT) != 0)
|
CRYPT_VERIFYCONTEXT) == 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
if (CryptGenRandom(provider, len, buf) != 0) {
|
if (CryptGenRandom(provider, len, buf) == 0) {
|
||||||
CryptReleaseContext(provider, 0);
|
CryptReleaseContext(provider, 0);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
|
20 November 2014: Wouter
|
||||||
|
- fix compat/getentropy_win.c check if CryptGenRandom works and no
|
||||||
|
immediate exit on windows.
|
||||||
|
|
||||||
19 November 2014: Wouter
|
19 November 2014: Wouter
|
||||||
- Fix cdflag dns64 processing.
|
- Fix cdflag dns64 processing.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue