diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/x509/x509_dn.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/x509/x509_dn.cpp b/src/lib/x509/x509_dn.cpp index e9d825256..edb9b7d0b 100644 --- a/src/lib/x509/x509_dn.cpp +++ b/src/lib/x509/x509_dn.cpp @@ -67,7 +67,11 @@ std::multimap<std::string, std::string> X509_DN::contents() const bool X509_DN::has_field(const std::string& attr) const { - return has_field(OIDS::str2oid_or_throw(deref_info_field(attr))); + const OID o = OIDS::str2oid_or_empty(deref_info_field(attr)); + if(o.has_value()) + return has_field(o); + else + return false; } bool X509_DN::has_field(const OID& oid) const |