AttCertValidityPeriod.java
资源名称:security.rar [点击查看]
上传用户:lior1029
上传日期:2013-05-07
资源大小:209k
文件大小:1k
源码类别:
CA认证
开发平台:
Java
- package org.bouncycastle.asn1.x509;
- import org.bouncycastle.asn1.ASN1Sequence;
- import org.bouncycastle.asn1.DERGeneralizedTime;
- import org.bouncycastle.asn1.DERSequence;
- import org.bouncycastle.asn1.DERObject;
- import org.bouncycastle.asn1.DEREncodable;
- import org.bouncycastle.asn1.ASN1EncodableVector;
- public class AttCertValidityPeriod
- implements DEREncodable
- {
- DERGeneralizedTime notBeforeTime;
- DERGeneralizedTime notAfterTime;
- public AttCertValidityPeriod(
- ASN1Sequence seq)
- {
- notBeforeTime = (DERGeneralizedTime)seq.getObjectAt(0);
- notAfterTime = (DERGeneralizedTime)seq.getObjectAt(1);
- }
- public DERGeneralizedTime getNotBeforeTime()
- {
- return notBeforeTime;
- }
- public DERGeneralizedTime getNotAfterTime()
- {
- return notAfterTime;
- }
- /**
- * <pre>
- * AttCertValidityPeriod ::= SEQUENCE {
- * notBeforeTime GeneralizedTime,
- * notAfterTime GeneralizedTime
- * }
- * </pre>
- */
- public DERObject getDERObject()
- {
- ASN1EncodableVector v = new ASN1EncodableVector();
- v.add(notBeforeTime);
- v.add(notAfterTime);
- return new DERSequence(v);
- }
- }