From: Vitalii Irkha Date: Thu, 31 Oct 2019 11:29:02 +0000 (+0200) Subject: Fix OTM issue during DTLS handshake X-Git-Tag: accepted/tizen/unified/20191119.083949~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F86%2F217886%2F1;p=platform%2Fupstream%2Fiotivity.git Fix OTM issue during DTLS handshake Revert all secure resources after DTLS handshake error https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/592/commits/ba8ed7dda2f9516ed446a65b877f26a506567491 (cherry-picked from ba8ed7dda2f9516ed446a65b877f26a506567491) Change-Id: I3a94587fe5a31f5c6f889c74cbbb4ea0a293fbf6 Signed-off-by: Vitalii Irkha Signed-off-by: Sudipto Bal --- diff --git a/resource/csdk/security/src/srmutility.c b/resource/csdk/security/src/srmutility.c index 1b8cd21..950e6bb 100644 --- a/resource/csdk/security/src/srmutility.c +++ b/resource/csdk/security/src/srmutility.c @@ -320,9 +320,8 @@ static void DTLSHandshakeServerCB(const CAEndpoint_t *endpoint, const CAErrorInf if (CA_STATUS_OK != info->result) { OIC_LOG(ERROR, TAG, "Failed to establish a secure session with owner device."); - OIC_LOG(ERROR, TAG, "Doxm/Pstat resource will be reverted to init state."); - RestoreDoxmToInitState(); - RestorePstatToInitState(); + ResetSecureResourceInPS(); + OIC_LOG(INFO, TAG, "Secure Resources reverted."); InvokeOtmEventHandler(endpoint->addr, endpoint->port, NULL, OIC_OTM_ERROR); } }