On Wed, 3 May 2023 20:52:34 GMT, Kevin Driver <kdri...@openjdk.org> wrote:

>> src/java.base/share/classes/sun/security/ssl/HandshakeContext.java line 457:
>> 
>>> 455:             // For TLS 1.2 and prior versions, the HelloRequest 
>>> message MAY
>>> 456:             // be sent by the server at any time.
>>> 457:             consumer = conContext.sslConfig.isClientMode ?
>> 
>> This seems reasonable, but could you update the bug report to say why this 
>> fixes the problem?
>
> If we're in server mode, we want the consumer to be null so that we don't 
> attempt to cast a Server object as a Client object further down in the stack. 
> Having the consumer be null forces the check on the new line 463 to pass and 
> throws the message for "unexpected handshake message".

This would an good comment to have in the code.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/13727#discussion_r1184417783

Reply via email to