Class BetterSSLFactory
- java.lang.Object
-
- com.taskadapter.redmineapi.internal.comm.betterssl.BetterSSLFactory
-
public class BetterSSLFactory extends java.lang.Object
SSL Socket factory. Provides more authentication than the naive one and allows stored (custom) certificates to be added into the trust chain.This work is based on http://codyaray.com/2013/04/java-ssl-with-multiple-keystores and common sense.
-
-
Constructor Summary
Constructors Constructor Description BetterSSLFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.apache.http.conn.ssl.SSLSocketFactory
createSocketFactory(java.util.Collection<java.security.KeyStore> extraStores)
Creates a new SSL socket factory which supports both system-installed keys and all additional keys in the provided keystores.
-
-
-
Method Detail
-
createSocketFactory
public static org.apache.http.conn.ssl.SSLSocketFactory createSocketFactory(java.util.Collection<java.security.KeyStore> extraStores) throws java.security.KeyStoreException, java.security.KeyManagementException
Creates a new SSL socket factory which supports both system-installed keys and all additional keys in the provided keystores.- Parameters:
extraStores
- extra keystores containing root certificate authorities.- Returns:
- Socket factory supporting authorization for both system (default) keystores and all the extraStores.
- Throws:
java.security.KeyStoreException
- if key store have problems.java.security.KeyManagementException
- if new SSL context could not be initialized.
-
-