Commit 969171b9 authored by Rémi Denis-Courmont's avatar 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).
parent c9c38976
...@@ -3799,13 +3799,6 @@ dnl TLS/SSL ...@@ -3799,13 +3799,6 @@ dnl TLS/SSL
dnl dnl
AC_ARG_ENABLE(gnutls, AC_ARG_ENABLE(gnutls,
[ --enable-gnutls GNU TLS TLS/SSL support (default enabled)]) [ --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"], [ AS_IF([test "${enable_gnutls}" != "no"], [
PKG_CHECK_MODULES(GNUTLS, [gnutls >= 2.6.6], [ PKG_CHECK_MODULES(GNUTLS, [gnutls >= 2.6.6], [
VLC_ADD_PLUGIN([gnutls]) VLC_ADD_PLUGIN([gnutls])
......
...@@ -13,8 +13,8 @@ libexport_plugin_la_LIBADD = $(AM_LIBADD) ...@@ -13,8 +13,8 @@ libexport_plugin_la_LIBADD = $(AM_LIBADD)
libvlc_LTLIBRARIES += libexport_plugin.la libvlc_LTLIBRARIES += libexport_plugin.la
libgnutls_plugin_la_SOURCES = gnutls.c dhparams.h libgnutls_plugin_la_SOURCES = gnutls.c dhparams.h
libgnutls_plugin_la_CFLAGS = $(AM_CFLAGS) $(GNUTLS_CFLAGS) $(GCRYPT_CFLAGS) libgnutls_plugin_la_CFLAGS = $(AM_CFLAGS) $(GNUTLS_CFLAGS)
libgnutls_plugin_la_LIBADD = $(AM_LIBADD) $(GNUTLS_LIBS) $(GCRYPT_LIBS) libgnutls_plugin_la_LIBADD = $(AM_LIBADD) $(GNUTLS_LIBS)
if HAVE_WIN32 if HAVE_WIN32
libgnutls_plugin_la_LIBADD += -lcrypt32 $(SOCKET_LIBS) libgnutls_plugin_la_LIBADD += -lcrypt32 $(SOCKET_LIBS)
endif endif
......
...@@ -47,11 +47,9 @@ ...@@ -47,11 +47,9 @@
#include <vlc_fs.h> #include <vlc_fs.h>
#include <vlc_block.h> #include <vlc_block.h>
#include <gcrypt.h>
#include <gnutls/gnutls.h> #include <gnutls/gnutls.h>
#include <gnutls/x509.h> #include <gnutls/x509.h>
#include <vlc_gcrypt.h>
#include "dhparams.h" #include "dhparams.h"
#include <assert.h> #include <assert.h>
...@@ -113,8 +111,6 @@ static int gnutls_Init (vlc_object_t *p_this) ...@@ -113,8 +111,6 @@ static int gnutls_Init (vlc_object_t *p_this)
{ {
int ret = VLC_EGENERIC; int ret = VLC_EGENERIC;
vlc_gcrypt_init (); /* GnuTLS depends on gcrypt */
vlc_mutex_lock (&gnutls_mutex); vlc_mutex_lock (&gnutls_mutex);
if (gnutls_global_init ()) if (gnutls_global_init ())
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment