summaryrefslogtreecommitdiff
path: root/src/emacs-module.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-01-17 12:12:08 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2016-01-17 12:13:49 -0800
commit05e8148a24ebe51fbe758dd16265e8fb81f85953 (patch)
tree447c9fa28f9b8b3e8380f4f1c039b6cf76ce5750 /src/emacs-module.c
parenta0d5b7ae3bb014bb0b1c205d123c597df0e76411 (diff)
downloademacs-05e8148a24ebe51fbe758dd16265e8fb81f85953.tar.gz
emacs-05e8148a24ebe51fbe758dd16265e8fb81f85953.tar.bz2
emacs-05e8148a24ebe51fbe758dd16265e8fb81f85953.zip
Prefer GnuTLS when acquiring random seed
This attempts to improve on the fix for Bug#22202. * configure.ac (HAVE_DEV_URANDOM): Remove. Check /dev/urandom existence at run time, not at build time, since the device could exist in the former but not the latter. * src/sysdep.c [HAVE_GNUTLS]: Include gnutls/gnutls.h. (gnutls_rnd) [GNUTLS_VERSION_NUMBER < 0x020c00]: New fallback macro. (random_seed): New typedef. (set_random_seed): New static function. (seed_random): Use them. (init_random): Use random_seed instead of uintmax_t, so as to not consume more entropy than needed. Prefer gnutls_rnd if it works; this avoids a redundant open of /dev/urandom on GNU/Linux with modern GnuTLS.
Diffstat (limited to 'src/emacs-module.c')
0 files changed, 0 insertions, 0 deletions