From: Chul Lee Date: Tue, 20 Sep 2016 11:23:19 +0000 (+0900) Subject: Add function to unset the PIN related user callback. X-Git-Tag: 1.3.0~1054^2~68 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3a92e3476f2009b646d4fc02818e456c74a0e757;p=platform%2Fupstream%2Fiotivity.git Add function to unset the PIN related user callback. Change-Id: I4dc3d01d6d11de187aaddd3f556135d516d32028 Signed-off-by: Chul Lee Reviewed-on: https://gerrit.iotivity.org/gerrit/11987 Tested-by: jenkins-iotivity Reviewed-by: Randeep Singh --- diff --git a/resource/csdk/security/include/pinoxmcommon.h b/resource/csdk/security/include/pinoxmcommon.h index f9b9178..0432c38 100644 --- a/resource/csdk/security/include/pinoxmcommon.h +++ b/resource/csdk/security/include/pinoxmcommon.h @@ -66,6 +66,18 @@ void SetGetPreconfigPinCB(InputPinCallback pinCB); #endif //_ENABLE_MULTIPLE_OWNER_ /** + * Function to unset the input PIN callback. + * NOTE : Do not call this function while PIN based ownership transfer. + */ +void UnsetInputPinCB(); + +/** + * Function to unset the PIN generation callback. + * NOTE : Do not call this function while PIN based ownership transfer. + */ +void UnsetGeneratePinCB(); + +/** * Function to generate random PIN. * This function will send generated PIN to user via callback. * diff --git a/resource/csdk/security/src/oxmpincommon.c b/resource/csdk/security/src/oxmpincommon.c index 569b7d1..450d4bf 100644 --- a/resource/csdk/security/src/oxmpincommon.c +++ b/resource/csdk/security/src/oxmpincommon.c @@ -67,6 +67,16 @@ void SetGeneratePinCB(GeneratePinCallback pinCB) gGenPinCallback = pinCB; } +void UnsetInputPinCB() +{ + gInputPinCallback = NULL; +} + +void UnsetGeneratePinCB() +{ + gGenPinCallback = NULL; +} + OCStackResult GeneratePin(char* pinBuffer, size_t bufferSize) { if(!pinBuffer)