Enum 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 with keyAgreement 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 with keyAgreement 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.
      • 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 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.

      • dataEncipherment

        public static final CertificateBuilder.KeyUsage dataEncipherment
        For enciphering user data, but not keys or security information.
    • 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 name
        java.lang.NullPointerException - if the argument is null