Package com.wolfssl.provider.jsse
Class WolfSSLSocketFactory
- java.lang.Object
-
- javax.net.SocketFactory
-
- javax.net.ssl.SSLSocketFactory
-
- com.wolfssl.provider.jsse.WolfSSLSocketFactory
-
public class WolfSSLSocketFactory extends javax.net.ssl.SSLSocketFactorywolfSSL implementation of SSLSocketFactory- Author:
- wolfSSL
-
-
Constructor Summary
Constructors Constructor Description WolfSSLSocketFactory()WolfSSLSocketFactory(WolfSSLContext ctx, WolfSSLAuthStore authStore, com.wolfssl.provider.jsse.WolfSSLParameters params)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.net.SocketcreateSocket()Creates a new unconnected SSLSocketjava.net.SocketcreateSocket(java.lang.String host, int port)Creates a new Socket connected to the specified host and port.java.net.SocketcreateSocket(java.lang.String host, int port, java.net.InetAddress localHost, int localPort)Creates a new Socket connected to the specified remote host and port, and also bound to the specified local address and port.java.net.SocketcreateSocket(java.net.InetAddress host, int port)Creates a new Socket connected to the specified host and port.java.net.SocketcreateSocket(java.net.InetAddress address, int port, java.net.InetAddress localAddress, int localPort)Creates a new Socket connected to the specified remote host and port, and also bound to the specified local address and port.java.net.SocketcreateSocket(java.net.Socket s, java.io.InputStream consumed, boolean autoClose)Creates a new SSLSocket layered over an existing connected Socket, and is able to read data that has already been consumed from exising Socket's InputStream.java.net.SocketcreateSocket(java.net.Socket s, java.lang.String host, int port, boolean autoClose)Creates a new SSLSocket layered over an existing Socket connected to the specified host and port.java.lang.String[]getDefaultCipherSuites()Returns the default cipher suite list for wolfJSSE.java.lang.String[]getSupportedCipherSuites()Returns the supported cipher suite list for this factory.
-
-
-
Constructor Detail
-
WolfSSLSocketFactory
public WolfSSLSocketFactory()
-
WolfSSLSocketFactory
public WolfSSLSocketFactory(WolfSSLContext ctx, WolfSSLAuthStore authStore, com.wolfssl.provider.jsse.WolfSSLParameters params)
-
-
Method Detail
-
getDefaultCipherSuites
public java.lang.String[] getDefaultCipherSuites()
Returns the default cipher suite list for wolfJSSE.- Specified by:
getDefaultCipherSuitesin classjavax.net.ssl.SSLSocketFactory- Returns:
- default array of cipher suite Strings for wolfSSL
-
getSupportedCipherSuites
public java.lang.String[] getSupportedCipherSuites()
Returns the supported cipher suite list for this factory.- Specified by:
getSupportedCipherSuitesin classjavax.net.ssl.SSLSocketFactory- Returns:
- array of supported cipher suite Strings
-
createSocket
public java.net.Socket createSocket() throws java.io.IOExceptionCreates a new unconnected SSLSocket- Overrides:
createSocketin classjavax.net.SocketFactory- Returns:
- the new Socket
- Throws:
java.io.IOException- if socket creation fails
-
createSocket
public java.net.Socket createSocket(java.net.InetAddress host, int port) throws java.io.IOExceptionCreates a new Socket connected to the specified host and port.- Specified by:
createSocketin classjavax.net.SocketFactory- Parameters:
host- server host name for Socket to be connected to, or null for loopback addressport- server port- Returns:
- the new Socket
- Throws:
java.io.IOException- if socket creation fails
-
createSocket
public java.net.Socket createSocket(java.net.InetAddress address, int port, java.net.InetAddress localAddress, int localPort) throws java.io.IOExceptionCreates a new Socket connected to the specified remote host and port, and also bound to the specified local address and port.- Specified by:
createSocketin classjavax.net.SocketFactory- Parameters:
address- server host name for Socket to be connected to, or null for loopback addressport- server portlocalAddress- local address that the Socket will be bound tolocalPort- local port that the Socket will be bound to- Returns:
- the new Socket
- Throws:
java.io.IOException- if socket creation fails
-
createSocket
public java.net.Socket createSocket(java.lang.String host, int port) throws java.io.IOException, java.net.UnknownHostExceptionCreates a new Socket connected to the specified host and port.- Specified by:
createSocketin classjavax.net.SocketFactory- Parameters:
host- server host name for Socket to be connected to, or null for loopback addressport- server port- Returns:
- the new Socket
- Throws:
java.io.IOException- if socket creation failsjava.net.UnknownHostException
-
createSocket
public java.net.Socket createSocket(java.lang.String host, int port, java.net.InetAddress localHost, int localPort) throws java.io.IOException, java.net.UnknownHostExceptionCreates a new Socket connected to the specified remote host and port, and also bound to the specified local address and port.- Specified by:
createSocketin classjavax.net.SocketFactory- Parameters:
host- server host name for Socket to be connected, or null for loopback addressport- server portlocalHost- local address that the Socket will be bound tolocalPort- local port that the Socket will be bound to- Returns:
- the new Socket
- Throws:
java.io.IOException- if socket creation fails.java.net.UnknownHostException
-
createSocket
public java.net.Socket createSocket(java.net.Socket s, java.lang.String host, int port, boolean autoClose) throws java.io.IOExceptionCreates a new SSLSocket layered over an existing Socket connected to the specified host and port.- Specified by:
createSocketin classjavax.net.ssl.SSLSocketFactory- Parameters:
s- connected Socket to hosthost- host that the Socket is connected toport- port that the Socket is connected toautoClose- flag indicating if the underlying Socket should be closed when the SSLSocket is closed- Returns:
- the new Socket
- Throws:
java.io.IOException- if socket creation fails
-
createSocket
public java.net.Socket createSocket(java.net.Socket s, java.io.InputStream consumed, boolean autoClose) throws java.io.IOExceptionCreates a new SSLSocket layered over an existing connected Socket, and is able to read data that has already been consumed from exising Socket's InputStream.- Overrides:
createSocketin classjavax.net.ssl.SSLSocketFactory- Parameters:
s- connected Socket to hostconsumed- consumed inbound network data that has been read off the existing Socket's InputStream. May be null if no data has been read.autoClose- flag indicating if the underlying Socket should be closed when the SSLSocket is closed- Returns:
- the new Socket
- Throws:
java.io.IOException- if socket creation fails
-
-