4545/* SubscribePublishUnsubscribeDemo demo includes. */
4646#include "sub_pub_unsub_demo.h"
4747
48- /* OTACodeSigningDemo demo includes. */
49- #include "ota_pal.h"
50- #include "ota_over_mqtt_demo.h"
51-
5248/* ESP Secure Certificate Manager include. */
5349#include "esp_secure_cert_read.h"
5450
6056#include "test_execution_config.h"
6157#include "qualification_test.h"
6258#include "transport_interface_test.h"
63- #include "ota_pal_test.h"
6459#include "mqtt_test.h"
6560
6661#define keyCLIENT_CERTIFICATE_PEM NULL
6762#define keyCLIENT_PRIVATE_KEY_PEM NULL
6863
64+ /* Use ROOT CA in binary. */
65+ #ifndef ECHO_SERVER_ROOT_CA
66+ #define ECHO_SERVER_ROOT_CA NULL
67+ #endif
68+
6969/* Global variables ***********************************************************/
7070
7171/**
7272 * @brief Logging tag for ESP-IDF logging functions.
7373 */
7474static const char * TAG = "qual_main" ;
7575
76- /**
77- * @brief The AWS code signing certificate passed in from ./certs/aws_codesign.crt
78- */
79- extern const char pcAwsCodeSigningCertPem [] asm ( "_binary_aws_codesign_crt_start" );
80-
8176/**
8277 * @brief The AWS RootCA1 passed in from ./certs/root_cert_auth.pem
8378 */
8479extern const uint8_t root_cert_auth_crt_start [] asm ( "_binary_root_cert_auth_crt_start" );
8580extern const uint8_t root_cert_auth_crt_end [] asm ( "_binary_root_cert_auth_crt_end" );
8681
87- /**
88- * @brief The code signing certificate from
89- * components/FreeRTOS-Libraries-Integration-Tests/FreeRTOS-Libraries-Integration-Tests/src/ota/test_files/ecdsa-sha256-signer.crt.pem.test
90- */
91- const char pcOtaPalTestCodeSigningCertPem [] = \
92- "-----BEGIN CERTIFICATE-----\n" \
93- "MIIBXDCCAQOgAwIBAgIJAPMhJT8l0C6AMAoGCCqGSM49BAMCMCExHzAdBgNVBAMM\n" \
94- "FnRlc3Rfc2lnbmVyQGFtYXpvbi5jb20wHhcNMTgwNjI3MjAwNDQyWhcNMTkwNjI3\n" \
95- "MjAwNDQyWjAhMR8wHQYDVQQDDBZ0ZXN0X3NpZ25lckBhbWF6b24uY29tMFkwEwYH\n" \
96- "KoZIzj0CAQYIKoZIzj0DAQcDQgAEyza/tGLVbVxhL41iYtC8D6tGEvAHu498gNtq\n" \
97- "DtPsKaoR3t5xQx+6zdWiCi32fgFT2vkeVAmX3pf/Gl8nIP48ZqMkMCIwCwYDVR0P\n" \
98- "BAQDAgeAMBMGA1UdJQQMMAoGCCsGAQUFBwMDMAoGCCqGSM49BAMCA0cAMEQCIDkf\n" \
99- "83Oq8sOXhSyJCWAN63gc4vp9//RFCXh/hUXPYcTWAiBgmQ5JV2MZH01Upi2lMflN\n" \
100- "YLbC+lYscwcSlB2tECUbJA==\n" \
101- "-----END CERTIFICATE-----\n" ;
102-
10382/**
10483 * @brief Socket send and receive timeouts to use. Specified in milliseconds.
10584 */
@@ -155,7 +134,7 @@ static BaseType_t prvInitializeNetworkContext( char * pcServerName,
155134/*-----------------------------------------------------------*/
156135
157136#if ( MQTT_TEST_ENABLED == 1 ) || ( TRANSPORT_INTERFACE_TEST_ENABLED == 1 ) || \
158- ( DEVICE_ADVISOR_TEST_ENABLED == 1 ) || ( OTA_E2E_TEST_ENABLED == 1 )
137+ ( DEVICE_ADVISOR_TEST_ENABLED == 1 )
159138 static NetworkContext_t xNetworkContext = { 0 };
160139
161140 static BaseType_t prvInitializeNetworkContext ( char * pcServerName ,
@@ -384,7 +363,7 @@ static BaseType_t prvInitializeNetworkContext( char * pcServerName,
384363 return xRet ;
385364 }
386365#endif /* ( MQTT_TEST_ENABLED == 1 ) || ( TRANSPORT_INTERFACE_TEST_ENABLED == 1 ) ||
387- * ( DEVICE_ADVISOR_TEST_ENABLED == 1 ) || ( OTA_E2E_TEST_ENABLED == 1 ) */
366+ * ( DEVICE_ADVISOR_TEST_ENABLED == 1 ) */
388367/*-----------------------------------------------------------*/
389368
390369uint32_t MqttTestGetTimeMs ( void )
@@ -445,12 +424,6 @@ uint32_t MqttTestGetTimeMs( void )
445424 }
446425#endif /* if ( TRANSPORT_INTERFACE_TEST_ENABLED == 1 ) */
447426
448- #if ( OTA_PAL_TEST_ENABLED == 1 )
449- void SetupOtaPalTestParam ( OtaPalTestParam_t * pTestParam )
450- {
451- pTestParam -> pageSize = 1 << otaconfigLOG2_FILE_BLOCK_SIZE ;
452- }
453- #endif /* if ( OTA_PAL_TEST_ENABLED == 1 ) */
454427/*-----------------------------------------------------------*/
455428
456429void runQualification ( void * pvArgs )
@@ -478,9 +451,9 @@ BaseType_t xQualificationStart( void )
478451
479452 ESP_LOGE ( TAG , "Run xQualificationStart" );
480453
481- #if ( MQTT_TEST_ENABLED == 1 ) || ( DEVICE_ADVISOR_TEST_ENABLED == 1 ) || ( OTA_E2E_TEST_ENABLED == 1 )
454+ #if ( MQTT_TEST_ENABLED == 1 ) || ( DEVICE_ADVISOR_TEST_ENABLED == 1 )
482455 prvInitializeNetworkContext ( MQTT_SERVER_ENDPOINT , MQTT_SERVER_PORT , NULL , keyCLIENT_CERTIFICATE_PEM , keyCLIENT_PRIVATE_KEY_PEM );
483- #endif /* ( MQTT_TEST_ENABLED == 1 ) || ( DEVICE_ADVISOR_TEST_ENABLED == 1 ) || ( OTA_E2E_TEST_ENABLED == 1 ) */
456+ #endif /* ( MQTT_TEST_ENABLED == 1 ) || ( DEVICE_ADVISOR_TEST_ENABLED == 1 ) */
484457
485458 #if ( TRANSPORT_INTERFACE_TEST_ENABLED == 1 )
486459 #if defined( TRANSPORT_CLIENT_PRIVATE_KEY )
@@ -497,7 +470,7 @@ BaseType_t xQualificationStart( void )
497470 }
498471 #endif /* ( DEVICE_ADVISOR_TEST_ENABLED == 1 ) */
499472
500- #if ( DEVICE_ADVISOR_TEST_ENABLED == 1 ) || ( OTA_E2E_TEST_ENABLED == 1 )
473+ #if ( DEVICE_ADVISOR_TEST_ENABLED == 1 )
501474 if ( xRet == pdPASS )
502475 {
503476 xRet = xCoreMqttAgentManagerStart ( & xNetworkContext );
@@ -510,55 +483,7 @@ BaseType_t xQualificationStart( void )
510483 configASSERT ( xRet == pdPASS );
511484 }
512485 }
513- #endif /* ( DEVICE_ADVISOR_TEST_ENABLED == 1 ) || ( OTA_E2E_TEST_ENABLED == 1 ) */
514-
515- #if ( OTA_E2E_TEST_ENABLED == 1 )
516- if ( xRet == pdPASS )
517- {
518- #if CONFIG_GRI_OUTPUT_CERTS_KEYS
519- ESP_LOGI ( TAG , "\nCS Cert: \nLength: %d\n%s" ,
520- strlen ( pcAwsCodeSigningCertPem ),
521- pcAwsCodeSigningCertPem );
522- #endif /* CONFIG_GRI_OUTPUT_CERTS_KEYS */
523-
524- if ( otaPal_SetCodeSigningCertificate ( pcAwsCodeSigningCertPem ) )
525- {
526- vStartOTACodeSigningDemo ();
527- }
528- else
529- {
530- ESP_LOGE ( TAG ,
531- "Failed to set the code signing certificate for the AWS OTA "
532- "library. OTA demo will not be started." );
533-
534- configASSERT ( 0 );
535- }
536- }
537- #endif /* OTA_E2E_TEST_ENABLED == 1 */
538-
539- #if ( OTA_PAL_TEST_ENABLED == 1 )
540- if ( xRet == pdPASS )
541- {
542- #if CONFIG_GRI_OUTPUT_CERTS_KEYS
543- ESP_LOGI ( TAG , "\nCS Cert: \nLength: %d\n%s" ,
544- strlen ( pcOtaPalTestCodeSigningCertPem ),
545- pcOtaPalTestCodeSigningCertPem );
546- #endif /* CONFIG_GRI_OUTPUT_CERTS_KEYS */
547-
548- if ( otaPal_SetCodeSigningCertificate ( pcOtaPalTestCodeSigningCertPem ) )
549- {
550- /* No need to enable OTA task for OTA PAL test. */
551- }
552- else
553- {
554- ESP_LOGE ( TAG ,
555- "Failed to set the code signing certificate for the AWS OTA "
556- "library. OTA demo will not be started." );
557-
558- configASSERT ( 0 );
559- }
560- }
561- #endif /* OTA_E2E_TEST_ENABLED == 1 */
486+ #endif /* ( DEVICE_ADVISOR_TEST_ENABLED == 1 ) */
562487
563488 if ( ( xRet = xTaskCreate ( runQualification ,
564489 "QualTask" ,
@@ -583,11 +508,3 @@ BaseType_t xQualificationStart( void )
583508 }
584509#endif /* DEVICE_ADVISOR_TEST_ENABLED == 1 */
585510/*-----------------------------------------------------------*/
586-
587- #if ( OTA_E2E_TEST_ENABLED == 1 )
588- int RunOtaE2eDemo ( void )
589- {
590- return 0 ;
591- }
592- #endif /* ( OTA_E2E_TEST_ENABLED == 1) */
593- /*-----------------------------------------------------------*/
0 commit comments