tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r1607309 - in /tomcat/trunk: java/org/apache/catalina/valves/SSLValve.java webapps/docs/changelog.xml
Date Wed, 02 Jul 2014 10:33:49 GMT
Author: remm
Date: Wed Jul  2 10:33:49 2014
New Revision: 1607309

URL: http://svn.apache.org/r1607309
Log:
Trivial change to add configuration fields to SSLValve for header names.

Modified:
    tomcat/trunk/java/org/apache/catalina/valves/SSLValve.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/valves/SSLValve.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/SSLValve.java?rev=1607309&r1=1607308&r2=1607309&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/valves/SSLValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/valves/SSLValve.java Wed Jul  2 10:33:49 2014
@@ -64,6 +64,10 @@ public class SSLValve extends ValveBase 
 
     private static final Log log = LogFactory.getLog(SSLValve.class);
 
+    protected String sslClientCertHeader = "ssl_client_cert";
+    protected String sslCipherHeader = "ssl_cipher";
+    protected String sslSessionIdHeader = "ssl_session_id";
+    protected String sslCipherUserKeySizeHeader = "ssl_cipher_usekeysize";
 
     //------------------------------------------------------ Constructor
     public SSLValve() {
@@ -71,6 +75,38 @@ public class SSLValve extends ValveBase 
     }
 
 
+    public String getSslClientCertHeader() {
+        return sslClientCertHeader;
+    }
+
+    public void setSslClientCertHeader(String sslClientCertHeader) {
+        this.sslClientCertHeader = sslClientCertHeader;
+    }
+
+    public String getSslCipherHeader() {
+        return sslCipherHeader;
+    }
+
+    public void setSslCipherHeader(String sslCipherHeader) {
+        this.sslCipherHeader = sslCipherHeader;
+    }
+
+    public String getSslSessionIdHeader() {
+        return sslSessionIdHeader;
+    }
+
+    public void setSslSessionIdHeader(String sslSessionIdHeader) {
+        this.sslSessionIdHeader = sslSessionIdHeader;
+    }
+
+    public String getSslCipherUserKeySizeHeader() {
+        return sslCipherUserKeySizeHeader;
+    }
+
+    public void setSslCipherUserKeySizeHeader(String sslCipherUserKeySizeHeader) {
+        this.sslCipherUserKeySizeHeader = sslCipherUserKeySizeHeader;
+    }
+
 
     public String mygetHeader(Request request, String header) {
         String strcert0 = request.getHeader(header);
@@ -88,7 +124,7 @@ public class SSLValve extends ValveBase 
         throws IOException, ServletException {
 
         /* mod_header converts the '\n' into ' ' so we have to rebuild the client certificate
*/
-        String strcert0 = mygetHeader(request, "ssl_client_cert");
+        String strcert0 = mygetHeader(request, sslClientCertHeader);
         if (strcert0 != null && strcert0.length()>28) {
             String strcert1 = strcert0.replace(' ', '\n');
             String strcert2 = strcert1.substring(28, strcert1.length()-26);
@@ -119,15 +155,15 @@ public class SSLValve extends ValveBase 
             }
             request.setAttribute(Globals.CERTIFICATES_ATTR, jsseCerts);
         }
-        strcert0 = mygetHeader(request, "ssl_cipher");
+        strcert0 = mygetHeader(request, sslCipherHeader);
         if (strcert0 != null) {
             request.setAttribute(Globals.CIPHER_SUITE_ATTR, strcert0);
         }
-        strcert0 = mygetHeader(request, "ssl_session_id");
+        strcert0 = mygetHeader(request, sslSessionIdHeader);
         if (strcert0 != null) {
             request.setAttribute(Globals.SSL_SESSION_ID_ATTR, strcert0);
         }
-        strcert0 = mygetHeader(request, "ssl_cipher_usekeysize");
+        strcert0 = mygetHeader(request, sslCipherUserKeySizeHeader);
         if (strcert0 != null) {
             request.setAttribute(Globals.KEY_SIZE_ATTR,
                     Integer.valueOf(strcert0));

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1607309&r1=1607308&r2=1607309&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Jul  2 10:33:49 2014
@@ -92,6 +92,9 @@
         Fix storeconfig exception routing issues, so that a major problem
         should avoid configuration overwrite. (remm)
       </fix>
+      <fix>
+        Add configuration fields for header names in SSLValve. (remm)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message