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).
Extension
| Modifier and Type | Field and Description |
|---|---|
| private boolean[] | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String |
| Access | Constructor and Description |
|---|---|
| public | KeyUsageExtension(byte[]
the bits to be set for the extension. bitString)Create a KeyUsageExtension with the passed bit settings. |
| public | KeyUsageExtension(boolean[]
the bits to be set for the extension. bitString)Create a KeyUsageExtension with the passed bit settings. |
| public | KeyUsageExtension(BitArray
the bits to be set for the extension. bitString)Create a KeyUsageExtension with the passed bit settings. |
| public | KeyUsageExtension(Boolean
true if the extension is to be treated as critical. critical, Object an array of DER encoded bytes of the actual value (possibly
wrapped in an OCTET STRING). value)Create the extension from the passed DER encoded value of the same. |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | encode(DerOutputStream
the DerOutputStream to write the extension to. out)Overrides sun. Implements sun. Write the extension to the DerOutputStream. |
| private void | |
| public boolean | |
| public boolean[] | |
| public String | |
| private boolean | |
| private void | |
| public void | |
| public String | toString()
Overrides sun. Returns a printable representation of the KeyUsage. |
| bitString | back to summary |
|---|---|
| private boolean[] bitString | |
| CRL_SIGN | back to summary |
|---|---|
| public static final String CRL_SIGN | |
| DATA_ENCIPHERMENT | back to summary |
|---|---|
| public static final String DATA_ENCIPHERMENT | |
| DECIPHER_ONLY | back to summary |
|---|---|
| public static final String DECIPHER_ONLY | |
| DIGITAL_SIGNATURE | back to summary |
|---|---|
| public static final String DIGITAL_SIGNATURE | |
| ENCIPHER_ONLY | back to summary |
|---|---|
| public static final String ENCIPHER_ONLY | |
| KEY_AGREEMENT | back to summary |
|---|---|
| public static final String KEY_AGREEMENT | |
| KEY_CERTSIGN | back to summary |
|---|---|
| public static final String KEY_CERTSIGN | |
| KEY_ENCIPHERMENT | back to summary |
|---|---|
| public static final String KEY_ENCIPHERMENT | |
| NAME | back to summary |
|---|---|
| public static final String NAME | |
| NON_REPUDIATION | back to summary |
|---|---|
| public static final String NON_REPUDIATION | |
| KeyUsageExtension | back to summary |
|---|---|
| public KeyUsageExtension(byte[] bitString) Create a KeyUsageExtension with the passed bit settings. The criticality is set to true.
| |
| KeyUsageExtension | back to summary |
|---|---|
| public KeyUsageExtension(boolean[] bitString) Create a KeyUsageExtension with the passed bit settings. The criticality is set to true.
| |
| KeyUsageExtension | back to summary |
|---|---|
| public KeyUsageExtension(BitArray bitString) Create a KeyUsageExtension with the passed bit settings. The criticality is set to true.
| |
| KeyUsageExtension | back to summary |
|---|---|
| public KeyUsageExtension(Boolean critical, Object value) throws IOException Create the extension from the passed DER encoded value of the same. The DER encoded value may be wrapped in an OCTET STRING.
| |
| KeyUsageExtension | back to summary |
|---|---|
| public KeyUsageExtension() Create a default key usage. | |
| encode | back to summary |
|---|---|
| public void encode(DerOutputStream out) Overrides sun. Implements sun. Write the extension to the DerOutputStream.
| |
| encodeThis | back to summary |
|---|---|
| private void encodeThis() | |
| get | back to summary |
|---|---|
| public boolean get(String name) throws IOException Get the attribute value. | |
| getBits | back to summary |
|---|---|
| public boolean[] getBits() | |
| getName | back to summary |
|---|---|
| public String getName() Overrides sun. Return the name of this extension.
| |
| isSet | back to summary |
|---|---|
| private boolean isSet(int position) Check if bit is set.
| |
| set | back to summary |
|---|---|
| private void set(int position, boolean val) Set the bit at the specified position. | |
| set | back to summary |
|---|---|
| public void set(String name, boolean val) throws IOException Set the attribute value. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides sun. Returns a printable representation of the KeyUsage. | |