You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2006/11/21 00:34:24 UTC
svn commit: r477406 - in /tomcat/container/tc5.5.x:
catalina/src/share/org/apache/catalina/connector/
webapps/admin/WEB-INF/classes/org/apache/webapp/admin/
webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/
webapps/admin/connector/ webap...
Author: markt
Date: Mon Nov 20 15:34:22 2006
New Revision: 477406
URL: http://svn.apache.org/viewvc?view=rev&rev=477406
Log:
Fix bug 40999. Add trust store configuration to admin webapp.
Also clean up code in o.a.webapp.admin.connector
Modified:
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/mbeans-descriptors.xml
tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources.properties
tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/AddConnectorAction.java
tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/ConnectorForm.java
tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/DeleteConnectorAction.java
tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/DeleteConnectorsAction.java
tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/EditConnectorAction.java
tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/SaveConnectorAction.java
tomcat/container/tc5.5.x/webapps/admin/connector/connector.jsp
tomcat/container/tc5.5.x/webapps/docs/changelog.xml
Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/mbeans-descriptors.xml
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/mbeans-descriptors.xml?view=diff&rev=477406&r1=477405&r2=477406
==============================================================================
--- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/mbeans-descriptors.xml (original)
+++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/connector/mbeans-descriptors.xml Mon Nov 20 15:34:22 2006
@@ -171,6 +171,18 @@
description="The thread priority for processors"
type="int"/>
+ <attribute name="trustStoreFile"
+ description="Pathname to the trust store file to be used"
+ type="java.lang.String"/>
+
+ <attribute name="trustStorePass"
+ description="Password for accessing the trust store file"
+ type="java.lang.String"/>
+
+ <attribute name="trustStoreType"
+ description="Type of trust store file to be used for trusted certificates"
+ type="java.lang.String"/>
+
<attribute name="URIEncoding"
description="Character encoding used to decode the URI"
type="java.lang.String"/>
Modified: tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources.properties
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources.properties?view=diff&rev=477406&r1=477405&r2=477406
==============================================================================
--- tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources.properties (original)
+++ tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources.properties Mon Nov 20 15:34:22 2006
@@ -142,6 +142,9 @@
connector.keystore.filename=Keystore Filename
connector.keystore.password=Keystore Password
connector.keystore.type=Keystore Type
+connector.truststore.filename=Trust Store Filename
+connector.truststore.password=Trust Store Password
+connector.truststore.type=Trust Store Type
connector.sslProtocol=SSL Protocol
connector.keyPass.warning=<li>Please use keytool to generate certificate.</li>
connector.secure=Secure
Modified: tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/AddConnectorAction.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/AddConnectorAction.java?view=diff&rev=477406&r1=477405&r2=477406
==============================================================================
--- tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/AddConnectorAction.java (original)
+++ tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/AddConnectorAction.java Mon Nov 20 15:34:22 2006
@@ -19,18 +19,15 @@
import java.io.IOException;
import java.net.URLEncoder;
-import java.util.Locale;
import java.util.ArrayList;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.struts.action.Action;
-import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
-import org.apache.struts.util.MessageResources;
import org.apache.webapp.admin.TomcatTreeBuilder;
import org.apache.webapp.admin.LabelValueBean;
import org.apache.webapp.admin.Lists;
@@ -120,6 +117,9 @@
connectorFm.setKeyStoreFileName("");
connectorFm.setKeyStorePassword("");
connectorFm.setKeyStoreType("JKS");
+ connectorFm.setTrustStoreFileName("");
+ connectorFm.setTrustStorePassword("");
+ connectorFm.setTrustStoreType("JKS");
connectorFm.setSslProtocol("TLS");
// supported only by Coyote connectors
Modified: tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/ConnectorForm.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/ConnectorForm.java?view=diff&rev=477406&r1=477405&r2=477406
==============================================================================
--- tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/ConnectorForm.java (original)
+++ tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/ConnectorForm.java Mon Nov 20 15:34:22 2006
@@ -19,10 +19,11 @@
package org.apache.webapp.admin.connector;
import javax.servlet.http.HttpServletRequest;
-import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
+import org.apache.struts.action.ActionMessage;
+
import java.net.InetAddress;
import java.util.List;
@@ -220,6 +221,21 @@
private String keyStoreType = null;
/**
+ * The trustStore Filename.
+ */
+ private String trustStoreFileName = null;
+
+ /**
+ * The trustStore Password.
+ */
+ private String trustStorePassword = null;
+
+ /**
+ * The trustStore Type.
+ */
+ private String trustStoreType = null;
+
+ /**
* The text for the Ssl Protocol.
*/
private String sslProtocol= null;
@@ -633,6 +649,8 @@
this.keyStoreType = keyStoreType;
}
+
+
/**
* Return the sslProtocol
*/
@@ -872,6 +890,63 @@
}
/**
+ * Return the trust store filename for this connector.
+ */
+ public String getTrustStoreFileName() {
+
+ return this.trustStoreFileName;
+
+ }
+
+
+ /**
+ * Set the trust store filename for this connector.
+ */
+ public void setTrustStoreFileName(String trustStoreFileName) {
+
+ this.trustStoreFileName = trustStoreFileName;
+
+ }
+
+ /**
+ * Return the trust store password for this connector.
+ */
+ public String getTrustStorePassword() {
+
+ return this.trustStorePassword;
+
+ }
+
+
+ /**
+ * Set the trust store password for this connector.
+ */
+ public void setTrustStorePassword(String trustStorePassword) {
+
+ this.trustStorePassword = trustStorePassword;
+
+ }
+
+ /**
+ * Return the trust store type for this connector.
+ */
+ public String getTrustStoreType() {
+
+ return this.trustStoreType;
+
+ }
+
+
+ /**
+ * Set the trust store type for this connector.
+ */
+ public void setTrustStoreType(String trustStoreType) {
+
+ this.trustStoreType = trustStoreType;
+
+ }
+
+ /**
* Return the URIEncoding text.
*/
public String getURIEncodingText() {
@@ -1093,6 +1168,10 @@
this.secure = "false";
this.tcpNoDelay = "false";
this.xpoweredBy = "false";
+ this.trustStoreFileName = null;
+ this.trustStorePassword = null;
+ this.trustStoreType = null;
+
}
@@ -1114,54 +1193,39 @@
errors = new ActionErrors();
- String submit = request.getParameter("submit");
- // front end validation when save is clicked.
- //if (submit != null) {
-
- /* The IP address can also be null -- which means open the
- server socket on *all* IP addresses for this host */
- if ((address.length() > 0) && !address.equalsIgnoreCase(" ")) {
- try {
- InetAddress.getByName(address);
- } catch (Exception e) {
- errors.add("address", new ActionError("error.address.invalid"));
- }
- } else {
- address = " ";
+ /* The IP address can also be null -- which means open the
+ server socket on *all* IP addresses for this host */
+ if ((address.length() > 0) && !address.equalsIgnoreCase(" ")) {
+ try {
+ InetAddress.getByName(address);
+ } catch (Exception e) {
+ errors.add("address", new ActionMessage("error.address.invalid"));
}
+ } else {
+ address = " ";
+ }
- /* ports */
- numberCheck("portNumber", portText, true, 1, 65535);
- numberCheck("redirectPortText", redirectPortText, true, -1, 65535);
-
- /* processors*/
- //numberCheck("minProcessorsText", minProcessorsText, true, 1, 512);
- //try {
- // if min is a valid integer, then check that max >= min
- //int min = Integer.parseInt(minProcessorsText);
- //numberCheck("maxProcessorsText", maxProcessorsText, true, min, 512);
- //} catch (Exception e) {
- // check for the complete range
- //numberCheck("maxProcessorsText", maxProcessorsText, true, 1, 512);
- //}
+ /* ports */
+ numberCheck("portNumber", portText, true, 1, 65535);
+ numberCheck("redirectPortText", redirectPortText, true, -1, 65535);
- // proxy
- if ((proxyName!= null) && (proxyName.length() > 0)) {
- try {
- InetAddress.getByName(proxyName);
- } catch (Exception e) {
- errors.add("proxyName", new ActionError("error.proxyName.invalid"));
- }
- }
-
- // supported only by Coyote HTTP and HTTPS connectors
- if (!("AJP".equalsIgnoreCase(connectorType))) {
- numberCheck("acceptCountText", acceptCountText, true, 0, 128);
- //numberCheck("connTimeOutText", connTimeOutText, true, -1, 60000);
- numberCheck("bufferSizeText", bufferSizeText, true, 1, 8192);
- numberCheck("proxyPortText", proxyPortText, true, 0, 65535);
+ // proxy
+ if ((proxyName!= null) && (proxyName.length() > 0)) {
+ try {
+ InetAddress.getByName(proxyName);
+ } catch (Exception e) {
+ errors.add("proxyName",
+ new ActionMessage("error.proxyName.invalid"));
}
- //}
+ }
+
+ // supported only by Coyote HTTP and HTTPS connectors
+ if (!("AJP".equalsIgnoreCase(connectorType))) {
+ numberCheck("acceptCountText", acceptCountText, true, 0, 128);
+ //numberCheck("connTimeOutText", connTimeOutText, true, -1, 60000);
+ numberCheck("bufferSizeText", bufferSizeText, true, 1, 8192);
+ numberCheck("proxyPortText", proxyPortText, true, 0, 65535);
+ }
return errors;
}
@@ -1172,7 +1236,8 @@
*
* @param field The field name in the form for which this error occured.
* @param numText The string representation of the number.
- * @param rangeCheck Boolean value set to true of reange check should be performed.
+ * @param rangeCheck Boolean value set to true of reange check should be
+ * performed.
*
* @param min The lower limit of the range
* @param max The upper limit of the range
@@ -1184,7 +1249,7 @@
/* Check for 'is required' */
if ((numText == null) || (numText.length() < 1)) {
- errors.add(field, new ActionError("error."+field+".required"));
+ errors.add(field, new ActionMessage("error."+field+".required"));
} else {
/*check for 'must be a number' in the 'valid range'*/
@@ -1194,11 +1259,11 @@
if (rangeCheck) {
if ((num < min) || (num > max ))
errors.add( field,
- new ActionError("error."+ field +".range"));
+ new ActionMessage("error."+ field +".range"));
}
} catch (NumberFormatException e) {
errors.add(field,
- new ActionError("error."+ field + ".format"));
+ new ActionMessage("error."+ field + ".format"));
}
}
}
Modified: tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/DeleteConnectorAction.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/DeleteConnectorAction.java?view=diff&rev=477406&r1=477405&r2=477406
==============================================================================
--- tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/DeleteConnectorAction.java (original)
+++ tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/DeleteConnectorAction.java Mon Nov 20 15:34:22 2006
@@ -20,28 +20,18 @@
import java.io.IOException;
import java.util.Collections;
import java.util.Iterator;
-import java.util.List;
import java.util.Locale;
-import java.util.TreeSet;
-import java.util.Set;
import java.util.ArrayList;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
import org.apache.struts.action.Action;
-import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import javax.management.MBeanServer;
-import javax.management.MBeanServerFactory;
-import javax.management.QueryExp;
-import javax.management.Query;
-import javax.management.ObjectInstance;
import javax.management.ObjectName;
-import javax.management.JMException;
import org.apache.struts.util.MessageResources;
import org.apache.webapp.admin.ApplicationServlet;
@@ -90,7 +80,6 @@
// Acquire the resources that we need
- HttpSession session = request.getSession();
Locale locale = getLocale(request);
MessageResources resources = getResources(request);
Modified: tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/DeleteConnectorsAction.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/DeleteConnectorsAction.java?view=diff&rev=477406&r1=477405&r2=477406
==============================================================================
--- tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/DeleteConnectorsAction.java (original)
+++ tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/DeleteConnectorsAction.java Mon Nov 20 15:34:22 2006
@@ -19,15 +19,9 @@
package org.apache.webapp.admin.connector;
import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
import java.util.Locale;
-import java.util.Set;
-import java.util.TreeSet;
import javax.management.MBeanServer;
import javax.management.ObjectName;
-import javax.management.ObjectInstance;
-import javax.management.modelmbean.ModelMBean;
import javax.servlet.ServletException;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpServletRequest;
@@ -120,7 +114,6 @@
// Look up our MBeanFactory MBean
ObjectName fname = null;
- String domain = null;
TreeControlNode node = null;
// Remove the specified connectors
@@ -129,7 +122,6 @@
if (control != null) {
control.selectNode(null);
node = control.findNode(connectors[i]);
- domain = node.getDomain();
// Look up our MBeanFactory MBean
fname = TomcatTreeBuilder.getMBeanFactory();
mBServer.invoke(fname, operation,
Modified: tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/EditConnectorAction.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/EditConnectorAction.java?view=diff&rev=477406&r1=477405&r2=477406
==============================================================================
--- tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/EditConnectorAction.java (original)
+++ tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/EditConnectorAction.java Mon Nov 20 15:34:22 2006
@@ -18,31 +18,24 @@
package org.apache.webapp.admin.connector;
import java.io.IOException;
-import java.util.Iterator;
-import java.util.List;
import java.util.Locale;
-import java.util.ArrayList;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.struts.action.Action;
-import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.util.MessageResources;
import javax.management.MBeanServer;
-import javax.management.ObjectInstance;
import javax.management.ObjectName;
-import javax.management.JMException;
import org.apache.webapp.admin.ApplicationServlet;
-import org.apache.webapp.admin.LabelValueBean;
import org.apache.webapp.admin.Lists;
-import org.apache.webapp.admin.TomcatTreeBuilder;
import java.net.InetAddress;
+
/**
* The <code>Action</code> that sets up <em>Edit Connector</em> transactions.
*
@@ -251,6 +244,15 @@
((String) mBServer.getAttribute(cname, attribute));
attribute = "keystoreType";
connectorFm.setKeyStoreType
+ ((String) mBServer.getAttribute(cname, attribute));
+ attribute = "trustStoreFile";
+ connectorFm.setTrustStoreFileName
+ ((String) mBServer.getAttribute(cname, attribute));
+ attribute = "trustStorePass";
+ connectorFm.setTrustStorePassword
+ ((String) mBServer.getAttribute(cname, attribute));
+ attribute = "trustStoreType";
+ connectorFm.setTrustStoreType
((String) mBServer.getAttribute(cname, attribute));
attribute = "sslProtocol";
connectorFm.setSslProtocol
Modified: tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/SaveConnectorAction.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/SaveConnectorAction.java?view=diff&rev=477406&r1=477405&r2=477406
==============================================================================
--- tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/SaveConnectorAction.java (original)
+++ tomcat/container/tc5.5.x/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/connector/SaveConnectorAction.java Mon Nov 20 15:34:22 2006
@@ -18,27 +18,21 @@
package org.apache.webapp.admin.connector;
import java.net.URLEncoder;
-import java.util.Iterator;
import java.util.Locale;
import java.io.IOException;
import javax.management.Attribute;
import javax.management.MBeanServer;
-import javax.management.MBeanServerFactory;
-import javax.management.QueryExp;
-import javax.management.Query;
-import javax.management.ObjectInstance;
import javax.management.ObjectName;
-import javax.management.JMException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.struts.action.Action;
-import org.apache.struts.action.ActionError;
-import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
+import org.apache.struts.action.ActionMessage;
+import org.apache.struts.action.ActionMessages;
import org.apache.struts.util.MessageResources;
import org.apache.webapp.admin.ApplicationServlet;
import org.apache.webapp.admin.TomcatTreeBuilder;
@@ -149,9 +143,9 @@
// Ensure that the requested connector name and port is unique
if (mBServer.isRegistered(oname) ||
(!mBServer.queryNames(search, null).isEmpty())) {
- ActionErrors errors = new ActionErrors();
+ ActionMessages errors = new ActionMessages();
errors.add("connectorName",
- new ActionError("error.connectorName.exists"));
+ new ActionMessage("error.connectorName.exists"));
saveErrors(request, errors);
return (new ActionForward(mapping.getInput()));
}
@@ -298,24 +292,6 @@
}
mBServer.setAttribute(coname,
new Attribute("redirectPort", new Integer(redirectPort)));
- attribute = "minProcessors";
- int minProcessors = 5;
- try {
- minProcessors = Integer.parseInt(cform.getMinProcessorsText());
- } catch (Throwable t) {
- minProcessors = 5;
- }
- //mBServer.setAttribute(coname,
- // new Attribute("minProcessors", new Integer(minProcessors)));
- attribute = "maxProcessors";
- int maxProcessors = 20;
- try {
- maxProcessors = Integer.parseInt(cform.getMaxProcessorsText());
- } catch (Throwable t) {
- maxProcessors = 20;
- }
- //mBServer.setAttribute(coname,
- // new Attribute("maxProcessors", new Integer(maxProcessors)));
attribute = "maxKeepAliveRequests";
int maxKeepAliveRequests = 100;
@@ -414,43 +390,51 @@
// HTTPS specific properties
if("HTTPS".equalsIgnoreCase(connectorType)) {
- attribute = "algorithm";
String algorithm = cform.getAlgorithm();
if ((algorithm != null) && (algorithm.length()>0))
mBServer.setAttribute(coname,
new Attribute("algorithm", algorithm));
- attribute = "clientAuth";
mBServer.setAttribute(coname,
new Attribute("clientAuth",
cform.getClientAuthentication()));
- attribute = "ciphers";
String ciphers = cform.getCiphers();
if ((ciphers != null) && (ciphers.length()>0))
mBServer.setAttribute(coname,
new Attribute("ciphers", ciphers));
- attribute = "keystoreFile";
String keyFile = cform.getKeyStoreFileName();
if ((keyFile != null) && (keyFile.length()>0))
mBServer.setAttribute(coname,
new Attribute("keystoreFile", keyFile));
- attribute = "keystorePass";
String keyPass = cform.getKeyStorePassword();
if ((keyPass != null) && (keyPass.length()>0))
mBServer.setAttribute(coname,
new Attribute("keystorePass", keyPass));
// request.setAttribute("warning", "connector.keyPass.warning");
- attribute = "keystoreType";
String keyType = cform.getKeyStoreType();
if ((keyType != null) && (keyType.length()>0))
mBServer.setAttribute(coname,
new Attribute("keystoreType", keyType));
- attribute = "sslProtocol";
+ String trustFile = cform.getTrustStoreFileName();
+ if ((trustFile != null) && (trustFile.length()>0))
+ mBServer.setAttribute(coname,
+ new Attribute("trustStoreFile", trustFile));
+
+ String trustPass = cform.getTrustStorePassword();
+ if ((trustPass != null) && (trustPass.length()>0))
+ mBServer.setAttribute(coname,
+ new Attribute("trustStorePass", trustPass));
+
+ String trustType = cform.getTrustStoreType();
+ if ((trustType != null) && (trustType.length()>0))
+ mBServer.setAttribute(coname,
+ new Attribute("trustStoreType", trustType));
+
String sslProtocol = cform.getSslProtocol();
if ((sslProtocol != null) && (sslProtocol.length()>0))
mBServer.setAttribute(coname,
Modified: tomcat/container/tc5.5.x/webapps/admin/connector/connector.jsp
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/admin/connector/connector.jsp?view=diff&rev=477406&r1=477405&r2=477406
==============================================================================
--- tomcat/container/tc5.5.x/webapps/admin/connector/connector.jsp (original)
+++ tomcat/container/tc5.5.x/webapps/admin/connector/connector.jsp Mon Nov 20 15:34:22 2006
@@ -396,11 +396,6 @@
<controls:label><bean:message key="connector.keystore.password"/>:</controls:label>
<controls:data>
<html:password property="keyStorePassword" size="30" styleId="password"/>
- <%--
- <logic:equal name="connectorForm" property="adminAction" value="Edit">
- <bean:write name="connectorForm" property="keyStorePassword"/>
- </logic:equal>
- --%>
</controls:data>
</controls:row>
</logic:equal>
@@ -414,6 +409,42 @@
</logic:equal>
<logic:equal name="connectorForm" property="adminAction" value="Edit">
<bean:write name="connectorForm" property="keyStoreType"/>
+ </logic:equal>
+ </controls:data>
+ </controls:row>
+
+ <%-- Input allowed only on create --%>
+ <controls:row labelStyle="table-label-text" dataStyle="table-normal-text" styleId="truststore">
+ <controls:label><bean:message key="connector.truststore.filename"/>:</controls:label>
+ <controls:data>
+ <logic:equal name="connectorForm" property="adminAction" value="Create">
+ <html:text property="trustStoreFileName" size="30" styleId="truststore"/>
+ </logic:equal>
+ <logic:equal name="connectorForm" property="adminAction" value="Edit">
+ <bean:write name="connectorForm" property="trustStoreFileName"/>
+ </logic:equal>
+ </controls:data>
+ </controls:row>
+
+ <%-- input password allowed only while creating connector --%>
+ <logic:equal name="connectorForm" property="adminAction" value="Create">
+ <controls:row labelStyle="table-label-text" dataStyle="table-normal-text" styleId="trustpassword">
+ <controls:label><bean:message key="connector.truststore.password"/>:</controls:label>
+ <controls:data>
+ <html:password property="trustStorePassword" size="30" styleId="trustpassword"/>
+ </controls:data>
+ </controls:row>
+ </logic:equal>
+
+ <%-- Input allowed only on create --%>
+ <controls:row labelStyle="table-label-text" dataStyle="table-normal-text" styleId="trusttype">
+ <controls:label><bean:message key="connector.truststore.type"/>:</controls:label>
+ <controls:data>
+ <logic:equal name="connectorForm" property="adminAction" value="Create">
+ <html:text property="trustStoreType" size="30" styleId="trusttype"/>
+ </logic:equal>
+ <logic:equal name="connectorForm" property="adminAction" value="Edit">
+ <bean:write name="connectorForm" property="trustStoreType"/>
</logic:equal>
</controls:data>
</controls:row>
Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?view=diff&rev=477406&r1=477405&r2=477406
==============================================================================
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Mon Nov 20 15:34:22 2006
@@ -183,6 +183,10 @@
<bug>40874</bug>: Correct log4j configuration in documentation webapp.
Patch provided by Franck Borel. (markt)
</fix>
+ <fix>
+ <bug>40999</bug>: Add trust store configuration for SSL connectors to
+ the admin webapp. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Cluster">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org