< prev index next >

src/java.base/share/classes/sun/security/ssl/TransportContext.java

Print this page

        

*** 37,46 **** --- 37,47 ---- import javax.net.ssl.HandshakeCompletedEvent; import javax.net.ssl.HandshakeCompletedListener; import javax.net.ssl.SSLEngineResult.HandshakeStatus; import javax.net.ssl.SSLException; import javax.net.ssl.SSLSocket; + import sun.security.ssl.SupportedGroupsExtension.NamedGroup; /** * SSL/(D)TLS transportation context. */ class TransportContext implements ConnectionContext {
*** 156,178 **** byte type = HandshakeContext.getHandshakeType(this, plaintext); if (handshakeContext == null) { if (type == SSLHandshake.KEY_UPDATE.id || type == SSLHandshake.NEW_SESSION_TICKET.id) { ! if (!isNegotiated) { ! throw fatal(Alert.UNEXPECTED_MESSAGE, ! "Unexpected unnegotiated post-handshake" + ! " message: " + ! SSLHandshake.nameOf(type)); ! } ! if (type == SSLHandshake.KEY_UPDATE.id && ! !protocolVersion.useTLS13PlusSpec()) { throw fatal(Alert.UNEXPECTED_MESSAGE, "Unexpected post-handshake message: " + SSLHandshake.nameOf(type)); } - handshakeContext = new PostHandshakeContext(this); } else { handshakeContext = sslConfig.isClientMode ? new ClientHandshakeContext(sslContext, this) : new ServerHandshakeContext(sslContext, this); outputRecord.initHandshaker(); --- 157,174 ---- byte type = HandshakeContext.getHandshakeType(this, plaintext); if (handshakeContext == null) { if (type == SSLHandshake.KEY_UPDATE.id || type == SSLHandshake.NEW_SESSION_TICKET.id) { ! if (isNegotiated && ! protocolVersion.useTLS13PlusSpec()) { ! handshakeContext = new PostHandshakeContext(this); ! } else { throw fatal(Alert.UNEXPECTED_MESSAGE, "Unexpected post-handshake message: " + SSLHandshake.nameOf(type)); } } else { handshakeContext = sslConfig.isClientMode ? new ClientHandshakeContext(sslContext, this) : new ServerHandshakeContext(sslContext, this); outputRecord.initHandshaker();
< prev index next >