public AttCertValidityPeriod( DerGeneralizedTime notBeforeTime, DerGeneralizedTime notAfterTime) { this.notBeforeTime = notBeforeTime; this.notAfterTime = notAfterTime; }
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); } } }
private ResponseObject( CertificateID certId, CertificateStatus certStatus, DerGeneralizedTime thisUpdate, DerGeneralizedTime nextUpdate, X509Extensions extensions) { this.certId = certId; if (certStatus == null) { this.certStatus = new CertStatus(); } else if (certStatus is UnknownStatus) { this.certStatus = new CertStatus(2, DerNull.Instance); } else { RevokedStatus rs = (RevokedStatus) certStatus; CrlReason revocationReason = rs.HasRevocationReason ? new CrlReason(rs.RevocationReason) : null; this.certStatus = new CertStatus( new RevokedInfo(new DerGeneralizedTime(rs.RevocationTime), revocationReason)); } this.thisUpdate = thisUpdate; this.nextUpdate = nextUpdate; this.extensions = extensions; }
public ResponseData( ResponderID responderID, DerGeneralizedTime producedAt, Asn1Sequence responses, X509Extensions responseExtensions) : this(V1, responderID, producedAt, responses, responseExtensions) { }
public KekIdentifier( byte[] keyIdentifier, DerGeneralizedTime date, OtherKeyAttribute other) { this.keyIdentifier = new DerOctetString(keyIdentifier); this.date = date; this.other = other; }
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; }
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 RevokedInfo( DerGeneralizedTime revocationTime, CrlReason revocationReason) { if (revocationTime == null) throw new ArgumentNullException("revocationTime"); this.revocationTime = revocationTime; this.revocationReason = revocationReason; }
private RevokedInfo( Asn1Sequence seq) { this.revocationTime = (DerGeneralizedTime) seq[0]; if (seq.Count > 1) { this.revocationReason = new CrlReason( DerEnumerated.GetInstance((Asn1TaggedObject) seq[1], true)); } }
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; }
public ResponseData( DerInteger version, ResponderID responderID, DerGeneralizedTime producedAt, Asn1Sequence responses, X509Extensions responseExtensions) { this.version = version; this.responderID = responderID; this.producedAt = producedAt; this.responses = responses; this.responseExtensions = responseExtensions; }
private ResponseData( Asn1Sequence seq) { int index = 0; Asn1Encodable enc = seq[0]; if (enc is Asn1TaggedObject) { Asn1TaggedObject o = (Asn1TaggedObject)enc; if (o.TagNo == 0) { this.versionPresent = true; this.version = DerInteger.GetInstance(o, true); index++; } else { this.version = V1; } } else { this.version = V1; } this.responderID = ResponderID.GetInstance(seq[index++]); this.producedAt = (DerGeneralizedTime)seq[index++]; this.responses = (Asn1Sequence)seq[index++]; if (seq.Count > index) { this.responseExtensions = X509Extensions.GetInstance( (Asn1TaggedObject)seq[index], true); } }
public RevokedInfo( DerGeneralizedTime revocationTime) : this(revocationTime, null) { }