Commit cbd3a03b authored by Volker Krause's avatar Volker Krause
Browse files

Treat SSL handshake errors as fatal also when using STARTTLS

This fixes the infinite SSL error dialog loop also when using
STARTTLS, the previous fix was only effective for direct TLS
connections.

CCBUG: 423424
parent 4ad36375
Pipeline #98284 passed with stage
in 3 minutes and 57 seconds
......@@ -552,19 +552,15 @@ void LoginJob::connectionLost()
{
Q_D(LoginJob);
// don't emit the result if the connection was lost before getting the tls result, as it can mean
// the TLS handshake failed and the socket was reconnected in normal mode
if (d->authState != LoginJobPrivate::StartTls) {
qCWarning(KIMAP_LOG) << "Connection to server lost " << d->m_socketError;
if (d->m_socketError == QAbstractSocket::SslHandshakeFailedError) {
setError(KJob::UserDefinedError);
setErrorText(i18n("SSL handshake failed."));
emitResult();
} else {
setError(ERR_COULD_NOT_CONNECT);
setErrorText(i18n("Connection to server lost."));
emitResult();
}
qCWarning(KIMAP_LOG) << "Connection to server lost " << d->m_socketError;
if (d->m_socketError == QAbstractSocket::SslHandshakeFailedError) {
setError(KJob::UserDefinedError);
setErrorText(i18n("SSL handshake failed."));
emitResult();
} else {
setError(ERR_COULD_NOT_CONNECT);
setErrorText(i18n("Connection to server lost."));
emitResult();
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment