/**************************************************************************** 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_CA_CCO_H #define CVG_SEC_AUTH_CA_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_CA)) /* * @brief cvg_sec_auth_ca_cco_init() - init authorized ca 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_ca_cco_init(cvg_vdev_t *vdev, cvg_vdev_cfg_t *cfg); /* * @brief cvg_sec_auth_ca_cco_deinit() - deinit authorized ca state info * @param vdev: pointer to vdev */ void cvg_sec_auth_ca_cco_deinit(cvg_vdev_t *vdev); /* * @brief cvg_sec_auth_ca_cco_reset() - reset authorized ca state info * @param sec: pointer to sec vdev * @param cfg: pointer of vdev configuration */ void cvg_sec_auth_ca_cco_reset(cvg_sec_vdev_t *sec, cvg_vdev_cfg_t *cfg); #else /* PLC_SUPPORT_CCO_ROLE && (PLC_SUPPORT_AUTH_TYPE == PLC_AUTH_TYPE_CA) */ #define cvg_sec_auth_ca_cco_init(vdev, cfg) (0) #define cvg_sec_auth_ca_cco_deinit(vdev) #define cvg_sec_auth_ca_cco_reset(sec, cfg) #endif /* PLC_SUPPORT_CCO_ROLE && (PLC_SUPPORT_AUTH_TYPE == PLC_AUTH_TYPE_CA) */ #ifdef __cplusplus } #endif #endif /* CVG_SEC_AUTH_CA_CCO_H */