207 Commits

Author SHA1 Message Date
73b0d1b259 Support multiple transports in the same compilation unit (#434)
By removing the definition of the NetworkContext struct in the header file, we allow the application to define it. This allows an application writer to use multiple transports in the same compilation unit. That way, multiple .c files do not have to be created for each transport.
2020-12-01 17:24:18 -08:00
a7825dc973 Update FreeRTOS+TCP submodule pointer (#427)
Updates the FreeRTOS+TCP submodule pointer.
This brings in a fix that needs changes in defender demo.
2020-11-30 13:44:44 -08:00
682447445b Bump backoffAlgorithm submodule for API change and update demos (#426)
The API of FreeRTOS/backoffAlgorithm library has changed to remove dependency on random number generator; instead require the caller to generate the random number and pass it to the BackoffAlgorithm_GetNextBackoff API for backoff period calculation. This PR updates the submodule pointer commit, and updates the demos and tests to use the simplied library API
2020-11-30 11:12:07 -08:00
220dd5cc1c corePKCS11 submodule and file path update (#424)
* Move PKCS #11 submodule forward.

* Update file path for folder update in corePKCS11.

* Update mbedtls file filter.
2020-11-30 10:38:14 -08:00
036ec83b65 Replace exponential_backoff with submodule to FreeRTOS/backoffAlgorithm (#419)
A new repository, FreeRTOS/backoffAlgorithm, has been created for hosting the library for backoff calculation. This repo replaces the FreeRTOS-Plus/Source/Utilities/exponential_backoff with the submodule to the new repository, and updates all the demos that use retry logic to use the backoffAlgorithm API
2020-11-24 14:54:31 -08:00
56a86428fe Preparation for coreHTTP demos (#413)
Adding common utilities that will be used by 4 coreHTTP demos:
- Adding coreHTTP submodule pointer to FreeRTOS-Plus/Source/Application-Protocols/coreHTTP
- Adding folder FreeRTOS-Plus/Demo/coreHTTP_Windows_Simulator/Http_Demo_Helpers with functions common to demos.
2020-11-19 20:03:59 -05:00
e313e286df Bump corePKCS11 submodule (#412)
* Move PKCS submodule forward.

* Use common mbed code.
2020-11-19 09:17:18 -08:00
3dc4516ea1 Add device defender library submodule (#406) 2020-11-13 12:32:25 -08:00
6debf6a2c0 Add #ifndef guards for SdkLog definition to fix conflicting definitions (#403) 2020-11-12 11:10:12 -08:00
e96fd8b872 Changes to prepare for Jobs Library Demo (#401)
* Add submodule pointer to the aws/jobs-for-aws-iot-embedded-sdk repository for the Jobs library
* Commonize the MQTT helper functions used by the Device Shadow demo by re-locating them to FreeRTOS-Plus/Demo/AWS/MQTT_Demo_Helpers and updating the Device Shadow demo to use the new files
2020-11-11 09:34:59 -08:00
4312eabeb9 Update FreeRTOS+TCP submodule pointer (#400) 2020-11-10 13:16:19 -08:00
5f6464c22e Update urls in code to those on the server (#396)
* URLs have changed on the FreeRTOS.org site - this commit matches the URLs in the code with the new URLs on the website.

* Add link to device shadow directory to the shadow docs.

* Update main.c

* Update main.c

* Update readme.txt

* Update main.c

* Update main.c

* Update readme.txt

Co-authored-by: yngki <47755894+yngki@users.noreply.github.com>
2020-11-10 10:53:14 -08:00
21878bd619 Allow overriding default definitions of logging macros (#384)
* Update logging_stack.h file to avoid use of __FUNCTION__ macro

* Revert to use __FUNCTION__ instead of __FILE__

* Fix comment about metadata format

* Fix incorrect mapping of SdkLog function

* Fix typo causing LOG_METADATA_ARGS to be undefined

* Fix another bug with SdkLog macro definition

* Fix formatting

* Move mapping of SdkLog to vLoggingPrintf from logging_stack to config files

* Remove dependency of LIBRARY_LOG_NAME on LIBRARY_METADATA_* macros

* Minor improvements

Co-authored-by: Gary Wicker <14828980+gkwicker@users.noreply.github.com>
Co-authored-by: RichardBarry <3073890+RichardBarry@users.noreply.github.com>
2020-11-09 15:07:19 -08:00
5d3b3cb1c7 Multiple tidy up and corrections preparing for release (#390)
* Update to the WolfSSL FIPS ready demo:  Add a debug break point into the configASSERT() implementation along with a comment telling users how to update the integrity check hash if they hit the breakpoint.

* Updates in the root directory:  Remove "New - Stream and Message Buffers.url" as the feature is no longer new, and edit the readme.md file as the repo now contains 'core' libraries in addition to 'FreeRTOS+' libraries.

* FreeRTOS-Plus/Source/Utilities:  Add readme files and links to documentation.

* Application-Protocols:  Add readme and URL links.

* Remove Index.html from the end of a URL in the readme.txt file.

* Demo-IP-Protocols:  Add readme.txt files and code comments saying the protocols are not intended for production use.

* coreMQTT:  Remove links to deprecated documentation, add readme and correct links to documentation.

* General:  Correct URLs in source files and .url files.

* Update readme.txt
2020-11-09 14:50:33 -08:00
df082944e0 Update FreeRTOS+TCP submodule pointer (#395) 2020-11-09 14:45:43 -08:00
01e59a036c Restructure platform directory (#382)
This updates the platform and logging directory and moves it to the following places:
FreeRTOS\FreeRTOS-Plus\Source\Utilities
FreeRTOS\FreeRTOS-Plus\Source\Application-Protocols\network_transport\freertos_plus_tcp

Project files are updated to follow suite. All updated demos are tested to work as expected.
2020-11-05 16:47:43 -08:00
330b8c002f Delete printf-stdarg.c and move logging.c from Source/Logging (#381)
printf-stdarg.c seems have to been moved by mistake when moving logging sources to a common folder.

Also, because logging.c is specific to Windows, it is moved to FreeRTOS-Plus/Demo/Common/Logging/Logging_WinSim.c.
2020-11-05 10:12:06 -08:00
698b2b46d6 Update the FreeRTOS+TCP submodule pointer (#379)
* Update the submodule pointer

* Update submodule pointer
2020-11-04 13:00:51 -08:00
98f1ec7c5f Update the submodule pointer (#378) 2020-11-04 10:17:25 -08:00
6586b9b401 Update coreJSON submodule, and update call to JSON_Search API in Shadow demo (#375) 2020-11-03 13:47:28 -08:00
25cd833fd6 Rename platform files and submodules (#374)
This updates FreeRTOS-Plus/Source/Application-Protocols/platform folder based on feedback to include separate folders for tls and plaintext. In addition, the device-shadow-for-aws-iot-embedded-c submodule is renamed to device-shadow.
2020-11-03 11:51:02 -08:00
4124ac0c57 Update path to transport_interface.h from the coreMQTT submodule (#368)
Use transport_interface.h from the source/interface folder of coreMQTT submodule in the MQTT demos as this path was changed recently.
2020-10-29 10:22:15 -07:00
015536f35d Updated to Percepio Tracealyzer Recorder v4.4.0 (#330)
* Updated to Tracealyzer Recorder v4.4.0
Added support for FreeRTOS v10.4.1

* Fixed version numbers in USB stream port
2020-10-28 19:43:59 -07:00
559772a4db Update unused headers and NULL checks for platform wrappers (#367)
- Remove unused headers in the plaintext FreeRTOS sockets wrapper
- Update MFLN even though the preceding optional configuration returned an mbedTLS error
- Remove an unused `NULL` check in a private method that is already checked by the public connect method
- Add a `NULL` check to the public disconnect method

Co-authored-by: Joseph Julicher <jjulicher@mac.com>
2020-10-28 11:11:55 -07:00
c44794cd11 Update wolfSSL to the latest version(v.4.5.0) (#303)
* deleted old version wolfSSL before updating

* updated wolfSSL to the latest version(v4.4.0)

* updated wolfSSL to the latest version(v4.4.0)

* added macros for timing resistance

* Add wolfSSL-FIPS-Ready to Demo and Source

* Add wolfSSL-FIPS-Ready to Demo and Source

* Update README_wolfSSL_FIPS_Ready.md

* Remove unused files

* Update to wolfSSL-4.5.0-FIPS-Ready

* Increase FIPS version number for the default

* Update wolfSSL to the latest version(v.4.5.0)

* Fix version number

* Fix comments from github

Co-authored-by: RichardBarry <3073890+RichardBarry@users.noreply.github.com>
Co-authored-by: Ming Yue <mingyue86010@gmail.com>
Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
Co-authored-by: Alfred Gedeon <alfred2g@hotmail.com>
2020-10-23 19:35:06 -07:00
594c894699 Update device shadow submodule (#361) 2020-10-23 10:44:12 +08:00
f960c4465f Update coreMQTT submodule pointer and sync transport interface (#358)
Because the const qualifier was removed in PR #356, coreMQTT also needs to be updated to remove it.
2020-10-21 12:11:41 -07:00
398abbaa61 Update transport interface to remove const qualifier from NetworkContext_t * in send/recv (#356)
This removes a warning involving const qualifiers. The NetworkContext_t * cannot be declared as const in TransportRecv and TransportSend because mbedtls_ssl_write and mbedtls_ssl_read require non-const pointers. Therefore, the const qualifier is removed from transport_interface.h.
2020-10-21 09:39:20 -07:00
10842c9189 Relocate logging sources under FreeRTOS-Plus/Source/Logging (#354)
As suggested, because logging_stack.h and logging_levels.h are used not only by demos but also by platform-specific transport code, it would make sense to move FreeRTOS-Plus/Demos/Common/Logging to FreeRTOS-Plus/Source/Logging. The same is done for demo_logging.c and demo_logging.h, which are duplicated by several demos. Win32.vcxproj project files are also updated to follow suite.
2020-10-20 20:31:54 -07:00
2eed409577 Configure maximum fragment length extension. (#350) 2020-10-18 16:57:47 -07:00
15a7337ee0 Rename PKCS files to core. (#344)
* Rename PKCS files to core.
* Pin latest corePKCS11 release.
2020-10-16 13:38:25 -07:00
e3b7a56dc8 Update coreMQTT, coreJSON, and AWS Device Shadow submodules to latest commits (#346)
This updates submodules for coreMQTT, coreJSON, and AWS Device Shadow. Some of which contain library fixes.

* Update coreMQTT to latest commit

* Update submodules for coreJSON and AWS Device Shadow to latest commit
2020-10-14 10:48:33 -07:00
5f0bf944cb Fix MISRA warnings for platform code used by MQTT demos (#337)
In addition to fixing MISRA warnings, code is updated to have complexity <= 8. Also, this adds changes from PR #313, which allows the support of simultaneous connections in the mbedTLS transport wrapper. 

Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>
2020-10-13 12:55:26 -07:00
748222bc07 Small MQTT Plaintext hygiene updates (#324)
- Fix the config file header include gaurd
- Fixes comments only in the main prvMQTTDemoTask( void * pvParameters )
- Deletes unused headers.
- Check the return value of MQTT_Disconnect().

Co-authored-by: Oscar Michael Abrina <abrinao@amazon.com>
2020-10-12 18:36:31 -07:00
ec12e1719c Move PKCS #11 Mutual Auth Demo from LTS Dev branch (#338)
Move the PKCS #11 Mutual Auth demo from the LTS development branch.

Remove left over and unused mbed TLS contexts.
2020-10-12 15:40:54 -07:00
168d92132f Move MQTT Mutual Auth Demo from lts-development to master (#331)
This moves the MQTT Mutual Auth Demo under FreeRTOS-Plus/Demo/coreMQTT_Windows_Simulator/MQTT_Mutual_Auth

The project files such as WIN32.vcxproj and WIN32.vcxproj.filters are updated to point to the sources and includes from the coreMQTT submodule.

No changes are made to the actual code. Only paths are updated.

Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>
Co-authored-by: SarenaAWS <6563840+sarenameas@users.noreply.github.com>
Co-authored-by: leegeth <51681119+leegeth@users.noreply.github.com>
2020-10-08 13:56:28 -07:00
0c58a39332 Submodule PKCS #11 and add Standalone PKCS #11 demos (#323)
* Submodule PKCS #11.

* Add PKCS #11 demos.
2020-10-08 13:44:30 -07:00
a6393ee653 This PR adds the TCP submodule to the FreeRTOS/FreeRTOS repo (#307)
* MISRA v5

* Remove TCP code

* Add TCP submodule

* Remove unit test and CMock submodule

* Update submodule pointer
2020-10-05 13:20:42 -07:00
bd9db07f28 Add submodules for coreMQTT, coreJSON, and Device Shadow along with platform dependencies (#311)
This adds coreMQTT, coreJSON, and Device Shadow as submodules to the following directories:
coreMQTT: FreeRTOS-Plus/Source/Application-Protocols/coreMQTT
coreJSON: FreeRTOS-Plus/Source/coreJSON
Device Shadow: FreeRTOS/FreeRTOS-Plus/Source/AWS/device-shadow-for-aws-iot-embedded-sdk

Platform sources and includes that are utilized by these libraries are also moved from lts-development branch to master:
FreeRTOS-Plus/Source/FreeRTOS-IoT-Libraries-LTS-Beta2/c_sdk/platform (lts-development) -> 
FreeRTOS-Plus/Source/Application-Protocols/platform (master)


Co-authored-by: abhidixi11 <44424462+abhidixi11@users.noreply.github.com>
Co-authored-by: leegeth <51681119+leegeth@users.noreply.github.com>
Co-authored-by: Muneeb Ahmed <54290492+muneebahmed10@users.noreply.github.com>
Co-authored-by: Carl Lundin <53273776+lundinc2@users.noreply.github.com>
2020-10-02 20:26:02 -07:00
6fb8b1fc33 +TCP: Fix spellings (#302)
* MISRA v5

* Add spelling corrections

* Update after Shubham's comments

* Actually fix the spelling
2020-09-28 12:55:22 -04:00
ea0033a85d Fix a breaking build by removing const (#301) 2020-09-25 11:08:35 -07:00
3f21957cc8 FreeRTOS+TCP: MISRA rules 10.4, 10.8, & 21.15 (#280)
* Use unsigned types/constants where needed.
* Address MISRA 21.15 violations in FreeRTOS_Sockets.c
* Address MISRA rule violations in code (primarily Rule 2.2)
* Inline had been disabled for Coverity builds, preventing
Coverity from correctly identifying dead code; this change
removes the disabling of inline during Coverity builds.
* Added an explanation for the inline suppression of Rule
11.4 in prvSocketValid().
* Address MISRA Rule Violations (10.4 & 10.8)
* MISRA: Rule 21.15 changes

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
2020-09-25 08:47:01 -07:00
5d0908b23f FreeRTOS+TCP Fix usGenerateChecksum on 8-bit platforms with odd-aligned buffers (#286)
* Change type of usGenerateChecksum's ulAlignBits to intptr_t

Not all platforms have 32-bit pointers. 8-bit machines such as avr8 have
16-bit pointers.

This patch changes the type of ulAlignBits and renames it to uxAlignBits to
reflect the type change.

This fixes a compiler warning on machines with pointers that aren't
32-bits.

Signed-off-by: Andy Bennett <andyjpb@ashurst.eu.org>

* Fix usGenerateChecksum on odd-aligned buffers with non zero usSum

usGenerateChecksum would generate an incorrect checksum when pucNextData
was odd-aligned and usSum was non-zero.

This was caused by the byte order of usSum not matching the byte order of
the subsequent summing operation.

Odd-aligned buffers are common on 8-bit platforms such as avr8 when using
one of the FreeRTOS dynamic heap allocators.

Signed-off-by: Andy Bennett <andyjpb@ashurst.eu.org>

* Feedback from PR#122

https://github.com/FreeRTOS/FreeRTOS/pull/122

 + Use a uintptr_t rather than an intptr_t.

Changes supplied by Hein Tibosch.

Signed-off-by: Andy Bennett <andyjpb@ashurst.eu.org>

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
2020-09-24 21:53:43 -07:00
1fc1bd4321 Add CBMC proofs for FreeRTOS-Plus-CLI (#296) 2020-09-24 13:32:10 -07:00
c997d887e0 Address MISRA Rule violations (#274)
* Use unsigned types/constants where needed.

* Address MISRA 21.15 violations in FreeRTOS_Sockets.c

* Address MISRA rule violations in code (primarily Rule 2.2)

* Inline had been disabled for Coverity builds, preventing
Coverity from correctly identifying dead code; this change
removes the disabling of inline during Coverity builds.
* Added an explanation for the inline suppression of Rule
11.4 in prvSocketValid().

Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
2020-09-16 14:53:57 -07:00
50dc98a5a6 MISRA v5 (#272) 2020-09-16 12:32:21 -07:00
2621e60124 TCP: Update version number and History.txt (#247)
* Update the version number
* Update History.txt
2020-09-08 14:05:31 -07:00
6b502b5dd3 Build: replace scons with makefile (#235)
* Build: transform scons into Makefile
* Build: add Makefile dependencies
* Build: remove some tabs from Makefile
* Build: Make builds out of source, move wait for event to kernel port
* Test: update the full test to print status messages
* Build: replace lpthread with pthread

Co-authored-by: Alfred Gedeon <gedeonag@amazon.com>
2020-09-04 18:06:21 -07:00
c1b06040fe TCP: Update History.txt file (#243)
* Update the History.txt
2020-09-04 17:51:22 -07:00
889d3e8667 Create a new branch and address 10.8 warnings (#241) 2020-09-04 12:34:30 -07:00