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

Emit an error rather than reconnect when SSL errors are not ignored

Not ignoring SSL certificate errors now results in a delivery error rather
than a loop on the SSL error dialog.

BUG: 423424
parent 105ba716
Pipeline #86464 skipped
......@@ -240,10 +240,11 @@ void SessionThread::doHandleSslErrorResponse(bool ignoreError)
if (ignoreError) {
Q_EMIT encryptionNegotiationResult(true, m_socket->sessionProtocol());
} else {
// reconnect in unencrypted mode, so new commands can be issued
const auto sslErrors = m_socket->sslHandshakeErrors();
QStringList errorMsgs;
std::transform(sslErrors.begin(), sslErrors.end(), std::back_inserter(errorMsgs), std::mem_fn(&QSslError::errorString));
Q_EMIT m_parentSession->connectionError(errorMsgs.join(QLatin1Char('\n')));
m_socket->connectToHost(m_hostName, m_port);
Q_EMIT encryptionNegotiationResult(false, QSsl::UnknownProtocol);
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