JDK-8169229 : RSAClientKeyExchange debug info is incorrect
  • Type: Bug
  • Component: security-libs
  • Sub-Component: javax.net.ssl
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2016-11-04
  • Updated: 2017-11-29
  • Resolved: 2016-11-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 JDK 8 JDK 9
6u181Fixed 7u171Fixed 8u152Fixed 9 b145Fixed
Description
RFC 2246 defines this message as:

Structure of this message:
       struct {
           ProtocolVersion client_version;
           opaque random[46];
       } PreMasterSecret;

       client_version
           The latest (newest) version supported by the client. This is
           used to detect version roll-back attacks.

Our code isn't properly outputting the debug information for this case.

For example, our client may request TLSv1.2, but the server might select TLSv1.  The client output will print:

*** ClientKeyExchange, RSA PreMasterSecret, TLSv1>

instead of:

*** ClientKeyExchange, RSA PreMasterSecret, TLSv1.2>

We can still see the right value in the SESSION KEYGEN:

PreMaster Secret:
0000: 03 01 

However, if you don't know what you're looking at, you will get the wrong impression.