public CrlEntry( Asn1Sequence seq) { if (seq.Count < 2 || seq.Count > 3) { throw new ArgumentException("Bad sequence size: " + seq.Count); } this.seq = seq; userCertificate = DerInteger.GetInstance(seq[0]); revocationDate = Time.GetInstance(seq[1]); }
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) { version = DerInteger.GetInstance(seq[seqPos++]); } else { version = new DerInteger(0); } signature = AlgorithmIdentifier.GetInstance(seq[seqPos++]); issuer = X509Name.GetInstance(seq[seqPos++]); thisUpdate = Time.GetInstance(seq[seqPos++]); if (seqPos < seq.Count && (seq[seqPos] is DerUtcTime || seq[seqPos] is DerGeneralizedTime || seq[seqPos] is Time)) { nextUpdate = Time.GetInstance(seq[seqPos++]); } if (seqPos < seq.Count && !(seq[seqPos] is DerTaggedObject)) { revokedCertificates = Asn1Sequence.GetInstance(seq[seqPos++]); } if (seqPos < seq.Count && seq[seqPos] is DerTaggedObject) { crlExtensions = X509Extensions.GetInstance(seq[seqPos]); } }