bersim / OpenKPs

10 stars 9 forks source link

secure connection with tls and port 8883 #13

Open Pyrotoef opened 5 years ago

Pyrotoef commented 5 years ago

Hello, For a project I use MQTT to communicate with a PLC, but I would like to secure this communication line with TLS. For this connection I need to use port 8883. I looked at the code and found a variable called Secure in MqttConnection.cs, yet when i set this variable it is not possible to connect to the broker.

The communicator log gives: “Error communicating with Device 61 “MQTT”: Cannot read data from the trasportline: External host has disconnected the connection.” The broker log gives: “OpenSSL Error: error:1408F10B: SSL routines:ssl3_get_record:wrong version number”.

It looks like it is possible, but i cannot figure out how. Is this possible? With kind regards.

kumajaya commented 4 years ago

You can try upstream Strider Mqtt patch https://github.com/ericvoid/StriderMqtt/commit/73993a99badc255f7799a7242f3ba7f19e06e4bc#diff-8ddfbc81e311e2dbe94fd24abf4cfc82