java.lang.Object | ||
↳ | sun.security.x509.Extension | |
↳ | sun.security.x509.PrivateKeyUsageExtension |
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 }
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | IDENT | Identifier for this attribute, to be used with the get, set, delete methods of Certificate, x509 type. | |||||||||
String | NAME | Sub attributes name for this CertAttrSet. | |||||||||
String | NOT_AFTER | ||||||||||
String | NOT_BEFORE |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
The default constructor for PrivateKeyUsageExtension.
| |||||||||||
Create the extension from the passed DER encoded value.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Delete the attribute value.
| |||||||||||
Write the extension to the OutputStream.
| |||||||||||
Get the attribute value.
| |||||||||||
Return an enumeration of names of attributes existing within this
attribute.
| |||||||||||
Return the name of this attribute.
| |||||||||||
Set the attribute value.
| |||||||||||
Return the printable string.
| |||||||||||
Verify that that the current time is within the validity period.
| |||||||||||
Verify that that the passed time is within the validity period.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Identifier for this attribute, to be used with the get, set, delete methods of Certificate, x509 type.
Sub attributes name for this CertAttrSet.
The default constructor for PrivateKeyUsageExtension.
notBefore | the date/time before which the private key should not be used. |
---|---|
notAfter | the date/time after which the private key should not be used. |
IOException |
---|
Create the extension from the passed DER encoded value.
critical | true if the extension is to be treated as critical. |
---|---|
value | an array of DER encoded bytes of the actual value. |
ClassCastException | if value is not an array of bytes |
---|---|
CertificateException | on certificate parsing errors. |
IOException | on error. |
Delete the attribute value.
name | the name of the attribute to delete. |
---|
CertificateException | on attribute handling errors. |
---|---|
IOException |
Write the extension to the OutputStream.
out | the OutputStream to write the extension to. |
---|
IOException | on encoding errors. |
---|
Get the attribute value.
name | the name of the attribute to return. |
---|
CertificateException | on attribute handling errors. |
---|
Return an enumeration of names of attributes existing within this attribute.
Set the attribute value.
name | the name of the attribute (e.g. "x509.info.key") |
---|---|
obj | the attribute object. |
CertificateException | on attribute handling errors. |
---|---|
IOException |
Return the printable string.
Verify that that the current time is within the validity period.
CertificateExpiredException | if the certificate has expired. |
---|---|
CertificateNotYetValidException | if the certificate is not yet valid. |
Verify that that the passed time is within the validity period.
CertificateExpiredException | if the certificate has expired
with respect to the Date supplied. |
---|---|
CertificateNotYetValidException | if the certificate is not
yet valid with respect to the Date supplied.
|