Esempio n. 1
0
        private CertResponse(Asn1Sequence seq)
        {
            certReqId = DerInteger.GetInstance(seq[0]);
            status    = PkiStatusInfo.GetInstance(seq[1]);

            if (seq.Count >= 3)
            {
                if (seq.Count == 3)
                {
                    Asn1Encodable o = seq[2];
                    if (o is Asn1OctetString)
                    {
                        rspInfo = Asn1OctetString.GetInstance(o);
                    }
                    else
                    {
                        certifiedKeyPair = CertifiedKeyPair.GetInstance(o);
                    }
                }
                else
                {
                    certifiedKeyPair = CertifiedKeyPair.GetInstance(seq[2]);
                    rspInfo          = Asn1OctetString.GetInstance(seq[3]);
                }
            }
        }
Esempio n. 2
0
        public virtual CertifiedKeyPair[] GetKeyPairHist()
        {
            if (keyPairHist == null)
            {
                return(null);
            }

            CertifiedKeyPair[] results = new CertifiedKeyPair[keyPairHist.Count];
            for (int i = 0; i != results.Length; ++i)
            {
                results[i] = CertifiedKeyPair.GetInstance(keyPairHist[i]);
            }
            return(results);
        }
Esempio n. 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;
        }