You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
987 B

/*
* Copyright (c) Hisilicon Technologies Co., Ltd. 2019-2021. All rights reserved.
* Description:Define API about key slot driver
* Author: Hisilicon
* Create: 2019-08-22
*/
#include "uapi_keyslot.h"
#include "mpi_keyslot_ext.h"
#include "mpi_keyslot_define.h"
td_s32 uapi_keyslot_init(td_void)
{
return ext_mpi_keyslot_init();
}
td_s32 uapi_keyslot_deinit(td_void)
{
return ext_mpi_keyslot_deinit();
}
td_s32 uapi_keyslot_create(const uapi_keyslot_attr *attr, td_handle *key_slot)
{
if (key_slot == TD_NULL) {
print_err_code(SOC_ERR_KS_PTR_NULL);
return SOC_ERR_KS_PTR_NULL;
}
if (sizeof(uapi_keyslot_attr) != sizeof(ext_keyslot_attr)) {
print_err_hex2(sizeof(uapi_keyslot_attr), sizeof(ext_keyslot_attr));
return SOC_ERR_KS_INVALID_PARAM;
}
return ext_mpi_keyslot_create((const ext_keyslot_attr *)attr, key_slot);
}
td_s32 uapi_keyslot_destroy(td_handle key_slot)
{
return ext_mpi_keyslot_destroy(key_slot);
}