summary refs log tree commit diff
path: root/crypto/src/asn1/esf/CrlIdentifier.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/esf/CrlIdentifier.cs')
-rw-r--r--crypto/src/asn1/esf/CrlIdentifier.cs16
1 files changed, 7 insertions, 9 deletions
diff --git a/crypto/src/asn1/esf/CrlIdentifier.cs b/crypto/src/asn1/esf/CrlIdentifier.cs
index 29003260a..7d6225c63 100644
--- a/crypto/src/asn1/esf/CrlIdentifier.cs
+++ b/crypto/src/asn1/esf/CrlIdentifier.cs
@@ -2,7 +2,6 @@ using System;
 
 using Org.BouncyCastle.Asn1.X509;
 using Org.BouncyCastle.Math;
-using Org.BouncyCastle.Utilities;
 
 namespace Org.BouncyCastle.Asn1.Esf
 {
@@ -28,18 +27,17 @@ namespace Org.BouncyCastle.Asn1.Esf
 		{
 			if (obj == null)
 				return null;
-
 			if (obj is CrlIdentifier crlIdentifier)
                 return crlIdentifier;
-
-			if (obj is Asn1Sequence asn1Sequence)
-				return new CrlIdentifier(asn1Sequence);
-
-			throw new ArgumentException("Unknown object in 'CrlIdentifier' factory: " + Platform.GetTypeName(obj),
-				nameof(obj));
+			return new CrlIdentifier(Asn1Sequence.GetInstance(obj));
 		}
 
-		private CrlIdentifier(Asn1Sequence seq)
+        public static CrlIdentifier GetInstance(Asn1TaggedObject taggedObject, bool declaredExplicit)
+        {
+            return GetInstance(Asn1Sequence.GetInstance(taggedObject, declaredExplicit));
+        }
+
+        private CrlIdentifier(Asn1Sequence seq)
 		{
 			if (seq == null)
 				throw new ArgumentNullException(nameof(seq));