Use option NO_TICKET for OpenSSL [#28]
authorMikael Hallendal <micke@imendio.com>
Wed, 19 Nov 2008 10:12:27 +0100
changeset 566 ac126834c160
parent 557 47f6169c0f08
child 567 0cb53b009e8c
Use option NO_TICKET for OpenSSL [#28] Google Talk seems to have a problem connecting with clients using OpenSSL and TLS. According to a bug report on Twister it was tracked down to a bug in Java. Setting the NO_TICKET option on the SSL context seemed to work around the problem.
loudmouth/lm-ssl-openssl.c
--- a/loudmouth/lm-ssl-openssl.c	Wed Nov 05 23:19:42 2008 +0100
+++ b/loudmouth/lm-ssl-openssl.c	Wed Nov 19 10:12:27 2008 +0100
@@ -305,6 +305,16 @@
 		g_warning ("SSL_CTX_new() == NULL");
 		abort();
 	}
+
+        /* Set the NO_TICKET option on the context to allow for talk to Google Talk 
+         * which apparently seems to be having a problem handling empty session 
+         * tickets due to a bug in Java.
+         *
+         * See http://twistedmatrix.com/trac/ticket/3463 and
+         * Loudmouth [#28].
+         */
+        SSL_CTX_set_options (ssl->ssl_ctx, SSL_OP_NO_TICKET);
+
 	/*if (access("/etc/ssl/cert.pem", R_OK) == 0)
 		cert_file = "/etc/ssl/cert.pem";
 	if (!SSL_CTX_load_verify_locations(ssl->ssl_ctx,