001/* 002 * Copyright 2023 the original author or authors. 003 * <p> 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * <p> 008 * https://www.apache.org/licenses/LICENSE-2.0 009 * <p> 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package de.cuioss.tools.net.ssl; 017 018/** 019 * The semantic keyStoreType of the Keystore. 020 * <p> 021 * The specific documentation is inspired from 022 * https://www.java67.com/2012/12/difference-between-truststore-vs.html. 023 * </p> 024 * <p> 025 * Whats the difference? keystore is used to store server's own certificate 026 * while truststore is used to store the certificate of other parties issued by 027 * CA. 028 * </p> 029 * 030 * @author Oliver Wolff 031 * 032 */ 033public enum KeyStoreType { 034 035 /** 036 * 037 * A truststore is 038 * <ul> 039 * <li>used to store others credential: Certificates from CAs or you company, 040 * Customers,...</li> 041 * <li>java-property: javax.net.ssl.trustStore</li> 042 * <li>Default location for Java installations: 043 * <ul> 044 * <li>Oracle: JAVA_HOME/JRE/Security/cacerts</li> 045 * <li>Zulu / OpenJDK: JAVA_HOME/lib/security/cacerts</li> 046 * </ul> 047 * </li> 048 * </ul> 049 * . 050 */ 051 TRUST_STORE, 052 053 /** 054 * A keystore is 055 * <ul> 056 * <li>used to store your credential (server or client)</li> 057 * <li>needed when you are setting up server side on SSL. It is used to store 058 * server's identity certificate, which server will present to a client on the 059 * connection while trust store setup on client side must contain to make the 060 * connection work. If you browser to connect to any website over SSL it 061 * verifies certificate presented by server against its truststore.</li> 062 * <li>java-property: javax.net.ssl.keyStore</li> 063 * </ul> 064 * . 065 */ 066 KEY_STORE 067}