Issue #85 - Expose TLS protocol used for connection in SecureRequestCustomizer.

Exposed the SSLSession as attribute only if the attribute key is valid.
This commit is contained in:
Simone Bordet 2016-05-25 00:50:01 +02:00
parent c6aafecceb
commit 031bc0fed9
1 changed files with 3 additions and 1 deletions

View File

@ -265,7 +265,9 @@ 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);
String sessionAttribute = getSslSessionAttribute();
if (sessionAttribute != null && sessionAttribute.isEmpty())
request.setAttribute(sessionAttribute, sslSession);
}
catch (Exception e)
{