Modify the SRMRequestHandler to use the CAEndpoint_t's infomation
authorChul Lee <chuls.lee@samsung.com>
Fri, 28 Oct 2016 05:51:16 +0000 (14:51 +0900)
committerRandeep Singh <randeep.s@samsung.com>
Fri, 28 Oct 2016 13:46:55 +0000 (13:46 +0000)
for identify a secure channel connection.

Change-Id: I91caf27ba7b08ee69623a960bb8df4da0acfefd9
Signed-off-by: Chul Lee <chuls.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/13809
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Joonghwan Lee <jh05.lee@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
resource/csdk/security/src/secureresourcemanager.c

index 96b81ba..770e546 100644 (file)
@@ -144,11 +144,8 @@ 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 subject id is null that means request is sent thru coap.
-    if (memcmp(subjectId.id, nullSubjectId.id, sizeof(subjectId.id)) != 0)
+    if (endPoint->flags & CA_SECURE)
     {
         OIC_LOG(INFO, TAG, "request over secure channel");
         isRequestOverSecureChannel = true;