Skip to content

Commit 130ad25

Browse files
committedNov 18, 2020
periodic update 11/18/20 14:34 PDT
1 parent 8de9548 commit 130ad25

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+2191
-500
lines changed
 
+14-15
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Configuring the MQTT library for testing<a name="afr-porting-mqtt"></a>
1+
# Configuring the coreMQTT library for testing<a name="afr-porting-mqtt"></a>
22

33
Devices on the edge can use the MQTT protocol to communicate with the AWS Cloud\. AWS IoT hosts an MQTT broker that sends and receives messages to and from connected devices at the edge\.
44

5-
The MQTT library implements the MQTT protocol for devices running FreeRTOS\. The MQTT library does not need to be ported, but your device's test project must pass all MQTT tests for qualification\. For more information, see [FreeRTOS MQTT Library](https://docs.aws.amazon.com/freertos/latest/userguide/freertos-lib-cloud-mqtt.html) in the FreeRTOS User Guide\.
5+
The coreMQTT library implements the MQTT protocol for devices running FreeRTOS\. The coreMQTT library doesn't need to be ported, but your device's test project must pass all MQTT tests for qualification\. For more information, see [coreMQTT Library](https://docs.aws.amazon.com/freertos/latest/userguide/coremqtt.html) in the *FreeRTOS User Guide\.*
66

77
## Prerequisites<a name="testing-prereqs-mqtt"></a>
88

9-
To set up the FreeRTOS MQTT library tests, you need the following:
9+
To set up the coreMQTT library tests, you need the following:
1010
+ A port of the TLS library\.
1111

1212
For information about porting the TLS library to your platform, see [Porting the TLS library](afr-porting-tls.md)\.
@@ -15,23 +15,22 @@ If you are using an IDE to build test projects, you need to set up your library
1515

1616
## Setting up the IDE test project<a name="testing-ide-mqtt"></a>
1717

18-
**To set up the MQTT library in the IDE project**
19-
+ Add all of the test source files in `freertos/libraries/c_sdk/standard/mqtt` and its subdirectories to the `aws_tests` IDE project\.
18+
**To set up the coreMQTT library in the IDE project**
2019

21-
## Configuring the `CMakeLists.txt` file<a name="testing-cmake-mqtt"></a>
20+
1. Add all the library source files in the `freertos/libraries/coreMQTT/source` directory and its subdirectories to the `aws_tests` IDE project\.
2221

23-
If you are using CMake to build your test project, you need to define a portable layer target for the library in your CMake list file\.
22+
1. Add all the source files for the network layer \(used in the tests\) in the `freertos/libraries/abstractions/transport` directory and `secure_sockets` subdirectory to the `aws_tests` IDE project\.
2423

25-
To define a library's portable layer target in `CMakeLists.txt`, follow the instructions in [FreeRTOS portable layers](cmake-template.md#cmake-portable)\.
24+
1. Add a `core_mqtt_config.h` file, required for building the coreMQTT library, to the config files directory at `freertos/vendors/vendor/boards/board/aws_tests/config_files`\.
2625

27-
The `CMakeLists.txt` template list file under `freertos/vendors/vendor/boards/board/CMakeLists.txt` includes example portable layer target definitions\. You can uncomment the definition for the library that you are porting, and modify it to fit your platform\.
26+
1. Add the test source file at `freertos/tests/integration_test/core_mqtt_system.c` to the `aws_tests` IDE project\.
2827

2928
## Setting up your local testing environment<a name="testing-local-mqtt"></a>
3029

31-
After you set up the library in the IDE project, you need to configure some other files for testing\.
30+
After you set up the library in the IDE project, you need to configure other files for testing\.
3231

3332
**To configure the source and header files for the MQTT tests**
34-
+ To enable the MQTT tests, open `freertos/vendors/vendor/boards/board/aws_tests/config_files/aws_test_runner_config.h`, and set the `testrunnerFULL_MQTTv4_ENABLED ` macro to `1`\.
33+
+ To enable the MQTT tests, open `freertos/vendors/vendor-name/boards/board-name/aws_tests/config_files/aws_test_runner_config.h`, and set the `testrunnerFULL_CORE_MQTT_AWS_IOT_ENABLED` macro to `1`\.
3534

3635
## Running the tests<a name="testing-run-mqtt"></a>
3736

@@ -41,12 +40,12 @@ After you set up the library in the IDE project, you need to configure some othe
4140

4241
1. Check the test results in the UART console\. If all tests pass, then testing is complete\.
4342

44-
## Validation<a name="w3aac11c33c19"></a>
43+
## Validation<a name="validation-mqtt"></a>
4544

4645
To officially qualify a device for FreeRTOS, you need to validate the device's ported source code with AWS IoT Device Tester\. Follow the instructions in [ Using AWS IoT Device Tester for FreeRTOS](https://docs.aws.amazon.com/freertos/latest/userguide/device-tester-for-freertos-ug.html) in the FreeRTOS User Guide to set up Device Tester for port validation\. To test a specific library's port, the correct test group must be enabled in the `device.json` file in the Device Tester `configs` folder\.
4746

48-
After you finish setting up the FreeRTOS MQTT library for your device, you can start porting the OTA agent library\. See [Porting the OTA library](afr-porting-ota.md) for instructions\.
47+
After you set up the coreMQTT library for your device, you can start porting the OTA agent library\. See [Porting the OTA library](afr-porting-ota.md) for instructions\.
4948

50-
If your device does not support OTA functionality, you can start porting the Bluetooth Low Energy library\. See [Porting the Bluetooth Low Energy library](afr-porting-ble.md) for instructions\.
49+
If your device doesn't support OTA functionality, you can start porting the Bluetooth Low Energy library\. See [Porting the Bluetooth Low Energy library](afr-porting-ble.md) for instructions\.
5150

52-
If your device does not support OTA and Bluetooth Low Energy functionality, then you are finished porting and can start the FreeRTOS qualification process\. See the [FreeRTOS Qualification Guide](https://docs.aws.amazon.com/freertos/latest/qualificationguide/) for more information\.
51+
If your device doesn't support OTA and Bluetooth Low Energy functionality, then you are finished porting and can start the FreeRTOS qualification process\. See the [FreeRTOS Qualification Guide](https://docs.aws.amazon.com/freertos/latest/qualificationguide/) for more information\.

‎doc_source/portingguide/afr-porting-pkcs.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Porting the PKCS \#11 library<a name="afr-porting-pkcs"></a>
1+
# Porting the corePKCS11 library<a name="afr-porting-pkcs"></a>
22

33
FreeRTOS uses the open standard PKCS \#11 “CryptoKi” API as the abstraction layer for cryptographic operations, including:
44
+ Signing and verifying\.
@@ -7,11 +7,11 @@ FreeRTOS uses the open standard PKCS \#11 “CryptoKi” API as the abstraction
77

88
For more information, see [PKCS \#11 Cryptographic Token Interface Base Specification](http://docs.oasis-open.org/pkcs11/pkcs11-base/v2.40/os/pkcs11-base-v2.40-os.html)\.
99

10-
Storing private keys in general\-purpose flash memory can be convenient in evaluation and rapid prototyping scenarios\. In production scenarios, to reduce the threats of data theft and device duplication, we recommend that you use dedicated cryptographic hardware\. Cryptographic hardware includes components with features that prevent cryptographic secret keys from being exported\. To use dedicated cryptographic hardware with FreeRTOS, you need to port the PKCS \#11 API to the hardware\. For information about the FreeRTOS PKCS \#11 library, see [FreeRTOS PKCS \#11 Library](https://docs.aws.amazon.com/freertos/latest/userguide/security-pkcs.html) in the FreeRTOS User Guide\.
10+
Storing private keys in general\-purpose flash memory can be convenient in evaluation and rapid prototyping scenarios\. In production scenarios, to reduce the threats of data theft and device duplication, we recommend that you use dedicated cryptographic hardware\. Cryptographic hardware includes components with features that prevent cryptographic secret keys from being exported\. To use dedicated cryptographic hardware with FreeRTOS, you need to port the PKCS \#11 API to the hardware\. For information about the FreeRTOS corePKCS11 library, see [FreeRTOS corePKCS11 Library](https://docs.aws.amazon.com/freertos/latest/userguide/security-pkcs.html) in the *FreeRTOS User Guide*\.
1111

1212
## Prerequisites<a name="porting-prereqs-pkcs"></a>
1313

14-
To port the PKCS \#11 library, you need the following:
14+
To port the corePKCS11 library, you need the following:
1515
+ An IDE project or `CMakeLists.txt` list file that includes vendor\-supplied drivers that are suitable for sensitive data\.
1616

1717
For information about setting up a test project, see [Setting Up Your FreeRTOS Source Code for Porting](porting-set-up-project.md)\.
@@ -21,7 +21,7 @@ To port the PKCS \#11 library, you need the following:
2121

2222
## Porting<a name="porting-steps-pkcs"></a>
2323

24-
**To port the PKCS \#11 library**
24+
**To port the corePKCS11 library**
2525

2626
1. Port the PKCS \#11 API functions\.
2727

@@ -79,29 +79,29 @@ If you are using an IDE for porting and testing, you need to add some source fil
7979
**Important**
8080
In the following steps, make sure that you add the source files to your IDE project from their on\-disk location\. Do not create duplicate copies of source files\.
8181

82-
**To set up the PKCS \#11 library in the IDE project**
82+
**To set up the corePKCS11 library in the IDE project**
8383

8484
1. Add the source file `freertos/vendors/vendor/boards/board/ports/pkcs11/core_pkcs11_pal.c` to the `aws_tests` IDE project\.
8585

8686
1. Add all of the files in the `freertos/libraries/abstractions/pkcs11` directory and its subdirectories to the `aws_tests` IDE project\.
8787

8888
1. Add all of the files in the `freertos/libraries/freertos_plus/standard/pkcs11` directory and its subdirectories to the `aws_tests` IDE project\. These files implement wrappers for commonly grouped PKCS \#11 function sets\.
8989

90-
1. Add the source file `freertos/libraries/freertos_plus/standard/crypto/src/aws_crypto.c` to the `aws_tests` IDE project\. This file implements the CRYPTO abstraction wrapper for mbedTLS\.
90+
1. Add the source file `freertos/libraries/freertos_plus/standard/crypto/src/iot_crypto.c` to the `aws_tests` IDE project\. This file implements the CRYPTO abstraction wrapper for mbedTLS\.
9191

9292
1. Add all of the source and header files from `freertos/libraries/3rdparty/mbedtls` and its subdirectories to the `aws_tests` IDE project\.
9393

94-
1. Add `freertos/libraries/3rdparty/mbedtls/include` and `freertos/libraries/abstractions/pkcs11` to the compilers include path\.
94+
1. Add `freertos/libraries/3rdparty/mbedtls/include` and `freertos/libraries/abstractions/pkcs11` to the compiler's include path\.
9595

9696
### Configuring the `CMakeLists.txt` file<a name="testing-cmake-pkcs"></a>
9797

98-
If you are using CMake to build your test project, you need to define a portable layer target for the library in your CMake list file\.
98+
If you're using CMake to build your test project, you need to define a portable layer target for the library in your CMake list file\.
9999

100100
To define a library's portable layer target in `CMakeLists.txt`, follow the instructions in [FreeRTOS portable layers](cmake-template.md#cmake-portable)\.
101101

102102
The `CMakeLists.txt` template list file under `freertos/vendors/vendor/boards/board/CMakeLists.txt` includes example portable layer target definitions\. You can uncomment the definition for the library that you are porting, and modify it to fit your platform\.
103103

104-
See below for an example portable layer target definition for the PKCS \#11 library that uses the mbedTLS\-based software implementation of PKCS \#11 and supplies a port\-specific PKCS \#11 PAL file\.
104+
See the following example portable layer target definition for the corePKCS11 library that uses the mbedTLS\-based software implementation of PKCS \#11 and supplies a port\-specific PKCS \#11 PAL file\.
105105

106106
```
107107
# PKCS11
@@ -137,8 +137,8 @@ After you set up the library in the IDE project, you need to configure some othe
137137

138138
Testing is complete when all tests pass\.
139139

140-
## Validation<a name="w3aac11c29c17"></a>
140+
## Validation<a name="pkcs-validation"></a>
141141

142142
To officially qualify a device for FreeRTOS, you need to validate the device's ported source code with AWS IoT Device Tester\. Follow the instructions in [ Using AWS IoT Device Tester for FreeRTOS](https://docs.aws.amazon.com/freertos/latest/userguide/device-tester-for-freertos-ug.html) in the FreeRTOS User Guide to set up Device Tester for port validation\. To test a specific library's port, the correct test group must be enabled in the `device.json` file in the Device Tester `configs` folder\.
143143

144-
After you finish porting the FreeRTOS PKCS \#11 library to your device, you can start porting the TLS library\. See [Porting the TLS library](afr-porting-tls.md) for instructions\.
144+
After you finish porting the corePKCS11 library to your device, you can start porting the TLS library\. See [Porting the TLS library](afr-porting-tls.md) for instructions\.

0 commit comments

Comments
 (0)