Exemple #1
0
        /**
         * Creates a new CertReqMsg.
         * @param certReq CertRequest
         * @param popo may be null
         * @param regInfo may be null
         */
        public CertReqMsg(
            CertRequest certReq,
            ProofOfPossession popo,
            AttributeTypeAndValue[]     regInfo)
        {
            if (certReq == null)
            {
                throw new ArgumentNullException("certReq");
            }

            this.certReq = certReq;
            this.popo    = popo;

            if (regInfo != null)
            {
                this.regInfo = new DerSequence(regInfo);
            }
        }
Exemple #2
0
        private CertReqMsg(Asn1Sequence seq)
        {
            certReq = CertRequest.GetInstance(seq[0]);

            for (int pos = 1; pos < seq.Count; ++pos)
            {
                object o = seq[pos];

                if (o is Asn1TaggedObject || o is ProofOfPossession)
                {
                    popo = ProofOfPossession.GetInstance(o);
                }
                else
                {
                    regInfo = Asn1Sequence.GetInstance(o);
                }
            }
        }