Enum CertificateBuilder.KeyUsage
- java.lang.Object
-
- java.lang.Enum<CertificateBuilder.KeyUsage>
-
- io.netty.pkitesting.CertificateBuilder.KeyUsage
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<CertificateBuilder.KeyUsage>
- Enclosing class:
- CertificateBuilder
public static enum CertificateBuilder.KeyUsage extends java.lang.Enum<CertificateBuilder.KeyUsage>
The key usage field specify what the certificate and key is allowed to be used for.These key usages are specified by the X.509 standard, and some of them are deprecated.
See the
CertificateBuilder.ExtendedKeyUsage
for other commonly used key usage extensions.See ITU-T X.509 (10/2019) section 9.2.2.3 for the precise meaning of these usages.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description contentCommitment
This key usage is deprecated by X.509, and commitment may instead be derived from the actual use of the keys.cRLSign
For verifying the Certificate Authority's signature on a Certificate Revocation List.dataEncipherment
For enciphering user data, but not keys or security information.decipherOnly
For use withkeyAgreement
to limit the key to deciphering only.digitalSignature
For verifying digital signatures, for entity authentication, for entity authentication, or for integrity verification.encipherOnly
For use withkeyAgreement
to limit the key to enciphering only.keyAgreement
For use in public key agreement.keyCertSign
For verifying the Certificate Authority's signature on a public-key certificate.keyEncipherment
For enciphering keys or other security information.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CertificateBuilder.KeyUsage
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static CertificateBuilder.KeyUsage[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
digitalSignature
public static final CertificateBuilder.KeyUsage digitalSignature
For verifying digital signatures, for entity authentication, for entity authentication, or for integrity verification.
-
contentCommitment
public static final CertificateBuilder.KeyUsage contentCommitment
This key usage is deprecated by X.509, and commitment may instead be derived from the actual use of the keys.For verifying digital signatures that imply the signer has "committed" to the content being signed. This does not imply any specific policy or review on part of the signer, however.
-
keyEncipherment
public static final CertificateBuilder.KeyUsage keyEncipherment
For enciphering keys or other security information.
-
dataEncipherment
public static final CertificateBuilder.KeyUsage dataEncipherment
For enciphering user data, but not keys or security information.
-
keyAgreement
public static final CertificateBuilder.KeyUsage keyAgreement
For use in public key agreement.
-
keyCertSign
public static final CertificateBuilder.KeyUsage keyCertSign
For verifying the Certificate Authority's signature on a public-key certificate.This implies
digitalSignature
andcontentCommitment
, so they do not need to be specified separately.
-
cRLSign
public static final CertificateBuilder.KeyUsage cRLSign
For verifying the Certificate Authority's signature on a Certificate Revocation List.This implies
digitalSignature
andcontentCommitment
, so they do not need to be specified separately.
-
encipherOnly
public static final CertificateBuilder.KeyUsage encipherOnly
For use withkeyAgreement
to limit the key to enciphering only.The meaning of this without the
keyAgreement
bit set is unspecified.
-
decipherOnly
public static final CertificateBuilder.KeyUsage decipherOnly
For use withkeyAgreement
to limit the key to deciphering only.The meaning of this without the
keyAgreement
bit set is unspecified.
-
-
Method Detail
-
values
public static CertificateBuilder.KeyUsage[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CertificateBuilder.KeyUsage c : CertificateBuilder.KeyUsage.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CertificateBuilder.KeyUsage valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-