public RevokedInfo( DERGeneralizedTime revocationTime, CRLReason revocationReason) { this.revocationTime = revocationTime; this.revocationReason = revocationReason; }
public KEKIdentifier( ASN1Sequence seq) { keyIdentifier = (ASN1OctetString)seq.getObjectAt(0); switch (seq.size()) { case 1: break; case 2: if (seq.getObjectAt(1) is DERGeneralizedTime) { date = (DERGeneralizedTime)seq.getObjectAt(1); } else { other = OtherKeyAttribute.getInstance(seq.getObjectAt(2)); } break; case 3: date = (DERGeneralizedTime)seq.getObjectAt(1); other = OtherKeyAttribute.getInstance(seq.getObjectAt(2)); break; default: throw new ArgumentException("Invalid KEKIdentifier"); } }
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); } } }
public AttCertValidityPeriod( DERGeneralizedTime notBeforeTime, DERGeneralizedTime notAfterTime) { this.notBeforeTime = notBeforeTime; this.notAfterTime = notAfterTime; }
public ResponseData( ASN1Sequence seq) { int index = 0; if (seq.getObjectAt(0) is ASN1TaggedObject) { ASN1TaggedObject o = (ASN1TaggedObject)seq.getObjectAt(0); if (o.getTagNo() == 0) { this.version = DERInteger.getInstance( (ASN1TaggedObject)seq.getObjectAt(0), true); index++; } else { this.version = null; } } else { this.version = null; } this.responderID = ResponderID.getInstance(seq.getObjectAt(index++)); this.producedAt = (DERGeneralizedTime)seq.getObjectAt(index++); this.responses = (ASN1Sequence)seq.getObjectAt(index++); if (seq.size() > index) { this.responseExtensions = X509Extensions.getInstance( (ASN1TaggedObject)seq.getObjectAt(index), true); } }
public CrlID( ASN1Sequence seq) { IEnumerator e = seq.getObjects(); while (e.MoveNext()) { ASN1TaggedObject o = (ASN1TaggedObject)e.Current; switch ((int)o.getTagNo()) { case 0: crlUrl = DERIA5String.getInstance(o, true); break; case 1: crlNum = DERInteger.getInstance(o, true); break; case 2: crlTime = DERGeneralizedTime.getInstance(o, true); break; default: throw new ArgumentException( "unknown tag number: " + o.getTagNo()); } } }
public KEKIdentifier( byte[] keyIdentifier, DERGeneralizedTime date, OtherKeyAttribute other) { this.keyIdentifier = new DEROctetString(keyIdentifier); this.date = date; this.other = other; }
public RecipientKeyIdentifier( ASN1OctetString subjectKeyIdentifier, DERGeneralizedTime date, OtherKeyAttribute other) { this.subjectKeyIdentifier = subjectKeyIdentifier; this.date = date; this.other = other; }
public RevokedInfo( ASN1Sequence seq) { this.revocationTime = (DERGeneralizedTime)seq.getObjectAt(0); if (seq.size() > 1) { this.revocationReason = new CRLReason(DEREnumerated.getInstance( (ASN1TaggedObject)seq.getObjectAt(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; }
public ResponseObject(CertificateID certId, CertificateStatus certStatus, DateTime thisUpdate, Object nextUpdate, X509Extensions extensions) { this.certId = certId; if (certStatus == null) { this.certStatus = new CertStatus(); } else if (certStatus is UnknownStatus) { this.certStatus = new CertStatus(2, new DERNull()); } else { RevokedStatus rs = (RevokedStatus)certStatus; if (rs.hasRevocationReason()) { this.certStatus = new CertStatus( new RevokedInfo(new DERGeneralizedTime(rs.getRevocationTime()), new CRLReason(rs.getRevocationReason())) ); } else { this.certStatus = new CertStatus( new RevokedInfo(new DERGeneralizedTime(rs.getRevocationTime()), null)); } } this.thisUpdate = new DERGeneralizedTime(thisUpdate); if (nextUpdate != null) { this.nextUpdate = new DERGeneralizedTime((DateTime)nextUpdate); } this.extensions = extensions; }
public void setEndDate( DERGeneralizedTime endDate) { this.endDate = endDate; }
public void setStartDate( DERGeneralizedTime startDate) { this.startDate = startDate; }
public AttCertValidityPeriod( ASN1Sequence seq) { notBeforeTime = (DERGeneralizedTime)seq.getObjectAt(0); notAfterTime = (DERGeneralizedTime)seq.getObjectAt(1); }