From c216dddd47778643ba615409af2a654c01ade0a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sun, 9 Apr 2017 20:14:22 +0200 Subject: [PATCH] KSSL: Use TLS_client_method instead of TLSv1_client_method This enables TLS protocols newer than v1.0 This resolves bug 2764 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko (cherry picked from commit adb9d9d2b0bfbb0f856673e663aad7c4a63020eb) --- kio/kssl/kssl.cc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/kio/kssl/kssl.cc b/kio/kssl/kssl.cc index 4dc35248d..45d6ed359 100644 --- a/kio/kssl/kssl.cc +++ b/kio/kssl/kssl.cc @@ -134,7 +134,7 @@ bool KSSL::TLSInit() { return false; seedWithEGD(); - d->m_meth = d->kossl->TLSv1_client_method(); + d->m_meth = d->kossl->TLS_client_method(); d->lastInitTLS = true; m_pi.reset(); @@ -173,13 +173,15 @@ bool KSSL::initialize() { m_pi.reset(); - if (!m_cfg->tlsv1() && !m_cfg->sslv3() && m_cfg->sslv2()) - d->m_meth = d->kossl->SSLv2_client_method(); - else if (m_cfg->tlsv1() && !m_cfg->sslv3() && !m_cfg->sslv2()) - d->m_meth = d->kossl->TLSv1_client_method(); - else if (!m_cfg->tlsv1() && m_cfg->sslv3() && !m_cfg->sslv2()) + if (m_cfg->tlsv1() || (m_cfg->sslv3() && m_cfg->sslv2())) { + d->m_meth = d->kossl->TLS_client_method(); + } + else if (m_cfg->sslv3()) { d->m_meth = d->kossl->SSLv3_client_method(); - else d->m_meth = d->kossl->TLS_client_method(); + } + else if (m_cfg->sslv2()) { + d->m_meth = d->kossl->SSLv2_client_method(); + } /* if (m_cfg->sslv2() && m_cfg->sslv3()) kdDebug(7029) << "Double method" << endl;