summary refs log tree commit diff
path: root/crypto/src/asn1/cmp/DhbmParameter.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/cmp/DhbmParameter.cs')
-rw-r--r--crypto/src/asn1/cmp/DhbmParameter.cs11
1 files changed, 7 insertions, 4 deletions
diff --git a/crypto/src/asn1/cmp/DhbmParameter.cs b/crypto/src/asn1/cmp/DhbmParameter.cs
index aaf71f70e..12b8d91d3 100644
--- a/crypto/src/asn1/cmp/DhbmParameter.cs
+++ b/crypto/src/asn1/cmp/DhbmParameter.cs
@@ -17,13 +17,16 @@ namespace Org.BouncyCastle.Asn1.Cmp
     {
         public static DhbmParameter GetInstance(object obj)
         {
+            if (obj == null)
+                return null;
             if (obj is DhbmParameter dhbmParameter)
                 return dhbmParameter;
+            return new DhbmParameter(Asn1Sequence.GetInstance(obj));
+        }
 
-            if (obj != null)
-                return new DhbmParameter(Asn1Sequence.GetInstance(obj));
-
-            return null;
+        public static DhbmParameter GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+        {
+            return GetInstance(Asn1Sequence.GetInstance(taggedObject, declaredExplicit));
         }
 
         private readonly AlgorithmIdentifier m_owf;