larryi      02/01/24 20:03:27

  Modified:    src/share/org/apache/tomcat/modules/server
                        PoolTcpConnector.java
  Log:
  Update to apply attributes to the SSL socket factory.
  
  Also added an isAttributeSet() method so PasswordPrompter can
  detect if any particular attribute is already set.
  
  Revision  Changes    Path
  1.14      +15 -2     
jakarta-tomcat/src/share/org/apache/tomcat/modules/server/PoolTcpConnector.java
  
  Index: PoolTcpConnector.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/server/PoolTcpConnector.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- PoolTcpConnector.java     7 Dec 2001 04:38:26 -0000       1.13
  +++ PoolTcpConnector.java     25 Jan 2002 04:03:27 -0000      1.14
  @@ -195,8 +195,17 @@
                // provide a wide enough interface
                sslImplementation=SSLImplementation.getInstance
                    (sslImplementationName);
  -             ep.setServerSocketFactory(sslImplementation.
  -                                       getServerSocketFactory());
  +                ServerSocketFactory socketFactory = 
  +                        sslImplementation.getServerSocketFactory();
  +                if( socketFactory!=null ) {
  +                    Enumeration attE=attributes.keys();
  +                    while( attE.hasMoreElements() ) {
  +                        String key=(String)attE.nextElement();
  +                        Object v=attributes.get( key );
  +                        socketFactory.setAttribute( key, v );
  +                    }
  +                }
  +             ep.setServerSocketFactory(socketFactory);
            } catch (ClassNotFoundException e){
                throw new TomcatException("Error loading SSLImplementation ",
                                          e);
  @@ -278,6 +287,10 @@
   
       public boolean isClientauthSet() {
           return (attributes.get("clientauth") != null);
  +    }
  +
  +    public boolean isAttributeSet( String attr ) {
  +        return (attributes.get(attr) != null);
       }
   
       public void setSecure( boolean b ) {
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to