diff options
author | Bernard Normier <bernard@zeroc.com> | 2016-08-05 17:02:33 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2016-08-05 17:02:33 -0400 |
commit | 69608388dc1e21b5bd39c61c0e1e723e138de997 (patch) | |
tree | 0afa4c18f01ab1363c272649052ef77e9cb19dd2 /cpp/src | |
parent | Reduced string converter caching (diff) | |
download | ice-69608388dc1e21b5bd39c61c0e1e723e138de997.tar.bz2 ice-69608388dc1e21b5bd39c61c0e1e723e138de997.tar.xz ice-69608388dc1e21b5bd39c61c0e1e723e138de997.zip |
Improved DistinguishedName ctors and comparison operators
Diffstat (limited to 'cpp/src')
-rwxr-xr-x | cpp/src/IceSSL/Certificate.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/cpp/src/IceSSL/Certificate.cpp b/cpp/src/IceSSL/Certificate.cpp index 3fa4383bf30..c502d54baa0 100755 --- a/cpp/src/IceSSL/Certificate.cpp +++ b/cpp/src/IceSSL/Certificate.cpp @@ -882,21 +882,15 @@ DistinguishedName::DistinguishedName(const list<pair<string, string> >& rdns) : } bool -DistinguishedName::operator==(const DistinguishedName& other) const +IceSSL::operator==(const DistinguishedName& lhs, const DistinguishedName& rhs) { - return other._unescaped == _unescaped; + return lhs._unescaped == rhs._unescaped; } bool -DistinguishedName::operator!=(const DistinguishedName& other) const +IceSSL::operator<(const DistinguishedName& lhs, const DistinguishedName& rhs) { - return other._unescaped != _unescaped; -} - -bool -DistinguishedName::operator<(const DistinguishedName& other) const -{ - return other._unescaped < _unescaped; + return lhs._unescaped == rhs._unescaped; } bool @@ -924,6 +918,12 @@ DistinguishedName::match(const DistinguishedName& other) const return true; } +bool +DistinguishedName::match(const string& other) const +{ + return match(DistinguishedName(other)); +} + // // This always produces the same output as the input DN -- the type of // escaping is not changed. |