Support for MQTT broker to listen on secure and non-secure ports at same time#465
Support for MQTT broker to listen on secure and non-secure ports at same time#465dgarske wants to merge 4 commits intowolfSSL:masterfrom
Conversation
23013f2 to
924e2ba
Compare
There was a problem hiding this comment.
Pull request overview
Adds dual-listener support to the wolfMQTT broker so it can accept both plain MQTT and MQTT-over-TLS connections concurrently, with new build/configuration switches to optionally disable the plain-text listener.
Changes:
- Add separate TLS listener socket/port to broker state and accept loop, enabling simultaneous plain + TLS listening.
- Add
--disable-broker-insecure(autotools) /WOLFMQTT_BROKER_INSECURE(CMake option) to compile out the plain-text listener (TLS-only builds). - Update broker CLI/test tooling and CI matrix to support/validate dual-port and TLS-only modes.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
wolfmqtt/mqtt_broker.h |
Adds insecure feature toggle + TLS listener fields to broker struct. |
src/mqtt_broker.c |
Implements dual listener sockets/ports, TLS-only option behavior, CLI flag -s, and some socket validation. |
scripts/broker.test |
Updates test harness to handle TLS-only builds and adds dual-port integration tests. |
configure.ac |
Adds --disable-broker-insecure configure flag that defines WOLFMQTT_BROKER_NO_INSECURE. |
CMakeLists.txt |
Adds WOLFMQTT_BROKER_INSECURE option and defines WOLFMQTT_BROKER_NO_INSECURE when disabled. |
.github/workflows/broker-check.yml |
Adds CI job for “TLS-only (no insecure)” configuration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ect, unsubscribe removes subscription, duplicate subscribe QoS update and session persistence.
683a2dc to
055418e
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
embhorn
left a comment
There was a problem hiding this comment.
Great! Tested broker on RPi connecting clients from Linux (TLS) and Win (insecure)
Added support for MQTT broker to listen on secure and non-secure ports at same time.
Expanded MQTT broker edge case testing for retained, graceful disconnect, unsubscribe removes subscription, duplicate subscribe QoS update and session persistence.