changeset 16381:4d049a2b6690

8171443: (spec) An ALPN callback function may also ignore ALPN Reviewed-by: xuelei, wetmore
author vinnie
date Thu, 22 Dec 2016 17:15:33 +0000
parents fd24639b8a40
children 305841cab5a0
files src/java.base/share/classes/javax/net/ssl/SSLEngine.java src/java.base/share/classes/javax/net/ssl/SSLSocket.java
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/javax/net/ssl/SSLEngine.java	Wed Dec 21 23:57:12 2016 -0800
+++ b/src/java.base/share/classes/javax/net/ssl/SSLEngine.java	Thu Dec 22 17:15:33 2016 +0000
@@ -1338,7 +1338,7 @@
     /**
      * Registers a callback function that selects an application protocol
      * value for a SSL/TLS/DTLS handshake.
-     * The function overrides any values set using
+     * The function overrides any values supplied using
      * {@link SSLParameters#setApplicationProtocols
      * SSLParameters.setApplicationProtocols} and it supports the following
      * type parameters:
@@ -1354,6 +1354,8 @@
      * <dt> {@code String}
      * <dd> The function's result is an application protocol name, or null to
      *      indicate that none of the advertised names are acceptable.
+     *      If the return value is an empty {@code String} then application
+     *      protocol indications will not be used.
      *      If the return value is null (no value chosen) or is a value that
      *      was not advertised by the peer, the underlying protocol will
      *      determine what action to take. (For example, ALPN will send a
--- a/src/java.base/share/classes/javax/net/ssl/SSLSocket.java	Wed Dec 21 23:57:12 2016 -0800
+++ b/src/java.base/share/classes/javax/net/ssl/SSLSocket.java	Thu Dec 22 17:15:33 2016 +0000
@@ -749,7 +749,7 @@
     /**
      * Registers a callback function that selects an application protocol
      * value for a SSL/TLS/DTLS handshake.
-     * The function overrides any values set using
+     * The function overrides any values supplied using
      * {@link SSLParameters#setApplicationProtocols
      * SSLParameters.setApplicationProtocols} and it supports the following
      * type parameters:
@@ -765,6 +765,8 @@
      * <dt> {@code String}
      * <dd> The function's result is an application protocol name, or null to
      *      indicate that none of the advertised names are acceptable.
+     *      If the return value is an empty {@code String} then application
+     *      protocol indications will not be used.
      *      If the return value is null (no value chosen) or is a value that
      *      was not advertised by the peer, the underlying protocol will
      *      determine what action to take. (For example, ALPN will send a