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)
committerKevin Kane <kkane@microsoft.com>
Fri, 9 Dec 2016 19:03:46 +0000 (19:03 +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>
(cherry picked from commit b321d908218d5c2fdf1807b47c9da0c85bdbefa5)
Reviewed-on: https://gerrit.iotivity.org/gerrit/14823
Reviewed-by: Kevin Kane <kkane@microsoft.com>
resource/csdk/security/src/secureresourcemanager.c

index fb4c126..dc682b4 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;