summary refs log tree commit diff
path: root/crypto/src/asn1/x500/DirectoryString.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--crypto/src/asn1/x500/DirectoryString.cs13
1 files changed, 4 insertions, 9 deletions
diff --git a/crypto/src/asn1/x500/DirectoryString.cs b/crypto/src/asn1/x500/DirectoryString.cs
index 6585fcdf5..154e4940e 100644
--- a/crypto/src/asn1/x500/DirectoryString.cs
+++ b/crypto/src/asn1/x500/DirectoryString.cs
@@ -29,15 +29,10 @@ namespace Org.BouncyCastle.Asn1.X500
             throw new ArgumentException("unknown object in factory: " + Platform.GetTypeName(obj), "obj");
 		}
 
-		public static DirectoryString GetInstance(
-			Asn1TaggedObject	obj,
-			bool				isExplicit)
-		{
-			if (!isExplicit)
-				throw new ArgumentException("choice item must be explicitly tagged");
-
-			return GetInstance(obj.GetObject());
-		}
+        public static DirectoryString GetInstance(Asn1TaggedObject obj, bool isExplicit)
+        {
+            return Asn1Utilities.GetInstanceFromChoice(obj, isExplicit, GetInstance);
+        }
 
 		private DirectoryString(
 			DerStringBase str)