Fixed secure socket using old trusted fingerprint path #4525
This commit is contained in:
parent
f56d06d95d
commit
423d698436
|
@ -36,10 +36,10 @@
|
||||||
|
|
||||||
#define MAX_ERROR_SIZE 65535
|
#define MAX_ERROR_SIZE 65535
|
||||||
|
|
||||||
static const char kFingerprintDirName[] = "ssl/fingerprints";
|
static const char kFingerprintDirName[] = "SSL/Fingerprints";
|
||||||
//static const char kFingerprintLocalFilename[] = "local.txt";
|
//static const char kFingerprintLocalFilename[] = "Local.txt";
|
||||||
static const char kFingerprintTrustedServersFilename[] = "trusted-servers.txt";
|
static const char kFingerprintTrustedServersFilename[] = "TrustedServers.txt";
|
||||||
//static const char kFingerprintTrustedClientsFilename[] = "trusted-clients.txt";
|
//static const char kFingerprintTrustedClientsFilename[] = "TrustedClients.txt";
|
||||||
|
|
||||||
struct Ssl {
|
struct Ssl {
|
||||||
SSL_CTX* m_context;
|
SSL_CTX* m_context;
|
||||||
|
@ -493,7 +493,7 @@ SecureSocket::verifyCertFingerprint()
|
||||||
file.open(trustedServersFilename.c_str());
|
file.open(trustedServersFilename.c_str());
|
||||||
|
|
||||||
bool isValid = false;
|
bool isValid = false;
|
||||||
while (!file.eof()) {
|
while (!file.eof() && file.is_open()) {
|
||||||
getline(file,fileLine);
|
getline(file,fileLine);
|
||||||
if (!fileLine.empty()) {
|
if (!fileLine.empty()) {
|
||||||
if (fileLine.compare(fingerprint) == 0) {
|
if (fileLine.compare(fingerprint) == 0) {
|
||||||
|
|
Loading…
Reference in New Issue