Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

cmake_minimum_required(VERSION 3.16)

project(wolfMQTT VERSION 2.0.0 LANGUAGES C)
project(wolfMQTT VERSION 2.1.0 LANGUAGES C)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/functions.cmake)
Expand Down
43 changes: 42 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
## Release Notes

### v2.0.1 (Pending)
### v2.1.0 (07/02/2026)
Release 2.1.0 has been developed according to wolfSSL's development and QA
process (see link below) and successfully passed the quality criteria.
https://www.wolfssl.com/about/wolfssl-software-development-process-quality-assurance

* New Features
- wolfMQTT Broker session persistence: pluggable persistence hooks via
`MqttBroker_SetPersistHooks` with a POSIX backend
(`MqttBrokerNet_PersistPosix_Init` / `MqttBrokerNet_PersistPosix_Free`),
message ordering, an offline message queue, and AES-GCM encryption of
persisted state at rest (#538)
- New packet-validation helpers: `MqttPacket_TopicNameValid`,
`MqttPacket_TopicFilterValid`, `MqttPacket_TopicFilterIsWildcard`,
`MqttPacket_FixedHeaderFlagsValid`, and `MqttPacket_SubAckReturnCodeValid`
(#552)
- `WOLFMQTT_MAX_QOS` build cap to compile out the QoS 2 state machine and
advertise v5 `MAX_QOS` in CONNACK (#537)

* Security Hardening
- Reject ill-formed UTF-8 in MQTT UTF-8 string fields per [MQTT-1.5.3-1].
Expand Down Expand Up @@ -85,6 +101,31 @@
`cmd_timeout_ms`. The registration now matches `SN_Client_Subscribe`,
`SN_Client_Register`, and `SN_Client_Publish`.

* What's Changed
- Fix BrokerHandle_Connect null check (#477)
- Fenrir fixes (#478)
- Add testing validation and fixes for wolfMQTT (#480)
- Replace deprecated VeriSign CA with Amazon Root CA 1 + Starfield G2 (#481)
- Update testing with a more flexible framework (#482)
- Fix new Fenrir reports (#483)
- Always check MqttDecode_Num's return code (#479)
- Add Fenrir suggested test cases (#484)
- Reject null chars in strings (#503)
- Fix various spec compliance gaps (#504)
- Fix MQTTv5 QoS 2 CONNACK interop and add WOLFMQTT_MAX_QOS build cap (#537)
- Fix Coverity nightly: inline action, drop broken md5 hash lookup (#547)
- Harden param checks in MqttDecode_FixedHeader and MqttDecode_ConnectAck (#546)
- Harden Coverity tool download: curl -L --fail + gzip sanity check (#549)
- Fix broker disconnect to better handle SIGPIPE (#548)
- wolfMQTT broker: ordering, persistence, offline queue, AES-GCM at rest (#538)
- Speed up CI and stabilize aws-ca-regression (#551)
- MQTT-SN fixes (#550)
- Broker, client, and MQTT v5 packet validation and reliability fixes (#552)
- Fenrir fixes (#554)

* New Contributors
- @night1rider made their first contribution (#481)

### v2.0.0 (03/20/2026)
Release 2.0.0 has been developed according to wolfSSL's development and QA
process (see link below) and successfully passed the quality criteria.
Expand Down
26 changes: 26 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,38 @@ TESTS += $(check_PROGRAMS)
check_SCRIPTS+= $(dist_noinst_SCRIPTS)
TESTS += $(check_SCRIPTS)

# Some test data is distributed under $(srcdir) but referenced by the test
# scripts (and by mosquitto.conf) via paths relative to the build directory:
# the broker test data (mosquitto.conf and its certificates) and the firmware
# example payload (examples/publish.dat). In an out-of-tree build -- notably
# "make distcheck" -- $(srcdir) != $(builddir), so stage a copy into the build
# tree before the tests run. In-tree builds are a no-op.
AM_TESTS_ENVIRONMENT = \
if test "$(abs_srcdir)" != "$(abs_builddir)"; then \
$(MKDIR_P) scripts/broker_test examples; \
cp -f $(srcdir)/scripts/broker_test/mosquitto.conf \
$(srcdir)/scripts/broker_test/ca-cert.pem \
$(srcdir)/scripts/broker_test/server-cert.pem \
$(srcdir)/scripts/broker_test/server-key.pem \
scripts/broker_test/; \
cp -f $(srcdir)/examples/publish.dat examples/; \
Comment thread
embhorn marked this conversation as resolved.
fi;

test: check

DISTCLEANFILES+= wolfmqtt-config

clean-local:
-rm -rf tests/fuzz/corpus
@if test "$(abs_srcdir)" != "$(abs_builddir)"; then \
rm -f scripts/broker_test/mosquitto.conf \
scripts/broker_test/ca-cert.pem \
scripts/broker_test/server-cert.pem \
scripts/broker_test/server-key.pem \
examples/publish.dat; \
rmdir scripts/broker_test 2>/dev/null || true; \
rmdir scripts 2>/dev/null || true; \
fi

maintainer-clean-local:
-rm Makefile.in
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# All rights reserved.

AC_COPYRIGHT([Copyright (C) 2014-2026 wolfSSL Inc.])
AC_INIT([wolfmqtt],[2.0.0],[https://github.com/wolfssl/wolfMQTT/issues],[wolfmqtt],[http://www.wolfssl.com])
AC_INIT([wolfmqtt],[2.1.0],[https://github.com/wolfssl/wolfMQTT/issues],[wolfmqtt],[http://www.wolfssl.com])

AC_PREREQ([2.63])
AC_CONFIG_AUX_DIR([build-aux])
Expand All @@ -27,7 +27,7 @@ AC_ARG_PROGRAM
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([src/config.h])

WOLFMQTT_LIBRARY_VERSION=19:0:0
WOLFMQTT_LIBRARY_VERSION=20:0:0
# | | |
# +------+ | +---+
# | | |
Expand Down
16 changes: 14 additions & 2 deletions examples/firmware/fwpush.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,20 @@ static int fw_message_build(MQTTCtx *mqttCtx, const char* fwFile,
ecc_key eccKey;
WC_RNG rng;

wc_InitRng(&rng);
/* Initialize the RNG and ECC key up front so the cleanup path at exit can
* always free them safely, even when an early error (such as a firmware
* file load failure) jumps to exit before the key is generated. */
rc = wc_InitRng(&rng);
if (rc != 0) {
PRINTF("Init RNG Failed! %d", rc);
return rc;
}
rc = wc_ecc_init(&eccKey);
if (rc != 0) {
PRINTF("Init ECC Key Failed! %d", rc);
wc_FreeRng(&rng);
return rc;
}
#endif

/* Verify file can be loaded */
Expand All @@ -165,7 +178,6 @@ static int fw_message_build(MQTTCtx *mqttCtx, const char* fwFile,
#ifdef ENABLE_FIRMWARE_SIG
/* Generate Key */
/* Note: Real implementation would use previously exchanged/signed key */
wc_ecc_init(&eccKey);
rc = wc_ecc_make_key(&rng, 32, &eccKey);
if (rc != 0) {
PRINTF("Make ECC Key Failed! %d", rc);
Expand Down
5 changes: 4 additions & 1 deletion scripts/client.test
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ then
generate_port
broker_args="-p $port"
fi
mosquitto $broker_args &
# Close the descriptors make passes to recipe commands (notably the
# "make -j" jobserver pipe) so a broker that outlives the test cannot stall
# a parallel make that is waiting on them.
Comment thread
embhorn marked this conversation as resolved.
mosquitto $broker_args 3>&- 4>&- 5>&- 6>&- 7>&- 8>&- 9>&- &
broker_pid=$!
echo "Broker PID is $broker_pid"

Expand Down
5 changes: 4 additions & 1 deletion scripts/firmware.test
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ then
generate_port
broker_args="-p $port"
fi
mosquitto $broker_args &
# Close the descriptors make passes to recipe commands (notably the
# "make -j" jobserver pipe) so a broker that outlives the test cannot stall
# a parallel make that is waiting on them.
Comment thread
embhorn marked this conversation as resolved.
mosquitto $broker_args 3>&- 4>&- 5>&- 6>&- 7>&- 8>&- 9>&- &
broker_pid=$!
echo "Broker PID is $broker_pid"

Expand Down
5 changes: 4 additions & 1 deletion scripts/multithread.test
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ then
generate_port
broker_args="-p $port"
fi
mosquitto $broker_args &
# Close the descriptors make passes to recipe commands (notably the
# "make -j" jobserver pipe) so a broker that outlives the test cannot stall
# a parallel make that is waiting on them.
Comment thread
embhorn marked this conversation as resolved.
mosquitto $broker_args 3>&- 4>&- 5>&- 6>&- 7>&- 8>&- 9>&- &
broker_pid=$!
echo "Broker PID is $broker_pid"
sleep 0.1
Expand Down
5 changes: 4 additions & 1 deletion scripts/nbclient.test
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ then
generate_port
broker_args="-p $port"
fi
mosquitto $broker_args &
# Close the descriptors make passes to recipe commands (notably the
# "make -j" jobserver pipe) so a broker that outlives the test cannot stall
# a parallel make that is waiting on them.
Comment thread
embhorn marked this conversation as resolved.
mosquitto $broker_args 3>&- 4>&- 5>&- 6>&- 7>&- 8>&- 9>&- &
broker_pid=$!
echo "Broker PID is $broker_pid"

Expand Down
5 changes: 4 additions & 1 deletion scripts/stress.test
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ else
generate_port
broker_args="-p $port"
fi
mosquitto $broker_args &
# Close the descriptors make passes to recipe commands (notably the "make -j"
# jobserver pipe) so a broker that outlives the test cannot stall a parallel
# make that is waiting on them.
Comment thread
embhorn marked this conversation as resolved.
mosquitto $broker_args 3>&- 4>&- 5>&- 6>&- 7>&- 8>&- 9>&- &
broker_pid=$!
echo "Broker PID is $broker_pid"
sleep 0.1
Expand Down
4 changes: 2 additions & 2 deletions wolfmqtt/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
extern "C" {
#endif

#define LIBWOLFMQTT_VERSION_STRING "2.0.0"
#define LIBWOLFMQTT_VERSION_HEX 0x02000000
#define LIBWOLFMQTT_VERSION_STRING "2.1.0"
#define LIBWOLFMQTT_VERSION_HEX 0x02001000

#ifdef __cplusplus
}
Expand Down
Loading