mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-03 16:25:54 +00:00
Handle server cert change by pairing again
This commit is contained in:
parent
c6383f042c
commit
1e98594972
@ -434,9 +434,19 @@ NvHTTP::openConnection(QUrl baseUrl,
|
|||||||
if (logLevel >= NvLogLevel::ERROR) {
|
if (logLevel >= NvLogLevel::ERROR) {
|
||||||
qWarning() << command << " request failed with error " << reply->error();
|
qWarning() << command << " request failed with error " << reply->error();
|
||||||
}
|
}
|
||||||
QtNetworkReplyException exception(reply->error(), reply->errorString());
|
|
||||||
delete reply;
|
if (!m_ServerCert.isNull() && reply->error() == QNetworkReply::SslHandshakeFailedError) {
|
||||||
throw exception;
|
// This will trigger falling back to HTTP for the serverinfo query
|
||||||
|
// then pairing again to get the updated certificate.
|
||||||
|
GfeHttpResponseException exception(401, "Server certificate mismatch");
|
||||||
|
delete reply;
|
||||||
|
throw exception;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
QtNetworkReplyException exception(reply->error(), reply->errorString());
|
||||||
|
delete reply;
|
||||||
|
throw exception;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return reply;
|
return reply;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user