[IOT-1601]Adding logic to validate oxmsel updationg in owned=true 03/15303/7
authorjs126.lee <js126.lee@samsung.com>
Mon, 28 Nov 2016 09:17:59 +0000 (18:17 +0900)
committerRandeep Singh <randeep.s@samsung.com>
Fri, 20 Jan 2017 10:37:28 +0000 (10:37 +0000)
This patch is related to CT1.7.8.3 case.
CTT has been agreed this patch.

Change-Id: Ia1e18bd940b69bfcf13c717a334a91a42f3f8402
Signed-off-by: js126.lee <js126.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14841
Reviewed-by: Jongmin Choi <jminl.choi@samsung.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
(cherry picked from commit 13a35f5aebde095c6e4015d5ebcd93c4753dc69b)
Reviewed-on: https://gerrit.iotivity.org/gerrit/15303
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-by: Kevin Kane <kkane@microsoft.com>
resource/csdk/security/src/doxmresource.c

index 4169063..bccf5c7 100644 (file)
@@ -1033,6 +1033,12 @@ static OCEntityHandlerResult HandleDoxmPostRequest(OCEntityHandlerRequest * ehRe
             // in owned state
             if (true == gDoxm->owned)
             {
+                if (false == ValidateOxmsel(gDoxm->oxm, gDoxm->oxmLen, &newDoxm->oxmSel))
+                {
+                    OIC_LOG(ERROR, TAG, "Not acceptable request because oxmsel does not support on Server");
+                    ehRet = OC_EH_NOT_ACCEPTABLE;
+                    goto exit;
+                }
                 //Update gDoxm based on newDoxm
                 updateWriteableProperty(newDoxm, gDoxm);