summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2020-01-09 13:32:54 (GMT)
committerKevin Smith <git@kismith.co.uk>2020-01-09 16:37:40 (GMT)
commit12d031cf8177fdec0137f9aa7e2912fa23c4416b (patch)
treede29bebd027b1a2f76a88ff2946914e6e46fc887 /Swiften/TLS/ServerIdentityVerifier.cpp
parent3d00d04ffbf40845058f6ede4da2592bb27a255d (diff)
downloadswift-12d031cf8177fdec0137f9aa7e2912fa23c4416b.zip
swift-12d031cf8177fdec0137f9aa7e2912fa23c4416b.tar.bz2
Accept certs with upper case entriesHEADmaster
Although we were doing the right thing with punycode (as far as I can see) for the IDNA entries, we were forgetting that the comparisons needed to be case insensitive (checked the RFCs). Now they are. Test-Information: Added unit tests for the three flows that were modified. Change-Id: Ib17ae3df66159f38339996580dc85a5d99356274
Diffstat (limited to 'Swiften/TLS/ServerIdentityVerifier.cpp')
-rw-r--r--Swiften/TLS/ServerIdentityVerifier.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Swiften/TLS/ServerIdentityVerifier.cpp b/Swiften/TLS/ServerIdentityVerifier.cpp
index da116e5..18ea2aa 100644
--- a/Swiften/TLS/ServerIdentityVerifier.cpp
+++ b/Swiften/TLS/ServerIdentityVerifier.cpp
@@ -82,15 +82,15 @@ bool ServerIdentityVerifier::matchesDomain(const std::string& s) const {
if (dotIndex != matchDomain.npos) {
matchDomain = matchDomain.substr(dotIndex + 1, matchDomain.npos);
}
- return matchString == matchDomain;
+ return boost::iequals(matchString, matchDomain);
}
else {
- return s == encodedDomain;
+ return boost::iequals(s, encodedDomain);
}
}
bool ServerIdentityVerifier::matchesAddress(const std::string& s) const {
- return s == domain;
+ return boost::iequals(s, domain);
}
}