Example #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]);
                }
            }
        }
Example #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);
        }