1 /* 2 * $Id: TlsIndirectKeyStore.java 19191 2010-08-25 21:05:23Z tcarlson $ 3 * -------------------------------------------------------------------------------------- 4 * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com 5 * 6 * The software in this package is published under the terms of the CPAL v1.0 7 * license, a copy of which has been included with this distribution in the 8 * LICENSE.txt file. 9 */ 10 11 package org.mule.api.security; 12 13 import java.io.IOException; 14 15 /** 16 * Configure indirect key stores. 17 * TLS/SSL connections are made on behalf of an entity, which can be anonymous or identified by a 18 * certificate - this interface specifies how a keystore can be used to provide the certificates 19 * (and associated private keys) necessary for identification. 20 * 21 * <p>The information specified in this interface is used to configure a key store indirectly. 22 * For more information see the documentation for the connector or protocol in question. 23 * The comments in {@link org.mule.api.security.tls.TlsConfiguration} may also be useful.</p> 24 * 25 * <p><em>Programmers:</em> this information, once stored in and retrieved from properties via 26 * {@link org.mule.api.security.tls.TlsPropertiesMapper}, will provide a key manager factory via the {@link TlsDirectKeyStore} 27 * interface implemented by {@link org.mule.api.security.tls.TlsConfiguration}. This can be associated with a socket 28 * factory via {@link org.mule.api.security.tls.TlsPropertiesSocketFactory}.</p> 29 */ 30 public interface TlsIndirectKeyStore 31 { 32 33 /** 34 * @return The location (resolved relative to the current classpath and file system, if possible) 35 * of the keystore that contains public certificates and private keys for identification. 36 */ 37 String getClientKeyStore(); 38 39 /** 40 * @param name The location of the keystore that contains public certificates and private keys 41 * for identification. 42 * @throws IOException If the location cannot be resolved via the file system or classpath 43 */ 44 void setClientKeyStore(String name) throws IOException; 45 46 /** 47 * @return The password used to protect the keystore itself 48 */ 49 String getClientKeyStorePassword(); 50 51 /** 52 * @param clientKeyStorePassword The password used to protect the keystore itself 53 */ 54 void setClientKeyStorePassword(String clientKeyStorePassword); 55 56 void setClientKeyStoreType(String clientKeyStoreType); 57 58 /** 59 * @return The type of keystore used in {@link #setClientKeyStore(String)} 60 */ 61 String getClientKeyStoreType(); 62 63 } 64 65