14 * Description: EAP and WLAN authentication protocols. |
14 * Description: EAP and WLAN authentication protocols. |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 /* |
18 /* |
19 * %version: % |
19 * %version: 9 % |
20 */ |
20 */ |
21 |
21 |
22 #if !defined(_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H_) |
22 #if !defined(_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H_) |
23 #define _EAP_PAC_STORE_CLIENT_MESSAGE_IF_H_ |
23 #define _EAP_PAC_STORE_CLIENT_MESSAGE_IF_H_ |
24 |
24 |
25 #include "eap_tools.h" |
25 #include "eap_tools.h" |
26 #include "eap_am_export.h" |
26 #include "eap_am_export.h" |
|
27 // Start: added by script change_export_macros.sh. |
|
28 #if defined(EAP_NO_EXPORT_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H) |
|
29 #define EAP_CLASS_VISIBILITY_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H EAP_NONSHARABLE |
|
30 #define EAP_FUNC_VISIBILITY_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H |
|
31 #define EAP_C_FUNC_VISIBILITY_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H |
|
32 #define EAP_FUNC_EXPORT_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H |
|
33 #define EAP_C_FUNC_EXPORT_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H |
|
34 #elif defined(EAP_EXPORT_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H) |
|
35 #define EAP_CLASS_VISIBILITY_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H EAP_EXPORT |
|
36 #define EAP_FUNC_VISIBILITY_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H EAP_FUNC_EXPORT |
|
37 #define EAP_C_FUNC_VISIBILITY_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H EAP_C_FUNC_EXPORT |
|
38 #define EAP_FUNC_EXPORT_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H EAP_FUNC_EXPORT |
|
39 #define EAP_C_FUNC_EXPORT_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H EAP_C_FUNC_EXPORT |
|
40 #else |
|
41 #define EAP_CLASS_VISIBILITY_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H EAP_IMPORT |
|
42 #define EAP_FUNC_VISIBILITY_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H EAP_FUNC_IMPORT |
|
43 #define EAP_C_FUNC_VISIBILITY_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H EAP_C_FUNC_IMPORT |
|
44 #define EAP_FUNC_EXPORT_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H |
|
45 #define EAP_C_FUNC_EXPORT_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H |
|
46 #endif |
|
47 // End: added by script change_export_macros.sh. |
27 #include "eap_pac_store_message_base.h" |
48 #include "eap_pac_store_message_base.h" |
28 #include "abs_eap_am_message_if.h" |
49 #include "abs_eap_am_message_if.h" |
29 #include "eap_array.h" |
50 #include "eap_array.h" |
30 #include "eap_process_tlv_message_data.h" |
51 #include "eap_process_tlv_message_data.h" |
31 #include "eap_am_message_if.h" |
52 #include "eap_am_message_if.h" |
36 class abs_eap_pac_store_message_c; |
57 class abs_eap_pac_store_message_c; |
37 class eap_tlv_header_c; |
58 class eap_tlv_header_c; |
38 |
59 |
39 /// A eap_pac_store_client_message_if_c class implements mapping of EAP authentication sessions. |
60 /// A eap_pac_store_client_message_if_c class implements mapping of EAP authentication sessions. |
40 /// Network identity separates parallel EAP authentication sessions. |
61 /// Network identity separates parallel EAP authentication sessions. |
41 class EAP_EXPORT eap_pac_store_client_message_if_c |
62 class EAP_CLASS_VISIBILITY_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H eap_pac_store_client_message_if_c |
42 : public eap_pac_store_message_base_c |
63 : public eap_pac_store_message_base_c |
43 , public abs_eap_am_message_if_c |
64 , public abs_eap_am_message_if_c |
44 { |
65 { |
45 private: |
66 private: |
46 //-------------------------------------------------- |
67 //-------------------------------------------------- |
59 bool m_is_valid; |
80 bool m_is_valid; |
60 |
81 |
61 eap_status_e m_error_code; |
82 eap_status_e m_error_code; |
62 |
83 |
63 eap_tlv_message_type_function_e m_error_function; |
84 eap_tlv_message_type_function_e m_error_function; |
64 |
|
65 eap_status_e complete_open_pac_store( |
|
66 EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters); |
|
67 |
|
68 eap_status_e complete_create_device_seed( |
|
69 EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters); |
|
70 |
85 |
71 eap_status_e complete_is_master_key_present( |
86 eap_status_e complete_is_master_key_present( |
72 EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters); |
87 EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters); |
73 |
88 |
74 eap_status_e complete_is_master_key_and_password_matching( |
89 eap_status_e complete_is_master_key_and_password_matching( |
101 //-------------------------------------------------- |
119 //-------------------------------------------------- |
102 |
120 |
103 /** |
121 /** |
104 * The destructor of the eap_core class does nothing special. |
122 * The destructor of the eap_core class does nothing special. |
105 */ |
123 */ |
106 EAP_FUNC_IMPORT virtual ~eap_pac_store_client_message_if_c(); |
124 EAP_FUNC_VISIBILITY_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H virtual ~eap_pac_store_client_message_if_c(); |
107 |
125 |
108 /** |
126 /** |
109 * The constructor initializes member attributes using parameters passed to it. |
127 * The constructor initializes member attributes using parameters passed to it. |
110 * @param tools is pointer to the tools class. @see abs_eap_am_tools_c. |
128 * @param tools is pointer to the tools class. @see abs_eap_am_tools_c. |
111 * @param partner is back pointer to object which created this object. |
129 * @param partner is back pointer to object which created this object. |
112 * @param is_client_when_true indicates whether the network entity should act |
130 * @param is_client_when_true indicates whether the network entity should act |
113 * as a client (true) or server (false), in terms of EAP-protocol |
131 * as a client (true) or server (false), in terms of EAP-protocol |
114 * whether this network entity is EAP-supplicant (true) or EAP-authenticator (false). |
132 * whether this network entity is EAP-supplicant (true) or EAP-authenticator (false). |
115 */ |
133 */ |
116 EAP_FUNC_IMPORT eap_pac_store_client_message_if_c( |
134 EAP_FUNC_VISIBILITY_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H eap_pac_store_client_message_if_c( |
117 abs_eap_am_tools_c * const tools, |
135 abs_eap_am_tools_c * const tools, |
118 eap_am_message_if_c * const client_if, |
136 eap_am_message_if_c * const client_if, |
119 abs_eap_pac_store_message_c * const partner); |
137 abs_eap_pac_store_message_c * const partner); |
120 |
138 |
121 /** |
139 /** |
123 * state was after the configure() function call. |
141 * state was after the configure() function call. |
124 * If object reset succeeds this function must return eap_status_ok. |
142 * If object reset succeeds this function must return eap_status_ok. |
125 * If object reset fails this function must return corresponding error status. |
143 * If object reset fails this function must return corresponding error status. |
126 * @return This function returns the status of reset operation. |
144 * @return This function returns the status of reset operation. |
127 */ |
145 */ |
128 EAP_FUNC_IMPORT eap_status_e reset(); |
146 EAP_FUNC_VISIBILITY_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H eap_status_e reset(); |
129 |
147 |
130 // This is documented in abs_eap_stack_interface_c::configure(). |
148 // This is documented in abs_eap_stack_interface_c::configure(). |
131 EAP_FUNC_IMPORT eap_status_e configure(); |
149 EAP_FUNC_VISIBILITY_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H eap_status_e configure(); |
132 |
150 |
133 // This is documented in abs_eap_stack_interface_c::shutdown(). |
151 // This is documented in abs_eap_stack_interface_c::shutdown(). |
134 EAP_FUNC_IMPORT eap_status_e shutdown(); |
152 EAP_FUNC_VISIBILITY_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H eap_status_e shutdown(); |
135 |
153 |
136 // This is documented in abs_eap_stack_interface_c::get_is_valid(). |
154 // This is documented in abs_eap_stack_interface_c::get_is_valid(). |
137 EAP_FUNC_IMPORT bool get_is_valid(); |
155 EAP_FUNC_VISIBILITY_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H bool get_is_valid(); |
138 |
156 |
139 EAP_FUNC_IMPORT eap_status_e process_message(eap_process_tlv_message_data_c * const message); |
157 EAP_FUNC_VISIBILITY_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H eap_status_e send_data(const void * const data, const u32_t length); |
140 |
158 |
141 EAP_FUNC_IMPORT eap_status_e send_data(const void * const data, const u32_t length); |
159 EAP_FUNC_VISIBILITY_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H eap_status_e is_master_key_present( |
142 |
|
143 EAP_FUNC_IMPORT eap_status_e open_pac_store( |
|
144 const eap_status_e completion_status); |
160 const eap_status_e completion_status); |
145 |
161 |
146 EAP_FUNC_IMPORT eap_status_e create_device_seed( |
162 EAP_FUNC_VISIBILITY_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H eap_status_e is_master_key_and_password_matching( |
147 const eap_status_e completion_status); |
|
148 |
|
149 EAP_FUNC_IMPORT eap_status_e is_master_key_present( |
|
150 const eap_status_e completion_status); |
|
151 |
|
152 EAP_FUNC_IMPORT eap_status_e is_master_key_and_password_matching( |
|
153 const eap_variable_data_c * const pac_store_password |
163 const eap_variable_data_c * const pac_store_password |
154 ,const eap_status_e completion_status); |
164 ,const eap_status_e completion_status); |
155 |
165 |
156 EAP_FUNC_IMPORT eap_status_e create_and_save_master_key( |
166 EAP_FUNC_VISIBILITY_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H eap_status_e create_and_save_master_key( |
157 const eap_variable_data_c * const pac_store_password |
167 const eap_variable_data_c * const pac_store_password |
158 ,const eap_status_e completion_status); |
168 ,const eap_status_e completion_status); |
159 |
169 |
160 EAP_FUNC_IMPORT eap_status_e compare_pac_store_password( |
170 EAP_FUNC_VISIBILITY_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H eap_status_e compare_pac_store_password( |
161 eap_variable_data_c * const pac_store_password); |
171 eap_variable_data_c * const pac_store_password); |
162 |
172 |
163 EAP_FUNC_IMPORT eap_status_e is_pacstore_password_present(); |
173 EAP_FUNC_VISIBILITY_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H eap_status_e is_pacstore_password_present(); |
164 |
174 |
165 EAP_FUNC_IMPORT eap_status_e set_pac_store_password( |
175 EAP_FUNC_VISIBILITY_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H eap_status_e set_pac_store_password( |
166 const eap_variable_data_c * const pac_store_password |
176 const eap_variable_data_c * const pac_store_password |
167 ,const eap_status_e completion_status); |
177 ,const eap_status_e completion_status); |
168 |
178 |
169 EAP_FUNC_IMPORT eap_status_e destroy_pac_store( |
179 EAP_FUNC_VISIBILITY_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H eap_status_e destroy_pac_store( |
170 const eap_status_e completion_status); |
180 const eap_status_e completion_status); |
171 |
181 |
172 |
182 |
173 |
183 |
174 //-------------------------------------------------- |
184 //-------------------------------------------------- |