summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-06-13 13:52:30 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-06-13 13:52:30 (GMT)
commit645876deedb72aa8ebd2a56773f7dd5bb0133b71 (patch)
treefe1820b9e5aebe5b8f69359a2f0ea1a8f4b9a71c /Swiften/TLS
parent643999af94c4fede5e1348da91ad539235b9d60f (diff)
downloadswift-645876deedb72aa8ebd2a56773f7dd5bb0133b71.zip
swift-645876deedb72aa8ebd2a56773f7dd5bb0133b71.tar.bz2
Fixed some CppCheck warnings.
Diffstat (limited to 'Swiften/TLS')
-rw-r--r--Swiften/TLS/ServerIdentityVerifier.cpp4
-rw-r--r--Swiften/TLS/ServerIdentityVerifier.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/Swiften/TLS/ServerIdentityVerifier.cpp b/Swiften/TLS/ServerIdentityVerifier.cpp
index 7c68774..a908ad0 100644
--- a/Swiften/TLS/ServerIdentityVerifier.cpp
+++ b/Swiften/TLS/ServerIdentityVerifier.cpp
@@ -63,7 +63,7 @@ bool ServerIdentityVerifier::certificateVerifies(Certificate::ref certificate) {
return false;
}
-bool ServerIdentityVerifier::matchesDomain(const std::string& s) {
+bool ServerIdentityVerifier::matchesDomain(const std::string& s) const {
if (boost::starts_with(s, "*.")) {
std::string matchString(s.substr(2, s.npos));
std::string matchDomain = encodedDomain;
@@ -78,7 +78,7 @@ bool ServerIdentityVerifier::matchesDomain(const std::string& s) {
}
}
-bool ServerIdentityVerifier::matchesAddress(const std::string& s) {
+bool ServerIdentityVerifier::matchesAddress(const std::string& s) const {
return s == domain;
}
diff --git a/Swiften/TLS/ServerIdentityVerifier.h b/Swiften/TLS/ServerIdentityVerifier.h
index c1abd5e..b09abd9 100644
--- a/Swiften/TLS/ServerIdentityVerifier.h
+++ b/Swiften/TLS/ServerIdentityVerifier.h
@@ -20,8 +20,8 @@ namespace Swift {
bool certificateVerifies(Certificate::ref);
private:
- bool matchesDomain(const std::string&);
- bool matchesAddress(const std::string&);
+ bool matchesDomain(const std::string&) const ;
+ bool matchesAddress(const std::string&) const;
private:
std::string domain;