Bug fixed for CON_MFG_CERT
authorjs126.lee <js126.lee@samsung.com>
Wed, 28 Dec 2016 10:00:49 +0000 (19:00 +0900)
committerRandeep Singh <randeep.s@samsung.com>
Mon, 2 Jan 2017 08:18:18 +0000 (08:18 +0000)
Issue : In case of CON_MFG_CERT, psk_info_callback does not revert after OTM.

Patch 1: Upload patch
Patch 2,3: Aplly this patch to server side.
Patch 4: Re-try jenkis build

Change-Id: Ib850d79cc9ef78dad5c15c97f6dc2cd805b9c7d6
Signed-off-by: js126.lee <js126.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15997
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Chul Lee <chuls.lee@samsung.com>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
(cherry picked from commit df2b9cf5a6191c8118d7cd890922531811fdcb4c)
Reviewed-on: https://gerrit.iotivity.org/gerrit/16033

resource/csdk/security/provisioning/src/ownershiptransfermanager.c
resource/csdk/security/src/doxmresource.c

index 69c8ccc..8dc24ec 100644 (file)
@@ -442,7 +442,8 @@ static void SetResult(OTMContext_t* otmCtx, const OCStackResult res)
         OicUuid_t emptyUuid = { .id={0}};
         SetUuidForPinBasedOxm(&emptyUuid);
     }
-    else if(OIC_MANUFACTURER_CERTIFICATE == otmCtx->selectedDeviceInfo->doxm->oxmSel)
+    else if(OIC_MANUFACTURER_CERTIFICATE == otmCtx->selectedDeviceInfo->doxm->oxmSel ||
+                        OIC_CON_MFG_CERT == otmCtx->selectedDeviceInfo->doxm->oxmSel)
     {
         //Revert back certificate related callbacks.
         if(CA_STATUS_OK != CAregisterPkixInfoHandler(GetPkixInfo))
index 54e3c6b..b427399 100644 (file)
@@ -1430,7 +1430,8 @@ static OCEntityHandlerResult HandleDoxmPostRequest(OCEntityHandlerRequest * ehRe
                     ehRet = OC_EH_ERROR;
                 }
 #if defined(__WITH_DTLS__) || defined (__WITH_TLS__)
-                if (OIC_MANUFACTURER_CERTIFICATE == gDoxm->oxmSel)
+                if (OIC_MANUFACTURER_CERTIFICATE == gDoxm->oxmSel ||
+                                            OIC_CON_MFG_CERT== gDoxm->oxmSel)
                 {
                     CAregisterPkixInfoHandler(GetPkixInfo);
                     CAregisterGetCredentialTypesHandler(InitCipherSuiteList);