certauth: case insensitive hex key comparison

As noted in issue 464, comparing the hex representation of the public
key fingerprint should be case insensitive.
This commit is contained in:
Ingmar Runge
2014-02-06 18:42:22 +01:00
parent 4e5a45f73e
commit f4a7386ad4
+3 -3
View File
@@ -60,7 +60,7 @@ public:
it1->second.Split(" ", vsKeys, false);
for (it2 = vsKeys.begin(); it2 != vsKeys.end(); ++it2) {
m_PubKeys[it1->first].insert(*it2);
m_PubKeys[it1->first].insert(it2->AsLower());
}
}
@@ -96,7 +96,7 @@ public:
}
bool AddKey(CUser *pUser, CString sKey) {
pair<SCString::iterator, bool> pair = m_PubKeys[pUser->GetUserName()].insert(sKey);
pair<SCString::iterator, bool> pair = m_PubKeys[pUser->GetUserName()].insert(sKey.AsLower());
if (pair.second) {
Save();
@@ -235,7 +235,7 @@ public:
case X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN:
case X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE:
case X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT:
return sRes;
return sRes.AsLower();
default:
return "";
}