public AttCertValidityPeriod(
     DerGeneralizedTime	notBeforeTime,
     DerGeneralizedTime	notAfterTime)
 {
     this.notBeforeTime = notBeforeTime;
     this.notAfterTime = notAfterTime;
 }
Exemplo n.º 2
0
        public KekIdentifier(
            Asn1Sequence seq)
        {
            keyIdentifier = (Asn1OctetString) seq[0];

            switch (seq.Count)
            {
            case 1:
                break;
            case 2:
                if (seq[1] is DerGeneralizedTime)
                {
                    date = (DerGeneralizedTime) seq[1];
                }
                else
                {
                    other = OtherKeyAttribute.GetInstance(seq[2]);
                }
                break;
            case 3:
                date  = (DerGeneralizedTime) seq[1];
                other = OtherKeyAttribute.GetInstance(seq[2]);
                break;
            default:
                throw new ArgumentException("Invalid KekIdentifier");
            }
        }
        public SingleResponse(
            Asn1Sequence seq)
        {
            this.certID = CertID.GetInstance(seq[0]);
            this.certStatus = CertStatus.GetInstance(seq[1]);
            this.thisUpdate = (DerGeneralizedTime)seq[2];

            if (seq.Count > 4)
            {
                this.nextUpdate = DerGeneralizedTime.GetInstance(
                    (Asn1TaggedObject) seq[3], true);
                this.singleExtensions = X509Extensions.GetInstance(
                    (Asn1TaggedObject) seq[4], true);
            }
            else if (seq.Count > 3)
            {
                Asn1TaggedObject o = (Asn1TaggedObject) seq[3];

                if (o.TagNo == 0)
                {
                    this.nextUpdate = DerGeneralizedTime.GetInstance(o, true);
                }
                else
                {
                    this.singleExtensions = X509Extensions.GetInstance(o, true);
                }
            }
        }
Exemplo n.º 4
0
 public KekIdentifier(
     byte[]              keyIdentifier,
     DerGeneralizedTime  date,
     OtherKeyAttribute   other)
 {
     this.keyIdentifier = new DerOctetString(keyIdentifier);
     this.date = date;
     this.other = other;
 }
        private AttCertValidityPeriod(
            Asn1Sequence seq)
        {
            if (seq.Count != 2)
                throw new ArgumentException("Bad sequence size: " + seq.Count);

            notBeforeTime = DerGeneralizedTime.GetInstance(seq[0]);
            notAfterTime = DerGeneralizedTime.GetInstance(seq[1]);
        }
 public RecipientKeyIdentifier(
     byte[]				subjectKeyIdentifier,
     DerGeneralizedTime	date,
     OtherKeyAttribute	other)
 {
     this.subjectKeyIdentifier = new DerOctetString(subjectKeyIdentifier);
     this.date = date;
     this.other = other;
 }
 public RecipientKeyIdentifier(
     Asn1OctetString         subjectKeyIdentifier,
     DerGeneralizedTime      date,
     OtherKeyAttribute       other)
 {
     this.subjectKeyIdentifier = subjectKeyIdentifier;
     this.date = date;
     this.other = other;
 }
Exemplo n.º 8
0
        public RevokedInfo(
            DerGeneralizedTime  revocationTime,
            CrlReason           revocationReason)
        {
            if (revocationTime == null)
                throw new ArgumentNullException("revocationTime");

            this.revocationTime = revocationTime;
            this.revocationReason = revocationReason;
        }
Exemplo n.º 9
0
        private RevokedInfo(
            Asn1Sequence seq)
        {
            this.revocationTime = (DerGeneralizedTime) seq[0];

            if (seq.Count > 1)
            {
                this.revocationReason = new CrlReason(
                    DerEnumerated.GetInstance((Asn1TaggedObject) seq[1], true));
            }
        }
Exemplo n.º 10
0
 public SingleResponse(
     CertID              certID,
     CertStatus          certStatus,
     DerGeneralizedTime  thisUpdate,
     DerGeneralizedTime  nextUpdate,
     X509Extensions      singleExtensions)
 {
     this.certID = certID;
     this.certStatus = certStatus;
     this.thisUpdate = thisUpdate;
     this.nextUpdate = nextUpdate;
     this.singleExtensions = singleExtensions;
 }
Exemplo n.º 11
0
 public RevokedInfo(
     DerGeneralizedTime revocationTime)
     : this(revocationTime, null)
 {
 }