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