[jboss-cvs] JBossRemoting/src/main/org/jboss/remoting/transport/http/ssl ...

Ron Sigal ron_sigal at yahoo.com
Wed Mar 7 01:48:18 EST 2007


  User: rsigal  
  Date: 07/03/07 01:48:18

  Modified:    src/main/org/jboss/remoting/transport/http/ssl  Tag:
                        remoting_2_x HTTPSClientInvoker.java
  Log:
  JBREM-525:  Use AnyhostVerifier if authentication is turned off on client side.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.11.4.3  +15 -0     JBossRemoting/src/main/org/jboss/remoting/transport/http/ssl/HTTPSClientInvoker.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: HTTPSClientInvoker.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/transport/http/ssl/HTTPSClientInvoker.java,v
  retrieving revision 1.11.4.2
  retrieving revision 1.11.4.3
  diff -u -b -r1.11.4.2 -r1.11.4.3
  --- HTTPSClientInvoker.java	16 Jan 2007 05:55:36 -0000	1.11.4.2
  +++ HTTPSClientInvoker.java	7 Mar 2007 06:48:17 -0000	1.11.4.3
  @@ -197,6 +197,21 @@
            }
         }
   
  +      // If we still don't have a HostnameVerifier, see if the SocketFactory is an instance of
  +      // org.jboss.remoting.security.CustomSSLSocketFactory, and, if so, if it has turned off
  +      // authentication.
  +      if (hostnameVerifier == null)
  +      {
  +         if (getSocketFactory() instanceof CustomSSLSocketFactory)
  +         {
  +            CustomSSLSocketFactory sf = (CustomSSLSocketFactory) getSocketFactory();
  +            SSLSocketBuilderMBean builder = sf.getSSLSocketBuilder();
  +            if (( builder.isSocketUseClientMode() && !builder.isServerAuthMode())
  +             || (!builder.isSocketUseClientMode() &&  builder.isClientAuthModeNone()))
  +               hostnameVerifier = new AnyhostVerifier();
  +         }
  +      }
  +
         if (hostnameVerifier != null)
            conn.setHostnameVerifier(hostnameVerifier);
      }
  
  
  



More information about the jboss-cvs-commits mailing list