Package io.cui.tools.net.ssl
Enum KeyStoreType
- java.lang.Object
-
- java.lang.Enum<KeyStoreType>
-
- io.cui.tools.net.ssl.KeyStoreType
-
- All Implemented Interfaces:
Serializable,Comparable<KeyStoreType>
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
-
-
Enum Constant Summary
Enum Constants Enum Constant Description KEY_STOREA keystore is used to store your credential (server or client) needed when you are setting up server side on SSL.TRUST_STOREA 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
All Methods Static Methods Concrete Methods Modifier and Type Method Description static KeyStoreTypevalueOf(String name)Returns the enum constant of this type with the specified name.static KeyStoreType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
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 Detail
-
values
public static KeyStoreType[] 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 (KeyStoreType c : KeyStoreType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static KeyStoreType 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 nameNullPointerException- if the argument is null
-
-