aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl_openssl.c
diff options
context:
space:
mode:
authorSven Moritz Hallberg <sm@khjk.org>2008-02-17 02:39:39 +0100
committerSven Moritz Hallberg <sm@khjk.org>2008-02-17 02:39:39 +0100
commitba5add72f824504a21eb780cae638c3ea2166ba0 (patch)
treedb16826012c15c1fe2b682a4f3b2d514d41d7aaf /lib/ssl_openssl.c
parentfd9fa52e0014459079444bd7bfff7a40eef4e27a (diff)
explicitly initialize ssl in order to avoid gnutls and libotr fighting over the global state of libgcrypt
Diffstat (limited to 'lib/ssl_openssl.c')
-rw-r--r--lib/ssl_openssl.c9
1 files changed, 7 insertions, 2 deletions
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();