diff --git a/ChangeLog b/ChangeLog index 23b29545e..492ef213f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ Bug fixes: - #7070 Fix radio button shifted focus on macOS - #7078 Fix clipboard re-enables automatically - #7077 Fix Ubuntu, CentOS and Debian build after SYNERGY-1161 +- #7080 Add trace if the system can't open file with trusted fingerprints Enhancements: - #7068 Add Synergy restart when settings changed diff --git a/src/lib/net/SecureSocket.cpp b/src/lib/net/SecureSocket.cpp index 6cb66bec1..7676132ad 100644 --- a/src/lib/net/SecureSocket.cpp +++ b/src/lib/net/SecureSocket.cpp @@ -709,15 +709,18 @@ SecureSocket::verifyCertFingerprint() file.open(trustedServersFilename.c_str()); bool isValid = false; - while (!file.eof() && file.is_open()) { - getline(file,fileLine); - if (!fileLine.empty()) { - if (fileLine.compare(fingerprint) == 0) { + if (file.is_open()) { + while (!file.eof()) { + getline(file,fileLine); + if (!fileLine.empty() && !fileLine.compare(fingerprint)) { isValid = true; break; } } } + else { + LOG((CLOG_ERR "Fail to open trusted fingerprints file: %s", trustedServersFilename.c_str())); + } file.close(); return isValid;