1 /* *****************************************************************
3 * Copyright 2015 Samsung Electronics All Rights Reserved.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
19 * *****************************************************************/
23 #include "ocprovisioningmanager.h"
24 #include "pmutility.h"
25 #include "ownershiptransfermanager.h"
26 #include "oic_malloc.h"
28 #include "secureresourceprovider.h"
29 #include "provisioningdatabasemanager.h"
30 #include "credresource.h"
32 #include "aclresource.h" //Note: SRM internal header
33 #include "pconfresource.h"
37 typedef struct Linkdata Linkdata_t;
41 const OCProvisionDev_t *pDev1;
42 OicSecAcl_t *pDev1Acl;
43 const OCProvisionDev_t *pDev2;
44 OicSecAcl_t *pDev2Acl;
45 OCProvisionResult_t *resArr;
47 int currentCountResults;
48 OCProvisionResultCB resultCallback;
53 * The function is responsible for initializaton of the provisioning manager. It will load
54 * provisioning database which have owned device's list and their linked status.
55 * TODO: In addition, if there is a device(s) which has not up-to-date credentials, this function will
56 * automatically try to update the deivce(s).
58 * @param[in] dbPath file path of the sqlite3 db
60 * @return OC_STACK_OK in case of success and other value otherwise.
62 OCStackResult OCInitPM(const char* dbPath)
64 return PDMInit(dbPath);
68 * The function is responsible for discovery of device is current subnet. It will list
69 * all the device in subnet which are not yet owned. Please call OCInit with OC_CLIENT_SERVER as
72 * @param[in] timeout Timeout in seconds, value till which function will listen to responses from
73 * client before returning the list of devices.
74 * @param[out] ppList List of candidate devices to be provisioned
75 * @return OTM_SUCCESS in case of success and other value otherwise.
77 OCStackResult OCDiscoverUnownedDevices(unsigned short timeout, OCProvisionDev_t **ppList)
79 if( ppList == NULL || *ppList != NULL)
81 return OC_STACK_INVALID_PARAM;
84 return PMDeviceDiscovery(timeout, false, ppList);
88 * The function is responsible for discovery of owned device is current subnet. It will list
89 * all the device in subnet which are owned by calling provisioning client.
91 * @param[in] timeout Timeout in seconds, value till which function will listen to responses from
92 * client before returning the list of devices.
93 * @param[out] ppList List of device owned by provisioning tool.
94 * @return OTM_SUCCESS in case of success and other value otherwise.
96 OCStackResult OCDiscoverOwnedDevices(unsigned short timeout, OCProvisionDev_t **ppList)
98 if( ppList == NULL || *ppList != NULL)
100 return OC_STACK_INVALID_PARAM;
103 return PMDeviceDiscovery(timeout, true, ppList);
107 * API to register for particular OxM.
109 * @param[in] Ownership transfer method.
110 * @param[in] Implementation of callback functions for owership transfer.
111 * @return OC_STACK_OK in case of success and other value otherwise.
113 OCStackResult OCSetOwnerTransferCallbackData(OicSecOxm_t oxm, OTMCallbackData_t* callbackData)
115 if(NULL == callbackData)
117 return OC_STACK_INVALID_PARAM;
120 return OTMSetOwnershipTransferCallbackData(oxm, callbackData);
123 OCStackResult OCDoOwnershipTransfer(void* ctx,
124 OCProvisionDev_t *targetDevices,
125 OCProvisionResultCB resultCallback)
127 if( NULL == targetDevices )
129 return OC_STACK_INVALID_PARAM;
132 return OTMDoOwnershipTransfer(ctx, targetDevices, resultCallback);
136 * This function deletes memory allocated to linked list created by OCDiscover_XXX_Devices API.
138 * @param[in] pList Pointer to OCProvisionDev_t which should be deleted.
140 void OCDeleteDiscoveredDevices(OCProvisionDev_t *pList)
142 PMDeleteDeviceList(pList);
146 * this function sends ACL information to resource.
148 * @param[in] ctx Application context would be returned in result callback.
149 * @param[in] selectedDeviceInfo Selected target device.
150 * @param[in] acl ACL to provision.
151 * @param[in] resultCallback callback provided by API user, callback will be called when provisioning
152 request recieves a response from resource server.
153 * @return OC_STACK_OK in case of success and other value otherwise.
155 OCStackResult OCProvisionACL(void* ctx, const OCProvisionDev_t *selectedDeviceInfo, OicSecAcl_t *acl,
156 OCProvisionResultCB resultCallback)
158 return SRPProvisionACL(ctx, selectedDeviceInfo, acl, resultCallback);
162 * function to provision credential to devices.
164 * @param[in] ctx Application context would be returned in result callback.
165 * @param[in] type Type of credentials to be provisioned to the device.
166 * @param[in] pDev1 Pointer to OCProvisionDev_t instance,respresenting resource to be provsioned.
167 @param[in] pDev2 Pointer to OCProvisionDev_t instance,respresenting resource to be provsioned.
168 * @param[in] resultCallback callback provided by API user, callback will be called when
169 * provisioning request recieves a response from first resource server.
170 * @return OC_STACK_OK in case of success and other value otherwise.
172 OCStackResult OCProvisionCredentials(void *ctx, OicSecCredType_t type, size_t keySize,
173 const OCProvisionDev_t *pDev1,
174 const OCProvisionDev_t *pDev2,
175 OCProvisionResultCB resultCallback)
177 return SRPProvisionCredentials(ctx, type, keySize,
178 pDev1, pDev2, resultCallback);
183 * this function sends Direct-Pairing Configuration to a device.
185 * @param[in] ctx Application context would be returned in result callback.
186 * @param[in] selectedDeviceInfo Selected target device.
187 * @param[in] pconf PCONF pointer.
188 * @param[in] resultCallback callback provided by API user, callback will be called when provisioning
189 request recieves a response from resource server.
190 * @return OC_STACK_OK in case of success and other value otherwise.
192 OCStackResult OCProvisionDirectPairing(void* ctx, const OCProvisionDev_t *selectedDeviceInfo, OicSecPconf_t *pconf,
193 OCProvisionResultCB resultCallback)
195 return SRPProvisionDirectPairing(ctx, selectedDeviceInfo, pconf, resultCallback);
199 * Function to unlink devices.
200 * This function will remove the credential & relationship between the two devices.
202 * @param[in] ctx Application context would be returned in result callback
203 * @param[in] pTargetDev1 first device information to be unlinked.
204 * @param[in] pTargetDev2 second device information to be unlinked.
205 * @param[in] resultCallback callback provided by API user, callback will be called when
206 * device unlink is finished.
207 * @return OC_STACK_OK in case of success and other value otherwise.
209 OCStackResult OCUnlinkDevices(void* ctx,
210 const OCProvisionDev_t* pTargetDev1,
211 const OCProvisionDev_t* pTargetDev2,
212 OCProvisionResultCB resultCallback)
214 OIC_LOG(INFO, TAG, "IN OCUnlinkDevices");
215 OCUuidList_t* idList = NULL;
218 if (!pTargetDev1 || !pTargetDev2 || !resultCallback)
220 OIC_LOG(ERROR, TAG, "OCUnlinkDevices : NULL parameters");
221 return OC_STACK_INVALID_PARAM;
224 // Get linked devices with the first device.
225 OCStackResult res = PDMGetLinkedDevices(&(pTargetDev1->doxm->deviceID), &idList, &numOfDev);
226 if (OC_STACK_OK != res)
228 OIC_LOG(ERROR, TAG, "OCUnlinkDevices : PDMgetOwnedDevices failed");
233 OIC_LOG(DEBUG, TAG, "OCUnlinkDevices : Can not find linked devices");
234 res = OC_STACK_INVALID_PARAM; // Input devices are not linked, No request is made
238 // Check the linked devices contains the second device. If yes send credential DELETE request.
239 OCUuidList_t* curDev = idList;
240 while (NULL != curDev)
242 if (memcmp(pTargetDev2->doxm->deviceID.id, curDev->dev.id, sizeof(curDev->dev.id)) == 0)
244 res = SRPUnlinkDevices(ctx, pTargetDev1, pTargetDev2, resultCallback);
245 if (OC_STACK_OK != res)
247 OIC_LOG(ERROR, TAG, "OCUnlinkDevices : Failed to unlink devices.");
251 curDev = curDev->next;
253 OIC_LOG(DEBUG, TAG, "No matched pair found from provisioning database");
254 res = OC_STACK_INVALID_PARAM; // Input devices are not linked, No request is made
257 OIC_LOG(INFO, TAG, "OUT OCUnlinkDevices");
259 PDMDestoryOicUuidLinkList(idList);
264 * Function to device revocation
265 * This function will remove credential of target device from all devices in subnet.
267 * @param[in] ctx Application context would be returned in result callback
268 * @param[in] waitTimeForOwnedDeviceDiscovery Maximum wait time for owned device discovery.(seconds)
269 * @param[in] pTargetDev Device information to be revoked.
270 * @param[in] resultCallback callback provided by API user, callback will be called when
271 * credential revocation is finished.
272 * @return OC_STACK_OK in case of success and other value otherwise.
274 OCStackResult OCRemoveDevice(void* ctx, unsigned short waitTimeForOwnedDeviceDiscovery,
275 const OCProvisionDev_t* pTargetDev,
276 OCProvisionResultCB resultCallback)
278 OIC_LOG(INFO, TAG, "IN OCRemoveDevice");
279 OCStackResult res = OC_STACK_ERROR;
280 if (!pTargetDev || !resultCallback || 0 == waitTimeForOwnedDeviceDiscovery)
282 OIC_LOG(INFO, TAG, "OCRemoveDevice : Invalied parameters");
283 return OC_STACK_INVALID_PARAM;
286 // Send DELETE requests to linked devices
287 OCStackResult resReq = OC_STACK_ERROR; // Check that we have to wait callback or not.
288 resReq = SRPRemoveDevice(ctx, waitTimeForOwnedDeviceDiscovery, pTargetDev, resultCallback);
289 if (OC_STACK_OK != resReq)
291 if (OC_STACK_CONTINUE == resReq)
293 OIC_LOG(DEBUG, TAG, "OCRemoveDevice : Revoked device has no linked device except PT.");
297 OIC_LOG(ERROR, TAG, "OCRemoveDevice : Failed to invoke SRPRemoveDevice");
303 // Remove credential of revoked device from SVR database
304 const OicSecCred_t *cred = NULL;
305 cred = GetCredResourceData(&pTargetDev->doxm->deviceID);
308 OIC_LOG(ERROR, TAG, "OCRemoveDevice : Failed to get credential of remove device.");
312 res = RemoveCredential(&cred->subject);
313 if (res != OC_STACK_RESOURCE_DELETED)
315 OIC_LOG(ERROR, TAG, "OCRemoveDevice : Failed to remove credential.");
320 * Change the device status as stale status.
321 * If all request are successed, this device information will be deleted.
323 res = PDMSetDeviceStale(&pTargetDev->doxm->deviceID);
324 if (res != OC_STACK_OK)
326 OIC_LOG(ERROR, TAG, "OCRemoveDevice : Failed to set device status as stale");
330 // TODO: We need to add new mechanism to clean up the stale state of the device.
334 //Close the DTLS session of the removed device.
335 CAEndpoint_t* endpoint = (CAEndpoint_t *)&pTargetDev->endpoint;
336 endpoint->port = pTargetDev->securePort;
337 CAResult_t caResult = CACloseDtlsSession(endpoint);
338 if(CA_STATUS_OK != caResult)
340 OIC_LOG_V(WARNING, TAG, "OCRemoveDevice : Failed to close DTLS session : %d", caResult);
344 * If there is no linked device, PM does not send any request.
345 * So we should directly invoke the result callback to inform the result of OCRemoveDevice.
347 if(OC_STACK_CONTINUE == res)
351 resultCallback(ctx, 0, NULL, false);
357 OIC_LOG(INFO, TAG, "OUT OCRemoveDevice");
363 * Internal Function to update result in link result array.
365 static void UpdateLinkResults(Linkdata_t *link, int device, OCStackResult stackresult)
368 OIC_LOG_V(INFO,TAG,"value of link->currentCountResults is %d",link->currentCountResults);
371 memcpy(link->resArr[(link->currentCountResults)].deviceId.id, link->pDev1->doxm->deviceID.id,UUID_LENGTH);
375 memcpy(link->resArr[(link->currentCountResults)].deviceId.id, link->pDev2->doxm->deviceID.id,UUID_LENGTH);
377 link->resArr[(link->currentCountResults)].res = stackresult;
378 ++(link->currentCountResults);
383 * Callback to handle ACL provisioning for device 2.
385 static void AclProv2CB(void* ctx, int nOfRes, OCProvisionResult_t *arr, bool hasError)
390 OIC_LOG(ERROR,TAG,"Context is Null in ACLProv 2");
394 Linkdata_t *link = (Linkdata_t*)ctx;
395 OCProvisionResultCB resultCallback = link->resultCallback;
400 UpdateLinkResults(link, 2,arr[0].res);
401 OIC_LOG(ERROR,TAG,"Error occured while ACL provisioning device 1");
402 ((OCProvisionResultCB)(resultCallback))(link->ctx, link->currentCountResults,
405 OICFree(link->resArr);
409 UpdateLinkResults(link, 2, arr[0].res);
410 ((OCProvisionResultCB)(resultCallback))(link->ctx, link->currentCountResults,
413 OICFree(link->resArr);
419 * Callback to handle ACL provisioning for device 1
421 static void AclProv1CB(void* ctx, int nOfRes, OCProvisionResult_t *arr, bool hasError)
426 OIC_LOG(ERROR,TAG,"Context is Null in ACLProv1");
430 Linkdata_t *link = (Linkdata_t*)ctx;
431 OCProvisionResultCB resultCallback = link->resultCallback;
435 OIC_LOG(ERROR,TAG,"Error occured while ACL provisioning device 1");
436 UpdateLinkResults(link, 1, arr[0].res);
437 ((OCProvisionResultCB)(resultCallback))(link->ctx, link->currentCountResults,
440 OICFree(link->resArr);
444 UpdateLinkResults(link, 1, arr[0].res);
445 if (NULL != link->pDev2Acl)
447 OCStackResult res = SRPProvisionACL(ctx, link->pDev2, link->pDev2Acl, &AclProv2CB);
448 if (OC_STACK_OK!=res)
450 UpdateLinkResults(link, 2, res);
451 ((OCProvisionResultCB)(resultCallback))(link->ctx, link->currentCountResults,
459 ((OCProvisionResultCB)(resultCallback))(link->ctx, link->currentCountResults,
462 OICFree(link->resArr);
470 * Callback to handle credential provisioning.
472 static void ProvisionCredsCB(void* ctx, int nOfRes, OCProvisionResult_t *arr, bool hasError)
476 OIC_LOG(ERROR,TAG,"Error occured while credential provisioning");
479 Linkdata_t *link = (Linkdata_t*)ctx;
480 OCProvisionResultCB resultCallback = link->resultCallback;
481 OIC_LOG_V(INFO, TAG, "has error returned %d",hasError);
482 UpdateLinkResults(link, 1, arr[0].res);
483 UpdateLinkResults(link, 2, arr[1].res);
486 OIC_LOG(ERROR,TAG,"Error occured while credential provisioning");
487 ((OCProvisionResultCB)(resultCallback))(link->ctx, nOfRes,
490 OICFree(link->resArr);
494 if (NULL != link->pDev1Acl)
497 OCStackResult res = SRPProvisionACL(ctx, link->pDev1, link->pDev1Acl, &AclProv1CB);
498 if (OC_STACK_OK!=res)
500 OIC_LOG(ERROR, TAG, "Error while provisioning ACL for device 1");
501 UpdateLinkResults(link, 1, res);
502 ((OCProvisionResultCB)(resultCallback))(link->ctx, link->currentCountResults,
505 OICFree(link->resArr);
509 else if (NULL!=link->pDev2Acl)
511 OIC_LOG(ERROR, TAG, "ACL for device 1 is NULL");
512 OCStackResult res = SRPProvisionACL(ctx, link->pDev2, link->pDev2Acl, &AclProv2CB);
513 if (OC_STACK_OK!=res)
515 OIC_LOG(ERROR, TAG, "Error while provisioning ACL for device 2");
516 UpdateLinkResults(link, 2, res);
517 ((OCProvisionResultCB)(resultCallback))(link->ctx, link->currentCountResults,
520 OICFree(link->resArr);
526 OIC_LOG(INFO, TAG, "ACLs of both devices are NULL");
527 ((OCProvisionResultCB)(resultCallback))(link->ctx, link->currentCountResults,
530 OICFree(link->resArr);
536 * function to provision credentials between two devices and ACLs for the devices who act as a server.
538 * @param[in] ctx Application context would be returned in result callback.
539 * @param[in] type Type of credentials to be provisioned to the device.
540 * @param[in] pDev1 Pointer to OCProvisionDev_t instance,respresenting resource to be provsioned.
541 * @param[in] acl ACL for device 1. If this is not required set NULL.
542 * @param[in] pDev2 Pointer to OCProvisionDev_t instance,respresenting resource to be provsioned.
543 * @param[in] acl ACL for device 2. If this is not required set NULL.
544 * @param[in] resultCallback callback provided by API user, callback will be called when
545 * provisioning request recieves a response from first resource server.
546 * @return OC_STACK_OK in case of success and other value otherwise.
548 OCStackResult OCProvisionPairwiseDevices(void* ctx, OicSecCredType_t type, size_t keySize,
549 const OCProvisionDev_t *pDev1, OicSecAcl_t *pDev1Acl,
550 const OCProvisionDev_t *pDev2, OicSecAcl_t *pDev2Acl,
551 OCProvisionResultCB resultCallback)
554 if (!pDev1 || !pDev2 || !resultCallback)
556 OIC_LOG(ERROR, TAG, "OCProvisionPairwiseDevices : Invalid parameters");
557 return OC_STACK_INVALID_PARAM;
559 if (!(keySize == OWNER_PSK_LENGTH_128 || keySize == OWNER_PSK_LENGTH_256))
561 OIC_LOG(INFO, TAG, "OCProvisionPairwiseDevices : Invalid key size");
562 return OC_STACK_INVALID_PARAM;
565 OIC_LOG(DEBUG, TAG, "Checking link in DB");
566 bool linkExists = true;
567 OCStackResult res = PDMIsLinkExists(&pDev1->doxm->deviceID, &pDev2->doxm->deviceID, &linkExists);
568 if(res != OC_STACK_OK)
570 OIC_LOG(ERROR, TAG, "Internal Error Occured");
575 OIC_LOG(ERROR, TAG, "Link already exists");
576 return OC_STACK_INVALID_PARAM;
579 int noOfResults = 2; // Initial Value
580 if (NULL != pDev1Acl)
584 if (NULL != pDev2Acl)
588 Linkdata_t *link = (Linkdata_t*) OICMalloc(sizeof(Linkdata_t));
591 OIC_LOG(ERROR, TAG, "Failed to memory allocation");
592 return OC_STACK_NO_MEMORY;
594 OIC_LOG_V(INFO,TAG, "Maximum no od results %d",noOfResults);
597 link->pDev1Acl = pDev1Acl;
599 link->pDev2Acl = pDev2Acl;
601 // 1 call for each device for credential provisioning. implict call by SRPProvisioning credential
602 // 1 call for ACL provisioning for device 1 and 1 call for ACL provisioning for device 2.
603 link->numOfResults = noOfResults;
604 link->resultCallback = resultCallback;
605 link->currentCountResults = 0;
606 link->resArr = (OCProvisionResult_t*) OICMalloc(sizeof(OCProvisionResult_t)*noOfResults);
607 res = SRPProvisionCredentials(link, type, keySize,
608 pDev1, pDev2, &ProvisionCredsCB);
609 if (res != OC_STACK_OK)
611 OICFree(link->resArr);
618 OCStackResult OCGetDevInfoFromNetwork(unsigned short waittime,
619 OCProvisionDev_t** pOwnedDevList,
620 OCProvisionDev_t** pUnownedDevList)
622 //TODO will be replaced by more efficient logic
623 if (pOwnedDevList == NULL || *pOwnedDevList != NULL || pUnownedDevList == NULL
624 || *pUnownedDevList != NULL)
626 return OC_STACK_INVALID_PARAM;
629 // Code for unowned discovery
630 OCProvisionDev_t *unownedDevice = NULL;
631 OCStackResult res = OCDiscoverUnownedDevices(waittime/2, &unownedDevice);
632 if (OC_STACK_OK != res)
634 OIC_LOG(ERROR,TAG, "Error in unowned discovery");
638 // Code for owned discovery
639 OCProvisionDev_t *ownedDevice = NULL;
640 res = OCDiscoverOwnedDevices(waittime/2, &ownedDevice);
641 if (OC_STACK_OK != res)
643 OIC_LOG(ERROR,TAG, "Error in owned discovery");
644 PMDeleteDeviceList(unownedDevice);
648 // Code to get list of all the owned devices.
649 OCUuidList_t *uuidList = NULL;
650 size_t numOfDevices = 0;
651 res = PDMGetOwnedDevices(&uuidList, &numOfDevices);
652 if (OC_STACK_OK != res)
654 OIC_LOG(ERROR, TAG, "Error while getting info from DB");
655 PMDeleteDeviceList(unownedDevice);
656 PMDeleteDeviceList(ownedDevice);
660 // Code to compare devices in owned list and deviceid from DB.
661 OCProvisionDev_t* pCurDev = ownedDevice;
662 size_t deleteCnt = 0;
665 if(true == PMDeleteFromUUIDList(uuidList, &pCurDev->doxm->deviceID))
669 pCurDev = pCurDev->next;
671 // If there is no remaind device in uuidList, we have to assign NULL to prevent free.
672 if (deleteCnt == numOfDevices)
676 // Code to add information of the devices which are currently off in owned list.
677 OCUuidList_t *powerOffDeviceList = uuidList;
678 while (powerOffDeviceList)
680 OCProvisionDev_t *ptr = (OCProvisionDev_t *)OICCalloc(1, sizeof (OCProvisionDev_t));
683 OIC_LOG(ERROR,TAG,"Fail to allocate memory");
684 PMDeleteDeviceList(unownedDevice);
685 PMDeleteDeviceList(ownedDevice);
686 OCDeleteUuidList(uuidList);
687 return OC_STACK_NO_MEMORY;
690 ptr->doxm = (OicSecDoxm_t*)OICCalloc(1, sizeof(OicSecDoxm_t));
691 if (NULL == ptr->doxm)
693 OIC_LOG(ERROR,TAG,"Fail to allocate memory");
694 PMDeleteDeviceList(unownedDevice);
695 PMDeleteDeviceList(ownedDevice);
696 OCDeleteUuidList(uuidList);
698 return OC_STACK_NO_MEMORY;
701 memcpy(ptr->doxm->deviceID.id, powerOffDeviceList->dev.id, sizeof(ptr->doxm->deviceID.id));
703 ptr->devStatus = DEV_STATUS_OFF;
704 LL_PREPEND(ownedDevice, ptr);
705 powerOffDeviceList = powerOffDeviceList->next;
708 OCDeleteUuidList(uuidList);
709 *pOwnedDevList = ownedDevice;
710 *pUnownedDevList = unownedDevice;
714 OCStackResult OCGetLinkedStatus(const OicUuid_t* uuidOfDevice, OCUuidList_t** uuidList,
715 size_t* numOfDevices)
717 return PDMGetLinkedDevices(uuidOfDevice, uuidList, numOfDevices);
720 void OCDeleteUuidList(OCUuidList_t* pList)
722 PDMDestoryOicUuidLinkList(pList);
726 * This function deletes ACL data.
728 * @param pAcl Pointer to OicSecAcl_t structure.
730 void OCDeleteACLList(OicSecAcl_t* pAcl)
736 * This function deletes PDACL data.
738 * @param pPdAcl Pointer to OicSecPdAcl_t structure.
740 void OCDeletePdAclList(OicSecPdAcl_t* pPdAcl)
742 FreePdAclList(pPdAcl);
748 * this function sends CRL information to resource.
750 * @param[in] ctx Application context would be returned in result callback.
751 * @param[in] selectedDeviceInfo Selected target device.
752 * @param[in] crl CRL to provision.
753 * @param[in] resultCallback callback provided by API user, callback will be called when provisioning
754 request recieves a response from resource server.
755 * @return OC_STACK_OK in case of success and other value otherwise.
757 OCStackResult OCProvisionCRL(void* ctx, const OCProvisionDev_t *selectedDeviceInfo, OicSecCrl_t *crl,
758 OCProvisionResultCB resultCallback)
760 return SRPProvisionCRL(ctx, selectedDeviceInfo, crl, resultCallback);
762 #endif // __WITH_X509__