From: Dongsheng Song <dongsheng.s...@gmail.com> Please see http://msdn.microsoft.com/en-us/library/windows/desktop/aa379886(v=vs.85).aspx and http://msdn.microsoft.com/en-us/library/windows/desktop/aa379942%28v=vs.85%29.aspx for more details. --- src/lib/libcrypto/crypto/getentropy_win.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/lib/libcrypto/crypto/getentropy_win.c b/src/lib/libcrypto/crypto/getentropy_win.c index f65e2b3..91e99c1 100644 --- a/src/lib/libcrypto/crypto/getentropy_win.c +++ b/src/lib/libcrypto/crypto/getentropy_win.c @@ -1,7 +1,7 @@ /* $OpenBSD: getentropy_win.c,v 1.1 2014/07/12 20:54:49 wouter Exp $ */ /* - * Copyright (c) 2014, Theo de Raadt <dera...@openbsd.org> + * Copyright (c) 2014, Theo de Raadt <dera...@openbsd.org> * Copyright (c) 2014, Bob Beck <b...@obtuse.com> * * Permission to use, copy, modify, and distribute this software for any @@ -44,9 +44,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; } -- 2.1.2