summaryrefslogtreecommitdiffstats
path: root/tdeio
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2017-04-09 20:14:22 +0200
committerSlávek Banko <slavek.banko@axis.cz>2017-04-09 20:14:33 +0200
commitf83e4b47411a1b55c3f9e38957e63a9238afdb2e (patch)
tree3b37258d7d6bcdedf7cd46dbb0871067bfad48d5 /tdeio
parenta3073f3c243a3d24a42a67d98a7980770aef226a (diff)
downloadtdelibs-f83e4b47411a1b55c3f9e38957e63a9238afdb2e.tar.gz
tdelibs-f83e4b47411a1b55c3f9e38957e63a9238afdb2e.zip
KSSL: Use TLS_client_method instead of TLSv1_client_method
This enables TLS protocols newer than v1.0 This resolves bug 2764 Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit adb9d9d2b0bfbb0f856673e663aad7c4a63020eb)
Diffstat (limited to 'tdeio')
-rw-r--r--tdeio/kssl/kssl.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/tdeio/kssl/kssl.cc b/tdeio/kssl/kssl.cc
index c579471b0..e5f092157 100644
--- a/tdeio/kssl/kssl.cc
+++ b/tdeio/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;