From 252d6991bc46c0c7723bec952e3e8dcaa06528d1 Mon Sep 17 00:00:00 2001 From: Xue-Lei Andrew Fan Date: Tue, 20 Dec 2016 20:26:34 +0000 Subject: [PATCH] 8171337: Check for correct SSLEngineImpl/SSLSocketImpl.setSSLParameters handshaker update method Reviewed-by: wetmore --- .../share/classes/sun/security/ssl/SSLEngineImpl.java | 2 +- .../share/classes/sun/security/ssl/SSLSocketImpl.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jdk/src/java.base/share/classes/sun/security/ssl/SSLEngineImpl.java b/jdk/src/java.base/share/classes/sun/security/ssl/SSLEngineImpl.java index f9941165771..188ba825758 100644 --- a/jdk/src/java.base/share/classes/sun/security/ssl/SSLEngineImpl.java +++ b/jdk/src/java.base/share/classes/sun/security/ssl/SSLEngineImpl.java @@ -2244,7 +2244,7 @@ public final class SSLEngineImpl extends SSLEngine { } applicationProtocols = params.getApplicationProtocols(); - if ((handshaker != null) && !handshaker.started()) { + if ((handshaker != null) && !handshaker.activated()) { handshaker.setIdentificationProtocol(identificationProtocol); handshaker.setAlgorithmConstraints(algorithmConstraints); handshaker.setMaximumPacketSize(maximumPacketSize); diff --git a/jdk/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java b/jdk/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java index 2e20d538d6e..be69a7697e4 100644 --- a/jdk/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java +++ b/jdk/src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java @@ -2158,7 +2158,7 @@ public final class SSLSocketImpl extends BaseSSLSocketImpl { Utilities.addToSNIServerNameList(serverNames, host); if (!roleIsServer && - (handshaker != null) && !handshaker.started()) { + (handshaker != null) && !handshaker.activated()) { handshaker.setSNIServerNames(serverNames); } } @@ -2186,7 +2186,7 @@ public final class SSLSocketImpl extends BaseSSLSocketImpl { 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 @@ public final class SSLSocketImpl extends BaseSSLSocketImpl { applicationProtocols = params.getApplicationProtocols(); - if ((handshaker != null) && !handshaker.started()) { + if ((handshaker != null) && !handshaker.activated()) { handshaker.setIdentificationProtocol(identificationProtocol); handshaker.setAlgorithmConstraints(algorithmConstraints); handshaker.setMaximumPacketSize(maximumPacketSize);