|
1 /* |
|
2 * Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: EAP and WLAN authentication protocols. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #if !defined(_EAPOL_KEY_STATE_H_) |
|
22 #define _EAPOL_KEY_STATE_H_ |
|
23 |
|
24 |
|
25 #include "eap_tools.h" |
|
26 #include "eap_am_export.h" |
|
27 #include "eapol_rsna_key_data_header.h" |
|
28 #include "eapol_rsna_key_header.h" |
|
29 #include "eap_am_network_id.h" |
|
30 #include "eapol_key_types.h" |
|
31 |
|
32 class abs_eapol_core_c; |
|
33 class abs_eapol_key_state_c; |
|
34 class eapol_rsna_key_data_payloads_c; |
|
35 class eap_core_retransmission_c; |
|
36 |
|
37 |
|
38 #if defined(EAPOL_KEY_TEST_PRIVATE_FUNCTION) |
|
39 #define EAP_KEY_TEST_PUBLIC_FUNCTION public: |
|
40 #define EAP_KEY_TEST_PRIVATE_FUNCTION private: |
|
41 #else |
|
42 #define EAP_KEY_TEST_PUBLIC_FUNCTION |
|
43 #define EAP_KEY_TEST_PRIVATE_FUNCTION |
|
44 #endif // #if defined(EAPOL_KEY_TEST_PRIVATE_FUNCTION) |
|
45 |
|
46 /** @file */ |
|
47 |
|
48 /** |
|
49 * This is the timer ID used with abs_eap_am_tools_c::set_timer() and abs_eap_am_tools_c::cancel_timer(). |
|
50 */ |
|
51 enum eapol_key_state_timer_id_e |
|
52 { |
|
53 EAPOL_KEY_STATE_TIMER_HANDSHAKE_TIMEOUT_ID, ///< See EAPOL_KEY_STATE_TIMER_HANDSHAKE_TIMEOUT_TIMEOUT. |
|
54 EAPOL_KEY_STATE_TIMER_RETRANSMISSION_ID, ///< See EAPOL_KEY_STATE_TIMER_RETRANSMISSION_TIMEOUT. |
|
55 EAPOL_KEY_STATE_TIMER_PMKSA_CACHING_TIMEOUT_ID, ///< See EAPOL_KEY_STATE_TIMER_PMK_CACHING_TIMEOUT. |
|
56 EAPOL_KEY_STATE_TIMER_REASSOCIATE_TIMEOUT_ID, ///< See EAPOL_KEY_STATE_TIMER_REASSOCIATE_TIMEOUT. |
|
57 EAPOL_KEY_STATE_TIMER_GROUP_KEY_UPDATE_TIMEOUT_ID, ///< See EAPOL_KEY_STATE_TIMER_GROUP_KEY_UPDATE_TIMEOUT. |
|
58 EAPOL_KEY_STATE_TIMER_INITIALIZE_4_WAY_HANDSHAKE_TIMEOUT_ID, ///< See EAPOL_KEY_STATE_TIMER_INITIALIZE_4_WAY_HANDSHAKE_TIMEOUT. |
|
59 }; |
|
60 |
|
61 /** |
|
62 * These are the default timeout values. |
|
63 */ |
|
64 enum eapol_key_state_timer_timeout_value_e |
|
65 { |
|
66 EAPOL_KEY_STATE_TIMER_HANDSHAKE_TIMEOUT_TIMEOUT = 20000ul, // milli seconds |
|
67 EAPOL_KEY_STATE_TIMER_RETRANSMISSION_TIMEOUT = 2000ul, // milli seconds |
|
68 EAPOL_KEY_STATE_RETRANSMISSION_COUNTER = 3ul, |
|
69 EAPOL_KEY_STATE_TIMER_PMKSA_CACHING_TIMEOUT = 43200000ul, // milli seconds = 12 hours |
|
70 EAPOL_KEY_STATE_TIMER_REASSOCIATE_TIMEOUT = 500ul, // milli seconds |
|
71 EAPOL_KEY_STATE_TIMER_GROUP_KEY_UPDATE_TIMEOUT = 0ul, // milli seconds, this is for testing, zero means in test case group key is updated immediately. |
|
72 EAPOL_KEY_STATE_TIMER_INITIALIZE_4_WAY_HANDSHAKE_TIMEOUT = 100ul, // milli seconds before client initializes 4-Way Handshake. |
|
73 EAPOL_KEY_STATE_TIMER_WPXM_CACHE_TIMEOUT = 1000ul, // milli seconds, This is short timeout to remove WPXM SA. |
|
74 }; |
|
75 |
|
76 |
|
77 const u8_t EAPOL_RSNA_PAIRWISE_KEY_EXPANSION_LABEL[] = "Pairwise key expansion"; |
|
78 const u32_t EAPOL_RSNA_PAIRWISE_KEY_EXPANSION_LABEL_LENGTH = (sizeof(EAPOL_RSNA_PAIRWISE_KEY_EXPANSION_LABEL) - 1ul); // Terminating null is not included. |
|
79 |
|
80 const u8_t EAPOL_RSNA_PMK_NAME_LABEL[] = "PMK Name"; |
|
81 const u32_t EAPOL_RSNA_PMK_NAME_LABEL_LENGTH = (sizeof(EAPOL_RSNA_PMK_NAME_LABEL) - 1ul); // Terminating null is not included. |
|
82 |
|
83 enum eapol_key_wpxm_constant_e |
|
84 { |
|
85 eapol_key_constant_wpxm_initial_wpxc_counter_value = 1, |
|
86 }; |
|
87 |
|
88 |
|
89 //-------------------------------------------------------------------------------------------------- |
|
90 |
|
91 |
|
92 /// Class eapol_key_state_c |
|
93 /** |
|
94 * This class stores the EAPOL-Key state. |
|
95 */ |
|
96 class EAP_EXPORT eapol_key_state_c |
|
97 : public abs_eap_base_timer_c |
|
98 { |
|
99 |
|
100 public: |
|
101 //-------------------------------------------------- |
|
102 |
|
103 //-------------------------------------------------- |
|
104 private: |
|
105 //-------------------------------------------------- |
|
106 |
|
107 /// This is pointer to the tools class. |
|
108 abs_eap_am_tools_c * const m_am_tools; |
|
109 |
|
110 /// This is back pointer to object which created this object. |
|
111 /// Packets are sent to the partner. |
|
112 abs_eapol_key_state_c * const m_key_state_partner; |
|
113 |
|
114 /// This is back pointer to object which created eapol_core_c object. |
|
115 /// eapol_key_state_c object sent packets to this object. |
|
116 abs_eapol_core_c * const m_eapol_partner; |
|
117 |
|
118 eap_am_network_id_c m_send_network_id; |
|
119 |
|
120 /// Authenticator RSN IE. Authenticator sends this in Beacon or Probe message. |
|
121 eap_variable_data_c m_authenticator_RSNA_IE; |
|
122 |
|
123 /// If a second RSN IE is provided in the message, the Supplicant shall use |
|
124 // the unicast cipher suite specified in the second RSN IE or deauthenticate. |
|
125 eap_variable_data_c m_unicast_cipher_suite_RSNA_IE; |
|
126 |
|
127 /// Supplicant RSN IE. Supplicant sends this in (re)association request message. |
|
128 eap_variable_data_c m_supplicant_RSNA_IE; |
|
129 |
|
130 /// Received Pairwise Master Key ID (PMKID). Authenticator sends this in 4-Way Handshake message 1. |
|
131 eap_variable_data_c m_received_PMKID; |
|
132 |
|
133 /// This is Supplicant's MAC address. This is given from MAC layer when EAPOL-Key state is initialized. |
|
134 eap_variable_data_c m_supplicant_MAC_address; |
|
135 |
|
136 /// This is Authenticator's MAC address. This is given from MAC layer when EAPOL-Key state is initialized. |
|
137 eap_variable_data_c m_authenticator_MAC_address; |
|
138 |
|
139 /// This is Athenticator Nonce. |
|
140 eap_variable_data_c m_ANonce; |
|
141 |
|
142 /// This is Supplicant Nonce. |
|
143 eap_variable_data_c m_SNonce; |
|
144 |
|
145 /// This is EAPOL-Key IV. |
|
146 eap_variable_data_c m_EAPOL_key_IV; |
|
147 |
|
148 /// This is the Pairwise Master Key (PMK 802.11i or WPXK3 WPXM) derived from a successful authentication. |
|
149 eap_variable_data_c m_pairwise_PMK_WPXK3; |
|
150 |
|
151 /// Pairwise Master Key ID (PMKID). Derived with function: |
|
152 /// PMKID = HMAC-SHA1-128(PMK, "PMK Name" || Authenticator-MAC-Addr || Supplicant-MAC-Addr). |
|
153 eap_variable_data_c m_PMKID; |
|
154 |
|
155 /// Pairwise Transient Key (PTK). |
|
156 /// PTK = PRF-X(PMK, "Pairwise key expansion", Min(AA,SA) || Max(AA, SA) || Min(ANonce,SNonce) || Max(ANonce,SNonce)). |
|
157 eap_variable_data_c m_transient_PTK; |
|
158 |
|
159 /// EAPOL-Key Confirmation Key (KCK). |
|
160 /// KCK = L(PTK, 0, 128). |
|
161 eap_variable_data_c m_confirmation_KCK; |
|
162 |
|
163 /// EAPOL-Key Encryption Key (KEK). |
|
164 /// KEK = L(PTK, 128, 128). |
|
165 eap_variable_data_c m_encryption_KEK; |
|
166 |
|
167 /// Temporal Key (TK). |
|
168 /// In TKIP: TK = L(PTK, 256, 256). |
|
169 /// In CCMP: TK = L(PTK, 256, 128). |
|
170 eap_variable_data_c m_temporal_TK; |
|
171 |
|
172 /// Group Temporal Key (GTK). |
|
173 /// In TKIP: 256 bits. |
|
174 /// In CCMP: 128 bits. |
|
175 /// In WEP 40: 40 bits. |
|
176 /// In WEP 104: 104 bits. |
|
177 eap_variable_data_c m_group_GTK; |
|
178 |
|
179 #if defined(EAP_USE_WPXM) |
|
180 eap_variable_data_c m_WPXM_WPXK1; |
|
181 eap_variable_data_c m_WPXM_WPXK2; |
|
182 |
|
183 u32_t m_WPXM_WPXC; |
|
184 #endif //#if defined(EAP_USE_WPXM) |
|
185 |
|
186 bool m_received_802_1x_keys[eapol_key_type_last_type]; |
|
187 |
|
188 u8_t m_group_GTK_ID; |
|
189 |
|
190 bool m_group_GTK_Tx_bit; |
|
191 |
|
192 u32_t m_eapol_header_offset; |
|
193 |
|
194 u32_t m_MTU; |
|
195 |
|
196 u32_t m_trailer_length; |
|
197 |
|
198 /// Re-transmission is used to test protocols. |
|
199 /// This stores the information to resent a message. This is used for testing purposes. |
|
200 eap_core_retransmission_c *m_retransmission; |
|
201 |
|
202 /// Re-transmission is used to test protocols. |
|
203 /// This is the time after resent a message. This is used for testing purposes. |
|
204 u32_t m_retransmission_time; |
|
205 |
|
206 /// Re-transmission is used to test protocols. |
|
207 /// This is the maximum count of retransmission of one message. This is used for testing purposes. |
|
208 u32_t m_retransmission_counter; |
|
209 |
|
210 /// This is the maximum time EAPOL-Key Handshake could succeed. |
|
211 /// EAPOl-Key Handshake is terminated after this time elapses. |
|
212 u32_t m_handshake_timeout; |
|
213 |
|
214 |
|
215 #if defined(EAP_USE_WPXM) |
|
216 |
|
217 /// This is the maximum time WPXM reassociation could succeed. |
|
218 /// WPXM reassociation is terminated after this time elapses. |
|
219 u32_t m_wpxm_reassociate_timeout; |
|
220 |
|
221 /// This is used in test server. WPXM can be configured to to use RSNA or WPA Key descriptor. |
|
222 eapol_key_descriptor_type_e m_EAPOL_WPXM_key_descriptor_type; |
|
223 |
|
224 #endif //#if defined(EAP_USE_WPXM) |
|
225 |
|
226 /// This is the authentication type. One of RSNA, WPA or 802.1X. |
|
227 eapol_key_authentication_type_e m_authentication_type; |
|
228 |
|
229 /// This is the selected pairwise cipher. |
|
230 eapol_RSNA_key_header_c::eapol_RSNA_cipher_e m_eapol_pairwise_cipher; |
|
231 |
|
232 /// This is the selected group cipher. |
|
233 eapol_RSNA_key_header_c::eapol_RSNA_cipher_e m_eapol_group_cipher; |
|
234 |
|
235 /// This is the state of EAPOL-Key Handshake. |
|
236 eapol_key_state_e m_eapol_key_state; |
|
237 |
|
238 /// This is the the current running handshake type. |
|
239 eapol_key_handshake_type_e m_eapol_key_handshake_type; |
|
240 |
|
241 /// This used in EAPOL key MIC failure tests. Activation requires USE_EAPOL_KEY_TEST_FAILURES compiler flag. |
|
242 eapol_key_state_e m_create_key_failure; |
|
243 |
|
244 u32_t m_pmksa_caching_timeout; |
|
245 |
|
246 /// This is Key Reply Counter. |
|
247 u64_t m_key_reply_counter; |
|
248 |
|
249 /// This is Key Reply Counter for requests that client sends. |
|
250 u64_t m_client_send_key_reply_counter; |
|
251 |
|
252 /// This indicates whether this object is client (true) or server (false). |
|
253 /// In terms of EAP-protocol whether this network entity is EAP-supplicant (true) or EAP-authenticator (false). |
|
254 bool m_is_client; |
|
255 |
|
256 /// This indicates whether this object was generated successfully. |
|
257 bool m_is_valid; |
|
258 |
|
259 /// This flag indicates that this object is marked to removed asynchronously. |
|
260 /// The very same object could be taken use before the removing timer elapses. |
|
261 bool m_marked_removed; |
|
262 |
|
263 bool m_shutdown_was_called; |
|
264 |
|
265 /// This flag tells whether broken 4-Way Handshake message 1 without PMKID is allowed (true) or dropped (false). |
|
266 /// Default value id false. |
|
267 /// Use configuration option EAPOL_key_state_allow_missing_PMKID_in_message_1 to change this value. |
|
268 bool m_allow_missing_PMKID_in_message_1; |
|
269 |
|
270 /// This flag tells whether broken 4-Way Handshake message 1 without PMKID is created in server (true) or not (false). |
|
271 /// Default value id false. |
|
272 /// Use configuration option EAPOL_key_state_skip_PMKID_key_data_in_message_1 to change this value. |
|
273 bool m_skip_PMKID_key_data_in_message_1; |
|
274 |
|
275 /// This flag tells whether broken 4-Way Handshake message 1 with non zero MIC or non zero reserved is allowed (true) or dropped (false). |
|
276 /// Default value id false. |
|
277 /// Use configuration option EAPOL_key_state_allow_non_zero_mic_in_message_1 to change this value. |
|
278 bool m_allow_non_zero_mic_and_reserved_in_message_1; |
|
279 |
|
280 /// This flag tells the EAPOL must indicate PMKID to lower layers (true) or not (false). |
|
281 /// The configuration option is EAPOL_key_state_indicate_pmkid_to_lower_layer. |
|
282 bool m_indicate_pmkid_to_lower_layer; |
|
283 |
|
284 /// This flag tells the handshake timeout is already active (true) or not (false). |
|
285 bool m_handshake_timeout_set; |
|
286 |
|
287 /// This flag activates group key update test (true) or not (false). |
|
288 /// The configuration option is EAPOL_key_state_TEST_group_key_update. |
|
289 bool m_server_TEST_group_key_update; |
|
290 |
|
291 #if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE) |
|
292 bool m_is_associated; |
|
293 #endif //#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE) |
|
294 |
|
295 // - - - - - - - - - - - - - - - - - - - - - - - - |
|
296 |
|
297 enum eapol_key_state_constants_e |
|
298 { |
|
299 eapol_key_state_mppe_key_length_leap = 16ul, // LEAP gives only 16 bytes of key material |
|
300 eapol_key_state_mppe_key_length = 32ul, |
|
301 EAPOL_RSNA_PMK_LENGTH_BYTES = 32ul, |
|
302 EAPOL_RSNA_NONCE_LENGTH_BYTES = 32ul, |
|
303 EAPOL_RSNA_4_WAY_HANDSHAKE_MESSAGE_1_KEY_DATA_LENGTH_BYTES = eapol_rsna_key_data_header_c::EAPOL_RSNA_KEY_HEADER_LENGTH |
|
304 + eapol_RSNA_key_header_c::EAPOL_RSNA_KEY_DATA_PMKID_SIZE, // sizeof(Key Data Encapsulation header) 6 + sizeof(PMKID) 16 |
|
305 EAPOL_RSNA_RC4_KEY_STREAM_DISCARD_LENGTH = 256ul, |
|
306 EAPOL_RSNA_TKIP_PTK_LENGTH_BITS = 512ul, |
|
307 EAPOL_RSNA_CCMP_PTK_LENGTH_BITS = 384ul, |
|
308 EAPOL_RSNA_KCK_LENGTH_BYTES = 16ul, |
|
309 EAPOL_RSNA_KEK_LENGTH_BYTES = 16ul, |
|
310 EAPOL_RSNA_TK_LENGTH_BYTES = 32ul, |
|
311 EAPOL_RSNA_TKIP_TK_LENGTH_BYTES = 32ul, |
|
312 EAPOL_RSNA_CCMP_TK_LENGTH_BYTES = 16ul, |
|
313 EAPOL_RSNA_KCK_OFFSET_BYTES = 0ul, |
|
314 EAPOL_RSNA_KEK_OFFSET_BYTES = EAPOL_RSNA_KCK_OFFSET_BYTES + EAPOL_RSNA_KCK_LENGTH_BYTES, |
|
315 EAPOL_RSNA_TK_OFFSET_BYTES = EAPOL_RSNA_KEK_OFFSET_BYTES + EAPOL_RSNA_KEK_LENGTH_BYTES, |
|
316 }; |
|
317 |
|
318 |
|
319 EAP_FUNC_IMPORT eap_status_e trace_eapol_key_message( |
|
320 const i8_t * const prefix, |
|
321 eapol_RSNA_key_header_c * const eapol_key_message); |
|
322 |
|
323 eap_status_e trace_eapol_rsna_key_data_payload( |
|
324 const bool is_RSNA, |
|
325 const bool is_WPXM, |
|
326 const eapol_key_descriptor_type_e eapol_key_descriptor_type, |
|
327 const i8_t * const prefix, |
|
328 const eapol_rsna_key_data_header_c * const key_data_payload, |
|
329 const u32_t buffer_length); |
|
330 |
|
331 #if defined(USE_EAP_TRACE) |
|
332 |
|
333 #define TRACE_EAPOL_KEY_MESSAGE(prefix, eapol_key_message) \ |
|
334 trace_eapol_key_message(prefix, eapol_key_message) |
|
335 |
|
336 #define EAPOL_RSNA_KEY_DATA_TRACE_PAYLOAD(is_RSNA, is_WPXM, eapol_key_descriptor_type, prefix, key_data_payload, buffer_length) \ |
|
337 trace_eapol_rsna_key_data_payload(is_RSNA, is_WPXM, eapol_key_descriptor_type, prefix, key_data_payload, buffer_length) |
|
338 |
|
339 #else |
|
340 |
|
341 #define TRACE_EAPOL_KEY_MESSAGE(prefix, eapol_key_message) |
|
342 |
|
343 #define EAPOL_RSNA_KEY_DATA_TRACE_PAYLOAD(is_RSNA, is_WPXM, eapol_key_descriptor_type, prefix, key_data_payload, buffer_length) |
|
344 |
|
345 #endif //#if defined(USE_EAP_TRACE) || defined(USE_EAP_TRACE_ALWAYS) |
|
346 |
|
347 |
|
348 eap_status_e handshake_failure_notification(); |
|
349 |
|
350 eap_status_e set_mac_addresses( |
|
351 const eap_am_network_id_c * const receive_network_id); |
|
352 |
|
353 EAP_FUNC_IMPORT eap_status_e save_parameters( |
|
354 const eapol_key_authentication_type_e authentication_type, |
|
355 const eap_variable_data_c * const authenticator_RSNA_IE, |
|
356 const eap_variable_data_c * const supplicant_RSNA_IE, |
|
357 const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e eapol_pairwise_cipher, |
|
358 const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e eapol_group_cipher); |
|
359 |
|
360 eap_status_e packet_data_session_key( |
|
361 eap_variable_data_c * const key, ///< Here is the key. |
|
362 const eapol_key_type_e key_type, ///< This the type of the key. |
|
363 const u32_t key_index, ///< This is the index of the key. |
|
364 const bool key_tx_bit, ///< This is the TX bit of the key. |
|
365 const u8_t * const key_RSC, ///< This is the RSC counter |
|
366 const u32_t key_RSC_size ///< This is the size of RSC counter |
|
367 ); |
|
368 |
|
369 EAP_FUNC_IMPORT eap_status_e check_is_aes_key_wrap_padding( |
|
370 const eapol_RSNA_key_descriptor_type_e current_key_data_type, |
|
371 eapol_rsna_key_data_header_c * const key_data_payload, |
|
372 const u32_t key_data_max_length |
|
373 ); |
|
374 |
|
375 EAP_FUNC_IMPORT eap_status_e parse_generic_key_data_payload( |
|
376 const eapol_key_descriptor_type_e key_descriptor_type, |
|
377 const eapol_RSNA_key_descriptor_type_e current_key_data_payload, |
|
378 eapol_rsna_key_data_header_c * const key_data_payload, |
|
379 u32_t * const key_data_max_length, |
|
380 eapol_rsna_key_data_payloads_c * const p_rsna_key_data_payloads, |
|
381 const eapol_key_state_e expected_key_message); |
|
382 |
|
383 EAP_FUNC_IMPORT eap_status_e parse_key_data( |
|
384 const eapol_key_descriptor_type_e key_descriptor_type, |
|
385 const eapol_rsna_key_data_header_c * const p_payload, |
|
386 u32_t * const buffer_length, |
|
387 eapol_rsna_key_data_payloads_c * const p_rsna_key_data_payloads, |
|
388 const eapol_key_state_e expected_key_message, |
|
389 const eapol_RSNA_key_header_c::key_descriptor_version_e key_descriptor_version); |
|
390 |
|
391 EAP_FUNC_IMPORT eap_status_e rsna_prf( |
|
392 const eap_variable_data_c * const key_K, |
|
393 const eap_variable_data_c * const label_A, |
|
394 const eap_variable_data_c * const input_B, |
|
395 const u32_t output_length, |
|
396 eap_variable_data_c * const output |
|
397 ); |
|
398 |
|
399 EAP_FUNC_IMPORT eap_status_e select_minimum( |
|
400 const eap_variable_data_c * const input_a, |
|
401 const eap_variable_data_c * const input_b, |
|
402 const eap_variable_data_c ** const minimum, |
|
403 const eap_variable_data_c ** const maximum); |
|
404 |
|
405 |
|
406 EAP_FUNC_IMPORT eap_status_e create_PMKID(); |
|
407 |
|
408 eap_status_e set_reassociation_parameters( |
|
409 const eap_variable_data_c * const pairwise_PMK_WPXK3, |
|
410 const eap_variable_data_c * const PMKID, |
|
411 const eap_variable_data_c * const transient_PTK, |
|
412 const eap_variable_data_c * const confirmation_KCK, |
|
413 const eap_variable_data_c * const encryption_KEK, |
|
414 const eap_variable_data_c * const temporal_TK, |
|
415 const eap_variable_data_c * const WPXM_WPXK1, |
|
416 const eap_variable_data_c * const WPXM_WPXK2, |
|
417 const u32_t WPXM_WPXC, |
|
418 const eapol_key_handshake_type_e eapol_key_handshake_type, |
|
419 const eapol_key_authentication_type_e authentication_type |
|
420 ); |
|
421 |
|
422 eap_status_e send_RC4_eapol_key_message( |
|
423 const eapol_RC4_key_flags_e flags); |
|
424 |
|
425 void send_error_notification(const eap_status_e error); |
|
426 |
|
427 eap_status_e save_keys_for_test_use( |
|
428 const eap_variable_data_c * const confirmation_KCK, |
|
429 const eap_variable_data_c * const encryption_KEK, |
|
430 const eap_variable_data_c * const temporal_TK, |
|
431 const u32_t WPXM_WPXC); |
|
432 |
|
433 EAP_KEY_TEST_PUBLIC_FUNCTION |
|
434 |
|
435 |
|
436 EAP_FUNC_IMPORT eap_status_e derive_PTK(); |
|
437 |
|
438 |
|
439 EAP_KEY_TEST_PRIVATE_FUNCTION |
|
440 |
|
441 |
|
442 EAP_FUNC_IMPORT eap_status_e derive_WPXM_WPXK1_WPXK2(); |
|
443 |
|
444 EAP_FUNC_IMPORT eap_status_e derive_WPXM_PTK(const u32_t WPXM_WPXC); |
|
445 |
|
446 EAP_FUNC_IMPORT eap_status_e verify_field_is_zero( |
|
447 const u8_t * const field, |
|
448 const u32_t field_length); |
|
449 |
|
450 EAP_FUNC_IMPORT eap_status_e encrypt_key_data( |
|
451 eapol_RSNA_key_header_c * const eapol_key_message); |
|
452 |
|
453 EAP_FUNC_IMPORT eap_status_e decrypt_key_data( |
|
454 eapol_RSNA_key_header_c * const eapol_key_message); |
|
455 |
|
456 |
|
457 EAP_FUNC_IMPORT eap_status_e create_key_mic( |
|
458 eapol_RSNA_key_header_c * const eapol_key_message, |
|
459 const eap_variable_data_c * const confirmation_key); |
|
460 |
|
461 EAP_FUNC_IMPORT eap_status_e verify_key_mic( |
|
462 eapol_RSNA_key_header_c * const eapol_key_message, |
|
463 const eap_variable_data_c * const confirmation_key); |
|
464 |
|
465 |
|
466 EAP_FUNC_IMPORT eap_status_e create_nonce( |
|
467 eap_variable_data_c * const nonce, |
|
468 const u32_t nonce_length); |
|
469 |
|
470 EAP_FUNC_IMPORT eap_status_e initialize_4_way_handshake( |
|
471 const eap_am_network_id_c * const receive_network_id, |
|
472 const eapol_protocol_version_e received_eapol_version); |
|
473 |
|
474 EAP_FUNC_IMPORT eap_status_e create_4_way_handshake_message_1( |
|
475 eap_buf_chain_wr_c * const sent_packet, |
|
476 const u32_t eapol_header_offset, |
|
477 u32_t * const data_length, |
|
478 u32_t * const buffer_length, |
|
479 const eapol_protocol_version_e received_eapol_version, |
|
480 const eapol_key_descriptor_type_e received_key_descriptor_type); |
|
481 |
|
482 EAP_FUNC_IMPORT eap_status_e create_4_way_handshake_message_2( |
|
483 eap_buf_chain_wr_c * const sent_packet, |
|
484 const u32_t eapol_header_offset, |
|
485 u32_t * const data_length, |
|
486 u32_t * const buffer_length, |
|
487 const u64_t received_key_replay_counter, |
|
488 const eapol_protocol_version_e received_eapol_version, |
|
489 const eapol_key_descriptor_type_e received_key_descriptor_type); |
|
490 |
|
491 EAP_FUNC_IMPORT eap_status_e create_4_way_handshake_message_3( |
|
492 eap_buf_chain_wr_c * const sent_packet, |
|
493 const u32_t eapol_header_offset, |
|
494 u32_t * const data_length, |
|
495 u32_t * const buffer_length, |
|
496 const eapol_protocol_version_e received_eapol_version, |
|
497 const eapol_key_descriptor_type_e received_key_descriptor_type); |
|
498 |
|
499 EAP_FUNC_IMPORT eap_status_e create_4_way_handshake_message_4( |
|
500 eap_buf_chain_wr_c * const sent_packet, |
|
501 const u32_t eapol_header_offset, |
|
502 u32_t * const data_length, |
|
503 u32_t * const buffer_length, |
|
504 const u64_t received_key_replay_counter, |
|
505 const bool received_secure_bit, |
|
506 const eapol_protocol_version_e received_eapol_version, |
|
507 const eapol_key_descriptor_type_e received_key_descriptor_type); |
|
508 |
|
509 EAP_FUNC_IMPORT eap_status_e process_4_way_handshake_message_2_payloads( |
|
510 const eap_am_network_id_c * const receive_network_id, |
|
511 eapol_RSNA_key_header_c * const eapol_key_message, |
|
512 const u32_t packet_length); |
|
513 |
|
514 EAP_FUNC_IMPORT eap_status_e process_4_way_handshake_message_3_payloads_a( |
|
515 const eap_am_network_id_c * const receive_network_id, |
|
516 eapol_RSNA_key_header_c * const eapol_key_message, |
|
517 const u32_t packet_length, |
|
518 bool * const group_key_received); |
|
519 |
|
520 EAP_FUNC_IMPORT eap_status_e process_4_way_handshake_message_3_payloads_b( |
|
521 const eap_am_network_id_c * const receive_network_id, |
|
522 eapol_RSNA_key_header_c * const eapol_key_message, |
|
523 const u32_t packet_length, |
|
524 const bool group_key_received); |
|
525 |
|
526 EAP_FUNC_IMPORT eap_status_e process_4_way_handshake_message_0( |
|
527 const eap_am_network_id_c * const receive_network_id, |
|
528 eapol_RSNA_key_header_c * const eapol_key_message, |
|
529 const u32_t packet_length); |
|
530 |
|
531 EAP_FUNC_IMPORT eap_status_e process_4_way_handshake_message_1( |
|
532 const eap_am_network_id_c * const receive_network_id, |
|
533 eapol_RSNA_key_header_c * const eapol_key_message, |
|
534 const u32_t packet_length); |
|
535 |
|
536 EAP_FUNC_IMPORT eap_status_e process_4_way_handshake_message_2( |
|
537 const eap_am_network_id_c * const receive_network_id, |
|
538 eapol_RSNA_key_header_c * const eapol_key_message, |
|
539 const u32_t packet_length); |
|
540 |
|
541 EAP_FUNC_IMPORT eap_status_e process_4_way_handshake_message_3( |
|
542 const eap_am_network_id_c * const receive_network_id, |
|
543 eapol_RSNA_key_header_c * const eapol_key_message, |
|
544 const u32_t packet_length); |
|
545 |
|
546 EAP_FUNC_IMPORT eap_status_e process_4_way_handshake_message_4( |
|
547 const eap_am_network_id_c * const receive_network_id, |
|
548 eapol_RSNA_key_header_c * const eapol_key_message, |
|
549 const u32_t packet_length); |
|
550 |
|
551 |
|
552 EAP_FUNC_IMPORT eap_status_e start_group_key_handshake( |
|
553 const eap_am_network_id_c * const receive_network_id, |
|
554 const eapol_protocol_version_e received_eapol_version, |
|
555 const eapol_key_descriptor_type_e received_key_descriptor_type); |
|
556 |
|
557 EAP_FUNC_IMPORT eap_status_e process_group_key_handshake_message_0( |
|
558 const eap_am_network_id_c * const receive_network_id, |
|
559 eapol_RSNA_key_header_c * const eapol_key_message, |
|
560 const u32_t packet_length); |
|
561 |
|
562 EAP_FUNC_IMPORT eap_status_e process_group_key_handshake_message_1( |
|
563 const eap_am_network_id_c * const receive_network_id, |
|
564 eapol_RSNA_key_header_c * const eapol_key_message, |
|
565 const u32_t packet_length); |
|
566 |
|
567 EAP_FUNC_IMPORT eap_status_e process_group_key_handshake_message_2( |
|
568 const eap_am_network_id_c * const receive_network_id, |
|
569 eapol_RSNA_key_header_c * const eapol_key_message, |
|
570 const u32_t packet_length); |
|
571 |
|
572 |
|
573 EAP_FUNC_IMPORT eap_status_e create_eapol_key_handshake_message_0( |
|
574 const bool true_when_4_way_handshake, ///< With false initiates Group Key Handshake. |
|
575 eap_buf_chain_wr_c * const sent_packet, |
|
576 const u32_t eapol_header_offset, |
|
577 u32_t * const data_length, |
|
578 u32_t * const buffer_length, |
|
579 const u64_t received_key_replay_counter, |
|
580 const eapol_protocol_version_e received_eapol_version); |
|
581 |
|
582 EAP_FUNC_IMPORT eap_status_e create_group_key_handshake_message_1( |
|
583 eap_buf_chain_wr_c * const sent_packet, |
|
584 const u32_t eapol_header_offset, |
|
585 u32_t * const data_length, |
|
586 u32_t * const buffer_length, |
|
587 const eapol_protocol_version_e received_eapol_version, |
|
588 const eapol_key_descriptor_type_e received_key_descriptor_type); |
|
589 |
|
590 EAP_FUNC_IMPORT eap_status_e create_group_key_handshake_message_2( |
|
591 eap_buf_chain_wr_c * const sent_packet, |
|
592 const u32_t eapol_header_offset, |
|
593 u32_t * const data_length, |
|
594 u32_t * const buffer_length, |
|
595 const u64_t received_key_replay_counter, |
|
596 const eapol_protocol_version_e received_eapol_version, |
|
597 const eapol_key_descriptor_type_e received_key_descriptor_type); |
|
598 |
|
599 |
|
600 EAP_FUNC_IMPORT eap_status_e process_4_way_handshake_message( |
|
601 const eap_am_network_id_c * const receive_network_id, |
|
602 eapol_RSNA_key_header_c * const eapol_key_message, |
|
603 const u32_t packet_length); |
|
604 |
|
605 EAP_FUNC_IMPORT eap_status_e process_group_key_handshake_message( |
|
606 const eap_am_network_id_c * const receive_network_id, |
|
607 eapol_RSNA_key_header_c * const eapol_key_message, |
|
608 const u32_t packet_length); |
|
609 |
|
610 EAP_FUNC_IMPORT eap_status_e process_RSNA_key_descriptor( |
|
611 const eap_am_network_id_c * const receive_network_id, |
|
612 eap_general_header_base_c * const packet_data, |
|
613 const u32_t packet_length); |
|
614 |
|
615 EAP_FUNC_IMPORT eap_status_e process_RC4_key_descriptor( |
|
616 const eap_am_network_id_c * const receive_network_id, |
|
617 eap_general_header_base_c * const packet_data, |
|
618 const u32_t packet_length); |
|
619 |
|
620 // This is documented in abs_eap_stack_interface_c::set_is_valid(). |
|
621 EAP_FUNC_IMPORT void set_is_valid(); |
|
622 |
|
623 // |
|
624 EAP_FUNC_IMPORT eap_variable_data_c * get_authenticator_RSNA_IE(); |
|
625 |
|
626 // |
|
627 EAP_FUNC_IMPORT eap_variable_data_c * get_unicast_cipher_suite_RSNA_IE(); |
|
628 |
|
629 // |
|
630 EAP_FUNC_IMPORT eap_variable_data_c * get_supplicant_RSNA_IE(); |
|
631 |
|
632 // |
|
633 EAP_FUNC_IMPORT eap_variable_data_c * get_received_PMKID(); |
|
634 |
|
635 // |
|
636 EAP_FUNC_IMPORT eap_variable_data_c * get_supplicant_MAC_address(); |
|
637 |
|
638 // |
|
639 EAP_FUNC_IMPORT eap_variable_data_c * get_authenticator_MAC_address(); |
|
640 |
|
641 // |
|
642 EAP_FUNC_IMPORT u64_t get_key_reply_counter(); |
|
643 |
|
644 // |
|
645 EAP_FUNC_IMPORT void increase_key_reply_counter(); |
|
646 |
|
647 // |
|
648 EAP_FUNC_IMPORT void set_key_reply_counter( |
|
649 const u64_t reply_counter); |
|
650 |
|
651 // |
|
652 EAP_FUNC_IMPORT u64_t get_client_send_key_reply_counter(); |
|
653 |
|
654 // |
|
655 EAP_FUNC_IMPORT void increase_client_send_key_reply_counter(); |
|
656 |
|
657 // |
|
658 EAP_FUNC_IMPORT void set_client_send_key_reply_counter( |
|
659 const u64_t reply_counter); |
|
660 |
|
661 // |
|
662 EAP_FUNC_IMPORT eap_variable_data_c * get_ANonce(); |
|
663 |
|
664 // |
|
665 EAP_FUNC_IMPORT eap_variable_data_c * get_SNonce(); |
|
666 |
|
667 // |
|
668 EAP_FUNC_IMPORT eap_variable_data_c * get_confirmation_KCK(); |
|
669 |
|
670 // |
|
671 EAP_FUNC_IMPORT eap_variable_data_c * get_encryption_KEK(); |
|
672 |
|
673 // |
|
674 EAP_FUNC_IMPORT void set_eapol_key_state(const eapol_key_state_e state); |
|
675 |
|
676 // |
|
677 EAP_FUNC_IMPORT eapol_key_state_e get_eapol_key_state() const; |
|
678 |
|
679 EAP_FUNC_IMPORT eap_status_e asynchronous_init_remove_eapol_key_state(); |
|
680 |
|
681 // |
|
682 EAP_FUNC_IMPORT eap_status_e packet_send( |
|
683 const eap_am_network_id_c * const send_network_id, |
|
684 eap_buf_chain_wr_c * const sent_packet, |
|
685 const u32_t header_offset, |
|
686 const u32_t data_length, |
|
687 const u32_t buffer_length); |
|
688 |
|
689 // |
|
690 EAP_FUNC_IMPORT eap_status_e resend_packet( |
|
691 const eap_am_network_id_c * const send_network_id, |
|
692 eap_buf_chain_wr_c * const sent_packet, |
|
693 const u32_t header_offset, |
|
694 const u32_t data_length, |
|
695 const u32_t buffer_length); |
|
696 |
|
697 // |
|
698 EAP_FUNC_IMPORT eap_status_e cancel_retransmission(); |
|
699 |
|
700 |
|
701 // |
|
702 EAP_FUNC_IMPORT eap_status_e cancel_handshake_timeout(); |
|
703 |
|
704 // |
|
705 EAP_FUNC_IMPORT eap_status_e init_handshake_timeout( |
|
706 const u32_t timeout); |
|
707 |
|
708 |
|
709 // |
|
710 eap_status_e cancel_reassociate_timeout(); |
|
711 |
|
712 // |
|
713 eap_status_e init_reassociate_timeout( |
|
714 const u32_t timeout); |
|
715 |
|
716 |
|
717 eap_status_e cancel_4_way_handshake_start_timeout(); |
|
718 |
|
719 eap_status_e init_4_way_handshake_start_timeout(); |
|
720 |
|
721 // |
|
722 EAP_FUNC_IMPORT eap_status_e cancel_pmksa_caching_timeout(); |
|
723 |
|
724 // |
|
725 EAP_FUNC_IMPORT eap_status_e init_retransmission( |
|
726 const eap_am_network_id_c * const send_network_id, |
|
727 eap_buf_chain_wr_c * const sent_packet, |
|
728 const u32_t header_offset, |
|
729 const u32_t data_length, |
|
730 const eap_code_value_e eap_code, |
|
731 const u8_t eap_identifier, |
|
732 const eap_type_value_e eap_type |
|
733 ); |
|
734 |
|
735 EAP_FUNC_IMPORT eap_status_e cancel_group_key_update_timeout(); |
|
736 |
|
737 EAP_FUNC_IMPORT eap_status_e init_group_key_update_timeout( |
|
738 const u32_t timeout); |
|
739 |
|
740 // |
|
741 EAP_FUNC_IMPORT eap_status_e create_tkip_mic_failure_message( |
|
742 eap_buf_chain_wr_c * const sent_packet, |
|
743 const u32_t eapol_header_offset, |
|
744 u32_t * const data_length, |
|
745 u32_t * const buffer_length, |
|
746 const eapol_RSNA_key_header_c::eapol_tkip_mic_failure_type_e tkip_mic_failure_type, |
|
747 const eapol_protocol_version_e received_eapol_version); |
|
748 |
|
749 |
|
750 EAP_FUNC_IMPORT bool get_is_RSNA(); |
|
751 |
|
752 EAP_FUNC_IMPORT bool get_is_WPA(); |
|
753 |
|
754 EAP_FUNC_IMPORT bool get_is_WPXM(); |
|
755 |
|
756 |
|
757 EAP_FUNC_IMPORT eap_status_e add_RSN_GTK_payload( |
|
758 const eapol_RSNA_key_header_c * const eapol_key_message, |
|
759 eap_variable_data_c * const group_GTK, |
|
760 u32_t * const eapol_data_length); |
|
761 |
|
762 EAP_FUNC_IMPORT eap_status_e add_RSN_IE_payload( |
|
763 const eapol_RSNA_key_header_c * const eapol_key_message, |
|
764 eap_variable_data_c * const RSNA_IE, |
|
765 u32_t * const eapol_data_length); |
|
766 |
|
767 EAP_FUNC_IMPORT eap_status_e get_key_length( |
|
768 const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e cipher, |
|
769 u16_t * const key_length); |
|
770 |
|
771 EAP_FUNC_IMPORT eap_status_e send_RC4_eapol_key_messages(); |
|
772 |
|
773 //-------------------------------------------------- |
|
774 protected: |
|
775 //-------------------------------------------------- |
|
776 |
|
777 //-------------------------------------------------- |
|
778 public: |
|
779 //-------------------------------------------------- |
|
780 |
|
781 // |
|
782 EAP_FUNC_IMPORT virtual ~eapol_key_state_c(); |
|
783 |
|
784 // |
|
785 EAP_FUNC_IMPORT eapol_key_state_c( |
|
786 abs_eap_am_tools_c * const tools, |
|
787 abs_eapol_key_state_c * const key_state_partner, |
|
788 abs_eapol_core_c * const eapol_partner, |
|
789 const bool is_client_when_true, |
|
790 const eap_am_network_id_c * const receive_network_id, |
|
791 const eapol_key_authentication_type_e authentication_type, |
|
792 const eap_variable_data_c * const authenticator_RSNA_IE, |
|
793 const eap_variable_data_c * const supplicant_RSNA_IE, |
|
794 const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e eapol_pairwise_cipher, |
|
795 const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e eapol_group_cipher, |
|
796 const eap_variable_data_c * const pre_shared_key); |
|
797 |
|
798 // |
|
799 EAP_FUNC_IMPORT eapol_key_state_c( |
|
800 abs_eap_am_tools_c * const tools, |
|
801 abs_eapol_key_state_c * const key_state_partner, |
|
802 abs_eapol_core_c * const eapol_partner, |
|
803 const bool is_client_when_true, |
|
804 const eap_am_network_id_c * const receive_network_id, |
|
805 const eapol_key_authentication_type_e authentication_type); |
|
806 |
|
807 |
|
808 EAP_FUNC_IMPORT eap_status_e initialize( |
|
809 const eap_am_network_id_c * const receive_network_id, |
|
810 const eapol_key_authentication_type_e authentication_type, |
|
811 const eap_variable_data_c * const authenticator_RSNA_IE, |
|
812 const eap_variable_data_c * const supplicant_RSNA_IE, |
|
813 const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e eapol_pairwise_cipher, |
|
814 const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e eapol_group_cipher, |
|
815 const eap_variable_data_c * const pre_shared_key); |
|
816 |
|
817 #if defined(USE_EAPOL_KEY_STATE) && defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE) |
|
818 |
|
819 EAP_FUNC_IMPORT eap_status_e initialize( |
|
820 const eap_am_network_id_c * const receive_network_id, |
|
821 const eapol_key_authentication_type_e authentication_type); |
|
822 |
|
823 #endif //#if defined(USE_EAPOL_KEY_STATE) && defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE) |
|
824 |
|
825 EAP_FUNC_IMPORT eapol_key_state_c *copy(const eap_am_network_id_c * const receive_network_id); |
|
826 |
|
827 EAP_FUNC_IMPORT bool get_is_encryption_on(); |
|
828 |
|
829 |
|
830 #if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE) |
|
831 |
|
832 EAP_FUNC_IMPORT bool get_is_associated(); |
|
833 |
|
834 #endif //#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE) |
|
835 |
|
836 |
|
837 // |
|
838 EAP_FUNC_IMPORT eap_status_e started_eap_authentication(); |
|
839 |
|
840 /** |
|
841 * This function checks whether cached PMKSA have correct cipher suite. |
|
842 */ |
|
843 EAP_FUNC_IMPORT eap_status_e check_pmksa_cache( |
|
844 const eapol_key_authentication_type_e selected_eapol_key_authentication_type, |
|
845 const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e pairwise_key_cipher_suite, |
|
846 const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e group_key_cipher_suite); |
|
847 |
|
848 EAP_FUNC_IMPORT eap_status_e initialize_preauthentication( |
|
849 const eap_am_network_id_c * const receive_network_id, |
|
850 const eapol_key_authentication_type_e authentication_type); |
|
851 |
|
852 EAP_FUNC_IMPORT eap_status_e read_reassociation_parameters( |
|
853 const eap_am_network_id_c * const receive_network_id, ///< source includes remote address, destination includes local address. |
|
854 const eapol_key_authentication_type_e authentication_type, |
|
855 eap_variable_data_c * const PMKID, |
|
856 const eap_variable_data_c * const received_WPA_ie, |
|
857 const eap_variable_data_c * const sent_WPA_ie); |
|
858 |
|
859 EAP_FUNC_IMPORT eap_status_e complete_reassociation( |
|
860 const eapol_wlan_authentication_state_e reassociation_result, |
|
861 const eap_am_network_id_c * const receive_network_id, |
|
862 const eapol_key_authentication_type_e authentication_type, |
|
863 const eap_variable_data_c * const received_WPA_IE, // WLM must give only the WPA IE to EAPOL |
|
864 const eap_variable_data_c * const sent_WPA_IE, |
|
865 const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e pairwise_key_cipher_suite, |
|
866 const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e group_key_cipher_suite); |
|
867 |
|
868 EAP_FUNC_IMPORT eap_status_e start_WPXM_reassociation( |
|
869 const eap_am_network_id_c * const receive_network_id, |
|
870 const eapol_key_authentication_type_e authentication_type, |
|
871 eap_variable_data_c * const send_reassociation_request_ie); |
|
872 |
|
873 EAP_FUNC_IMPORT eap_status_e complete_WPXM_reassociation( |
|
874 const eapol_wlan_authentication_state_e reassociation_result, |
|
875 const eap_am_network_id_c * const receive_network_id, |
|
876 const eapol_key_authentication_type_e authentication_type, |
|
877 const eap_variable_data_c * const received_reassociation_ie); |
|
878 |
|
879 EAP_FUNC_IMPORT eap_status_e configure(); |
|
880 |
|
881 EAP_FUNC_IMPORT eap_status_e shutdown(); |
|
882 |
|
883 EAP_FUNC_IMPORT eap_status_e set_WPXM_parameters( |
|
884 const eap_am_network_id_c * const receive_network_id); |
|
885 |
|
886 EAP_FUNC_IMPORT eap_status_e set_s_nonce( |
|
887 const eap_variable_data_c * const s_nonce); |
|
888 |
|
889 EAP_FUNC_IMPORT eap_status_e set_pairwise_PMK( |
|
890 const eap_variable_data_c * const key, |
|
891 const eap_am_network_id_c * const send_network_id); |
|
892 |
|
893 EAP_FUNC_IMPORT eap_status_e allow_4_way_handshake(); |
|
894 |
|
895 EAP_FUNC_IMPORT eap_status_e start_4_way_handshake( |
|
896 const eap_am_network_id_c * const receive_network_id); |
|
897 |
|
898 // |
|
899 EAP_FUNC_IMPORT eap_status_e process_eapol_key_frame( |
|
900 const eap_am_network_id_c * const receive_network_id, |
|
901 eap_general_header_base_c * const packet_data, |
|
902 const u32_t packet_length); |
|
903 |
|
904 // This is documented in abs_eap_stack_interface_c::get_is_valid(). |
|
905 EAP_FUNC_IMPORT bool get_is_valid(); |
|
906 |
|
907 /** |
|
908 * The object_increase_reference_count() function increases the reference count. |
|
909 */ |
|
910 EAP_FUNC_IMPORT void object_increase_reference_count(); |
|
911 |
|
912 /** |
|
913 * The object_decrease_reference_count () function decreases |
|
914 * the reference count and returns the remaining value. |
|
915 * The EAP type is removed after there is no references to it. |
|
916 */ |
|
917 EAP_FUNC_IMPORT u32_t object_decrease_reference_count(); |
|
918 |
|
919 // See abs_eap_base_timer_c::timer_expired(). |
|
920 EAP_FUNC_IMPORT eap_status_e timer_expired( |
|
921 const u32_t id, void *data); |
|
922 |
|
923 // See abs_eap_base_timer_c::timer_delete_data(). |
|
924 EAP_FUNC_IMPORT eap_status_e timer_delete_data( |
|
925 const u32_t id, void *data); |
|
926 |
|
927 /** |
|
928 * Gets flag whether this session is marked removed. |
|
929 * Session is removed later if it is not reused. |
|
930 */ |
|
931 EAP_FUNC_IMPORT bool get_marked_removed(); |
|
932 |
|
933 /** |
|
934 * Marks this session removed. |
|
935 * Session is removed later if it is not reused. |
|
936 */ |
|
937 EAP_FUNC_IMPORT void set_marked_removed(); |
|
938 |
|
939 /** |
|
940 * Marks this session not removed. |
|
941 * Session is not removed it is reused. |
|
942 */ |
|
943 EAP_FUNC_IMPORT void unset_marked_removed(); |
|
944 |
|
945 /** |
|
946 * This function resets object partially. |
|
947 * Member attributes needed in reassociation are left untouched. |
|
948 */ |
|
949 EAP_FUNC_IMPORT eap_status_e reset_cached_pmksa(); |
|
950 |
|
951 /** |
|
952 * This function resets the full state of object to same as |
|
953 * state was after the configure() function call. |
|
954 * If object reset succeeds this function must return eap_status_ok. |
|
955 * If object reset fails this function must return corresponding error status. |
|
956 * @return This function returns the status of reset operation. |
|
957 */ |
|
958 EAP_FUNC_IMPORT eap_status_e reset(); |
|
959 |
|
960 EAP_FUNC_IMPORT eap_status_e tkip_mic_failure( |
|
961 const bool fatal_failure_when_true, |
|
962 const eapol_RSNA_key_header_c::eapol_tkip_mic_failure_type_e tkip_mic_failure_type); |
|
963 |
|
964 // |
|
965 EAP_FUNC_IMPORT eap_status_e init_pmksa_caching_timeout(); |
|
966 |
|
967 // |
|
968 EAP_FUNC_IMPORT eap_status_e cancel_authentication_session(); |
|
969 |
|
970 //-------------------------------------------------- |
|
971 }; // class eapol_key_state_c |
|
972 |
|
973 |
|
974 //-------------------------------------------------- |
|
975 |
|
976 #endif //#if !defined(_EAPOL_KEY_STATE_H_) |
|
977 |
|
978 //-------------------------------------------------- |
|
979 |
|
980 |
|
981 // End. |