From 9f0bba97276d0d4e1415881f04e2cb3dfb1552e2 Mon Sep 17 00:00:00 2001
From: Kevin Smith <git@kismith.co.uk>
Date: Fri, 10 Jan 2014 14:33:07 +0000
Subject: Allow TLS other than version 1

Change-Id: I1ffb6d9eabfb36c0101ee19c0cd618736d8a8bb8

diff --git a/Swiften/TLS/OpenSSL/OpenSSLContext.cpp b/Swiften/TLS/OpenSSL/OpenSSLContext.cpp
index 77f780f..4e8654f 100644
--- a/Swiften/TLS/OpenSSL/OpenSSLContext.cpp
+++ b/Swiften/TLS/OpenSSL/OpenSSLContext.cpp
@@ -41,7 +41,8 @@ static void freeX509Stack(STACK_OF(X509)* stack) {
 
 OpenSSLContext::OpenSSLContext() : state_(Start), context_(0), handle_(0), readBIO_(0), writeBIO_(0) {
 	ensureLibraryInitialized();
-	context_ = SSL_CTX_new(TLSv1_client_method());
+	context_ = SSL_CTX_new(SSLv23_client_method());
+	SSL_CTX_set_options(context_, SSL_OP_NO_SSLv2);
 
 	// TODO: implement CRL checking
 	// TODO: download CRL (HTTP transport)
-- 
cgit v0.10.2-6-g49f6