|
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 #ifndef SECURID_TYPES_H |
|
21 #define SECURID_TYPES_H |
|
22 |
|
23 #include "eap_configuration_field.h" |
|
24 |
|
25 |
|
26 const u32_t TRACE_FLAGS_SECURID_ERROR = eap_am_tools_c::eap_trace_mask_error; |
|
27 |
|
28 |
|
29 enum eap_type_gtc_stored_e |
|
30 { |
|
31 eap_type_gtc_stored_none, |
|
32 eap_type_gtc_stored_identity, |
|
33 }; |
|
34 |
|
35 |
|
36 EAP_CONFIGURATION_FIELD( |
|
37 cf_str_EAP_SECURID_identity, |
|
38 "EAP_SECURID_identity", |
|
39 eap_configure_type_hex_data, |
|
40 false); |
|
41 |
|
42 EAP_CONFIGURATION_FIELD( |
|
43 cf_str_EAP_SECURID_passcode, |
|
44 "EAP_SECURID_passcode", |
|
45 eap_configure_type_hex_data, |
|
46 true); |
|
47 |
|
48 |
|
49 EAP_CONFIGURATION_FIELD( |
|
50 cf_str_EAP_GTC_identity, |
|
51 "EAP_GTC_identity", |
|
52 eap_configure_type_hex_data, |
|
53 false); |
|
54 |
|
55 |
|
56 EAP_CONFIGURATION_FIELD( |
|
57 cf_str_EAP_GTC_passcode, |
|
58 "EAP_GTC_passcode", |
|
59 eap_configure_type_hex_data, |
|
60 false); |
|
61 |
|
62 |
|
63 EAP_CONFIGURATION_FIELD( |
|
64 cf_str_EAP_SECURID_use_eap_expanded_type, |
|
65 "EAP_SECURID_use_eap_expanded_type", |
|
66 eap_configure_type_boolean, |
|
67 false); |
|
68 |
|
69 EAP_CONFIGURATION_FIELD( |
|
70 cf_str_EAP_GTC_use_eap_expanded_type, |
|
71 "EAP_GTC_use_eap_expanded_type", |
|
72 eap_configure_type_boolean, |
|
73 false); |
|
74 |
|
75 EAP_CONFIGURATION_FIELD( |
|
76 cf_str_EAP_GTC_use_EAP_FAST_response, |
|
77 "EAP_GTC_use_EAP_FAST_response", |
|
78 eap_configure_type_boolean, |
|
79 false); |
|
80 |
|
81 /** |
|
82 * This u32_t configuration value specifies the maximum session validity time in seconds. |
|
83 * Default value is 12 hours in seconds, which is 43200 seconds. |
|
84 */ |
|
85 EAP_CONFIGURATION_FIELD( |
|
86 cf_str_EAP_GTC_max_session_validity_time, |
|
87 "EAP_GTC_max_session_validity_time", |
|
88 eap_configure_type_u32_t, |
|
89 false); |
|
90 |
|
91 |
|
92 const u8_t EAP_FAST_EAP_GTC_RESPONSE_PREFIX[] = "RESPONSE="; |
|
93 const u32_t EAP_FAST_EAP_GTC_RESPONSE_PREFIX_LENGTH = sizeof(EAP_FAST_EAP_GTC_RESPONSE_PREFIX)-1ul; |
|
94 |
|
95 const u8_t EAP_FAST_EAP_GTC_RESPONSE_SEPARATOR[] = { 0x00 }; |
|
96 const u32_t EAP_FAST_EAP_GTC_RESPONSE_SEPARATOR_LENGTH = sizeof(EAP_FAST_EAP_GTC_RESPONSE_SEPARATOR); |
|
97 |
|
98 /** @} */ // End of group SECURID_config_options. |
|
99 |
|
100 //-------------------------------------------------- |
|
101 |
|
102 /// Macro traces payload type and data. |
|
103 #define EAP_SECURID_TRACE_PAYLOAD(prefix, payload) \ |
|
104 { \ |
|
105 EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT | TRACE_TEST_VECTORS, (EAPL("%s (0x%08x): current payload 0x%04x=%s, data length 0x%04x.\n"), \ |
|
106 prefix, payload, payload->get_current_payload(), payload->get_payload_AT_string(), payload->get_data_length())); \ |
|
107 EAP_TRACE_DATA_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT | TRACE_TEST_VECTORS, (EAPL("payload"), \ |
|
108 payload, \ |
|
109 payload->get_payload_length())); \ |
|
110 } |
|
111 |
|
112 //-------------------------------------------------- |
|
113 |
|
114 #endif //SECURID_TYPES_H |
|
115 |
|
116 //-------------------------------------------------- |
|
117 |
|
118 |
|
119 // End. |