JDK-8210974 : No extensions debug log for ClientHello
  • Type: Bug
  • Component: security-libs
  • Sub-Component: javax.net.ssl
  • Affected Version: 8,11,12
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2018-09-20
  • Updated: 2020-11-20
  • Resolved: 2018-09-20
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 11 JDK 12 JDK 8 Other
11.0.3-oracleFixed 12 b13Fixed 8u261Fixed openjdk8u272Fixed
Related Reports
Relates :  
Description
The debug log for ClientHello message does not appear in JDK 12.  The problem get exposed with the fix for JDK-8209965.  It does not impact JDK 11 for now.  But if backport JDK-8209965, please backport this fix as well.

diff -r 2a51125b2794 src/java.base/share/classes/sun/security/ssl/SSLExtensions.java
--- a/src/java.base/share/classes/sun/security/ssl/SSLExtensions.java   Tue Sep 18 21:47:14 2018 -0700
+++ b/src/java.base/share/classes/sun/security/ssl/SSLExtensions.java   Thu Sep 20 11:01:47 2018 -0700
@@ -333,7 +333,7 @@
             return "<no extension>";
         } else {
             StringBuilder builder = new StringBuilder(512);
-            if (logMap != null) {
+            if (logMap != null && !logMap.isEmpty()) {
                 for (Map.Entry<Integer, byte[]> en : logMap.entrySet()) {
                     SSLExtension ext = SSLExtension.valueOf(
                             handshakeMessage.handshakeType(), en.getKey());
Comments
Fix Request 8209965 arrived in jdk-updates/jdk11u, so this change should be downported, too. Applies cleanly.
23-01-2019