JDK-8153531 : Improve exception messaging for RSAClientKeyExchange
  • Type: Enhancement
  • Component: security-libs
  • Sub-Component: javax.net.ssl
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2016-04-05
  • Updated: 2016-07-21
  • Resolved: 2016-04-07
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 7 JDK 8 JDK 9
7u111Fixed 8u102Fixed 9 b114Fixed
Description
Recent edits in RSAClientKeyExchange class made me realise that the exception handling could be more descriptive for end user. We hide root case for one scenario with the infamous "Unable to process PreMasterSecret, may be too big" message. We should be printing the exception that caused the InvalidKeyException to occur.

I'll take this chance to made a few other minor edits in RSAClientKeyExchange and HandshakeMessage code also.