Automatically disable GnuTLS fallback

Disable GnuTLS fallback if sufficient glibc version detected. Previously
GnuTLS fallback was used regardless of getrandom() availability in
glibc. Fix this by automatically disabling it when not needed. This does
not affect the ability to manually disable it unconditionally.

Change-Id: Ibe2117afc050261668a4d5a590044aabcd08aefe
This commit is contained in:
Max 2018-11-09 13:13:45 +01:00 committed by Harald Welte
parent 0187c3ae37
commit 42e567c5a9
1 changed files with 1 additions and 0 deletions

View File

@ -103,6 +103,7 @@
#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2,25)
#pragma message ("glibc " OSMO_STRINGIFY_VAL(__GLIBC__) "." OSMO_STRINGIFY_VAL(__GLIBC_MINOR__) " random detected")
#include <sys/random.h>
#undef USE_GNUTLS
#elif HAVE_DECL_SYS_GETRANDOM
#include <sys/syscall.h>
#ifndef GRND_NONBLOCK