be.cardon.asn1.x509
Class PrivateKeyUsagePeriod

java.lang.Object
  extended by ASN1Encodable
      extended by be.cardon.asn1.x509.PrivateKeyUsagePeriod

public class PrivateKeyUsagePeriod
extends ASN1Encodable

Implements the PrivateKeyUsagePeriod extension from RFC 3280.

  id-ce-privateKeyUsagePeriod OBJECT IDENTIFIER ::=  { id-ce 16 }

  PrivateKeyUsagePeriod ::= SEQUENCE {
       notBefore       [0]     GeneralizedTime OPTIONAL,
       notAfter        [1]     GeneralizedTime OPTIONAL }


Field Summary
static DERObjectIdentifier OID
          PrivateKeyUsagePeriod ObjectID.
 
Constructor Summary
PrivateKeyUsagePeriod(ASN1Sequence seq)
          Constructor.
PrivateKeyUsagePeriod(DERGeneralizedTime notBefore, DERGeneralizedTime notAfter)
          Constructor.
 
Method Summary
static PrivateKeyUsagePeriod getInstance(java.lang.Object obj)
           
 DERGeneralizedTime getNotAfter()
          Returns notAfter ASN.1 Object or null if not present.
 java.util.Date getNotAfterDate()
          Returns notAfter ASN.1 Obejct as Date, or null if not present.
 java.util.Date getNotBeforeDate()
          Returns notBefore as Date, or null if not present.
 DERGeneralizedTime getNoteBefore()
          Returns notBefore ASN.1 Object, or null if not present.
 DERObject toASN1Object()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OID

public static final DERObjectIdentifier OID
PrivateKeyUsagePeriod ObjectID.

Constructor Detail

PrivateKeyUsagePeriod

public PrivateKeyUsagePeriod(DERGeneralizedTime notBefore,
                             DERGeneralizedTime notAfter)
Constructor.


PrivateKeyUsagePeriod

public PrivateKeyUsagePeriod(ASN1Sequence seq)
Constructor.

Method Detail

getInstance

public static PrivateKeyUsagePeriod getInstance(java.lang.Object obj)

getNoteBefore

public DERGeneralizedTime getNoteBefore()
Returns notBefore ASN.1 Object, or null if not present.


getNotBeforeDate

public java.util.Date getNotBeforeDate()
                                throws java.text.ParseException
Returns notBefore as Date, or null if not present.

Throws:
java.text.ParseException

getNotAfter

public DERGeneralizedTime getNotAfter()
Returns notAfter ASN.1 Object or null if not present.


getNotAfterDate

public java.util.Date getNotAfterDate()
                               throws java.text.ParseException
Returns notAfter ASN.1 Obejct as Date, or null if not present.

Throws:
java.text.ParseException

toASN1Object

public DERObject toASN1Object()

toString

public java.lang.String toString()