diff options
author | lloyd <[email protected]> | 2006-09-10 03:18:35 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2006-09-10 03:18:35 +0000 |
commit | 3af61dd588df052eb100e0c581860edfc1cb09c3 (patch) | |
tree | 1d9466c23241e8963f9be567496716348887ab5a /src/x509cert.cpp | |
parent | 9e26ffdb32e39ed58b99ab5f0a4f4dc2496127fc (diff) |
Hack around some Visual Studio bugs that I can't seem to find good solutions
for.
Diffstat (limited to 'src/x509cert.cpp')
-rw-r--r-- | src/x509cert.cpp | 14 |
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; |