[IOT-3001]Fix rownerId in PostOwnerCredential 39/24239/3
authorAleksey Volkov <a.volkov@samsung.com>
Wed, 28 Feb 2018 12:58:08 +0000 (14:58 +0200)
committerNathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Thu, 1 Mar 2018 18:11:02 +0000 (18:11 +0000)
Fix rownerId value in PostOwnerCredential request

Change-Id: I8a18fa99d19709f5ca260fc4ff68b3497e110687
Signed-off-by: Aleksey Volkov <a.volkov@samsung.com>
resource/csdk/security/provisioning/src/ownershiptransfermanager.c

index b77e612..c839967 100644 (file)
@@ -1667,7 +1667,7 @@ static OCStackResult PostOwnerCredential(OTMContext_t* otmCtx)
 
         int secureFlag = 0;
         //Send owner credential to new device : POST /oic/sec/cred [ owner credential ]
-        if (OC_STACK_OK != CredToCBORPayload(&newCredential, &secPayload->securityData,
+        if (OC_STACK_OK != CredToCBORPayloadWithRowner(&newCredential, &credSubjectId, &secPayload->securityData,
                                         &secPayload->payloadSize, secureFlag))
         {
             OICFree(secPayload);