Replace API's for reverting all secure resources 43/217943/1
authorVitalii Irkha <v.irkha@samsung.com>
Fri, 8 Nov 2019 10:38:35 +0000 (12:38 +0200)
committerSudipto Bal <sudipto.bal@samsung.com>
Mon, 18 Nov 2019 02:37:27 +0000 (11:37 +0900)
Call ResetSecureResourceInPS() instead of RestoreDoxmToInitState() and RestorePstatToInitState()

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/599/commits/f8d712a5ee2cf1b58736fccb2cc168a93fc1c0c2
(cherry-picked from f8d712a5ee2cf1b58736fccb2cc168a93fc1c0c2)

Change-Id: I7d26a94cdf76eba05959d378a2839cbd51512c87
Signed-off-by: Vitalii Irkha <v.irkha@samsung.com>
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
resource/csdk/security/src/credresource.c

index 40aab22..e455f13 100644 (file)
@@ -2035,8 +2035,7 @@ static OCEntityHandlerResult HandlePostRequest(OCEntityHandlerRequest * ehReques
                             InvokeOtmEventHandler(ehRequest->devAddr.addr, ehRequest->devAddr.port,
                                                   NULL, OIC_OTM_ERROR);
 #endif
-                            RestoreDoxmToInitState();
-                            RestorePstatToInitState();
+                            ResetSecureResourceInPS();
                             OIC_LOG(WARNING, TAG, "DOXM will be reverted.");
                         }
                     }