Enum Class KeyStoreType

java.lang.Object
java.lang.Enum<KeyStoreType>
de.cuioss.tools.net.ssl.KeyStoreType
All Implemented Interfaces:
Serializable, Comparable<KeyStoreType>, Constable

public enum KeyStoreType extends Enum<KeyStoreType>
The semantic keyStoreType of the Keystore.

The specific documentation is inspired from https://www.java67.com/2012/12/difference-between-truststore-vs.html.

Whats the difference? keystore is used to store server's own certificate while truststore is used to store the certificate of other parties issued by CA.

Author:
Oliver Wolff
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    A keystore is used to store your credential (server or client) needed when you are setting up server side on SSL.
    A truststore is used to store others credential: Certificates from CAs or you company, Customers,... java-property: javax.net.ssl.trustStore Default location for Java installations: Oracle: JAVA_HOME/JRE/Security/cacerts Zulu / OpenJDK: JAVA_HOME/lib/security/cacerts .
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the enum constant of this class with the specified name.
    static KeyStoreType[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • TRUST_STORE

      public static final KeyStoreType TRUST_STORE
      A truststore is
      • used to store others credential: Certificates from CAs or you company, Customers,...
      • java-property: javax.net.ssl.trustStore
      • Default location for Java installations:
        • Oracle: JAVA_HOME/JRE/Security/cacerts
        • Zulu / OpenJDK: JAVA_HOME/lib/security/cacerts
      .
    • KEY_STORE

      public static final KeyStoreType KEY_STORE
      A keystore is
      • used to store your credential (server or client)
      • needed when you are setting up server side on SSL. It is used to store server's identity certificate, which server will present to a client on the connection while trust store setup on client side must contain to make the connection work. If you browser to connect to any website over SSL it verifies certificate presented by server against its truststore.
      • java-property: javax.net.ssl.keyStore
      .
  • Method Details

    • values

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

      public static KeyStoreType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null