]> git.eshelyaron.com Git - emacs.git/commit
Use getrandom syscall for nonces
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 27 Jun 2020 20:02:24 +0000 (13:02 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 27 Jun 2020 20:03:49 +0000 (13:03 -0700)
commit5ce5cf643840cd6efd25d987bc5b6f12478c50a6
tree48a0f14e8162ee889475f54a21227356885cd330
parent118c07e02e939c9f52688091509d4bff2a897032
Use getrandom syscall for nonces

* admin/merge-gnulib (GNULIB_MODULES): Add getrandom.
* doc/lispref/text.texi (Format of GnuTLS Cryptography Inputs):
Don’t say that iv-auto uses GNUTLS_RND_NONCE.  Also, don’t say
that it returns the IV’s actual value, as it never has done that.
* src/fns.c, src/sysdep.c: Include sys/random.h, for getrandom.
* src/fns.c (Fsecure_hash_algorithms): Use getrandom so that this
function does not depend on HAVE_GNUTLS3.
* src/sysdep.c: Do not include <gnutls/crypto.h>.
(random_seed) [HAVE_LRAND48]: Can be long int now.
(init_random) [!WINDOWSNT]: Use getrandom syscall instead
of opening /dev/urandom, as this works even on GNU/Linux
hosts that lack /dev/urandom.  Don’t bother with gnutls_rnd
as it’s not needed now that we have getrandom.
admin/merge-gnulib
doc/lispref/text.texi
src/fns.c
src/sysdep.c