From bc7a8842a3fb939b4a78fcc429c609b2e57bc3b3 Mon Sep 17 00:00:00 2001 From: Anthony Scarpino Date: Wed, 17 Jul 2019 12:31:21 -0700 Subject: [PATCH] 8227551: Session Resumption without Server-Side State off by default Reviewed-by: xuelei, jnimeh, jjiang --- open.iml | 11 +++++++++++ .../sun/security/ssl/SSLSessionContextImpl.java | 13 ++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) create mode 100644 open.iml diff --git a/open.iml b/open.iml new file mode 100644 index 00000000000..164ef582e9c --- /dev/null +++ b/open.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/java.base/share/classes/sun/security/ssl/SSLSessionContextImpl.java b/src/java.base/share/classes/sun/security/ssl/SSLSessionContextImpl.java index a8307d219e1..8727a417e72 100644 --- a/src/java.base/share/classes/sun/security/ssl/SSLSessionContextImpl.java +++ b/src/java.base/share/classes/sun/security/ssl/SSLSessionContextImpl.java @@ -69,8 +69,8 @@ final class SSLSessionContextImpl implements SSLSessionContext { private int cacheLimit; // the max cache size private int timeout; // timeout in seconds - // Does this context support stateless session (RFC 5077) - private boolean statelessSession = true; + // Default setting for stateless session resumption support (RFC 5077) + private boolean statelessSession = false; // package private SSLSessionContextImpl(boolean server) { @@ -234,15 +234,14 @@ final class SSLSessionContextImpl implements SSLSessionContext { // Property for Session Cache state if (server) { st = GetPropertyAction.privilegedGetProperty( - "jdk.tls.server.enableSessionTicketExtension", "true"); + "jdk.tls.server.enableSessionTicketExtension", "false"); } else { st = GetPropertyAction.privilegedGetProperty( - "jdk.tls.client.enableSessionTicketExtension", "true"); - } - if (st.compareToIgnoreCase("false") == 0) { - statelessSession = false; + "jdk.tls.client.enableSessionTicketExtension", "false"); } + statelessSession = Boolean.parseBoolean(st); + // Property for Session Ticket Timeout. The value can be changed // by SSLSessionContext.setSessionTimeout(int) String s = GetPropertyAction.privilegedGetProperty(