Permalink
Browse files

Merge remote-tracking branch 'upstream/master'

  • Loading branch information...
MasterBel2
MasterBel2 committed Sep 18, 2018
2 parents 3d0e08e + be66d52 commit 279cc7f301efe2d27f0bbaf2448a38793e87b814
Showing with 10 additions and 9 deletions.
  1. +3 −0 ChangeLog
  2. +0 −1 src/gui/ui.cpp
  3. +1 −1 src/inetclass.h
  4. +3 −2 src/settings.cpp
  5. +1 −2 src/socket.cpp
  6. +1 −2 src/tasserver.cpp
  7. +1 −1 src/tasserver.h
@@ -1,5 +1,8 @@
ChangeLog of Springlobby

## 0.267
- fix connecting to unknown lobby servers (fingerprint mismatch)

## 0.266
- Fix #886 (Unable to register due to certificate fingerprint mismatch)
- merge engine and version into one column
@@ -62,7 +62,6 @@ SLCONFIG("/General/AutoUpdate", true, "Determines if springlobby should check fo
SLCONFIG("/GUI/StartTab", (long)MainWindow::PAGE_BATTLELIST, "which tab to show on startup");
SLCONFIG("/Chat/BroadcastEverywhere", true, "setting to spam the server messages in all channels");
SLCONFIG("/Server/Autoconnect", false, "Connect to server on startup");
SLCONFIG("/Server/TLS", false, "Use encrypted connection to the lobby server");


static unsigned int s_reconnect_delay_ms = 6 * 1000; //initial reconnect delay
@@ -34,7 +34,7 @@ class iNetClass
{
}

virtual void OnInvalidFingerprintReceived(const std::string& /*fingerprint*/)
virtual void OnInvalidFingerprintReceived(const std::string& /*fingerprint*/, const std::string& /*expected_fingerprint*/)
{
}
};
@@ -289,8 +289,9 @@ void Settings::SetServer(const wxString& server_name, const wxString& url, int p
{
cfg().Write(_T( "/Server/Servers/" ) + server_name + _T( "/Host" ), url);
cfg().Write(_T( "/Server/Servers/" ) + server_name + _T( "/Port" ), port);
cfg().Write(_T( "/Server/Servers/" ) + server_name + _T( "/TLS" ), true);
cfg().Write(_T( "/Server/Servers/" ) + server_name + _T( "/Certificate" ), fingerprint);
if (!fingerprint.empty()) {
cfg().Write(_T( "/Server/Servers/" ) + server_name + _T( "/Certificate" ), fingerprint);
}
}

//! @brief Deletes a server from the list.
@@ -203,9 +203,8 @@ bool Socket::VerifyCertificate()
const char* name = SSL_get_cipher_name(m_ssl);
wxLogMessage("Using cipher %s", name);

//FIXME: read from config and prompt when missmatch / doesn't exist
if (fingerprint != m_excepted_fingerprint) {
m_net_class.OnInvalidFingerprintReceived(fingerprint);
m_net_class.OnInvalidFingerprintReceived(fingerprint, m_excepted_fingerprint);
return false;
}

@@ -2077,9 +2077,8 @@ bool TASServer::IsCurrentBattle(int battle_id)
return true;
}

void TASServer::OnInvalidFingerprintReceived(const std::string& fingerprint)
void TASServer::OnInvalidFingerprintReceived(const std::string& fingerprint, const std::string& expected_fingerprint)
{
const std::string expected_fingerprint = sett().GetServerFingerprint(GetServerName());
m_se->OnInvalidFingerprintReceived(fingerprint, expected_fingerprint);
}

@@ -143,7 +143,7 @@ class TASServer : public IServer, public iNetClass, public wxTimer
void OnDisconnected(wxSocketError err) override;
void OnDataReceived() override;
void OnError(const std::string& err) override;
void OnInvalidFingerprintReceived(const std::string& fingerprint) override;
void OnInvalidFingerprintReceived(const std::string& fingerprint, const std::string& expected_fingerprint) override;

void UDPPing(); /// used for nat travelsal
/// generic udp "ping" function

0 comments on commit 279cc7f

Please sign in to comment.