You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2008/08/25 15:56:01 UTC

svn commit: r688726 - /servicemix/components/shared-libraries/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/security/KeystoreManager.java

Author: gnodet
Date: Mon Aug 25 06:56:00 2008
New Revision: 688726

URL: http://svn.apache.org/viewvc?rev=688726&view=rev
Log:
SM-1522: The http provider endpoint does not support SSL and proxies

Modified:
    servicemix/components/shared-libraries/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/security/KeystoreManager.java

Modified: servicemix/components/shared-libraries/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/security/KeystoreManager.java
URL: http://svn.apache.org/viewvc/servicemix/components/shared-libraries/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/security/KeystoreManager.java?rev=688726&r1=688725&r2=688726&view=diff
==============================================================================
--- servicemix/components/shared-libraries/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/security/KeystoreManager.java (original)
+++ servicemix/components/shared-libraries/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/security/KeystoreManager.java Mon Aug 25 06:56:00 2008
@@ -20,6 +20,7 @@
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Method;
 
+import javax.net.ssl.SSLContext;
 import javax.net.ssl.SSLServerSocketFactory;
 import javax.net.ssl.SSLSocketFactory;
 
@@ -33,6 +34,30 @@
     KeystoreInstance getKeystore(String name);
 
     /**
+     * Gets a SSLContext using one Keystore to access the private key
+     * and another to provide the list of trusted certificate authorities.
+     * @param provider
+     * @param protocol The SSL protocol to use
+     * @param algorithm The SSL algorithm to use
+     * @param keyStore The key keystore name as provided by listKeystores.  The
+     *                 KeystoreInstance for this keystore must be unlocked.
+     * @param keyAlias The name of the private key in the keystore.  The
+     *                 KeystoreInstance for this keystore must have unlocked
+     *                 this key.
+     * @param trustStore The trust keystore name as provided by listKeystores.
+     *                   The KeystoreInstance for this keystore must have
+     *                   unlocked this key.
+     *
+     * @throws KeystoreIsLocked Occurs when the requested key keystore cannot
+     *                          be used because it has not been unlocked.
+     * @throws KeyIsLocked Occurs when the requested private key in the key
+     *                     keystore cannot be used because it has not been
+     *                     unlocked.
+     */
+    SSLContext createSSLContext(String provider, String protocol,
+                                String algorithm, String keyStore,
+                                String keyAlias, String trustStore) throws GeneralSecurityException;
+    /**
      * Gets a ServerSocketFactory using one Keystore to access the private key
      * and another to provide the list of trusted certificate authorities.
      * @param provider