Use option NO_TICKET for OpenSSL [#28]
authorMikael Hallendal <micke@imendio.com>
Wed, 19 Nov 2008 09:48:29 +0100
changeset 565 87a57a62be8c
parent 564 db3e9ff448cb
child 568 7932b95b5211
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 19 09:15:26 2008 +0100
+++ b/loudmouth/lm-ssl-openssl.c	Wed Nov 19 09:48:29 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,