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 adb9d9d2b0)
pull/16/head
Slávek Banko 8 years ago
parent a3073f3c24
commit f83e4b4741

@ -134,7 +134,7 @@ bool KSSL::TLSInit() {
return false; return false;
seedWithEGD(); seedWithEGD();
d->m_meth = d->kossl->TLSv1_client_method(); d->m_meth = d->kossl->TLS_client_method();
d->lastInitTLS = true; d->lastInitTLS = true;
m_pi.reset(); m_pi.reset();
@ -173,13 +173,15 @@ bool KSSL::initialize() {
m_pi.reset(); m_pi.reset();
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->SSLv2_client_method(); d->m_meth = d->kossl->TLS_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->sslv3()) {
else if (!m_cfg->tlsv1() && m_cfg->sslv3() && !m_cfg->sslv2())
d->m_meth = d->kossl->SSLv3_client_method(); 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; if (m_cfg->sslv2() && m_cfg->sslv3()) kdDebug(7029) << "Double method" << endl;

Loading…
Cancel
Save