From 98b8fcd89d824248aaf2b0db787f08a964094bbf Mon Sep 17 00:00:00 2001 From: Archit Gupta <71798289+archigup@users.noreply.github.com> Date: Fri, 20 Nov 2020 14:53:34 -0800 Subject: [PATCH] Remove certs from AWS demos + misc fixes (#415) Removes the AWS IoT cert that is included in the demo_config.h files of the Shadow and Jobs demos. Additionally fixes some typos. --- .../Device_Defender_Demo/FreeRTOSIPConfig.h | 2 +- .../Device_Shadow_Demo/FreeRTOSIPConfig.h | 2 +- .../Device_Shadow_Demo/demo_config.h | 22 ----------------- .../Device_Shadow_Demo/mbedtls_config.h | 4 ++-- .../Jobs_Demo/DemoTasks/JobsDemoExample.c | 2 +- .../Jobs_Demo/FreeRTOSIPConfig.h | 2 +- .../Jobs_Demo/demo_config.h | 24 +------------------ 7 files changed, 7 insertions(+), 51 deletions(-) diff --git a/FreeRTOS-Plus/Demo/AWS/Device_Defender_Windows_Simulator/Device_Defender_Demo/FreeRTOSIPConfig.h b/FreeRTOS-Plus/Demo/AWS/Device_Defender_Windows_Simulator/Device_Defender_Demo/FreeRTOSIPConfig.h index 8893b20556..0a61ea5d13 100644 --- a/FreeRTOS-Plus/Demo/AWS/Device_Defender_Windows_Simulator/Device_Defender_Demo/FreeRTOSIPConfig.h +++ b/FreeRTOS-Plus/Demo/AWS/Device_Defender_Windows_Simulator/Device_Defender_Demo/FreeRTOSIPConfig.h @@ -132,7 +132,7 @@ extern UBaseType_t uxRand(); * becomes available or the send block time expires. If the send block time expires * then the send operation is aborted. The maximum allowable send block time is * capped to the value set by ipconfigMAX_SEND_BLOCK_TIME_TICKS. Capping the - * maximum allowable send block time prevents prevents a deadlock occurring when + * maximum allowable send block time prevents a deadlock occurring when * all the network buffers are in use and the tasks that process (and subsequently * free) the network buffers are themselves blocked waiting for a network buffer. * ipconfigMAX_SEND_BLOCK_TIME_TICKS is specified in RTOS ticks. A time in diff --git a/FreeRTOS-Plus/Demo/AWS/Device_Shadow_Windows_Simulator/Device_Shadow_Demo/FreeRTOSIPConfig.h b/FreeRTOS-Plus/Demo/AWS/Device_Shadow_Windows_Simulator/Device_Shadow_Demo/FreeRTOSIPConfig.h index 194c62ac5e..423b8e5551 100644 --- a/FreeRTOS-Plus/Demo/AWS/Device_Shadow_Windows_Simulator/Device_Shadow_Demo/FreeRTOSIPConfig.h +++ b/FreeRTOS-Plus/Demo/AWS/Device_Shadow_Windows_Simulator/Device_Shadow_Demo/FreeRTOSIPConfig.h @@ -130,7 +130,7 @@ extern UBaseType_t uxRand(); * becomes available or the send block time expires. If the send block time expires * then the send operation is aborted. The maximum allowable send block time is * capped to the value set by ipconfigMAX_SEND_BLOCK_TIME_TICKS. Capping the - * maximum allowable send block time prevents prevents a deadlock occurring when + * maximum allowable send block time prevents a deadlock occurring when * all the network buffers are in use and the tasks that process (and subsequently * free) the network buffers are themselves blocked waiting for a network buffer. * ipconfigMAX_SEND_BLOCK_TIME_TICKS is specified in RTOS ticks. A time in diff --git a/FreeRTOS-Plus/Demo/AWS/Device_Shadow_Windows_Simulator/Device_Shadow_Demo/demo_config.h b/FreeRTOS-Plus/Demo/AWS/Device_Shadow_Windows_Simulator/Device_Shadow_Demo/demo_config.h index 983fc9ddae..7d47ffd8fb 100644 --- a/FreeRTOS-Plus/Demo/AWS/Device_Shadow_Windows_Simulator/Device_Shadow_Demo/demo_config.h +++ b/FreeRTOS-Plus/Demo/AWS/Device_Shadow_Windows_Simulator/Device_Shadow_Demo/demo_config.h @@ -134,28 +134,6 @@ extern void vLoggingPrintf( const char * pcFormatString, * */ -#define democonfigROOT_CA_PEM \ - "-----BEGIN CERTIFICATE-----\n" \ - "MIIDQTCCAimgAwIBAgITBmyfz5m/jAo54vB4ikPmljZbyjANBgkqhkiG9w0BAQsF\n" \ - "ADA5MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6\n" \ - "b24gUm9vdCBDQSAxMB4XDTE1MDUyNjAwMDAwMFoXDTM4MDExNzAwMDAwMFowOTEL\n" \ - "MAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZMBcGA1UEAxMQQW1hem9uIFJv\n" \ - "b3QgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJ4gHHKeNXj\n" \ - "ca9HgFB0fW7Y14h29Jlo91ghYPl0hAEvrAIthtOgQ3pOsqTQNroBvo3bSMgHFzZM\n" \ - "9O6II8c+6zf1tRn4SWiw3te5djgdYZ6k/oI2peVKVuRF4fn9tBb6dNqcmzU5L/qw\n" \ - "IFAGbHrQgLKm+a/sRxmPUDgH3KKHOVj4utWp+UhnMJbulHheb4mjUcAwhmahRWa6\n" \ - "VOujw5H5SNz/0egwLX0tdHA114gk957EWW67c4cX8jJGKLhD+rcdqsq08p8kDi1L\n" \ - "93FcXmn/6pUCyziKrlA4b9v7LWIbxcceVOF34GfID5yHI9Y/QCB/IIDEgEw+OyQm\n" \ - "jgSubJrIqg0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC\n" \ - "AYYwHQYDVR0OBBYEFIQYzIU07LwMlJQuCFmcx7IQTgoIMA0GCSqGSIb3DQEBCwUA\n" \ - "A4IBAQCY8jdaQZChGsV2USggNiMOruYou6r4lK5IpDB/G/wkjUu0yKGX9rbxenDI\n" \ - "U5PMCCjjmCXPI6T53iHTfIUJrU6adTrCC2qJeHZERxhlbI1Bjjt/msv0tadQ1wUs\n" \ - "N+gDS63pYaACbvXy8MWy7Vu33PqUXHeeE6V/Uq2V8viTO96LXFvKWlJbYK8U90vv\n" \ - "o/ufQJVtMVT8QtPHRh8jrdkPSHCa2XV4cdFyQzR1bldZwgJcJmApzyMZFo6IQ6XU\n" \ - "5MsI+yMRQ+hDKXJioaldXgjUkK642M4UwtBV8ob2xJNDd2ZhwLnoQdeXeGADbkpy\n" \ - "rqXRfboQnoZsG4q5WTP468SQvvG5\n" \ - "-----END CERTIFICATE-----" - /** * @brief Client certificate. * diff --git a/FreeRTOS-Plus/Demo/AWS/Device_Shadow_Windows_Simulator/Device_Shadow_Demo/mbedtls_config.h b/FreeRTOS-Plus/Demo/AWS/Device_Shadow_Windows_Simulator/Device_Shadow_Demo/mbedtls_config.h index 546011d2e1..833260b532 100644 --- a/FreeRTOS-Plus/Demo/AWS/Device_Shadow_Windows_Simulator/Device_Shadow_Demo/mbedtls_config.h +++ b/FreeRTOS-Plus/Demo/AWS/Device_Shadow_Windows_Simulator/Device_Shadow_Demo/mbedtls_config.h @@ -47,7 +47,7 @@ /* This file configures mbed TLS for FreeRTOS. */ #ifndef MBEDTLS_CONFIG_H -#define SHADOW_CONFIG_H +#define MBEDTLS_CONFIG_H /* FreeRTOS include. */ #include "FreeRTOS.h" @@ -148,4 +148,4 @@ int mbedtls_platform_entropy_poll( void * data, #include "mbedtls/check_config.h" -#endif /* ifndef SHADOW_CONFIG_H */ +#endif /* ifndef MBEDTLS_CONFIG_H */ diff --git a/FreeRTOS-Plus/Demo/AWS/Jobs_Windows_Simulator/Jobs_Demo/DemoTasks/JobsDemoExample.c b/FreeRTOS-Plus/Demo/AWS/Jobs_Windows_Simulator/Jobs_Demo/DemoTasks/JobsDemoExample.c index d825abdd11..055398dff8 100755 --- a/FreeRTOS-Plus/Demo/AWS/Jobs_Windows_Simulator/Jobs_Demo/DemoTasks/JobsDemoExample.c +++ b/FreeRTOS-Plus/Demo/AWS/Jobs_Windows_Simulator/Jobs_Demo/DemoTasks/JobsDemoExample.c @@ -229,7 +229,7 @@ typedef enum JobActionType static MQTTContext_t xMqttContext; /** - * @brief The network context used for Openssl operation. + * @brief The network context used for mbedTLS operation. */ static NetworkContext_t xNetworkContext; diff --git a/FreeRTOS-Plus/Demo/AWS/Jobs_Windows_Simulator/Jobs_Demo/FreeRTOSIPConfig.h b/FreeRTOS-Plus/Demo/AWS/Jobs_Windows_Simulator/Jobs_Demo/FreeRTOSIPConfig.h index 194c62ac5e..423b8e5551 100644 --- a/FreeRTOS-Plus/Demo/AWS/Jobs_Windows_Simulator/Jobs_Demo/FreeRTOSIPConfig.h +++ b/FreeRTOS-Plus/Demo/AWS/Jobs_Windows_Simulator/Jobs_Demo/FreeRTOSIPConfig.h @@ -130,7 +130,7 @@ extern UBaseType_t uxRand(); * becomes available or the send block time expires. If the send block time expires * then the send operation is aborted. The maximum allowable send block time is * capped to the value set by ipconfigMAX_SEND_BLOCK_TIME_TICKS. Capping the - * maximum allowable send block time prevents prevents a deadlock occurring when + * maximum allowable send block time prevents a deadlock occurring when * all the network buffers are in use and the tasks that process (and subsequently * free) the network buffers are themselves blocked waiting for a network buffer. * ipconfigMAX_SEND_BLOCK_TIME_TICKS is specified in RTOS ticks. A time in diff --git a/FreeRTOS-Plus/Demo/AWS/Jobs_Windows_Simulator/Jobs_Demo/demo_config.h b/FreeRTOS-Plus/Demo/AWS/Jobs_Windows_Simulator/Jobs_Demo/demo_config.h index c99a6d8b8f..696344421c 100644 --- a/FreeRTOS-Plus/Demo/AWS/Jobs_Windows_Simulator/Jobs_Demo/demo_config.h +++ b/FreeRTOS-Plus/Demo/AWS/Jobs_Windows_Simulator/Jobs_Demo/demo_config.h @@ -127,28 +127,6 @@ extern void vLoggingPrintf( const char * pcFormatString, * */ -#define democonfigROOT_CA_PEM \ - "-----BEGIN CERTIFICATE-----\n" \ - "MIIDQTCCAimgAwIBAgITBmyfz5m/jAo54vB4ikPmljZbyjANBgkqhkiG9w0BAQsF\n" \ - "ADA5MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6\n" \ - "b24gUm9vdCBDQSAxMB4XDTE1MDUyNjAwMDAwMFoXDTM4MDExNzAwMDAwMFowOTEL\n" \ - "MAkGA1UEBhMCVVMxDzANBgNVBAoTBkFtYXpvbjEZMBcGA1UEAxMQQW1hem9uIFJv\n" \ - "b3QgQ0EgMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALJ4gHHKeNXj\n" \ - "ca9HgFB0fW7Y14h29Jlo91ghYPl0hAEvrAIthtOgQ3pOsqTQNroBvo3bSMgHFzZM\n" \ - "9O6II8c+6zf1tRn4SWiw3te5djgdYZ6k/oI2peVKVuRF4fn9tBb6dNqcmzU5L/qw\n" \ - "IFAGbHrQgLKm+a/sRxmPUDgH3KKHOVj4utWp+UhnMJbulHheb4mjUcAwhmahRWa6\n" \ - "VOujw5H5SNz/0egwLX0tdHA114gk957EWW67c4cX8jJGKLhD+rcdqsq08p8kDi1L\n" \ - "93FcXmn/6pUCyziKrlA4b9v7LWIbxcceVOF34GfID5yHI9Y/QCB/IIDEgEw+OyQm\n" \ - "jgSubJrIqg0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC\n" \ - "AYYwHQYDVR0OBBYEFIQYzIU07LwMlJQuCFmcx7IQTgoIMA0GCSqGSIb3DQEBCwUA\n" \ - "A4IBAQCY8jdaQZChGsV2USggNiMOruYou6r4lK5IpDB/G/wkjUu0yKGX9rbxenDI\n" \ - "U5PMCCjjmCXPI6T53iHTfIUJrU6adTrCC2qJeHZERxhlbI1Bjjt/msv0tadQ1wUs\n" \ - "N+gDS63pYaACbvXy8MWy7Vu33PqUXHeeE6V/Uq2V8viTO96LXFvKWlJbYK8U90vv\n" \ - "o/ufQJVtMVT8QtPHRh8jrdkPSHCa2XV4cdFyQzR1bldZwgJcJmApzyMZFo6IQ6XU\n" \ - "5MsI+yMRQ+hDKXJioaldXgjUkK642M4UwtBV8ob2xJNDd2ZhwLnoQdeXeGADbkpy\n" \ - "rqXRfboQnoZsG4q5WTP468SQvvG5\n" \ - "-----END CERTIFICATE-----" - /** * @brief Client certificate. * @@ -170,7 +148,7 @@ extern void vLoggingPrintf( const char * pcFormatString, * @brief Client's private key. * * Please refer to the AWS documentation below for details - * regarding clientauthentication. + * regarding client authentication. * https://docs.aws.amazon.com/iot/latest/developerguide/client-authentication.html * * @note This private key should be PEM-encoded.