summary refs log tree commit diff
path: root/crypto/src/asn1/cms/SignedData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/cms/SignedData.cs')
-rw-r--r--crypto/src/asn1/cms/SignedData.cs23
1 files changed, 14 insertions, 9 deletions
diff --git a/crypto/src/asn1/cms/SignedData.cs b/crypto/src/asn1/cms/SignedData.cs
index 9018bc6fd..858715ad6 100644
--- a/crypto/src/asn1/cms/SignedData.cs
+++ b/crypto/src/asn1/cms/SignedData.cs
@@ -8,6 +8,20 @@ namespace Org.BouncyCastle.Asn1.Cms
     public class SignedData
         : Asn1Encodable
     {
+        public static SignedData GetInstance(object obj)
+        {
+            if (obj == null)
+                return null;
+            if (obj is SignedData signedData)
+                return signedData;
+            return new SignedData(Asn1Sequence.GetInstance(obj));
+        }
+
+        public static SignedData GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+        {
+            return new SignedData(Asn1Sequence.GetInstance(taggedObject, declaredExplicit));
+        }
+
         private static readonly DerInteger Version1 = new DerInteger(1);
         private static readonly DerInteger Version3 = new DerInteger(3);
         private static readonly DerInteger Version4 = new DerInteger(4);
@@ -22,15 +36,6 @@ namespace Org.BouncyCastle.Asn1.Cms
         private readonly bool			certsBer;
         private readonly bool		    crlsBer;
 
-        public static SignedData GetInstance(object obj)
-        {
-            if (obj is SignedData signedData)
-                return signedData;
-            if (obj == null)
-                return null;
-            return new SignedData(Asn1Sequence.GetInstance(obj));
-        }
-
         public SignedData(
             Asn1Set     digestAlgorithms,
             ContentInfo contentInfo,