java.lang.Object | ||
↳ | sun.security.x509.Extension | |
↳ | sun.security.x509.KeyUsageExtension |
Represent the Key Usage Extension.
This extension, if present, defines the purpose (e.g., encipherment, signature, certificate signing) of the key contained in the certificate. The usage restriction might be employed when a multipurpose key is to be restricted (e.g., when an RSA key should be used only for signing or only for key encipherment).
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | CRL_SIGN | ||||||||||
String | DATA_ENCIPHERMENT | ||||||||||
String | DECIPHER_ONLY | ||||||||||
String | DIGITAL_SIGNATURE | ||||||||||
String | ENCIPHER_ONLY | ||||||||||
String | IDENT | Identifier for this attribute, to be used with the get, set, delete methods of Certificate, x509 type. | |||||||||
String | KEY_AGREEMENT | ||||||||||
String | KEY_CERTSIGN | ||||||||||
String | KEY_ENCIPHERMENT | ||||||||||
String | NAME | Attribute names. | |||||||||
String | NON_REPUDIATION |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a KeyUsageExtension with the passed bit settings.
| |||||||||||
Create a KeyUsageExtension with the passed bit settings.
| |||||||||||
Create a KeyUsageExtension with the passed bit settings.
| |||||||||||
Create the extension from the passed DER encoded value of the same.
| |||||||||||
Create a default key usage.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Delete the attribute value.
| |||||||||||
Write the extension to the DerOutputStream.
| |||||||||||
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.
| |||||||||||
Returns a printable representation of the KeyUsage.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Identifier for this attribute, to be used with the get, set, delete methods of Certificate, x509 type.
Create a KeyUsageExtension with the passed bit settings. The criticality is set to true.
bitString | the bits to be set for the extension. |
---|
IOException |
---|
Create a KeyUsageExtension with the passed bit settings. The criticality is set to true.
bitString | the bits to be set for the extension. |
---|
IOException |
---|
Create a KeyUsageExtension with the passed bit settings. The criticality is set to true.
bitString | the bits to be set for the extension. |
---|
IOException |
---|
Create the extension from the passed DER encoded value of the same. The DER encoded value may be wrapped in an OCTET STRING.
critical | true if the extension is to be treated as critical. |
---|---|
value | an array of DER encoded bytes of the actual value (possibly wrapped in an OCTET STRING). |
ClassCastException | if value is not an array of bytes |
---|---|
IOException | on error. |
Create a default key usage.
Write the extension to the DerOutputStream.
out | the DerOutputStream to write the extension to. |
---|
IOException | on encoding 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. |
IOException |
---|
Returns a printable representation of the KeyUsage.