45
45
/* SubscribePublishUnsubscribeDemo demo includes. */
46
46
#include "sub_pub_unsub_demo.h"
47
47
48
- /* OTACodeSigningDemo demo includes. */
49
- #include "ota_pal.h"
50
- #include "ota_over_mqtt_demo.h"
51
-
52
48
/* ESP Secure Certificate Manager include. */
53
49
#include "esp_secure_cert_read.h"
54
50
60
56
#include "test_execution_config.h"
61
57
#include "qualification_test.h"
62
58
#include "transport_interface_test.h"
63
- #include "ota_pal_test.h"
64
59
#include "mqtt_test.h"
65
60
66
61
#define keyCLIENT_CERTIFICATE_PEM NULL
67
62
#define keyCLIENT_PRIVATE_KEY_PEM NULL
68
63
64
+ /* Use ROOT CA in binary. */
65
+ #ifndef ECHO_SERVER_ROOT_CA
66
+ #define ECHO_SERVER_ROOT_CA NULL
67
+ #endif
68
+
69
69
/* Global variables ***********************************************************/
70
70
71
71
/**
72
72
* @brief Logging tag for ESP-IDF logging functions.
73
73
*/
74
74
static const char * TAG = "qual_main" ;
75
75
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
-
81
76
/**
82
77
* @brief The AWS RootCA1 passed in from ./certs/root_cert_auth.pem
83
78
*/
84
79
extern const uint8_t root_cert_auth_crt_start [] asm ( "_binary_root_cert_auth_crt_start" );
85
80
extern const uint8_t root_cert_auth_crt_end [] asm ( "_binary_root_cert_auth_crt_end" );
86
81
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
-
103
82
/**
104
83
* @brief Socket send and receive timeouts to use. Specified in milliseconds.
105
84
*/
@@ -155,7 +134,7 @@ static BaseType_t prvInitializeNetworkContext( char * pcServerName,
155
134
/*-----------------------------------------------------------*/
156
135
157
136
#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 )
159
138
static NetworkContext_t xNetworkContext = { 0 };
160
139
161
140
static BaseType_t prvInitializeNetworkContext ( char * pcServerName ,
@@ -384,7 +363,7 @@ static BaseType_t prvInitializeNetworkContext( char * pcServerName,
384
363
return xRet ;
385
364
}
386
365
#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 ) */
388
367
/*-----------------------------------------------------------*/
389
368
390
369
uint32_t MqttTestGetTimeMs ( void )
@@ -445,12 +424,6 @@ uint32_t MqttTestGetTimeMs( void )
445
424
}
446
425
#endif /* if ( TRANSPORT_INTERFACE_TEST_ENABLED == 1 ) */
447
426
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 ) */
454
427
/*-----------------------------------------------------------*/
455
428
456
429
void runQualification ( void * pvArgs )
@@ -478,9 +451,9 @@ BaseType_t xQualificationStart( void )
478
451
479
452
ESP_LOGE ( TAG , "Run xQualificationStart" );
480
453
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 )
482
455
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 ) */
484
457
485
458
#if ( TRANSPORT_INTERFACE_TEST_ENABLED == 1 )
486
459
#if defined( TRANSPORT_CLIENT_PRIVATE_KEY )
@@ -497,7 +470,7 @@ BaseType_t xQualificationStart( void )
497
470
}
498
471
#endif /* ( DEVICE_ADVISOR_TEST_ENABLED == 1 ) */
499
472
500
- #if ( DEVICE_ADVISOR_TEST_ENABLED == 1 ) || ( OTA_E2E_TEST_ENABLED == 1 )
473
+ #if ( DEVICE_ADVISOR_TEST_ENABLED == 1 )
501
474
if ( xRet == pdPASS )
502
475
{
503
476
xRet = xCoreMqttAgentManagerStart ( & xNetworkContext );
@@ -510,55 +483,7 @@ BaseType_t xQualificationStart( void )
510
483
configASSERT ( xRet == pdPASS );
511
484
}
512
485
}
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 ) */
562
487
563
488
if ( ( xRet = xTaskCreate ( runQualification ,
564
489
"QualTask" ,
@@ -583,11 +508,3 @@ BaseType_t xQualificationStart( void )
583
508
}
584
509
#endif /* DEVICE_ADVISOR_TEST_ENABLED == 1 */
585
510
/*-----------------------------------------------------------*/
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