From: Wouter Wijngaards Date: Thu, 20 Nov 2014 12:44:00 +0000 (+0000) Subject: - fix compat/getentropy_win.c check if CryptGenRandom works and no X-Git-Tag: release-1.5.1rc1~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02b6373a7ee91f4919513320d98ec873499d6ef7;p=thirdparty%2Funbound.git - 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 --- diff --git a/compat/getentropy_win.c b/compat/getentropy_win.c index 9dc55891e..71fb955e7 100644 --- a/compat/getentropy_win.c +++ b/compat/getentropy_win.c @@ -41,9 +41,9 @@ getentropy(void *buf, size_t len) } if (CryptAcquireContext(&provider, NULL, NULL, PROV_RSA_FULL, - CRYPT_VERIFYCONTEXT) != 0) + CRYPT_VERIFYCONTEXT) == 0) goto fail; - if (CryptGenRandom(provider, len, buf) != 0) { + if (CryptGenRandom(provider, len, buf) == 0) { CryptReleaseContext(provider, 0); goto fail; } diff --git a/doc/Changelog b/doc/Changelog index b1fca5fd5..4fdb89813 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -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 - Fix cdflag dns64 processing.