14 * Description: EAP and WLAN authentication protocols. |
14 * Description: EAP and WLAN authentication protocols. |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 /* |
18 /* |
19 * %version: 19.1.4 % |
19 * %version: 19.1.5 % |
20 */ |
20 */ |
21 |
21 |
22 #if !defined(_EAP_AM_TYPE_GSMSIM_SYMBIAN_H_) |
22 #if !defined(_EAP_AM_TYPE_GSMSIM_SYMBIAN_H_) |
23 #define _EAP_AM_TYPE_GSMSIM_SYMBIAN_H_ |
23 #define _EAP_AM_TYPE_GSMSIM_SYMBIAN_H_ |
24 |
24 |
25 // INCLUDES |
25 // INCLUDES |
26 #include <EapType.h> |
26 #include <EapType.h> |
27 #include <d32dbms.h> |
27 #include <d32dbms.h> |
28 #include "eap_tools.h" |
28 #include "eap_tools.h" |
29 #include "eap_am_export.h" |
29 #include "eap_am_export.h" |
|
30 // Start: added by script change_export_macros.sh. |
|
31 #if defined(EAP_NO_EXPORT_EAP_AM_TYPE_GSMSIM_SYMBIAN_H) |
|
32 #define EAP_CLASS_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H EAP_NONSHARABLE |
|
33 #define EAP_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H |
|
34 #define EAP_C_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H |
|
35 #define EAP_FUNC_EXPORT_EAP_AM_TYPE_GSMSIM_SYMBIAN_H |
|
36 #define EAP_C_FUNC_EXPORT_EAP_AM_TYPE_GSMSIM_SYMBIAN_H |
|
37 #elif defined(EAP_EXPORT_EAP_AM_TYPE_GSMSIM_SYMBIAN_H) |
|
38 #define EAP_CLASS_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H EAP_EXPORT |
|
39 #define EAP_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H EAP_FUNC_EXPORT |
|
40 #define EAP_C_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H EAP_C_FUNC_EXPORT |
|
41 #define EAP_FUNC_EXPORT_EAP_AM_TYPE_GSMSIM_SYMBIAN_H EAP_FUNC_EXPORT |
|
42 #define EAP_C_FUNC_EXPORT_EAP_AM_TYPE_GSMSIM_SYMBIAN_H EAP_C_FUNC_EXPORT |
|
43 #else |
|
44 #define EAP_CLASS_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H EAP_IMPORT |
|
45 #define EAP_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H EAP_FUNC_IMPORT |
|
46 #define EAP_C_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H EAP_C_FUNC_IMPORT |
|
47 #define EAP_FUNC_EXPORT_EAP_AM_TYPE_GSMSIM_SYMBIAN_H |
|
48 #define EAP_C_FUNC_EXPORT_EAP_AM_TYPE_GSMSIM_SYMBIAN_H |
|
49 #endif |
|
50 // End: added by script change_export_macros.sh. |
30 #include "abs_eap_base_type.h" |
51 #include "abs_eap_base_type.h" |
31 #include "eap_am_type_gsmsim.h" |
52 #include "eap_am_type_gsmsim.h" |
32 #include "abs_eap_am_sim_algorithm.h" |
53 #include "abs_eap_am_sim_algorithm.h" |
33 |
54 |
34 #if !defined (USE_EAP_GSMSIM_INTERFACE) |
55 #if !defined (USE_EAP_GSMSIM_INTERFACE) |
63 const TInt aIndex, |
84 const TInt aIndex, |
64 const eap_type_value_e aTunnelingType, |
85 const eap_type_value_e aTunnelingType, |
65 const bool aIsClient, |
86 const bool aIsClient, |
66 const eap_am_network_id_c * const receive_network_id); |
87 const eap_am_network_id_c * const receive_network_id); |
67 // |
88 // |
68 EAP_FUNC_IMPORT virtual ~eap_am_type_gsmsim_symbian_c(); |
89 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H virtual ~eap_am_type_gsmsim_symbian_c(); |
69 |
90 |
70 // |
91 // |
71 EAP_FUNC_IMPORT eap_status_e configure(); |
92 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H eap_status_e configure(); |
72 |
93 |
73 // |
94 // |
74 EAP_FUNC_IMPORT eap_status_e reset(); |
95 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H eap_status_e reset(); |
75 |
96 |
76 // |
97 // |
77 EAP_FUNC_IMPORT eap_status_e shutdown(); |
98 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H eap_status_e shutdown(); |
78 |
99 |
79 #if defined(__WINS__) |
100 #if defined(__WINS__) |
80 // |
101 // |
81 EAP_FUNC_IMPORT eap_status_e query_SIM_imsi( |
102 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H eap_status_e query_SIM_imsi( |
82 u8_t * const imsi, const u32_t max_length, u32_t * const imsi_length); |
103 u8_t * const imsi, const u32_t max_length, u32_t * const imsi_length); |
83 |
104 |
84 #endif //#if defined(__WINS__) |
105 #endif //#if defined(__WINS__) |
85 |
106 |
86 // |
107 // |
87 EAP_FUNC_IMPORT eap_status_e store_pseudonym_id( |
108 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H eap_status_e store_pseudonym_id( |
88 const eap_am_network_id_c * const network_id, |
109 const eap_am_network_id_c * const network_id, |
89 const eap_variable_data_c * const pseudonym); |
110 const eap_variable_data_c * const pseudonym); |
90 |
111 |
91 // |
112 // |
92 EAP_FUNC_IMPORT eap_status_e store_reauthentication_id( |
113 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H eap_status_e store_reauthentication_id( |
93 const eap_am_network_id_c * const network_id, |
114 const eap_am_network_id_c * const network_id, |
94 const eap_variable_data_c * const reauthentication_identity); |
115 const eap_variable_data_c * const reauthentication_identity); |
95 |
116 |
96 // |
117 // |
97 EAP_FUNC_IMPORT eap_status_e query_SIM_IMSI_or_pseudonym_or_reauthentication_id( |
118 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H eap_status_e query_SIM_IMSI_or_pseudonym_or_reauthentication_id( |
98 const bool must_be_synchronous, |
119 const bool must_be_synchronous, |
99 eap_variable_data_c * const IMSI, |
120 eap_variable_data_c * const IMSI, |
100 eap_variable_data_c * const pseudonym_identity, |
121 eap_variable_data_c * const pseudonym_identity, |
101 eap_variable_data_c * const reauthentication_identity, |
122 eap_variable_data_c * const reauthentication_identity, |
102 eap_variable_data_c * const automatic_realm, ///< If this is not used, do not add any data to this parameter. |
123 eap_variable_data_c * const automatic_realm, ///< If this is not used, do not add any data to this parameter. |
105 const eap_type_gsmsim_complete_e required_completion, |
126 const eap_type_gsmsim_complete_e required_completion, |
106 const u8_t received_eap_identifier |
127 const u8_t received_eap_identifier |
107 ); |
128 ); |
108 |
129 |
109 // |
130 // |
110 EAP_FUNC_IMPORT eap_status_e cancel_SIM_IMSI_or_pseudonym_or_reauthentication_id_query(); |
131 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H eap_status_e cancel_SIM_IMSI_or_pseudonym_or_reauthentication_id_query(); |
111 |
132 |
112 // |
133 // |
113 EAP_FUNC_IMPORT eap_status_e query_SIM_kc_and_sres( |
134 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H eap_status_e query_SIM_kc_and_sres( |
114 const u8_t * const rand, |
135 const u8_t * const rand, |
115 u8_t * const kc, |
136 u8_t * const kc, |
116 u8_t * const sres); |
137 u8_t * const sres); |
117 |
138 |
118 // |
139 // |
119 EAP_FUNC_IMPORT eap_status_e handle_gsmsim_notification(eap_gsmsim_notification_codes_e gsmsim_notification_code); |
140 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H eap_status_e handle_gsmsim_notification(eap_gsmsim_notification_codes_e gsmsim_notification_code); |
120 |
141 |
121 |
142 |
122 #if defined(USE_EAP_TYPE_SERVER_GSMSIM) |
143 #if defined(USE_EAP_TYPE_SERVER_GSMSIM) |
123 // |
144 // |
124 EAP_FUNC_IMPORT eap_status_e query_SIM_triplets( |
145 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H eap_status_e query_SIM_triplets( |
125 const bool must_be_synchronous, |
146 const bool must_be_synchronous, |
126 const eap_variable_data_c * const username, |
147 const eap_variable_data_c * const username, |
127 eap_variable_data_c * const imsi, |
148 eap_variable_data_c * const imsi, |
128 eap_type_sim_triplet_array_c * const triplets, |
149 eap_type_sim_triplet_array_c * const triplets, |
129 eap_type_gsmsim_identity_type * const type); |
150 eap_type_gsmsim_identity_type * const type); |
130 #endif //#if defined(USE_EAP_TYPE_SERVER_GSMSIM) |
151 #endif //#if defined(USE_EAP_TYPE_SERVER_GSMSIM) |
131 |
152 |
132 |
153 |
133 #if defined(USE_EAP_TYPE_SERVER_GSMSIM) |
154 #if defined(USE_EAP_TYPE_SERVER_GSMSIM) |
134 // |
155 // |
135 EAP_FUNC_IMPORT eap_status_e cancel_SIM_triplets_query(); |
156 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H eap_status_e cancel_SIM_triplets_query(); |
136 #endif //#if defined(USE_EAP_TYPE_SERVER_GSMSIM) |
157 #endif //#if defined(USE_EAP_TYPE_SERVER_GSMSIM) |
137 |
158 |
138 // |
159 // |
139 EAP_FUNC_IMPORT eap_status_e query_SIM_kc_sres( |
160 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H eap_status_e query_SIM_kc_sres( |
140 const bool must_be_synchronous, |
161 const bool must_be_synchronous, |
141 //const eap_variable_data_c * const imsi, |
162 //const eap_variable_data_c * const imsi, |
142 const eap_variable_data_c * const n_rands, |
163 const eap_variable_data_c * const n_rands, |
143 eap_variable_data_c * const n_kc, |
164 eap_variable_data_c * const n_kc, |
144 eap_variable_data_c * const n_sres); |
165 eap_variable_data_c * const n_sres); |
145 |
166 |
146 // |
167 // |
147 EAP_FUNC_IMPORT eap_status_e cancel_SIM_kc_sres_query(); |
168 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H eap_status_e cancel_SIM_kc_sres_query(); |
148 |
169 |
149 // |
170 // |
150 EAP_FUNC_IMPORT eap_status_e generate_encryption_IV( |
171 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H eap_status_e generate_encryption_IV( |
151 eap_variable_data_c * const encryption_IV, |
172 eap_variable_data_c * const encryption_IV, |
152 const u32_t IV_length); |
173 const u32_t IV_length); |
153 |
174 |
154 // |
175 // |
155 EAP_FUNC_IMPORT eap_status_e generate_pseudonym_id( |
176 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H eap_status_e generate_pseudonym_id( |
156 const eap_am_network_id_c * const network_id, |
177 const eap_am_network_id_c * const network_id, |
157 const eap_variable_data_c * const imsi, |
178 const eap_variable_data_c * const imsi, |
158 eap_variable_data_c * const pseudonym, |
179 eap_variable_data_c * const pseudonym, |
159 const u32_t maximum_pseudonym_length); |
180 const u32_t maximum_pseudonym_length); |
160 |
181 |
161 // |
182 // |
162 EAP_FUNC_IMPORT eap_status_e generate_reauthentication_id( |
183 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H eap_status_e generate_reauthentication_id( |
163 const eap_am_network_id_c * const network_id, |
184 const eap_am_network_id_c * const network_id, |
164 const eap_variable_data_c * const imsi, |
185 const eap_variable_data_c * const imsi, |
165 eap_variable_data_c * const reauthentication_identity, |
186 eap_variable_data_c * const reauthentication_identity, |
166 const u32_t maximum_reauthentication_identity_length); |
187 const u32_t maximum_reauthentication_identity_length); |
167 |
188 |
168 // |
189 // |
169 EAP_FUNC_IMPORT eap_status_e store_reauth_parameters( |
190 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H eap_status_e store_reauth_parameters( |
170 const eap_variable_data_c * const XKEY, |
191 const eap_variable_data_c * const XKEY, |
171 const eap_variable_data_c * const K_aut, |
192 const eap_variable_data_c * const K_aut, |
172 const eap_variable_data_c * const K_encr, |
193 const eap_variable_data_c * const K_encr, |
173 const u32_t reauth_counter); |
194 const u32_t reauth_counter); |
174 |
195 |
175 // |
196 // |
176 EAP_FUNC_IMPORT eap_status_e authentication_finished( |
197 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H eap_status_e authentication_finished( |
177 const bool true_when_successfull, |
198 const bool true_when_successfull, |
178 const eap_gsmsim_authentication_type_e authentication_type, |
199 const eap_gsmsim_authentication_type_e authentication_type, |
179 const eap_type_gsmsim_identity_type identity_type); |
200 const eap_type_gsmsim_identity_type identity_type); |
180 |
201 |
181 // |
202 // |
182 EAP_FUNC_IMPORT eap_status_e query_reauth_parameters( |
203 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H eap_status_e query_reauth_parameters( |
183 eap_variable_data_c * const XKEY, |
204 eap_variable_data_c * const XKEY, |
184 eap_variable_data_c * const K_aut, |
205 eap_variable_data_c * const K_aut, |
185 eap_variable_data_c * const K_encr, |
206 eap_variable_data_c * const K_encr, |
186 u32_t * const reauth_counter); |
207 u32_t * const reauth_counter); |
187 |
208 |
188 // |
209 // |
189 EAP_FUNC_IMPORT eap_status_e increase_reauth_counter(); |
210 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H eap_status_e increase_reauth_counter(); |
190 |
211 |
191 |
212 |
192 #if defined(USE_EAP_TYPE_SERVER_GSMSIM) |
213 #if defined(USE_EAP_TYPE_SERVER_GSMSIM) |
193 // |
214 // |
194 EAP_FUNC_IMPORT eap_status_e query_imsi_from_username( |
215 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H eap_status_e query_imsi_from_username( |
195 const bool must_be_synchronous, |
216 const bool must_be_synchronous, |
196 const u8_t next_eap_identifier, |
217 const u8_t next_eap_identifier, |
197 const eap_am_network_id_c * const network_id, |
218 const eap_am_network_id_c * const network_id, |
198 const eap_variable_data_c * const username, |
219 const eap_variable_data_c * const username, |
199 eap_variable_data_c * const imsi, |
220 eap_variable_data_c * const imsi, |
201 const eap_type_gsmsim_complete_e completion_action); |
222 const eap_type_gsmsim_complete_e completion_action); |
202 #endif //#if defined(USE_EAP_TYPE_SERVER_GSMSIM) |
223 #endif //#if defined(USE_EAP_TYPE_SERVER_GSMSIM) |
203 |
224 |
204 |
225 |
205 // |
226 // |
206 EAP_FUNC_IMPORT eap_status_e cancel_imsi_from_username_query(); |
227 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H eap_status_e cancel_imsi_from_username_query(); |
207 |
228 |
208 // |
229 // |
209 EAP_FUNC_IMPORT eap_status_e check_is_rand_unused(const eap_variable_data_c * const n_rands); |
230 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H eap_status_e check_is_rand_unused(const eap_variable_data_c * const n_rands); |
210 |
231 |
211 EAP_FUNC_IMPORT eap_status_e set_rand_is_used(const eap_variable_data_c * const n_rands); |
232 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H eap_status_e set_rand_is_used(const eap_variable_data_c * const n_rands); |
212 |
233 |
213 EAP_FUNC_IMPORT void set_is_valid(); |
234 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H void set_is_valid(); |
214 |
235 |
215 EAP_FUNC_IMPORT bool get_is_valid(); |
236 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H bool get_is_valid(); |
216 |
237 |
217 // |
238 // |
218 EAP_FUNC_IMPORT eap_status_e type_configure_read( |
239 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H eap_status_e type_configure_read( |
219 const eap_configuration_field_c * const field, |
240 const eap_configuration_field_c * const field, |
220 eap_variable_data_c * const data); |
241 eap_variable_data_c * const data); |
221 |
242 |
222 // |
243 // |
223 EAP_FUNC_IMPORT eap_status_e type_configure_write( |
244 EAP_FUNC_VISIBILITY_EAP_AM_TYPE_GSMSIM_SYMBIAN_H eap_status_e type_configure_write( |
224 const eap_configuration_field_c * const field, |
245 const eap_configuration_field_c * const field, |
225 eap_variable_data_c * const data); |
246 eap_variable_data_c * const data); |
226 |
247 |
227 eap_status_e complete_SIM_imsi_L( |
248 eap_status_e complete_SIM_imsi_L( |
228 const eap_variable_data_c * const IMSI, |
249 const eap_variable_data_c * const IMSI, |