]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
lib/global: don't call now-noop _gnutls_rnd_check
authorAlexander Sosedkin <asosedkin@redhat.com>
Mon, 8 Mar 2021 10:54:16 +0000 (11:54 +0100)
committerAlexander Sosedkin <asosedkin@redhat.com>
Mon, 8 Mar 2021 14:20:39 +0000 (15:20 +0100)
Signed-off-by: Alexander Sosedkin <asosedkin@redhat.com>
lib/global.c
lib/random.h

index 9a65d114cc8c68f165c307514e406744343a3e89..b41e20a9a09979588591939439a21bea8856750c 100644 (file)
@@ -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;
        }
index 62b4dc2a0756b42957bbbaf365654482466303e1..0d76738971b45f5fef284e0bd9bf32fc3aa6c204 100644 (file)
@@ -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 */