Class SSLNetwork

    • Field Detail

      • PASS

        public static final String PASS
        Name of property that allow to fix the keystore's password: "SSLNetwork.pass". By default the password is "changeit". This property can be fixed either from java launching command (-Dname=value), or by in a3servers.xml configuration file (property element).
        See Also:
        Constant Field Values
      • KEYFILE

        public static final String KEYFILE
        Name of property that allow to fix the keystore's pathname: "SSLNetwork.keyfile". By default the key file is ".keystore". This property can be fixed either from java launching command (-Dname=value), or by in a3servers.xml configuration file (property element).
        See Also:
        Constant Field Values
      • sslSocketFactory

        private SSLSocketFactory sslSocketFactory
        HttpsNetwork needs specific use of SSLSocketFactory.
      • sslServerSocketFactory

        private SSLServerSocketFactory sslServerSocketFactory
        HttpsNetwork needs specific use of SSLServerSocketFactory.
    • Method Detail

      • createServerSocket

        ServerSocket createServerSocket​(int port)
                                 throws IOException
        This method creates and returns a SSL server socket which is bound to the specified port.
        Overrides:
        createServerSocket in class StreamNetwork
        Parameters:
        port - the port to listen to.
        Returns:
        a server socket bound to the specified port.
        Throws:
        IOException - for networking errors
      • createSocket

        Socket createSocket​(InetAddress addr,
                            int port)
                     throws IOException
        This method creates and returns a SSL socket connected to a ServerSocket at the specified network address and port.
        Overrides:
        createSocket in class StreamNetwork
        Parameters:
        addr - the server address.
        port - the server port.
        Returns:
        a socket connected to a ServerSocket at the specified network address and port.
        Throws:
        IOException - if the connection can't be established