Skip to content

Commit

Permalink
gnutls: remove gcrypt initialization
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
Rémi Denis-Courmont committed Sep 29, 2012
1 parent c9c3897 commit 969171b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
7 changes: 0 additions & 7 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
4 changes: 2 additions & 2 deletions modules/misc/Modules.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions modules/misc/gnutls.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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 ())
{
Expand Down

0 comments on commit 969171b

Please sign in to comment.