axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/components/net SunJSSESocketFactory.java
Date Fri, 06 Jun 2003 20:16:45 GMT
dims        2003/06/06 13:16:45

  Modified:    java/src/org/apache/axis/components/net
                        SunJSSESocketFactory.java
  Log:
  SunFakeTrustSocketFactory's getContext is not being called from SUNJSSESocketFactory's initFactory
when there are no options/attributes.
  
  Revision  Changes    Path
  1.5       +12 -8     xml-axis/java/src/org/apache/axis/components/net/SunJSSESocketFactory.java
  
  Index: SunJSSESocketFactory.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/components/net/SunJSSESocketFactory.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SunJSSESocketFactory.java	22 Apr 2003 19:34:11 -0000	1.4
  +++ SunJSSESocketFactory.java	6 Jun 2003 20:16:44 -0000	1.5
  @@ -257,14 +257,9 @@
               Security.addProvider(new sun.security.provider.Sun());
               Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
   
  -            if(attributes == null) {
  -                //No configuration specified. Get the default.
  -                sslFactory = (SSLSocketFactory) SSLSocketFactory.getDefault();
  -            } else {
  -                //Configuration specified in wsdd.
  -                SSLContext context = getContext();
  -                sslFactory = context.getSocketFactory();
  -            }
  +            //Configuration specified in wsdd.
  +            SSLContext context = getContext();
  +            sslFactory = context.getSocketFactory();
           } catch (Exception e) {
               if (e instanceof IOException) {
                   throw (IOException) e;
  @@ -280,6 +275,15 @@
        * @throws Exception
        */
       protected SSLContext getContext() throws Exception {
  +        
  +        if(attributes == null) {
  +            SSLContext context =
  +                    com.sun.net.ssl.SSLContext.getInstance("SSL");    // SSL
  +            // init context with the key managers
  +            context.init(null, null, null);
  +            return context;
  +        }
  +        
           // Please don't change the name of the attribute - other
           // software may depend on it ( j2ee for sure )
           String keystoreFile = (String) attributes.get("keystore");
  
  
  

Mime
View raw message