diff options
author | Darren Tucker <dtucker@dtucker.net> | 2022-09-02 06:28:14 +0200 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2022-09-02 06:30:38 +0200 |
commit | ce39e7d8b70c4726defde5d3bc4cb7d40d131153 (patch) | |
tree | b7fe64428da3e28d77b3e4d7f995066bbbca4414 /openbsd-compat/openbsd-compat.h | |
parent | Move OPENBSD ORIGINAL marker. (diff) | |
download | openssh-ce39e7d8b70c4726defde5d3bc4cb7d40d131153.tar.xz openssh-ce39e7d8b70c4726defde5d3bc4cb7d40d131153.zip |
Resync arc4random with OpenBSD.
This brings us up to current, including djm's random-reseeding change,
as prompted by logan at cyberstorm.mu in bz#3467. It brings the
platform-specific hooks from LibreSSL Portable, simplified to match our
use case. ok djm@.
Diffstat (limited to 'openbsd-compat/openbsd-compat.h')
-rw-r--r-- | openbsd-compat/openbsd-compat.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h index bbf89825b..4af207cdd 100644 --- a/openbsd-compat/openbsd-compat.h +++ b/openbsd-compat/openbsd-compat.h @@ -218,19 +218,18 @@ int writev(int, struct iovec *, int); int getpeereid(int , uid_t *, gid_t *); #endif -#ifdef HAVE_ARC4RANDOM -# ifndef HAVE_ARC4RANDOM_STIR -# define arc4random_stir() -# endif -#else -unsigned int arc4random(void); -void arc4random_stir(void); +#ifndef HAVE_ARC4RANDOM +uint32_t arc4random(void); #endif /* !HAVE_ARC4RANDOM */ #ifndef HAVE_ARC4RANDOM_BUF void arc4random_buf(void *, size_t); #endif +#ifndef HAVE_ARC4RANDOM_STIR +# define arc4random_stir() +#endif + #ifndef HAVE_ARC4RANDOM_UNIFORM uint32_t arc4random_uniform(uint32_t); #endif |