EpicEric / pony-mqtt

:horse: MQTT client in Pony
https://epiceric.github.io/pony-mqtt-docs/mqtt--index/
MIT License
6 stars 1 forks source link

Properly rebuild packet in TLS test #18

Closed EpicEric closed 6 years ago

EpicEric commented 6 years ago

The TLS test listener simply receives multiple parts of incoming CONNECT data, in a seemingly random order. As such, the current workaround is to check if ANY of these parts start with the appropriate CONNECT code (0x01), instead of rebuilding the original TCP packet. This could potentially lead to (although unlikely) errors where another part starts with the byte 0x01, but the control code is incorrect.

If possible, this should be replaced by a version of the code that rebuilds the incoming message.