From: Chul Lee Date: Fri, 28 Oct 2016 05:51:16 +0000 (+0900) Subject: Modify the SRMRequestHandler to use the CAEndpoint_t's infomation X-Git-Tag: 1.3.0~1022^2~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fa04ff296fab22f55bf30b7e7f7fd1518d8f9567;p=platform%2Fupstream%2Fiotivity.git Modify the SRMRequestHandler to use the CAEndpoint_t's infomation for identify a secure channel connection. Change-Id: I91caf27ba7b08ee69623a960bb8df4da0acfefd9 Signed-off-by: Chul Lee Reviewed-on: https://gerrit.iotivity.org/gerrit/13809 Tested-by: jenkins-iotivity Reviewed-by: Joonghwan Lee Reviewed-by: Randeep Singh (cherry picked from commit b321d908218d5c2fdf1807b47c9da0c85bdbefa5) Reviewed-on: https://gerrit.iotivity.org/gerrit/14823 Reviewed-by: Kevin Kane --- diff --git a/resource/csdk/security/src/secureresourcemanager.c b/resource/csdk/security/src/secureresourcemanager.c index fb4c126..dc682b4 100644 --- a/resource/csdk/security/src/secureresourcemanager.c +++ b/resource/csdk/security/src/secureresourcemanager.c @@ -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;