85 lines
2.4 KiB
C
85 lines
2.4 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_INTERNAL_H
|
|
#define CVG_SEC_AUTH_INTERNAL_H
|
|
|
|
/* os shim includes */
|
|
#include "os_types.h"
|
|
|
|
/* public api includes */
|
|
#include "plc_fr.h"
|
|
#include "iot_oem.h"
|
|
/* public api includes */
|
|
#include "cvg.h"
|
|
#include "cvg_sec_wl.h"
|
|
#include "cvg_sec_auth_dak_internal.h"
|
|
#include "cvg_sec_auth_ca_internal.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/* define auth request and response default tx retry count for each msdu */
|
|
#define CVG_SEC_AUTH_TX_RETRY_CNT 5
|
|
|
|
#if PLC_SUPPORT_AUTH_TYPE
|
|
|
|
/*
|
|
* @brief cvg_sec_auth_init() - init authorized 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_init(cvg_vdev_t *vdev, cvg_vdev_cfg_t *cfg);
|
|
|
|
/*
|
|
* @brief cvg_sec_auth_deinit() - deinit authorized state info
|
|
* @param vdev: pointer to vdev
|
|
*/
|
|
void cvg_sec_auth_deinit(cvg_vdev_t *vdev);
|
|
|
|
/*
|
|
* @brief cvg_sec_auth_reset() - reset authorized state info
|
|
* @param vdev: pointer to vdev
|
|
*/
|
|
void cvg_sec_auth_reset(cvg_vdev_t *vdev, cvg_vdev_cfg_t *cfg);
|
|
|
|
/*
|
|
* @brief cvg_sec_auth_gen_random() - generate random number
|
|
* @param vdev: pointer to vdev
|
|
*/
|
|
void cvg_sec_auth_gen_random(uint8_t *buf, uint8_t len);
|
|
|
|
#else /* PLC_SUPPORT_AUTH_TYPE */
|
|
|
|
#define cvg_sec_auth_init(vdev, cfg) (0)
|
|
|
|
#define cvg_sec_auth_deinit(vdev)
|
|
|
|
#define cvg_sec_auth_reset(vdev, cfg)
|
|
|
|
#define cvg_sec_auth_gen_random(buf, len)
|
|
|
|
#endif /* PLC_SUPPORT_AUTH_TYPE */
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* CVG_SEC_AUTH_INTERNAL_H */
|