Closed pavel-treutner closed 9 months ago
Hey, I changed this like 6 years ago https://github.com/TooTallNate/Java-WebSocket/commit/4094e3d199d9bd99998ddacb6d440a03fed45db6#diff-86950b5c3b9c35d3dbd2c1b6ecdeb1e23fa5bd0b20adeb05d54ac4b94080ff6a
Sonarqube reported it as an error. But I do not recall it any more.
If this is an issue for you, feel free to open a pull request.
Best regards, Marcel
Probably because TLS v1.2 was disabled in early Java 7 versions. This was a common workaround. Not needed any longer. Java 7 has reached EOL and recent JREs have sensible defaults (TLS 1.2 and 1.3): https://github.com/TooTallNate/Java-WebSocket/pull/1387
We do have to keep the android world in mind here. The play store still supports KitKat which does not have any support for java 7 apis (e.g. see #1209)
Describe the bug Is there any reason for enforcing TLS 1.2 in WebSocketClient.upgradeSocketToSSL()? Replacing SSLContext.getInstance("TLSv1.2") with SSLSocketFactory.getDefault() would honor the well-known property jdk.tls.client.protocols allowing unified configuration.
Environment(please complete the following information):