Package javax.net.ssl

Examples of javax.net.ssl.SSLServerSocket


         return ss;
      }

      public ServerSocket createServerSocket(int arg0) throws IOException
      {
         SSLServerSocket ss = (SSLServerSocket) serverSocketFactory.createServerSocket(arg0);
         ss.setNeedClientAuth(true);
         return ss;
      }
View Full Code Here


         return ss;
      }

      public ServerSocket createServerSocket(int arg0, int arg1) throws IOException
      {
         SSLServerSocket ss = (SSLServerSocket) serverSocketFactory.createServerSocket(arg0, arg1);
         ss.setNeedClientAuth(true);
         return ss;
      }
View Full Code Here

         return ss;
      }

      public ServerSocket createServerSocket(int arg0, int arg1, InetAddress arg2) throws IOException
      {
         SSLServerSocket ss = (SSLServerSocket) serverSocketFactory.createServerSocket(arg0, arg1, arg2);
         ss.setNeedClientAuth(true);
         return ss;
       
      }
View Full Code Here

     * Configures the given SSL server socket with the requested cipher suites,
     * protocol versions, and need for client authentication
     */
    private void initServerSocket(ServerSocket ssocket) {

        SSLServerSocket socket = (SSLServerSocket) ssocket;

        if (enabledCiphers != null) {
            socket.setEnabledCipherSuites(enabledCiphers);
        }

        String requestedProtocols = (String) attributes.get("protocols");
        setEnabledProtocols(socket, getEnabledProtocols(socket,
                                                         requestedProtocols));
View Full Code Here

     *
     * @param ssocket The server socket to be configured
     */
    private void initServerSocket(ServerSocket ssocket) {

        SSLServerSocket socket = (SSLServerSocket) ssocket;

        // Enable all available cipher suites when the socket is connected
        String cipherSuites[] = socket.getSupportedCipherSuites();
        socket.setEnabledCipherSuites(cipherSuites);

        // Set client authentication if necessary
        socket.setNeedClientAuth(clientAuth);

    }
View Full Code Here

     * Configures the given SSL server socket with the requested cipher suites,
     * protocol versions, and need for client authentication
     */
    private void initServerSocket(ServerSocket ssocket) {

        SSLServerSocket socket = (SSLServerSocket) ssocket;

        if (enabledCiphers != null) {
            socket.setEnabledCipherSuites(enabledCiphers);
        }

        String requestedProtocols = (String) attributes.get("protocols");
        setEnabledProtocols(socket, getEnabledProtocols(socket,
                                                         requestedProtocols));
View Full Code Here

                               0,
                               hostAddress);
    case SSL_PEER_AUTHENTICATION:
      SSLServerSocketFactory ssf2 =
        (SSLServerSocketFactory)SSLServerSocketFactory.getDefault();
      SSLServerSocket sss2=
        (SSLServerSocket)ssf2.createServerSocket(portNumber,
                             0,
                             hostAddress);
      sss2.setNeedClientAuth(true);
      return sss2;
    }
  }
View Full Code Here

    }

    /** Set server socket properties ( accepted cipher suites, etc)
     */
    private void initServerSocket(ServerSocket ssocket) {
  SSLServerSocket socket=(SSLServerSocket)ssocket;

  // We enable all cipher suites when the socket is
  // connected - XXX make this configurable
  String cipherSuites[] = socket.getSupportedCipherSuites();
  socket.setEnabledCipherSuites(cipherSuites);

  // we don't know if client auth is needed -
  // after parsing the request we may re-handshake
  socket.setNeedClientAuth(clientAuth);
    }
View Full Code Here

    super.stop0();
  }
 
  private SSLServerSocket checkSocket() throws IOException
  {
    SSLServerSocket ss = sslServerSocket;
    if (ss == null)
      throw new SocketException( "socket closed" );
    return ss;
  }
View Full Code Here

  private SSLServerSocket sslServerSocket;
 
  @Override
  public String toString()
  {
    SSLServerSocket s = sslServerSocket;
   
    if (s != null)
      return String.format( "TlsListener(up, %s, %d)",
        s.getInetAddress(), s.getLocalPort() );

    return String.format( "TlsListener(down, %s, %d)", host, port );
   
  }
View Full Code Here

TOP

Related Classes of javax.net.ssl.SSLServerSocket

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.