summary refs log tree commit diff
path: root/crypto/src/asn1/cmp/CertResponse.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/cmp/CertResponse.cs')
-rw-r--r--crypto/src/asn1/cmp/CertResponse.cs15
1 files changed, 9 insertions, 6 deletions
diff --git a/crypto/src/asn1/cmp/CertResponse.cs b/crypto/src/asn1/cmp/CertResponse.cs
index 72a44c93e..e70d6d388 100644
--- a/crypto/src/asn1/cmp/CertResponse.cs
+++ b/crypto/src/asn1/cmp/CertResponse.cs
@@ -7,13 +7,16 @@ namespace Org.BouncyCastle.Asn1.Cmp
 	{
         public static CertResponse GetInstance(object obj)
         {
-			if (obj is CertResponse certResponse)
-				return certResponse;
-
-			if (obj != null)
-				return new CertResponse(Asn1Sequence.GetInstance(obj));
+            if (obj == null)
+                return null;
+            if (obj is CertResponse certResponse)
+                return certResponse;
+            return new CertResponse(Asn1Sequence.GetInstance(obj));
+        }
 
-			return null;
+        public static CertResponse GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+        {
+            return GetInstance(Asn1Sequence.GetInstance(taggedObject, declaredExplicit));
         }
 
         private readonly DerInteger m_certReqId;