From bfa6667e2f2eeb800a0edd6e6e4745b4faf34536 Mon Sep 17 00:00:00 2001 From: Divya Sampath Kumar Date: Fri, 8 Dec 2023 13:47:44 -0800 Subject: [PATCH] Remove pIotCoreCertificateId usage from samples. (#1882) * Modify compilation errors,when IOT_CORE_ENABLE_CREDENTIALS is enabled * Use llu * Remove CertificaqteId usgae in sample * Remove cert id usage --------- Co-authored-by: caihy0414 --- samples/Common.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/samples/Common.c b/samples/Common.c index 63365e5d49..dbc12b5c99 100644 --- a/samples/Common.c +++ b/samples/Common.c @@ -757,7 +757,7 @@ STATUS createSampleConfiguration(PCHAR channelName, SIGNALING_CHANNEL_ROLE_TYPE CHK(NULL != (pSampleConfiguration = (PSampleConfiguration) MEMCALLOC(1, SIZEOF(SampleConfiguration))), STATUS_NOT_ENOUGH_MEMORY); #ifdef IOT_CORE_ENABLE_CREDENTIALS - PCHAR pIotCoreCredentialEndPoint, pIotCoreCert, pIotCorePrivateKey, pIotCoreRoleAlias, pIotCoreThingName; + PCHAR pIotCoreCredentialEndPoint, pIotCoreCert, pIotCorePrivateKey, pIotCoreRoleAlias; CHK_ERR((pIotCoreCredentialEndPoint = GETENV(IOT_CORE_CREDENTIAL_ENDPOINT)) != NULL, STATUS_INVALID_OPERATION, "AWS_IOT_CORE_CREDENTIAL_ENDPOINT must be set"); CHK_ERR((pIotCoreCert = GETENV(IOT_CORE_CERT)) != NULL, STATUS_INVALID_OPERATION, "AWS_IOT_CORE_CERT must be set"); @@ -821,11 +821,6 @@ STATUS createSampleConfiguration(PCHAR channelName, SIGNALING_CHANNEL_ROLE_TYPE pSampleConfiguration->channelInfo.version = CHANNEL_INFO_CURRENT_VERSION; pSampleConfiguration->channelInfo.pChannelName = channelName; -#ifdef IOT_CORE_ENABLE_CREDENTIALS - if ((pIotCoreCertificateId = getenv(IOT_CORE_CERTIFICATE_ID)) != NULL) { - pSampleConfiguration->channelInfo.pChannelName = pIotCoreCertificateId; - } -#endif pSampleConfiguration->channelInfo.pKmsKeyId = NULL; pSampleConfiguration->channelInfo.tagCount = 0; pSampleConfiguration->channelInfo.pTags = NULL;