diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2015-12-28 17:50:36 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2015-12-28 17:50:36 +0700 |
commit | 5cf99df42f7ee75979a0d7243b79eff844fdbcfd (patch) | |
tree | f4c8f4fb227ee1ce056541f14270652941794313 /crypto/src/asn1/DERExternal.cs | |
parent | Clean up a few warnings (diff) | |
download | BouncyCastle.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.cs | 15 |
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; |