SYNERGY-1057 Add trace if the system can't open file with trusted fingerprints
This commit is contained in:
parent
7b2026e376
commit
c5faa8de24
1 changed files with 11 additions and 6 deletions
|
|
@ -709,15 +709,20 @@ 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()) {
|
||||||
isValid = true;
|
if (fileLine.compare(fingerprint) == 0) {
|
||||||
break;
|
isValid = true;
|
||||||
|
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