Commit 9da3d25
committed
Fix websocket-tls-basic-auth example test to pass SSLContext via ClientEndpointConfig
Tomcat 11's WsWebSocketContainer reads jakarta.websocket.ClientEndpointConfig#getSSLContext()
directly and no longer honours the legacy org.apache.tomcat.websocket.SSL_TRUSTSTORE /
SSL_TRUSTSTORE_PWD user-properties, so the test was falling back to the JDK default
truststore and failing the handshake against the example's self-signed cert. Build an
SSLContext from the bundled keystore.jks and set it via
ClientEndpointConfig.Builder#sslContext(..).1 parent b021f32 commit 9da3d25
1 file changed
Lines changed: 20 additions & 6 deletions
File tree
- examples/websocket-tls-basic-auth/src/test/java/org/superbiz/websockets
examples/websocket-tls-basic-auth/src/test/java/org/superbiz/websockets/WebSocketResourceTest.java
Lines changed: 20 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
36 | 38 | | |
| 39 | + | |
| 40 | + | |
37 | 41 | | |
38 | 42 | | |
| 43 | + | |
39 | 44 | | |
40 | 45 | | |
41 | 46 | | |
| |||
106 | 111 | | |
107 | 112 | | |
108 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
109 | 128 | | |
110 | 129 | | |
| 130 | + | |
111 | 131 | | |
112 | 132 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | 133 | | |
120 | 134 | | |
121 | 135 | | |
| |||
0 commit comments