I don't use SSL with JNDIRealm so I didn't test this out. However, the patch seems ok and has been ignored long enough (with a few complaints). ;-) Let me know if there're any issues.
Thanks, Amy ----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, November 11, 2002 5:13 PM Subject: cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm JNDIRealm.java > amyroh 2002/11/11 17:13:37 > > Modified: catalina/src/share/org/apache/catalina/realm JNDIRealm.java > Log: > Add the possibility to use SSL with the JNDIRealm. > > This patch allows two more parameters to be set for the JNDIRealm. > If they are not explicitly set the JNDIRealm will behave in the same way as before. > > Submitted by Fredrik Westermarck & Jonathan Eric Miller. > > Revision Changes Path > 1.9 +58 -6 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/JNDIRealm.ja va > > Index: JNDIRealm.java > =================================================================== > RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/realm/JN DIRealm.java,v > retrieving revision 1.8 > retrieving revision 1.9 > diff -u -r1.8 -r1.9 > --- JNDIRealm.java 11 Jun 2002 15:32:28 -0000 1.8 > +++ JNDIRealm.java 12 Nov 2002 01:13:37 -0000 1.9 > @@ -188,6 +188,10 @@ > > // ----------------------------------------------------- Instance Variables > > + /** > + * The type of authentication to use > + */ > + protected String authentication = null; > > /** > * The connection username for the server we will contact. > @@ -233,6 +237,10 @@ > */ > protected static final String name = "JNDIRealm"; > > + /** > + * The protocol that will be used in the communication with the directory server. > + */ > + protected String protocol = null; > > /** > * The base element for user searches. > @@ -320,10 +328,28 @@ > protected boolean roleSubtree = false; > > > - > // ------------------------------------------------------------- Properties > > + /** > + * Return the type of authentication to use. > + */ > + public String getAuthentication() { > > + return authentication; > + > + } > + > + /** > + * Set the type of authentication to use. > + * > + * @param authentication The authentication > + */ > + public void setAuthentication(String authentication) { > + > + this.authentication = authentication; > + > + } > + > /** > * Return the connection username for this Realm. > */ > @@ -411,6 +437,28 @@ > > } > > + > + /** > + * Return the protocol to be used. > + */ > + public String getProtocol() { > + > + return protocol; > + > + } > + > + /** > + * Set the protocol for this Realm. > + * > + * @param protocol The new protocol. > + */ > + public void setProtocol(String protocol) { > + > + this.protocol = protocol; > + > + } > + > + > /** > * Return the base element for user searches. > */ > @@ -1294,6 +1342,11 @@ > env.put(Context.SECURITY_CREDENTIALS, connectionPassword); > if (connectionURL != null) > env.put(Context.PROVIDER_URL, connectionURL); > + if (authentication != null) > + env.put(Context.SECURITY_AUTHENTICATION, authentication); > + if (protocol != null) > + env.put(Context.SECURITY_PROTOCOL, protocol); > + > context = new InitialDirContext(env); > return (context); > > @@ -1378,4 +1431,3 @@ > } > > } > - > > > > > -- > To unsubscribe, e-mail: <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org> > For additional commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org> > > -- To unsubscribe, e-mail: <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>