diff options
author | Cy Schubert <cy@FreeBSD.org> | 2019-12-28 05:27:06 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2019-12-28 05:27:06 +0000 |
commit | e2fe726866d062155f6b1aae749375475ef19191 (patch) | |
tree | fe6b00611d5c987d2c12c32063891ae19295ffeb /compat/getentropy_win.c | |
parent | 366b94c4a9552acfb560d3234aea0955ebc1eb8e (diff) |
Diffstat (limited to 'compat/getentropy_win.c')
-rw-r--r-- | compat/getentropy_win.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compat/getentropy_win.c b/compat/getentropy_win.c index 71fb955e7f905..2abeb27bc6247 100644 --- a/compat/getentropy_win.c +++ b/compat/getentropy_win.c @@ -1,4 +1,4 @@ -/* $OpenBSD$ */ +/* $OpenBSD: getentropy_win.c,v 1.5 2016/08/07 03:27:21 tb Exp $ */ /* * Copyright (c) 2014, Theo de Raadt <deraadt@openbsd.org> @@ -15,6 +15,9 @@ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Emulation of getentropy(2) as documented at: + * http://man.openbsd.org/getentropy.2 */ #include <windows.h> @@ -37,7 +40,7 @@ getentropy(void *buf, size_t len) if (len > 256) { errno = EIO; - return -1; + return (-1); } if (CryptAcquireContext(&provider, NULL, NULL, PROV_RSA_FULL, |