8273553: sun.security.ssl.SSLEngineImpl.closeInbound also has similar error of JDK-8253368

Reviewed-by: xuelei, rhalade, coffeys
This commit is contained in:
Bradford Wetmore 2022-04-02 00:30:48 +00:00
parent afd0f5a904
commit 0b09f70a73
3 changed files with 505 additions and 13 deletions

View file

@ -838,9 +838,10 @@ public final class SSLSocketImpl
// No need to throw exception if the initial handshake is not started.
try {
if (checkCloseNotify && !conContext.isInputCloseNotified &&
(conContext.isNegotiated || conContext.handshakeContext != null)) {
throw new SSLException(
"closing inbound before receiving peer's close_notify");
(conContext.isNegotiated ||
conContext.handshakeContext != null)) {
throw new SSLException(
"closing inbound before receiving peer's close_notify");
}
} finally {
conContext.closeInbound();