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
    This key usage is deprecated by X.509, and commitment may instead be derived from the actual use of the keys.
    For verifying the Certificate Authority's signature on a Certificate Revocation List.
    For enciphering user data, but not keys or security information.
    For use with keyAgreement to limit the key to deciphering only.
    For verifying digital signatures, for entity authentication, for entity authentication, or for integrity verification.
    For use with keyAgreement to limit the key to enciphering only.
    For use in public key agreement.
    For verifying the Certificate Authority's signature on a public-key certificate.
    For enciphering keys or other security information.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final int
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    KeyUsage(int bitId)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    valueOf(java.lang.String name)
    Returns the enum constant of this type with the specified name.
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • 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.

  • Field Details

    • bitId

      private final int bitId
  • Constructor Details

    • KeyUsage

      private KeyUsage(int bitId)
  • 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(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 name
      java.lang.NullPointerException - if the argument is null