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
|
||||
- #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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue