- 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:
Wouter Wijngaards 2014-11-20 12:44:00 +00:00
parent 67a3c4933c
commit 02b6373a7e
2 changed files with 6 additions and 2 deletions

View file

@ -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;
} }

View file

@ -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.