mirror of
https://github.com/znc/znc.git
synced 2026-08-07 17:33:34 +02:00
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:
@@ -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 "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user