aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/net/SecureSocket.cpp
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2019-07-18 01:31:43 -0400
committerLibravatarUnit 193 <unit193@ubuntu.com>2019-07-18 01:31:43 -0400
commita916009d4b29995ea8ad61ad47a51c2ee1fa80bc (patch)
treef53f459caa6868bda7c3f6dae0d8f30f19325af3 /src/lib/net/SecureSocket.cpp
parent68a36b3b67ec82cdd3f77e88e40d1043cbab5000 (diff)
New upstream version 2.3.0+dfsgupstream/2.3.0+dfsg
Diffstat (limited to 'src/lib/net/SecureSocket.cpp')
-rw-r--r--src/lib/net/SecureSocket.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/net/SecureSocket.cpp b/src/lib/net/SecureSocket.cpp
index 6670f5f..360db31 100644
--- a/src/lib/net/SecureSocket.cpp
+++ b/src/lib/net/SecureSocket.cpp
@@ -704,18 +704,30 @@ SecureSocket::verifyCertFingerprint()
kFingerprintDirName,
kFingerprintTrustedServersFilename);
+ // Provide debug hint as to what file is being used to verify fingerprint trust
+ LOG((CLOG_NOTE "trustedServersFilename: %s", trustedServersFilename.c_str() ));
+
// check if this fingerprint exist
String fileLine;
std::ifstream file;
file.open(trustedServersFilename.c_str());
+ if (!file.is_open()) {
+ LOG((CLOG_NOTE "Unable to open trustedServersFile: %s", trustedServersFilename.c_str() ));
+ } else {
+ LOG((CLOG_NOTE "Opened trustedServersFilename: %s", trustedServersFilename.c_str() ));
+ }
+
bool isValid = false;
while (!file.eof() && file.is_open()) {
getline(file,fileLine);
if (!fileLine.empty()) {
if (fileLine.compare(fingerprint) == 0) {
+ LOG((CLOG_NOTE "Fingerprint matches trusted fingerprint"));
isValid = true;
break;
+ } else {
+ LOG((CLOG_NOTE "Fingerprint does not match trusted fingerprint"));
}
}
}