Class SSLImplementation
- java.lang.Object
-
- org.tn5250j.framework.transport.SSL.SSLImplementation
-
- All Implemented Interfaces:
javax.net.ssl.TrustManager,javax.net.ssl.X509TrustManager,SSLInterface
public class SSLImplementation extends java.lang.Object implements SSLInterface, javax.net.ssl.X509TrustManager
This class implements the SSLInterface and is used to create SSL socket instances.
- Author:
- Stephen M. Kennedy
-
-
Constructor Summary
Constructors Constructor Description SSLImplementation()
-
Method Summary
Modifier and Type Method Description voidcheckClientTrusted(java.security.cert.X509Certificate[] arg0, java.lang.String arg1)voidcheckServerTrusted(java.security.cert.X509Certificate[] chain, java.lang.String type)java.net.SocketcreateSSLSocket(java.lang.String destination, int port)Create a new socketjava.security.cert.X509Certificate[]getAcceptedIssuers()voidinit(java.lang.String sslType)Initialize the components required to create a new client socket when createSSLSocket is called.
-
-
-
Method Detail
-
init
public void init(java.lang.String sslType)
Description copied from interface:SSLInterfaceInitialize the components required to create a new client socket when createSSLSocket is called.- Specified by:
initin interfaceSSLInterface- Parameters:
sslType- The ssl socket type (SSLv2, SSLv3, TLS)
-
createSSLSocket
public java.net.Socket createSSLSocket(java.lang.String destination, int port)Description copied from interface:SSLInterfaceCreate a new socket- Specified by:
createSSLSocketin interfaceSSLInterface- Parameters:
destination- a destinationport- a port to connect to- Returns:
- new socket, or null if none could be created.
-
getAcceptedIssuers
public java.security.cert.X509Certificate[] getAcceptedIssuers()
- Specified by:
getAcceptedIssuersin interfacejavax.net.ssl.X509TrustManager
-
checkClientTrusted
public void checkClientTrusted(java.security.cert.X509Certificate[] arg0, java.lang.String arg1) throws java.security.cert.CertificateException- Specified by:
checkClientTrustedin interfacejavax.net.ssl.X509TrustManager- Throws:
java.security.cert.CertificateException
-
checkServerTrusted
public void checkServerTrusted(java.security.cert.X509Certificate[] chain, java.lang.String type) throws java.security.cert.CertificateException- Specified by:
checkServerTrustedin interfacejavax.net.ssl.X509TrustManager- Throws:
java.security.cert.CertificateException
-
-