ASF Bugzilla – Attachment 35579 Details for
Bug 60597
Add ability to set cipher suites for websocket client connections
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch to add SSL_ENGINE property to 8.5
websocket.patch (text/plain), 3.19 KB, created by
Michael Orr
on 2017-12-02 22:27:45 UTC
(
hide
)
Description:
Proposed patch to add SSL_ENGINE property to 8.5
Filename:
MIME Type:
Creator:
Michael Orr
Created:
2017-12-02 22:27:45 UTC
Size:
3.19 KB
patch
obsolete
>Index: java/org/apache/tomcat/websocket/Constants.java >=================================================================== >--- java/org/apache/tomcat/websocket/Constants.java (revision 1816960) >+++ java/org/apache/tomcat/websocket/Constants.java (working copy) >@@ -47,22 +47,39 @@ > > // Client connection > /** >+ * Property name to set to configure the SSLEngine that will be used. The >+ * value should be an instance of SSLEngine. If this property is present, >+ * the SSL_PROTOCOLS, SSL_TRUSTSTORE*, and SSL_CONTEXT properies will be >+ * ignored. >+ */ >+ public static final String SSL_ENGINE_PROPERTY = >+ "org.apache.tomcat.websocket.SSL_ENGINE"; >+ /** > * 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 Use SSL_ENGINE_PROPERTY instead. > */ >+ @Deprecated > public static final String SSL_PROTOCOLS_PROPERTY = > "org.apache.tomcat.websocket.SSL_PROTOCOLS"; >+ @Deprecated > public static final String SSL_TRUSTSTORE_PROPERTY = > "org.apache.tomcat.websocket.SSL_TRUSTSTORE"; >+ @Deprecated > public static final String SSL_TRUSTSTORE_PWD_PROPERTY = > "org.apache.tomcat.websocket.SSL_TRUSTSTORE_PWD"; >+ @Deprecated > 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 Use SSL_ENGINE_PROPERTY instead. > */ >+ @Deprecated > public static final String SSL_CONTEXT_PROPERTY = > "org.apache.tomcat.websocket.SSL_CONTEXT"; > /** >Index: java/org/apache/tomcat/websocket/WsWebSocketContainer.java >=================================================================== >--- java/org/apache/tomcat/websocket/WsWebSocketContainer.java (revision 1816960) >+++ java/org/apache/tomcat/websocket/WsWebSocketContainer.java (working copy) >@@ -870,7 +870,18 @@ > throws DeploymentException { > > try { >- // See if a custom SSLContext has been provided >+ // See if a custom SSLEngine has been provided. This is the >+ // preferred way to configure the container. >+ SSLEngine engine = (SSLEngine) userProperties.get( >+ Constants.SSL_ENGINE_PROPERTY); >+ >+ if (null != engine) >+ { >+ return engine; >+ } >+ >+ // As a fallback, see if a custom SSLContext has been provided; >+ // the SSLContext can be used to create an SSLEngine. > SSLContext sslContext = > (SSLContext) userProperties.get(Constants.SSL_CONTEXT_PROPERTY); > >@@ -904,7 +915,7 @@ > } > } > >- SSLEngine engine = sslContext.createSSLEngine(); >+ engine = sslContext.createSSLEngine(); > > String sslProtocolsValue = > (String) userProperties.get(Constants.SSL_PROTOCOLS_PROPERTY);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 60597
:
34633
|
34637
|
34638
|
34639
|
35578
| 35579 |
35580