diff options
author | Jack Lloyd <[email protected]> | 2019-08-04 07:08:40 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2019-08-04 16:26:50 -0400 |
commit | d41daa6891e725973ff257b4ad34a0e8a49423f6 (patch) | |
tree | 4bedcb04201e8cc1fd3efd422d397b09a401ec1b /src/lib/x509 | |
parent | 20c7d267be8c60fb7a8ed0718bbfdd50365b1d8d (diff) |
Don't throw here
Diffstat (limited to 'src/lib/x509')
-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 |