Skip to content

Commit

Permalink
8282600: SSLSocketImpl should not use user_canceled workaround when n…
Browse files Browse the repository at this point in the history
…ot necessary

Backport-of: e80528bf2bd1c87fc1394dd32015281ac6652363
  • Loading branch information
zzambers committed Mar 14, 2023
1 parent a7fb08c commit d6f8151
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions jdk/src/share/classes/sun/security/ssl/SSLSocketImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -615,8 +615,12 @@ private void duplexCloseOutput() throws IOException {
if (!conContext.protocolVersion.useTLS13PlusSpec()) {
hasCloseReceipt = true;
} else {
// Use a user_canceled alert for TLS 1.3 duplex close.
useUserCanceled = true;
// Do not use user_canceled workaround if the other side has
// already half-closed the connection
if (!conContext.isInboundClosed()) {
// Use a user_canceled alert for TLS 1.3 duplex close.
useUserCanceled = true;
}
}
} else if (conContext.handshakeContext != null) { // initial handshake
// Use user_canceled alert regardless the protocol versions.
Expand Down

1 comment on commit d6f8151

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.