X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=resource%2Fcsdk%2Fsecurity%2Finclude%2Finternal%2Fpsinterface.h;fp=resource%2Fcsdk%2Fsecurity%2Finclude%2Finternal%2Focsecurityinternal.h;h=b48c67466ab560a280a396ecdb03c8faa5020fd2;hb=8c01dff2c5bc5496f7dc1632c498943ec6ecb015;hp=d080546a23d354f35fb49ab9b97f003300f6cab0;hpb=935fdb9b67b6c10d007e652e9e2e028fd6ccfe09;p=platform%2Fupstream%2Fiotivity.git diff --git a/resource/csdk/security/include/internal/ocsecurityinternal.h b/resource/csdk/security/include/internal/psinterface.h similarity index 50% rename from resource/csdk/security/include/internal/ocsecurityinternal.h rename to resource/csdk/security/include/internal/psinterface.h index d080546..b48c674 100644 --- a/resource/csdk/security/include/internal/ocsecurityinternal.h +++ b/resource/csdk/security/include/internal/psinterface.h @@ -1,6 +1,6 @@ //****************************************************************** // -// Copyright 2014 Intel Mobile Communications GmbH All Rights Reserved. +// Copyright 2015 Intel Mobile Communications GmbH All Rights Reserved. // //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // @@ -18,35 +18,29 @@ // //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -#ifndef OC_SECURITY_INTERNAL_H -#define OC_SECURITY_INTERNAL_H - -#include "ocsecurityconfig.h" +#ifndef IOTVT_SRM_PSI_H +#define IOTVT_SRM_PSI_H /** - * This callback is used by lower stack (i.e. CA layer) to retrieve PSK - * credentials from RI security layer. - * - * Note: When finished, caller should initialize memory to zeroes and - * invoke OCFree to delete @p credInfo. + * Reads the Secure Virtual Database from PS into dynamically allocated + * memory buffer. * - * @param credInfo - * binary blob containing PSK credentials + * @note Caller of this method MUST use OCFree() method to release memory + * referenced by return value. * - * @retval none + * @retval reference to memory buffer containing SVR database. */ -#ifdef __WITH_DTLS__ -void GetDtlsPskCredentials(CADtlsPskCredsBlob_t **credInfo); -#endif //__WITH_DTLS__ - +char * GetSVRDatabase(); /** - * This internal API removes/clears the global variable holding the security - * config data. This needs to be invoked when OIC stack is shutting down. + * This method is used by a entity handlers of SVR's to update + * SVR database. * - * @retval none + * @param rsrcName string denoting the SVR name ("acl", "cred", "pstat" etc). + * @param jsonObj JSON object containing the SVR contents. + * + * @retval OC_STACK_OK for Success, otherwise some error value */ -void DeinitOCSecurityInfo(); - -#endif //OC_SECURITY_INTERNAL_H +OCStackResult UpdateSVRDatabase(const char* rsrcName, cJSON* jsonObj); +#endif //IOTVT_SRM_PSI_H