aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/x509/x509_ext.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/x509/x509_ext.h')
-rw-r--r--src/lib/x509/x509_ext.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/x509/x509_ext.h b/src/lib/x509/x509_ext.h
index 6e71fb879..687c58b0c 100644
--- a/src/lib/x509/x509_ext.h
+++ b/src/lib/x509/x509_ext.h
@@ -104,7 +104,12 @@ class BOTAN_PUBLIC_API(2,0) Extensions final : public ASN1_Object
{
if(const Certificate_Extension* extn = get_extension_object(oid))
{
- if(const T* extn_as_T = dynamic_cast<const T*>(extn))
+ // Unknown_Extension oid_name is empty
+ if(extn->oid_name().empty())
+ {
+ return nullptr;
+ }
+ else if(const T* extn_as_T = dynamic_cast<const T*>(extn))
{
return extn_as_T;
}