Package org.jboss.remoting.security

Examples of org.jboss.remoting.security.SSLSocketBuilder$UserModeSSLServerSocketFactory


      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


               {
                  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

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

         return s;
      }
     
      protected void setupFactory() throws IOException
      {
         SSLSocketBuilder sslSocketBuilder = new SSLSocketBuilder();
         sslSocketBuilder.setUseSSLServerSocketFactory(false);
         factory = sslSocketBuilder.createSSLSocketFactory();
      }
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.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

               {
                  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

      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

       * 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

      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

       * 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

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

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.