equal
deleted
inserted
replaced
14 * Description: EAP and WLAN authentication protocols. |
14 * Description: EAP and WLAN authentication protocols. |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 /* |
18 /* |
19 * %version: 17.1.3 % |
19 * %version: 18 % |
20 */ |
20 */ |
21 |
21 |
22 // This is enumeration of EAPOL source code. |
22 // This is enumeration of EAPOL source code. |
23 #if defined(USE_EAP_MINIMUM_RELEASE_TRACES) |
23 #if defined(USE_EAP_MINIMUM_RELEASE_TRACES) |
24 #undef EAP_FILE_NUMBER_ENUM |
24 #undef EAP_FILE_NUMBER_ENUM |
189 iQueryId) ); |
189 iQueryId) ); |
190 EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapAkaInterface::DoCancel()"); |
190 EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapAkaInterface::DoCancel()"); |
191 |
191 |
192 if (iQueryId == EQueryRES) |
192 if (iQueryId == EQueryRES) |
193 { |
193 { |
194 iQueryId = EQueryNone; |
|
195 |
|
196 // Cancel the request. |
194 // Cancel the request. |
197 iCustomAPI.CancelAsyncRequest( ECustomGetSimAuthenticationDataIPC ); |
195 iCustomAPI.CancelAsyncRequest( ECustomGetSimAuthenticationDataIPC ); |
198 |
196 |
199 EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("CEapAkaInterface::DoCancel(): CANCELLED CUSTOM API REQUEST \n"))); |
197 EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("CEapAkaInterface::DoCancel(): CANCELLED CUSTOM API REQUEST \n"))); |
200 } |
198 } |
229 if (iStatus.Int() == KErrNone) |
227 if (iStatus.Int() == KErrNone) |
230 { |
228 { |
231 switch( iQueryId ) |
229 switch( iQueryId ) |
232 { |
230 { |
233 case EQueryIMSI: |
231 case EQueryIMSI: |
234 |
|
235 EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("AKA interface: Got IMSI reply.\n"))); |
232 EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("AKA interface: Got IMSI reply.\n"))); |
236 |
233 |
237 EAP_TRACE_DATA_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("IMSI"), |
234 EAP_TRACE_DATA_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("IMSI"), |
238 iSubscriberId.Ptr(), |
235 iSubscriberId.Ptr(), |
239 iSubscriberId.Size())); |
236 iSubscriberId.Size())); |
240 |
237 |
241 iQueryId = EQueryNone; |
|
242 |
|
243 // Convert the IMSI from unicode to UTF8 characters. |
238 // Convert the IMSI from unicode to UTF8 characters. |
244 |
239 |
245 completion_status = imsiInUnicode.set_buffer(iSubscriberId.Ptr(), iSubscriberId.Size(), false, false); |
240 completion_status = imsiInUnicode.set_buffer(iSubscriberId.Ptr(), iSubscriberId.Size(), false, false); |
246 |
241 |
247 if (completion_status != eap_status_ok) |
242 if (completion_status != eap_status_ok) |
266 TRAP(error, iParent->complete_AKA_imsi_L(&imsi, completion_status)); |
261 TRAP(error, iParent->complete_AKA_imsi_L(&imsi, completion_status)); |
267 |
262 |
268 break; |
263 break; |
269 |
264 |
270 case EQueryRES: |
265 case EQueryRES: |
271 |
|
272 EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("####AKA interface: Got RES, CK, IK and AUTS reply. ####\n"))); |
266 EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("####AKA interface: Got RES, CK, IK and AUTS reply. ####\n"))); |
273 |
267 |
274 EAP_TRACE_DATA_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("RES"), |
268 EAP_TRACE_DATA_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("RES"), |
275 iEAPAka.iRES.Ptr(), |
269 iEAPAka.iRES.Ptr(), |
276 iEAPAka.iRES.Size())); |
270 iEAPAka.iRES.Size())); |
285 |
279 |
286 EAP_TRACE_DATA_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("AUTS"), |
280 EAP_TRACE_DATA_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("AUTS"), |
287 iEAPAka.iAUTS.Ptr(), |
281 iEAPAka.iAUTS.Ptr(), |
288 iEAPAka.iAUTS.Size())); |
282 iEAPAka.iAUTS.Size())); |
289 |
283 |
290 iQueryId = EQueryNone; |
|
291 |
|
292 delete iAuthenticationData; |
284 delete iAuthenticationData; |
293 iAuthenticationData = NULL; |
285 iAuthenticationData = NULL; |
294 |
286 |
295 // Close the custom API since we don't need it any more. |
287 // Close the custom API since we don't need it any more. |
296 iCustomAPI.Close(); |
288 iCustomAPI.Close(); |
341 switch( iQueryId ) |
333 switch( iQueryId ) |
342 { |
334 { |
343 case EQueryIMSI: |
335 case EQueryIMSI: |
344 |
336 |
345 // Error with IMSI. Reset it and complete the request. |
337 // Error with IMSI. Reset it and complete the request. |
346 iQueryId = EQueryNone; |
|
347 imsi.reset(); |
338 imsi.reset(); |
348 EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("AKA interface: Error in IMSI.\n"))); |
339 EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("AKA interface: Error in IMSI.\n"))); |
349 |
340 |
350 TRAP(error, iParent->complete_AKA_imsi_L(&imsi)); |
341 TRAP(error, iParent->complete_AKA_imsi_L(&imsi)); |
351 break; |
342 break; |
353 case EQueryRES: |
344 case EQueryRES: |
354 |
345 |
355 // Re-synchronization needed or error with RES or CK or IK. |
346 // Re-synchronization needed or error with RES or CK or IK. |
356 |
347 |
357 // We have to close the custom API anyway. |
348 // We have to close the custom API anyway. |
358 iQueryId = EQueryNone; |
|
359 iCustomAPI.Close(); |
349 iCustomAPI.Close(); |
360 EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("CEapAkaInterface::RunL() - error case: CLOSED CUSTOM API \n"))); |
350 EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("CEapAkaInterface::RunL() - error case: CLOSED CUSTOM API \n"))); |
361 |
351 |
362 // Just to verify if there is any values set. |
352 // Just to verify if there is any values set. |
363 |
353 |
491 void CEapAkaInterface::DisconnectMMETel() |
481 void CEapAkaInterface::DisconnectMMETel() |
492 { |
482 { |
493 EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("CEapAkaInterface::DisconnectMMETel()\n"))); |
483 EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("CEapAkaInterface::DisconnectMMETel()\n"))); |
494 EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapAkaInterface::DisconnectMMETel()"); |
484 EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapAkaInterface::DisconnectMMETel()"); |
495 |
485 |
496 iQueryId = EQueryNone; |
|
497 |
|
498 // Close the custom API since we don't need it any more. |
486 // Close the custom API since we don't need it any more. |
499 iCustomAPI.Close(); |
487 iCustomAPI.Close(); |
500 |
488 |
501 if( iMMETELConnectionStatus ) |
489 if( iMMETELConnectionStatus ) |
502 { |
490 { |