Class EbicsSocketFactory
java.lang.Object
javax.net.SocketFactory
javax.net.ssl.SSLSocketFactory
org.kopi.ebics.security.EbicsSocketFactory
A simple SSL socket factory for EBICS client.
-
Constructor Summary
ConstructorsConstructorDescriptionEbicsSocketFactory(byte[] keystore, String keystoreType, char[] keystorePass, byte[] truststore, String truststoreType, char[] truststorePass) Constructs a newEbicsSocketFactoryfrom key store and trust store informationEbicsSocketFactory(SSLContext context) Constructs a newEbicsSocketFactoryfrom an SSL context -
Method Summary
Modifier and TypeMethodDescriptioncreateSocket(String host, int port) createSocket(String host, int port, InetAddress localHost, int localPort) createSocket(InetAddress host, int port) createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) createSocket(Socket s, String host, int port, boolean autoClose) String[]getSSLContext(byte[] keystore, String keystoreType, char[] keystorePass, byte[] truststore, String truststoreType, char[] truststorePass) Returns theSSLContextfrom key store information.String[]protected KeyStoreinitKeyStore(byte[] keystore, char[] password, String type) Initializes a key store.Methods inherited from class SSLSocketFactory
createSocket, getDefaultMethods inherited from class SocketFactory
createSocket
-
Constructor Details
-
EbicsSocketFactory
Constructs a newEbicsSocketFactoryfrom an SSL context- Parameters:
context- theSSLContext
-
EbicsSocketFactory
public EbicsSocketFactory(byte[] keystore, String keystoreType, char[] keystorePass, byte[] truststore, String truststoreType, char[] truststorePass) throws IOException, GeneralSecurityException Constructs a newEbicsSocketFactoryfrom key store and trust store information- Parameters:
keystore- the key storekeystoreType- the key store typekeystorePass- the key store passwordtruststore- the trust storetruststoreType- the trust store typetruststorePass- the trust store password- Throws:
GeneralSecurityExceptionIOException
-
-
Method Details
-
getSSLContext
public SSLContext getSSLContext(byte[] keystore, String keystoreType, char[] keystorePass, byte[] truststore, String truststoreType, char[] truststorePass) throws IOException, GeneralSecurityException Returns theSSLContextfrom key store information.- Parameters:
keystore- the key storekeystoreType- the key store typekeystorePass- the key store passwordtruststore- the trust storetruststoreType- the trust store typetruststorePass- the trust store password- Returns:
- the
SSLContext - Throws:
IOExceptionGeneralSecurityException
-
initKeyStore
Initializes a key store.- Parameters:
keystore- the key storepassword- the key store password- Returns:
- key store
- Throws:
IOException
-
createSocket
- Specified by:
createSocketin classSSLSocketFactory- Throws:
IOException
-
getDefaultCipherSuites
- Specified by:
getDefaultCipherSuitesin classSSLSocketFactory
-
getSupportedCipherSuites
- Specified by:
getSupportedCipherSuitesin classSSLSocketFactory
-
createSocket
- Specified by:
createSocketin classSocketFactory- Throws:
IOException
-
createSocket
- Specified by:
createSocketin classSocketFactory- Throws:
IOException
-
createSocket
public Socket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException - Specified by:
createSocketin classSocketFactory- Throws:
IOException
-
createSocket
public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException - Specified by:
createSocketin classSocketFactory- Throws:
IOException
-