Commit 675b8f5
committed
client-v2: drop blank tokens from ssl_cipher_suites before enabling them
A leading, trailing or doubled comma in ssl_cipher_suites (or a raw List
option) leaves an empty or whitespace-only token in the parsed list. The
value was only checked for emptiness (zero elements), so a blank token
reached SSLSocket#setEnabledCipherSuites, which throws IllegalArgumentException
("invalid null or empty string elements") and breaks the TLS handshake even
when valid suites are also present. Blank tokens are now dropped and each
surviving name is trimmed; a list that reduces to nothing is treated as
"no restriction" (JVM defaults), matching the empty/unset behaviour.
Addresses the Cursor Bugbot review comment on PR #2919.1 parent d17cf3d commit 675b8f5
2 files changed
Lines changed: 50 additions & 2 deletions
File tree
- client-v2/src
- main/java/com/clickhouse/client/api/internal
- test/java/com/clickhouse/client/api/internal
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
293 | | - | |
294 | | - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
295 | 304 | | |
296 | 305 | | |
297 | 306 | | |
| |||
Lines changed: 39 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
224 | 263 | | |
225 | 264 | | |
226 | 265 | | |
| |||
0 commit comments