mirror of https://github.com/omar-polo/gmid.git
fix previous; check for getentropy only when arc4random is missing
on macos we have the situation where we have arc4random available but no getentropy().
This commit is contained in:
parent
21b4a5163c
commit
74c6900c91
|
@ -41,13 +41,11 @@
|
||||||
|
|
||||||
int _ssh_compat_getentropy(void *, size_t);
|
int _ssh_compat_getentropy(void *, size_t);
|
||||||
|
|
||||||
#if 0
|
|
||||||
static int
|
static int
|
||||||
seed_from_prngd(unsigned char *buf, size_t bytes)
|
seed_from_prngd(unsigned char *buf, size_t bytes)
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
int
|
int
|
||||||
_ssh_compat_getentropy(void *s, size_t len)
|
_ssh_compat_getentropy(void *s, size_t len)
|
||||||
|
|
|
@ -287,7 +287,6 @@ runtest explicit_bzero EXPLICIT_BZERO || true
|
||||||
runtest freezero FREEZERO || true
|
runtest freezero FREEZERO || true
|
||||||
runtest getdtablecount GETDTABLECOUNT || true
|
runtest getdtablecount GETDTABLECOUNT || true
|
||||||
runtest getdtablesize GETDTABLESIZE || true
|
runtest getdtablesize GETDTABLESIZE || true
|
||||||
runtest getentropy GETENTROPY || true
|
|
||||||
runtest getprogname GETPROGNAME || true
|
runtest getprogname GETPROGNAME || true
|
||||||
runtest imsg IMSG "" -lutil libimsg || true
|
runtest imsg IMSG "" -lutil libimsg || true
|
||||||
runtest libevent LIBEVENT "" -levent libevent_core|| true
|
runtest libevent LIBEVENT "" -levent libevent_core|| true
|
||||||
|
@ -313,6 +312,10 @@ if [ ${HAVE_ARC4RANDOM} -eq 1 -a ${HAVE_ARC4RANDOM_BUF} -eq 0 ]; then
|
||||||
COMPATS="compat/arc4random.c ${COMPATS}"
|
COMPATS="compat/arc4random.c ${COMPATS}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ${HAVE_ARC4RANDOM} -eq 0 ]; then
|
||||||
|
runtest getentropy GETENTROPY || true
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ${HAVE_ARC4RANDOM} -eq 0 -a ${HAVE_GETENTROPY} -eq 1 ]; then
|
if [ ${HAVE_ARC4RANDOM} -eq 0 -a ${HAVE_GETENTROPY} -eq 1 ]; then
|
||||||
COMPATS="compat/getentropy.c ${COMPATS}"
|
COMPATS="compat/getentropy.c ${COMPATS}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue