Example #1
0
 private Request(Asn1Sequence seq)
 {
     reqCert = CertID.GetInstance(seq[0]);
     if (seq.Count == 2)
     {
         singleRequestExtensions = X509Extensions.GetInstance((Asn1TaggedObject)seq[1], explicitly: true);
     }
 }
 public SingleResponse(Asn1Sequence seq)
 {
     certID     = CertID.GetInstance(seq[0]);
     certStatus = CertStatus.GetInstance(seq[1]);
     thisUpdate = (DerGeneralizedTime)seq[2];
     if (seq.Count > 4)
     {
         nextUpdate       = DerGeneralizedTime.GetInstance((Asn1TaggedObject)seq[3], isExplicit: true);
         singleExtensions = X509Extensions.GetInstance((Asn1TaggedObject)seq[4], explicitly: true);
     }
     else if (seq.Count > 3)
     {
         Asn1TaggedObject asn1TaggedObject = (Asn1TaggedObject)seq[3];
         if (asn1TaggedObject.TagNo == 0)
         {
             nextUpdate = DerGeneralizedTime.GetInstance(asn1TaggedObject, isExplicit: true);
         }
         else
         {
             singleExtensions = X509Extensions.GetInstance(asn1TaggedObject, explicitly: true);
         }
     }
 }