• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * This file is part of the openHiTLS project.
3  *
4  * openHiTLS is licensed under the Mulan PSL v2.
5  * You can use this software according to the terms and conditions of the Mulan PSL v2.
6  * You may obtain a copy of Mulan PSL v2 at:
7  *
8  *     http://license.coscl.org.cn/MulanPSL2
9  *
10  * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
11  * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
12  * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
13  * See the Mulan PSL v2 for more details.
14  */
15 #ifndef CONFIG_TYPE_H
16 #define CONFIG_TYPE_H
17 
18 #include <stdint.h>
19 #include <stdbool.h>
20 #include "hitls_type.h"
21 #include "tls_config.h"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 /**
28  * @brief Load group information
29  * @param config: config context
30  * @return HITLS_SUCCESS: success, other: error
31  */
32 int32_t ConfigLoadGroupInfo(HITLS_Config *config);
33 
34 /**
35  * @brief Get group information
36  * @param config: config context
37  * @param groupId: group id
38  * @return group information
39  */
40 const TLS_GroupInfo *ConfigGetGroupInfo(const HITLS_Config *config, uint16_t groupId);
41 
42 /**
43  * @brief Get group information list
44  * @param config: config context
45  * @param size: size of group information list
46  * @return group information list
47  */
48 const TLS_GroupInfo *ConfigGetGroupInfoList(const HITLS_Config *config, uint32_t *size);
49 
50 /**
51  * @brief Load signature scheme information
52  * @param config: config context
53  * @return HITLS_SUCCESS: success, other: error
54  */
55 int32_t ConfigLoadSignatureSchemeInfo(HITLS_Config *config);
56 
57 /**
58  * @brief Get signature scheme information
59  * @param config: config context
60  * @param signatureScheme: signature scheme
61  * @return signature scheme information
62  */
63 const TLS_SigSchemeInfo *ConfigGetSignatureSchemeInfo(const HITLS_Config *config, uint16_t signatureScheme);
64 
65 /**
66  * @brief Get signature scheme information list
67  * @param config: config context
68  * @param size: size of signature scheme information list
69  * @return signature scheme information list
70  */
71 const TLS_SigSchemeInfo *ConfigGetSignatureSchemeInfoList(const HITLS_Config *config, uint32_t *size);
72 
73 #ifdef __cplusplus
74 }
75 #endif
76 
77 #endif /* CONFIG_TYPE_H */
78