Examples of SSLSocketBuilder


Examples of org.jboss.remoting.security.SSLSocketBuilder

      if (factory == null && needsCustomSSLConfiguration(configuration))
      {
         try
         {
            SSLSocketBuilder socketBuilder = new SSLSocketBuilder(configuration);
            socketBuilder.setUseSSLSocketFactory( false );
            factory = socketBuilder.createSSLSocketFactory();
            socketFactoryCreatedFromSSLParameters = true;
         }
         catch (IOException e)
         {
            throw new RuntimeException("Unable to create customized SSL socket factory", e);
View Full Code Here

Examples of org.jboss.remoting.security.SSLSocketBuilder

               {
                  SSLSocketBuilderMBean sslSocketBuilder = (SSLSocketBuilderMBean)server.
                  getAttribute(serverSocketFactoryObjName, "SSLSocketBuilder");
                  if (sslSocketBuilder != null)
                  {
                     SSLSocketBuilder clonedSSLSocketBuilder = (SSLSocketBuilder) sslSocketBuilder.clone();
                     boolean shouldUseDefault = sslSocketBuilder.getUseSSLServerSocketFactory();
                     clonedSSLSocketBuilder.setUseSSLSocketFactory(shouldUseDefault);
                     boolean useClientMode = sslSocketBuilder.isServerSocketUseClientMode();
                     clonedSSLSocketBuilder.setSocketUseClientMode(useClientMode);
                     SSLSocketFactoryService sslSocketFactoryService = new SSLSocketFactoryService();
                     sslSocketFactoryService.setSSLSocketBuilder(clonedSSLSocketBuilder);
                     sslSocketFactoryService.start();
                     clientConfig.put(Remoting.CUSTOM_SOCKET_FACTORY, sslSocketFactoryService);
                     clientConfig.put(SSLSocketBuilder.REMOTING_SOCKET_USE_CLIENT_MODE, "false");
View Full Code Here

Examples of org.jboss.remoting.security.SSLSocketBuilder

         return ss;
      }
     
      protected void setupFactory() throws IOException
      {
         SSLSocketBuilder sslSocketBuilder = new SSLSocketBuilder();
         sslSocketBuilder.setUseSSLServerSocketFactory(false);
         factory = sslSocketBuilder.createSSLServerSocketFactory();
      }
View Full Code Here

Examples of org.jboss.remoting.security.SSLSocketBuilder

         return s;
      }
     
      protected void setupFactory() throws IOException
      {
         SSLSocketBuilder sslSocketBuilder = new SSLSocketBuilder();
         sslSocketBuilder.setUseSSLServerSocketFactory(false);
         factory = sslSocketBuilder.createSSLSocketFactory();
      }
View Full Code Here

Examples of org.jboss.remoting.security.SSLSocketBuilder

   throws NoSuchAlgorithmException, KeyManagementException, IOException,
   CertificateException, UnrecoverableKeyException, KeyStoreException
   {
      ServerSocketFactory serverSocketFactory = null;
     
      SSLSocketBuilder server = new SSLSocketBuilder();
      server.setUseSSLServerSocketFactory(false);
     
      server.setSecureSocketProtocol("SSL");
      server.setTrustStoreAlgorithm("SunX509");
     
      server.setTrustStoreType("JKS");
      String trustStoreFilePath = this.getClass().getResource("../.truststore").getFile();
      server.setTrustStoreURL(trustStoreFilePath);
      server.setTrustStorePassword("unit-tests-client");
//      server.setUseClientMode(true);
      server.setServerSocketUseClientMode(true);
      server.setSocketUseClientMode(false);
      /*
       * 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

Examples of org.jboss.remoting.security.SSLSocketBuilder

               {
                  SSLSocketBuilderMBean sslSocketBuilder = (SSLSocketBuilderMBean)server.
                  getAttribute(serverSocketFactoryObjName, "SSLSocketBuilder");
                  if (sslSocketBuilder != null)
                  {
                     SSLSocketBuilder clonedSSLSocketBuilder = (SSLSocketBuilder) sslSocketBuilder.clone();
                     boolean shouldUseDefault = sslSocketBuilder.getUseSSLServerSocketFactory();
                     clonedSSLSocketBuilder.setUseSSLSocketFactory(shouldUseDefault);
                     boolean useClientMode = sslSocketBuilder.isServerSocketUseClientMode();
                     clonedSSLSocketBuilder.setSocketUseClientMode(useClientMode);
                     SSLSocketFactoryService sslSocketFactoryService = new SSLSocketFactoryService();
                     sslSocketFactoryService.setSSLSocketBuilder(clonedSSLSocketBuilder);
                     sslSocketFactoryService.start();
                     clientConfig.put(Remoting.CUSTOM_SOCKET_FACTORY, sslSocketFactoryService);
                     clientConfig.put(SSLSocketBuilder.REMOTING_SOCKET_USE_CLIENT_MODE, "false");
View Full Code Here

Examples of org.jboss.remoting.security.SSLSocketBuilder

      if (serverSocketFactory == null && needsCustomSSLConfiguration(configuration))
      {
         try
         {
            SSLSocketBuilder socketBuilder = new SSLSocketBuilder(configuration);
            socketBuilder.setUseSSLServerSocketFactory(false);
            serverSocketFactory = socketBuilder.createSSLServerSocketFactory();
         }
         catch (IOException e)
         {
            throw new RuntimeException("Unable to create customized SSL socket factory", e);
         }
View Full Code Here

Examples of org.jboss.remoting.security.SSLSocketBuilder

       * will use the default within tomcat (and not override with own default).
       */

      if ("https".equals(locator.getProtocol()))
      {
         SSLSocketBuilder builder = new SSLSocketBuilder(configuration);
         builder.setUseSSLServerSocketFactory(false);
         try
         {
            return builder.createSSLServerSocketFactory();
         }
         catch (IOException e)
         {
            log.error("unable to create server socket factory", e);
            throw e;
View Full Code Here

Examples of org.jboss.remoting.security.SSLSocketBuilder

      if (factory == null && needsCustomSSLConfiguration(configuration))
      {
         try
         {
            SSLSocketBuilder socketBuilder = new SSLSocketBuilder(configuration);
            socketBuilder.setUseSSLSocketFactory( false );
            factory = socketBuilder.createSSLSocketFactory();
            socketFactoryCreatedFromSSLParameters = true;
         }
         catch (IOException e)
         {
            throw new RuntimeException("Unable to create customized SSL socket factory", e);
View Full Code Here

Examples of org.jboss.remoting.security.SSLSocketBuilder

       * will use the default within tomcat (and not override with own default).
       */

      if ("https".equals(locator.getProtocol()))
      {
         SSLSocketBuilder builder = new SSLSocketBuilder(configuration);
         builder.setUseSSLServerSocketFactory(false);
         try
         {
            return builder.createSSLServerSocketFactory();
         }
         catch (IOException e)
         {
            log.error("unable to create server socket factory", e);
            throw e;
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.