From 6a213f082a8220067a5a443a047b57e2bf209c07 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Sun, 4 Aug 2019 18:01:42 +0700 Subject: Use GetInstance instead of cast --- crypto/src/asn1/x509/TBSCertificateStructure.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'crypto') 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: -- cgit 1.4.1