Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Erdfelt2016-03-08 16:27:38 -0500
committerJoakim Erdfelt2016-03-08 16:27:38 -0500
commit195a02fdaaeae47512ea1ee1e3849c8e0fe137c2 (patch)
tree4078f886dad981514f5f4ca71c8df2223d6a5cf8
parent2cc50ed92522e28232865189be487a0b21f93b62 (diff)
downloadorg.eclipse.jetty.project-195a02fdaaeae47512ea1ee1e3849c8e0fe137c2.tar.gz
org.eclipse.jetty.project-195a02fdaaeae47512ea1ee1e3849c8e0fe137c2.tar.xz
org.eclipse.jetty.project-195a02fdaaeae47512ea1ee1e3849c8e0fe137c2.zip
Issue #85 - Expose TLS protocol used for connection in SecureRequestCustomizer
-rw-r--r--jetty-server/src/main/java/org/eclipse/jetty/server/SecureRequestCustomizer.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/SecureRequestCustomizer.java b/jetty-server/src/main/java/org/eclipse/jetty/server/SecureRequestCustomizer.java
index dc6cf79d5d..bf36446511 100644
--- a/jetty-server/src/main/java/org/eclipse/jetty/server/SecureRequestCustomizer.java
+++ b/jetty-server/src/main/java/org/eclipse/jetty/server/SecureRequestCustomizer.java
@@ -48,6 +48,8 @@ public class SecureRequestCustomizer implements HttpConfiguration.Customizer
*/
public static final String CACHED_INFO_ATTR = CachedInfo.class.getName();
+ private String sslSessionAttribute = "org.eclipse.jetty.servlet.request.ssl_session";
+
@Override
public void customize(Connector connector, HttpConfiguration channelConfig, Request request)
{
@@ -118,12 +120,23 @@ public class SecureRequestCustomizer implements HttpConfiguration.Customizer
request.setAttribute("javax.servlet.request.cipher_suite",cipherSuite);
request.setAttribute("javax.servlet.request.key_size",keySize);
request.setAttribute("javax.servlet.request.ssl_session_id", idStr);
+ request.setAttribute(getSslSessionAttribute(), sslSession);
}
catch (Exception e)
{
LOG.warn(Log.EXCEPTION,e);
}
}
+
+ public void setSslSessionAttribute(String attribute)
+ {
+ this.sslSessionAttribute = attribute;
+ }
+
+ public String getSslSessionAttribute()
+ {
+ return sslSessionAttribute;
+ }
@Override
public String toString()

Back to the top