Commit a532ef72 authored by Dmitriy Zhuravlev's avatar Dmitriy Zhuravlev Committed by Randeep

[IOT-2359][IOT-2360][IOT-2364] Separate provisioning with DOS

Restore functions removed in
Add NULL checking for pDev2 in SRPProvisionCredentialsDos

Change-Id: Icf3397247478c97c7029380aadcaa5dd89b42870
Signed-off-by: default avatarDmitriy Zhuravlev <>
Reviewed-on: default avatarjenkins-iotivity <>
Reviewed-by: default avatardongik Lee <>
Reviewed-by: default avatarUze Choi <>
Reviewed-by: default avatarJongmin Choi <>
Reviewed-by: Randeep's avatarRandeep Singh <>
parent 485293de
......@@ -236,6 +236,22 @@ OCStackResult SRPProvisionCredentials(void *ctx,OicSecCredType_t type, size_t ke
const OicSecRole_t *role1,
const OicSecRole_t *role2,
OCProvisionResultCB resultCallback);
* API to provision credential to devices with DOS.
* @param[in] ctx Application context to be returned in result callback.
* @param[in] type Type of credentials to be provisioned to the device.
* @param[in] keySize size of key
* @param[in] pDev1 Pointer to PMOwnedDeviceInfo_t instance, representing the resource to be provisioned.
* @param[in] pDev2 Pointer to PMOwnedDeviceInfo_t instance, representing the resource to be provisioned.
* @param[in] resultCallback callback provided by API user, callback will be called when
* provisioning request recieves a response from first resource server.
* @return OC_STACK_OK in case of success and other value otherwise.
OCStackResult SRPProvisionCredentialsDos(void *ctx,OicSecCredType_t type, size_t keySize,
const OCProvisionDev_t *pDev1,
const OCProvisionDev_t *pDev2,
OCProvisionResultCB resultCallback);
* Function to unlink devices.
......@@ -482,8 +482,8 @@ OCStackResult OCProvisionCredentials(void *ctx, OicSecCredType_t type, size_t ke
const OCProvisionDev_t *pDev2,
OCProvisionResultCB resultCallback)
return SRPProvisionCredentials(ctx, type, keySize,
pDev1, pDev2, NULL, NULL, NULL, resultCallback);
return SRPProvisionCredentialsDos(ctx, type, keySize,
pDev1, pDev2, resultCallback);
......@@ -1275,8 +1275,8 @@ OCStackResult OCProvisionPairwiseDevices(void* ctx, OicSecCredType_t type, size_
link->resultCallback = resultCallback;
link->currentCountResults = 0;
link->resArr = (OCProvisionResult_t*) OICMalloc(sizeof(OCProvisionResult_t)*noOfResults);
res = SRPProvisionCredentials(link, type, keySize,
pDev1, pDev2, NULL, NULL, NULL, &ProvisionCredsCB);
res = SRPProvisionCredentialsDos(link, type, keySize,
pDev1, pDev2, &ProvisionCredsCB);
if (res != OC_STACK_OK)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment