Class WolfSSLSocketFactory


  • public class WolfSSLSocketFactory
    extends javax.net.ssl.SSLSocketFactory
    wolfSSL implementation of SSLSocketFactory
    Author:
    wolfSSL
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.net.Socket createSocket()
      Creates a new unconnected SSLSocket
      java.net.Socket createSocket​(java.lang.String host, int port)
      Creates a new Socket connected to the specified host and port.
      java.net.Socket createSocket​(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.Socket createSocket​(java.net.InetAddress host, int port)
      Creates a new Socket connected to the specified host and port.
      java.net.Socket createSocket​(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.Socket createSocket​(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.Socket createSocket​(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.
      • Methods inherited from class javax.net.ssl.SSLSocketFactory

        getDefault
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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:
        getDefaultCipherSuites in class javax.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:
        getSupportedCipherSuites in class javax.net.ssl.SSLSocketFactory
        Returns:
        array of supported cipher suite Strings
      • createSocket

        public java.net.Socket createSocket()
                                     throws java.io.IOException
        Creates a new unconnected SSLSocket
        Overrides:
        createSocket in class javax.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.IOException
        Creates a new Socket connected to the specified host and port.
        Specified by:
        createSocket in class javax.net.SocketFactory
        Parameters:
        host - server host name for Socket to be connected to, or null for loopback address
        port - 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.IOException
        Creates a new Socket connected to the specified remote host and port, and also bound to the specified local address and port.
        Specified by:
        createSocket in class javax.net.SocketFactory
        Parameters:
        address - server host name for Socket to be connected to, or null for loopback address
        port - server port
        localAddress - local address that the Socket will be bound to
        localPort - 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.UnknownHostException
        Creates a new Socket connected to the specified host and port.
        Specified by:
        createSocket in class javax.net.SocketFactory
        Parameters:
        host - server host name for Socket to be connected to, or null for loopback address
        port - server port
        Returns:
        the new Socket
        Throws:
        java.io.IOException - if socket creation fails
        java.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.UnknownHostException
        Creates a new Socket connected to the specified remote host and port, and also bound to the specified local address and port.
        Specified by:
        createSocket in class javax.net.SocketFactory
        Parameters:
        host - server host name for Socket to be connected, or null for loopback address
        port - server port
        localHost - local address that the Socket will be bound to
        localPort - 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.IOException
        Creates a new SSLSocket layered over an existing Socket connected to the specified host and port.
        Specified by:
        createSocket in class javax.net.ssl.SSLSocketFactory
        Parameters:
        s - connected Socket to host
        host - host that the Socket is connected to
        port - port that the Socket is connected to
        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
      • createSocket

        public java.net.Socket createSocket​(java.net.Socket s,
                                            java.io.InputStream consumed,
                                            boolean autoClose)
                                     throws java.io.IOException
        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.
        Overrides:
        createSocket in class javax.net.ssl.SSLSocketFactory
        Parameters:
        s - connected Socket to host
        consumed - 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