| java.lang.Object sun.security.x509.Extension sun.security.x509.PrivateKeyUsageExtension
PrivateKeyUsageExtension | public class PrivateKeyUsageExtension extends Extension implements CertAttrSet(Code) | | This class defines the Private Key Usage Extension.
The Private Key Usage Period extension allows the certificate issuer
to specify a different validity period for the private key than the
certificate. This extension is intended for use with digital
signature keys. This extension consists of two optional components
notBefore and notAfter. The private key associated with the
certificate should not be used to sign objects before or after the
times specified by the two components, respectively.
PrivateKeyUsagePeriod ::= SEQUENCE {
notBefore [0] GeneralizedTime OPTIONAL,
notAfter [1] GeneralizedTime OPTIONAL }
author: Amit Kapoor author: Hemma Prafullchandra version: 1.17 See Also: Extension See Also: CertAttrSet |
Field Summary | |
final public static String | IDENT Identifier for this attribute, to be used with the
get, set, delete methods of Certificate, x509 type. | final public static String | NAME Sub attributes name for this CertAttrSet. | final public static String | NOT_AFTER | final public static String | NOT_BEFORE |
Method Summary | |
public void | decode(InputStream in) Decode the extension from the InputStream. | public void | delete(String name) Delete the attribute value. | public void | encode(OutputStream out) Write the extension to the OutputStream. | public Object | get(String name) Get the attribute value. | public Enumeration | getElements() Return an enumeration of names of attributes existing within this
attribute. | public String | getName() Return the name of this attribute. | public void | set(String name, Object obj) Set the attribute value. | public String | toString() Return the printable string. | public void | valid() Verify that that the current time is within the validity period. | public void | valid(Date now) Verify that that the passed time is within the validity period. |
IDENT | final public static String IDENT(Code) | | Identifier for this attribute, to be used with the
get, set, delete methods of Certificate, x509 type.
|
NAME | final public static String NAME(Code) | | Sub attributes name for this CertAttrSet.
|
PrivateKeyUsageExtension | public PrivateKeyUsageExtension(Date notBefore, Date notAfter) throws IOException(Code) | | The default constructor for PrivateKeyUsageExtension.
Parameters: notBefore - the date/time before which the private keyshould not be used. Parameters: notAfter - the date/time after which the private keyshould not be used. |
PrivateKeyUsageExtension | public PrivateKeyUsageExtension(Boolean critical, Object value) throws CertificateException, IOException(Code) | | Create the extension from the passed DER encoded value.
Parameters: critical - true if the extension is to be treated as critical. Parameters: value - Array of DER encoded bytes of the actual value. exception: CertificateException - on certificate parsing errors. exception: IOException - on error. |
encode | public void encode(OutputStream out) throws IOException(Code) | | Write the extension to the OutputStream.
Parameters: out - the OutputStream to write the extension to. exception: IOException - on encoding errors. |
getElements | public Enumeration getElements()(Code) | | Return an enumeration of names of attributes existing within this
attribute.
|
getName | public String getName()(Code) | | Return the name of this attribute.
|
toString | public String toString()(Code) | | Return the printable string.
|
|
|