summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2019-08-04 18:01:42 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2019-08-04 18:01:42 +0700
commit6a213f082a8220067a5a443a047b57e2bf209c07 (patch)
tree43c23c64556a698ba5947b42dd34d3ff6c09b804
parentMisc. ASN.1 updates (diff)
downloadBouncyCastle.NET-ed25519-6a213f082a8220067a5a443a047b57e2bf209c07.tar.xz
Use GetInstance instead of cast
-rw-r--r--crypto/src/asn1/x509/TBSCertificateStructure.cs3
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/src/asn1/x509/TBSCertificateStructure.cs b/crypto/src/asn1/x509/TBSCertificateStructure.cs
index da378391e..8f091087e 100644
--- a/crypto/src/asn1/x509/TBSCertificateStructure.cs
+++ b/crypto/src/asn1/x509/TBSCertificateStructure.cs
@@ -121,8 +121,7 @@ namespace Org.BouncyCastle.Asn1.X509
 
             while (extras > 0)
 			{
-				DerTaggedObject extra = (DerTaggedObject)seq[seqStart + 6 + extras];
-
+                Asn1TaggedObject extra = Asn1TaggedObject.GetInstance(seq[seqStart + 6 + extras]);
 				switch (extra.TagNo)
 				{
 				case 1: