8263779: SSLEngine reports NEED_WRAP continuously without producing any further output #3292
As described in the bug, by connecting the SSLEngine with a misbehaving peer SSL implementation, it can get into a state where it calling
It is caused by a mismatching condition in the SSLEngineOutputRecord. The use hasAlert() method should be replaced with isEmpty(). Otherwise, there is conflicts of the closing status while checking with OutputRecord.isEmpty() in TransportContext.getHandshakeStatus() implementation. It is safe to remove hasAlert() method, as we don't allow creation of new output record if the closure is in progress, thus isEmpty() could be used instead.
The patch passed the test provided by the bug submitter.
@XueleiFan This change now passes all automated pre-integration checks.
After integration, the commit message for the final commit will be:
At the time when this comment was updated there had been 105 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.
@XueleiFan Since your change was applied there have been 107 commits pushed to the
Your commit was automatically rebased without conflicts.
Pushed as commit 1a37bce.