public class SSLClient extends SSLSocketFactory
| Constructor and Description |
|---|
SSLClient() |
createSocket, getDefaultpublic SSLClient()
throws GeneralSecurityException,
IOException
GeneralSecurityExceptionIOExceptionpublic void addTrustMaterial(TrustChain trustChain) throws NoSuchAlgorithmException, KeyStoreException, KeyManagementException, IOException, CertificateException
public void setTrustMaterial(TrustChain trustChain) throws NoSuchAlgorithmException, KeyStoreException, KeyManagementException, IOException, CertificateException
public void setKeyMaterial(KeyMaterial keyMaterial) throws NoSuchAlgorithmException, KeyStoreException, KeyManagementException, IOException, CertificateException
public void setIsSecure(boolean b)
public void setDnsOverride(Map m)
public void setCheckCRL(boolean b)
public void setCheckExpiry(boolean b)
public void setCheckHostname(boolean b)
public void setConnectTimeout(int i)
public void setDefaultProtocol(String s)
public void setEnabledCiphers(String[] ciphers)
public void setEnabledProtocols(String[] protocols)
public void setHostnameVerifier(HostnameVerifier verifier)
public void setSoTimeout(int soTimeout)
public void setSSLWrapperFactory(SSLWrapperFactory wf)
public void setNeedClientAuth(boolean b)
public void setWantClientAuth(boolean b)
public void setUseClientMode(boolean b)
public boolean isSecure()
public X509Certificate[] getAssociatedCertificateChain()
public boolean getCheckCRL()
public boolean getCheckExpiry()
public boolean getCheckHostname()
public int getConnectTimeout()
public String getDefaultProtocol()
public String[] getEnabledCiphers()
public String[] getEnabledProtocols()
public HostnameVerifier getHostnameVerifier()
public int getSoTimeout()
public SSLWrapperFactory getSSLWrapperFactory()
public boolean getNeedClientAuth()
public boolean getWantClientAuth()
public boolean getUseClientMode()
public SSLContext getSSLContext() throws GeneralSecurityException, IOException
GeneralSecurityExceptionIOExceptionpublic TrustChain getTrustChain()
public X509Certificate[] getCurrentServerChain()
public String[] getDefaultCipherSuites()
getDefaultCipherSuites in class SSLSocketFactorypublic String[] getSupportedCipherSuites()
getSupportedCipherSuites in class SSLSocketFactorypublic Socket createSocket() throws IOException
createSocket in class SocketFactoryIOExceptionpublic Socket createSocket(String host, int port) throws IOException
createSocket in class SocketFactoryIOExceptionpublic Socket createSocket(InetAddress host, int port) throws IOException
createSocket in class SocketFactoryIOExceptionpublic Socket createSocket(InetAddress host, int port, InetAddress localHost, int localPort) throws IOException
createSocket in class SocketFactoryIOExceptionpublic Socket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException
createSocket in class SocketFactoryIOExceptionpublic Socket createSocket(String host, int port, InetAddress localHost, int localPort, int timeout) throws IOException
host - the host name/IPport - the port on the hostlocalHost - the local host name/IP to bind the socket tolocalPort - the port on the local machinetimeout - the connection timeout (0==infinite)IOException - if an I/O error occurs while creating thesocketUnknownHostException - if the IP address of the host cannot be
determinedpublic Socket createSocket(Socket s, String remoteHost, int remotePort, boolean autoClose) throws IOException
createSocket in class SSLSocketFactoryIOExceptionCopyright © 2019. All rights reserved.