summary refs log tree commit diff
path: root/crypto/src/asn1/ASN1StreamParser.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2014-01-21 19:43:45 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2014-01-21 19:43:45 +0700
commite881ee06950d623a7678cda637ebd39dd33658fa (patch)
tree63d04a0b3229b35db606e736506943cb55170b51 /crypto/src/asn1/ASN1StreamParser.cs
parentBMA-118 (diff)
downloadBouncyCastle.NET-ed25519-e881ee06950d623a7678cda637ebd39dd33658fa.tar.xz
Stop using DerUnknownTag (throw exceptions during parsing instead)
Diffstat (limited to 'crypto/src/asn1/ASN1StreamParser.cs')
-rw-r--r--crypto/src/asn1/ASN1StreamParser.cs5
1 files changed, 2 insertions, 3 deletions
diff --git a/crypto/src/asn1/ASN1StreamParser.cs b/crypto/src/asn1/ASN1StreamParser.cs
index a5e6e3164..0c6b4413a 100644
--- a/crypto/src/asn1/ASN1StreamParser.cs
+++ b/crypto/src/asn1/ASN1StreamParser.cs
@@ -187,9 +187,8 @@ namespace Org.BouncyCastle.Asn1
 						case Asn1Tags.External:
 							return new DerExternalParser(new Asn1StreamParser(defIn));
 						default:
-							// TODO Add DerUnknownTagParser class?
-							return new DerUnknownTag(true, tagNo, defIn.ToArray());
-					}
+                            throw new IOException("unknown tag " + tagNo + " encountered");
+                    }
 				}
 
 				// Some primitive encodings can be handled by parsers too...