Package org.jboss.remoting.security

Examples of org.jboss.remoting.security.SSLSocketBuilder


      }
     
     
      public Socket createSocket(InetAddress arg0, int arg1) throws IOException
      {
         SSLSocketBuilder builder = new SSLSocketBuilder(config);
         if (config.containsKey(SSLSocketBuilder.REMOTING_SOCKET_USE_CLIENT_MODE))
            builder.setSocketUseClientMode(false);
         builder.setUseSSLSocketFactory(false);
         return builder.createSSLSocketFactory().createSocket(arg0, arg1);
      }
View Full Code Here


         return builder.createSSLSocketFactory().createSocket(arg0, arg1);
      }
     
      public Socket createSocket(InetAddress arg0, int arg1, InetAddress arg2, int arg3) throws IOException
      {
         SSLSocketBuilder builder = new SSLSocketBuilder(config);
         if (config.containsKey(SSLSocketBuilder.REMOTING_SOCKET_USE_CLIENT_MODE))
            builder.setSocketUseClientMode(false);
         builder.setUseSSLSocketFactory(false);
         return builder.createSSLSocketFactory().createSocket(arg0, arg1, arg2, arg3);
      }
View Full Code Here

         HashMap config = new HashMap();
         config.put(SSLSocketBuilder.REMOTING_KEY_STORE_TYPE, "JKS");
         String keyStoreFilePath = this.getClass().getResource(".keystore").getFile();
         config.put(SSLSocketBuilder.REMOTING_KEY_STORE_FILE_PATH, keyStoreFilePath);
         config.put(SSLSocketBuilder.REMOTING_KEY_STORE_PASSWORD, "unit-tests-server");
         SSLSocketBuilder builder = new SSLSocketBuilder(config);
         builder.setUseSSLServerSocketFactory(false);
         ServerSocketFactory serverSocketFactory = builder.createSSLServerSocketFactory();
         config.put(Multiplex.SERVER_SOCKET_FACTORY, serverSocketFactory);
        
         serverPort = PortUtil.findFreePort(getHostName());
         serverAddress = InetAddress.getByName(getHostName());
         serverSocket = new MasterServerSocket(serverPort, 100, serverAddress, config);
View Full Code Here

         HashMap config = new HashMap();
         config.put(SSLSocketBuilder.REMOTING_TRUST_STORE_TYPE, "JKS");
         String trustStoreFilePath = this.getClass().getResource(".truststore").getFile();
         config.put(SSLSocketBuilder.REMOTING_TRUST_STORE_FILE_PATH, trustStoreFilePath);
         config.put(SSLSocketBuilder.REMOTING_TRUST_STORE_PASSWORD, "unit-tests-client");
         SSLSocketBuilder builder = new SSLSocketBuilder(config);
         builder.setUseSSLSocketFactory(false);
         SocketFactory socketFactory = builder.createSSLSocketFactory();
         config.put(Multiplex.SOCKET_FACTORY, socketFactory);
        
         VirtualSocket socket = new VirtualSocket(config);
         InetAddress bindAddress = InetAddress.getByName(getHostName());
         int bindPort = PortUtil.findFreePort(getHostName());
View Full Code Here

         HashMap config = new HashMap();
         config.put(SSLSocketBuilder.REMOTING_TRUST_STORE_TYPE, "JKS");
         String trustStoreFilePath = this.getClass().getResource(".truststore").getFile();
         config.put(SSLSocketBuilder.REMOTING_TRUST_STORE_FILE_PATH, trustStoreFilePath);
         config.put(SSLSocketBuilder.REMOTING_TRUST_STORE_PASSWORD, "unit-tests-client");
         SSLSocketBuilder builder = new SSLSocketBuilder(config);
         builder.setUseSSLSocketFactory(false);
         SocketFactory socketFactory = builder.createSSLSocketFactory();
         config.put(Multiplex.SOCKET_FACTORY, socketFactory);
        
         VirtualSocket socket = new VirtualSocket(config);
         InetAddress bindAddress = InetAddress.getByName(getHostName());
         int bindPort = PortUtil.findFreePort(getHostName());
View Full Code Here

         HashMap config = new HashMap();
         config.put(SSLSocketBuilder.REMOTING_TRUST_STORE_TYPE, "JKS");
         String trustStoreFilePath = this.getClass().getResource(".truststore").getFile();
         config.put(SSLSocketBuilder.REMOTING_TRUST_STORE_FILE_PATH, trustStoreFilePath);
         config.put(SSLSocketBuilder.REMOTING_TRUST_STORE_PASSWORD, "unit-tests-client");
         SSLSocketBuilder builder = new SSLSocketBuilder(config);
         builder.setUseSSLSocketFactory(false);
         SocketFactory socketFactory = builder.createSSLSocketFactory();
         config.put(Multiplex.SOCKET_FACTORY, socketFactory);
        
         VirtualSocket socket = new VirtualSocket(config);
         InetSocketAddress connectSocketAddress = new InetSocketAddress(serverAddress, serverPort);
         socket.connect(connectSocketAddress);
View Full Code Here

      // need to set the system properties to the keystore and password
      String keyStoreFilePath = this.getClass().getResource("../.keystore").getFile();
      System.setProperty("javax.net.ssl.keyStore", keyStoreFilePath);
      System.setProperty("javax.net.ssl.keyStorePassword", "unit-tests-server");

      SSLSocketBuilder server = new SSLSocketBuilder();
      serverSocketFactory = server.createSSLServerSocketFactory();

      return serverSocketFactory;
   }
View Full Code Here

         throws NoSuchAlgorithmException, KeyManagementException, IOException,
                CertificateException, UnrecoverableKeyException, KeyStoreException
   {
      ServerSocketFactory serverSocketFactory = null;

      SSLSocketBuilder server = new SSLSocketBuilder();
      server.setUseSSLServerSocketFactory(false);

      server.setSecureSocketProtocol("SSL");
      server.setKeyStoreAlgorithm("SunX509");

      server.setKeyStoreType("JKS");
      String keyStoreFilePath = this.getClass().getResource("../.keystore").getFile();
      server.setKeyStoreURL(keyStoreFilePath);
      server.setKeyStorePassword("unit-tests-server");
      /*
       * This is optional since if not set, will use
       * the key store password (and are the same in this case)
       */
      //server.setKeyPassword("unit-tests-server");

      serverSocketFactory = server.createSSLServerSocketFactory();

      return serverSocketFactory;
   }
View Full Code Here

      // need to set the system properties to the keystore and password
      String keyStoreFilePath = this.getClass().getResource("../.keystore").getFile();
      System.setProperty("javax.net.ssl.keyStore", keyStoreFilePath);
      System.setProperty("javax.net.ssl.keyStorePassword", "unit-tests-server");

      SSLSocketBuilder server = new SSLSocketBuilder();
      serverSocketFactory = server.createSSLServerSocketFactory();

      return serverSocketFactory;
   }
View Full Code Here

      return serverSocketFactoryMBean;
   }

   private void createSSLSocketBuilder() throws IOException
   {
      socketBuilder = new SSLSocketBuilder();
      socketBuilder.setUseSSLServerSocketFactory(false);

//      socketBuilder.setSecureSocketProtocol("SSL");
      socketBuilder.setSecureSocketProtocol("TLS");
      socketBuilder.setKeyStoreAlgorithm("SunX509");
View Full Code Here

TOP

Related Classes of org.jboss.remoting.security.SSLSocketBuilder

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.