summary refs log tree commit diff
path: root/crypto/src/asn1/DERExternal.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2015-12-28 17:50:36 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2015-12-28 17:50:36 +0700
commit5cf99df42f7ee75979a0d7243b79eff844fdbcfd (patch)
treef4c8f4fb227ee1ce056541f14270652941794313 /crypto/src/asn1/DERExternal.cs
parentClean up a few warnings (diff)
downloadBouncyCastle.NET-ed25519-5cf99df42f7ee75979a0d7243b79eff844fdbcfd.tar.xz
Various ASN.1 updates from Java API
Diffstat (limited to 'crypto/src/asn1/DERExternal.cs')
-rw-r--r--crypto/src/asn1/DERExternal.cs15
1 files changed, 5 insertions, 10 deletions
diff --git a/crypto/src/asn1/DERExternal.cs b/crypto/src/asn1/DERExternal.cs
index a342d6520..c29975193 100644
--- a/crypto/src/asn1/DERExternal.cs
+++ b/crypto/src/asn1/DERExternal.cs
@@ -34,25 +34,20 @@ namespace Org.BouncyCastle.Asn1
 				offset++;
 				enc = GetObjFromVector(vector, offset);
 			}
-			if (!(enc is DerTaggedObject))
+			if (!(enc is Asn1TaggedObject))
 			{
-				dataValueDescriptor = (Asn1Object) enc;
+				dataValueDescriptor = enc;
 				offset++;
 				enc = GetObjFromVector(vector, offset);
 			}
-			if (!(enc is DerTaggedObject))
-			{
-				throw new InvalidOperationException(
-					"No tagged object found in vector. Structure doesn't seem to be of type External");
-			}
 
-			if (vector.Count != offset + 1)
+            if (vector.Count != offset + 1)
 				throw new ArgumentException("input vector too large", "vector");
 
-			if (!(enc is DerTaggedObject))
+            if (!(enc is Asn1TaggedObject))
 				throw new ArgumentException("No tagged object found in vector. Structure doesn't seem to be of type External", "vector");
 
-			DerTaggedObject obj = (DerTaggedObject)enc;
+            Asn1TaggedObject obj = (Asn1TaggedObject)enc;
 
 			// Use property accessor to include check on value
 			Encoding = obj.TagNo;