https://bugs.kde.org/show_bug.cgi?id=394770

--- Comment #4 from Jörg Thalheim <joerg....@thalheim.io> ---
The encryption mode enum should only contain three states:

enum EncryptionMode {
        Unencrypted,
        SslOrTls,
        Starttls
};

The pseudo code should be as follow in LoginJob::doStart

if (d->m_encryptionMode == SslOrTls) {
  d->sessionInternal()->startSsl(KTcpSocket::SecureProtocols);
} else if (d->m_encryptionMode == Starttls) {
  sendCommand("STARTTLS");
} else {
  if (!d->authenticate()) {
    emitResult();
  }
}

in LoginJob::handleResponse

if (r.isCode(220)) {
   d->sessionInternal()->startSsl(KTcpSocket::SecureProtocols);
   return;
}

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to