tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefán F. Stefánsson <>
Subject [PATCH] EmbededTomcat addSecureEndpoint(...)
Date Thu, 02 Nov 2000 11:32:06 GMT
I think this should go into the Tomcat 3.2 final build if humanly

The problem was simply that the keystore and keypass attributes were
never being set so Tomcat couldn't find it when starting the webserver.
Also, it didn't take the possibility of having client authentication
into consideration.  Finally, there was no support for dynamic server
socket factories in EmbededTomcat.  So what I did was overload the
fuction addSecureEndpoint so that it could take the clientauth String in
order to know if client authentication is needed and the socketfactory
String to be able to set the socket factory.

I added the following lines to the code in

    sc.setAttribute( "keystore", keyFile);
    sc.setAttribute( "keypass", keyPass);
    sc.setAttribute( "clientAuth", String.valueOf(clientAuth) );

    if( socketfactory != null ) sc.setAttribute( "socketFactory",
socketfactory );
    else sc.setAttribute( "socketFactory",

    if( clientauth != null && !clientauth.equalsIgnoreCase("false") )
sc.setAttribute( "clientAuth", clientauth );

The call to the old version of addSecureEndpoint (the one where no
clientAuth or socketFactory is specified) behaves in the same way as
before... no client authentication and using the default socket factory.

There is still an issue of being able to use other server socket
factories with the regular endpoints (no SSL).  But that issue probably
isn't as important as the SSL socket factory.  It's a trivial thing to
add it but I decided not to do that just in case you guys (Tomcat
developers) didn't like my way of doing this.

Kind regards, Stefan.

p.s. Please let me know if this patch is in any way unacceptable.

Stefan Freyr Stefansson
Software Developer
deCODE Genetics, Inc.

Phone: (+354) 570 2854
GSM:   (+354) 861 1718
Fax:   (+354) 491 3782
 <<Stefan Stefansson.vcf>> 

  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message