geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgenen...@apache.org
Subject svn commit: r280319 - /geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/HttpsConnectorGBean.java
Date Mon, 12 Sep 2005 11:04:55 GMT
Author: jgenender
Date: Mon Sep 12 04:04:50 2005
New Revision: 280319

URL: http://svn.apache.org/viewcvs?rev=280319&view=rev
Log:
Added truststore attributes

Modified:
    geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/HttpsConnectorGBean.java

Modified: geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/HttpsConnectorGBean.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/HttpsConnectorGBean.java?rev=280319&r1=280318&r2=280319&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/HttpsConnectorGBean.java
(original)
+++ geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/HttpsConnectorGBean.java
Mon Sep 12 04:04:50 2005
@@ -17,6 +17,7 @@
 public class HttpsConnectorGBean extends ConnectorGBean implements SecureConnector {
     private final ServerInfo serverInfo;
     private String keystoreFileName;
+    private String truststoreFileName;
 
     public HttpsConnectorGBean(String name, String protocol, String host, int port, TomcatContainer
container, ServerInfo serverInfo) throws Exception {
         super(name, protocol, host, port, container);
@@ -70,6 +71,15 @@
         connector.setAttribute("keystoreFile", serverInfo.resolvePath(keystoreFileName));
     }
 
+    public String getTruststoreFileName() {
+        return truststoreFileName; // don't look it up as we need it to be relative
+    }
+
+    public void setTruststoreFileName(String name) {
+        truststoreFileName = name;
+        connector.setAttribute("truststoreFile", serverInfo.resolvePath(truststoreFileName));
+    }
+    
     /**
      * Sets the password used to access the keystore, and by default, used to
      * access the server private key inside the keystore.  Not all connectors
@@ -81,6 +91,10 @@
         connector.setAttribute("keystorePass", password);
     }
 
+    public void setTruststorePassword(String password) {
+        connector.setAttribute("truststorePass", password);
+    }
+
     /**
      * Gets the format of the entries in the keystore.  The default format for
      * Java keystores is JKS, though some connector implementations support
@@ -99,6 +113,14 @@
         connector.setAttribute("keystoreType", type);
     }
 
+    public String getTruststoreType() {
+        return (String)connector.getAttribute("truststoreType");
+    }
+
+    public void setTruststoreType(String type) {
+        connector.setAttribute("truststoreType", type);
+    }
+    
     /**
      * Gets the certificate algorithm used to access the keystore.  This may
      * be different for different JVM vendors, but should not usually be
@@ -167,12 +189,15 @@
     static {
         GBeanInfoBuilder infoFactory = new GBeanInfoBuilder("Tomcat Connector", HttpsConnectorGBean.class,
ConnectorGBean.GBEAN_INFO);
         infoFactory.addAttribute("keystoreFileName", String.class, true, true);
+        infoFactory.addAttribute("truststoreFileName", String.class, true, true);
         infoFactory.addAttribute("algorithm", String.class, true, true);
         infoFactory.addAttribute("keystorePassword", String.class, true, true);
+        infoFactory.addAttribute("truststorePassword", String.class, true, true);
 // todo should we support this?
 //        infoFactory.addAttribute("keyPassword", String.class, true, true);
         infoFactory.addAttribute("secureProtocol", String.class, true, true);
         infoFactory.addAttribute("keystoreType", String.class, true, true);
+        infoFactory.addAttribute("truststoreType", String.class, true, true);
         infoFactory.addAttribute("clientAuthRequired", boolean.class, true, true);
         infoFactory.addInterface(SecureConnector.class);
 



Mime
View raw message