eclipse / paho.mqtt.java

Eclipse Paho Java MQTT client library. Paho is an Eclipse IoT project.
https://eclipse.org/paho
Other
2.12k stars 883 forks source link

SSLNetworkModule overwrites SSLParamaters that are configured in SSLSocketFactory #941

Closed grandfield closed 10 months ago

grandfield commented 2 years ago

In paho v1.1.1, we could connect to AWS on port 443 using ALPN by providing an SSLSocketFactory which sets the SSLParameters.setApplicationsProtocols() .

Approx 4 years ago, this was broken in the commit https://github.com/eclipse/paho.mqtt.java/commit/0a2f69f8748166d257c27fdaf20e262c098af5fb

The changes to SSLNetworkModule will clobber the ALPN settings we set in the factory. It should be possible to merge with existing params using get/set.

This should help fix the issue https://github.com/eclipse/paho.mqtt.java/issues/858

I don't think this is a duplicate of https://github.com/eclipse/paho.mqtt.java/issues/858 because it may cause other issues if params are not merged.