diff options
-rw-r--r-- | lib/libcrypto/crypto/getentropy_win.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libcrypto/crypto/getentropy_win.c b/lib/libcrypto/crypto/getentropy_win.c index 1263ba4ca2f..da048ae157d 100644 --- a/lib/libcrypto/crypto/getentropy_win.c +++ b/lib/libcrypto/crypto/getentropy_win.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getentropy_win.c,v 1.2 2014/07/13 13:03:09 deraadt Exp $ */ +/* $OpenBSD: getentropy_win.c,v 1.3 2014/11/11 13:54:33 bcook Exp $ */ /* * Copyright (c) 2014, Theo de Raadt <deraadt@openbsd.org> @@ -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; } |