Set application protocol even if the extension is not available JDK-8145252-TLS13-branch
authorxuelei
Wed, 13 Jun 2018 09:57:59 -0700
branchJDK-8145252-TLS13-branch
changeset 56754 d0728b0f98f9
parent 56750 2b4ae319412b
child 56755 9e1b125a3f75
Set application protocol even if the extension is not available
src/java.base/share/classes/sun/security/ssl/AlpnExtension.java
--- a/src/java.base/share/classes/sun/security/ssl/AlpnExtension.java	Tue Jun 12 22:15:10 2018 -0700
+++ b/src/java.base/share/classes/sun/security/ssl/AlpnExtension.java	Wed Jun 13 09:57:59 2018 -0700
@@ -149,6 +149,9 @@
                             "Ignore client unavailable extension: " +
                             SSLExtension.CH_ALPN.name);
                 }
+
+                chc.applicationProtocol = "";
+                chc.conContext.applicationProtocol = "";
                 return null;
             }
 
@@ -361,6 +364,9 @@
                             "Ignore unavailable extension: " +
                             SSLExtension.SH_ALPN.name);
                 }
+
+                shc.applicationProtocol = "";
+                shc.conContext.applicationProtocol = "";
                 return null;
             }