]> code.delx.au - gnu-emacs/commit
Initialize GnuTLS before calling gnutls_rnd
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 18 Jan 2016 01:16:12 +0000 (17:16 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 18 Jan 2016 01:17:01 +0000 (17:17 -0800)
commit130d512045aa376333b664d58c501b3884187592
treefe7b2fa10229b204eeb16aa34d0191864caf9e70
parent0f3ea5e172e584875fa5808322af8a7c75503f7b
Initialize GnuTLS before calling gnutls_rnd

* src/gnutls.c (emacs_gnutls_global_init): Now extern.
Don’t set gnutls_global_initialized if gnutls_global_init fails.
* src/sysdep.c: Include "gnutls.h", and <gnutls/crypto.h>
if 2.12 or later, which has gnutls_rnd.
(emacs_gnutls_global_init, gnutls_rnd): New fallback
placeholder macros if before 2.12.
(init_random): Initialize gnutls globals before trying to
use gnutls_rnd.
src/gnutls.c
src/gnutls.h
src/sysdep.c