Commit 58e9f31b authored by Philippe Coval's avatar Philippe Coval Committed by Kevin Kane

[IOT-1366] coaps request for secure resource

[Randeep Singh]

[IOT-1366] coaps request for secure resource

handled pending review comments

[Philippe Coval]

Ported from 1.2-rel to master

  Conflicts:
	resource/csdk/security/src/secureresourcemanager.c

Change-Id: Iacde7395b7a5da53caff7f175beb3d3e17dd9894
Signed-off-by: Randeep's avatarRandeep Singh <randeep.s@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/12907Tested-by: default avatarjenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: default avatarAshwini  Kumar <k.ashwini@samsung.com>
Author: Randeep Singh <randeep.s@samsung.com>
Signed-off-by: default avatarPhilippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/16883Tested-by: default avatarjenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: default avatarAlex Kelley <alexke@microsoft.com>
Reviewed-by: default avatarKevin Kane <kkane@microsoft.com>
parent 2db0692f
......@@ -171,8 +171,12 @@ void SRMRequestHandler(const CAEndpoint_t *endPoint, const CARequestInfo_t *requ
// Copy the subjectID
OicUuid_t subjectId = {.id = {0}};
OicUuid_t nullSubjectId = {.id = {0}};
memcpy(subjectId.id, requestInfo->info.identity.id, sizeof(subjectId.id));
if (endPoint->flags & CA_SECURE)
//If subject id is null that means request is sent thru coap.
if ( (endPoint->flags & CA_SECURE)
|| (memcmp(subjectId.id, nullSubjectId.id, sizeof(subjectId.id)) != 0))
{
OIC_LOG(INFO, TAG, "request over secure channel");
isRequestOverSecureChannel = true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment