1
0
mirror of https://github.com/FreeRTOS/coreMQTT synced 2025-06-04 02:54:20 +08:00

277 Commits

Author SHA1 Message Date
Archit Aggarwal
d410251813
Add config to allow MQTT build without custom config (#22) 2020-09-04 13:33:54 -07:00
fbbotero-aws
f9917f0721
Updating submodule aws-templates-for-cbmc-proofs to include CBMC change to use Kissat and speed up proofs (#34) 2020-09-04 13:19:42 -07:00
Archit Aggarwal
d355bfa259
Re-brand lightweight MQTT as MQTT serializer (#29)
Rename all instance of "lightweight" MQTT with "serializer" in files and documentation
2020-09-03 14:56:32 -07:00
Nathan Glimsdale
b591004ba5
Add formatting checks. (#30)
* Add formatting checks.

Co-authored-by: Sarena Meas <sarem@amazon.com>
Co-authored-by: Archit Aggarwal <architag@amazon.com>
2020-09-03 14:40:28 -07:00
Archit Aggarwal
56f024f4ba
Remove library target, and move CMake files under test folder (#28)
* Add license where needed in the test files.
* Remove default configs from the test core_mqtt_config.h.

Co-authored-by: SarenaAWS <6563840+sarenameas@users.noreply.github.com>
2020-09-03 13:25:25 -07:00
Muneeb Ahmed
e914df6d22
Fix MISRA 10.3 violation (#31)
* Change a UL to a U for a uint32_t
2020-09-03 11:26:14 -07:00
Kareem Khazem
b73a02959a Add CBMC Batch proof markers 2020-09-02 22:27:54 +01:00
SarenaAWS
bf48e6d0b6
Spellcheck github action (#24) 2020-09-02 10:38:17 -07:00
Archit Aggarwal
d0cc7ba5b3
Add spell check support to repository (#21)
* Add spell check scripts under tools/spell
* Break lexicon file into specific files for source/ and test/unit-test directories
2020-09-01 16:17:53 -07:00
Muneeb Ahmed
f0a8b3c1b3
Fix doxygen build due to renamed files (#20)
* Fix doxygen build due to renamed files

* ci: combine doxygen stderr into stdout
2020-09-01 12:25:24 -07:00
Archit Aggarwal
b655a0781f
Remove dependency on MODULE_DIR_ROOT from filepath script (#17) 2020-08-31 16:46:01 -07:00
Archit Aggarwal
09fbf71a3f
Enable CBMC proof builds (#16) 2020-08-31 16:23:26 -07:00
Archit Aggarwal
3ab7316bad
Add build instructions to root README (#14) 2020-08-31 16:07:38 -07:00
Muneeb Ahmed
54b54e78ad
Add define guards and change spellings (#15)
* Add checks for definition of false and true

* Prefer American spellings for optimize and acknowledgment
2020-08-31 14:51:21 -07:00
Muneeb Ahmed
b6bf2005ca
Fix bug that may sometimes disable keep alive (#7)
* Reset the waitingForPingResp flag in every MQTT_Connect
2020-08-31 12:45:46 -07:00
Nathan Glimsdale
163eea9cf6
Ci/update doxygen check (#13)
* Update the doxygen check.

* New method to check doxygen output
2020-08-31 10:27:50 -07:00
Archit Aggarwal
e83fadcfc7
Rename MQTT files, and Relocate CBMC and unit-test files (#12)
* Relocate CBMC to test/cbmc and unit test files to test/unit-test

* Rename all library and test files to use "core_" prefix
2020-08-31 10:02:38 -07:00
Archit Aggarwal
9cf0130428
Remove integration tests folder (#11) 2020-08-28 15:13:13 -07:00
Archit Aggarwal
52ffc3af7f
Enable Cmake builds (#8)
* Update CMake infrastructure for repository to be self-sufficient for building targets
* Update GitHub CI workflow to only use build infrastructure of the repository
2020-08-28 14:47:22 -07:00
Nathan Glimsdale
9471935683
Clarify Doxygen Test (#10)
* Clarify doxygen test by separating commands.

* Add clarifying comment.
2020-08-28 14:25:55 -07:00
Nathan Glimsdale
b4e86d103c
Doxygen CI job. (#9) 2020-08-28 11:29:47 -07:00
Nathan Glimsdale
f238a29b9f
Setup CI Actions (#5)
* Setup Unit Test Action
* Add complexity
2020-08-27 17:33:18 -07:00
Archit Aggarwal
e5a761608c
Enable doxygen build (#4)
Update file path in config.doxygen file to enable doxygen build
2020-08-27 16:42:57 -07:00
Archit Aggarwal
f2581e5da5
Re-structure files (#3)
* Relocate library, test and doc files

* Add transport interface from C-SDK

* Update file path in mqttFilePaths.cmake
2020-08-27 16:29:26 -07:00
Muneeb Ahmed
c18ed99e7d Fix MISRA 8.13 violations from earlier commit (#1164)
* Fix MISRA 8.13 violations in mqtt by using a const qualifier wherever TransportRecv_t is used.
2020-08-27 10:22:00 -07:00
Archit Aggarwal
e1d26dbcdd Fix integration test from change in MQTT_Publish behavior (#1170)
* Fix resend unacked Publish tests

* Add assertion on return value of MQTT_PublishToResend on the packet ID validity

* Hygiene improvement to use resumePersistentSession in PUBLISH resend tests
2020-08-27 09:53:26 -07:00
leegeth
35300aa029 Unit tests compiler warning fixes (#1171) 2020-08-27 09:11:53 -07:00
leegeth
b50a1888d5 MISRA fixes for openssl transport implementation (#1157) 2020-08-26 18:25:03 -07:00
Archit Aggarwal
876cceeb9d Mqtt/add config template (#1160) 2020-08-26 18:22:06 -07:00
Archit Aggarwal
a1c6b729b4 Fix build issues in MQTT integration tests file (#1166) 2020-08-26 14:18:16 -07:00
Archit Aggarwal
ff330f7ffc Fix config include path conflict for MQTT demos (#1165)
* Separate out variables for lightweight and managed MQTT sources

* Update all MQTT demos' CMakeLists.txt to build MQTT sources along with their demo binaries

* Update CMakeLists.txt of unit and integration tests for updates to mqttFilePaths.cmake
2020-08-26 12:42:13 -07:00
SarenaAWS
5634426244 Doxygen templates and instructions for writing docs for a new library (#1150)
* Add doxygen templates and instructions for writing docs for a new library.
* Make some fixes to the MQTT library doxygen.
2020-08-25 23:23:35 -07:00
SarenaAWS
ef2a080052 Doxygen for MQTT API Only (#1149)
* MQTT API doxygen documentation and supporting files.

Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>
2020-08-24 15:53:59 -07:00
Archit Aggarwal
4fb7f3c24f Add 3 test cases for full branch coverage of MatchTopic (#1156) 2020-08-24 15:02:00 -07:00
Muneeb Ahmed
0884ff0f4d Clear old records for clean sessions (#1148)
* Clear state records when a CONNACK's session present flag is false

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
2020-08-24 13:33:45 -07:00
Muneeb Ahmed
ff63b3342e Add code examples for new and state API functions (#1146)
* Add code examples for MQTT_PublishToResend, MQTT_MatchTopic, and MQTT_GetSubAckStatusCodes

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
2020-08-24 12:57:34 -07:00
Archit Aggarwal
814e73948b Add #error statements for CLIENT_CERT_PATH and CLIENT_PRIVATE_KEY_PATH macros (#1155) 2020-08-24 11:56:25 -07:00
Muneeb Ahmed
05b141658a Change state status code and increase coverage (#1140)
* Change a status code in MQTT_UpdateStateAck to MQTTBadParameter when a record is not found

* Add some unit tests to increase code coverage
2020-08-21 16:31:56 -07:00
Archit Aggarwal
afc448615c Fix flaky behavior of LWT test (#1147) 2020-08-20 17:25:04 -07:00
Archit Aggarwal
9614fd8b9d [PR from CLI tool] Add MQTT demo for connection sharing with subscription manager (#1098) 2020-08-20 15:53:17 -07:00
Archit Aggarwal
b8b79b783d Proof for MQTT_MatchTopic API (#1137) 2020-08-20 13:06:20 -07:00
Muneeb Ahmed
8741986353 Add doxygen code examples for mqtt_lightweight.h (#1135)
* Add doxygen code examples for mqtt_lightweight.h

* Comment fixes in mqtt.h

Co-authored-by: SarenaAWS <6563840+sarenameas@users.noreply.github.com>
2020-08-18 16:57:16 -07:00
Archit Aggarwal
2799ee65da [PR from CLI tool]
Add utility for MQTT topic filter and topic matching to library (#1119)

* Add topic matching utility to MQTT API

* Add thorough unit tests for topic matching utility

* Fix failing ExactMatch unit test

* Add topic matching parameter names to mqtt/lexicon.txt

* Fixes caught in code review

Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>

* Remove problematic assert in matchWildcardsSpecialCases and make hygiene parameter re-ordering changes

* Add another param name to mqtt/lexicon.txt

* Update topic matching to support corner case of matching topic filter ending with "/#" with topic name ending with "/"

* Remove duplicate word entry in mqtt/lexicon.txt

Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>

* Fix bugs in topic matching algorithm that allowed matching when wildcards are not preceding with '/'

* Slight style change for improved readability to matchWildcards function

* Re-add param names to mqtt/lexicon.txt that were removed in merge conflict resolution

* Rename private function for better expressivity

* Revert "Rename private function for better expressivity"

This reverts commit fe22642a4d723342dbb4c37f2df28c7aea9df0ca.

* Hygiene changes for better readability

* Add more cases to unit tests

* Hygiene changes for invoking matchEndWildcardsSpecialCases function

* More hygiene refactors from review comments

Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>

* Separate Match and no-match test case sets for # willdcard

* Remove extraneous param docstring for private function

* Add note to MatchTopic API about assumption and behavior of function

Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>
2020-08-18 15:38:02 -07:00
Archit Aggarwal
aa36fb1082 Fix MQTT_GetSubAckStatusCodes API, and add CBMC proof for it (#1132)
* Add CBMC proof for MQTT_GetSubAckStatusCodes function
* Fix parameter type in API signature found by CBMC proof
2020-08-18 15:21:30 -07:00
SarenaAWS
c772b2214f Fix doxygen warnings in MQTT Library documentation (#1122)
Ignore private functions in mqtt_state.h and .c
2020-08-18 12:24:01 -07:00
Archit Aggarwal
959515328b Hygiene changes in MQTT demos and tests (#1128)
* Upgrade MQTT integration test to use mutual auth, and update its build setup to use CMake cache variables for credentials

* Fix build warning from logging

* Remove references to test.mosquitto.org from demos
2020-08-18 11:21:58 -07:00
Muneeb Ahmed
86dad4faaf Add doxygen code examples for mqtt.h (#1123)
* Add code examples for mqtt.h
2020-08-14 10:44:45 -07:00
Oscar Michael Abrina
d31e39dd5e Download certs into demos/certificates with an option to disable downloading (#1126)
* Add option to turn off downloading of certificates and create demos/certificates directory

* Remove Mosquitto certificate from list of certs to download

* Address PR comments

* Add CMake command line options to use for configuring demos

* Update README.md to contain extra flag for ROOT_CA_CERT_PATH

* Set prefix to PWD if any path flags are relative
2020-08-14 09:39:39 -07:00
SarenaAWS
250d32d0a7 Add cbmc pointer primitive check flag and mqtt_lightweight.c small refactor (#1120)
* Update proof templates, add proof flag --pointer-primitive-check

* Fix overflow in MQTT_SerializeSubscribe, MQTT_SerializeUnsubscribe, MQTT_SerializePublish, and MQTT_SerializePublishHeader.

Co-authored-by: Mark R. Tuttle <mrtuttle@amazon.com>
2020-08-14 08:05:02 -07:00
Muneeb Ahmed
504d919814 Add macro for ping response timeout (#1113)
* Add macro to initialize ping response timeout

* Remove pingRespTimeoutMs field from MQTT context

* Add macro to demo configs

* Remove unused MQTT_MAX_QUEUED_PUBLISH_MESSAGES macro
2020-08-13 16:08:32 -07:00