|
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 * %version: % |
|
20 */ |
|
21 |
|
22 // This is enumeration of EAPOL source code. |
|
23 #if defined(USE_EAP_MINIMUM_RELEASE_TRACES) |
|
24 #undef EAP_FILE_NUMBER_ENUM |
|
25 #define EAP_FILE_NUMBER_ENUM 44 |
|
26 #undef EAP_FILE_NUMBER_DATE |
|
27 #define EAP_FILE_NUMBER_DATE 1127594498 |
|
28 #endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES) |
|
29 |
|
30 |
|
31 |
|
32 #include "eap_am_memory.h" |
|
33 #include "eap_tools.h" |
|
34 #include "dummy_eap_core.h" |
|
35 #include "eap_core_nak_info.h" |
|
36 #include "eap_state_notification.h" |
|
37 #include "eap_network_id_selector.h" |
|
38 #include "eap_buffer.h" |
|
39 #include "eap_header_string.h" |
|
40 #include "eap_automatic_variable.h" |
|
41 |
|
42 |
|
43 //-------------------------------------------------- |
|
44 |
|
45 // |
|
46 EAP_FUNC_EXPORT dummy_eap_core_c::~dummy_eap_core_c() |
|
47 { |
|
48 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
49 |
|
50 EAP_TRACE_DEBUG( |
|
51 m_am_tools, |
|
52 TRACE_FLAGS_DEFAULT, |
|
53 (EAPL("dummy_eap_core_c::~dummy_eap_core_c: ") |
|
54 EAPL("this = 0x%08x\n"), |
|
55 this)); |
|
56 |
|
57 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
58 } |
|
59 |
|
60 //-------------------------------------------------- |
|
61 |
|
62 #if defined(_WIN32) && !defined(__GNUC__) |
|
63 #pragma warning( disable : 4355 ) // 'this' : used in base member initializer list |
|
64 #endif |
|
65 |
|
66 // |
|
67 EAP_FUNC_EXPORT dummy_eap_core_c::dummy_eap_core_c( |
|
68 abs_eap_am_tools_c * const tools, |
|
69 abs_eap_core_c * const partner, |
|
70 const bool is_client_when_true, |
|
71 const eap_am_network_id_c * const receive_network_id, |
|
72 const bool is_tunneled_eap) |
|
73 : m_partner(partner) |
|
74 , m_am_tools(tools) |
|
75 , m_type_map(tools, this) |
|
76 , m_current_eap_type(eap_type_none) |
|
77 , m_default_eap_type(eap_type_none) |
|
78 , m_eap_identity(tools) |
|
79 , m_eap_header_offset(0u) |
|
80 , m_MTU(0u) |
|
81 , m_trailer_length(0u) |
|
82 , m_receive_network_id(tools) |
|
83 , m_retransmission(0) |
|
84 , m_retransmission_time(EAP_CORE_RETRANSMISSION_TIME) |
|
85 , m_retransmission_counter(EAP_CORE_RETRANSMISSION_COUNTER) |
|
86 , m_session_timeout(EAP_CORE_SESSION_TIMEOUT) |
|
87 , m_eap_core_failure_received_timeout(EAP_CORE_FAILURE_RECEIVED_TIMEOUT) |
|
88 , m_remove_session_timeout(EAP_CORE_REMOVE_SESSION_TIMEOUT) |
|
89 #if defined(USE_EAP_CORE_WAIT_REQUEST_TYPE_TIMER) |
|
90 , m_wait_eap_request_type_timeout(EAP_CORE_WAIT_EAP_REQUEST_TYPE_TIMEOUT) |
|
91 , m_wait_eap_request_type_timeout_set(false) |
|
92 #endif //#if defined(USE_EAP_CORE_WAIT_REQUEST_TYPE_TIMER) |
|
93 , m_eap_identity_request_identifier_client(0) |
|
94 , m_is_client(is_client_when_true) |
|
95 , m_is_client_role(is_client_when_true) |
|
96 , m_is_valid(false) |
|
97 , m_client_restart_authentication_initiated(false) |
|
98 , m_marked_removed(false) |
|
99 , m_eap_identity_response_accepted(false) |
|
100 , m_shutdown_was_called(false) |
|
101 , m_eap_type_response_sent(false) |
|
102 , m_is_tunneled_eap(is_tunneled_eap) |
|
103 #if defined(USE_EAP_CORE_SERVER) |
|
104 , m_process_eap_nak_immediately(EAP_CORE_PROCESS_EAP_NAK_IMMEDIATELY) |
|
105 , m_nak_process_timer_active(false) |
|
106 , m_eap_identity_request_send(false) |
|
107 , m_eap_identity_response_received(false) |
|
108 , m_eap_failure_sent(false) |
|
109 , m_send_eap_success_after_notification(false) |
|
110 #if defined(USE_EAP_CORE_WAIT_REQUEST_TYPE_TIMER) |
|
111 , m_skip_eap_request_identity(false) |
|
112 #endif //#if defined(USE_EAP_CORE_WAIT_REQUEST_TYPE_TIMER) |
|
113 #endif //#if defined(USE_EAP_CORE_SERVER) |
|
114 , m_use_eap_expanded_type(false) |
|
115 , m_ignore_eap_failure(false) |
|
116 , m_ignore_notifications(false) |
|
117 { |
|
118 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
119 |
|
120 EAP_TRACE_DEBUG( |
|
121 m_am_tools, |
|
122 TRACE_FLAGS_DEFAULT, |
|
123 (EAPL("ummy_eap_core_c::dummy_eap_core_c: ") |
|
124 EAPL("this = 0x%08x\n"), |
|
125 this)); |
|
126 |
|
127 set_is_valid(); |
|
128 |
|
129 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
130 } |
|
131 |
|
132 //-------------------------------------------------- |
|
133 |
|
134 // |
|
135 EAP_FUNC_EXPORT abs_eap_core_c * dummy_eap_core_c::get_partner() |
|
136 { |
|
137 |
|
138 return m_partner; |
|
139 } |
|
140 |
|
141 //-------------------------------------------------- |
|
142 |
|
143 // |
|
144 EAP_FUNC_EXPORT void dummy_eap_core_c::set_partner(abs_eap_core_c * const partner) |
|
145 { |
|
146 |
|
147 m_partner = partner; |
|
148 } |
|
149 |
|
150 //-------------------------------------------------- |
|
151 |
|
152 // |
|
153 EAP_FUNC_EXPORT void dummy_eap_core_c::set_is_valid() |
|
154 { |
|
155 m_is_valid = true; |
|
156 } |
|
157 |
|
158 //-------------------------------------------------- |
|
159 |
|
160 // |
|
161 EAP_FUNC_EXPORT bool dummy_eap_core_c::get_is_valid() |
|
162 { |
|
163 return m_is_valid; |
|
164 } |
|
165 |
|
166 //-------------------------------------------------- |
|
167 |
|
168 // |
|
169 EAP_FUNC_EXPORT void dummy_eap_core_c::object_increase_reference_count() |
|
170 { |
|
171 } |
|
172 |
|
173 //-------------------------------------------------- |
|
174 |
|
175 // |
|
176 EAP_FUNC_EXPORT u32_t dummy_eap_core_c::object_decrease_reference_count() |
|
177 { |
|
178 return 0u; |
|
179 } |
|
180 |
|
181 //-------------------------------------------------- |
|
182 |
|
183 // |
|
184 EAP_FUNC_EXPORT bool dummy_eap_core_c::get_marked_removed() |
|
185 { |
|
186 return false; |
|
187 } |
|
188 |
|
189 //-------------------------------------------------- |
|
190 |
|
191 // |
|
192 EAP_FUNC_EXPORT void dummy_eap_core_c::set_marked_removed() |
|
193 { |
|
194 } |
|
195 |
|
196 //-------------------------------------------------- |
|
197 |
|
198 // |
|
199 EAP_FUNC_EXPORT void dummy_eap_core_c::unset_marked_removed() |
|
200 { |
|
201 } |
|
202 |
|
203 |
|
204 //-------------------------------------------------- |
|
205 |
|
206 // |
|
207 EAP_FUNC_EXPORT void dummy_eap_core_c::ignore_notifications() |
|
208 { |
|
209 } |
|
210 |
|
211 //-------------------------------------------------- |
|
212 |
|
213 // |
|
214 eap_status_e dummy_eap_core_c::initialize_asynchronous_init_remove_eap_session( |
|
215 const u32_t remove_session_timeout) |
|
216 { |
|
217 EAP_TRACE_DEBUG( |
|
218 m_am_tools, |
|
219 TRACE_FLAGS_DEFAULT, |
|
220 (EAPL("dummy_eap_core_c::initialize_asynchronous_init_remove_eap_session(): %s.\n"), |
|
221 (m_is_client == true) ? "client": "server")); |
|
222 |
|
223 eap_status_e status = eap_status_process_general_error; |
|
224 |
|
225 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
226 return EAP_STATUS_RETURN(m_am_tools, status); |
|
227 } |
|
228 |
|
229 //-------------------------------------------------- |
|
230 |
|
231 eap_status_e dummy_eap_core_c::cancel_asynchronous_init_remove_eap_session() |
|
232 { |
|
233 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
234 |
|
235 eap_status_e status = eap_status_process_general_error; |
|
236 |
|
237 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
238 return EAP_STATUS_RETURN(m_am_tools, status); |
|
239 } |
|
240 |
|
241 //-------------------------------------------------- |
|
242 |
|
243 // |
|
244 eap_status_e dummy_eap_core_c::asynchronous_init_remove_eap_session() |
|
245 { |
|
246 EAP_TRACE_DEBUG( |
|
247 m_am_tools, |
|
248 TRACE_FLAGS_DEFAULT, |
|
249 (EAPL("dummy_eap_core_c::asynchronous_init_remove_eap_session(): %s.\n"), |
|
250 (m_is_client == true) ? "client": "server")); |
|
251 |
|
252 eap_status_e status = eap_status_process_general_error; |
|
253 |
|
254 return EAP_STATUS_RETURN(m_am_tools, status); |
|
255 } |
|
256 |
|
257 //-------------------------------------------------- |
|
258 |
|
259 // |
|
260 eap_status_e dummy_eap_core_c::init_end_of_session( |
|
261 const abs_eap_state_notification_c * const state) |
|
262 { |
|
263 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
264 |
|
265 EAP_TRACE_DEBUG( |
|
266 m_am_tools, |
|
267 TRACE_FLAGS_DEFAULT, |
|
268 (EAPL("dummy_eap_core_c::init_end_of_session(): %s.\n"), |
|
269 (m_is_client == true) ? "client": "server")); |
|
270 |
|
271 eap_status_e status(eap_status_process_general_error); |
|
272 |
|
273 |
|
274 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
275 return EAP_STATUS_RETURN(m_am_tools, status); |
|
276 } |
|
277 |
|
278 //-------------------------------------------------- |
|
279 |
|
280 EAP_FUNC_EXPORT void dummy_eap_core_c::state_notification( |
|
281 const abs_eap_state_notification_c * const state) |
|
282 { |
|
283 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
284 |
|
285 |
|
286 |
|
287 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
288 } |
|
289 |
|
290 //-------------------------------------------------- |
|
291 |
|
292 // |
|
293 EAP_FUNC_EXPORT eap_base_type_c * dummy_eap_core_c::load_type( |
|
294 const eap_type_value_e type, |
|
295 const eap_type_value_e tunneling_type, |
|
296 const eap_am_network_id_c * const receive_network_id) |
|
297 { |
|
298 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
299 |
|
300 eap_base_type_c *handler = 0; |
|
301 |
|
302 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
303 return handler; |
|
304 } |
|
305 |
|
306 //-------------------------------------------------- |
|
307 |
|
308 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::check_is_valid_eap_type(const eap_type_value_e eap_type) |
|
309 { |
|
310 eap_status_e status = eap_status_process_general_error; |
|
311 |
|
312 return EAP_STATUS_RETURN(m_am_tools, status); |
|
313 } |
|
314 |
|
315 //-------------------------------------------------- |
|
316 |
|
317 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::get_eap_type_list( |
|
318 eap_array_c<eap_type_value_e> * const eap_type_list) |
|
319 { |
|
320 eap_status_e status = eap_status_process_general_error; |
|
321 |
|
322 return EAP_STATUS_RETURN(m_am_tools, status); |
|
323 } |
|
324 |
|
325 //-------------------------------------------------- |
|
326 |
|
327 // |
|
328 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::initialize_session_timeout(const u32_t session_timeout_ms) |
|
329 { |
|
330 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
331 |
|
332 eap_status_e status = eap_status_process_general_error; |
|
333 |
|
334 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
335 return EAP_STATUS_RETURN(m_am_tools, status); |
|
336 } |
|
337 |
|
338 //-------------------------------------------------- |
|
339 |
|
340 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::cancel_session_timeout() |
|
341 { |
|
342 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
343 |
|
344 eap_status_e status = eap_status_process_general_error; |
|
345 |
|
346 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
347 return EAP_STATUS_RETURN(m_am_tools, status); |
|
348 } |
|
349 |
|
350 //-------------------------------------------------- |
|
351 |
|
352 EAP_FUNC_EXPORT void dummy_eap_core_c::trace_eap_packet( |
|
353 eap_const_string prefix, |
|
354 const eap_header_wr_c * const eap_header) |
|
355 { |
|
356 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
357 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
358 |
|
359 } |
|
360 |
|
361 |
|
362 //-------------------------------------------------- |
|
363 |
|
364 #if defined(USE_EAP_CORE_SERVER) |
|
365 |
|
366 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::restart_with_new_type( |
|
367 const eap_type_value_e used_eap_type, |
|
368 const eap_am_network_id_c * const receive_network_id, |
|
369 const u8_t eap_identifier) |
|
370 { |
|
371 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
372 |
|
373 eap_status_e status = eap_status_process_general_error; |
|
374 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
375 return EAP_STATUS_RETURN(m_am_tools, status); |
|
376 } |
|
377 |
|
378 #endif //#if defined(USE_EAP_CORE_SERVER) |
|
379 |
|
380 //-------------------------------------------------- |
|
381 |
|
382 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::client_proposes_eap_types( |
|
383 const eap_am_network_id_c * const receive_network_id, |
|
384 const u8_t eap_identifier) |
|
385 { |
|
386 |
|
387 /** |
|
388 * @{ 2005-04-19 complete Expanded Nak Type to client_proposes_eap_types(). } |
|
389 */ |
|
390 eap_status_e status = eap_status_process_general_error; |
|
391 |
|
392 |
|
393 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
394 return EAP_STATUS_RETURN(m_am_tools, status); |
|
395 } |
|
396 |
|
397 //-------------------------------------------------- |
|
398 |
|
399 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::packet_process_type( |
|
400 const eap_type_value_e used_eap_type, |
|
401 const eap_am_network_id_c * const receive_network_id, |
|
402 eap_general_header_base_c * const packet_data, |
|
403 const u32_t packet_length) |
|
404 { |
|
405 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
406 |
|
407 EAP_TRACE_DEBUG( |
|
408 m_am_tools, |
|
409 TRACE_FLAGS_DEFAULT, |
|
410 (EAPL("dummy_eap_core_c::packet_process_type(): %s\n"), |
|
411 (m_is_client == true) ? "client": "server")); |
|
412 |
|
413 |
|
414 eap_status_e status = eap_status_process_general_error; |
|
415 |
|
416 |
|
417 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
418 return EAP_STATUS_RETURN(m_am_tools, status); |
|
419 } |
|
420 |
|
421 //-------------------------------------------------- |
|
422 |
|
423 /** |
|
424 * @{ 2003-10-01 draft-ietf-eap-rfc2284bis-06.txt chapter 2.1 Support for sequences: |
|
425 * An EAP conversation MAY utilize a sequence of methods. A common |
|
426 * example of this is an Identity request followed by a single EAP |
|
427 * authentication method such as an MD5-Challenge. However the peer and |
|
428 * authenticator MUST utilize only one authentication method (Type 4 or |
|
429 * greater) within an EAP conversation, after which the authenticator |
|
430 * MUST send a Success or Failure packet. |
|
431 * Once a peer has sent a Response of the same Type as the initial |
|
432 * Request, an authenticator MUST NOT send a Request of a different Type |
|
433 * prior to completion of the final round of a given method (with the |
|
434 * exception of a Notification-Request) and MUST NOT send a Request for |
|
435 * an additional method of any Type after completion of the initial |
|
436 * authentication method; a peer receiving such Requests MUST treat them |
|
437 * as invalid, and silently discard them. As a result, Identity Requery |
|
438 * is not supported. |
|
439 * A peer MUST NOT send a Nak (legacy or expanded) in reply to a |
|
440 * Request, after an initial non-Nak Response has been sent. Since |
|
441 * spoofed EAP Request packets may be sent by an attacker, an |
|
442 * authenticator receiving an unexpected Nak SHOULD discard it and log |
|
443 * the event. |
|
444 * Multiple authentication methods within an EAP conversation are not |
|
445 * supported due to their vulnerability to man-in-the-middle attacks |
|
446 * (see Section 7.4) and incompatibility with existing implementations. |
|
447 * } |
|
448 */ |
|
449 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::packet_process( |
|
450 const eap_am_network_id_c * const receive_network_id, |
|
451 eap_general_header_base_c * const packet_data, |
|
452 const u32_t packet_length) |
|
453 { |
|
454 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
455 |
|
456 EAP_TRACE_DEBUG( |
|
457 m_am_tools, |
|
458 TRACE_FLAGS_DEFAULT, |
|
459 (EAPL("dummy_eap_core_c::packet_process(): %s\n"), |
|
460 (m_is_client == true) ? "client": "server")); |
|
461 |
|
462 EAP_TRACE_RETURN_STRING(m_am_tools, "returns: dummy_eap_core_c::packet_process()"); |
|
463 |
|
464 eap_status_e status = eap_status_process_general_error; |
|
465 |
|
466 |
|
467 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
468 return EAP_STATUS_RETURN(m_am_tools, status); |
|
469 } |
|
470 |
|
471 //-------------------------------------------------- |
|
472 |
|
473 // |
|
474 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::packet_send( |
|
475 const eap_am_network_id_c * const send_network_id, |
|
476 eap_buf_chain_wr_c * const sent_packet, |
|
477 const u32_t header_offset, |
|
478 const u32_t data_length, |
|
479 const u32_t buffer_length) |
|
480 { |
|
481 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
482 |
|
483 eap_status_e status = eap_status_process_general_error; |
|
484 |
|
485 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
486 return EAP_STATUS_RETURN(m_am_tools, status); |
|
487 } |
|
488 |
|
489 //-------------------------------------------------- |
|
490 |
|
491 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::resend_packet( |
|
492 const eap_am_network_id_c * const send_network_id, |
|
493 eap_buf_chain_wr_c * const sent_packet, |
|
494 const u32_t header_offset, |
|
495 const u32_t data_length, |
|
496 const u32_t buffer_length, |
|
497 const u32_t retransmission_counter) |
|
498 { |
|
499 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
500 |
|
501 eap_status_e status = eap_status_process_general_error; |
|
502 |
|
503 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
504 return EAP_STATUS_RETURN(m_am_tools, status); |
|
505 } |
|
506 |
|
507 //-------------------------------------------------- |
|
508 |
|
509 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::cancel_retransmission() |
|
510 { |
|
511 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
512 |
|
513 eap_status_e status = eap_status_process_general_error; |
|
514 |
|
515 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
516 return EAP_STATUS_RETURN(m_am_tools, status); |
|
517 } |
|
518 |
|
519 //-------------------------------------------------- |
|
520 |
|
521 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::init_retransmission( |
|
522 const eap_am_network_id_c * const send_network_id, |
|
523 eap_buf_chain_wr_c * const sent_packet, |
|
524 const u32_t header_offset, |
|
525 const u32_t data_length, |
|
526 const eap_code_value_e eap_code, |
|
527 const u8_t eap_identifier, |
|
528 const eap_type_value_e eap_type |
|
529 ) |
|
530 { |
|
531 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
532 eap_status_e status = eap_status_process_general_error; |
|
533 |
|
534 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
535 return EAP_STATUS_RETURN(m_am_tools, status); |
|
536 |
|
537 } |
|
538 |
|
539 //-------------------------------------------------- |
|
540 |
|
541 // |
|
542 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::set_eap_failure_timeout() |
|
543 { |
|
544 eap_status_e status = eap_status_process_general_error; |
|
545 |
|
546 return EAP_STATUS_RETURN(m_am_tools, status); |
|
547 } |
|
548 |
|
549 //-------------------------------------------------- |
|
550 |
|
551 // |
|
552 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::cancel_eap_failure_timeout() |
|
553 { |
|
554 eap_status_e status = eap_status_process_general_error; |
|
555 |
|
556 return EAP_STATUS_RETURN(m_am_tools, status); |
|
557 |
|
558 } |
|
559 |
|
560 //-------------------------------------------------- |
|
561 |
|
562 #if defined(USE_EAP_CORE_WAIT_REQUEST_TYPE_TIMER) |
|
563 |
|
564 // |
|
565 eap_status_e dummy_eap_core_c::set_wait_eap_request_type_timeout() |
|
566 { |
|
567 |
|
568 eap_status_e status = eap_status_process_general_error; |
|
569 |
|
570 return EAP_STATUS_RETURN(m_am_tools, status); |
|
571 } |
|
572 |
|
573 #endif //#if defined(USE_EAP_CORE_WAIT_REQUEST_TYPE_TIMER) |
|
574 |
|
575 //-------------------------------------------------- |
|
576 |
|
577 #if defined(USE_EAP_CORE_WAIT_REQUEST_TYPE_TIMER) |
|
578 |
|
579 // |
|
580 eap_status_e dummy_eap_core_c::cancel_wait_eap_request_type_timeout() |
|
581 { |
|
582 eap_status_e status = eap_status_process_general_error; |
|
583 |
|
584 return EAP_STATUS_RETURN(m_am_tools, status); |
|
585 |
|
586 } |
|
587 |
|
588 #endif //#if defined(USE_EAP_CORE_WAIT_REQUEST_TYPE_TIMER) |
|
589 |
|
590 //-------------------------------------------------- |
|
591 |
|
592 // |
|
593 EAP_FUNC_EXPORT u32_t dummy_eap_core_c::get_header_offset( |
|
594 u32_t * const MTU, |
|
595 u32_t * const trailer_length) |
|
596 { |
|
597 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
598 |
|
599 const u32_t offset = 0; |
|
600 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
601 |
|
602 EAP_TRACE_DEBUG( |
|
603 m_am_tools, |
|
604 TRACE_FLAGS_DEFAULT, |
|
605 (EAPL("dummy_eap_core_c::get_header_offset(): offset=%d, MTU=%d, trailer_length=%d\n"), |
|
606 offset, |
|
607 *MTU, |
|
608 *trailer_length)); |
|
609 |
|
610 return offset; |
|
611 } |
|
612 |
|
613 //-------------------------------------------------- |
|
614 |
|
615 // |
|
616 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::load_module( |
|
617 const eap_type_value_e type, |
|
618 const eap_type_value_e tunneling_type, |
|
619 abs_eap_base_type_c * const partner, |
|
620 eap_base_type_c ** const handler, |
|
621 const bool is_client_when_true, |
|
622 const eap_am_network_id_c * const receive_network_id) |
|
623 { |
|
624 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
625 |
|
626 eap_status_e status = eap_status_process_general_error; |
|
627 |
|
628 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
629 return EAP_STATUS_RETURN(m_am_tools, status); |
|
630 } |
|
631 |
|
632 //-------------------------------------------------- |
|
633 |
|
634 // |
|
635 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::configure() |
|
636 { |
|
637 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
638 |
|
639 #if !defined(USE_EAP_DEBUG_TRACE) |
|
640 EAP_TRACE_ALWAYS( |
|
641 m_am_tools, |
|
642 TRACE_FLAGS_DEFAULT, |
|
643 (EAPL("dummy_eap_core_c::configure(): %s: %s.\n"), |
|
644 ((m_is_client == true) ? "client": "server"), |
|
645 (m_is_tunneled_eap == true) ? "tunneled": "outer most")); |
|
646 #else |
|
647 EAP_TRACE_ALWAYS( |
|
648 m_am_tools, |
|
649 TRACE_FLAGS_DEFAULT, |
|
650 (EAPL("dummy_eap_core_c::configure(): %s: %s, this = 0x%08x => 0x%08x.\n"), |
|
651 ((m_is_client == true) ? "client": "server"), |
|
652 (m_is_tunneled_eap == true) ? "tunneled": "outer most", |
|
653 this, |
|
654 dynamic_cast<abs_eap_base_timer_c *>(this))); |
|
655 #endif |
|
656 |
|
657 EAP_TRACE_RETURN_STRING(m_am_tools, "returns: dummy_eap_core_c::configure()"); |
|
658 |
|
659 eap_status_e status(eap_status_process_general_error); |
|
660 |
|
661 |
|
662 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
663 return EAP_STATUS_RETURN(m_am_tools, status); |
|
664 } |
|
665 |
|
666 //-------------------------------------------------- |
|
667 |
|
668 // |
|
669 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::shutdown_operation( |
|
670 eap_base_type_c * const handler, |
|
671 abs_eap_am_tools_c * const m_am_tools) |
|
672 { |
|
673 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
674 |
|
675 EAP_UNREFERENCED_PARAMETER(m_am_tools); |
|
676 |
|
677 EAP_TRACE_ALWAYS( |
|
678 m_am_tools, |
|
679 TRACE_FLAGS_DEFAULT, |
|
680 (EAPL("dummy_eap_core_c::shutdown_operation(): handler=0x%08x.\n"), |
|
681 handler)); |
|
682 |
|
683 eap_status_e status(eap_status_process_general_error); |
|
684 |
|
685 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
686 return EAP_STATUS_RETURN(m_am_tools, status); |
|
687 } |
|
688 |
|
689 //-------------------------------------------------- |
|
690 |
|
691 // |
|
692 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::shutdown() |
|
693 { |
|
694 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
695 |
|
696 eap_status_e status(eap_status_ok); |
|
697 |
|
698 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
699 return EAP_STATUS_RETURN(m_am_tools, status); |
|
700 } |
|
701 |
|
702 //-------------------------------------------------- |
|
703 |
|
704 // |
|
705 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::unload_module(const eap_type_value_e type) |
|
706 { |
|
707 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
708 |
|
709 eap_status_e status(eap_status_process_general_error); |
|
710 |
|
711 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
712 return EAP_STATUS_RETURN(m_am_tools, status); |
|
713 } |
|
714 |
|
715 //-------------------------------------------------- |
|
716 |
|
717 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::eap_acknowledge( |
|
718 const eap_am_network_id_c * const receive_network_id) |
|
719 { |
|
720 // Any Network Protocol packet is accepted as a success indication. |
|
721 // This is described in RFC 2284 "PPP Extensible Authentication Protocol (EAP)". |
|
722 |
|
723 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
724 |
|
725 eap_status_e status(eap_status_process_general_error); |
|
726 |
|
727 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
728 return EAP_STATUS_RETURN(m_am_tools, status); |
|
729 } |
|
730 |
|
731 //-------------------------------------------------- |
|
732 |
|
733 // |
|
734 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::restart_authentication( |
|
735 const eap_am_network_id_c * const send_network_id, |
|
736 const bool is_client_when_true) |
|
737 { |
|
738 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
739 |
|
740 eap_status_e status = eap_status_process_general_error; |
|
741 |
|
742 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
743 return EAP_STATUS_RETURN(m_am_tools, status); |
|
744 } |
|
745 |
|
746 //-------------------------------------------------- |
|
747 |
|
748 #if defined(USE_EAP_CORE_SERVER) |
|
749 |
|
750 // |
|
751 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::send_eap_identity_request( |
|
752 const eap_am_network_id_c * const receive_network_id) |
|
753 { |
|
754 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
755 |
|
756 eap_status_e status = eap_status_process_general_error; |
|
757 |
|
758 EAP_TRACE_DEBUG( |
|
759 m_am_tools, |
|
760 TRACE_FLAGS_DEFAULT, |
|
761 (EAPL("dummy_eap_core_c::send_eap_identity_request(): %s, %s\n"), |
|
762 (m_is_client == true) ? "client": "server", |
|
763 (m_is_tunneled_eap == true) ? "tunneled": "outer most" |
|
764 )); |
|
765 |
|
766 EAP_TRACE_RETURN_STRING(m_am_tools, "returns: dummy_eap_core_c::send_eap_identity_request()"); |
|
767 |
|
768 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
769 return EAP_STATUS_RETURN(m_am_tools, status); |
|
770 } |
|
771 |
|
772 #endif //#if defined(USE_EAP_CORE_SERVER) |
|
773 |
|
774 //-------------------------------------------------- |
|
775 |
|
776 // |
|
777 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::send_eap_nak_response( |
|
778 const eap_am_network_id_c * const receive_network_id, |
|
779 const u8_t eap_identifier, |
|
780 const eap_array_c<eap_type_value_e> * const eap_type_list) |
|
781 { |
|
782 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
783 |
|
784 eap_status_e status = eap_status_process_general_error; |
|
785 |
|
786 EAP_TRACE_DEBUG( |
|
787 m_am_tools, |
|
788 TRACE_FLAGS_DEFAULT, |
|
789 (EAPL("dummy_eap_core_c::send_eap_nak_response(): %s, %s\n"), |
|
790 (m_is_client == true) ? "client": "server", |
|
791 (m_is_tunneled_eap == true) ? "tunneled": "outer most" |
|
792 )); |
|
793 |
|
794 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
795 return EAP_STATUS_RETURN(m_am_tools, status); |
|
796 } |
|
797 |
|
798 //-------------------------------------------------- |
|
799 |
|
800 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::packet_data_crypto_keys( |
|
801 const eap_am_network_id_c * const send_network_id, |
|
802 const eap_master_session_key_c * const master_session_key |
|
803 ) |
|
804 { |
|
805 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
806 |
|
807 eap_status_e status = eap_status_process_general_error; |
|
808 |
|
809 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
810 return EAP_STATUS_RETURN(m_am_tools, status); |
|
811 } |
|
812 |
|
813 //-------------------------------------------------- |
|
814 |
|
815 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::read_configure( |
|
816 const eap_configuration_field_c * const field, |
|
817 eap_variable_data_c * const data) |
|
818 { |
|
819 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
820 |
|
821 eap_status_e status = eap_status_process_general_error; |
|
822 |
|
823 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
824 return EAP_STATUS_RETURN(m_am_tools, status); |
|
825 } |
|
826 |
|
827 //-------------------------------------------------- |
|
828 |
|
829 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::write_configure( |
|
830 const eap_configuration_field_c * const field, |
|
831 eap_variable_data_c * const data) |
|
832 { |
|
833 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
834 |
|
835 eap_status_e status = eap_status_process_general_error; |
|
836 |
|
837 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
838 return EAP_STATUS_RETURN(m_am_tools, status); |
|
839 } |
|
840 |
|
841 //-------------------------------------------------- |
|
842 |
|
843 // |
|
844 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::timer_expired( |
|
845 const u32_t id, void *data) |
|
846 { |
|
847 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
848 |
|
849 eap_status_e status = eap_status_process_general_error; |
|
850 |
|
851 |
|
852 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
853 return EAP_STATUS_RETURN(m_am_tools, status); |
|
854 } |
|
855 |
|
856 //-------------------------------------------------- |
|
857 |
|
858 // |
|
859 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::timer_delete_data( |
|
860 const u32_t id, void *data) |
|
861 { |
|
862 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
863 |
|
864 eap_status_e status = eap_status_process_general_error; |
|
865 |
|
866 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
867 return EAP_STATUS_RETURN(m_am_tools, status); |
|
868 } |
|
869 |
|
870 //-------------------------------------------------- |
|
871 |
|
872 // |
|
873 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::reset_operation( |
|
874 eap_base_type_c * const handler, |
|
875 abs_eap_am_tools_c * const m_am_tools) |
|
876 { |
|
877 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
878 |
|
879 EAP_UNREFERENCED_PARAMETER(m_am_tools); |
|
880 |
|
881 EAP_TRACE_ALWAYS( |
|
882 m_am_tools, |
|
883 TRACE_FLAGS_DEFAULT, |
|
884 (EAPL("dummy_eap_core_c::reset_operation(): handler=0x%08x.\n"), |
|
885 handler)); |
|
886 |
|
887 eap_status_e status = eap_status_process_general_error; |
|
888 |
|
889 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
890 return EAP_STATUS_RETURN(m_am_tools, status); |
|
891 } |
|
892 |
|
893 //-------------------------------------------------- |
|
894 |
|
895 // |
|
896 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::reset() |
|
897 { |
|
898 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
899 |
|
900 #if !defined(USE_EAP_DEBUG_TRACE) |
|
901 EAP_TRACE_ALWAYS( |
|
902 m_am_tools, |
|
903 TRACE_FLAGS_DEFAULT, |
|
904 (EAPL("dummy_eap_core_c::reset(): %s: %s.\n"), |
|
905 ((m_is_client == true) ? "client": "server"), |
|
906 (m_is_tunneled_eap == true) ? "tunneled": "outer most")); |
|
907 #else |
|
908 EAP_TRACE_ALWAYS( |
|
909 m_am_tools, |
|
910 TRACE_FLAGS_DEFAULT, |
|
911 (EAPL("dummy_eap_core_c::reset(): %s: %s, this = 0x%08x => 0x%08x.\n"), |
|
912 ((m_is_client == true) ? "client": "server"), |
|
913 (m_is_tunneled_eap == true) ? "tunneled": "outer most", |
|
914 this, |
|
915 dynamic_cast<abs_eap_base_timer_c *>(this))); |
|
916 #endif |
|
917 |
|
918 eap_status_e status = eap_status_process_general_error; |
|
919 |
|
920 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
921 return EAP_STATUS_RETURN(m_am_tools, status); |
|
922 } |
|
923 |
|
924 //-------------------------------------------------- |
|
925 |
|
926 // |
|
927 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::handle_eap_identity_request( |
|
928 const eap_type_value_e used_eap_type, |
|
929 const u8_t eap_identifier, |
|
930 const eap_am_network_id_c * const receive_network_id) |
|
931 { |
|
932 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
933 |
|
934 eap_status_e status = eap_status_process_general_error; |
|
935 |
|
936 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
937 return EAP_STATUS_RETURN(m_am_tools, status); |
|
938 } |
|
939 |
|
940 //-------------------------------------------------- |
|
941 |
|
942 #if defined(USE_EAP_CORE_SERVER) |
|
943 |
|
944 // |
|
945 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::handle_eap_identity_response( |
|
946 eap_base_type_c * const handler, |
|
947 const eap_type_value_e used_eap_type, |
|
948 const eap_am_network_id_c * const receive_network_id, |
|
949 eap_header_wr_c * const eap, |
|
950 const u32_t packet_length) |
|
951 { |
|
952 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
953 EAP_UNREFERENCED_PARAMETER(used_eap_type); |
|
954 |
|
955 eap_status_e status = eap_status_process_general_error; |
|
956 |
|
957 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
958 return EAP_STATUS_RETURN(m_am_tools, status); |
|
959 } |
|
960 |
|
961 #endif //#if defined(USE_EAP_CORE_SERVER) |
|
962 |
|
963 //-------------------------------------------------- |
|
964 |
|
965 #if defined(USE_EAP_CORE_SERVER) |
|
966 |
|
967 // |
|
968 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::send_eap_success( |
|
969 const eap_am_network_id_c * const send_network_id, |
|
970 const u8_t eap_identifier) |
|
971 { |
|
972 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
973 |
|
974 eap_status_e status = eap_status_process_general_error; |
|
975 |
|
976 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
977 return EAP_STATUS_RETURN(m_am_tools, status); |
|
978 } |
|
979 |
|
980 #endif //#if defined(USE_EAP_CORE_SERVER) |
|
981 |
|
982 //-------------------------------------------------- |
|
983 |
|
984 #if defined(USE_EAP_CORE_SERVER) |
|
985 |
|
986 // |
|
987 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::send_eap_failure( |
|
988 const eap_am_network_id_c * const send_network_id, |
|
989 const u8_t eap_identifier) |
|
990 { |
|
991 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
992 |
|
993 eap_status_e status = eap_status_process_general_error; |
|
994 |
|
995 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
996 return EAP_STATUS_RETURN(m_am_tools, status); |
|
997 } |
|
998 |
|
999 #endif //#if defined(USE_EAP_CORE_SERVER) |
|
1000 |
|
1001 //-------------------------------------------------- |
|
1002 |
|
1003 // |
|
1004 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::send_eap_notification_response( |
|
1005 const eap_am_network_id_c * const send_network_id, |
|
1006 const u8_t eap_identifier) |
|
1007 { |
|
1008 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1009 |
|
1010 eap_status_e status = eap_status_process_general_error; |
|
1011 |
|
1012 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1013 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1014 } |
|
1015 |
|
1016 |
|
1017 //-------------------------------------------------- |
|
1018 |
|
1019 // |
|
1020 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::create_eap_identity_response( |
|
1021 eap_buf_chain_wr_c * const response_packet, |
|
1022 const eap_variable_data_c * const identity, |
|
1023 const u8_t eap_identifier |
|
1024 ) |
|
1025 { |
|
1026 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1027 |
|
1028 eap_status_e status = eap_status_process_general_error; |
|
1029 |
|
1030 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1031 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1032 } |
|
1033 |
|
1034 //-------------------------------------------------- |
|
1035 |
|
1036 // |
|
1037 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::send_eap_identity_response( |
|
1038 const eap_am_network_id_c * const send_network_id, |
|
1039 const eap_variable_data_c * const identity, |
|
1040 const u8_t eap_identifier |
|
1041 ) |
|
1042 { |
|
1043 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1044 |
|
1045 eap_status_e status = eap_status_process_general_error; |
|
1046 |
|
1047 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1048 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1049 } |
|
1050 |
|
1051 //-------------------------------------------------- |
|
1052 |
|
1053 // |
|
1054 eap_status_e dummy_eap_core_c::set_eap_identity_routing_info_and_nai_decoration( |
|
1055 eap_variable_data_c * const identity) |
|
1056 { |
|
1057 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1058 |
|
1059 eap_status_e status = eap_status_process_general_error; |
|
1060 |
|
1061 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1062 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1063 |
|
1064 } |
|
1065 |
|
1066 //-------------------------------------------------- |
|
1067 |
|
1068 // |
|
1069 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::complete_eap_identity_query( |
|
1070 const eap_am_network_id_c * const send_network_id, |
|
1071 const eap_variable_data_c * const identity, |
|
1072 const u8_t /*eap_identifier*/) // Remove eap_identifier parameter. |
|
1073 { |
|
1074 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1075 eap_status_e status = eap_status_process_general_error; |
|
1076 |
|
1077 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1078 } |
|
1079 |
|
1080 //-------------------------------------------------- |
|
1081 |
|
1082 // |
|
1083 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::get_saved_eap_identity( |
|
1084 eap_variable_data_c * const identity) |
|
1085 { |
|
1086 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1087 |
|
1088 eap_status_e status = eap_status_process_general_error; |
|
1089 |
|
1090 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1091 return EAP_STATUS_RETURN_WARNING(m_am_tools, status); |
|
1092 } |
|
1093 |
|
1094 //-------------------------------------------------- |
|
1095 |
|
1096 // |
|
1097 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::set_session_timeout( |
|
1098 const u32_t session_timeout_ms) |
|
1099 { |
|
1100 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1101 |
|
1102 eap_status_e status = eap_status_process_general_error; |
|
1103 |
|
1104 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1105 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1106 } |
|
1107 |
|
1108 //-------------------------------------------------- |
|
1109 |
|
1110 // |
|
1111 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::set_timer( |
|
1112 abs_eap_base_timer_c * const p_initializer, |
|
1113 const u32_t p_id, |
|
1114 void * const p_data, |
|
1115 const u32_t p_time_ms) |
|
1116 { |
|
1117 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1118 |
|
1119 EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true); |
|
1120 |
|
1121 const eap_status_e status = m_am_tools->am_set_timer( |
|
1122 p_initializer, |
|
1123 p_id, |
|
1124 p_data, |
|
1125 p_time_ms); |
|
1126 |
|
1127 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1128 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1129 } |
|
1130 |
|
1131 //-------------------------------------------------- |
|
1132 |
|
1133 // |
|
1134 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::cancel_timer( |
|
1135 abs_eap_base_timer_c * const p_initializer, |
|
1136 const u32_t p_id) |
|
1137 { |
|
1138 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1139 |
|
1140 EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true); |
|
1141 |
|
1142 const eap_status_e status = m_am_tools->am_cancel_timer( |
|
1143 p_initializer, |
|
1144 p_id); |
|
1145 |
|
1146 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1147 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1148 } |
|
1149 |
|
1150 //-------------------------------------------------- |
|
1151 |
|
1152 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::set_authentication_role(const bool when_true_set_client) |
|
1153 { |
|
1154 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1155 |
|
1156 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1157 return EAP_STATUS_RETURN(m_am_tools, eap_status_ok); |
|
1158 } |
|
1159 |
|
1160 //-------------------------------------------------- |
|
1161 |
|
1162 EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::add_rogue_ap( |
|
1163 eap_array_c<eap_rogue_ap_entry_c> & rogue_ap_list) |
|
1164 { |
|
1165 EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1166 |
|
1167 eap_status_e status = eap_status_process_general_error; |
|
1168 |
|
1169 EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT); |
|
1170 return EAP_STATUS_RETURN(m_am_tools, status); |
|
1171 } |
|
1172 |
|
1173 //-------------------------------------------------- |
|
1174 |
|
1175 EAP_FUNC_EXPORT bool dummy_eap_core_c::get_is_tunneled_eap() const |
|
1176 { |
|
1177 return m_is_tunneled_eap; |
|
1178 } |
|
1179 |
|
1180 //-------------------------------------------------- |
|
1181 //-------------------------------------------------- |
|
1182 |
|
1183 |
|
1184 |
|
1185 // End. |