|
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 50 |
|
23 #undef EAP_FILE_NUMBER_DATE |
|
24 #define EAP_FILE_NUMBER_DATE 1127594498 |
|
25 #endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES) |
|
26 |
|
27 |
|
28 #include "eapol_key_state_string.h" |
|
29 |
|
30 //-------------------------------------------------- |
|
31 |
|
32 EAP_FUNC_EXPORT eapol_key_state_string_c::~eapol_key_state_string_c() |
|
33 { |
|
34 } |
|
35 |
|
36 //-------------------------------------------------- |
|
37 |
|
38 EAP_FUNC_EXPORT eapol_key_state_string_c::eapol_key_state_string_c() |
|
39 { |
|
40 } |
|
41 |
|
42 //-------------------------------------------------- |
|
43 |
|
44 EAP_FUNC_EXPORT eap_const_string eapol_key_state_string_c::get_eapol_key_state_string( |
|
45 const eapol_key_state_e state) const |
|
46 { |
|
47 #if defined(USE_EAP_TRACE_STRINGS) |
|
48 EAP_IF_RETURN_STRING(state, eapol_key_state_none) |
|
49 else EAP_IF_RETURN_STRING(state, eapol_key_state_preauthenticated) |
|
50 else EAP_IF_RETURN_STRING(state, eapol_key_state_eap_authentication_running) |
|
51 else EAP_IF_RETURN_STRING(state, eapol_key_state_wait_4_way_handshake_start) |
|
52 else EAP_IF_RETURN_STRING(state, eapol_key_state_wait_4_way_handshake_message_1) |
|
53 else EAP_IF_RETURN_STRING(state, eapol_key_state_wait_4_way_handshake_message_2) |
|
54 else EAP_IF_RETURN_STRING(state, eapol_key_state_wait_4_way_handshake_message_3) |
|
55 else EAP_IF_RETURN_STRING(state, eapol_key_state_wait_4_way_handshake_message_4) |
|
56 else EAP_IF_RETURN_STRING(state, eapol_key_state_4_way_handshake_running) |
|
57 else EAP_IF_RETURN_STRING(state, eapol_key_state_4_way_handshake_failed) |
|
58 else EAP_IF_RETURN_STRING(state, eapol_key_state_4_way_handshake_successfull) |
|
59 else EAP_IF_RETURN_STRING(state, eapol_key_state_wait_group_key_handshake_message_1) |
|
60 else EAP_IF_RETURN_STRING(state, eapol_key_state_wait_group_key_handshake_message_2) |
|
61 else EAP_IF_RETURN_STRING(state, eapol_key_state_group_key_handshake_failed) |
|
62 else EAP_IF_RETURN_STRING(state, eapol_key_state_group_key_handshake_successfull) |
|
63 else EAP_IF_RETURN_STRING(state, eapol_key_state_wait_rc4_key_message) |
|
64 else EAP_IF_RETURN_STRING(state, eapol_key_state_802_11i_authentication_terminated_unsuccessfull) |
|
65 else EAP_IF_RETURN_STRING(state, eapol_key_state_802_11i_authentication_finished_successfull) |
|
66 else EAP_IF_RETURN_STRING(state, eapol_key_state_reassociation_failed) |
|
67 #if defined(EAP_USE_WPXM) |
|
68 else EAP_IF_RETURN_STRING(state, eapol_key_state_wpxm_reassociation_finished_successfull) |
|
69 #endif //#if defined(EAP_USE_WPXM) |
|
70 #if defined(USE_WAPI_CORE) |
|
71 else EAP_IF_RETURN_STRING(state, eapol_key_state_wapi_authentication_terminated_unsuccessfull) |
|
72 else EAP_IF_RETURN_STRING(state, eapol_key_state_wapi_authentication_finished_successfull) |
|
73 else EAP_IF_RETURN_STRING(state, eapol_key_state_wapi_authentication_running) |
|
74 #endif //#if defined(USE_WAPI_CORE) |
|
75 else |
|
76 #endif // #if defined(USE_EAP_TRACE_STRINGS) |
|
77 { |
|
78 EAP_UNREFERENCED_PARAMETER(state); |
|
79 |
|
80 return EAPL("Unknown EAPOL-Key Handshake state"); |
|
81 } |
|
82 } |
|
83 |
|
84 //-------------------------------------------------- |
|
85 |
|
86 EAP_FUNC_EXPORT eap_const_string eapol_key_state_string_c::get_eapol_key_handshake_type_string( |
|
87 const eapol_key_handshake_type_e handshake_type) const |
|
88 { |
|
89 |
|
90 #if defined(USE_EAP_TRACE_STRINGS) |
|
91 EAP_IF_RETURN_STRING(handshake_type, eapol_key_handshake_type_none) |
|
92 else EAP_IF_RETURN_STRING(handshake_type, eapol_key_handshake_type_4_way_handshake) |
|
93 else EAP_IF_RETURN_STRING(handshake_type, eapol_key_handshake_type_group_key_handshake) |
|
94 else EAP_IF_RETURN_STRING(handshake_type, eapol_key_handshake_type_STAKey_handshake) |
|
95 else EAP_IF_RETURN_STRING(handshake_type, eapol_key_handshake_type_802_11i_handshake) |
|
96 else EAP_IF_RETURN_STRING(handshake_type, eapol_key_handshake_type_dynamic_WEP) |
|
97 #if defined(EAP_USE_WPXM) |
|
98 else EAP_IF_RETURN_STRING(handshake_type, eapol_key_handshake_type_WPXM_reassociation) |
|
99 #endif //#if defined(EAP_USE_WPXM) |
|
100 #if defined(USE_WAPI_CORE) |
|
101 else EAP_IF_RETURN_STRING(handshake_type, eapol_key_handshake_type_wai_handshake) |
|
102 #endif //#if defined(USE_WAPI_CORE) |
|
103 else |
|
104 #endif // #if defined(USE_EAP_TRACE_STRINGS) |
|
105 { |
|
106 EAP_UNREFERENCED_PARAMETER(handshake_type); |
|
107 |
|
108 return EAPL("Unknown EAPOL-Key Handshake type"); |
|
109 } |
|
110 } |
|
111 |
|
112 //-------------------------------------------------- |
|
113 |
|
114 EAP_FUNC_EXPORT eap_const_string eapol_key_state_string_c::get_eapol_key_authentication_type_string( |
|
115 const eapol_key_authentication_type_e authentication_type) const |
|
116 { |
|
117 |
|
118 #if defined(USE_EAP_TRACE_STRINGS) |
|
119 EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_none) |
|
120 else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_RSNA_EAP) |
|
121 else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_RSNA_PSK) |
|
122 else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_WPA_EAP) |
|
123 else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_WPA_PSK) |
|
124 else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_802_1X) |
|
125 #if defined(EAP_USE_WPXM) |
|
126 else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_WPXM) |
|
127 #endif //#if defined(EAP_USE_WPXM) |
|
128 else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_WFA_SC) |
|
129 #if defined(USE_WAPI_CORE) |
|
130 else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_WAI_PSK) |
|
131 else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_WAI_certificate) |
|
132 #endif //#if defined(USE_WAPI_CORE) |
|
133 else |
|
134 #endif // #if defined(USE_EAP_TRACE_STRINGS) |
|
135 { |
|
136 EAP_UNREFERENCED_PARAMETER(authentication_type); |
|
137 |
|
138 return EAPL("Unknown EAPOL-Key Authentication type"); |
|
139 } |
|
140 } |
|
141 |
|
142 //-------------------------------------------------- |
|
143 |
|
144 eap_const_string eapol_key_state_string_c::get_eapol_key_descriptor_type_string( |
|
145 const eapol_key_descriptor_type_e key_descriptor_type) const |
|
146 { |
|
147 |
|
148 #if defined(USE_EAP_TRACE_STRINGS) |
|
149 EAP_IF_RETURN_STRING(key_descriptor_type, eapol_key_descriptor_type_none) |
|
150 else EAP_IF_RETURN_STRING(key_descriptor_type, eapol_key_descriptor_type_RC4) |
|
151 else EAP_IF_RETURN_STRING(key_descriptor_type, eapol_key_descriptor_type_RSNA) |
|
152 else EAP_IF_RETURN_STRING(key_descriptor_type, eapol_key_descriptor_type_WPA) |
|
153 else |
|
154 #endif // #if defined(USE_EAP_TRACE_STRINGS) |
|
155 { |
|
156 EAP_UNREFERENCED_PARAMETER(key_descriptor_type); |
|
157 |
|
158 return EAPL("Unknown EAPOL-Key Description type"); |
|
159 } |
|
160 } |
|
161 |
|
162 //-------------------------------------------------- |
|
163 |
|
164 // End. |