@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class KeyUsageExtension extends X509CertificateExtension
KeyUsage ::= BIT STRING { digitalSignature (0), nonRepudiation (1), -- recent editions of X.509 have -- renamed this bit to contentCommitment keyEncipherment (2), dataEncipherment (3), keyAgreement (4), keyCertSign (5), cRLSign (6), encipherOnly (7), decipherOnly (8) }
Modifier and Type | Field and Description |
---|---|
static OID |
KEY_USAGE_OID
The OID (2.5.29.15) for key usage extensions.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getExtensionName()
Retrieves the name for this extension.
|
boolean |
isCRLSignBitSet()
Indicates whether the CRL sign bit is set.
|
boolean |
isDataEnciphermentBitSet()
Indicates whether the data encipherment bit is set.
|
boolean |
isDecipherOnlyBitSet()
Indicates whether the decipher only bit is set.
|
boolean |
isDigitalSignatureBitSet()
Indicates whether the digital signature bit is set.
|
boolean |
isEncipherOnlyBitSet()
Indicates whether the encipher only bit is set.
|
boolean |
isKeyAgreementBitSet()
Indicates whether the key agreement bit is set.
|
boolean |
isKeyCertSignBitSet()
Indicates whether the key cert sign bit is set.
|
boolean |
isKeyEnciphermentBitSet()
Indicates whether the key encipherment bit is set.
|
boolean |
isNonRepudiationBitSet()
Indicates whether the non-repudiation bit is set.
|
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this certificate extension to the
provided buffer.
|
getOID, getValue, isCritical, toString
@NotNull public static final OID KEY_USAGE_OID
public boolean isDigitalSignatureBitSet()
true
, then
the key may be used for verifying digital signatures (other than signatures
on certificates or CRLs, as those usages are covered by the
isKeyCertSignBitSet()
and isCRLSignBitSet()
methods,
respectively).true
if the digital signature bit is set, or false
if not.public boolean isNonRepudiationBitSet()
true
, then
the key may be used to prevent someone from denying the authenticity of a
digital signature generated with the key.true
if the non-repudiation bit is set, or false
if not.public boolean isKeyEnciphermentBitSet()
true
, then
the public key may be used for encrypting other private keys or secret keys
(for example, to protect the keys while they are being transported).true
if the key encipherment bit is set, or false
if not.public boolean isDataEnciphermentBitSet()
true
, then
the public key may be used for encrypting arbitrary data without the need
for a symmetric cipher.true
if the data encipherment bit is set, or false
if not.public boolean isKeyAgreementBitSet()
true
, then
the public key may be used for key agreement processing.true
if the key agreement bit is set, or false
if
not.public boolean isKeyCertSignBitSet()
true
, then the
public key may be used for verifying certificate signatures.true
if the CRL sign bit is set, or false
if not.public boolean isCRLSignBitSet()
true
, then the
public key may be used for verifying certificate revocation list (CRL)
signatures.true
if the CRL sign bit is set, or false
if not.public boolean isEncipherOnlyBitSet()
true
, and if
the isKeyAgreementBitSet()
is also true
, then the public
key may be used only for enciphering data when performing key agreement.true
if the encipher only bit is set, or false
if
not.public boolean isDecipherOnlyBitSet()
true
, and if
the isKeyAgreementBitSet()
is also true
, then the public
key may be used only for deciphering data when performing key agreement.true
if the decipher only bit is set, or false
if
not.@NotNull public java.lang.String getExtensionName()
getExtensionName
in class X509CertificateExtension
public void toString(@NotNull java.lang.StringBuilder buffer)
toString
in class X509CertificateExtension
buffer
- The buffer to which the information should be appended.