Merge pull request #7080 from symless/SYNERGY-1057-Client-can-not-read-trusted-fingerprints
SYNERGY-1057 Add trace if the system can't open file with trusted fingerprints
This commit is contained in:
commit
8d5406489b
2 changed files with 8 additions and 4 deletions
|
|
@ -4,6 +4,7 @@ Bug fixes:
|
||||||
- #7070 Fix radio button shifted focus on macOS
|
- #7070 Fix radio button shifted focus on macOS
|
||||||
- #7078 Fix clipboard re-enables automatically
|
- #7078 Fix clipboard re-enables automatically
|
||||||
- #7077 Fix Ubuntu, CentOS and Debian build after SYNERGY-1161
|
- #7077 Fix Ubuntu, CentOS and Debian build after SYNERGY-1161
|
||||||
|
- #7080 Add trace if the system can't open file with trusted fingerprints
|
||||||
|
|
||||||
Enhancements:
|
Enhancements:
|
||||||
- #7068 Add Synergy restart when settings changed
|
- #7068 Add Synergy restart when settings changed
|
||||||
|
|
|
||||||
|
|
@ -709,15 +709,18 @@ SecureSocket::verifyCertFingerprint()
|
||||||
file.open(trustedServersFilename.c_str());
|
file.open(trustedServersFilename.c_str());
|
||||||
|
|
||||||
bool isValid = false;
|
bool isValid = false;
|
||||||
while (!file.eof() && file.is_open()) {
|
if (file.is_open()) {
|
||||||
getline(file,fileLine);
|
while (!file.eof()) {
|
||||||
if (!fileLine.empty()) {
|
getline(file,fileLine);
|
||||||
if (fileLine.compare(fingerprint) == 0) {
|
if (!fileLine.empty() && !fileLine.compare(fingerprint)) {
|
||||||
isValid = true;
|
isValid = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
LOG((CLOG_ERR "Fail to open trusted fingerprints file: %s", trustedServersFilename.c_str()));
|
||||||
|
}
|
||||||
|
|
||||||
file.close();
|
file.close();
|
||||||
return isValid;
|
return isValid;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue