28 #include "eap_array.h" |
28 #include "eap_array.h" |
29 #include "eap_variable_data.h" |
29 #include "eap_variable_data.h" |
30 #if defined(USE_FAST_EAP_TYPE) |
30 #if defined(USE_FAST_EAP_TYPE) |
31 #include "eap_fast_tlv_header.h" |
31 #include "eap_fast_tlv_header.h" |
32 #endif //#if defined(USE_FAST_EAP_TYPE) |
32 #endif //#if defined(USE_FAST_EAP_TYPE) |
|
33 |
|
34 #include "eap_am_export.h" |
|
35 // Start: added by script change_export_macros.sh. |
|
36 #if defined(EAP_NO_EXPORT_TLS_EXTENSION_H) |
|
37 #define EAP_CLASS_VISIBILITY_TLS_EXTENSION_H EAP_NONSHARABLE |
|
38 #define EAP_FUNC_VISIBILITY_TLS_EXTENSION_H |
|
39 #define EAP_C_FUNC_VISIBILITY_TLS_EXTENSION_H |
|
40 #define EAP_FUNC_EXPORT_TLS_EXTENSION_H |
|
41 #define EAP_C_FUNC_EXPORT_TLS_EXTENSION_H |
|
42 #elif defined(EAP_EXPORT_TLS_EXTENSION_H) |
|
43 #define EAP_CLASS_VISIBILITY_TLS_EXTENSION_H EAP_EXPORT |
|
44 #define EAP_FUNC_VISIBILITY_TLS_EXTENSION_H EAP_FUNC_EXPORT |
|
45 #define EAP_C_FUNC_VISIBILITY_TLS_EXTENSION_H EAP_C_FUNC_EXPORT |
|
46 #define EAP_FUNC_EXPORT_TLS_EXTENSION_H EAP_FUNC_EXPORT |
|
47 #define EAP_C_FUNC_EXPORT_TLS_EXTENSION_H EAP_C_FUNC_EXPORT |
|
48 #else |
|
49 #define EAP_CLASS_VISIBILITY_TLS_EXTENSION_H EAP_IMPORT |
|
50 #define EAP_FUNC_VISIBILITY_TLS_EXTENSION_H EAP_FUNC_IMPORT |
|
51 #define EAP_C_FUNC_VISIBILITY_TLS_EXTENSION_H EAP_C_FUNC_IMPORT |
|
52 #define EAP_FUNC_EXPORT_TLS_EXTENSION_H |
|
53 #define EAP_C_FUNC_EXPORT_TLS_EXTENSION_H |
|
54 #endif |
|
55 // End: added by script change_export_macros.sh. |
33 |
56 |
34 /** @file */ |
57 /** @file */ |
35 |
58 |
36 /** |
59 /** |
37 * This is enumeration of TLS competion actions. |
60 * This is enumeration of TLS competion actions. |
108 /** |
131 /** |
109 * Object must indicate it's validity. |
132 * Object must indicate it's validity. |
110 * If object initialization fails this function must return false. |
133 * If object initialization fails this function must return false. |
111 * @return This function returns the validity of this object. |
134 * @return This function returns the validity of this object. |
112 */ |
135 */ |
113 EAP_FUNC_IMPORT bool get_is_valid(); |
136 EAP_FUNC_VISIBILITY_TLS_EXTENSION_H bool get_is_valid(); |
114 |
137 |
115 /** |
138 /** |
116 * This function sets the extension lifitime hint. |
139 * This function sets the extension lifitime hint. |
117 */ |
140 */ |
118 EAP_FUNC_IMPORT void set_lifetime_hint(const u32_t lifetime_hint); |
141 EAP_FUNC_VISIBILITY_TLS_EXTENSION_H void set_lifetime_hint(const u32_t lifetime_hint); |
119 |
142 |
120 /** |
143 /** |
121 * This function gets the extension lifetime hint. |
144 * This function gets the extension lifetime hint. |
122 */ |
145 */ |
123 EAP_FUNC_IMPORT u32_t get_lifetime_hint() const; |
146 EAP_FUNC_VISIBILITY_TLS_EXTENSION_H u32_t get_lifetime_hint() const; |
124 |
147 |
125 /** |
148 /** |
126 * This function sets the extension type. |
149 * This function sets the extension type. |
127 */ |
150 */ |
128 EAP_FUNC_IMPORT void set_type(const tls_extension_type_e type); |
151 EAP_FUNC_VISIBILITY_TLS_EXTENSION_H void set_type(const tls_extension_type_e type); |
129 |
152 |
130 /** |
153 /** |
131 * This function gets the extension type. |
154 * This function gets the extension type. |
132 */ |
155 */ |
133 EAP_FUNC_IMPORT tls_extension_type_e get_type() const; |
156 EAP_FUNC_VISIBILITY_TLS_EXTENSION_H tls_extension_type_e get_type() const; |
134 |
157 |
135 #if defined(USE_FAST_EAP_TYPE) |
158 #if defined(USE_FAST_EAP_TYPE) |
136 |
159 |
137 /// This function stores the PAC-Type for fast access. |
160 /// This function stores the PAC-Type for fast access. |
138 EAP_FUNC_IMPORT void set_pac_type(const eap_fast_pac_type_e pac_type); |
161 EAP_FUNC_VISIBILITY_TLS_EXTENSION_H void set_pac_type(const eap_fast_pac_type_e pac_type); |
139 |
162 |
140 /// This function returns the PAC-Type for fast access. |
163 /// This function returns the PAC-Type for fast access. |
141 EAP_FUNC_IMPORT eap_fast_pac_type_e get_pac_type() const; |
164 EAP_FUNC_VISIBILITY_TLS_EXTENSION_H eap_fast_pac_type_e get_pac_type() const; |
142 |
165 |
143 #endif //#if defined(USE_FAST_EAP_TYPE) |
166 #endif //#if defined(USE_FAST_EAP_TYPE) |
144 |
167 |
145 /** |
168 /** |
146 * This function gets the debug string of the extension type. |
169 * This function gets the debug string of the extension type. |
147 */ |
170 */ |
148 EAP_FUNC_IMPORT static eap_const_string get_type_string(tls_extension_type_e type); |
171 EAP_FUNC_VISIBILITY_TLS_EXTENSION_H static eap_const_string get_type_string(tls_extension_type_e type); |
149 |
172 |
150 /** |
173 /** |
151 * This function gets the extension from the array of extensions. |
174 * This function gets the extension from the array of extensions. |
152 */ |
175 */ |
153 EAP_FUNC_IMPORT static const tls_extension_c * get_tls_extension( |
176 EAP_FUNC_VISIBILITY_TLS_EXTENSION_H static const tls_extension_c * get_tls_extension( |
154 const tls_extension_type_e tls_extension_type, |
177 const tls_extension_type_e tls_extension_type, |
155 EAP_TEMPLATE_CONST eap_array_c<tls_extension_c> * const tls_extensions, |
178 EAP_TEMPLATE_CONST eap_array_c<tls_extension_c> * const tls_extensions, |
156 abs_eap_am_tools_c * const am_tools); |
179 abs_eap_am_tools_c * const am_tools); |
157 |
180 |
158 #if defined(USE_FAST_EAP_TYPE) |
181 #if defined(USE_FAST_EAP_TYPE) |
159 /** |
182 /** |
160 * This function gets the extension from the array of extensions. |
183 * This function gets the extension from the array of extensions. |
161 */ |
184 */ |
162 EAP_FUNC_IMPORT static const tls_extension_c * get_tls_extension( |
185 EAP_FUNC_VISIBILITY_TLS_EXTENSION_H static const tls_extension_c * get_tls_extension( |
163 const tls_extension_type_e tls_extension_type, |
186 const tls_extension_type_e tls_extension_type, |
164 const eap_fast_pac_type_e pac_type, |
187 const eap_fast_pac_type_e pac_type, |
165 EAP_TEMPLATE_CONST eap_array_c<tls_extension_c> * const tls_extensions, |
188 EAP_TEMPLATE_CONST eap_array_c<tls_extension_c> * const tls_extensions, |
166 abs_eap_am_tools_c * const am_tools); |
189 abs_eap_am_tools_c * const am_tools); |
167 #endif //#if defined(USE_FAST_EAP_TYPE) |
190 #endif //#if defined(USE_FAST_EAP_TYPE) |