From: Alexander Sosedkin Date: Mon, 8 Mar 2021 10:54:16 +0000 (+0100) Subject: lib/global: don't call now-noop _gnutls_rnd_check X-Git-Tag: 3.7.2~36^2~1 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=56bcfa474b800a1b84288a59605867e5c62f33f8;p=thirdparty%2Fgnutls.git lib/global: don't call now-noop _gnutls_rnd_check Signed-off-by: Alexander Sosedkin --- diff --git a/lib/global.c b/lib/global.c index 9a65d114cc..b41e20a9a0 100644 --- a/lib/global.c +++ b/lib/global.c @@ -236,16 +236,6 @@ static int _gnutls_global_init(unsigned constructor) _gnutls_init++; if (_gnutls_init > 1) { - if (_gnutls_init == 2 && _gnutls_init_ret == 0) { - /* some applications may close the urandom fd - * before calling gnutls_global_init(). in that - * case reopen it */ - ret = _gnutls_rnd_check(); - if (ret < 0) { - gnutls_assert(); - goto out; - } - } ret = _gnutls_init_ret; goto out; } diff --git a/lib/random.h b/lib/random.h index 62b4dc2a07..0d76738971 100644 --- a/lib/random.h +++ b/lib/random.h @@ -33,9 +33,4 @@ extern gnutls_crypto_rnd_st _gnutls_rnd_ops; void _gnutls_rnd_deinit(void); int _gnutls_rnd_preinit(void); -inline static int _gnutls_rnd_check(void) -{ - return _rnd_system_entropy_check(); -} - #endif /* GNUTLS_LIB_RANDOM_H */