8228396: Re-enable Stateless Resumption On by default for merge to mainline
authorascarpino
Thu, 18 Jul 2019 13:58:34 -0700
changeset 57500 ab6867688e7a
parent 57499 0e2453f75881
child 57501 a297f7ab46c3
8228396: Re-enable Stateless Resumption On by default for merge to mainline Reviewed-by: jnimeh
src/java.base/share/classes/sun/security/ssl/SSLSessionContextImpl.java
--- a/src/java.base/share/classes/sun/security/ssl/SSLSessionContextImpl.java	Tue Jul 23 11:17:59 2019 -0700
+++ b/src/java.base/share/classes/sun/security/ssl/SSLSessionContextImpl.java	Thu Jul 18 13:58:34 2019 -0700
@@ -70,7 +70,7 @@
     private int timeout;                // timeout in seconds
 
     // Default setting for stateless session resumption support (RFC 5077)
-    private boolean statelessSession = false;
+    private boolean statelessSession = true;
 
     // package private
     SSLSessionContextImpl(boolean server) {
@@ -234,13 +234,15 @@
             // Property for Session Cache state
             if (server) {
                 st = GetPropertyAction.privilegedGetProperty(
-                        "jdk.tls.server.enableSessionTicketExtension", "false");
+                        "jdk.tls.server.enableSessionTicketExtension", "true");
             } else {
                 st = GetPropertyAction.privilegedGetProperty(
-                        "jdk.tls.client.enableSessionTicketExtension", "false");
+                        "jdk.tls.client.enableSessionTicketExtension", "true");
             }
 
-            statelessSession = Boolean.parseBoolean(st);
+            if (st.compareToIgnoreCase("false") == 0) {
+                statelessSession = false;
+            }
 
             // Property for Session Ticket Timeout.  The value can be changed
             // by SSLSessionContext.setSessionTimeout(int)