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

[minion-cvs] Backport fix to enable SSL3



Update of /home/minion/cvsroot/src/minion/src
In directory moria.mit.edu:/tmp/cvs-serv17690/src

Modified Files:
      Tag: mixminion-v0-0-5-patches
	tls.c 
Log Message:
Backport fix to enable SSL3

Index: tls.c
===================================================================
RCS file: /home/minion/cvsroot/src/minion/src/tls.c,v
retrieving revision 1.26.2.1
retrieving revision 1.26.2.2
diff -u -d -r1.26.2.1 -r1.26.2.2
--- tls.c	13 Oct 2003 17:00:39 -0000	1.26.2.1
+++ tls.c	17 Oct 2003 13:28:03 -0000	1.26.2.2
@@ -122,7 +122,6 @@
         mm_RSA *rsa = NULL;
         int err = 0;
 
-        SSL_METHOD *method;
         SSL_CTX *ctx = NULL;
         DH *dh = NULL;
         BIO *bio = NULL;
@@ -138,10 +137,12 @@
                 return NULL;
 
         Py_BEGIN_ALLOW_THREADS;
-        method = TLSv1_method();
 
-        if (!(ctx = SSL_CTX_new(method)))
+        /* Allow SSL2 and SSL3 and TLS1 */
+        if (!(ctx = SSL_CTX_new(SSLv23_method())))
                 err = 1;
+        /* But not actually SSL2. */
+        SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2);
         if (!err && !SSL_CTX_set_cipher_list(ctx,
                                        TLS1_TXT_DHE_RSA_WITH_AES_128_SHA))
                 err = 1;