aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/x509
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2019-08-04 07:08:40 -0400
committerJack Lloyd <[email protected]>2019-08-04 16:26:50 -0400
commitd41daa6891e725973ff257b4ad34a0e8a49423f6 (patch)
tree4bedcb04201e8cc1fd3efd422d397b09a401ec1b /src/lib/x509
parent20c7d267be8c60fb7a8ed0718bbfdd50365b1d8d (diff)
Don't throw here
Diffstat (limited to 'src/lib/x509')
-rw-r--r--src/lib/x509/x509_dn.cpp6
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