aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/net/SecureSocket.cpp
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2019-07-18 01:31:55 -0400
committerLibravatarUnit 193 <unit193@ubuntu.com>2019-07-18 01:31:55 -0400
commit0f98c212db6e4cfd750dc1a52a31ddf9396a5e07 (patch)
treebd0bd43b383bccc43d1950fd356472d69f9cd0f1 /src/lib/net/SecureSocket.cpp
parentd8c416864c505aea70c70fd0d5f7991aa50d2ff9 (diff)
parenta916009d4b29995ea8ad61ad47a51c2ee1fa80bc (diff)
Update upstream source from tag 'upstream/2.3.0+dfsg'
Update to upstream version '2.3.0+dfsg' with Debian dir f701d582fe3b6bb5189dbf035102670db9c2516b
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"));
}
}
}