Package javax.net.ssl

Examples of javax.net.ssl.SSLServerSocketFactory.createServerSocket()


  ServerSocket ss = null;
        try{
            // bugfix for 6349541
            // specify the ip address to bind to, 50 is the default used
            // by the ssf implementation when only the port is specified
            ss = ssf.createServerSocket(port, BACKLOG, inetSocketAddress.getAddress());
            if (ciphers != null) {
                ((SSLServerSocket)ss).setEnabledCipherSuites(ciphers);
            }
        } catch(IOException e) {
            _logger.log(Level.SEVERE, "iiop.createsocket_exception",
View Full Code Here


            final SSLServerSocketFactory sf = ctx.getServerSocketFactory();
           
            InetAddress bindAddress = null;
            ServerSocket sss = null;
            if (address.equals(DEFAULT_ADDRESS))            
                sss = sf.createServerSocket(port);
            else {           
                bindAddress = InetAddress.getByName(address);            
                sss = sf.createServerSocket(port, 0, bindAddress);       
            }
            debug(sss);
View Full Code Here

            ServerSocket sss = null;
            if (address.equals(DEFAULT_ADDRESS))            
                sss = sf.createServerSocket(port);
            else {           
                bindAddress = InetAddress.getByName(address);            
                sss = sf.createServerSocket(port, 0, bindAddress);       
            }
            debug(sss);
            return ( sss );
        }
        catch (final Exception e) {
View Full Code Here

         SSLContext context = SSLContext.getInstance(m_sslProtocol);
         // Below call does not handle TrustManagers, needed when server must authenticate clients.
         context.init(keyFactory.getKeyManagers(), trustFactory == null ? null : trustFactory.getTrustManagers(), null);

         SSLServerSocketFactory ssf = context.getServerSocketFactory();
         SSLServerSocket serverSocket = (SSLServerSocket)ssf.createServerSocket(port, backlog, InetAddress.getByName(host));

         return serverSocket;
      }
      catch (IOException x)
      {
View Full Code Here

                                         ,0,
                                         hostAddress);
        case SSL_BASIC:
            SSLServerSocketFactory ssf =
                (SSLServerSocketFactory)SSLServerSocketFactory.getDefault();
            return (SSLServerSocket)ssf.createServerSocket(portNumber,
                                                           0,
                                                           hostAddress);
        case SSL_PEER_AUTHENTICATION:
            SSLServerSocketFactory ssf2 =
                (SSLServerSocketFactory)SSLServerSocketFactory.getDefault();
View Full Code Here

                                                           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

                _serverSocket = new ServerSocket();
            }
            else
            {
                SSLServerSocketFactory socketFactory = sslContext.getServerSocketFactory();
                _serverSocket = socketFactory.createServerSocket();
            }

            _serverSocket.bind(address);
            _serverSocket.setReuseAddress(true);
View Full Code Here

          SSLServerSocketFactory sslServerSocketFactory = sslc.getServerSocketFactory();
         
      /*    SSLServerSocketFactory sslServerSocketFactory =
                       (SSLServerSocketFactory) SSLServerSocketFactory.getDefault();   */
                sslServerSocket =
                        (SSLServerSocket) sslServerSocketFactory.createServerSocket( port, backlog, h);
        }
        catch ( BindException e )
        {
          throw new BindException( "Address already in use: "+h+":"+port );
        }
View Full Code Here

                _serverSocket = new ServerSocket();
            }
            else
            {
                SSLServerSocketFactory socketFactory = _sslContext.getServerSocketFactory();
                _serverSocket = socketFactory.createServerSocket();

                if(config.needClientAuth())
                {
                    ((SSLServerSocket)_serverSocket).setNeedClientAuth(true);
                }
View Full Code Here

            throw new IllegalStateException(this.toString() + " already running");
        }
        ServerSocket ssock;
        if (sslcontext != null) {
            SSLServerSocketFactory sf = sslcontext.getServerSocketFactory();
            ssock = sf.createServerSocket();
        } else {
            ssock = new ServerSocket();
        }

        ssock.setReuseAddress(true); // probably pointless for port '0'
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.