|
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 // This is enumeration of EAPOL source code. |
|
20 #if defined(USE_EAP_MINIMUM_RELEASE_TRACES) |
|
21 #undef EAP_FILE_NUMBER_ENUM |
|
22 #define EAP_FILE_NUMBER_ENUM 98 |
|
23 #undef EAP_FILE_NUMBER_DATE |
|
24 #define EAP_FILE_NUMBER_DATE 1127594498 |
|
25 #endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES) |
|
26 |
|
27 //#include "eap_tools.h" |
|
28 #include "eap_type_mschapv2_payloads.h" |
|
29 |
|
30 EAP_FUNC_EXPORT mschapv2_data_c::mschapv2_data_c(abs_eap_am_tools_c * const tools) |
|
31 : m_username(tools) |
|
32 , m_password(tools) |
|
33 , m_challenge(tools) |
|
34 , m_peer_challenge(tools) |
|
35 , m_identifier(1) |
|
36 , m_mschapv2id(1) |
|
37 , m_error_code(0) |
|
38 , m_password_prompt_enabled(eap_boolean_true) |
|
39 , m_nt_response(tools) |
|
40 , m_new_password(tools) |
|
41 { |
|
42 } |
|
43 |
|
44 EAP_FUNC_EXPORT mschapv2_data_c::~mschapv2_data_c() |
|
45 { |
|
46 }; |
|
47 |
|
48 eap_boolean_e mschapv2_data_c::get_password_prompt_enabled() const |
|
49 { |
|
50 return m_password_prompt_enabled; |
|
51 } |
|
52 |
|
53 void mschapv2_data_c::set_password_prompt_enabled(eap_boolean_e is_enabled) |
|
54 { |
|
55 m_password_prompt_enabled = is_enabled; |
|
56 } |
|
57 |
|
58 eap_variable_data_c * const mschapv2_data_c::get_username() |
|
59 { |
|
60 return &m_username; |
|
61 } |
|
62 |
|
63 eap_variable_data_c * const mschapv2_data_c::get_password() |
|
64 { |
|
65 return &m_password; |
|
66 } |
|
67 |
|
68 eap_variable_data_c * const mschapv2_data_c::get_challenge() |
|
69 { |
|
70 return &m_challenge; |
|
71 } |
|
72 |
|
73 eap_variable_data_c * const mschapv2_data_c::get_peer_challenge() |
|
74 { |
|
75 return &m_peer_challenge; |
|
76 } |
|
77 |
|
78 // Client |
|
79 eap_variable_data_c * const mschapv2_data_c::get_nt_response() |
|
80 { |
|
81 return &m_nt_response; |
|
82 } |
|
83 |
|
84 eap_variable_data_c * const mschapv2_data_c::get_new_password() |
|
85 { |
|
86 return &m_new_password; |
|
87 } |
|
88 |
|
89 u8_t mschapv2_data_c::get_identifier() const |
|
90 { |
|
91 return m_identifier; |
|
92 } |
|
93 |
|
94 void mschapv2_data_c::set_identifier(u8_t identifier) |
|
95 { |
|
96 m_identifier = identifier; |
|
97 } |
|
98 |
|
99 u8_t mschapv2_data_c::get_mschapv2id() const |
|
100 { |
|
101 return m_mschapv2id; |
|
102 } |
|
103 |
|
104 void mschapv2_data_c::set_mschapv2id(u8_t mschapv2id) |
|
105 { |
|
106 m_mschapv2id = mschapv2id; |
|
107 } |
|
108 |
|
109 u32_t mschapv2_data_c::get_error_code() const |
|
110 { |
|
111 return m_error_code; |
|
112 } |
|
113 |
|
114 void mschapv2_data_c::set_error_code(u32_t error_code) |
|
115 { |
|
116 m_error_code = error_code; |
|
117 } |