Example #1
0
 private CertResponse(Asn1Sequence seq)
 {
     certReqId = DerInteger.GetInstance(seq[0]);
     status    = PkiStatusInfo.GetInstance(seq[1]);
     if (seq.Count < 3)
     {
         return;
     }
     if (seq.Count == 3)
     {
         Asn1Encodable asn1Encodable = seq[2];
         if (asn1Encodable is Asn1OctetString)
         {
             rspInfo = Asn1OctetString.GetInstance(asn1Encodable);
         }
         else
         {
             certifiedKeyPair = CertifiedKeyPair.GetInstance(asn1Encodable);
         }
     }
     else
     {
         certifiedKeyPair = CertifiedKeyPair.GetInstance(seq[2]);
         rspInfo          = Asn1OctetString.GetInstance(seq[3]);
     }
 }
 public virtual CertifiedKeyPair[] GetKeyPairHist()
 {
     if (keyPairHist == null)
     {
         return(null);
     }
     CertifiedKeyPair[] array = new CertifiedKeyPair[keyPairHist.Count];
     for (int i = 0; i != array.Length; i++)
     {
         array[i] = CertifiedKeyPair.GetInstance(keyPairHist[i]);
     }
     return(array);
 }
Example #3
0
 public CertResponse(DerInteger certReqId, PkiStatusInfo status, CertifiedKeyPair certifiedKeyPair, Asn1OctetString rspInfo)
 {
     if (certReqId == null)
     {
         throw new ArgumentNullException("certReqId");
     }
     if (status == null)
     {
         throw new ArgumentNullException("status");
     }
     this.certReqId        = certReqId;
     this.status           = status;
     this.certifiedKeyPair = certifiedKeyPair;
     this.rspInfo          = rspInfo;
 }