From ba5add72f824504a21eb780cae638c3ea2166ba0 Mon Sep 17 00:00:00 2001 From: Sven Moritz Hallberg Date: Sun, 17 Feb 2008 02:39:39 +0100 Subject: explicitly initialize ssl in order to avoid gnutls and libotr fighting over the global state of libgcrypt --- lib/ssl_openssl.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib/ssl_openssl.c') diff --git a/lib/ssl_openssl.c b/lib/ssl_openssl.c index b1ba1db9..e54b21ee 100644 --- a/lib/ssl_openssl.c +++ b/lib/ssl_openssl.c @@ -56,6 +56,12 @@ static gboolean ssl_starttls_real( gpointer data, gint source, b_input_condition static gboolean ssl_handshake( gpointer data, gint source, b_input_condition cond ); +void ssl_init( void ); +{ + initialized = TRUE; + SSLeay_add_ssl_algorithms(); +} + void *ssl_connect( char *host, int port, ssl_input_function func, gpointer data ) { struct scd *conn = g_new0( struct scd, 1 ); @@ -114,8 +120,7 @@ static gboolean ssl_connected( gpointer data, gint source, b_input_condition con if( !initialized ) { - initialized = TRUE; - SSLeay_add_ssl_algorithms(); + ssl_init(); } meth = TLSv1_client_method(); -- cgit v1.2.3