summary refs log tree commit diff
path: root/crypto/src/asn1/x509/TBSCertList.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/x509/TBSCertList.cs')
-rw-r--r--crypto/src/asn1/x509/TBSCertList.cs10
1 files changed, 4 insertions, 6 deletions
diff --git a/crypto/src/asn1/x509/TBSCertList.cs b/crypto/src/asn1/x509/TBSCertList.cs
index 009773e79..4cfb44c90 100644
--- a/crypto/src/asn1/x509/TBSCertList.cs
+++ b/crypto/src/asn1/x509/TBSCertList.cs
@@ -169,21 +169,19 @@ namespace Org.BouncyCastle.Asn1.X509
             throw new ArgumentException("unknown object in factory: " + Platform.GetTypeName(obj), "obj");
         }
 
-		internal TbsCertificateList(
-            Asn1Sequence seq)
+		internal TbsCertificateList(Asn1Sequence seq)
         {
 			if (seq.Count < 3 || seq.Count > 7)
-			{
 				throw new ArgumentException("Bad sequence size: " + seq.Count);
-			}
 
 			int seqPos = 0;
 
 			this.seq = seq;
 
-			if (seq[seqPos] is DerInteger)
+			if (seq[seqPos] is DerInteger derInteger)
             {
-				version = DerInteger.GetInstance(seq[seqPos++]);
+				version = derInteger;
+				++seqPos;
 			}
             else
             {