Exemple #1
0
        public SingleResponse(
            ASN1Sequence seq)
        {
            this.certID     = CertID.getInstance(seq.getObjectAt(0));
            this.certStatus = CertStatus.getInstance(seq.getObjectAt(1));
            this.thisUpdate = (DERGeneralizedTime)seq.getObjectAt(2);

            if (seq.size() > 4)
            {
                this.nextUpdate = DERGeneralizedTime.getInstance(
                    (ASN1TaggedObject)seq.getObjectAt(3), true);
                this.singleExtensions = X509Extensions.getInstance(
                    (ASN1TaggedObject)seq.getObjectAt(4), true);
            }
            else if (seq.size() > 3)
            {
                ASN1TaggedObject o = (ASN1TaggedObject)seq.getObjectAt(3);

                if (o.getTagNo() == 0)
                {
                    this.nextUpdate = DERGeneralizedTime.getInstance(o, true);
                }
                else
                {
                    this.singleExtensions = X509Extensions.getInstance(o, true);
                }
            }
        }
Exemple #2
0
        public Request(
            ASN1Sequence seq)
        {
            reqCert = CertID.getInstance(seq.getObjectAt(0));

            if (seq.size() == 2)
            {
                singleRequestExtensions = X509Extensions.getInstance(
                    (ASN1TaggedObject)seq.getObjectAt(1), true);
            }
        }