From 423d698436d9b6079a2086ef6bf8bd1e3037d867 Mon Sep 17 00:00:00 2001 From: Xinyu Hou Date: Tue, 21 Apr 2015 16:46:05 +0100 Subject: [PATCH] Fixed secure socket using old trusted fingerprint path #4525 --- src/lib/plugin/ns/SecureSocket.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib/plugin/ns/SecureSocket.cpp b/src/lib/plugin/ns/SecureSocket.cpp index ccc3ec01..2de8261e 100644 --- a/src/lib/plugin/ns/SecureSocket.cpp +++ b/src/lib/plugin/ns/SecureSocket.cpp @@ -36,10 +36,10 @@ #define MAX_ERROR_SIZE 65535 -static const char kFingerprintDirName[] = "ssl/fingerprints"; -//static const char kFingerprintLocalFilename[] = "local.txt"; -static const char kFingerprintTrustedServersFilename[] = "trusted-servers.txt"; -//static const char kFingerprintTrustedClientsFilename[] = "trusted-clients.txt"; +static const char kFingerprintDirName[] = "SSL/Fingerprints"; +//static const char kFingerprintLocalFilename[] = "Local.txt"; +static const char kFingerprintTrustedServersFilename[] = "TrustedServers.txt"; +//static const char kFingerprintTrustedClientsFilename[] = "TrustedClients.txt"; struct Ssl { SSL_CTX* m_context; @@ -493,7 +493,7 @@ SecureSocket::verifyCertFingerprint() file.open(trustedServersFilename.c_str()); bool isValid = false; - while (!file.eof()) { + while (!file.eof() && file.is_open()) { getline(file,fileLine); if (!fileLine.empty()) { if (fileLine.compare(fingerprint) == 0) {