001package io.cui.tools.net.ssl;
002
003/**
004 * The semantic keyStoreType of the Keystore.
005 * <p>
006 * The specific documentation is inspired from
007 * https://www.java67.com/2012/12/difference-between-truststore-vs.html.
008 * </p>
009 * <p>
010 * Whats the difference? keystore is used to store server's own certificate while truststore is
011 * used to store the certificate of other parties issued by CA.
012 * </p>
013 *
014 * @author Oliver Wolff
015 *
016 */
017public enum KeyStoreType {
018
019    /**
020     *
021     * A truststore is
022     * <ul>
023     * <li>used to store others credential: Certificates from CAs or you company,
024     * Customers,...</li>
025     * <li>java-property: javax.net.ssl.trustStore</li>
026     * <li>Default location for Java installations:
027     * <ul>
028     * <li>Oracle: JAVA_HOME/JRE/Security/cacerts</li>
029     * <li>Zulu / OpenJDK: JAVA_HOME/lib/security/cacerts</li>
030     * </ul>
031     * </li>
032     * </ul>
033     * .
034     */
035    TRUST_STORE,
036
037    /**
038     * A keystore is
039     * <ul>
040     * <li>used to store your credential (server or client)</li>
041     * <li>needed when you are setting up server side on SSL. It is used to store server's
042     * identity certificate, which server will present to a client on the connection while trust
043     * store setup on client side must contain to make the connection work. If you browser to
044     * connect to any website over SSL it verifies certificate presented by server against its
045     * truststore.</li>
046     * <li>java-property: javax.net.ssl.keyStore</li>
047     * </ul>
048     * .
049     */
050    KEY_STORE
051}