--- a/src/java.base/share/classes/sun/security/ssl/PostHandshakeContext.java Tue Dec 18 19:13:54 2018 +0530
+++ b/src/java.base/share/classes/sun/security/ssl/PostHandshakeContext.java Tue Dec 18 12:08:51 2018 -0800
@@ -43,7 +43,7 @@
super(context);
if (!negotiatedProtocol.useTLS13PlusSpec()) {
- conContext.fatal(Alert.UNEXPECTED_MESSAGE,
+ throw conContext.fatal(Alert.UNEXPECTED_MESSAGE,
"Post-handshake not supported in " + negotiatedProtocol.name);
}
@@ -63,16 +63,15 @@
void dispatch(byte handshakeType, ByteBuffer fragment) throws IOException {
SSLConsumer consumer = handshakeConsumers.get(handshakeType);
if (consumer == null) {
- conContext.fatal(Alert.UNEXPECTED_MESSAGE,
+ throw conContext.fatal(Alert.UNEXPECTED_MESSAGE,
"Unexpected post-handshake message: " +
SSLHandshake.nameOf(handshakeType));
- return;
}
try {
consumer.consume(this, fragment);
} catch (UnsupportedOperationException unsoe) {
- conContext.fatal(Alert.UNEXPECTED_MESSAGE,
+ throw conContext.fatal(Alert.UNEXPECTED_MESSAGE,
"Unsupported post-handshake message: " +
SSLHandshake.nameOf(handshakeType), unsoe);
}