Provide more details of failed connection

Otherwise the errorString from qtls_openssl is lost that
would help a lot why a tls connection failed.

"Error during SSL handshake: error:1414D17A:SSL routines:tls12_check_peer_sigalg:wrong curve"

Pick-to: 6.4 6.3 6.2
Change-Id: Iab74b73488219686e5926308db02bc4063818c9f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
André Klitzing 2022-06-29 09:59:08 +02:00
parent df0085d3a2
commit 4fde012a90

View File

@ -893,6 +893,8 @@ QString QHttpNetworkConnectionPrivate::errorDetail(QNetworkReply::NetworkError e
break;
case QNetworkReply::SslHandshakeFailedError:
errorString = QCoreApplication::translate("QHttp", "SSL handshake failed");
if (socket)
errorString += QStringLiteral(": ") + socket->errorString();
break;
case QNetworkReply::TooManyRedirectsError:
errorString = QCoreApplication::translate("QHttp", "Too many redirects");