rng: split initialization in preinit and init
This makes gnutls to initialize its random generator on the first call to gnutls_rnd(). That prevents blocking due to getrandom() on a constructor; that change allows to use gnutls-linked applications even in early boot in systems where getrandom() blocks waiting for entropy.
1 parent d10397ab
Showing with 95 additions and 71 deletions
- lib/nettle/rnd-getentropy.c → lib/nettle/sysrnd-getentropy.c
- lib/nettle/rnd-linux.c → lib/nettle/sysrnd-linux.c
- lib/nettle/rnd-windows.c → lib/nettle/sysrnd-windows.c