/*
 * Copyright 2012-2014 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.springframework.boot.context.embedded;

/**
 * Simple container-independent abstraction for SSL configuration.
 *
 * @author Andy Wilkinson
 * @author Vladimir Tsanev
 * @since 1.1.7
 */
public class Ssl {

	/**
	 * Client authentication mode ("want", "need").
	 */
	private ClientAuth clientAuth;

	private String[] ciphers;

	private String keyAlias;

	private String keyPassword;

	/**
	 * Path to the key store (typically a jks file).
	 */
	private String keyStore;

	/**
	 * Login password of the key store.
	 */
	private String keyStorePassword;

	private String keyStoreType;

	private String keyStoreProvider;

	private String trustStore;

	private String trustStorePassword;

	private String trustStoreType;

	private String trustStoreProvider;

	/**
	 * SSL protocol to use.
	 */
	private String protocol = "TLS";

	public ClientAuth getClientAuth() {
		return this.clientAuth;
	}

	public void setClientAuth(ClientAuth clientAuth) {
		this.clientAuth = clientAuth;
	}

	public String[] getCiphers() {
		return this.ciphers;
	}

	public void setCiphers(String[] ciphers) {
		this.ciphers = ciphers;
	}

	public String getKeyAlias() {
		return this.keyAlias;
	}

	public void setKeyAlias(String keyAlias) {
		this.keyAlias = keyAlias;
	}

	public String getKeyPassword() {
		return this.keyPassword;
	}

	public void setKeyPassword(String keyPassword) {
		this.keyPassword = keyPassword;
	}

	public String getKeyStore() {
		return this.keyStore;
	}

	public void setKeyStore(String keyStore) {
		this.keyStore = keyStore;
	}

	public String getKeyStorePassword() {
		return this.keyStorePassword;
	}

	public void setKeyStorePassword(String keyStorePassword) {
		this.keyStorePassword = keyStorePassword;
	}

	public String getKeyStoreType() {
		return this.keyStoreType;
	}

	public void setKeyStoreType(String keyStoreType) {
		this.keyStoreType = keyStoreType;
	}

	public String getKeyStoreProvider() {
		return this.keyStoreProvider;
	}

	public void setKeyStoreProvider(String keyStoreProvider) {
		this.keyStoreProvider = keyStoreProvider;
	}

	public String getTrustStore() {
		return this.trustStore;
	}

	public void setTrustStore(String trustStore) {
		this.trustStore = trustStore;
	}

	public String getTrustStorePassword() {
		return this.trustStorePassword;
	}

	public void setTrustStorePassword(String trustStorePassword) {
		this.trustStorePassword = trustStorePassword;
	}

	public String getTrustStoreType() {
		return this.trustStoreType;
	}

	public void setTrustStoreType(String trustStoreType) {
		this.trustStoreType = trustStoreType;
	}

	public String getTrustStoreProvider() {
		return this.trustStoreProvider;
	}

	public void setTrustStoreProvider(String trustStoreProvider) {
		this.trustStoreProvider = trustStoreProvider;
	}

	public String getProtocol() {
		return this.protocol;
	}

	public void setProtocol(String protocol) {
		this.protocol = protocol;
	}

	public enum ClientAuth {
		WANT, NEED;
	}

}

@@ -843,17 +843,25 @@
 /**%0A%09 * 
-C
+Whether c
 lient au
@@ -877,123 +877,326 @@
 ion 
-mode (%22want%22, %22need%22).%0A%09 */%0A%09private ClientAuth clientAuth;%0A%0A%09private String%5B%5D ciphers;%0A%0A%09private String keyAlias;%0A
+is wanted (%22want%22) or needed (%22need%22). Requires a trust store.%0A%09 */%0A%09private ClientAuth clientAuth;%0A%0A%09/**%0A%09 * Supported SSL ciphers.%0A%09 */%0A%09private String%5B%5D ciphers;%0A%0A%09/**%0A%09 * Alias that identifies the key in the key store.%0A%09 */%0A%09private String keyAlias;%0A%0A%09/**%0A%09 * Password used to access the key in the key store.%0A%09 */
 %0A%09pr
@@ -1253,16 +1253,47 @@
 y store 
+that holds the SSL certificate 
 (typical
@@ -1353,23 +1353,17 @@
 %09 * 
-Login p
+P
 assword 
 of t
@@ -1358,18 +1358,30 @@
 assword 
-of
+used to access
  the key
@@ -1433,171 +1433,443 @@
 ;%0A%0A%09
-private String keyStoreType;%0A%0A%09private String keyStoreProvider;%0A%0A%09private String trustStore;%0A%0A%09private String trustStorePassword;%0A%0A%09private String trustStoreType;%0A
+/**%0A%09 * Type of the key store.%0A%09 */%0A%09private String keyStoreType;%0A%0A%09/**%0A%09 * Provider for the key store.%0A%09 */%0A%09private String keyStoreProvider;%0A%0A%09/**%0A%09 * Trust store that holds SSL certificates.%0A%09 */%0A%09private String trustStore;%0A%0A%09/**%0A%09 * Password used to access the trust store.%0A%09 */%0A%09private String trustStorePassword;%0A%0A%09/**%0A%09 * Type of the trust store.%0A%09 */%0A%09private String trustStoreType;%0A%0A%09/**%0A%09 * Provider for the trust store.%0A%09 */
 %0A%09pr

Add documentation for Ssl properties