aboutsummaryrefslogtreecommitdiffstats
path: root/src/x509cert.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/x509cert.cpp')
-rw-r--r--src/x509cert.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/x509cert.cpp b/src/x509cert.cpp
index 4a1152cf5..8696404fa 100644
--- a/src/x509cert.cpp
+++ b/src/x509cert.cpp
@@ -335,14 +335,22 @@ AlternativeName create_alt_name(const Data_Store& info)
public:
bool operator()(const std::string& key, const std::string&) const
{
- if(key == "RFC882" || key == "DNS" || key == "URI")
- return true;
+ for(u32bit j = 0; j != matches.size(); j++)
+ if(key.compare(matches[j]) == 0)
+ return true;
return false;
}
+
+ AltName_Matcher(const std::string& match_any_of)
+ {
+ matches = split_on(match_any_of, '/');
+ }
+ private:
+ std::vector<std::string> matches;
};
std::multimap<std::string, std::string> names
- = info.search_with(AltName_Matcher());
+ = info.search_with(AltName_Matcher("RFC882/DNS/URI"));
AlternativeName alt_name;