[vlc-commits] gnutls: remove gcrypt initialization

Rémi Denis-Courmont git at videolan.org
Sat Sep 29 17:35:30 CEST 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Sep 27 21:39:11 2012 +0300| [969171b91cbdc214ab8933542ecf9be986a77cd7] | committer: Rémi Denis-Courmont

gnutls: remove gcrypt initialization

There are no (other) reasons for the GnuTLS plugin to link against
libgcrypt. Since nettle has been the default back-end for GnuTLS for
ages, this old code has become more harmful than good.

Besides, this code was not sufficient to really address the thread
safety issues in libgcrypt (since it is also used via other paths).

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=969171b91cbdc214ab8933542ecf9be986a77cd7
---

 configure.ac            |    7 -------
 modules/misc/Modules.am |    4 ++--
 modules/misc/gnutls.c   |    4 ----
 3 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/configure.ac b/configure.ac
index 3b9cb77..a748266 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3799,13 +3799,6 @@ dnl TLS/SSL
 dnl
 AC_ARG_ENABLE(gnutls,
   [  --enable-gnutls         GNU TLS TLS/SSL support (default enabled)])
-
-AS_IF([test "${have_libgcrypt}" != "yes"], [
-  AS_IF([test "${enable_gnutls}" = "yes"], [
-    AC_MSG_ERROR([--enable-gnutls and --disable-libgcrypt are mutually exclusive.])
-  ])
-  enable_gnutls="no"
-])
 AS_IF([test "${enable_gnutls}" != "no"], [
   PKG_CHECK_MODULES(GNUTLS, [gnutls >= 2.6.6], [
     VLC_ADD_PLUGIN([gnutls])
diff --git a/modules/misc/Modules.am b/modules/misc/Modules.am
index 03dad06..aa92fa8 100644
--- a/modules/misc/Modules.am
+++ b/modules/misc/Modules.am
@@ -13,8 +13,8 @@ libexport_plugin_la_LIBADD = $(AM_LIBADD)
 libvlc_LTLIBRARIES += libexport_plugin.la
 
 libgnutls_plugin_la_SOURCES = gnutls.c dhparams.h
-libgnutls_plugin_la_CFLAGS = $(AM_CFLAGS) $(GNUTLS_CFLAGS) $(GCRYPT_CFLAGS)
-libgnutls_plugin_la_LIBADD = $(AM_LIBADD) $(GNUTLS_LIBS) $(GCRYPT_LIBS)
+libgnutls_plugin_la_CFLAGS = $(AM_CFLAGS) $(GNUTLS_CFLAGS)
+libgnutls_plugin_la_LIBADD = $(AM_LIBADD) $(GNUTLS_LIBS)
 if HAVE_WIN32
 libgnutls_plugin_la_LIBADD += -lcrypt32 $(SOCKET_LIBS)
 endif
diff --git a/modules/misc/gnutls.c b/modules/misc/gnutls.c
index 13d2865..12d28b9 100644
--- a/modules/misc/gnutls.c
+++ b/modules/misc/gnutls.c
@@ -47,11 +47,9 @@
 #include <vlc_fs.h>
 #include <vlc_block.h>
 
-#include <gcrypt.h>
 #include <gnutls/gnutls.h>
 #include <gnutls/x509.h>
 
-#include <vlc_gcrypt.h>
 #include "dhparams.h"
 
 #include <assert.h>
@@ -113,8 +111,6 @@ static int gnutls_Init (vlc_object_t *p_this)
 {
     int ret = VLC_EGENERIC;
 
-    vlc_gcrypt_init (); /* GnuTLS depends on gcrypt */
-
     vlc_mutex_lock (&gnutls_mutex);
     if (gnutls_global_init ())
     {



More information about the vlc-commits mailing list