|
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(_GSMSIM_TYPES_H_) |
|
22 #define _GSMSIM_TYPES_H_ |
|
23 |
|
24 #include "eap_type_all_types.h" |
|
25 #include "eap_configuration_field.h" |
|
26 |
|
27 /** @file eap_type_gsmsim_types.h |
|
28 * @brief This file defines the constants of the GSMSIM EAP type. |
|
29 */ |
|
30 |
|
31 const u32_t GSMSIM_FIRST_SEQUENCE = 1u; |
|
32 const u32_t GSMSIM_PAYLOAD_LENGTH_ALIGN = 4u; |
|
33 const u32_t GSMSIM_PAYLOAD_ZERO_DATA_LENGTH = 0u; |
|
34 const u8_t GSMSIM_NAI_AT_BYTE = '@'; |
|
35 |
|
36 |
|
37 enum eap_gsmsim_version |
|
38 { |
|
39 GSMSIM_ILLEGAL_VERSION = 0x0000, |
|
40 GSMSIM_VERSION_1 = 0x0001, |
|
41 GSMSIM_LAST_VERSION = 0x0001, ///< Keep this same as the last acceptable version. |
|
42 }; |
|
43 |
|
44 |
|
45 enum gsmsim_subtype_e |
|
46 { |
|
47 gsmsim_subtype_NONE = 0, |
|
48 gsmsim_subtype_Start = 10, |
|
49 gsmsim_subtype_Challenge = 11, |
|
50 gsmsim_subtype_Notification = 12, |
|
51 gsmsim_subtype_Re_authentication = 13, |
|
52 gsmsim_subtype_Client_Error = 14, |
|
53 }; |
|
54 |
|
55 enum gsmsim_payload_AT_type_e |
|
56 { |
|
57 gsmsim_payload_NONE = 0, |
|
58 |
|
59 gsmsim_payload_AT_RAND = 1, |
|
60 gsmsim_payload_AT_PADDING = 6, |
|
61 gsmsim_payload_AT_NONCE_MT = 7, |
|
62 gsmsim_payload_AT_PERMANENT_ID_REQ = 10, |
|
63 gsmsim_payload_AT_MAC = 11, |
|
64 gsmsim_payload_AT_NOTIFICATION = 12, |
|
65 gsmsim_payload_AT_ANY_ID_REQ = 13, |
|
66 gsmsim_payload_AT_IDENTITY = 14, |
|
67 gsmsim_payload_AT_VERSION_LIST = 15, |
|
68 gsmsim_payload_AT_SELECTED_VERSION = 16, |
|
69 gsmsim_payload_AT_FULLAUTH_ID_REQ = 17, |
|
70 gsmsim_payload_AT_COUNTER = 19, |
|
71 gsmsim_payload_AT_COUNTER_TOO_SMALL = 20, |
|
72 gsmsim_payload_AT_NONCE_S = 21, |
|
73 gsmsim_payload_AT_CLIENT_ERROR_CODE = 22, |
|
74 |
|
75 gsmsim_payload_AT_IV = 129, |
|
76 gsmsim_payload_AT_ENCR_DATA = 130, |
|
77 gsmsim_payload_AT_NEXT_PSEUDONYM = 132, |
|
78 gsmsim_payload_AT_NEXT_REAUTH_ID = 133, |
|
79 gsmsim_payload_AT_RESULT_IND = 135, |
|
80 }; |
|
81 |
|
82 enum eap_gsmsim_client_error_code_e |
|
83 { |
|
84 eap_gsmsim_client_error_code_unable_to_process_packet = 0, |
|
85 eap_gsmsim_client_error_code_unsupported_version = 1, |
|
86 eap_gsmsim_client_error_code_insufficient_number_of_challenges = 2, |
|
87 eap_gsmsim_client_error_code_rands_are_not_fresh = 3, |
|
88 eap_gsmsim_client_error_code_maximum_value = eap_gsmsim_client_error_code_rands_are_not_fresh, |
|
89 eap_gsmsim_client_error_code_none = 0xff, |
|
90 }; |
|
91 |
|
92 |
|
93 /** |
|
94 * This is the internal state of the GSMSIM EAP type. |
|
95 */ |
|
96 enum eap_type_gsmsim_state_variable_e |
|
97 { |
|
98 eap_type_gsmsim_state_none , ///< This is the initial state |
|
99 eap_type_gsmsim_state_waiting_for_identity_request , ///< Client state waiting_for_identity_request |
|
100 eap_type_gsmsim_state_pending_identity_query , ///< Client state pending_identity_query |
|
101 eap_type_gsmsim_state_waiting_for_start_request , ///< Client state imsi_waiting_for_start_request |
|
102 eap_type_gsmsim_state_imsi_waiting_for_start_request , ///< Client state imsi_waiting_for_start_request |
|
103 eap_type_gsmsim_state_pseydonym_waiting_for_start_request , ///< Client state pseydonym_waiting_for_start_request |
|
104 eap_type_gsmsim_state_analyse_start_request , ///< Client state analyse_start_request |
|
105 eap_type_gsmsim_state_waiting_for_challenge_request , ///< Client state waiting_for_challenge_request |
|
106 eap_type_gsmsim_state_analyses_challenge_request , ///< Client state analyses_challenge_request |
|
107 eap_type_gsmsim_state_pending_kc_sres_query , ///< Client state pending_kc_sres_query |
|
108 eap_type_gsmsim_state_waiting_for_notification_request_success , ///< Client state waiting_for_notification_request_success |
|
109 eap_type_gsmsim_state_waiting_for_success , ///< Client state waiting_for_success |
|
110 eap_type_gsmsim_state_waiting_for_reauth_request , ///< Client state waiting_for_reauth_request |
|
111 eap_type_gsmsim_state_analyses_reauthentication_request , ///< Client state analyses_reauthentication_request |
|
112 |
|
113 eap_type_gsmsim_state_pending_pseudonym_decode_query , ///< Server state pending_pseudonym_decode_query |
|
114 eap_type_gsmsim_state_waiting_for_identity_response , ///< Server state waiting_for_identity_response |
|
115 eap_type_gsmsim_state_waiting_for_start_response_with_at_permanent_identity , ///< Server state waiting_for_start_response_with_at_permanen_identity |
|
116 eap_type_gsmsim_state_waiting_for_start_response_with_at_full_auth_identity , ///< Server state waiting_for_start_response_with_at_identity |
|
117 eap_type_gsmsim_state_waiting_for_start_response_with_at_any_identity , ///< Server state waiting_for_start_response_with_at_identity |
|
118 eap_type_gsmsim_state_waiting_for_start_response , ///< Server state waiting_for_start_response |
|
119 eap_type_gsmsim_state_waiting_for_challenge_response , ///< Server state waiting_for_challenge_response |
|
120 eap_type_gsmsim_state_pending_triplet_query , ///< Server state pending_triplet_query |
|
121 eap_type_gsmsim_state_analyses_challenge_response , ///< Server state analyses_challenge_response |
|
122 eap_type_gsmsim_state_analyses_start_response , ///< Server state analyses_start_response |
|
123 eap_type_gsmsim_state_waiting_for_notification_response_failure , ///< Server state waiting_for_notification_response, authentication failed |
|
124 eap_type_gsmsim_state_waiting_for_notification_response_success , ///< Server state waiting_for_notification_response, authentication success |
|
125 eap_type_gsmsim_state_waiting_for_reauth_response , ///< Server state waiting_for_reauth_response |
|
126 eap_type_gsmsim_state_analyses_reauthentication_response , ///< Server state analyses_reauthentication_response |
|
127 |
|
128 eap_type_gsmsim_state_success , ///< State state_success |
|
129 eap_type_gsmsim_state_failure , ///< State state_failure |
|
130 |
|
131 eap_type_gsmsim_state_last_value ///< Keep this enum the last one. |
|
132 }; |
|
133 |
|
134 |
|
135 /** |
|
136 * This is the required completion after a asyncronous call. |
|
137 */ |
|
138 enum eap_type_gsmsim_complete_e |
|
139 { |
|
140 eap_type_gsmsim_complete_none, ///< No completion required |
|
141 eap_type_gsmsim_complete_start_request, ///< GSMSIM start request must be completed |
|
142 eap_type_gsmsim_complete_query_eap_identity, ///< GSMSIM EAP-identity query must be completed |
|
143 eap_type_gsmsim_complete_handle_imsi_from_username, |
|
144 eap_type_gsmsim_complete_handle_start_response_message_completion, |
|
145 }; |
|
146 |
|
147 |
|
148 /** |
|
149 * This is the status of the triplet. |
|
150 */ |
|
151 enum eap_gsmsim_triplet_status_e |
|
152 { |
|
153 eap_gsmsim_triplet_status_ok = 0, |
|
154 eap_gsmsim_triplet_status_no_roaming_agreement = 1024, ///< No roaming agreement. |
|
155 eap_gsmsim_triplet_status_users_calls_are_barred = 1026, ///< User's calls are barred. |
|
156 eap_gsmsim_triplet_status_user_has_not_subscribed_to_the_requested_service = 1031, ///< User has not subrcibed to the requested service. |
|
157 }; |
|
158 |
|
159 |
|
160 enum eap_gsmsim_notification_codes_e |
|
161 { |
|
162 eap_gsmsim_notification_no_F_no_P_general_failure = 0, ///< General failure. (implies failure, used after successful authentication) |
|
163 eap_gsmsim_notification_no_F_P_set_general_failure = 16384, ///< General failure. (implies failure, used before authentication) |
|
164 eap_gsmsim_notification_F_set_no_P_user_authenticated = 32768, ///< User has been successfully authenticated. (does not imply failure, used after successful authentication). The usage of this code is discussed in Section 4.4.2. |
|
165 eap_gsmsim_notification_no_F_no_P_users_calls_are_barred = 1026, ///< User has been temporarily denied access to the requested service. (Implies failure, used after successful authentication) |
|
166 eap_gsmsim_notification_no_F_no_P_user_has_not_subscribed_to_the_requested_service = 1031, ///< User has not subscribed to the requested service (implies failure, used after successful authentication) |
|
167 eap_gsmsim_notification_none = 0xffff, ///< No code. |
|
168 }; |
|
169 |
|
170 |
|
171 enum gsmsim_notification_code_bits_e |
|
172 { |
|
173 gsmsim_notification_code_bit_f = 0x8000, |
|
174 gsmsim_notification_code_bit_p = 0x4000, |
|
175 gsmsim_notification_code_value = 0x3FFF, |
|
176 }; |
|
177 |
|
178 |
|
179 /** See eap_gsmsim_triplet_status_e. */ |
|
180 const u8_t EAP_GSMSIM_NOTIFICATION_NO_ROAMING_AGREEMENT[] |
|
181 = "1024 Visited network does not have a roaming agreement with user's home operator"; |
|
182 /** See eap_gsmsim_triplet_status_e. */ |
|
183 const u8_t EAP_GSMSIM_NOTIFICATION_USERS_CALLS_ARE_BARRED[] |
|
184 = "1026 User's calls are barred"; |
|
185 /** See eap_gsmsim_triplet_status_e. */ |
|
186 const u8_t EAP_GSMSIM_NOTIFICATION_USER_HAS_NOT_SUBSCRIBED_TO_THE_REQUESTED_SERVICE[] |
|
187 = "1031 User has not subscribed to the requested service"; |
|
188 |
|
189 /** |
|
190 * This is the type of the GSMSIM identity. |
|
191 */ |
|
192 enum eap_type_gsmsim_identity_type |
|
193 { |
|
194 GSMSIM_IDENTITY_TYPE_NONE, |
|
195 GSMSIM_IDENTITY_TYPE_IMSI_ID, |
|
196 GSMSIM_IDENTITY_TYPE_PSEUDONYM_ID, |
|
197 GSMSIM_IDENTITY_TYPE_RE_AUTH_ID, |
|
198 }; |
|
199 |
|
200 enum eap_gsmsim_authentication_type_e |
|
201 { |
|
202 GSMSIM_AUTHENTICATION_TYPE_NONE, |
|
203 GSMSIM_AUTHENTICATION_TYPE_FULL_AUTH, |
|
204 GSMSIM_AUTHENTICATION_TYPE_REAUTHENTICATION, |
|
205 }; |
|
206 |
|
207 const u8_t GSMSIM_IMSI_PREFIX_CHARACTER[] = "1"; |
|
208 const u32_t GSMSIM_IMSI_PREFIX_CHARACTER_LENGTH = sizeof(GSMSIM_IMSI_PREFIX_CHARACTER)-1ul; |
|
209 |
|
210 const u8_t GSMSIM_AT_CHARACTER[] = "@"; |
|
211 const u32_t GSMSIM_AT_CHARACTER_LENGTH = sizeof(GSMSIM_AT_CHARACTER)-1ul; |
|
212 |
|
213 const u8_t GSMSIM_OWLAN_ORG_PREFIX_STRING[] = "wlan"; |
|
214 const u32_t GSMSIM_OWLAN_ORG_PREFIX_STRING_LENGTH = sizeof(GSMSIM_OWLAN_ORG_PREFIX_STRING)-1ul; |
|
215 |
|
216 const u8_t GSMSIM_UMA_PREFIX_STRING[] = "uma"; |
|
217 const u32_t GSMSIM_UMA_PREFIX_STRING_LENGTH = sizeof(GSMSIM_UMA_PREFIX_STRING)-1ul; |
|
218 |
|
219 const u8_t GSMSIM_OWLAN_MNC_STRING[] = "mnc"; |
|
220 const u32_t GSMSIM_OWLAN_MNC_STRING_LENGTH = sizeof(GSMSIM_OWLAN_MNC_STRING)-1ul; |
|
221 |
|
222 const u8_t GSMSIM_OWLAN_DOT_STRING[] = "."; |
|
223 const u32_t GSMSIM_OWLAN_DOT_STRING_LENGTH = sizeof(GSMSIM_OWLAN_DOT_STRING)-1ul; |
|
224 |
|
225 const u8_t GSMSIM_OWLAN_MCC_STRING[] = "mcc"; |
|
226 const u32_t GSMSIM_OWLAN_MCC_STRING_LENGTH = sizeof(GSMSIM_OWLAN_MCC_STRING)-1ul; |
|
227 |
|
228 const u8_t GSMSIM_OWLAN_ORG_STRING[] = "3gppnetwork.org"; |
|
229 const u32_t GSMSIM_OWLAN_ORG_STRING_LENGTH = sizeof(GSMSIM_OWLAN_ORG_STRING)-1ul; |
|
230 |
|
231 |
|
232 enum eap_type_gsmsim_constants_e |
|
233 { |
|
234 EAP_TYPE_GSMSIM_NONCE_MT_SIZE = 16u, ///< bytes = 128 bits |
|
235 EAP_TYPE_GSMSIM_MAC_SIZE = 16u, ///< bytes = 128 bits |
|
236 EAP_TYPE_GSMSIM_KEYMAT_SIZE = 20u, ///< bytes = 160 bits |
|
237 EAP_TYPE_GSMSIM_MASTER_SESSION_KEY_SIZE = 4u*32u, ///< bytes |
|
238 EAP_TYPE_GSMSIM_MAX_NAI_LENGTH = 255u, ///< bytes |
|
239 EAP_TYPE_GSMSIM_MAX_USER_NAI_LENGTH = 255u, ///< bytes |
|
240 EAP_TYPE_GSMSIM_DEFAULT_MINIMUM_RAND_COUNT = 2ul, ///< count |
|
241 EAP_TYPE_GSMSIM_LOCAL_PACKET_BUFFER_LENGTH = 512u, ///< This is the size of the local send buffer. |
|
242 EAP_TYPE_GSMSIM_PADDING_MODULUS = 4ul, ///< Padding length is always mudulus of 4. |
|
243 EAP_TYPE_GSMSIM_PADDING_MAX_VALUE = 12ul, ///< Maximum padding length is 12 bytes. |
|
244 EAP_TYPE_GSMSIM_INITIAL_REAUTH_COUNTER = 1ul, |
|
245 EAP_TYPE_GSMSIM_DEFAULT_MNC_LENGTH_3_BYTES = 3ul, |
|
246 EAP_TYPE_GSMSIM_MNC_LENGTH_2_BYTES = 2ul, |
|
247 EAP_TYPE_GSMSIM_MNC_OFFSET = 3ul, |
|
248 EAP_TYPE_GSMSIM_MCC_LENGTH = 3ul, |
|
249 EAP_TYPE_GSMSIM_MCC_OFFSET = 0ul, |
|
250 EAP_TYPE_GSMSIM_MINIMUM_IMSI_LENGTH = EAP_TYPE_GSMSIM_MCC_LENGTH+EAP_TYPE_GSMSIM_MNC_LENGTH_2_BYTES+1, |
|
251 }; |
|
252 |
|
253 enum eap_type_gsmsim_timer_id_e |
|
254 { |
|
255 EAP_TYPE_GSMSIM_TIMER_DELAY_FAILURE_MESSAGE_SENT_ID, |
|
256 EAP_TYPE_GSMSIM_TIMER_DELAY_NOTIFICATION_MESSAGE_ID, |
|
257 }; |
|
258 |
|
259 enum eap_type_gsmsim_timer_timeout_value_e |
|
260 { |
|
261 EAP_TYPE_GSMSIM_TIMER_TIMEOUT_VALUE_DELAY_FAILURE_MESSAGE_SENT = 0ul, ///< This is the default value. Zero means error message is handled immediately. |
|
262 }; |
|
263 |
|
264 enum eap_type_gsmsim_stored_e |
|
265 { |
|
266 eap_type_gsmsim_stored_none, |
|
267 eap_type_gsmsim_stored_reauth_xkey, |
|
268 eap_type_gsmsim_stored_reauth_k_aut, |
|
269 eap_type_gsmsim_stored_reauth_k_encr, |
|
270 eap_type_gsmsim_stored_pseudonym_identity, |
|
271 eap_type_gsmsim_stored_reauth_identity, |
|
272 eap_type_gsmsim_stored_pseudonym_key, |
|
273 eap_type_gsmsim_stored_pseudonym_mac_key, |
|
274 eap_type_gsmsim_stored_prev_pseudonym_key, |
|
275 eap_type_gsmsim_stored_prev_pseudonym_mac_key, |
|
276 eap_type_gsmsim_stored_pseudonym_key_index, |
|
277 eap_type_gsmsim_stored_pseudonym_key_use_count, |
|
278 eap_type_gsmsim_stored_pseudonym_use_count, |
|
279 eap_type_gsmsim_stored_reauth_use_count, |
|
280 eap_type_gsmsim_stored_saved_reauth_counter, |
|
281 eap_type_gsmsim_stored_saved_dublicate_rand, |
|
282 }; |
|
283 |
|
284 /** |
|
285 * @defgroup GSMSIM_config_options Configuration options of GSMSIM. |
|
286 * The following configuration options are read through abs_eap_base_type_c::read_configure() function. |
|
287 * @{ |
|
288 */ |
|
289 |
|
290 /** |
|
291 * This u32_t configuration option is timeout in milli seconds before erroneous message is processed. |
|
292 * This is useful in protocol testing or if some delay is needed in final application. |
|
293 * Default value is 0. |
|
294 */ |
|
295 EAP_CONFIGURATION_FIELD( |
|
296 cf_str_EAP_GSMSIM_failure_message_delay_time, |
|
297 "EAP_GSMSIM_failure_message_delay_time", |
|
298 eap_configure_type_u32_t, |
|
299 false); |
|
300 |
|
301 /** |
|
302 * This u32_t configuration option is minimum count of allowed RANDs in GSMSIM. |
|
303 * Default value is 2. |
|
304 */ |
|
305 EAP_CONFIGURATION_FIELD( |
|
306 cf_str_EAP_GSMSIM_minimum_rand_count, |
|
307 "EAP_GSMSIM_minimum_rand_count", |
|
308 eap_configure_type_u32_t, |
|
309 false); |
|
310 |
|
311 /** |
|
312 * This boolean configuration option specifies whether the username should |
|
313 * be generated automatically. |
|
314 * Default value is 0. That will cause use of automatic username. If this is 1 |
|
315 * then cf_str_EAP_GSMSIM_manual_username is used as the username. |
|
316 */ |
|
317 EAP_CONFIGURATION_FIELD( |
|
318 cf_str_EAP_GSMSIM_use_manual_username, |
|
319 "EAP_GSMSIM_use_manual_username", |
|
320 eap_configure_type_boolean, |
|
321 false); |
|
322 |
|
323 /** |
|
324 * This string configuration option is the username part of EAP-type GSMSIM identity. |
|
325 * Default value is empty string. That will cause use of automatic username. |
|
326 */ |
|
327 EAP_CONFIGURATION_FIELD( |
|
328 cf_str_EAP_GSMSIM_manual_username, |
|
329 "EAP_GSMSIM_manual_username", |
|
330 eap_configure_type_string, |
|
331 false); |
|
332 |
|
333 /** |
|
334 * This boolean configuration option specifies whether the realm should |
|
335 * be generated automatically. |
|
336 * Default value is 0. That will cause use of automatic realm. If this is 1 |
|
337 * then cf_str_EAP_GSMSIM_manual_realm is used as the realm. |
|
338 */ |
|
339 EAP_CONFIGURATION_FIELD( |
|
340 cf_str_EAP_GSMSIM_use_manual_realm, |
|
341 "EAP_GSMSIM_use_manual_realm", |
|
342 eap_configure_type_boolean, |
|
343 false); |
|
344 |
|
345 /** |
|
346 * This string configuration option is the realm part of EAP-type GSMSIM identity. |
|
347 * Default value is empty string. That will cause use of automatic realm. |
|
348 */ |
|
349 EAP_CONFIGURATION_FIELD( |
|
350 cf_str_EAP_GSMSIM_manual_realm, |
|
351 "EAP_GSMSIM_manual_realm", |
|
352 eap_configure_type_string, |
|
353 false); |
|
354 |
|
355 /** |
|
356 * This is boolean configuration option. |
|
357 * True value means on successfull authentication EAP-type GSMSIM waits the EAP-Success message. |
|
358 * False value means on successfull authentication EAP-type GSMSIM does NOT wait the EAP-Success message. |
|
359 * NOTE: True value is needed in Windows RAS. |
|
360 * Default value is true. |
|
361 */ |
|
362 EAP_CONFIGURATION_FIELD( |
|
363 cf_str_EAP_GSMSIM_wait_eap_success_packet, |
|
364 "EAP_GSMSIM_wait_eap_success_packet", |
|
365 eap_configure_type_boolean, |
|
366 false); |
|
367 |
|
368 /** |
|
369 * This is boolean configuration option. |
|
370 * True value means on EAP-type GSMSIM must check identifier of EAP-Response/Identity message. |
|
371 * False value means on EAP-type GSMSIM does not check identifier of EAP-Response/Identity message. |
|
372 * This is not possible in cases where identifier of the EAP-Request/Identity is generated by other network entities. |
|
373 * Default value is false. |
|
374 */ |
|
375 EAP_CONFIGURATION_FIELD( |
|
376 cf_str_EAP_GSMSIM_check_identifier_of_eap_identity_response, |
|
377 "EAP_GSMSIM_check_identifier_of_eap_identity_response", |
|
378 eap_configure_type_boolean, |
|
379 false); |
|
380 |
|
381 /** |
|
382 * This is boolean configuration option. |
|
383 * This flag activates NAI realm check. Default value is false. |
|
384 * When active NAI realm muts be the same as realm given by EAP_GSMSIM_manual_realm option. |
|
385 * Default value is false. |
|
386 */ |
|
387 EAP_CONFIGURATION_FIELD( |
|
388 cf_str_EAP_GSMSIM_check_nai_realm, |
|
389 "EAP_GSMSIM_check_nai_realm", |
|
390 eap_configure_type_boolean, |
|
391 false); |
|
392 |
|
393 /** |
|
394 * This is for testing. |
|
395 * This string configuration option is the full path name of the nonce_mt file. |
|
396 * Default value is empty string. |
|
397 */ |
|
398 EAP_CONFIGURATION_FIELD( |
|
399 cf_str_EAP_GSMSIM_nonce_mt_file, |
|
400 "EAP_GSMSIM_nonce_mt_file", |
|
401 eap_configure_type_string, |
|
402 false); |
|
403 |
|
404 /** |
|
405 * This is for testing. |
|
406 * This string configuration option is the full path name of the triplet file. |
|
407 * Default value is empty string. |
|
408 */ |
|
409 EAP_CONFIGURATION_FIELD( |
|
410 cf_str_EAP_GSMSIM_triplet_file, |
|
411 "EAP_GSMSIM_triplet_file", |
|
412 eap_configure_type_string, |
|
413 false); |
|
414 |
|
415 /** |
|
416 * This is for testing. |
|
417 * This string configuration option is the full path name of the pseudonym file. |
|
418 * Default value is empty string. |
|
419 */ |
|
420 EAP_CONFIGURATION_FIELD( |
|
421 cf_str_EAP_GSMSIM_pseudonym_file, |
|
422 "EAP_GSMSIM_pseudonym_file", |
|
423 eap_configure_type_string, |
|
424 false); |
|
425 |
|
426 /** |
|
427 * This is for testing. |
|
428 * This string configuration option is the full path name of the reauthentication file. |
|
429 * Default value is empty string. |
|
430 */ |
|
431 EAP_CONFIGURATION_FIELD( |
|
432 cf_str_EAP_GSMSIM_reauthentication_file, |
|
433 "EAP_GSMSIM_reauthentication_file", |
|
434 eap_configure_type_string, |
|
435 false); |
|
436 |
|
437 /** |
|
438 * This is for testing. |
|
439 * This string configuration option is the full path name of the encryption IV file. |
|
440 * Default value is empty string. |
|
441 */ |
|
442 EAP_CONFIGURATION_FIELD( |
|
443 cf_str_EAP_GSMSIM_encryption_iv_file, |
|
444 "EAP_GSMSIM_encryption_iv_file", |
|
445 eap_configure_type_string, |
|
446 false); |
|
447 |
|
448 /** |
|
449 * This is boolean configuration option. |
|
450 * True value means client of EAP-type GSMSIM responds to every re-transmitted EAP-SIM request packets. |
|
451 * False value means client of EAP-type GSMSIM does not respond to any re-transmitted EAP-SIM request packets, |
|
452 * instead the EAP layer does re-transmit the response. |
|
453 * The default value is false. |
|
454 */ |
|
455 EAP_CONFIGURATION_FIELD( |
|
456 cf_str_EAP_GSMSIM_client_responds_retransmitted_packets, |
|
457 "EAP_GSMSIM_client_responds_retransmitted_packets", |
|
458 eap_configure_type_boolean, |
|
459 false); |
|
460 |
|
461 /** |
|
462 * This is boolean configuration option. |
|
463 * This is for testing. |
|
464 * True value means test version of EAP-type GSMSIM is used. |
|
465 * Test version tries to make as many authentications as it is possible. |
|
466 * False value means on real version of EAP-type GSMSIM is used. |
|
467 * Default value is false. |
|
468 */ |
|
469 EAP_CONFIGURATION_FIELD( |
|
470 cf_str_EAP_GSMSIM_test_version, |
|
471 "EAP_GSMSIM_test_version", |
|
472 eap_configure_type_boolean, |
|
473 false); |
|
474 |
|
475 /** |
|
476 * This is boolean configuration option. |
|
477 * This is for testing. |
|
478 * True value means server refuses EAP-identity randomly. |
|
479 * False value means does not refuse EAP-identity randomly. |
|
480 * NOTE EAP_GSMSIM_test_version option must be true also. |
|
481 * Default value is false. |
|
482 */ |
|
483 EAP_CONFIGURATION_FIELD( |
|
484 cf_str_EAP_GSMSIM_randomly_refuse_eap_identity, |
|
485 "EAP_GSMSIM_randomly_refuse_eap_identity", |
|
486 eap_configure_type_boolean, |
|
487 false); |
|
488 |
|
489 /** |
|
490 * This is boolean configuration option. |
|
491 * True value means on test of re-authentication counter of EAP-type GSMSIM will fail always. |
|
492 * NOTE EAP_GSMSIM_test_version option must be true also. |
|
493 * Default value is false. |
|
494 */ |
|
495 EAP_CONFIGURATION_FIELD( |
|
496 cf_str_EAP_GSMSIM_fail_re_authentication_counter_check, |
|
497 "EAP_GSMSIM_fail_re_authentication_counter_check", |
|
498 eap_configure_type_boolean, |
|
499 false); |
|
500 |
|
501 /** |
|
502 * This is boolean configuration option. |
|
503 * True value of this flag allows server accept the EAP-Response/Identity message. |
|
504 * False value does not allow server accept the EAP-Response/Identity message. |
|
505 * Instead server queries identity in EAP-Request/SIM/Start with AT_ANY_ID_REQ attribute. |
|
506 * Default value is true. |
|
507 */ |
|
508 EAP_CONFIGURATION_FIELD( |
|
509 cf_str_EAP_GSMSIM_accept_eap_identity_response, |
|
510 "EAP_GSMSIM_accept_eap_identity_response", |
|
511 eap_configure_type_boolean, |
|
512 false); |
|
513 |
|
514 /** |
|
515 * This is boolean configuration option. |
|
516 * True value of this flag causes client return random |
|
517 * identity on EAP-Response/Identity. |
|
518 * False value causes client return real identity |
|
519 * (IMSI, pseudonym or re-authentication identity) |
|
520 * in EAP-Response/Identity. |
|
521 * Default value is false. |
|
522 */ |
|
523 EAP_CONFIGURATION_FIELD( |
|
524 cf_str_EAP_GSMSIM_use_random_identity_on_eap_identity_response, |
|
525 "EAP_GSMSIM_use_random_identity_on_eap_identity_response", |
|
526 eap_configure_type_boolean, |
|
527 false); |
|
528 |
|
529 /** |
|
530 * This is boolean configuration option. |
|
531 * True value of this flag causes client check the RANDs are unique. |
|
532 * False value causes client skip the uniqueness check of the RANDs. |
|
533 * Default value is true. |
|
534 */ |
|
535 EAP_CONFIGURATION_FIELD( |
|
536 cf_str_EAP_GSMSIM_do_rand_uniqueness_check, |
|
537 "EAP_GSMSIM_do_rand_uniqueness_check", |
|
538 eap_configure_type_boolean, |
|
539 false); |
|
540 |
|
541 /** |
|
542 * This is boolean configuration option. |
|
543 * True value means progress bar is shown to user. |
|
544 * Default value is false. |
|
545 */ |
|
546 EAP_CONFIGURATION_FIELD( |
|
547 cf_str_EAP_GSMSIM_enable_progress_bar, |
|
548 "EAP_GSMSIM_enable_progress_bar", |
|
549 eap_configure_type_boolean, |
|
550 false); |
|
551 |
|
552 /** |
|
553 * This is string configuration option. |
|
554 * This option selects the SIM algorithm used in simulation. |
|
555 * Possible values are "nokia_test_network_xor" or "tls_prf_with_shared_secret". |
|
556 * The default value is nokia_test_network_xor. |
|
557 */ |
|
558 EAP_CONFIGURATION_FIELD( |
|
559 cf_str_EAP_GSMSIM_simulator_sim_algorithm, |
|
560 "EAP_GSMSIM_simulator_sim_algorithm", |
|
561 eap_configure_type_string, |
|
562 false); |
|
563 |
|
564 EAP_CONFIGURATION_FIELD( |
|
565 cf_str_EAP_GSMSIM_simulator_sim_algorithm_config_value_nokia_test_network_xor, |
|
566 "nokia_test_network_xor", |
|
567 eap_configure_type_string, |
|
568 false); |
|
569 |
|
570 EAP_CONFIGURATION_FIELD( |
|
571 cf_str_EAP_GSMSIM_simulator_sim_algorithm_config_value_tls_prf_with_shared_secret, |
|
572 "tls_prf_with_shared_secret", |
|
573 eap_configure_type_string, |
|
574 false); |
|
575 |
|
576 /** |
|
577 * This is hex data configuration option. |
|
578 * This Ki is used in software-SIM (SW-SIM). |
|
579 */ |
|
580 EAP_CONFIGURATION_FIELD( |
|
581 cf_str_EAP_GSMSIM_simulator_sim_ki, |
|
582 "EAP_GSMSIM_simulator_sim_ki", |
|
583 eap_configure_type_hex_data, |
|
584 false); |
|
585 |
|
586 /** |
|
587 * This is boolean configuration option. |
|
588 * This flag tells whether the UMA profile is used (true) or not (false). |
|
589 * Default value is false. |
|
590 */ |
|
591 EAP_CONFIGURATION_FIELD( |
|
592 cf_str_EAP_GSMSIM_UMA_profile, |
|
593 "EAP_GSMSIM_UMA_profile", |
|
594 eap_configure_type_boolean, |
|
595 false); |
|
596 |
|
597 /** |
|
598 * This is string configuration option. |
|
599 * The string is the prefix of automatic realm in the UMA profile. |
|
600 * Note also the EAP_GSMSIM_UMA_profile must be true before |
|
601 * this option is used. |
|
602 * Default value is empty. |
|
603 */ |
|
604 EAP_CONFIGURATION_FIELD( |
|
605 cf_str_EAP_GSMSIM_UMA_realm_prefix, |
|
606 "EAP_GSMSIM_UMA_realm_prefix", |
|
607 eap_configure_type_string, |
|
608 false); |
|
609 |
|
610 /** |
|
611 * This is boolean configuration option. |
|
612 * This flag tells whether the pseudonym identity could be used (true) or not (false). |
|
613 * Default value is true. |
|
614 */ |
|
615 EAP_CONFIGURATION_FIELD( |
|
616 cf_str_EAP_GSMSIM_use_pseudonym_identity, |
|
617 "EAP_GSMSIM_use_pseudonym_identity", |
|
618 eap_configure_type_boolean, |
|
619 false); |
|
620 |
|
621 /** |
|
622 * This is boolean configuration option. |
|
623 * This flag tells whether the re-authentication identity could be used (true) or not (false). |
|
624 * Default value is true. |
|
625 */ |
|
626 EAP_CONFIGURATION_FIELD( |
|
627 cf_str_EAP_GSMSIM_use_reauthentication_identity, |
|
628 "EAP_GSMSIM_use_reauthentication_identity", |
|
629 eap_configure_type_boolean, |
|
630 false); |
|
631 |
|
632 /** |
|
633 * This is boolean configuration option. |
|
634 * This is used in simulator testing. |
|
635 * True value means queries to AM are completed asyncronous. |
|
636 * False value means queries to AM are completed syncronous. |
|
637 * Default value is false. |
|
638 */ |
|
639 EAP_CONFIGURATION_FIELD( |
|
640 cf_str_EAP_GSMSIM_do_asyncronous_completions, |
|
641 "EAP_GSMSIM_do_asyncronous_completions", |
|
642 eap_configure_type_boolean, |
|
643 false); |
|
644 |
|
645 /** |
|
646 * This is boolean configuration option. |
|
647 * This is used in simulator testing. |
|
648 * True value means triplet queries to AM are failed randomly. |
|
649 * False value means triplet queries to AM are not failed. |
|
650 * Default value is false. |
|
651 */ |
|
652 EAP_CONFIGURATION_FIELD( |
|
653 cf_str_EAP_GSMSIM_fail_SIM_triplets_query_randomly, |
|
654 "EAP_GSMSIM_fail_SIM_triplets_query_randomly", |
|
655 eap_configure_type_boolean, |
|
656 false); |
|
657 |
|
658 |
|
659 /** |
|
660 * This is boolean configuration option. |
|
661 * This is used in simulator testing. |
|
662 * True value means server sends dublicate RANDS. |
|
663 * False value means server sends random RANDs. |
|
664 * Default value is false. |
|
665 */ |
|
666 EAP_CONFIGURATION_FIELD( |
|
667 cf_str_EAP_GSMSIM_test_dublicate_triplets, |
|
668 "EAP_GSMSIM_test_dublicate_triplets", |
|
669 eap_configure_type_boolean, |
|
670 false); |
|
671 |
|
672 |
|
673 /** |
|
674 * This is boolean configuration option. |
|
675 * This is used in simulator testing. |
|
676 * True value means queries to AM are randomly completed asyncronous. |
|
677 * False value means queries to AM are randomly completed syncronous. |
|
678 * Default value is false. |
|
679 */ |
|
680 EAP_CONFIGURATION_FIELD( |
|
681 cf_str_EAP_GSMSIM_do_asyncronous_completions_randomly, |
|
682 "EAP_GSMSIM_do_asyncronous_completions_randomly", |
|
683 eap_configure_type_boolean, |
|
684 false); |
|
685 |
|
686 |
|
687 /** |
|
688 * This is boolean configuration option. |
|
689 * This is used in simulator testing. |
|
690 * True value means EAP-SIM server fails randomly successfull authentication. |
|
691 * False value means EAP-SIM server does NOT fail randomly successfull authentication. |
|
692 * Default value is false. |
|
693 */ |
|
694 EAP_CONFIGURATION_FIELD( |
|
695 cf_str_EAP_GSMSIM_randomly_fail_successfull_authentication, |
|
696 "EAP_GSMSIM_randomly_fail_successfull_authentication", |
|
697 eap_configure_type_boolean, |
|
698 false); |
|
699 |
|
700 |
|
701 /** |
|
702 * This is boolean configuration option. |
|
703 * This is used in simulator testing. |
|
704 * True value means EAP-SIM client and server allows result indications. |
|
705 * False value means EAP-SIM client and server does NOT allow result indications. |
|
706 * Default value is true. |
|
707 */ |
|
708 EAP_CONFIGURATION_FIELD( |
|
709 cf_str_EAP_GSMSIM_allow_use_result_indication, |
|
710 "EAP_GSMSIM_allow_use_result_indication", |
|
711 eap_configure_type_boolean, |
|
712 false); |
|
713 |
|
714 /** |
|
715 * This is boolean configuration option. |
|
716 * This is used in simulator testing. |
|
717 * True value means EAP-SIM server allows result indications. |
|
718 * False value means EAP-SIM server does NOT allow result indications. |
|
719 * NOTE this option over rides cf_str_EAP_GSMSIM_allow_use_result_indication |
|
720 * in server. |
|
721 * Default value is true. |
|
722 */ |
|
723 EAP_CONFIGURATION_FIELD( |
|
724 cf_str_EAP_GSMSIM_server_allow_use_result_indication, |
|
725 "EAP_GSMSIM_server_allow_use_result_indication", |
|
726 eap_configure_type_boolean, |
|
727 false); |
|
728 |
|
729 |
|
730 /** |
|
731 * This u32_t array configuration option is includes those MCCs that uses 2 digit MNC. |
|
732 * Default value is empty array. |
|
733 */ |
|
734 EAP_CONFIGURATION_FIELD( |
|
735 cf_str_EAP_GSMSIM_2_digit_mnc_map_of_mcc_of_imsi_array, |
|
736 "EAP_AKA_GSMSIM_2_digit_mnc_map_of_mcc_of_imsi_array", |
|
737 eap_configure_type_u32array, |
|
738 false); |
|
739 |
|
740 |
|
741 |
|
742 /** |
|
743 * This is boolean configuration option. |
|
744 * This is used in simulator testing. |
|
745 * True value means EAP-SIM server randomly skip pseudonym and fast-reauth identity generation. |
|
746 * False value means EAP-SIM server does generate those identities. |
|
747 * Default value is false. |
|
748 */ |
|
749 EAP_CONFIGURATION_FIELD( |
|
750 cf_str_EAP_GSMSIM_server_randomly_skip_identity_generation, |
|
751 "EAP_GSMSIM_server_randomly_skip_identity_generation", |
|
752 eap_configure_type_boolean, |
|
753 false); |
|
754 |
|
755 |
|
756 /** |
|
757 * This is boolean configuration option. True value activates use of expanded EAP type field of 64-bits in length. |
|
758 * False value forces to use the normal 8-bit EAP type field. |
|
759 * Default value is false. |
|
760 */ |
|
761 EAP_CONFIGURATION_FIELD( |
|
762 cf_str_EAP_GSMSIM_use_eap_expanded_type, |
|
763 "EAP_GSMSIM_use_eap_expanded_type", |
|
764 eap_configure_type_boolean, |
|
765 false); |
|
766 |
|
767 /** |
|
768 * This u32_t configuration value specifies the maximum session validity time in seconds. |
|
769 * Default value is 12 hours in seconds, which is 43200 seconds. |
|
770 */ |
|
771 EAP_CONFIGURATION_FIELD( |
|
772 cf_str_EAP_GSMSIM_max_session_validity_time, |
|
773 "EAP_GSMSIM_max_session_validity_time", |
|
774 eap_configure_type_u32_t, |
|
775 false); |
|
776 |
|
777 |
|
778 /** @} */ // End of group GSMSIM_config_options. |
|
779 |
|
780 #endif //#if !defined(_GSMSIM_TYPES_H_) |
|
781 |
|
782 //-------------------------------------------------- |
|
783 |
|
784 |
|
785 |
|
786 // End. |