summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Sosedkin <asosedkin@redhat.com>2021-03-08 11:54:16 +0100
committerAlexander Sosedkin <asosedkin@redhat.com>2021-03-08 15:20:39 +0100
commit56bcfa474b800a1b84288a59605867e5c62f33f8 (patch)
tree1adce4c8742be2093588fb64ddd6ebc2127f1b34
parentb20bd42bc2f07b58f912c8899f7eb5bf2340fc4d (diff)
downloadgnutls-56bcfa474b800a1b84288a59605867e5c62f33f8.tar.gz
lib/global: don't call now-noop _gnutls_rnd_check
Signed-off-by: Alexander Sosedkin <asosedkin@redhat.com>
-rw-r--r--lib/global.c10
-rw-r--r--lib/random.h5
2 files changed, 0 insertions, 15 deletions
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 */