public class SSLClient extends javax.net.ssl.SSLSocketFactory
Constructor and Description |
---|
SSLClient() |
Modifier and Type | Method and Description |
---|---|
void |
addTrustMaterial(TrustChain trustChain) |
java.net.Socket |
createSocket() |
java.net.Socket |
createSocket(java.net.InetAddress host,
int port) |
java.net.Socket |
createSocket(java.net.InetAddress host,
int port,
java.net.InetAddress localHost,
int localPort) |
java.net.Socket |
createSocket(java.net.Socket s,
java.lang.String remoteHost,
int remotePort,
boolean autoClose) |
java.net.Socket |
createSocket(java.lang.String host,
int port) |
java.net.Socket |
createSocket(java.lang.String host,
int port,
java.net.InetAddress localHost,
int localPort) |
java.net.Socket |
createSocket(java.lang.String host,
int port,
java.net.InetAddress localHost,
int localPort,
int timeout)
Attempts to get a new socket connection to the given host within the
given time limit.
|
java.security.cert.X509Certificate[] |
getAssociatedCertificateChain() |
boolean |
getCheckCRL() |
boolean |
getCheckExpiry() |
boolean |
getCheckHostname() |
int |
getConnectTimeout() |
java.security.cert.X509Certificate[] |
getCurrentServerChain() |
java.lang.String[] |
getDefaultCipherSuites() |
java.lang.String |
getDefaultProtocol() |
java.lang.String[] |
getEnabledCiphers() |
java.lang.String[] |
getEnabledProtocols() |
HostnameVerifier |
getHostnameVerifier() |
boolean |
getNeedClientAuth() |
int |
getSoTimeout() |
javax.net.ssl.SSLContext |
getSSLContext() |
SSLWrapperFactory |
getSSLWrapperFactory() |
java.lang.String[] |
getSupportedCipherSuites() |
TrustChain |
getTrustChain() |
boolean |
getUseClientMode() |
boolean |
getWantClientAuth() |
boolean |
isSecure() |
void |
setCheckCRL(boolean b) |
void |
setCheckExpiry(boolean b) |
void |
setCheckHostname(boolean b) |
void |
setConnectTimeout(int i) |
void |
setDefaultProtocol(java.lang.String s) |
void |
setDnsOverride(java.util.Map m) |
void |
setEnabledCiphers(java.lang.String[] ciphers) |
void |
setEnabledProtocols(java.lang.String[] protocols) |
void |
setHostnameVerifier(HostnameVerifier verifier) |
void |
setIsSecure(boolean b) |
void |
setKeyMaterial(KeyMaterial keyMaterial) |
void |
setNeedClientAuth(boolean b) |
void |
setSoTimeout(int soTimeout) |
void |
setSSLWrapperFactory(SSLWrapperFactory wf) |
void |
setTrustMaterial(TrustChain trustChain) |
void |
setUseClientMode(boolean b) |
void |
setWantClientAuth(boolean b) |
void |
useDefaultJavaCiphers() |
void |
useStrongCiphers() |
public SSLClient() throws java.security.GeneralSecurityException, java.io.IOException
java.security.GeneralSecurityException
java.io.IOException
public void addTrustMaterial(TrustChain trustChain) throws java.security.NoSuchAlgorithmException, java.security.KeyStoreException, java.security.KeyManagementException, java.io.IOException, java.security.cert.CertificateException
java.security.NoSuchAlgorithmException
java.security.KeyStoreException
java.security.KeyManagementException
java.io.IOException
java.security.cert.CertificateException
public void setTrustMaterial(TrustChain trustChain) throws java.security.NoSuchAlgorithmException, java.security.KeyStoreException, java.security.KeyManagementException, java.io.IOException, java.security.cert.CertificateException
java.security.NoSuchAlgorithmException
java.security.KeyStoreException
java.security.KeyManagementException
java.io.IOException
java.security.cert.CertificateException
public void setKeyMaterial(KeyMaterial keyMaterial) throws java.security.NoSuchAlgorithmException, java.security.KeyStoreException, java.security.KeyManagementException, java.io.IOException, java.security.cert.CertificateException
java.security.NoSuchAlgorithmException
java.security.KeyStoreException
java.security.KeyManagementException
java.io.IOException
java.security.cert.CertificateException
public void setIsSecure(boolean b)
public void setDnsOverride(java.util.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(java.lang.String s)
public void useDefaultJavaCiphers()
public void useStrongCiphers()
public void setEnabledCiphers(java.lang.String[] ciphers)
public void setEnabledProtocols(java.lang.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 java.security.cert.X509Certificate[] getAssociatedCertificateChain()
public boolean getCheckCRL()
public boolean getCheckExpiry()
public boolean getCheckHostname()
public int getConnectTimeout()
public java.lang.String getDefaultProtocol()
public java.lang.String[] getEnabledCiphers()
public java.lang.String[] getEnabledProtocols()
public HostnameVerifier getHostnameVerifier()
public int getSoTimeout()
public SSLWrapperFactory getSSLWrapperFactory()
public boolean getNeedClientAuth()
public boolean getWantClientAuth()
public boolean getUseClientMode()
public javax.net.ssl.SSLContext getSSLContext() throws java.security.GeneralSecurityException, java.io.IOException
java.security.GeneralSecurityException
java.io.IOException
public TrustChain getTrustChain()
public java.security.cert.X509Certificate[] getCurrentServerChain()
public java.lang.String[] getDefaultCipherSuites()
getDefaultCipherSuites
in class javax.net.ssl.SSLSocketFactory
public java.lang.String[] getSupportedCipherSuites()
getSupportedCipherSuites
in class javax.net.ssl.SSLSocketFactory
public java.net.Socket createSocket() throws java.io.IOException
createSocket
in class javax.net.SocketFactory
java.io.IOException
public java.net.Socket createSocket(java.lang.String host, int port) throws java.io.IOException
createSocket
in class javax.net.SocketFactory
java.io.IOException
public java.net.Socket createSocket(java.net.InetAddress host, int port) throws java.io.IOException
createSocket
in class javax.net.SocketFactory
java.io.IOException
public java.net.Socket createSocket(java.net.InetAddress host, int port, java.net.InetAddress localHost, int localPort) throws java.io.IOException
createSocket
in class javax.net.SocketFactory
java.io.IOException
public java.net.Socket createSocket(java.lang.String host, int port, java.net.InetAddress localHost, int localPort) throws java.io.IOException
createSocket
in class javax.net.SocketFactory
java.io.IOException
public java.net.Socket createSocket(java.lang.String host, int port, java.net.InetAddress localHost, int localPort, int timeout) throws java.io.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)java.io.IOException
- if an I/O error occurs while creating thesocketjava.net.UnknownHostException
- if the IP address of the host cannot be
determinedpublic java.net.Socket createSocket(java.net.Socket s, java.lang.String remoteHost, int remotePort, boolean autoClose) throws java.io.IOException
createSocket
in class javax.net.ssl.SSLSocketFactory
java.io.IOException