From ed857b431f4f6914416d2951505a33943f53cce2 Mon Sep 17 00:00:00 2001 From: Nathan Heldt-Sheller Date: Fri, 4 Nov 2016 14:13:00 -0700 Subject: [PATCH] Change doxm.deviceuuid from R-only to RW in doxm entity handler. CTT testing revealed a bug in 1.2 (and a matching bug in the 1.1 schema) that had marked deviceuuid as R-only. However this is not correct: deviceuuid must be Writeable to allow the OBT to update with a new UUID during onboarding. This has been verified by SecWG and needs to be fixed in 1.2. Patch #2: added a line to also copy deviceuuid in updateWriteableProperty() function Change-Id: Icff6d978f5a12af021d557a5c71f25a4e9957ba2 Signed-off-by: Nathan Heldt-Sheller Reviewed-on: https://gerrit.iotivity.org/gerrit/14053 Tested-by: jenkins-iotivity Reviewed-by: Jongmin Choi Reviewed-by: Kevin Kane Reviewed-by: Uze Choi Reviewed-by: Randeep Singh --- resource/csdk/security/src/doxmresource.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/resource/csdk/security/src/doxmresource.c b/resource/csdk/security/src/doxmresource.c index 819a6b9..28f9e38 100644 --- a/resource/csdk/security/src/doxmresource.c +++ b/resource/csdk/security/src/doxmresource.c @@ -543,11 +543,6 @@ static OCStackResult CBORPayloadToDoxmBin(const uint8_t *cborPayload, size_t siz VERIFY_SUCCESS(TAG, OC_STACK_OK == ret, ERROR); OICFree(strUuid); strUuid = NULL; - - if (roParsed) - { - *roParsed = true; - } } else { @@ -873,6 +868,9 @@ static void updateWriteableProperty(const OicSecDoxm_t* src, OicSecDoxm_t* dst) //update rowner memcpy(&(dst->rownerID), &(src->rownerID), sizeof(OicUuid_t)); + //update deviceuuid + memcpy(&(dst->deviceID), &(src->deviceID), sizeof(OicUuid_t)); + //Update owned status if(dst->owned != src->owned) { -- 2.7.4