This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 7aabd5346ddc509812941d3a9203414224720aa8 Author: Mark Thomas <ma...@apache.org> AuthorDate: Tue Dec 21 14:52:17 2021 +0000 Deprecate the pre-WebSocket 2.1 client TLS configuration approach --- java/org/apache/tomcat/websocket/Constants.java | 12 ++++++++++++ webapps/docs/web-socket-howto.xml | 10 +++++++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/java/org/apache/tomcat/websocket/Constants.java b/java/org/apache/tomcat/websocket/Constants.java index 0c4e21b..85a6034 100644 --- a/java/org/apache/tomcat/websocket/Constants.java +++ b/java/org/apache/tomcat/websocket/Constants.java @@ -20,6 +20,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; +import jakarta.websocket.ClientEndpointConfig; import jakarta.websocket.Extension; /** @@ -50,19 +51,30 @@ public class Constants { * Property name to set to configure the value that is passed to * {@link javax.net.ssl.SSLEngine#setEnabledProtocols(String[])}. The value * should be a comma separated string. + * + * @deprecated This will be removed in Tomcat 11. + * Use {@link ClientEndpointConfig#getSSLContext()} */ + @Deprecated(forRemoval = true, since = "Tomcat 10.1.x") public static final String SSL_PROTOCOLS_PROPERTY = "org.apache.tomcat.websocket.SSL_PROTOCOLS"; + @Deprecated(forRemoval = true, since = "Tomcat 10.1.x") public static final String SSL_TRUSTSTORE_PROPERTY = "org.apache.tomcat.websocket.SSL_TRUSTSTORE"; + @Deprecated(forRemoval = true, since = "Tomcat 10.1.x") public static final String SSL_TRUSTSTORE_PWD_PROPERTY = "org.apache.tomcat.websocket.SSL_TRUSTSTORE_PWD"; + @Deprecated(forRemoval = true, since = "Tomcat 10.1.x") public static final String SSL_TRUSTSTORE_PWD_DEFAULT = "changeit"; /** * Property name to set to configure used SSLContext. The value should be an * instance of SSLContext. If this property is present, the SSL_TRUSTSTORE* * properties are ignored. + * + * @deprecated This will be removed in Tomcat 11. + * Use {@link ClientEndpointConfig#getSSLContext()} */ + @Deprecated(forRemoval = true, since = "Tomcat 10.1.x") public static final String SSL_CONTEXT_PROPERTY = "org.apache.tomcat.websocket.SSL_CONTEXT"; /** diff --git a/webapps/docs/web-socket-howto.xml b/webapps/docs/web-socket-howto.xml index e97b00b..b6ea851 100644 --- a/webapps/docs/web-socket-howto.xml +++ b/webapps/docs/web-socket-howto.xml @@ -114,9 +114,13 @@ seconds).</p> <p>When using the WebSocket client to connect to secure server endpoints, the - client SSL configuration is controlled by the <code>userProperties</code> - of the provided <code>jakarta.websocket.ClientEndpointConfig</code>. The - following user properties are supported:</p> + client SSL configuration should be configured via + <code>jakarta.websocket.ClientEndpointConfig.getSSLContext()</code>. Tomcat + 10.1.x still supports the pre-WebSocket 2.1 configuration method where TLS + configuration was via the <code>userProperties</code> of the provided + <code>jakarta.websocket.ClientEndpointConfig</code>. However, this approach + is deprecated and will be removed in Tomcat 11. The following user properties + are supported:</p> <ul> <li><code>org.apache.tomcat.websocket.SSL_CONTEXT</code></li> <li><code>org.apache.tomcat.websocket.SSL_PROTOCOLS</code></li> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org