8171337: Check for correct SSLEngineImpl/SSLSocketImpl.setSSLParameters handshaker update method
authorxuelei
Tue, 20 Dec 2016 20:26:34 +0000
changeset 42778 3c8baf9075f1
parent 42777 a94fc33e9866
child 42779 6ba2ec372a88
8171337: Check for correct SSLEngineImpl/SSLSocketImpl.setSSLParameters handshaker update method Reviewed-by: wetmore
jdk/src/java.base/share/classes/sun/security/ssl/SSLEngineImpl.java
jdk/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java
--- a/jdk/src/java.base/share/classes/sun/security/ssl/SSLEngineImpl.java	Tue Dec 20 11:46:09 2016 -0800
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/SSLEngineImpl.java	Tue Dec 20 20:26:34 2016 +0000
@@ -2244,7 +2244,7 @@
         }
         applicationProtocols = params.getApplicationProtocols();
 
-        if ((handshaker != null) && !handshaker.started()) {
+        if ((handshaker != null) && !handshaker.activated()) {
             handshaker.setIdentificationProtocol(identificationProtocol);
             handshaker.setAlgorithmConstraints(algorithmConstraints);
             handshaker.setMaximumPacketSize(maximumPacketSize);
--- a/jdk/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java	Tue Dec 20 11:46:09 2016 -0800
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java	Tue Dec 20 20:26:34 2016 +0000
@@ -2158,7 +2158,7 @@
                         Utilities.addToSNIServerNameList(serverNames, host);
 
                 if (!roleIsServer &&
-                        (handshaker != null) && !handshaker.started()) {
+                        (handshaker != null) && !handshaker.activated()) {
                     handshaker.setSNIServerNames(serverNames);
                 }
             }
@@ -2186,7 +2186,7 @@
         this.serverNames =
             Utilities.addToSNIServerNameList(this.serverNames, this.host);
 
-        if (!roleIsServer && (handshaker != null) && !handshaker.started()) {
+        if (!roleIsServer && (handshaker != null) && !handshaker.activated()) {
             handshaker.setSNIServerNames(serverNames);
         }
     }
@@ -2638,7 +2638,7 @@
 
         applicationProtocols = params.getApplicationProtocols();
 
-        if ((handshaker != null) && !handshaker.started()) {
+        if ((handshaker != null) && !handshaker.activated()) {
             handshaker.setIdentificationProtocol(identificationProtocol);
             handshaker.setAlgorithmConstraints(algorithmConstraints);
             handshaker.setMaximumPacketSize(maximumPacketSize);