Skip to content

Commit

Permalink
Remove pIotCoreCertificateId usage from samples. (#1882)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
disa6302 and caihy0414 authored Dec 8, 2023
1 parent 0ae9ec6 commit bfa6667
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions samples/Common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit bfa6667

Please sign in to comment.