Package javax.net.ssl

Examples of javax.net.ssl.SSLServerSocketFactory


         
          throw( new TRTrackerServerException( "port of 0 not currently supported for SSL"));
        }
       
        try {        
          SSLServerSocketFactory factory = SESecurityManager.getSSLServerSocketFactory();
  
          if ( factory == null ){
                     
            throw( new TRTrackerServerException( "TRTrackerServer: failed to get SSL factory" ));
             
          }else{
            SSLServerSocket ssl_server_socket;
           
            if ( _bind_ip != null ){
             
              current_bind_ip = _bind_ip;
             
              ssl_server_socket = (SSLServerSocket)factory.createServerSocketgetPort(), 128, _bind_ip );

            }else if ( bind_ip == null ){
             
              ssl_server_socket = (SSLServerSocket)factory.createServerSocket( getPort(), 128 );
             
            }else{
             
              current_bind_ip = bind_ip;
             
              ssl_server_socket = (SSLServerSocket)factory.createServerSocketgetPort(), 128, bind_ip );
            }
   
            String cipherSuites[] = ssl_server_socket.getSupportedCipherSuites();
     
            ssl_server_socket.setEnabledCipherSuites(cipherSuites);
View Full Code Here


        ServerSocket createServerSocket(InetSocketAddress addr) throws Exception {
            return new ServerSocket(addr.getPort(), 10, addr.getAddress());
        }
       
        ServerSocket createSSLServerSocket(InetSocketAddress addr) throws Exception {
            SSLServerSocketFactory sslserversocketfactory =
                (SSLServerSocketFactory)SSLServerSocketFactory.getDefault();
            SSLServerSocket sslserversocket;
            sslserversocket=(SSLServerSocket)sslserversocketfactory.createServerSocket(addr.getPort(), 10, addr.getAddress());
            return sslserversocket;
        }
View Full Code Here

        // these are the same key and trust managers that we initialize the client with
        context.init(new KeyManager[] { clientKeyManager },
                new TrustManager[] { clientTrustManager }, null);
        sclient.setSocketFactory(new FTPSSocketFactory(context));
        SSLServerSocketFactory ssf = context.getServerSocketFactory();
        sclient.setServerSocketFactory(ssf);

        // FTPClient should not use SSL secured sockets for the data connection
    }
View Full Code Here

     * socket returned in the base class.
     */
    protected ServerSocket getServerSocket() throws IOException {
        // Just to make sure it's set before we start
        SSLContext context = getSSLContext(this.keystore, this.password);
        SSLServerSocketFactory factory = context.getServerSocketFactory();
        SSLServerSocket ss = (SSLServerSocket) (this.listenAddress == null ? factory
                .createServerSocket(this.listenPort, BACKLOG_COUNT)
                : factory.createServerSocket(this.listenPort, BACKLOG_COUNT,
                        InetAddress.getByName(this.listenAddress)));
        ss.setEnableSessionCreation(true);
        ss.setWantClientAuth(true);
        return ss;
    }
View Full Code Here

    */
   @Override
   public ServerSocket createServerSocket(int port, int backlog, InetAddress ifAddress) throws IOException
   {
      initSSLContext();
      SSLServerSocketFactory factory = sslCtx.getServerSocketFactory();
      SSLServerSocket socket = (SSLServerSocket) factory.createServerSocket(port, backlog, ifAddress);
      SSLSessionContext ctx = sslCtx.getServerSessionContext();
      if (log.isDebugEnabled())
      {
         log.debug(ctx);
         String[] supportedProtocols = socket.getSupportedProtocols();
View Full Code Here

   }

   public ServerSocket createServerSocket() throws IOException
   {
      initSSLContext();
      SSLServerSocketFactory factory = sslCtx.getServerSocketFactory();
      SSLServerSocket socket = (SSLServerSocket) factory.createServerSocket();
      SSLSessionContext ctx = sslCtx.getServerSessionContext();
      if (log.isDebugEnabled())
      {
         log.debug(ctx);
         String[] supportedProtocols = socket.getSupportedProtocols();
View Full Code Here

   {
      String[] cipherSuites = {};
      try
      {
         initSSLContext();
         SSLServerSocketFactory factory = sslCtx.getServerSocketFactory();
         cipherSuites = factory.getDefaultCipherSuites();
      }
      catch (IOException e)
      {
         log.error("Failed to get default SSLServerSocketFactory", e);
      }
View Full Code Here

   {
      String[] cipherSuites = {};
      try
      {
         initSSLContext();
         SSLServerSocketFactory factory = sslCtx.getServerSocketFactory();
         cipherSuites = factory.getSupportedCipherSuites();
      }
      catch (IOException e)
      {
         log.error("Failed to get default SSLServerSocketFactory", e);
      }
View Full Code Here

            }
            tma[tma.length-1] = trustManager;
        }
        SSLContext sslc = SSLContext.getInstance("SSL");
        sslc.init(kma, tma, SecureRandom.getInstance("SHA1PRNG"));
        SSLServerSocketFactory ssfc = sslc.getServerSocketFactory();
        if (log.isInfoEnabled())
          log.info("SSLServerSocketFactory=" + ssfc);
        initialised = true;
        return ssfc;
    }
View Full Code Here

                        "",
                        "initing SSLContext: " + e6.getMessage());
        }
   
        //Step 8: create SSL Server Socket Factory
        SSLServerSocketFactory ssl = null;
        try
        {
      ssl = context.getServerSocketFactory();
   
        } catch (Exception e7)
View Full Code Here

TOP

Related Classes of javax.net.ssl.SSLServerSocketFactory

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.