JDK-8158978 : ALPN not working when values are set directly on a SSLServerSocket
  • Type: Bug
  • Component: security-libs
  • Sub-Component: javax.net.ssl
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2016-06-07
  • Updated: 2020-02-21
  • Resolved: 2016-06-08
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 8 JDK 9 Other
8u251Fixed 9 b123Fixed openjdk8u252Fixed
Description
This works:

    sslp.setApplicationProtocols(serverAPs);
    sslSocket.setSSLParameters(sslp);

This does not:

    sslp.setApplicationProtocols(serverAPs);
    sslServerSocket.setSSLParameters(sslp);

When a SSLServerSocketImpl accept()s a connection, it doesn't pass applicationProtocols to the new SSLSocketImpl.