[glib-networking] Disable automatic initialization of GnuTLS



commit 8d22eacbcb9725c91244447517c1aafa22ac09ef
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Wed Feb 7 16:56:35 2018 -0600

    Disable automatic initialization of GnuTLS
    
    We have code here to ensure that GnuTLS does not get initialized just by
    scanning GIO modules, but it's being defeated because GnuTLS has since
    started initializing itself using a library constructor. To fix this we
    have to define the symbol _gnutls_global_init_skip using the macro
    GNUTLS_SKIP_GLOBAL_INIT.

 glib-networking.map             |    1 +
 tls/gnutls/gtlsbackend-gnutls.c |    2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/glib-networking.map b/glib-networking.map
index 354a941..2418609 100644
--- a/glib-networking.map
+++ b/glib-networking.map
@@ -3,6 +3,7 @@ global:
   g_io_*_load;
   g_io_*_unload;
   g_io_*_query;
+  _gnutls_global_init_skip;
 local:
   *;
 };
diff --git a/tls/gnutls/gtlsbackend-gnutls.c b/tls/gnutls/gtlsbackend-gnutls.c
index 6324563..6c2d3ab 100644
--- a/tls/gnutls/gtlsbackend-gnutls.c
+++ b/tls/gnutls/gtlsbackend-gnutls.c
@@ -73,6 +73,8 @@ gtls_gnutls_init (gpointer data)
   return NULL;
 }
 
+GNUTLS_SKIP_GLOBAL_INIT
+
 static GOnce gnutls_inited = G_ONCE_INIT;
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]