koalazak / dorita980

Unofficial iRobot Roomba and Braava (i7/i7+, 980, 960, 900, e5, 690, 675, m6, etc) node.js library (SDK) to control your robot
MIT License
931 stars 147 forks source link

Node18 tls fix #168

Open karlvr opened 1 year ago

karlvr commented 1 year ago

The TLS connection to Roomba is broken on Node 18 as Roomba doesn't appear to support Secure Renegotiation.

The TLS connection in mqtt fails with the error:

Error: write EPROTO 002511FF01000000:error:0A000152:SSL routines:final_renegotiate:unsafe legacy renegotiation disabled:../deps/openssl/openssl/ssl/statem/extensions.c:922:

When we enable legacy server connect, we are able to successfully connect. See https://www.openssl.org/docs/man1.1.1/man3/SSL_clear_options.html for more information(search for SSL_OP_LEGACY_SERVER_CONNECT).

koalazak commented 12 months ago

hey, thanks for this.

You are upgrading mqtt 2 to 4 which has breaking changes. Looks like are just upgrading the package version without implementing the required changes to handle new error management. (see https://github.com/mqttjs/MQTT.js#notes)