diff options
Diffstat (limited to 'tdeioslave/imap4/imap4.cpp')
-rw-r--r-- | tdeioslave/imap4/imap4.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tdeioslave/imap4/imap4.cpp b/tdeioslave/imap4/imap4.cpp index 7d02a4890..fe26c6f23 100644 --- a/tdeioslave/imap4/imap4.cpp +++ b/tdeioslave/imap4/imap4.cpp @@ -170,12 +170,12 @@ sigchld_handler (int signo) errno = save_errno; } -IMAP4Protocol::IMAP4Protocol (const TQCString & pool, const TQCString & app, bool isSSL):TCPSlaveBase ((isSSL ? 993 : 143), - (isSSL ? IMAP_SSL_PROTOCOL : IMAP_PROTOCOL), pool, - app, isSSL), imapParser (), mimeIO (), outputBuffer(outputCache) +IMAP4Protocol::IMAP4Protocol (const TQCString & pool, const TQCString & app, bool isTLS):TCPSlaveBase ((isTLS ? 993 : 143), + (isTLS ? IMAP_SSL_PROTOCOL : IMAP_PROTOCOL), pool, + app, isTLS), imapParser (), mimeIO (), outputBuffer(outputCache) { outputBufferIndex = 0; - mySSL = isSSL; + myTLS = isTLS; readBuffer[0] = 0x00; relayEnabled = false; readBufferLen = 0; @@ -641,7 +641,7 @@ IMAP4Protocol::setHost (const TQString & _host, int _port, closeConnection (); myHost = _host; if (_port == 0) - myPort = (mySSL) ? ImapsPort : ImapPort; + myPort = (myTLS) ? ImapsPort : ImapPort; else myPort = _port; myUser = _user; @@ -2039,7 +2039,7 @@ bool IMAP4Protocol::makeLogin () setState(ISTATE_CONNECT); myAuth = metaData("auth"); - myTLS = metaData("tls"); + mySTARTTLS = metaData("starttls"); kdDebug(7116) << "myAuth: " << myAuth << endl; imapCommand *cmd; @@ -2070,14 +2070,14 @@ bool IMAP4Protocol::makeLogin () if (metaData("nologin") == "on") return TRUE; - if (myTLS == "on" && !hasCapability(TQString("STARTTLS"))) + if (mySTARTTLS == "on" && !hasCapability(TQString("STARTTLS"))) { - error(ERR_COULD_NOT_LOGIN, i18n("The server does not support TLS.\n" + error(ERR_COULD_NOT_LOGIN, i18n("The server does not support STARTTLS.\n" "Disable this security feature to connect unencrypted.")); closeConnection(); return false; } - if ((myTLS == "on" || (canUseTLS() && myTLS != "off")) && + if ((mySTARTTLS == "on" || (canUseTLS() && mySTARTTLS != "off")) && hasCapability(TQString("STARTTLS"))) { imapCommand *cmd = doCommand (imapCommand::clientStartTLS()); @@ -2087,7 +2087,7 @@ bool IMAP4Protocol::makeLogin () int tlsrc = startTLS(); if (tlsrc == 1) { - kdDebug(7116) << "TLS mode has been enabled." << endl; + kdDebug(7116) << "STARTTLS mode has been enabled." << endl; imapCommand *cmd2 = doCommand (new imapCommand ("CAPABILITY", "")); for (TQStringList::Iterator it = imapCapabilities.begin (); it != imapCapabilities.end (); ++it) @@ -2096,7 +2096,7 @@ bool IMAP4Protocol::makeLogin () } completeQueue.removeRef (cmd2); } else { - kdWarning(7116) << "TLS mode setup has failed. Aborting." << endl; + kdWarning(7116) << "STARTTLS mode setup has failed. Aborting." << endl; error (ERR_COULD_NOT_LOGIN, i18n("Starting TLS failed.")); closeConnection(); return false; @@ -2161,7 +2161,7 @@ bool IMAP4Protocol::makeLogin () else { #ifdef HAVE_LIBSASL2 - if (!clientAuthenticate (this, authInfo, myHost, myAuth, mySSL, resultInfo)) + if (!clientAuthenticate (this, authInfo, myHost, myAuth, myTLS, resultInfo)) error(TDEIO::ERR_COULD_NOT_AUTHENTICATE, i18n("Unable to authenticate via %1.\n" "The server %2 replied:\n%3").arg(myAuth).arg(myHost).arg(resultInfo)); else { |