public class SSLImplementation extends Object implements SSLInterface, X509TrustManager
This class implements the SSLInterface and is used to create SSL socket instances.
| Constructor and Description |
|---|
SSLImplementation() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkClientTrusted(X509Certificate[] arg0,
String arg1) |
void |
checkServerTrusted(X509Certificate[] chain,
String type) |
Socket |
createSSLSocket(String destination,
int port)
Create a new socket
|
X509Certificate[] |
getAcceptedIssuers() |
void |
init(String sslType)
Initialize the components required to create a new client socket
when createSSLSocket is called.
|
public void init(String sslType)
SSLInterfaceinit in interface SSLInterfacesslType - The ssl socket type (SSLv2, SSLv3, TLS)public Socket createSSLSocket(String destination, int port)
SSLInterfacecreateSSLSocket in interface SSLInterfacedestination - a destinationport - a port to connect topublic X509Certificate[] getAcceptedIssuers()
getAcceptedIssuers in interface X509TrustManagerpublic void checkClientTrusted(X509Certificate[] arg0, String arg1) throws CertificateException
checkClientTrusted in interface X509TrustManagerCertificateExceptionpublic void checkServerTrusted(X509Certificate[] chain, String type) throws CertificateException
checkServerTrusted in interface X509TrustManagerCertificateExceptionCopyright © 2018. All rights reserved.