X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=resource%2Fcsdk%2Fsecurity%2Fprovisioning%2Finclude%2Finternal%2Fownershiptransfermanager.h;h=1d0aa244de11c31368af438a2ab5de767100043f;hb=3c093548382bb2542c87a67e6e5fa32552c29cb3;hp=2df0540b7b365f279d2c04fa64a488f831f5a849;hpb=edcfc3d2329da7b914771c0dcff5f42c9b74fd93;p=platform%2Fupstream%2Fiotivity.git diff --git a/resource/csdk/security/provisioning/include/internal/ownershiptransfermanager.h b/resource/csdk/security/provisioning/include/internal/ownershiptransfermanager.h index 2df0540..1d0aa24 100644 --- a/resource/csdk/security/provisioning/include/internal/ownershiptransfermanager.h +++ b/resource/csdk/security/provisioning/include/internal/ownershiptransfermanager.h @@ -31,7 +31,7 @@ extern "C" { #endif // __cplusplus #define OXM_STRING_MAX_LENGTH 32 -#define WRONG_PIN_MAX_ATTEMP 5 +#define WRONG_PIN_MAX_ATTEMP 1 typedef struct OTMCallbackData OTMCallbackData_t; typedef struct OTMContext OTMContext_t; @@ -123,6 +123,38 @@ OCStackResult OTMSetOwnershipTransferCallbackData(OicSecOxm_t oxm, OTMCallbackDa */ OCStackResult OTMSetOTCallback(OicSecOxm_t oxm, OTMCallbackData_t* callbacks); +/** + * Function to save the result of provisioning. + * + * @param[in,out] otmCtx Context value of ownership transfer. + * @param[in] res result of provisioning + */ +void SetResult(OTMContext_t* otmCtx, const OCStackResult res); + +/** + * Function to select appropriate security provisioning method. + * + * @param[in] supportedMethods Array of supported methods + * @param[in] numberOfMethods number of supported methods + * @param[out] selectedMethod Selected methods + * @param[in] ownerType type of owner device (SUPER_OWNER or SUB_OWNER) + * @return OC_STACK_OK on success + */ +OCStackResult OTMSelectOwnershipTransferMethod(const OicSecOxm_t *supportedMethods, + size_t numberOfMethods, OicSecOxm_t *selectedMethod, OwnerType_t ownerType); + +/** + * This function configures SVR DB as self-ownership. + * + *@return OC_STACK_OK in case of successful configue and other value otherwise. + */ +OCStackResult ConfigSelfOwnership(void); + +/** + * API to terminate the OTM process when terminating OCStack + */ +void OTMTerminate(); + #ifdef __cplusplus } #endif