Enum CertificateBuilder.KeyUsage

java.lang.Object
java.lang.Enum<CertificateBuilder.KeyUsage>
io.netty.pkitesting.CertificateBuilder.KeyUsage
All Implemented Interfaces:
Serializable, Comparable<CertificateBuilder.KeyUsage>
Enclosing class:
CertificateBuilder

public static enum CertificateBuilder.KeyUsage extends 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 Details

    • 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 and contentCommitment, 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 and contentCommitment, so they do not need to be specified separately.

    • encipherOnly

      public static final CertificateBuilder.KeyUsage encipherOnly
      For use with keyAgreement 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 with keyAgreement to limit the key to deciphering only.

      The meaning of this without the keyAgreement bit set is unspecified.

  • Method Details

    • values

      public static CertificateBuilder.KeyUsage[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static CertificateBuilder.KeyUsage valueOf(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:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null