diff options
| author | Xin LI <delphij@FreeBSD.org> | 2020-04-13 08:42:13 +0000 |
|---|---|---|
| committer | Xin LI <delphij@FreeBSD.org> | 2020-04-13 08:42:13 +0000 |
| commit | d25a14305552adad86417c87d09e3ed791fbe835 (patch) | |
| tree | f26fad9b1d3d52493950bb0c3fbbfe8f3755af54 /lib/libc/gen | |
| parent | 3133002560574522aa6200cff79c05782b92fc8a (diff) | |
Notes
Diffstat (limited to 'lib/libc/gen')
| -rw-r--r-- | lib/libc/gen/arc4random.3 | 8 | ||||
| -rw-r--r-- | lib/libc/gen/arc4random.c | 4 | ||||
| -rw-r--r-- | lib/libc/gen/arc4random_uniform.c | 4 |
3 files changed, 9 insertions, 7 deletions
diff --git a/lib/libc/gen/arc4random.3 b/lib/libc/gen/arc4random.3 index 00fd880861970..8082b70ea1c9a 100644 --- a/lib/libc/gen/arc4random.3 +++ b/lib/libc/gen/arc4random.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: arc4random.3,v 1.35 2014/11/25 16:45:24 millert Exp $ +.\" $OpenBSD: arc4random.3,v 1.37 2019/09/29 16:30:35 jmc Exp $ .\" .\" Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de> .\" All rights reserved. @@ -31,7 +31,7 @@ .\" Manual page, using -mandoc macros .\" $FreeBSD$ .\" -.Dd April 10, 2020 +.Dd April 13, 2020 .Dt ARC4RANDOM 3 .Os .Sh NAME @@ -71,7 +71,9 @@ On each call, a cryptographic pseudo-random number generator is used to generate a new result. One data pool is used for all consumers in a process, so that consumption under program flow can act as additional stirring. -The subsystem is re-seeded from the kernel random number subsystem using +The subsystem is re-seeded from the kernel +.Xr random 4 +subsystem using .Xr getentropy 2 on a regular basis, and also upon .Xr fork 2 . diff --git a/lib/libc/gen/arc4random.c b/lib/libc/gen/arc4random.c index 86e16e3aa8570..bbcfee21d0022 100644 --- a/lib/libc/gen/arc4random.c +++ b/lib/libc/gen/arc4random.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arc4random.c,v 1.54 2015/09/13 08:31:47 guenther Exp $ */ +/* $OpenBSD: arc4random.c,v 1.55 2019/03/24 17:56:54 deraadt Exp $ */ /* * Copyright (c) 1996, David Mazieres <dm@uun.org> @@ -84,7 +84,7 @@ _rs_init(u_char *buf, size_t n) if (rs == NULL) { if (_rs_allocate(&rs, &rsx) == -1) - abort(); + _exit(1); } chacha_keysetup(&rsx->rs_chacha, buf, KEYSZ * 8); diff --git a/lib/libc/gen/arc4random_uniform.c b/lib/libc/gen/arc4random_uniform.c index 0136c66e32893..5f5e190790b05 100644 --- a/lib/libc/gen/arc4random_uniform.c +++ b/lib/libc/gen/arc4random_uniform.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arc4random_uniform.c,v 1.2 2015/09/13 08:31:47 guenther Exp $ */ +/* $OpenBSD: arc4random_uniform.c,v 1.3 2019/01/20 02:59:07 bcook Exp $ */ /* * Copyright (c) 2008, Damien Miller <djm@openbsd.org> @@ -18,7 +18,7 @@ * $FreeBSD$ */ -#include <sys/types.h> +#include <stdint.h> #include <stdlib.h> /* |
