Package netscape.security.extensions
Class CertificateRenewalWindowExtension
- java.lang.Object
-
- netscape.security.x509.Extension
-
- netscape.security.extensions.CertificateRenewalWindowExtension
-
- All Implemented Interfaces:
java.io.Serializable
,CertAttrSet
public class CertificateRenewalWindowExtension extends Extension implements CertAttrSet
This represents the CertificateRenewalWindow extension as defined in draft-thayes-cert-renewal-00 CertificateRenewalWindow ::= SEQUENCE { beginTime GeneralizedTime, endTime GeneralizedTime OPTIONAL }- Version:
- $Revision$, $Date$
- Author:
- thomask
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static ObjectIdentifier
ID
static java.lang.String
NAME
static int[]
OID
-
Fields inherited from class netscape.security.x509.Extension
critical, extensionId, extensionValue
-
-
Constructor Summary
Constructors Constructor Description CertificateRenewalWindowExtension(boolean critical)
CertificateRenewalWindowExtension(boolean critical, java.util.Date beginTime, java.util.Date endTime)
CertificateRenewalWindowExtension(java.lang.Boolean critical, java.lang.Object value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
decode(java.io.InputStream in)
Decodes this extension.void
delete(java.lang.String name)
Deletes attribute.void
encode(java.io.OutputStream out)
Write the extension to the DerOutputStream.java.lang.Object
get(java.lang.String name)
Retrieves extension attribute.java.util.Enumeration<java.lang.String>
getAttributeNames()
Return an enumeration of names of attributes existing within this attribute.java.util.Date
getBeginTime()
java.util.Date
getEndTime()
java.lang.String
getName()
Returns the name (identifier) of this CertAttrSet.void
set(java.lang.String name, java.lang.Object obj)
Sets extension attribute.void
setBeginTime(java.util.Date d)
void
setEndTime(java.util.Date d)
java.lang.String
toString()
Returns a printable representation of the CertificateRenewalWindow.-
Methods inherited from class netscape.security.x509.Extension
clearValue, encode, getExtensionId, getExtensionValue, isCritical, setCritical, setExtensionId, setExtensionValue
-
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
OID
public static final int[] OID
-
ID
public static final ObjectIdentifier ID
-
-
Constructor Detail
-
CertificateRenewalWindowExtension
public CertificateRenewalWindowExtension(boolean critical, java.util.Date beginTime, java.util.Date endTime) throws java.io.IOException
- Throws:
java.io.IOException
-
CertificateRenewalWindowExtension
public CertificateRenewalWindowExtension(boolean critical)
-
CertificateRenewalWindowExtension
public CertificateRenewalWindowExtension(java.lang.Boolean critical, java.lang.Object value) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:CertAttrSet
Returns the name (identifier) of this CertAttrSet.- Specified by:
getName
in interfaceCertAttrSet
- Returns:
- the name of this CertAttrSet.
-
set
public void set(java.lang.String name, java.lang.Object obj) throws java.security.cert.CertificateException
Sets extension attribute.- Specified by:
set
in interfaceCertAttrSet
- Parameters:
name
- the name of the attribute (e.g. "x509.info.key")obj
- the attribute object.- Throws:
java.security.cert.CertificateException
- on attribute handling errors.
-
get
public java.lang.Object get(java.lang.String name) throws java.security.cert.CertificateException
Retrieves extension attribute.- Specified by:
get
in interfaceCertAttrSet
- Parameters:
name
- the name of the attribute to return.- Throws:
java.security.cert.CertificateException
- on attribute handling errors.
-
delete
public void delete(java.lang.String name) throws java.security.cert.CertificateException
Deletes attribute.- Specified by:
delete
in interfaceCertAttrSet
- Parameters:
name
- the name of the attribute to delete.- Throws:
java.security.cert.CertificateException
- on attribute handling errors.
-
decode
public void decode(java.io.InputStream in) throws java.io.IOException
Decodes this extension.- Specified by:
decode
in interfaceCertAttrSet
- Parameters:
in
- the InputStream to read the encoded attribute from.- Throws:
java.io.IOException
- on other errors.
-
getAttributeNames
public java.util.Enumeration<java.lang.String> getAttributeNames()
Return an enumeration of names of attributes existing within this attribute.- Specified by:
getAttributeNames
in interfaceCertAttrSet
- Returns:
- an enumeration of the attribute names.
-
getBeginTime
public java.util.Date getBeginTime()
-
getEndTime
public java.util.Date getEndTime()
-
setBeginTime
public void setBeginTime(java.util.Date d)
-
setEndTime
public void setEndTime(java.util.Date d)
-
encode
public void encode(java.io.OutputStream out) throws java.io.IOException
Write the extension to the DerOutputStream.- Specified by:
encode
in interfaceCertAttrSet
- Parameters:
out
- the DerOutputStream to write the extension to.- Throws:
java.io.IOException
- on encoding errors.
-
toString
public java.lang.String toString()
Returns a printable representation of the CertificateRenewalWindow.- Specified by:
toString
in interfaceCertAttrSet
- Overrides:
toString
in classExtension
- Returns:
- value of this certificate attribute in printable form.
-
-