76 lines
2.3 KiB
C
76 lines
2.3 KiB
C
/****************************************************************************
|
|
|
|
Copyright(c) 2019 by Aerospace C.Power (Chongqing) Microelectronics. ALL RIGHTS RESERVED.
|
|
|
|
This Information is proprietary to Aerospace C.Power (Chongqing) Microelectronics and MAY NOT
|
|
be copied by any method or incorporated into another program without
|
|
the express written consent of Aerospace C.Power. This Information or any portion
|
|
thereof remains the property of Aerospace C.Power. The Information contained herein
|
|
is believed to be accurate and Aerospace C.Power assumes no responsibility or
|
|
liability for its use in any way and conveys no license or title under
|
|
any patent or copyright and makes no representation or warranty that this
|
|
Information is free from patent or copyright infringement.
|
|
|
|
****************************************************************************/
|
|
|
|
#ifndef CVG_SEC_AUTH_DAK_CCO_H
|
|
#define CVG_SEC_AUTH_DAK_CCO_H
|
|
|
|
/* os shim includes */
|
|
#include "os_types.h"
|
|
|
|
/* public api includes */
|
|
#include "plc_fr.h"
|
|
|
|
/* common includes */
|
|
#include "iot_errno.h"
|
|
#include "iot_utils.h"
|
|
|
|
/* cvg internal includes */
|
|
#include "cvg_api.h"
|
|
#include "cvg.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#if (PLC_SUPPORT_CCO_ROLE && (PLC_SUPPORT_AUTH_TYPE == PLC_AUTH_TYPE_DAK))
|
|
|
|
/*
|
|
* @brief cvg_sec_auth_dak_cco_init() - init authorized dak state info
|
|
* @param vdev: pointer to vdev
|
|
* @param cfg: pointer of vdev configuration
|
|
*
|
|
* @return 0 - for success case
|
|
* @return otherwise - error code
|
|
*/
|
|
uint32_t cvg_sec_auth_dak_cco_init(cvg_vdev_t *vdev, cvg_vdev_cfg_t *cfg);
|
|
|
|
/*
|
|
* @brief cvg_sec_auth_dak_cco_deinit() - deinit authorized dak state info
|
|
* @param vdev: pointer to vdev
|
|
*/
|
|
void cvg_sec_auth_dak_cco_deinit(cvg_vdev_t *vdev);
|
|
|
|
/*
|
|
* @brief cvg_sec_auth_dak_cco_reset() - reset authorized dak state info
|
|
* @param vdev: pointer to vdev
|
|
*/
|
|
void cvg_sec_auth_dak_cco_reset(cvg_vdev_t *vdev);
|
|
|
|
#else /* PLC_SUPPORT_CCO_ROLE && (PLC_SUPPORT_AUTH_TYPE == PLC_AUTH_TYPE_DAK) */
|
|
|
|
#define cvg_sec_auth_dak_cco_init(vdev, cfg) (0)
|
|
|
|
#define cvg_sec_auth_dak_cco_deinit(vdev)
|
|
|
|
#define cvg_sec_auth_dak_cco_reset(vdev)
|
|
|
|
#endif /* PLC_SUPPORT_CCO_ROLE && (PLC_SUPPORT_AUTH_TYPE == PLC_AUTH_TYPE_DAK) */
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* CVG_SEC_AUTH_DAK_CCO_H */
|