201021
authorhgs
Mon, 24 May 2010 20:32:47 +0300
changeset 26 9abfd4f00d37
parent 25 e03a3db4489e
child 27 9660a5eb236f
201021
accesssec.pro
accesssec_plat/accesssec_plat.pro
accesssec_plat/eap_qt_configuration_api/eap_qt_configuration_api.pri
accesssec_plat/eap_qt_configuration_api/inc/eapqtcertificateinfo.h
accesssec_plat/eap_qt_configuration_api/inc/eapqtconfig.h
accesssec_plat/eap_qt_configuration_api/inc/eapqtconfiginterface.h
accesssec_plat/eap_qt_configuration_api/inc/eapqtexpandedeaptype.h
accesssec_plat/eap_qt_configuration_api/inc/eapqtpluginhandle.h
accesssec_plat/eap_qt_configuration_api/inc/eapqtplugininfo.h
accesssec_plat/eap_qt_configuration_api/inc/eapqtvalidator.h
accesssec_plat/eap_type_api/group/bld.inf
accesssec_plat/eap_type_api/inc/EapAutomatic.h
accesssec_plat/eap_type_api/inc/EapExpandedType.h
accesssec_plat/eap_type_api/inc/EapGeneralSettings.h
accesssec_plat/eap_type_api/inc/EapGeneralSettings.inl
accesssec_plat/eap_type_api/inc/EapPluginTools.h
accesssec_plat/eap_type_api/inc/EapSettings.h
accesssec_plat/eap_type_api/inc/EapSettings.inl
accesssec_plat/eap_type_api/inc/EapTraceSymbian.h
accesssec_plat/eap_type_api/inc/EapType.h
accesssec_plat/eap_type_api/inc/EapType.inl
accesssec_plat/eap_type_api/inc/EapTypeDefinitions.h
accesssec_plat/eap_type_api/inc/EapTypeInfo.h
accesssec_plat/eap_type_api/inc/EapTypePlugin.h
accesssec_plat/eap_type_api/inc/EapTypePlugin.inl
accesssec_plat/eap_vpn_api/group/bld.inf
accesssec_plat/eap_vpn_api/inc/abs_eap_vpn_if.h
accesssec_plat/eap_vpn_api/inc/eap_vpn_if.h
accesssec_plat/eap_vpn_api/inc/eap_vpn_if.inl
accesssec_plat/eap_vpn_api/inc/eap_vpn_if_uids.h
accesssec_plat/group/bld.inf
eapol/eapol_framework/eapol_common/am/common/DSS_random/dss_random.cpp
eapol/eapol_framework/eapol_common/am/common/DSS_random/dss_random.h
eapol/eapol_framework/eapol_common/am/common/abs_eap_am_mutex.cpp
eapol/eapol_framework/eapol_common/am/common/abs_eap_am_semaphore.cpp
eapol/eapol_framework/eapol_common/am/common/bloom_algorithm/eap_am_bloom_algorithm.cpp
eapol/eapol_framework/eapol_common/am/common/crypto/md4/eap_am_crypto_md4.cpp
eapol/eapol_framework/eapol_common/am/common/crypto/random/eap_am_random_test.cpp
eapol/eapol_framework/eapol_common/am/common/crypto/rc4/eap_am_crypto_rc4.cpp
eapol/eapol_framework/eapol_common/am/common/crypto/sha-256/eap_am_crypto_sha_256.cpp
eapol/eapol_framework/eapol_common/am/common/crypto/sha1/eap_am_crypto_sha1.cpp
eapol/eapol_framework/eapol_common/am/common/eap_am_memory.cpp
eapol/eapol_framework/eapol_common/am/common/eap_am_memory_store.cpp
eapol/eapol_framework/eapol_common/am/common/eap_am_memory_store_data.cpp
eapol/eapol_framework/eapol_common/am/common/eap_am_network_id.cpp
eapol/eapol_framework/eapol_common/am/common/eap_am_tools.cpp
eapol/eapol_framework/eapol_common/am/common/eap_file_config.cpp
eapol/eapol_framework/eapol_common/am/common/eap_timer_queue.cpp
eapol/eapol_framework/eapol_common/am/common/fileconfig_utils.cpp
eapol/eapol_framework/eapol_common/am/common/stack/eap_am_stack_trace.cpp
eapol/eapol_framework/eapol_common/am/common/stack/eap_am_stack_trace.h
eapol/eapol_framework/eapol_common/am/core/eap_am_wimax_authentication.cpp
eapol/eapol_framework/eapol_common/am/core/eapol_am_wlan_authentication.cpp
eapol/eapol_framework/eapol_common/am/include/abs_eap_am_aka_algorithm.h
eapol/eapol_framework/eapol_common/am/include/abs_eap_am_bloom_algorithm_store.h
eapol/eapol_framework/eapol_common/am/include/abs_eap_am_crypto.h
eapol/eapol_framework/eapol_common/am/include/abs_eap_am_file_input.h
eapol/eapol_framework/eapol_common/am/include/abs_eap_am_general_settings.h
eapol/eapol_framework/eapol_common/am/include/abs_eap_am_memory_store_data.h
eapol/eapol_framework/eapol_common/am/include/abs_eap_am_message_if.h
eapol/eapol_framework/eapol_common/am/include/abs_eap_am_mutex.h
eapol/eapol_framework/eapol_common/am/include/abs_eap_am_pac_store.h
eapol/eapol_framework/eapol_common/am/include/abs_eap_am_plugin.h
eapol/eapol_framework/eapol_common/am/include/abs_eap_am_radius.h
eapol/eapol_framework/eapol_common/am/include/abs_eap_am_semaphore.h
eapol/eapol_framework/eapol_common/am/include/abs_eap_am_sim_algorithm.h
eapol/eapol_framework/eapol_common/am/include/abs_eap_am_stack.h
eapol/eapol_framework/eapol_common/am/include/abs_eap_am_tools.h
eapol/eapol_framework/eapol_common/am/include/abs_eap_am_type_aka.h
eapol/eapol_framework/eapol_common/am/include/abs_eap_am_type_gsmsim.h
eapol/eapol_framework/eapol_common/am/include/abs_eap_am_type_leap.h
eapol/eapol_framework/eapol_common/am/include/abs_eap_am_type_mschapv2.h
eapol/eapol_framework/eapol_common/am/include/abs_eap_am_type_securid.h
eapol/eapol_framework/eapol_common/am/include/abs_eap_am_type_sim.h
eapol/eapol_framework/eapol_common/am/include/abs_eap_am_type_simple_config.h
eapol/eapol_framework/eapol_common/am/include/abs_eap_am_type_tls_peap.h
eapol/eapol_framework/eapol_common/am/include/abs_eap_am_wimax_authentication.h
eapol/eapol_framework/eapol_common/am/include/abs_eapol_am_wlan_authentication.h
eapol/eapol_framework/eapol_common/am/include/abs_simple_config_am_services.h
eapol/eapol_framework/eapol_common/am/include/abs_tls_am_application_eap_fast.h
eapol/eapol_framework/eapol_common/am/include/abs_tls_am_services.h
eapol/eapol_framework/eapol_common/am/include/eap_am_assert.h
eapol/eapol_framework/eapol_common/am/include/eap_am_compiler_flags.h
eapol/eapol_framework/eapol_common/am/include/eap_am_crypto_md4.h
eapol/eapol_framework/eapol_common/am/include/eap_am_crypto_openssl.h
eapol/eapol_framework/eapol_common/am/include/eap_am_crypto_rc4.h
eapol/eapol_framework/eapol_common/am/include/eap_am_crypto_sha1.h
eapol/eapol_framework/eapol_common/am/include/eap_am_crypto_sha_256.h
eapol/eapol_framework/eapol_common/am/include/eap_am_dh_primes.h
eapol/eapol_framework/eapol_common/am/include/eap_am_export.h
eapol/eapol_framework/eapol_common/am/include/eap_am_fast_pac_store_services.h
eapol/eapol_framework/eapol_common/am/include/eap_am_general_settings.h
eapol/eapol_framework/eapol_common/am/include/eap_am_memory.h
eapol/eapol_framework/eapol_common/am/include/eap_am_memory_store.h
eapol/eapol_framework/eapol_common/am/include/eap_am_memory_store_data.h
eapol/eapol_framework/eapol_common/am/include/eap_am_message_if.h
eapol/eapol_framework/eapol_common/am/include/eap_am_network_id.h
eapol/eapol_framework/eapol_common/am/include/eap_am_pac_store.h
eapol/eapol_framework/eapol_common/am/include/eap_am_plugin.h
eapol/eapol_framework/eapol_common/am/include/eap_am_radius.h
eapol/eapol_framework/eapol_common/am/include/eap_am_stack.h
eapol/eapol_framework/eapol_common/am/include/eap_am_tools.h
eapol/eapol_framework/eapol_common/am/include/eap_am_trace.h
eapol/eapol_framework/eapol_common/am/include/eap_am_type_aka.h
eapol/eapol_framework/eapol_common/am/include/eap_am_type_gsmsim.h
eapol/eapol_framework/eapol_common/am/include/eap_am_type_leap.h
eapol/eapol_framework/eapol_common/am/include/eap_am_type_mschapv2.h
eapol/eapol_framework/eapol_common/am/include/eap_am_type_securid.h
eapol/eapol_framework/eapol_common/am/include/eap_am_type_sim.h
eapol/eapol_framework/eapol_common/am/include/eap_am_type_simple_config.h
eapol/eapol_framework/eapol_common/am/include/eap_am_type_tls_peap.h
eapol/eapol_framework/eapol_common/am/include/eap_am_types.h
eapol/eapol_framework/eapol_common/am/include/eap_am_wimax_authentication.h
eapol/eapol_framework/eapol_common/am/include/eap_file_config.h
eapol/eapol_framework/eapol_common/am/include/eap_sim_triplets.h
eapol/eapol_framework/eapol_common/am/include/eapol_am_wlan_authentication.h
eapol/eapol_framework/eapol_common/am/include/ms_mppe_keys.h
eapol/eapol_framework/eapol_common/am/include/ms_mppe_send_recv_key.h
eapol/eapol_framework/eapol_common/am/include/simple_config_am_services.h
eapol/eapol_framework/eapol_common/am/include/tls_am_application_eap_fast.h
eapol/eapol_framework/eapol_common/am/include/tls_am_services.h
eapol/eapol_framework/eapol_common/am/type/tls_peap/tls_am_services.cpp
eapol/eapol_framework/eapol_common/common/asn1_der_type.cpp
eapol/eapol_framework/eapol_common/common/eap_base_type.cpp
eapol/eapol_framework/eapol_common/common/eap_buffer.cpp
eapol/eapol_framework/eapol_common/common/eap_crypto_api.cpp
eapol/eapol_framework/eapol_common/common/eap_expanded_type.cpp
eapol/eapol_framework/eapol_common/common/eap_general_header_base.cpp
eapol/eapol_framework/eapol_common/common/eap_handle.cpp
eapol/eapol_framework/eapol_common/common/eap_header.cpp
eapol/eapol_framework/eapol_common/common/eap_header_string.cpp
eapol/eapol_framework/eapol_common/common/eap_master_session_key.cpp
eapol/eapol_framework/eapol_common/common/eap_memory_store_variable_data.cpp
eapol/eapol_framework/eapol_common/common/eap_method_settings.cpp
eapol/eapol_framework/eapol_common/common/eap_network_id_selector.cpp
eapol/eapol_framework/eapol_common/common/eap_rogue_ap_entry.cpp
eapol/eapol_framework/eapol_common/common/eap_sim_triplets.cpp
eapol/eapol_framework/eapol_common/common/eap_state_notification.cpp
eapol/eapol_framework/eapol_common/common/eap_status_string.cpp
eapol/eapol_framework/eapol_common/common/eap_tlv_header.cpp
eapol/eapol_framework/eapol_common/common/eap_tlv_message_data.cpp
eapol/eapol_framework/eapol_common/common/eap_tools.cpp
eapol/eapol_framework/eapol_common/common/eap_variable_data.cpp
eapol/eapol_framework/eapol_common/common/eapol_ethernet_address.cpp
eapol/eapol_framework/eapol_common/common/eapol_ethernet_header.cpp
eapol/eapol_framework/eapol_common/common/eapol_header.cpp
eapol/eapol_framework/eapol_common/common/eapol_session_key.cpp
eapol/eapol_framework/eapol_common/common/wlan_eap_if_send_status.cpp
eapol/eapol_framework/eapol_common/core/dummy_eap_core.cpp
eapol/eapol_framework/eapol_common/core/eap_config.cpp
eapol/eapol_framework/eapol_common/core/eap_core.cpp
eapol/eapol_framework/eapol_common/core/eap_core_client_message_if.cpp
eapol/eapol_framework/eapol_common/core/eap_core_map.cpp
eapol/eapol_framework/eapol_common/core/eap_core_nak_info.cpp
eapol/eapol_framework/eapol_common/core/eap_core_retransmission.cpp
eapol/eapol_framework/eapol_common/core/eap_core_server_message_if.cpp
eapol/eapol_framework/eapol_common/core/eap_general_settings_client_message_if.cpp
eapol/eapol_framework/eapol_common/core/eap_general_settings_message.cpp
eapol/eapol_framework/eapol_common/core/eap_general_settings_server_message_if.cpp
eapol/eapol_framework/eapol_common/core/eap_pac_store_client_message_if.cpp
eapol/eapol_framework/eapol_common/core/eap_pac_store_message_base.cpp
eapol/eapol_framework/eapol_common/core/eap_pac_store_server_message_if.cpp
eapol/eapol_framework/eapol_common/core/eap_plugin_client_message_if.cpp
eapol/eapol_framework/eapol_common/core/eap_plugin_message_base.cpp
eapol/eapol_framework/eapol_common/core/eap_plugin_server_message_if.cpp
eapol/eapol_framework/eapol_common/core/eap_process_tlv_message_data.cpp
eapol/eapol_framework/eapol_common/core/eap_session_core.cpp
eapol/eapol_framework/eapol_common/core/eap_session_core_base.cpp
eapol/eapol_framework/eapol_common/core/eap_type_selection.cpp
eapol/eapol_framework/eapol_common/core/eap_wimax_authentication.cpp
eapol/eapol_framework/eapol_common/core/eapol_core.cpp
eapol/eapol_framework/eapol_common/core/eapol_handle_tlv_message_data.cpp
eapol/eapol_framework/eapol_common/core/eapol_key_state_client.cpp
eapol/eapol_framework/eapol_common/core/eapol_key_state_common.cpp
eapol/eapol_framework/eapol_common/core/eapol_key_state_server.cpp
eapol/eapol_framework/eapol_common/core/eapol_key_state_string.cpp
eapol/eapol_framework/eapol_common/core/eapol_message_wlan_authentication.cpp
eapol/eapol_framework/eapol_common/core/eapol_rc4_key_header.cpp
eapol/eapol_framework/eapol_common/core/eapol_rsna_key_data_gtk_header.cpp
eapol/eapol_framework/eapol_common/core/eapol_rsna_key_data_header.cpp
eapol/eapol_framework/eapol_common/core/eapol_rsna_key_data_payloads.cpp
eapol/eapol_framework/eapol_common/core/eapol_rsna_key_header.cpp
eapol/eapol_framework/eapol_common/core/eapol_wlan_authentication.cpp
eapol/eapol_framework/eapol_common/core/eapol_wlan_database_reference.cpp
eapol/eapol_framework/eapol_common/core/eapol_wlan_state.cpp
eapol/eapol_framework/eapol_common/core/ethernet_core.cpp
eapol/eapol_framework/eapol_common/include/abs_eap_base_timer.h
eapol/eapol_framework/eapol_common/include/abs_eap_base_type.h
eapol/eapol_framework/eapol_common/include/abs_eap_configuration_if.h
eapol/eapol_framework/eapol_common/include/abs_eap_core.h
eapol/eapol_framework/eapol_common/include/abs_eap_core_map.h
eapol/eapol_framework/eapol_common/include/abs_eap_database_reference_if.h
eapol/eapol_framework/eapol_common/include/abs_eap_general_settings_message.h
eapol/eapol_framework/eapol_common/include/abs_eap_pac_store_message.h
eapol/eapol_framework/eapol_common/include/abs_eap_plugin_message.h
eapol/eapol_framework/eapol_common/include/abs_eap_session_core.h
eapol/eapol_framework/eapol_common/include/abs_eap_stack_interface.h
eapol/eapol_framework/eapol_common/include/abs_eap_state_notification.h
eapol/eapol_framework/eapol_common/include/abs_eap_wimax_authentication.h
eapol/eapol_framework/eapol_common/include/abs_eapol_core.h
eapol/eapol_framework/eapol_common/include/abs_eapol_key_state.h
eapol/eapol_framework/eapol_common/include/abs_eapol_key_state_map.h
eapol/eapol_framework/eapol_common/include/abs_eapol_message_wlan_authentication.h
eapol/eapol_framework/eapol_common/include/abs_eapol_wlan_authentication.h
eapol/eapol_framework/eapol_common/include/abs_eapol_wlan_database_reference_if.h
eapol/eapol_framework/eapol_common/include/abs_ethernet_core.h
eapol/eapol_framework/eapol_common/include/asn1_der_type.h
eapol/eapol_framework/eapol_common/include/dummy_eap_core.h
eapol/eapol_framework/eapol_common/include/eap_array.h
eapol/eapol_framework/eapol_common/include/eap_array_algorithms.h
eapol/eapol_framework/eapol_common/include/eap_automatic_variable.h
eapol/eapol_framework/eapol_common/include/eap_base_type.h
eapol/eapol_framework/eapol_common/include/eap_buffer.h
eapol/eapol_framework/eapol_common/include/eap_config.h
eapol/eapol_framework/eapol_common/include/eap_configuration_field.h
eapol/eapol_framework/eapol_common/include/eap_core.h
eapol/eapol_framework/eapol_common/include/eap_core_client_message_if.h
eapol/eapol_framework/eapol_common/include/eap_core_map.h
eapol/eapol_framework/eapol_common/include/eap_core_nak_info.h
eapol/eapol_framework/eapol_common/include/eap_core_retransmission.h
eapol/eapol_framework/eapol_common/include/eap_core_server_message_if.h
eapol/eapol_framework/eapol_common/include/eap_crypto_api.h
eapol/eapol_framework/eapol_common/include/eap_database_reference_if.h
eapol/eapol_framework/eapol_common/include/eap_expanded_type.h
eapol/eapol_framework/eapol_common/include/eap_general_header_base.h
eapol/eapol_framework/eapol_common/include/eap_general_settings_client_message_if.h
eapol/eapol_framework/eapol_common/include/eap_general_settings_message.h
eapol/eapol_framework/eapol_common/include/eap_general_settings_server_message_if.h
eapol/eapol_framework/eapol_common/include/eap_handle.h
eapol/eapol_framework/eapol_common/include/eap_header.h
eapol/eapol_framework/eapol_common/include/eap_header_string.h
eapol/eapol_framework/eapol_common/include/eap_master_session_key.h
eapol/eapol_framework/eapol_common/include/eap_memory_store_variable_data.h
eapol/eapol_framework/eapol_common/include/eap_method_settings.h
eapol/eapol_framework/eapol_common/include/eap_network_id_selector.h
eapol/eapol_framework/eapol_common/include/eap_pac_store_client_message_if.h
eapol/eapol_framework/eapol_common/include/eap_pac_store_message_base.h
eapol/eapol_framework/eapol_common/include/eap_pac_store_server_message_if.h
eapol/eapol_framework/eapol_common/include/eap_plugin_client_message_if.h
eapol/eapol_framework/eapol_common/include/eap_plugin_message_base.h
eapol/eapol_framework/eapol_common/include/eap_plugin_server_message_if.h
eapol/eapol_framework/eapol_common/include/eap_process_tlv_message_data.h
eapol/eapol_framework/eapol_common/include/eap_protocol_layer.h
eapol/eapol_framework/eapol_common/include/eap_rogue_ap_entry.h
eapol/eapol_framework/eapol_common/include/eap_session_core.h
eapol/eapol_framework/eapol_common/include/eap_session_core_base.h
eapol/eapol_framework/eapol_common/include/eap_sort.h
eapol/eapol_framework/eapol_common/include/eap_state_notification.h
eapol/eapol_framework/eapol_common/include/eap_state_selector.h
eapol/eapol_framework/eapol_common/include/eap_state_store.h
eapol/eapol_framework/eapol_common/include/eap_status.h
eapol/eapol_framework/eapol_common/include/eap_status_string.h
eapol/eapol_framework/eapol_common/include/eap_timer_queue.h
eapol/eapol_framework/eapol_common/include/eap_tlv_header.h
eapol/eapol_framework/eapol_common/include/eap_tlv_message_data.h
eapol/eapol_framework/eapol_common/include/eap_tools.h
eapol/eapol_framework/eapol_common/include/eap_type_all.h
eapol/eapol_framework/eapol_common/include/eap_type_all_types.h
eapol/eapol_framework/eapol_common/include/eap_type_selection.h
eapol/eapol_framework/eapol_common/include/eap_variable_data.h
eapol/eapol_framework/eapol_common/include/eap_wimax_authentication.h
eapol/eapol_framework/eapol_common/include/eapol_core.h
eapol/eapol_framework/eapol_common/include/eapol_ethernet_address.h
eapol/eapol_framework/eapol_common/include/eapol_ethernet_header.h
eapol/eapol_framework/eapol_common/include/eapol_handle_tlv_message_data.h
eapol/eapol_framework/eapol_common/include/eapol_header.h
eapol/eapol_framework/eapol_common/include/eapol_key_header.h
eapol/eapol_framework/eapol_common/include/eapol_key_state.h
eapol/eapol_framework/eapol_common/include/eapol_key_state_string.h
eapol/eapol_framework/eapol_common/include/eapol_key_types.h
eapol/eapol_framework/eapol_common/include/eapol_message_wlan_authentication.h
eapol/eapol_framework/eapol_common/include/eapol_rc4_key_header.h
eapol/eapol_framework/eapol_common/include/eapol_rsna_key_data_gtk_header.h
eapol/eapol_framework/eapol_common/include/eapol_rsna_key_data_header.h
eapol/eapol_framework/eapol_common/include/eapol_rsna_key_data_payloads.h
eapol/eapol_framework/eapol_common/include/eapol_rsna_key_header.h
eapol/eapol_framework/eapol_common/include/eapol_session_key.h
eapol/eapol_framework/eapol_common/include/eapol_test_stack_if.h
eapol/eapol_framework/eapol_common/include/eapol_wlan_authentication.h
eapol/eapol_framework/eapol_common/include/eapol_wlan_database_reference.h
eapol/eapol_framework/eapol_common/include/eapol_wlan_state.h
eapol/eapol_framework/eapol_common/include/ethernet_core.h
eapol/eapol_framework/eapol_common/include/isakmp_header.h
eapol/eapol_framework/eapol_common/include/isakmp_payloads.h
eapol/eapol_framework/eapol_common/include/sae_cookie.h
eapol/eapol_framework/eapol_common/include/wlan_eap_if_send_status.h
eapol/eapol_framework/eapol_common/type/aka/core/eap_type_aka.cpp
eapol/eapol_framework/eapol_common/type/aka/core/eap_type_aka_authentication_vector.cpp
eapol/eapol_framework/eapol_common/type/aka/core/eap_type_aka_client.cpp
eapol/eapol_framework/eapol_common/type/aka/core/eap_type_aka_header.cpp
eapol/eapol_framework/eapol_common/type/aka/core/eap_type_aka_payloads.cpp
eapol/eapol_framework/eapol_common/type/aka/core/eap_type_aka_server.cpp
eapol/eapol_framework/eapol_common/type/aka/core/eap_type_aka_state.cpp
eapol/eapol_framework/eapol_common/type/aka/core/eap_type_aka_state_notification.cpp
eapol/eapol_framework/eapol_common/type/aka/include/abs_eap_type_aka_state.h
eapol/eapol_framework/eapol_common/type/aka/include/eap_type_aka.h
eapol/eapol_framework/eapol_common/type/aka/include/eap_type_aka_authentication_vector.h
eapol/eapol_framework/eapol_common/type/aka/include/eap_type_aka_header.h
eapol/eapol_framework/eapol_common/type/aka/include/eap_type_aka_initialized.h
eapol/eapol_framework/eapol_common/type/aka/include/eap_type_aka_payloads.h
eapol/eapol_framework/eapol_common/type/aka/include/eap_type_aka_state.h
eapol/eapol_framework/eapol_common/type/aka/include/eap_type_aka_state_notification.h
eapol/eapol_framework/eapol_common/type/aka/include/eap_type_aka_types.h
eapol/eapol_framework/eapol_common/type/diameter/include/eap_diameter_avp_code.h
eapol/eapol_framework/eapol_common/type/diameter/include/eap_diameter_avp_header.h
eapol/eapol_framework/eapol_common/type/diameter/include/eap_diameter_payloads.h
eapol/eapol_framework/eapol_common/type/diameter/src/eap_diameter_avp_code.cpp
eapol/eapol_framework/eapol_common/type/diameter/src/eap_diameter_avp_header.cpp
eapol/eapol_framework/eapol_common/type/diameter/src/eap_diameter_payloads.cpp
eapol/eapol_framework/eapol_common/type/eap_type_all.cpp
eapol/eapol_framework/eapol_common/type/gsmsim/core/eap_type_gsmsim.cpp
eapol/eapol_framework/eapol_common/type/gsmsim/core/eap_type_gsmsim_client.cpp
eapol/eapol_framework/eapol_common/type/gsmsim/core/eap_type_gsmsim_header.cpp
eapol/eapol_framework/eapol_common/type/gsmsim/core/eap_type_gsmsim_initialized.cpp
eapol/eapol_framework/eapol_common/type/gsmsim/core/eap_type_gsmsim_mac_attributes.cpp
eapol/eapol_framework/eapol_common/type/gsmsim/core/eap_type_gsmsim_payloads.cpp
eapol/eapol_framework/eapol_common/type/gsmsim/core/eap_type_gsmsim_server.cpp
eapol/eapol_framework/eapol_common/type/gsmsim/core/eap_type_gsmsim_state.cpp
eapol/eapol_framework/eapol_common/type/gsmsim/core/eap_type_gsmsim_state_notification.cpp
eapol/eapol_framework/eapol_common/type/gsmsim/include/abs_eap_type_gsmsim_state.h
eapol/eapol_framework/eapol_common/type/gsmsim/include/eap_gsmsim_state_notification.h
eapol/eapol_framework/eapol_common/type/gsmsim/include/eap_type_gsmsim.h
eapol/eapol_framework/eapol_common/type/gsmsim/include/eap_type_gsmsim_header.h
eapol/eapol_framework/eapol_common/type/gsmsim/include/eap_type_gsmsim_initialized.h
eapol/eapol_framework/eapol_common/type/gsmsim/include/eap_type_gsmsim_mac_attributes.h
eapol/eapol_framework/eapol_common/type/gsmsim/include/eap_type_gsmsim_payloads.h
eapol/eapol_framework/eapol_common/type/gsmsim/include/eap_type_gsmsim_state.h
eapol/eapol_framework/eapol_common/type/gsmsim/include/eap_type_gsmsim_state_notification.h
eapol/eapol_framework/eapol_common/type/gsmsim/include/eap_type_gsmsim_types.h
eapol/eapol_framework/eapol_common/type/mschapv2/core/eap_type_mschapv2.cpp
eapol/eapol_framework/eapol_common/type/mschapv2/core/eap_type_mschapv2_client.cpp
eapol/eapol_framework/eapol_common/type/mschapv2/core/eap_type_mschapv2_credential_store.cpp
eapol/eapol_framework/eapol_common/type/mschapv2/core/eap_type_mschapv2_header.cpp
eapol/eapol_framework/eapol_common/type/mschapv2/core/eap_type_mschapv2_payloads.cpp
eapol/eapol_framework/eapol_common/type/mschapv2/core/eap_type_mschapv2_server.cpp
eapol/eapol_framework/eapol_common/type/mschapv2/core/eap_type_mschapv2_state.cpp
eapol/eapol_framework/eapol_common/type/mschapv2/include/abs_eap_type_mschapv2_state.h
eapol/eapol_framework/eapol_common/type/mschapv2/include/eap_type_mschapv2.h
eapol/eapol_framework/eapol_common/type/mschapv2/include/eap_type_mschapv2_credential_store.h
eapol/eapol_framework/eapol_common/type/mschapv2/include/eap_type_mschapv2_header.h
eapol/eapol_framework/eapol_common/type/mschapv2/include/eap_type_mschapv2_payloads.h
eapol/eapol_framework/eapol_common/type/mschapv2/include/eap_type_mschapv2_state.h
eapol/eapol_framework/eapol_common/type/mschapv2/include/eap_type_mschapv2_types.h
eapol/eapol_framework/eapol_common/type/radius/core/eap_radius.cpp
eapol/eapol_framework/eapol_common/type/radius/core/eap_radius_attribute_header.cpp
eapol/eapol_framework/eapol_common/type/radius/core/eap_radius_client.cpp
eapol/eapol_framework/eapol_common/type/radius/core/eap_radius_header.cpp
eapol/eapol_framework/eapol_common/type/radius/core/eap_radius_header_string.cpp
eapol/eapol_framework/eapol_common/type/radius/core/eap_radius_initialized.cpp
eapol/eapol_framework/eapol_common/type/radius/core/eap_radius_mac_attributes.cpp
eapol/eapol_framework/eapol_common/type/radius/core/eap_radius_payloads.cpp
eapol/eapol_framework/eapol_common/type/radius/core/eap_radius_server.cpp
eapol/eapol_framework/eapol_common/type/radius/core/eap_radius_session.cpp
eapol/eapol_framework/eapol_common/type/radius/core/eap_radius_state.cpp
eapol/eapol_framework/eapol_common/type/radius/core/eap_radius_state_notification.cpp
eapol/eapol_framework/eapol_common/type/radius/include/abs_eap_radius.h
eapol/eapol_framework/eapol_common/type/radius/include/abs_eap_radius_session.h
eapol/eapol_framework/eapol_common/type/radius/include/abs_eap_radius_state.h
eapol/eapol_framework/eapol_common/type/radius/include/eap_radius.h
eapol/eapol_framework/eapol_common/type/radius/include/eap_radius_attribute_header.h
eapol/eapol_framework/eapol_common/type/radius/include/eap_radius_header.h
eapol/eapol_framework/eapol_common/type/radius/include/eap_radius_header_string.h
eapol/eapol_framework/eapol_common/type/radius/include/eap_radius_initialized.h
eapol/eapol_framework/eapol_common/type/radius/include/eap_radius_mac_attributes.h
eapol/eapol_framework/eapol_common/type/radius/include/eap_radius_payloads.h
eapol/eapol_framework/eapol_common/type/radius/include/eap_radius_session.h
eapol/eapol_framework/eapol_common/type/radius/include/eap_radius_state.h
eapol/eapol_framework/eapol_common/type/radius/include/eap_radius_state_notification.h
eapol/eapol_framework/eapol_common/type/radius/include/eap_radius_types.h
eapol/eapol_framework/eapol_common/type/securid/core/eap_type_securid.cpp
eapol/eapol_framework/eapol_common/type/securid/core/eap_type_securid_client.cpp
eapol/eapol_framework/eapol_common/type/securid/core/eap_type_securid_server.cpp
eapol/eapol_framework/eapol_common/type/securid/core/eap_type_securid_state.cpp
eapol/eapol_framework/eapol_common/type/securid/include/abs_eap_type_securid_state.h
eapol/eapol_framework/eapol_common/type/securid/include/eap_type_securid.h
eapol/eapol_framework/eapol_common/type/securid/include/eap_type_securid_state.h
eapol/eapol_framework/eapol_common/type/securid/include/eap_type_securid_types.h
eapol/eapol_framework/eapol_common/type/simple_config/eap/include/eap_type_simple_config.h
eapol/eapol_framework/eapol_common/type/simple_config/eap/include/eap_type_simple_config_header.h
eapol/eapol_framework/eapol_common/type/simple_config/eap/include/eap_type_simple_config_state_notification.h
eapol/eapol_framework/eapol_common/type/simple_config/eap/include/eap_type_simple_config_types.h
eapol/eapol_framework/eapol_common/type/simple_config/eap/src/eap_type_simple_config.cpp
eapol/eapol_framework/eapol_common/type/simple_config/eap/src/eap_type_simple_config_header.cpp
eapol/eapol_framework/eapol_common/type/simple_config/eap/src/eap_type_simple_config_state_notification.cpp
eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/abs_simple_config_apply_cipher_spec.h
eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/abs_simple_config_base_record.h
eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/abs_simple_config_message_hash.h
eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/simple_config_attribute_type.h
eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/simple_config_base_record.h
eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/simple_config_completion.h
eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/simple_config_credential.h
eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/simple_config_message.h
eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/simple_config_payloads.h
eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/simple_config_record.h
eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/simple_config_tlv_header.h
eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/simple_config_types.h
eapol/eapol_framework/eapol_common/type/simple_config/simple_config/src/simple_config_base_record.cpp
eapol/eapol_framework/eapol_common/type/simple_config/simple_config/src/simple_config_completion.cpp
eapol/eapol_framework/eapol_common/type/simple_config/simple_config/src/simple_config_credential.cpp
eapol/eapol_framework/eapol_common/type/simple_config/simple_config/src/simple_config_message.cpp
eapol/eapol_framework/eapol_common/type/simple_config/simple_config/src/simple_config_payloads.cpp
eapol/eapol_framework/eapol_common/type/simple_config/simple_config/src/simple_config_record.cpp
eapol/eapol_framework/eapol_common/type/simple_config/simple_config/src/simple_config_tlv_header.cpp
eapol/eapol_framework/eapol_common/type/simple_config/simple_config/src/simple_config_types.cpp
eapol/eapol_framework/eapol_common/type/tls_peap/eap/include/eap_tls_peap_state_notification.h
eapol/eapol_framework/eapol_common/type/tls_peap/eap/include/eap_type_tls_peap.h
eapol/eapol_framework/eapol_common/type/tls_peap/eap/include/eap_type_tls_peap_header.h
eapol/eapol_framework/eapol_common/type/tls_peap/eap/include/eap_type_tls_peap_state_notification.h
eapol/eapol_framework/eapol_common/type/tls_peap/eap/include/eap_type_tls_peap_types.h
eapol/eapol_framework/eapol_common/type/tls_peap/eap/src/eap_tls_peap_state_notification.cpp
eapol/eapol_framework/eapol_common/type/tls_peap/eap/src/eap_type_tls_peap.cpp
eapol/eapol_framework/eapol_common/type/tls_peap/eap/src/eap_type_tls_peap_header.cpp
eapol/eapol_framework/eapol_common/type/tls_peap/eap/src/eap_type_tls_peap_state_notification.cpp
eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/abs_tls_apply_cipher_spec.h
eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/abs_tls_base_application.h
eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/abs_tls_base_record.h
eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/abs_tls_change_cipher_spec.h
eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/abs_tls_message_hash.h
eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_alert_message.h
eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_application_data_message.h
eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_application_eap_core.h
eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_base_application.h
eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_base_record.h
eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_change_cipher_spec_message.h
eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_completion.h
eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_extension.h
eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_handshake_header.h
eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_handshake_message.h
eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_message.h
eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_peap_tlv_header.h
eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_peap_tlv_payloads.h
eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_peap_types.h
eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_record.h
eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_record_header.h
eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_record_message.h
eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_alert_message.cpp
eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_application_data_message.cpp
eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_application_eap_core.cpp
eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_application_ttls_plain_mschapv2.cpp
eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_base_application.cpp
eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_base_record.cpp
eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_change_cipher_spec_message.cpp
eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_completion.cpp
eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_extension.cpp
eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_handshake_header.cpp
eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_handshake_message.cpp
eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_message.cpp
eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_peap_tlv_header.cpp
eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_peap_tlv_payloads.cpp
eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_peap_types.cpp
eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_record.cpp
eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_record_header.cpp
eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_record_message.cpp
eapol/eapol_framework/eapol_common/wpxstub/eapol_core_wpxm_stub.cpp
eapol/eapol_framework/eapol_common/wpxstub/eapol_key_state_common_wpxm_stub.cpp
eapol/eapol_framework/eapol_common/wpxstub/ethernet_core_wpxm_stub.cpp
eapol/eapol_framework/eapol_symbian/BWINS/eap_notifieru.def
eapol/eapol_framework/eapol_symbian/EABI/EapAuthServeru.def
eapol/eapol_framework/eapol_symbian/EABI/eap_notifieru.def
eapol/eapol_framework/eapol_symbian/EABI/eapclientifu.def
eapol/eapol_framework/eapol_symbian/EABI/eapcoreinterfaceu.def
eapol/eapol_framework/eapol_symbian/EABI/eapolprotected.def
eapol/eapol_framework/eapol_symbian/EABI/eapolprotectedu.def
eapol/eapol_framework/eapol_symbian/am/common/DSS_random/dss_random_symbian.cpp
eapol/eapol_framework/eapol_symbian/am/common/file_io/symbian/eap_am_file_input_symbian.cpp
eapol/eapol_framework/eapol_symbian/am/common/symbian/EapConfigToolsSymbian.cpp
eapol/eapol_framework/eapol_symbian/am/common/symbian/EapConversion.cpp
eapol/eapol_framework/eapol_symbian/am/common/symbian/EapExpandedType.cpp
eapol/eapol_framework/eapol_symbian/am/common/symbian/EapMessageQueue.cpp
eapol/eapol_framework/eapol_symbian/am/common/symbian/EapPluginTools.cpp
eapol/eapol_framework/eapol_symbian/am/common/symbian/EapSettings.cpp
eapol/eapol_framework/eapol_symbian/am/common/symbian/dll_entry.cpp
eapol/eapol_framework/eapol_symbian/am/common/symbian/eap_am_async_wait_symbian.cpp
eapol/eapol_framework/eapol_symbian/am/common/symbian/eap_am_crypto_symbian.cpp
eapol/eapol_framework/eapol_symbian/am/common/symbian/eap_am_mutex_symbian.cpp
eapol/eapol_framework/eapol_symbian/am/common/symbian/eap_am_semaphore_symbian.cpp
eapol/eapol_framework/eapol_symbian/am/common/symbian/eap_am_tools_symbian.cpp
eapol/eapol_framework/eapol_symbian/am/common/symbian/eap_am_trace_symbian.cpp
eapol/eapol_framework/eapol_symbian/am/core/symbian/Eapol.cpp
eapol/eapol_framework/eapol_symbian/am/core/symbian/EapolTimer.cpp
eapol/eapol_framework/eapol_symbian/am/core/symbian/eapol_am_core_symbian.cpp
eapol/eapol_framework/eapol_symbian/am/core/symbian/eapol_am_core_symbian_simulator.cpp
eapol/eapol_framework/eapol_symbian/am/core/symbian/eapol_am_core_symbian_wlm.cpp
eapol/eapol_framework/eapol_symbian/am/core/symbian/eapol_am_wlan_authentication_symbian.cpp
eapol/eapol_framework/eapol_symbian/am/core/symbian/file_config/eap_symbian.conf
eapol/eapol_framework/eapol_symbian/am/eap_notifier/group/bld.inf
eapol/eapol_framework/eapol_symbian/am/eap_notifier/group/eap_notifier.mmp
eapol/eapol_framework/eapol_symbian/am/eap_notifier/inc/eap_auth_notifier.h
eapol/eapol_framework/eapol_symbian/am/eap_notifier/inc/eap_auth_observer.h
eapol/eapol_framework/eapol_symbian/am/eap_notifier/inc/eap_auth_ui_strings.h
eapol/eapol_framework/eapol_symbian/am/eap_notifier/rom/eap_notifier.iby
eapol/eapol_framework/eapol_symbian/am/eap_notifier/src/eap_auth_notifier.cpp
eapol/eapol_framework/eapol_symbian/am/eap_notifier/src/eap_auth_observer.cpp
eapol/eapol_framework/eapol_symbian/am/eap_test_timer/symbian/eap_test_timer.cpp
eapol/eapol_framework/eapol_symbian/am/eapvpnif/data/10200ec9.rss
eapol/eapol_framework/eapol_symbian/am/eapvpnif/data/10200eca.rss
eapol/eapol_framework/eapol_symbian/am/eapvpnif/inc/eap_vpn_if_implementation.h
eapol/eapol_framework/eapol_symbian/am/eapvpnif/inc/eap_vpn_if_resolver.h
eapol/eapol_framework/eapol_symbian/am/eapvpnif/inc/eap_vpn_if_timer.h
eapol/eapol_framework/eapol_symbian/am/eapvpnif/src/eap_vpn_if_implementation.cpp
eapol/eapol_framework/eapol_symbian/am/eapvpnif/src/eap_vpn_if_main.cpp
eapol/eapol_framework/eapol_symbian/am/eapvpnif/src/eap_vpn_if_proxy.cpp
eapol/eapol_framework/eapol_symbian/am/eapvpnif/src/eap_vpn_if_resolver.cpp
eapol/eapol_framework/eapol_symbian/am/eapvpnif/src/eap_vpn_if_resolvermain.cpp
eapol/eapol_framework/eapol_symbian/am/eapvpnif/src/eap_vpn_if_resolverproxy.cpp
eapol/eapol_framework/eapol_symbian/am/eapvpnif/src/eap_vpn_if_timer.cpp
eapol/eapol_framework/eapol_symbian/am/include/EapAkaInterface.h
eapol/eapol_framework/eapol_symbian/am/include/EapConfigToolsSymbian.h
eapol/eapol_framework/eapol_symbian/am/include/EapConversion.h
eapol/eapol_framework/eapol_symbian/am/include/EapLeapNotifierStructs.h
eapol/eapol_framework/eapol_symbian/am/include/EapLeapNotifierUids.h
eapol/eapol_framework/eapol_symbian/am/include/EapMessageQueue.h
eapol/eapol_framework/eapol_symbian/am/include/EapMsChapV2NotifierStructs.h
eapol/eapol_framework/eapol_symbian/am/include/EapMsChapV2NotifierUids.h
eapol/eapol_framework/eapol_symbian/am/include/EapProtectedSetupInterface.h
eapol/eapol_framework/eapol_symbian/am/include/EapSecurIDNotifierStructs.h
eapol/eapol_framework/eapol_symbian/am/include/EapSecurIDNotifierUids.h
eapol/eapol_framework/eapol_symbian/am/include/EapSimInterface.h
eapol/eapol_framework/eapol_symbian/am/include/EapSimIsaInterface.h
eapol/eapol_framework/eapol_symbian/am/include/EapTlsPeapCertInterface.h
eapol/eapol_framework/eapol_symbian/am/include/EapTlsPeapNotifierStructs.h
eapol/eapol_framework/eapol_symbian/am/include/EapTlsPeapTimerValues.h
eapol/eapol_framework/eapol_symbian/am/include/EapTtlsPapDbInfoStruct.h
eapol/eapol_framework/eapol_symbian/am/include/Eapol.h
eapol/eapol_framework/eapol_symbian/am/include/EapolDbDefaults.h
eapol/eapol_framework/eapol_symbian/am/include/EapolDbParameterNames.h
eapol/eapol_framework/eapol_symbian/am/include/EapolTimer.h
eapol/eapol_framework/eapol_symbian/am/include/EapolToWlmIf.h
eapol/eapol_framework/eapol_symbian/am/include/EapolUID.h
eapol/eapol_framework/eapol_symbian/am/include/abs_eapol_am_core_symbian.h
eapol/eapol_framework/eapol_symbian/am/include/abs_eapol_am_core_symbian_simulator.h
eapol/eapol_framework/eapol_symbian/am/include/eap_am_async_wait_symbian.h
eapol/eapol_framework/eapol_symbian/am/include/eap_am_crypto_symbian.h
eapol/eapol_framework/eapol_symbian/am/include/eap_am_file_input_symbian.h
eapol/eapol_framework/eapol_symbian/am/include/eap_am_mutex_symbian.h
eapol/eapol_framework/eapol_symbian/am/include/eap_am_semaphore_symbian.h
eapol/eapol_framework/eapol_symbian/am/include/eap_am_tools_symbian.h
eapol/eapol_framework/eapol_symbian/am/include/eap_am_trace_symbian.h
eapol/eapol_framework/eapol_symbian/am/include/eap_am_type_aka_symbian.h
eapol/eapol_framework/eapol_symbian/am/include/eap_am_type_gsmsim_symbian.h
eapol/eapol_framework/eapol_symbian/am/include/eap_am_type_gsmsim_symbian_simulator.h
eapol/eapol_framework/eapol_symbian/am/include/eap_am_type_leap_symbian.h
eapol/eapol_framework/eapol_symbian/am/include/eap_am_type_mschapv2_symbian.h
eapol/eapol_framework/eapol_symbian/am/include/eap_am_type_protected_setup_symbian.h
eapol/eapol_framework/eapol_symbian/am/include/eap_am_type_securid_symbian.h
eapol/eapol_framework/eapol_symbian/am/include/eap_am_type_sim_symbian.h
eapol/eapol_framework/eapol_symbian/am/include/eap_am_type_tls_peap_symbian.h
eapol/eapol_framework/eapol_symbian/am/include/eapol_am_core_symbian.h
eapol/eapol_framework/eapol_symbian/am/include/eapol_am_core_symbian_simulator.h
eapol/eapol_framework/eapol_symbian/am/include/eapol_am_core_symbian_wlm.h
eapol/eapol_framework/eapol_symbian/am/include/eapol_am_wlan_authentication_symbian.h
eapol/eapol_framework/eapol_symbian/am/include/eaptlspeap_db_api_inc/AbsEapCertificateFetcher.h
eapol/eapol_framework/eapol_symbian/am/include/eaptlspeap_db_api_inc/AbsEapTlsPeapUiCertificates.h
eapol/eapol_framework/eapol_symbian/am/include/eaptlspeap_db_api_inc/EapFastNotifierStruct.h
eapol/eapol_framework/eapol_symbian/am/include/eaptlspeap_db_api_inc/EapFastPacStore.h
eapol/eapol_framework/eapol_symbian/am/include/eaptlspeap_db_api_inc/EapFastPacStore.inl
eapol/eapol_framework/eapol_symbian/am/include/eaptlspeap_db_api_inc/EapTlsPeapUiCertificates.h
eapol/eapol_framework/eapol_symbian/am/include/eaptlspeap_db_api_inc/EapTlsPeapUiCipherSuite.h
eapol/eapol_framework/eapol_symbian/am/include/eaptlspeap_db_api_inc/EapTlsPeapUiCipherSuites.h
eapol/eapol_framework/eapol_symbian/am/include/eaptlspeap_db_api_inc/EapTlsPeapUiConnection.h
eapol/eapol_framework/eapol_symbian/am/include/eaptlspeap_db_api_inc/EapTlsPeapUiDataConnection.h
eapol/eapol_framework/eapol_symbian/am/include/eaptlspeap_db_api_inc/EapTlsPeapUiEapType.h
eapol/eapol_framework/eapol_symbian/am/include/eaptlspeap_db_api_inc/EapTlsPeapUiEapTypes.h
eapol/eapol_framework/eapol_symbian/am/include/eaptlspeap_db_api_inc/EapTlsPeapUiTlsPeapData.h
eapol/eapol_framework/eapol_symbian/am/include/eaptlspeap_db_api_inc/EapTtlsPapNotifierStruct.h
eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/EapAkaInterface.cpp
eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/eap_am_type_aka_symbian.cpp
eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/inc/EapAka.h
eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/inc/EapAkaDbDefaults.h
eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/inc/EapAkaDbParameterNames.h
eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/inc/EapAkaDbUtils.h
eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/inc/EapAkaGlobal.h
eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/src/102073c1.rss
eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/src/EapAka.cpp
eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/src/EapAkaDbUtils.cpp
eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/src/EapAkaProxy.cpp
eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/src/EapAkaUiAkaData.cpp
eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/src/EapAkaUiConnection.cpp
eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/src/EapAkaUiDataConnection.cpp
eapol/eapol_framework/eapol_symbian/am/type/generic/symbian/plugin/inc/EapGeneric.h
eapol/eapol_framework/eapol_symbian/am/type/generic/symbian/plugin/src/EapGeneric.cpp
eapol/eapol_framework/eapol_symbian/am/type/generic/symbian/plugin/src/EapGenericProxy.cpp
eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/EapSimInterface.cpp
eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/eap_am_type_gsmsim_symbian.cpp
eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/eap_am_type_gsmsim_symbian_simulator.cpp
eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/inc/EapSim.h
eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/inc/EapSimDbDefaults.h
eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/inc/EapSimDbParameterNames.h
eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/inc/EapSimDbUtils.h
eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/inc/EapSimGlobal.h
eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/simulator/inc/EapSimSimulatorConfig.h
eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/simulator/inc/EapSimSimulatorPlugin.h
eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/simulator/src/26666669.rss
eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/simulator/src/EapSimSimulatorConfig.cpp
eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/simulator/src/EapSimSimulatorPlugin.cpp
eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/simulator/src/EapSimSimulatorProxy.cpp
eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/src/101f8e49.rss
eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/src/EapSim.cpp
eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/src/EapSimDbUtils.cpp
eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/src/EapSimProxy.cpp
eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/src/EapSimUiConnection.cpp
eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/src/EapSimUiDataConnection.cpp
eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/src/EapSimUiSimData.cpp
eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/eap_am_type_mschapv2_symbian.cpp
eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/inc/EapMsChapV2.h
eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/inc/EapMsChapV2DbDefaults.h
eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/inc/EapMsChapV2DbParameterNames.h
eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/inc/EapMsChapV2DbUtils.h
eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/inc/EapMsChapV2Global.h
eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/src/101F8E66.rss
eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/src/EapMsChapV2.cpp
eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/src/EapMsChapV2DbUtils.cpp
eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/src/EapMsChapV2Proxy.cpp
eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/src/EapMsChapV2UiConnection.cpp
eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/src/EapMsChapV2UiDataConnection.cpp
eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/src/EapMsChapV2UiMsChapV2Data.cpp
eapol/eapol_framework/eapol_symbian/am/type/protected_setup/EapProtectedSetupInterface.cpp
eapol/eapol_framework/eapol_symbian/am/type/protected_setup/eap_am_type_protected_setup_symbian.cpp
eapol/eapol_framework/eapol_symbian/am/type/protected_setup/symbian/plugin/inc/EapProtectedSetup.h
eapol/eapol_framework/eapol_symbian/am/type/protected_setup/symbian/plugin/inc/EapProtectedSetupGlobal.h
eapol/eapol_framework/eapol_symbian/am/type/protected_setup/symbian/plugin/src/2000b003.rss
eapol/eapol_framework/eapol_symbian/am/type/protected_setup/symbian/plugin/src/EapProtectedSetup.cpp
eapol/eapol_framework/eapol_symbian/am/type/protected_setup/symbian/plugin/src/EapProtectedSetupProxy.cpp
eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/eap_am_type_securid_symbian.cpp
eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/inc/EapGtcDbDefaults.h
eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/inc/EapGtcDbParameterNames.h
eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/inc/EapGtcDbUtils.h
eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/inc/EapSecurID.h
eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/inc/EapSecurIDDbDefaults.h
eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/inc/EapSecurIDDbParameterNames.h
eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/inc/EapSecurIDDbUtils.h
eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/inc/EapSecurIDGlobal.h
eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/src/101F8E74.rss
eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/src/EapGtcDbUtils.cpp
eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/src/EapGtcUiConnection.cpp
eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/src/EapGtcUiDataConnection.cpp
eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/src/EapGtcUiGtcData.cpp
eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/src/EapSecurID.cpp
eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/src/EapSecurIDDbUtils.cpp
eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/src/EapSecurIDProxy.cpp
eapol/eapol_framework/eapol_symbian/am/type/sim/symbian/eap_am_type_sim_symbian.cpp
eapol/eapol_framework/eapol_symbian/am/type/symbian/plugin/common/EapTypeInfo.cpp
eapol/eapol_framework/eapol_symbian/am/type/symbian/plugin/include/EapPluginDbDefaults.h
eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/EapTlsPeapCertInterface.cpp
eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/eap_am_type_tls_peap_symbian.cpp
eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/inc/EapTlsPeap.h
eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/inc/EapTlsPeapCertFetcher.h
eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/inc/EapTlsPeapDbDefaults.h
eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/inc/EapTlsPeapDbParameterNames.h
eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/inc/EapTlsPeapGlobal.h
eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/inc/EapTlsPeapUtils.h
eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/src/101f8e4c.rss
eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/src/EapTlsPeap.cpp
eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/src/EapTlsPeapCertFetcher.cpp
eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/src/EapTlsPeapProxy.cpp
eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/src/EapTlsPeapUiCertificates.cpp
eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/src/EapTlsPeapUiCipherSuites.cpp
eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/src/EapTlsPeapUiConnection.cpp
eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/src/EapTlsPeapUiDataConnection.cpp
eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/src/EapTlsPeapUiEapTypes.cpp
eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/src/EapTlsPeapUiTlsPeapData.cpp
eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/src/EapTlsPeapUtils.cpp
eapol/eapol_framework/eapol_symbian/am/wlaneapolif/data/2000b05a.rss
eapol/eapol_framework/eapol_symbian/am/wlaneapolif/inc/wlan_eapol_if_implementation.h
eapol/eapol_framework/eapol_symbian/am/wlaneapolif/src/wlan_eapol_if_implementation.cpp
eapol/eapol_framework/eapol_symbian/eap_if/data/20026FC8.rss
eapol/eapol_framework/eapol_symbian/eap_if/data/20026fcd.rss
eapol/eapol_framework/eapol_symbian/eap_if/data/20026fd1.rss
eapol/eapol_framework/eapol_symbian/eap_if/data/20026fd6.rss
eapol/eapol_framework/eapol_symbian/eap_if/data/2002BC91.rss
eapol/eapol_framework/eapol_symbian/eap_if/include/EapClientIf.h
eapol/eapol_framework/eapol_symbian/eap_if/include/EapCoreInterface.h
eapol/eapol_framework/eapol_symbian/eap_if/include/EapCoreInterfaceImplementation.h
eapol/eapol_framework/eapol_symbian/eap_if/include/EapFastPacStoreImpl.h
eapol/eapol_framework/eapol_symbian/eap_if/include/EapGeneralSettingsImpl.h
eapol/eapol_framework/eapol_symbian/eap_if/include/EapProcessInterface.h
eapol/eapol_framework/eapol_symbian/eap_if/include/EapProcessInterface.inl
eapol/eapol_framework/eapol_symbian/eap_if/include/EapSendInterface.h
eapol/eapol_framework/eapol_symbian/eap_if/include/REapSession.h
eapol/eapol_framework/eapol_symbian/eap_if/include/SendPacketHandler.h
eapol/eapol_framework/eapol_symbian/eap_if/include/eap_am_message_if_symbian.h
eapol/eapol_framework/eapol_symbian/eap_if/src/EapClientIf.cpp
eapol/eapol_framework/eapol_symbian/eap_if/src/EapCoreInterface.cpp
eapol/eapol_framework/eapol_symbian/eap_if/src/EapCoreInterfaceImplementation.cpp
eapol/eapol_framework/eapol_symbian/eap_if/src/EapFastPacStoreImpl.cpp
eapol/eapol_framework/eapol_symbian/eap_if/src/EapGeneralSettingsImpl.cpp
eapol/eapol_framework/eapol_symbian/eap_if/src/EapGeneralSettingsProxy.cpp
eapol/eapol_framework/eapol_symbian/eap_if/src/REapSession.cpp
eapol/eapol_framework/eapol_symbian/eap_if/src/eap_am_message_if_symbian.cpp
eapol/eapol_framework/eapol_symbian/eap_server/include/AbsEapProcessSendInterface.h
eapol/eapol_framework/eapol_symbian/eap_server/include/AbsEapSendInterface.h
eapol/eapol_framework/eapol_symbian/eap_server/include/EapCoreIf.h
eapol/eapol_framework/eapol_symbian/eap_server/include/EapPluginIf.h
eapol/eapol_framework/eapol_symbian/eap_server/include/EapScheduler.h
eapol/eapol_framework/eapol_symbian/eap_server/include/EapServer.h
eapol/eapol_framework/eapol_symbian/eap_server/include/EapServerBackup.h
eapol/eapol_framework/eapol_symbian/eap_server/include/EapServerClientDef.h
eapol/eapol_framework/eapol_symbian/eap_server/include/EapServerProcessHandler.h
eapol/eapol_framework/eapol_symbian/eap_server/include/EapServerStrings.h
eapol/eapol_framework/eapol_symbian/eap_server/include/EapSession.h
eapol/eapol_framework/eapol_symbian/eap_server/include/EapSettingsIf.h
eapol/eapol_framework/eapol_symbian/eap_server/include/PacStoreIf.h
eapol/eapol_framework/eapol_symbian/eap_server/include/eap_am_general_settings_symbian.h
eapol/eapol_framework/eapol_symbian/eap_server/include/eap_am_pac_store_symbian.h
eapol/eapol_framework/eapol_symbian/eap_server/include/eap_am_plugin_symbian.h
eapol/eapol_framework/eapol_symbian/eap_server/include/eap_am_stack_symbian.h
eapol/eapol_framework/eapol_symbian/eap_server/include/eap_loaded_type.h
eapol/eapol_framework/eapol_symbian/eap_server/src/EapCoreIf.cpp
eapol/eapol_framework/eapol_symbian/eap_server/src/EapPluginIf.cpp
eapol/eapol_framework/eapol_symbian/eap_server/src/EapScheduler.cpp
eapol/eapol_framework/eapol_symbian/eap_server/src/EapServer.cpp
eapol/eapol_framework/eapol_symbian/eap_server/src/EapServerBackup.cpp
eapol/eapol_framework/eapol_symbian/eap_server/src/EapServerExe.cpp
eapol/eapol_framework/eapol_symbian/eap_server/src/EapServerProcessHandler.cpp
eapol/eapol_framework/eapol_symbian/eap_server/src/EapServerStrings.cpp
eapol/eapol_framework/eapol_symbian/eap_server/src/EapSession.cpp
eapol/eapol_framework/eapol_symbian/eap_server/src/EapSettingsIf.cpp
eapol/eapol_framework/eapol_symbian/eap_server/src/PacStoreIf.cpp
eapol/eapol_framework/eapol_symbian/eap_server/src/eap_am_general_settings_symbian.cpp
eapol/eapol_framework/eapol_symbian/eap_server/src/eap_am_pac_store_symbian.cpp
eapol/eapol_framework/eapol_symbian/eap_server/src/eap_am_plugin_symbian.cpp
eapol/eapol_framework/eapol_symbian/eap_server/src/eap_am_stack_symbian.cpp
eapol/eapol_framework/eapol_symbian/eap_server/src/eap_loaded_type.cpp
eapol/eapol_framework/eapol_symbian/group/backup_registration.xml
eapol/eapol_framework/eapol_symbian/group/bld.inf
eapol/eapol_framework/eapol_symbian/group/eabi/eapleapu.def
eapol/eapol_framework/eapol_symbian/group/eabi/pacstoreifu.def
eapol/eapol_framework/eapol_symbian/group/eap_notifier.mmp
eapol/eapol_framework/eapol_symbian/group/eapaka.mmp
eapol/eapol_framework/eapol_symbian/group/eapauthserver.mmp
eapol/eapol_framework/eapol_symbian/group/eapauthserverexe.mmp
eapol/eapol_framework/eapol_symbian/group/eapclientif.mmp
eapol/eapol_framework/eapol_symbian/group/eapcoreinterface.mmp
eapol/eapol_framework/eapol_symbian/group/eapcoreinterfaceimplementation.mmp
eapol/eapol_framework/eapol_symbian/group/eapgeneralsettings.mmp
eapol/eapol_framework/eapol_symbian/group/eapgeneric.mmp
eapol/eapol_framework/eapol_symbian/group/eapmschapv2.mmp
eapol/eapol_framework/eapol_symbian/group/eapol.mmh
eapol/eapol_framework/eapol_symbian/group/eapol.mmp
eapol/eapol_framework/eapol_symbian/group/eapolwpxstub.mmp
eapol/eapol_framework/eapol_symbian/group/eapprotectedsetup.mmp
eapol/eapol_framework/eapol_symbian/group/eapsecurid.mmp
eapol/eapol_framework/eapol_symbian/group/eapsim.mmp
eapol/eapol_framework/eapol_symbian/group/eaptlspeap.mmp
eapol/eapol_framework/eapol_symbian/group/eapvpnif.mmp
eapol/eapol_framework/eapol_symbian/group/wlaneapolif.mmp
eapol/eapol_framework/eapol_symbian/rom/eapol.iby
eapol/eapol_framework/eapol_symbian/tools/eabi/eapsymbiantoolsu.def
eapol/eapol_framework/eapol_symbian/tools/eabi/eaptoolsu.def
eapol/eapol_framework/eapol_symbian/tools/eabi/eaptraceu.def
eapol/eapol_framework/eapol_symbian/tools/group/bld.inf
eapol/eapol_framework/eapol_symbian/tools/group/eapsymbiantools.mmp
eapol/eapol_framework/eapol_symbian/tools/group/eaptools.mmp
eapol/eapol_framework/eapol_symbian/tools/group/eaptrace.mmp
eapol/group/bld.inf
group/bld.inf
layers.sysdef.xml
securitysettings/cpeapuiplugins/cpeapsimakaui/cpeapsimakaui.pro
securitysettings/cpeapuiplugins/cpeapsimakaui/inc/cpeapsimakaplugin.h
securitysettings/cpeapuiplugins/cpeapsimakaui/inc/cpeapsimakaui.h
securitysettings/cpeapuiplugins/cpeapsimakaui/rom/cpeapsimakaui.iby
securitysettings/cpeapuiplugins/cpeapsimakaui/src/cpeapsimakaplugin.cpp
securitysettings/cpeapuiplugins/cpeapsimakaui/src/cpeapsimakaui.cpp
securitysettings/cpeapuiplugins/cpeapuiplugins.pro
securitysettings/cpeapuiplugins/cpeapuserpasswordui/cpeapuserpasswordui.pro
securitysettings/cpeapuiplugins/cpeapuserpasswordui/inc/cpeapuserpasswordplugin.h
securitysettings/cpeapuiplugins/cpeapuserpasswordui/inc/cpeapuserpasswordui.h
securitysettings/cpeapuiplugins/cpeapuserpasswordui/resources/input_prompt_line_edit.docml
securitysettings/cpeapuiplugins/cpeapuserpasswordui/resources/resource.qrc
securitysettings/cpeapuiplugins/cpeapuserpasswordui/rom/cpeapuserpasswordui.iby
securitysettings/cpeapuiplugins/cpeapuserpasswordui/src/cpeapuserpasswordplugin.cpp
securitysettings/cpeapuiplugins/cpeapuserpasswordui/src/cpeapuserpasswordui.cpp
securitysettings/cpeapuiplugins/inc/cpeapciphersuiteui.h
securitysettings/cpeapuiplugins/inc/eapuidefs.h
securitysettings/cpwlansecurityuiplugins/bwins/cpwpacmnuiu.def
securitysettings/cpwlansecurityuiplugins/cp802dot1xui/cp802dot1xui.pro
securitysettings/cpwlansecurityuiplugins/cp802dot1xui/inc/cp802dot1xui.h
securitysettings/cpwlansecurityuiplugins/cp802dot1xui/rom/cp802dot1xui.iby
securitysettings/cpwlansecurityuiplugins/cp802dot1xui/src/cp802dot1xui.cpp
securitysettings/cpwlansecurityuiplugins/cp802dot1xui/traces/OstTraceDefinitions.h
securitysettings/cpwlansecurityuiplugins/cpwepui/cpwepui.pro
securitysettings/cpwlansecurityuiplugins/cpwepui/inc/cpwepui.h
securitysettings/cpwlansecurityuiplugins/cpwepui/inc/wepkeyvalidator.h
securitysettings/cpwlansecurityuiplugins/cpwepui/inc/wlansecuritycontrolpanelwepdefs.h
securitysettings/cpwlansecurityuiplugins/cpwepui/rom/cpwepui.iby
securitysettings/cpwlansecurityuiplugins/cpwepui/src/cpwepui.cpp
securitysettings/cpwlansecurityuiplugins/cpwepui/src/wepkeyvalidator.cpp
securitysettings/cpwlansecurityuiplugins/cpwepui/traces/OstTraceDefinitions.h
securitysettings/cpwlansecurityuiplugins/cpwlansecurityuiplugins.pro
securitysettings/cpwlansecurityuiplugins/cpwpa2ui/cpwpa2ui.pro
securitysettings/cpwlansecurityuiplugins/cpwpa2ui/inc/cpwpa2ui.h
securitysettings/cpwlansecurityuiplugins/cpwpa2ui/inc/wpa2keyvalidator.h
securitysettings/cpwlansecurityuiplugins/cpwpa2ui/rom/cpwpa2ui.iby
securitysettings/cpwlansecurityuiplugins/cpwpa2ui/src/cpwpa2ui.cpp
securitysettings/cpwlansecurityuiplugins/cpwpa2ui/src/wpa2keyvalidator.cpp
securitysettings/cpwlansecurityuiplugins/cpwpa2ui/traces/OstTraceDefinitions.h
securitysettings/cpwlansecurityuiplugins/cpwpacmnui/cpwpacmnui.pro
securitysettings/cpwlansecurityuiplugins/cpwpacmnui/inc/cpwpacmneapui.h
securitysettings/cpwlansecurityuiplugins/cpwpacmnui/inc/cpwpacmnui.h
securitysettings/cpwlansecurityuiplugins/cpwpacmnui/inc/cpwpacmnui_global.h
securitysettings/cpwlansecurityuiplugins/cpwpacmnui/inc/cpwpacmnui_p.h
securitysettings/cpwlansecurityuiplugins/cpwpacmnui/inc/wpakeyvalidator.h
securitysettings/cpwlansecurityuiplugins/cpwpacmnui/rom/cpwpacmnui.iby
securitysettings/cpwlansecurityuiplugins/cpwpacmnui/src/cpwpacmneapui.cpp
securitysettings/cpwlansecurityuiplugins/cpwpacmnui/src/cpwpacmnui.cpp
securitysettings/cpwlansecurityuiplugins/cpwpacmnui/src/cpwpacmnui_p.cpp
securitysettings/cpwlansecurityuiplugins/cpwpacmnui/src/wpakeyvalidator.cpp
securitysettings/cpwlansecurityuiplugins/cpwpacmnui/traces/OstTraceDefinitions.h
securitysettings/cpwlansecurityuiplugins/cpwpaui/cpwpaui.pro
securitysettings/cpwlansecurityuiplugins/cpwpaui/inc/cpwpaui.h
securitysettings/cpwlansecurityuiplugins/cpwpaui/inc/wpakeyvalidator.h
securitysettings/cpwlansecurityuiplugins/cpwpaui/rom/cpwpaui.iby
securitysettings/cpwlansecurityuiplugins/cpwpaui/src/cpwpaui.cpp
securitysettings/cpwlansecurityuiplugins/cpwpaui/src/wpakeyvalidator.cpp
securitysettings/cpwlansecurityuiplugins/cpwpaui/traces/OstTraceDefinitions.h
securitysettings/cpwlansecurityuiplugins/eabi/cpwpacmnuiu.def
securitysettings/cpwlansecurityuiplugins/inc/cpwpacmnui.h
securitysettings/cpwlansecurityuiplugins/inc/cpwpacmnui_global.h
securitysettings/cpwlansecurityuiplugins/rom/cpwlansecurityuiplugins_resources.iby
securitysettings/eapqtdialogs/eapqtdialogs.pro
securitysettings/eapqtdialogs/inc/eapdialogplugin.h
securitysettings/eapqtdialogs/inc/eapfastcreatemasterkeyquerydialog.h
securitysettings/eapqtdialogs/inc/eapfastinstallpacquerydialog.h
securitysettings/eapqtdialogs/inc/eapfastpacfilepwquerydialog.h
securitysettings/eapqtdialogs/inc/eapfastpacstorepwquerydialog.h
securitysettings/eapqtdialogs/inc/eapfastprovnotsuccessnotedialog.h
securitysettings/eapqtdialogs/inc/eapfastprovwaitnotedialog.h
securitysettings/eapqtdialogs/inc/eapmschapv2newpwddialog.h
securitysettings/eapqtdialogs/inc/eapmschapv2oldpwddialog.h
securitysettings/eapqtdialogs/inc/eapmschapv2pwdexpirednotedialog.h
securitysettings/eapqtdialogs/inc/eappasswordquerydialog.h
securitysettings/eapqtdialogs/inc/eapquerydialog.h
securitysettings/eapqtdialogs/inc/eapusernamepwddialog.h
securitysettings/eapqtdialogs/rom/eapdialogplugin.iby
securitysettings/eapqtdialogs/rom/eapdialogplugin_resources.iby
securitysettings/eapqtdialogs/src/eapdialogplugin.cpp
securitysettings/eapqtdialogs/src/eapfastcreatemasterkeyquerydialog.cpp
securitysettings/eapqtdialogs/src/eapfastinstallpacquerydialog.cpp
securitysettings/eapqtdialogs/src/eapfastpacfilepwquerydialog.cpp
securitysettings/eapqtdialogs/src/eapfastpacstorepwquerydialog.cpp
securitysettings/eapqtdialogs/src/eapfastprovnotsuccessnotedialog.cpp
securitysettings/eapqtdialogs/src/eapfastprovwaitnotedialog.cpp
securitysettings/eapqtdialogs/src/eapmschapv2newpwddialog.cpp
securitysettings/eapqtdialogs/src/eapmschapv2oldpwddialog.cpp
securitysettings/eapqtdialogs/src/eapmschapv2pwdexpirednotedialog.cpp
securitysettings/eapqtdialogs/src/eappasswordquerydialog.cpp
securitysettings/eapqtdialogs/src/eapquerydialog.cpp
securitysettings/eapqtdialogs/src/eapusernamepwddialog.cpp
securitysettings/eapqtdialogs/traces/OstTraceDefinitions.h
securitysettings/inc/cpeapplugininterface.h
securitysettings/inc/eapqtconfiginterface.h
securitysettings/inc/eapqtpluginhandle.h
securitysettings/inc/eapqtplugininfo.h
securitysettings/qtconfigutils/eapqtconfiginterface/eapqtconfiginterface.pro
securitysettings/qtconfigutils/eapqtconfiginterface/inc/eapqtcertificateinfo_p.h
securitysettings/qtconfigutils/eapqtconfiginterface/inc/eapqtconfig_p.h
securitysettings/qtconfigutils/eapqtconfiginterface/inc/eapqtconfiginterface_p.h
securitysettings/qtconfigutils/eapqtconfiginterface/inc/eapqtvalidatorpacstorepassword.h
securitysettings/qtconfigutils/eapqtconfiginterface/inc/eapqtvalidatorpacstorepasswordconfirm.h
securitysettings/qtconfigutils/eapqtconfiginterface/inc/eapqtvalidatorpassword.h
securitysettings/qtconfigutils/eapqtconfiginterface/inc/eapqtvalidatorrealm.h
securitysettings/qtconfigutils/eapqtconfiginterface/inc/eapqtvalidatorusername.h
securitysettings/qtconfigutils/eapqtconfiginterface/inc/pacstoreconfig.h
securitysettings/qtconfigutils/eapqtconfiginterface/rom/eapqtconfiginterface.iby
securitysettings/qtconfigutils/eapqtconfiginterface/rom/eapqtconfiginterface_resources.iby
securitysettings/qtconfigutils/eapqtconfiginterface/src/eapqtcertificateinfo.cpp
securitysettings/qtconfigutils/eapqtconfiginterface/src/eapqtcertificateinfo_p.cpp
securitysettings/qtconfigutils/eapqtconfiginterface/src/eapqtconfig.cpp
securitysettings/qtconfigutils/eapqtconfiginterface/src/eapqtconfig_p.cpp
securitysettings/qtconfigutils/eapqtconfiginterface/src/eapqtconfiginterface.cpp
securitysettings/qtconfigutils/eapqtconfiginterface/src/eapqtconfiginterface_p.cpp
securitysettings/qtconfigutils/eapqtconfiginterface/src/eapqtvalidatorpacstorepassword.cpp
securitysettings/qtconfigutils/eapqtconfiginterface/src/eapqtvalidatorpacstorepasswordconfirm.cpp
securitysettings/qtconfigutils/eapqtconfiginterface/src/eapqtvalidatorpassword.cpp
securitysettings/qtconfigutils/eapqtconfiginterface/src/eapqtvalidatorrealm.cpp
securitysettings/qtconfigutils/eapqtconfiginterface/src/eapqtvalidatorusername.cpp
securitysettings/qtconfigutils/eapqtplugininfo/eapqtplugininfo.pro
securitysettings/qtconfigutils/eapqtplugininfo/inc/eapqtexpandedeaptype_p.h
securitysettings/qtconfigutils/eapqtplugininfo/inc/eapqtpluginhandle_p.h
securitysettings/qtconfigutils/eapqtplugininfo/inc/eapqtplugininfo_p.h
securitysettings/qtconfigutils/eapqtplugininfo/rom/eapqtplugininfo.iby
securitysettings/qtconfigutils/eapqtplugininfo/src/eapqtexpandedeaptype.cpp
securitysettings/qtconfigutils/eapqtplugininfo/src/eapqtexpandedeaptype_p.cpp
securitysettings/qtconfigutils/eapqtplugininfo/src/eapqtpluginhandle.cpp
securitysettings/qtconfigutils/eapqtplugininfo/src/eapqtpluginhandle_p.cpp
securitysettings/qtconfigutils/eapqtplugininfo/src/eapqtplugininfo.cpp
securitysettings/qtconfigutils/eapqtplugininfo/src/eapqtplugininfo_p.cpp
securitysettings/qtconfigutils/qtconfigutils.pro
securitysettings/qtconfigutils/tsrc/run_wst.bat
securitysettings/qtconfigutils/tsrc/src/testqtconfigutils.cpp
securitysettings/qtconfigutils/tsrc/src/testqtconfigutils.h
securitysettings/qtconfigutils/tsrc/tsrc.pro
securitysettings/qtconfigutils/tsrc/wst_script/wst_make.bat
securitysettings/securitysettings.pro
--- a/accesssec.pro	Thu May 13 22:51:27 2010 +0300
+++ b/accesssec.pro	Mon May 24 20:32:47 2010 +0300
@@ -7,15 +7,23 @@
 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
 #
 # Initial Contributors:
-# Nokia Corporation - initial contribution.
+# 	Nokia Corporation - initial contribution.
 #
 # Contributors:
 #
 # Description:
-#
+#	Project file for building accesssec package
+
+# %version: 5 %
+
 
 TEMPLATE = subdirs
 
-SUBDIRS  += securitysettings
+SUBDIRS  += \
+    accesssec_plat \
+    securitysettings
 
 CONFIG += ordered
+
+BLD_INF_RULES.prj_exports += \
+    "$${LITERAL_HASH}include \"./group/bld.inf\""
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accesssec_plat/accesssec_plat.pro	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,26 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# 	Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#	Project file for accesssec_plat Qt exports
+
+# %version: 1 %
+
+
+TEMPLATE = subdirs
+
+include(eap_qt_configuration_api/eap_qt_configuration_api.pri)
+
+for(filename,PLATFORM_HEADERS){
+    BLD_INF_RULES.prj_exports *= "$$filename MW_LAYER_PLATFORM_EXPORT_PATH($$basename(filename))"
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accesssec_plat/eap_qt_configuration_api/eap_qt_configuration_api.pri	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,28 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# 	Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#	EAP Qt configuration API project include
+#
+
+# %version: 1 %
+
+
+PLATFORM_HEADERS += \
+    eap_qt_configuration_api/inc/eapqtcertificateinfo.h \
+    eap_qt_configuration_api/inc/eapqtconfig.h \
+    eap_qt_configuration_api/inc/eapqtconfiginterface.h \
+    eap_qt_configuration_api/inc/eapqtexpandedeaptype.h \
+    eap_qt_configuration_api/inc/eapqtpluginhandle.h \
+    eap_qt_configuration_api/inc/eapqtplugininfo.h \
+    eap_qt_configuration_api/inc/eapqtvalidator.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accesssec_plat/eap_qt_configuration_api/inc/eapqtcertificateinfo.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   Certificate information data structure for EAP QT
+ *   configuration interface
+ *
+ */
+
+/*
+ * %version: 1 %
+ */
+
+#ifndef EAPQTCERTIFICATEINFO_H
+#define EAPQTCERTIFICATEINFO_H
+
+#include <QMetaType>
+#include <QVariant>
+
+#ifdef BUILD_EAP_QT_CONFIG_INTERFACE_DLL
+#define EAP_QT_CERTIFICATE_INFO_EXPORT Q_DECL_EXPORT
+#else
+#define EAP_QT_CERTIFICATE_INFO_EXPORT Q_DECL_IMPORT
+#endif
+
+class EapQtCertificateInfoPrivate;
+
+class EAP_QT_CERTIFICATE_INFO_EXPORT EapQtCertificateInfo
+{
+public:
+
+    enum ItemId
+    {
+        /*! QString */
+        SubjectName,
+        /*! QString */
+        IssuerName,
+        /*! QString */
+        SerialNumber,
+        /*! QByteArray */
+        SubjectKeyId,
+        /*! QString */
+        ThumbPrint,
+        /*! QString */
+        CertificateLabel,
+        /*! marker for the last item */
+        ItemIdLast
+    };
+
+public:
+
+    EapQtCertificateInfo();
+    ~EapQtCertificateInfo();
+
+    EapQtCertificateInfo(const EapQtCertificateInfo &certInfo);
+    EapQtCertificateInfo &operator=(const EapQtCertificateInfo &certInfo);
+
+    QVariant value(ItemId id) const;
+    void setValue(ItemId id, QVariant newValue);
+
+private:
+
+    QScopedPointer<EapQtCertificateInfoPrivate> d_ptr;
+};
+
+// Make the class known to QMetaType to support using QVariant
+Q_DECLARE_METATYPE(EapQtCertificateInfo)
+
+#endif /* EAPQTCERTIFICATEINFO_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accesssec_plat/eap_qt_configuration_api/inc/eapqtconfig.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,169 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   EAP method QT configuration
+ *
+ */
+
+/*
+ * %version: 1 %
+ */
+
+#ifndef EAPQTCONFIG_H
+#define EAPQTCONFIG_H
+
+#include <QList>
+#include <QVariant>
+
+#ifdef BUILD_EAP_QT_CONFIG_INTERFACE_DLL
+#define EAP_QT_CONFIG_EXPORT Q_DECL_EXPORT
+#else
+#define EAP_QT_CONFIG_EXPORT Q_DECL_IMPORT
+#endif
+
+class EapQtConfigPrivate;
+
+class EAP_QT_CONFIG_EXPORT EapQtConfig
+{
+public:
+
+    // TODO: document default values
+
+    enum SettingsId
+    {
+        // see also EapSettings.h
+
+        /*! bool */
+        UsernameAutomatic,
+        /*! QString */
+        Username,
+        /*! bool */
+        PasswordPrompt,
+        /*! write-only: QString */
+        Password,
+        /*! bool
+         * in read: defines if password already exists in settings database
+         * in write: when true, defines that password is not included in the provided
+         *      configuration since it already exists in settings database, i.e. earlier
+         *      set password remains unchanged */
+        PasswordStored,
+        /*! write-only: bool
+         * true: clears the password from database
+         * false: does nothing
+         */
+        PasswordClear,
+        /*! bool */
+        RealmAutomatic,
+        /*! QString */
+        Realm,
+        /*! bool */
+        UsePseudonyms,
+        /*! bool */
+        VerifyServerRealm,
+        /*! bool */
+        ClientAuthenticationRequired,
+        /*! uint */
+        SessionValidityTime,
+        /*! 
+         * QList<uint> contains RFC numbers for activated ciphersuites
+         *
+         * Refer to RFC2246 chapter A.5 for the values.
+         *
+         * Supported CipherSuites by EAP Server default implementation: 
+         * TLS_NULL_WITH_NULL_NULL = (0x0000), 
+         * - No key exchange, no encryption and no authentication.
+         * TLS_RSA_WITH_RC4_128_MD5 = (0x0004),
+         * - RSA key exchange, RC4_128 encryption and MD5 authentication.
+         *   NOTE this is included only because PEAP requires this cipher 
+         *   suite as a mandatory. Think carefully whether this meets your 
+         *   security requirements.
+         * TLS_RSA_WITH_RC4_128_SHA = (0x0005), 
+         * - RSA key exchange, RC4_128 encryption and SHA1 authentication.
+         *   NOTE this is included only because PEAP requires this cipher 
+         *   suite as a mandatory. Think carefully whether this meets your 
+         *   security
+         *   requirements.
+         * TLS_RSA_WITH_3DES_EDE_CBC_SHA = (0x000a)
+         * - RSA key exchange, 3DES-EDE-CBC encryption and SHA1 
+         *   authentication.
+         * TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA = (0x0016)
+         * - Diffie-Helmann RSA key exchange, 3DES-EDE-CBC encryption and SHA1
+         *   authentication.
+         * TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA = (0x0013)
+         * - Diffie-Helmann DSS key exchange, 3DES-EDE-CBC encryption and SHA1
+         *   authentication.
+         * TLS_RSA_WITH_AES_128_CBC_SHA      = 0x002F
+         * - RSA key exchange, AES-128 encryption and SHA1 authentication.
+         * TLS_DHE_DSS_WITH_AES_128_CBC_SHA  = 0x0032
+         * - Diffie-Helmann DSS key exchange, AES-128-CBC encryption and SHA1
+         *   authentication.
+         * TLS_DHE_RSA_WITH_AES_128_CBC_SHA  = 0x0033
+         * - Diffie-Helmann RSA key exchange, AES-128-CBC encryption and SHA1
+         *   authentication.
+         * TLS_DH_anon_WITH_AES_128_CBC_SHA  = 0x0034,
+         * - Supported when EAP-FAST is supported 
+         * - Diffie-Helmann anonymous key exchange, AES-128-CBC encryption and 
+         *   SHA1 authentication.
+         */
+        CipherSuites,
+        /*! bool */
+        PeapVersion0Allowed,
+        /*! bool */
+        PeapVersion1Allowed,
+        /*! bool */
+        PeapVersion2Allowed,
+        /*! QList< QVariant(EapQtCertificateInfo) > */
+        AuthorityCertificate,
+        /*! QList< QVariant(EapQtCertificateInfo) > */
+        UserCertificate,
+        /*! QList< QVariant(EapQtPluginHandle) > */
+        InnerType,
+        /*!  EapQtPluginHandle */
+        OuterType,
+        /*! bool */
+        ProvisioningModeAuthenticated,
+        /*! bool */
+        ProvisioningModeUnauthenticated,
+        /*! QString */
+        PACGroupReference,
+        /*! bool */
+        WarnADHPNoPAC,
+        /*! bool */
+        WarnADHPNoMatchingPAC,
+        /*! bool */
+        WarnNotDefaultServer,
+        /*! bool */
+        UseIdentityPrivacy,
+        /*! bool */
+        AuthorityCertificateAutomatic,
+        /*! marker for the last entry */
+        SettingsIdLast
+    };
+
+public:
+    EapQtConfig();
+    ~EapQtConfig();
+
+    QVariant value(SettingsId id);
+    void setValue(SettingsId id, QVariant newValue);
+    QList<EapQtConfig::SettingsId> validate(
+        QList<EapQtConfig::SettingsId> ids);
+    void clear();
+
+private:
+    Q_DISABLE_COPY(EapQtConfig)
+    QScopedPointer<EapQtConfigPrivate> d_ptr;
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accesssec_plat/eap_qt_configuration_api/inc/eapqtconfiginterface.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,135 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   EAP method configuration QT interface
+ *
+ */
+
+/*
+ * %version: 1 %
+ */
+
+#ifndef EAPQTCONFIGINTERFACE_H
+#define EAPQTCONFIGINTERFACE_H
+
+#include <qglobal.h>
+#include <eapqtconfig.h>
+
+/*!
+ * @addtogroup group_eap_config_api
+ * @{
+ */
+
+#ifdef BUILD_EAP_QT_CONFIG_INTERFACE_DLL
+#define EAP_QT_CONFIG_INTERFACE_EXPORT Q_DECL_EXPORT
+#else
+#define EAP_QT_CONFIG_INTERFACE_EXPORT Q_DECL_IMPORT
+#endif
+
+class CpBaseSettingView;
+class EapQtValidator;
+class EapQtPluginInfo;
+class EapQtPluginHandle;
+class EapQtExpandedEapType;
+class EapQtCertificateInfo;
+class EapQtConfigInterfacePrivate;
+/*!
+ */
+class EAP_QT_CONFIG_INTERFACE_EXPORT EapQtConfigInterface
+{
+public:
+
+    enum EapBearerType
+    {
+        // EAP configuration interface for WLAN
+        EapBearerTypeWlan,
+        // EAP configuration interface for VPN
+        EapBearerTypeVpn,
+    };
+
+    static const int IAP_ID_UNDEFINED = -1;
+
+public:
+
+    // the default constuctor can only be used for validators,
+    // any other call throws an exeption;
+    // throws an exception if the contruction fails
+    EapQtConfigInterface();
+
+    EapQtValidator *validatorEap(EapQtExpandedEapType type, EapQtConfig::SettingsId id);
+
+    // this is the constructor for using the interface for all
+    // available operations, including validators;
+    // throws an exeption if the contruction fails;
+    // the parameter iapId is the IAP ID;
+    // if iapId is negative, only a limited set of methods are availble and
+    // setConfigurationReference must be later called to set the correct IAP ID
+    EapQtConfigInterface(const EapBearerType bearerType, const int iapId);
+
+    ~EapQtConfigInterface();
+
+    // if iapId was IAP_ID_UNDEFINED (or negative) in the constructor, this method
+    // must be called before calling the following methods
+    bool setConfigurationReference(const int iapId) const;
+
+    /**
+     * all the following methods throw an exception if the instance
+     * was created with the default constructor;
+     * otherwise the return value is as defined
+     */
+
+    // returns empty list on failure
+    QList<EapQtPluginInfo> supportedOuterTypes() const;
+    // returns empty list on failure
+    QList<EapQtPluginInfo> supportedInnerTypes(const EapQtPluginHandle outerType) const;
+
+    // returns empty list on failure
+    QList<EapQtCertificateInfo> certificateAuthorityCertificates() const;
+    // returns empty list on failure
+    QList<EapQtCertificateInfo> userCertificates() const;
+
+    // returns null on failure
+    CpBaseSettingView *uiInstance(const EapQtPluginHandle& outerHandle,
+        const EapQtPluginHandle& pluginHandle) const;
+
+    // returns empty list on failure
+    QList<EapQtPluginHandle> selectedOuterTypes() const;
+
+    // returns true if supported, false otherwise
+    bool isSupportedOuterType(const EapQtPluginHandle& handle) const;
+    bool isSupportedInnerType(const EapQtPluginHandle& outerHandle,
+        const EapQtPluginHandle& innerHandle) const;
+
+    /**
+     * all the following methods throw an exception if the instance
+     * was created with the default constructor;
+     * otherwise the methods return true on success and false on failure
+     */
+
+    bool setSelectedOuterTypes(const QList<EapQtPluginHandle>& outerHandles) const;
+
+    bool readConfiguration(const EapQtPluginHandle& outerHandle,
+        const EapQtPluginHandle& pluginHandle, EapQtConfig &config) const;
+    bool saveConfiguration(const EapQtPluginHandle& pluginHandle, EapQtConfig &config) const;
+    bool deleteConfiguration() const;
+
+private:
+    Q_DISABLE_COPY(EapQtConfigInterface)
+    QScopedPointer<EapQtConfigInterfacePrivate> d_ptr;
+};
+
+/*! @} */
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accesssec_plat/eap_qt_configuration_api/inc/eapqtexpandedeaptype.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   Expanded EAP type QT data structure
+ *
+ */
+
+/*
+ * %version: 1 %
+ */
+
+#ifndef EAPQTEXPANDEDEAPTYPE_H
+#define EAPQTEXPANDEDEAPTYPE_H
+
+#include <QByteArray>
+#include <QMetaType>
+
+#ifdef BUILD_EAP_QT_PLUGIN_INFO_DLL
+#define EAP_QT_EXPANDED_EAP_TYPE_EXPORT Q_DECL_EXPORT
+#else
+#define EAP_QT_EXPANDED_EAP_TYPE_EXPORT Q_DECL_IMPORT
+#endif
+
+class EapQtExpandedEapTypePrivate;
+// http://www.iana.org/assignments/eap-numbers
+class EAP_QT_EXPANDED_EAP_TYPE_EXPORT EapQtExpandedEapType
+{
+public:
+    enum Type
+    {
+        TypeUndefined = 0,
+        TypeEapAka,
+        TypeEapFast,
+        TypeEapGtc,
+        TypeLeap,
+        TypeEapMschapv2,
+        TypePeap,
+        TypeEapSim,
+        TypeEapTls,
+        TypeEapTtls,
+        TypeProtectedSetup,
+        TypePap,
+        TypePlainMschapv2,
+        // keep this as the last one
+        TypeLast
+    };
+
+    EapQtExpandedEapType();
+    EapQtExpandedEapType(const Type type);
+    EapQtExpandedEapType(const QByteArray data);
+    EapQtExpandedEapType(const EapQtExpandedEapType & type);
+    ~EapQtExpandedEapType();
+
+    QByteArray eapExpandedData() const;
+    Type type() const;
+
+    EapQtExpandedEapType &operator=(const EapQtExpandedEapType &type);
+    bool operator ==(const EapQtExpandedEapType &right_type_value) const;
+    bool operator !=(const EapQtExpandedEapType &right_type_value) const;
+
+private:
+    QScopedPointer<EapQtExpandedEapTypePrivate> d_ptr;
+};
+
+// Make the class known to QMetaType to support using QVariant
+Q_DECLARE_METATYPE(EapQtExpandedEapType)
+
+#endif /* EAPQTEXTENDEDEAPTYPE_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accesssec_plat/eap_qt_configuration_api/inc/eapqtpluginhandle.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   Control Panel EAP plugin information
+ *
+ */
+
+/*
+ * %version: 3 %
+ */
+
+#ifndef EAPQTPLUGINHANDLE_H
+#define EAPQTPLUGINHANDLE_H
+
+#include <qglobal.h>
+#include <QMetaType>
+
+#ifdef BUILD_EAP_QT_PLUGIN_INFO_DLL
+#define EAP_QT_PLUGIN_HANDLE_EXPORT Q_DECL_EXPORT
+#else
+#define EAP_QT_PLUGIN_HANDLE_EXPORT Q_DECL_IMPORT
+#endif
+
+class EapQtExpandedEapType;
+class EapQtPluginHandlePrivate;
+
+class EAP_QT_PLUGIN_HANDLE_EXPORT EapQtPluginHandle
+{
+public:
+    
+    enum Plugin
+    {
+        PluginUndefined = 0,
+        PluginEapAka,
+        PluginEapFast,
+        PluginEapGtc,
+        PluginLeap,
+        PluginEapMschapv2,
+        PluginPeap,
+        PluginEapSim,
+        PluginEapTls,
+        PluginEapTtls,
+        PluginPap,
+        PluginPlainMschapv2,
+        PluginLast
+    };
+
+public:
+
+    EapQtPluginHandle();
+    EapQtPluginHandle(Plugin id);
+    EapQtPluginHandle(EapQtExpandedEapType type); // maps type to default UIDs
+    EapQtPluginHandle(EapQtExpandedEapType type, int uid);
+    EapQtPluginHandle(const EapQtPluginHandle& handle);
+    ~EapQtPluginHandle();
+
+    EapQtExpandedEapType type() const;
+    int protocolImplementationUid() const;
+    Plugin pluginId() const;
+
+    EapQtPluginHandle &operator=(const EapQtPluginHandle &handle);
+    bool operator ==(const EapQtPluginHandle &right_type_value) const;
+
+private:
+
+    QScopedPointer<EapQtPluginHandlePrivate> d_ptr;
+
+};
+
+// Make the class known to QMetaType to support using QVariant
+Q_DECLARE_METATYPE(EapQtPluginHandle)
+
+#endif /* EAPQTPLUGINHANDLE_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accesssec_plat/eap_qt_configuration_api/inc/eapqtplugininfo.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   Control Panel EAP plugin information
+ *
+ */
+
+/*
+ * %version: 1 %
+ */
+
+#ifndef EAPQTPLUGININFO_H
+#define EAPQTPLUGININFO_H
+
+#include <QString>
+
+#ifdef BUILD_EAP_QT_PLUGIN_INFO_DLL
+#define EAP_QT_PLUGIN_INFO_EXPORT Q_DECL_EXPORT
+#else
+#define EAP_QT_PLUGIN_INFO_EXPORT Q_DECL_IMPORT
+#endif
+
+class EapQtPluginHandle;
+class EapQtPluginInfoPrivate;
+
+class EAP_QT_PLUGIN_INFO_EXPORT EapQtPluginInfo
+{
+public:
+    EapQtPluginInfo(const EapQtPluginInfo & info);
+    EapQtPluginInfo(EapQtPluginHandle id, QString locId, int orderNumber );
+    ~EapQtPluginInfo();
+
+    EapQtPluginHandle pluginHandle() const;
+    QString localizationId() const;
+    int orderNumber() const;
+
+    EapQtPluginInfo &operator=(const EapQtPluginInfo &info);
+    
+private:
+    EapQtPluginInfo();
+
+    QScopedPointer<EapQtPluginInfoPrivate> d_ptr;
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accesssec_plat/eap_qt_configuration_api/inc/eapqtvalidator.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   EAP QT configuration validator interface
+ *
+ */
+
+/*
+ * %version: 1 %
+ */
+
+#ifndef EAPQTVALIDATOR_H
+#define EAPQTVALIDATOR_H
+
+#include <QVariant>
+
+/*!
+ * @addtogroup group_eap_config_api
+ * @{
+ */
+
+#ifdef BUILD_EAP_QT_CONFIG_INTERFACE_DLL
+#define EAP_QT_CONFIG_INTERFACE_EXPORT Q_DECL_EXPORT
+#else
+#define EAP_QT_CONFIG_INTERFACE_EXPORT Q_DECL_IMPORT
+#endif
+
+class HbLineEdit;
+
+/*!
+ * Eap Qt Validator interface. This interface provides a method to configure
+ * the editor to use required constraints, hints, editor classes and so one
+ * depending on the EAP type and the configuration identifier.
+ * See updateEditor() method for further details.
+ * 
+ * Another important method of this class is the validate() method. With
+ * that method you can check that the content and format is valid for 
+ * given configuration compination.
+ * 
+ * An instance of validator can be created with 
+ * EapQtConfigInterface::validatorEap() method.
+ */
+
+class EAP_QT_CONFIG_INTERFACE_EXPORT EapQtValidator
+{
+public:
+
+    /*!
+     * Validation status.
+     */
+    enum Status {
+        /// Ok
+        StatusOk,
+        /// Content is invalid
+        StatusInvalid,
+        /// The length is not valid
+        StatusInvalidLength,
+        /// Invalid characters detected
+        StatusInvalidCharacters,
+        /// Input is too short
+        StatusTooShort, 
+        /// Input is too long
+        StatusTooLong,  
+    };
+    
+public:
+
+    EapQtValidator() {};
+    virtual ~EapQtValidator() {};
+
+    /*!
+     * Processes validation to the given input \a value.
+     *
+     * @param value Value to be validated
+     * 
+     * @return Status code.
+     * 
+     * - EapQtConfig::Username: All values 
+     * - EapQtConfig::Password: All values
+     * - EapQtConfig::Realm: All values
+     * - EapQtConfig::ServerName: All values
+     * - EapQtConfig::PacStorePassword: All values  
+     * - EapQtConfig::PacStorePasswordConfirmation: StatusOk and StatusInvalid
+     */
+    virtual Status validate(QVariant value) = 0;
+   
+    /*!
+     * Sets required configurations to the lineedit such as:
+     * - Constraints
+     * - HbInputFilter
+     * - HbValidator
+     * - inputMethodsHints
+     * - maximum length
+     * - predictive input mode
+     * - number/text mode
+     * 
+     * Configurations depends on the Expanded EAP type and the configuration id
+     * which were used to instantiate the validator.
+     * 
+     * @param edit LineEdit to be updated.
+     */
+    virtual void updateEditor(HbLineEdit* edit) = 0;
+    
+private:
+
+    Q_DISABLE_COPY(EapQtValidator)
+};
+
+/*! @} */
+
+#endif
--- a/accesssec_plat/eap_type_api/group/bld.inf	Thu May 13 22:51:27 2010 +0300
+++ b/accesssec_plat/eap_type_api/group/bld.inf	Mon May 24 20:32:47 2010 +0300
@@ -17,7 +17,7 @@
 */
 
 /*
-* %version: tr1cfwln#5.1.2 %
+* %version: %
 */
 
 #include <platform_paths.hrh>
@@ -27,8 +27,18 @@
 
 PRJ_EXPORTS
 
+../inc/EapTraceSymbian.h     MW_LAYER_PLATFORM_EXPORT_PATH(EapTraceSymbian.h)
+../inc/EapExpandedType.h     MW_LAYER_PLATFORM_EXPORT_PATH(EapExpandedType.h)
+../inc/EapPluginTools.h     MW_LAYER_PLATFORM_EXPORT_PATH(EapPluginTools.h)
+../inc/EapAutomatic.h     MW_LAYER_PLATFORM_EXPORT_PATH(EapAutomatic.h)
+../inc/EapTypeDefinitions.h     MW_LAYER_PLATFORM_EXPORT_PATH(EapTypeDefinitions.h)
 ../inc/EapType.h     MW_LAYER_PLATFORM_EXPORT_PATH(EapType.h)
 ../inc/EapType.inl     MW_LAYER_PLATFORM_EXPORT_PATH(EapType.inl)
+../inc/EapTypePlugin.h     MW_LAYER_PLATFORM_EXPORT_PATH(EapTypePlugin.h)
+../inc/EapTypePlugin.inl     MW_LAYER_PLATFORM_EXPORT_PATH(EapTypePlugin.inl)
 ../inc/EapSettings.h     MW_LAYER_PLATFORM_EXPORT_PATH(EapSettings.h)
-../inc/EapSettings.inl     MW_LAYER_PLATFORM_EXPORT_PATH(EapSettings.inl)
 ../inc/EapTypeInfo.h     MW_LAYER_PLATFORM_EXPORT_PATH(EapTypeInfo.h)
+../inc/EapGeneralSettings.inl     MW_LAYER_PLATFORM_EXPORT_PATH(EapGeneralSettings.inl)
+../inc/EapGeneralSettings.h     MW_LAYER_PLATFORM_EXPORT_PATH(EapGeneralSettings.h)
+
+// end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accesssec_plat/eap_type_api/inc/EapAutomatic.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,67 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 3 %
+*/
+
+#ifndef _EAP_AUTOMATIC_H_
+#define _EAP_AUTOMATIC_H_
+
+template <class Type>
+class PointerArrayResetAndDestroy
+{
+
+public:
+
+	PointerArrayResetAndDestroy( RPointerArray<Type> * aArray, const TBool aDeleteWhenTrue)
+		: iArray(aArray)
+		, iDeleteWhenTrue(aDeleteWhenTrue)
+	{
+	}
+
+	virtual ~PointerArrayResetAndDestroy()
+	{
+		if (iArray != 0)
+		{
+			iArray->ResetAndDestroy();
+			iArray->Close();
+
+			if (iDeleteWhenTrue)
+			{
+				delete iArray;
+			}
+			iArray = 0;
+		}
+	}
+
+	void DoNotFreeArray()
+	{
+		iArray = 0;
+	}
+
+private:
+
+	RPointerArray<Type> * iArray;
+
+	TBool iDeleteWhenTrue;
+
+};
+
+#endif // _EAP_AUTOMATIC_H_
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accesssec_plat/eap_type_api/inc/EapExpandedType.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,167 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP-expanded type definition.
+*
+*/
+
+/*
+* %version: 17 %
+*/
+
+#ifndef _SYMBIAN_EAP_EXPANDED_TYPE_H_
+#define _SYMBIAN_EAP_EXPANDED_TYPE_H_
+
+#include <e32base.h>
+
+const TUint KEapExpandedTypeLength = 8;
+
+//--------------------------------------------------
+
+class TEapExpandedType
+{
+public:
+
+	IMPORT_C TEapExpandedType();
+
+	IMPORT_C virtual ~TEapExpandedType();
+
+	IMPORT_C TEapExpandedType(const TEapExpandedType * const init);
+
+	IMPORT_C TEapExpandedType(const TEapExpandedType & init);
+
+	IMPORT_C TEapExpandedType(const TBufC8<KEapExpandedTypeLength> & init);
+
+	IMPORT_C TEapExpandedType(const TDesC8 & init);
+
+	IMPORT_C const TBuf8<KEapExpandedTypeLength> & GetValue() const;
+
+	IMPORT_C TInt SetValue(
+		const void * const data,
+		const TUint data_length);
+
+	IMPORT_C TInt SetValue(
+		const TUint vendor_id,
+		const TUint vendor_type);
+
+	IMPORT_C TEapExpandedType &operator = (const TEapExpandedType & right_type_value);
+
+	IMPORT_C TEapExpandedType &operator = (const TBufC8<KEapExpandedTypeLength> & right_type_value);
+
+	IMPORT_C TEapExpandedType &operator = (const TDesC8 &right_type_value);
+
+	IMPORT_C TInt Compare(const TEapExpandedType &right_type_value) const;
+
+	IMPORT_C bool operator == (const TEapExpandedType &right_type_value) const;
+
+	IMPORT_C bool operator != (const TEapExpandedType &right_type_value) const;
+
+	IMPORT_C TUint GetVendorId() const;
+
+	IMPORT_C TUint GetVendorType() const;
+
+private:
+
+	TBuf8<KEapExpandedTypeLength> iValue;
+};
+
+//--------------------------------------------------
+
+/// This template is binary compatible with TEapExpandedType.
+template <TUint buffer_length>
+class TConstEapExpandedTypeTemplate
+{
+public:
+
+	/// GetType() casts the constant TConstEapExpandedTypeTemplate<KEapExpandedTypeLength> object to TEapExpandedType *.
+	inline const TBufC8<buffer_length> * GetType() const;
+
+	// These must be public.
+	TUint   m_field_length;
+	TUint8  m_field[buffer_length];
+};
+
+template <TUint buffer_length>
+inline const TBufC8<buffer_length> * TConstEapExpandedTypeTemplate<buffer_length>::GetType() const
+{
+	return reinterpret_cast<const TBufC8<buffer_length> *>(this);
+}
+
+//--------------------------------------------------
+
+/// Macro initializes const TEapExpandedType object named "name".
+/// Each value value1 ... value8 initializes 8-bit byte of expanded EAP-type.
+/// EAP-type field is defined in RFC3748:
+///  0                   1                   2                   3
+///  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+/// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+/// |     Type      |               Vendor-Id                       |
+/// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+/// |                          Vendor-Type                          |
+/// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+/// 
+/// Type
+/// 
+///    254 for Expanded Type
+/// 
+/// Vendor-Id
+/// 
+///    The Vendor-Id is 3 octets and represents the SMI Network
+///    Management Private Enterprise Code of the Vendor in network byte
+///    order, as allocated by IANA.  A Vendor-Id of zero is reserved for
+///    use by the IETF in providing an expanded global EAP Type space.
+/// 
+/// Vendor-Type
+/// 
+///    The Vendor-Type field is four octets and represents the vendor-
+///    specific method Type.
+/// 
+///    If the Vendor-Id is zero, the Vendor-Type field is an extension
+///    and superset of the existing namespace for EAP Types.  The first
+///    256 Types are reserved for compatibility with single-octet EAP
+///    Types that have already been assigned or may be assigned in the
+///    future.  Thus, EAP Types from 0 through 255 are semantically
+///    identical, whether they appear as single octet EAP Types or as
+///    Vendor-Types when Vendor-Id is zero.  There is one exception to
+///    this rule: Expanded Nak and Legacy Nak packets share the same
+///    Type, but must be treated differently because they have a
+///    different format.
+/// 
+/// Macro casts initialized TConstEapExpandedTypeTemplate<KEapExpandedTypeLength>.
+#define EAP_EXPANDED_TYPE_CONST(name, value1, value2, value3, value4, value5, value6, value7, value8) \
+	static const TConstEapExpandedTypeTemplate<KEapExpandedTypeLength> name \
+		= {KEapExpandedTypeLength, {value1, value2, value3, value4, value5, value6, value7, value8}}
+
+//--------------------------------------------------
+
+EAP_EXPANDED_TYPE_CONST(EapExpandedTypeNone,           0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
+
+EAP_EXPANDED_TYPE_CONST(EapExpandedTypeGtc,            0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06);
+EAP_EXPANDED_TYPE_CONST(EapExpandedTypeTls,            0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d);
+EAP_EXPANDED_TYPE_CONST(EapExpandedTypeLeap,           0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11);
+EAP_EXPANDED_TYPE_CONST(EapExpandedTypeSim,            0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12);
+EAP_EXPANDED_TYPE_CONST(EapExpandedTypeTtls,           0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15);
+EAP_EXPANDED_TYPE_CONST(EapExpandedTypeAka,            0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17);
+EAP_EXPANDED_TYPE_CONST(EapExpandedTypePeap,           0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19);
+EAP_EXPANDED_TYPE_CONST(EapExpandedTypeMsChapv2,       0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a);
+EAP_EXPANDED_TYPE_CONST(EapExpandedTypeFast,           0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2b);
+EAP_EXPANDED_TYPE_CONST(EapExpandedTypeProtectedSetup, 0xfe, 0x00, 0x37, 0x2a, 0x00, 0x00, 0x00, 0x01);
+
+EAP_EXPANDED_TYPE_CONST(EapExpandedTypeTtlsPap,        0xfe, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x62); // This is for internal use only. This value is used in configuration of TTLS/PAP.
+EAP_EXPANDED_TYPE_CONST(EapExpandedPlainMsChapv2,      0xfe, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x63); // This is for internal use only. This value is used in configuration of TTLS/plain-MsChapv2.
+
+//--------------------------------------------------
+
+#endif // _SYMBIAN_EAP_EXPANDED_TYPE_H_
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accesssec_plat/eap_type_api/inc/EapGeneralSettings.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,117 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Class is interface to the generic EAP type.
+*
+*/
+
+/*
+* %version: 14 %
+*/
+
+#ifndef _EAP_GENERAL_SETTINGS_H_
+#define _EAP_GENERAL_SETTINGS_H_
+
+// INCLUDES
+#include <EapType.h>
+#include <EapExpandedType.h>
+
+// FORWARD DECLARATIONS
+
+// CLASS DECLARATION
+/**
+* Class is interface to the generic EAP type.
+*/
+class CEapGeneralSettings
+: public CBase
+{
+public:
+
+	/**
+	* Construction function. Called by ECom after the EAP generic plugin has been loaded.
+	* @param aIndexType is the bearer type, ELan for WLAN and EVpn for VPN.
+	* @param aIndex is the WLAN service ID for WLAN bearer type and IAP id for VPN. Each bearer must use same aIndex for configuration and authentication.
+	* @return Pointer to the instance.
+	*/
+	inline static CEapGeneralSettings* NewL(
+		const TIndexType aIndexType,	
+		const TInt aIndex);
+
+	/**
+	* Destructor does nothing.
+	*/
+	inline virtual ~CEapGeneralSettings();
+	
+	/**
+	* Returns the version of the interface that the EAP type implements.
+	* The client-side of the interface must always check the version with this function 
+	* and not call the functions that are not implemented. New functions must be
+	* added to the end of the interface so that the order of the old functions
+	* does not change.
+	* @return Integer indicating the version.
+	*/
+	virtual TUint GetInterfaceVersion() = 0;
+
+	/**
+	 * Function sets the active and disabled EAP-methods.
+	 * @param aActiveEapMethods includes a list of enabled EAP-methods. This list can be empty
+	 * @param aDisabledEapMethods includes a list of disabled EAP-methods. This list can be empty.
+	 */
+	virtual TInt SetEapMethods(
+		const RArray<TEapExpandedType> & aActiveEapMethods,
+		const RArray<TEapExpandedType> & aDisabledEapMethods) = 0;
+
+	/**
+	 * Function gets the active and disabled EAP-methods.
+	 * @param aActiveEapMethods includes a list of enabled EAP-methods. This list can be empty
+	 * @param aDisabledEapMethods includes a list of disabled EAP-methods. This list can be empty.
+	 */
+	virtual TInt GetEapMethods(
+		RArray<TEapExpandedType> & aActiveEapMethods,
+		RArray<TEapExpandedType> & aDisabledEapMethods) = 0;
+
+	/**
+	 * Function gets the all installed certificates.
+	 * @param aUserCerts includes a list of user certificates. This list can be empty.
+	 * @param aCACerts includes a list of CA root certificates. This list can be empty.
+	 */
+	virtual TInt GetCertificateLists(
+		RPointerArray<EapCertificateEntry> & aUserCerts,
+		RPointerArray<EapCertificateEntry> & aCACerts) = 0;
+
+	/**
+	 * Function deletes all settings of the IAP, a pair (aIndexType, aIndex) of NewL() function selects the deleted items.
+	 */
+	virtual TInt DeleteAllEapSettings() = 0;
+
+	/**
+	 * Function copies all settings of the IAP to destination.
+	 * A pair (aIndexType, aIndex) of NewL() function selects the source items.
+	 * A pair (aDestinationIndexType, aDestinationIndex) selects the destination.
+	 */
+	virtual TInt CopyAllEapSettings(
+		const TIndexType aDestinationIndexType,
+		const TInt aDestinationIndex) = 0;
+
+private:
+
+	/// ECom uses this key to keep track of DLL usage.
+	TUid iDtor_ID_Key;
+
+};
+
+#include "EapGeneralSettings.inl"
+
+#endif // _EAP_GENERAL_SETTINGS_H_
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accesssec_plat/eap_type_api/inc/EapGeneralSettings.inl	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Class is interface to the generic EAP type.
+*
+*/
+
+/*
+* %version: 7 %
+*/
+
+#include "EapTraceSymbian.h"
+
+inline CEapGeneralSettings* CEapGeneralSettings::NewL(
+		const TIndexType aIndexType,	
+		const TInt aIndex)
+{
+    EAP_TRACE_DEBUG_SYMBIAN((_L("CEapGeneralSettings::NewL(): start")));
+
+    // The arguments are stored to a iapInfo struct.
+    SIapInfo iapInfo;
+    iapInfo.indexType = aIndexType;
+    iapInfo.index = aIndex;
+    iapInfo.aEapType = *EapExpandedTypeNone.GetType();
+
+    // This call finds and loads the correct DLL and after that calls the
+    // entry function in the interface implementation in the DLL.
+    TAny* ptr = 0;
+
+    const TUid KimplementationUid = { 0x20026FD8 };
+
+    TRAPD( err, ptr = REComSession::CreateImplementationL(
+            KimplementationUid,
+            _FOFF(CEapGeneralSettings, iDtor_ID_Key), 
+            &iapInfo));
+
+    EAP_TRACE_DEBUG_SYMBIAN((_L("CEapGeneralSettings::NewL(): CreateImplementationL(Uid=0x%08x), err=%d, returns ptr=0x%08x\n"),
+		KimplementationUid.iUid,
+        err,
+        ptr));
+
+    User::LeaveIfError(err);
+
+    return (CEapGeneralSettings *) ptr;
+}
+
+inline CEapGeneralSettings::~CEapGeneralSettings()
+{
+	// Unload DLL
+    REComSession::DestroyedImplementation(iDtor_ID_Key);
+}
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accesssec_plat/eap_type_api/inc/EapPluginTools.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,77 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 7 %
+*/
+
+#if !defined(_EAPPLUGINTOOLS_H_)
+#define _EAPPLUGINTOOLS_H_
+
+#include <d32dbms.h>
+#include <EapExpandedType.h>
+
+/** @file */
+
+class EapPluginTools
+{
+
+public:
+
+	// ----------------------------------------------------------------------
+
+	IMPORT_C EapPluginTools();
+
+	IMPORT_C virtual ~EapPluginTools();
+
+	IMPORT_C void ListAllEapPluginsL(const TEapExpandedType & aTunnelingEapType, RPointerArray<TEapExpandedType> & aPlugins);
+
+	IMPORT_C static void CleanupImplArray( TAny* aAny );
+
+	IMPORT_C static void GetPrivatePathL(
+		RFs& aFileServerSession,
+		TFileName& aPrivateDatabasePathName);
+
+	IMPORT_C static void GetPrivatePathL(
+		TFileName& aPrivateDatabasePathName);
+
+	IMPORT_C static void CreateDatabaseLC(
+		RDbNamedDatabase& aDatabase,
+		RFs& aFileServerSession,
+		TInt& error,
+		const TDesC& aDatabaseName,
+		TFileName& aPrivateDatabasePathName);
+
+	// ----------------------------------------------------------------------
+
+private:
+
+	// ----------------------------------------------------------------------
+
+	// ----------------------------------------------------------------------
+
+};
+
+#define EAP_LITERAL_SYMBIAN(name, string) \
+	_LIT8(name##_8bit, string); \
+	_LIT(name, string)
+
+#endif //#if !defined(_EAPPLUGINTOOLS_H_)
+
+
+//--------------------------------------------------
+// End
--- a/accesssec_plat/eap_type_api/inc/EapSettings.h	Thu May 13 22:51:27 2010 +0300
+++ b/accesssec_plat/eap_type_api/inc/EapSettings.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11.1.2.1.3 %
+* %version: 11.1.29 %
 */
 
 // Refer the document S60_3_1_EAP_Symbian_Adaptation_Design_C.doc for more 
@@ -25,21 +25,170 @@
 #ifndef EAP_SETTINGS_H
 #define EAP_SETTINGS_H
 
+#include <unifiedcertstore.h>
+#include <cctcertinfo.h>
+#include "EapExpandedType.h"
+
 const TUint KGeneralStringMaxLength = 255;
 const TUint KKeyIdentifierLength = 255;
 const TUint KThumbprintMaxLength = 64;
+/* This is the maximum length of a certificate primary/secondary name we are interested in. */
+const TUint32 KMaxCertNameLength = 64;
 
-class CertificateEntry
+
+//-------------------------------------------------------------------------------
+
+class EapCertificateEntry
+: public CBase
 {
+
 public:
 
-	CertificateEntry();
-
-	enum TCertType {
+	enum TCertType
+	{
+		ENone,
 		EUser,
 		ECA
 	};
 
+	IMPORT_C EapCertificateEntry();
+
+	IMPORT_C virtual ~EapCertificateEntry();
+
+	IMPORT_C void trace() const;
+
+	IMPORT_C EapCertificateEntry * Copy();
+
+	// This operator is indentionally without implementation.
+	EapCertificateEntry * const operator = (const EapCertificateEntry * const right_type_value); // Do not use this.
+
+	IMPORT_C EapCertificateEntry &operator = (const EapCertificateEntry &right_type_value);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	IMPORT_C TBool GetSubjectNamePresent() const;
+
+	IMPORT_C TBool GetIssuerNamePresent() const;
+
+	IMPORT_C TBool GetSerialNumberPresent() const;
+
+	IMPORT_C TBool GetThumbprintPresent() const;
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	IMPORT_C TBool GetLabelPresent() const;
+
+	IMPORT_C TBool GetPrimaryNamePresent() const;
+
+	IMPORT_C TBool GetSecondaryNamePresent() const;
+
+	IMPORT_C TBool GetIsEnabledPresent() const;
+
+	IMPORT_C TBool GetSubjectKeyIdPresent() const;
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	IMPORT_C void SetSubjectNamePresent();
+
+	IMPORT_C void SetIssuerNamePresent();
+
+	IMPORT_C void SetSerialNumberPresent();
+
+	IMPORT_C void SetThumbprintPresent();
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	IMPORT_C void SetLabelPresent();
+
+	IMPORT_C void SetPrimaryNamePresent();
+
+	IMPORT_C void SetSecondaryNamePresent();
+
+	IMPORT_C void SetIsEnabledPresent();
+
+	IMPORT_C void SetSubjectKeyIdPresent();
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	IMPORT_C TCertType GetCertType() const;
+	
+	IMPORT_C const TDes * GetSubjectName() const;
+		
+	IMPORT_C const TDes * GetIssuerName() const;
+	
+	IMPORT_C const TDes * GetSerialNumber() const;
+	
+	IMPORT_C const TDes * GetThumbprint() const;
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	IMPORT_C TDes * GetSubjectNameWritable();
+		
+	IMPORT_C TDes * GetIssuerNameWritable();
+	
+	IMPORT_C TDes * GetSerialNumberWritable();
+	
+	IMPORT_C TDes * GetThumbprintWritable();
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	IMPORT_C const TDes * GetLabel() const;
+
+	IMPORT_C const TKeyIdentifier & GetSubjectKeyId() const;
+
+	IMPORT_C const TDes * GetPrimaryName() const;
+
+	IMPORT_C const TDes * GetSecondaryName() const;
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	IMPORT_C TDes * GetLabelWritable();
+
+	IMPORT_C TKeyIdentifier * GetSubjectKeyIdWritable();
+
+	IMPORT_C TDes * GetPrimaryNameWritable();
+
+	IMPORT_C TDes * GetSecondaryNameWritable();
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	IMPORT_C TInt SetCertType(const TCertType & aType);
+	
+	IMPORT_C TInt SetSubjectName(const TBuf<KGeneralStringMaxLength> & aSubjectName);
+		
+	IMPORT_C TInt SetIssuerName(const TBuf<KGeneralStringMaxLength> & aIssuerName);
+	
+	IMPORT_C TInt SetSerialNumber(const TBuf<KGeneralStringMaxLength> & aSerialNumber);
+	
+	IMPORT_C TInt SetThumbprint(const TBuf<KThumbprintMaxLength> & aThumbprint);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	IMPORT_C TInt SetLabel(const TCertLabel & aLabel);
+
+	IMPORT_C TInt SetSubjectKeyId(const TKeyIdentifier & aSubjectKeyId);
+
+	IMPORT_C TInt SetPrimaryName(const TBuf<KMaxCertNameLength> & aPrimaryName);
+
+	IMPORT_C TInt SetSecondaryName(const TBuf<KMaxCertNameLength> & aSecondaryName);
+
+	IMPORT_C TInt SetIsEnabled(const TBool aIsEnabled);
+
+	IMPORT_C TInt SetIsValid(const TBool aIsValid);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	IMPORT_C TBool GetIsEnabled() const;
+
+	IMPORT_C TBool GetIsValid() const;
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+private:
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+	// These members are used by authentication protocols.
+
 	// Specifies whether this entry describes user or CA certificate (mandatory)
 	TCertType iCertType;
 	
@@ -57,70 +206,108 @@
 	TBool iSerialNumberPresent;
 	TBuf<KGeneralStringMaxLength> iSerialNumber;
 	
-	// Subject key in binary form. This is mandatory.
-	TBool iSubjectKeyIDPresent;
-	TBuf8<KKeyIdentifierLength> iSubjectKeyID;
-	
 	// Thumbprint in binary form. This is optional.
 	TBool iThumbprintPresent;
 	TBuf<KThumbprintMaxLength> iThumbprint;
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+	// These members are used by UI.
+
+	// This holds only the certificate label. This is the text UI will show.
+	TBool iLabelPresent;
+	TCertLabel iLabel;
+
+	// Primary name of the certificate if any.
+	TBool iPrimaryNamePresent;
+	TBuf<KMaxCertNameLength> iPrimaryName;
+
+	// Secondary name of the certificate if any.
+	TBool iSecondaryNamePresent;
+	TBuf<KMaxCertNameLength> iSecondaryName;
+
+	// UI uses this to indicate enabled certificate.
+	TBool iIsEnabledPresent;
+	TBool iIsEnabled;
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+	// These members are used by both authentication protocols and UI.
+
+	// Subject key in binary form. This is mandatory field to find correct certificate from CUnifiedCertStore. UI uses this too.
+	TBool iSubjectKeyIdPresent;
+	//TBuf8<KKeyIdentifierLength> iSubjectKeyId;
+	TKeyIdentifier iSubjectKeyId; // This is mandatory field to find correct certificate from CUnifiedCertStore.
+
+	// Indicates this object is correctly initialized.
+	TBool iIsValid;
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 };
 
+//-------------------------------------------------------------------------------
+
 class EAPSettings : public CBase
 {
 public:	
 
-	EAPSettings();
-		
-	enum TEapType
-	{
-		EEapNone		= 0,
-		EEapGtc			= 6,
-		EEapTls			= 13,
-		EEapLeap		= 17,
-		EEapSim			= 18,
-		EEapTtls		= 21,
-		EEapAka			= 23,
-		EEapPeap		= 25,
-		EEapMschapv2	= 26,
-		EEapSecurid		= 32,
-		EEapFast		= 43,
-		ETtlsPlainPap   = 98,
-		EPlainMschapv2	= 99		
-	};
+	IMPORT_C EAPSettings();
+
+	IMPORT_C virtual ~EAPSettings();
+
+	IMPORT_C void trace() const;
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	// Specifies the EAP type these settings are for. 
 	// Is not really needed but is here so just some sanity checks can be made
-	TEapType iEAPType; 
+	TEapExpandedType iEAPExpandedType; // Use this in new code.
 	
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	// Use automatic CA certificate.
+	TBool iUseAutomaticCACertificatePresent;
+	TBool iUseAutomaticCACertificate;
+
+	// Use automatic username.
+	TBool iUseAutomaticUsernamePresent;
+	TBool iUseAutomaticUsername;
+
+	// Use automatic realm.
+	TBool iUseAutomaticRealmPresent;
+	TBool iUseAutomaticRealm;
+
 	// Username in ASCII format
 	TBool iUsernamePresent;
 	TBuf<KGeneralStringMaxLength> iUsername; 
-		
+
+	/// Get: Whether password is stored in database.
+	/// Set: Whether password must be cleared from database.
+	TBool iPasswordExistPresent;
+	TBool iPasswordExist;
+
 	// Password in ASCII format
 	TBool iPasswordPresent;
 	TBuf<KGeneralStringMaxLength> iPassword;
-		
+
 	// Realm in ASCII format
 	TBool iRealmPresent;
 	TBuf<KGeneralStringMaxLength> iRealm; 
-	
+
 	// Use pseudonym identities in EAP-SIM/AKA
 	TBool iUsePseudonymsPresent;
 	TBool iUsePseudonyms;		
-	
+
 	// Whether EAP-TLS/TTLS/PEAP should verify server realm
 	TBool iVerifyServerRealmPresent;
 	TBool iVerifyServerRealm;
-	
+
 	// Whether EAP-TLS/TTLS/PEAP should require client authentication
 	TBool iRequireClientAuthenticationPresent;
 	TBool iRequireClientAuthentication;
-	
+
 	// General session validity time (in minutes)
 	TBool iSessionValidityTimePresent;
 	TUint iSessionValidityTime;
-	
+
 	// An array of allowed cipher suites for EAP-TLS/TTLS/PEAP. 
 	// Refer to RFC2246 chapter A.5 for the values.
 	TBool iCipherSuitesPresent;
@@ -136,13 +323,24 @@
   	// Subject key ID and Certificate type are the only mandatory certificate 
   	// details needed at the moment.
   	TBool iCertificatesPresent;
-	CArrayFixFlat<CertificateEntry> iCertificates;
+	RPointerArray<EapCertificateEntry> iCertificates;
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	// Use this in new code.
+	// Array listing the enabled encapsulated Expanded EAP types (in priority order).
+	// Use constant Expanded EAP type values from EapExpandedType.h.
+	TBool iEnabledEncapsulatedEAPExpandedTypesPresent;
+	RArray<TEapExpandedType> iEnabledEncapsulatedEAPExpandedTypes;
 	
-	// Array listing the encapsulated EAP types (in priority order).
-	// Use EAP type values from TEapType.
-	TBool iEncapsulatedEAPTypesPresent;
-	RArray<TUint> iEncapsulatedEAPTypes;
+	// Use this in new code.
+	// Array listing the disabled encapsulated Expanded EAP types.
+	// Use constant Expanded EAP type values from EapExpandedType.h.
+	TBool iDisabledEncapsulatedEAPExpandedTypesPresent;
+	RArray<TEapExpandedType> iDisabledEncapsulatedEAPExpandedTypes;
 	
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
 	// Whether Authenticated provisioning mode allowed or not in EAP-FAST.
 	TBool iAuthProvModeAllowedPresent;
 	TBool iAuthProvModeAllowed;
@@ -169,10 +367,34 @@
 	// the client with a PAC before but is not currently selected as the default server. 
 	// EAP-FAST specific.
 	TBool iWarnNotDefaultServerPresent;
-	TBool iWarnNotDefaultServer;	
+	TBool iWarnNotDefaultServer;
+	
+	TBool iShowPassWordPromptPresent;
+	TBool iShowPassWordPrompt;
+
+	// This is used in TLS/PEAP/TTLS/FAST. It activates TLS-renegotiation, that will send user certificate with in TLS-protected application data.
+	TBool iUseIdentityPrivacyPresent;
+	TBool iUseIdentityPrivacy;
+
 };
 
-#include "EapSettings.inl"
+//#include "EapSettings.inl"
+
+//-------------------------------------------------------------------------------
+
+#if defined(USE_EAP_TRACE)
+
+	#define EAP_TRACE_SETTINGS(settings) { (settings)->trace(); }
+
+#else
+
+	#define EAP_TRACE_SETTINGS(settings)
+
+#endif //#if defined(USE_EAP_TRACE)
+
+
+//-------------------------------------------------------------------------------
 
 #endif
+
 // End of file
--- a/accesssec_plat/eap_type_api/inc/EapSettings.inl	Thu May 13 22:51:27 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
-* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  EAP and WLAN authentication protocols.
-*
-*/
-
-/*
-* %version: 5.1.3 %
-*/
-
-inline CertificateEntry::CertificateEntry()
-: iCertType(ECA)
-, iSubjectNamePresent(EFalse)
-, iIssuerNamePresent(EFalse)
-, iSerialNumberPresent(EFalse)
-, iSubjectKeyIDPresent(EFalse)
-, iThumbprintPresent(EFalse)
-{
-}
-
-inline EAPSettings::EAPSettings()
-: iUsernamePresent(EFalse)
-, iPasswordPresent(EFalse)
-, iRealmPresent(EFalse)
-, iVerifyServerRealmPresent(EFalse)
-, iRequireClientAuthenticationPresent(EFalse)
-, iSessionValidityTimePresent(EFalse)
-, iCipherSuitesPresent(EFalse)
-, iCipherSuites(1)
-, iPEAPVersionsPresent(EFalse)
-, iCertificatesPresent(EFalse)
-, iCertificates(1)
-, iEncapsulatedEAPTypesPresent(EFalse)
-, iEncapsulatedEAPTypes(1)
-{
-}
-
-// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accesssec_plat/eap_type_api/inc/EapTraceSymbian.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,102 @@
+/*
+* Copyright (c) 2001-2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#if !defined( _EAP_AM_TRACE_SYMBIAN_H_ )
+#define _EAP_AM_TRACE_SYMBIAN_H_
+
+#include <e32debug.h>
+
+//------------------------------------------------------------------------
+
+IMPORT_C void eap_trace_data_symbian(
+	const char * const prefix,
+	const void * const p_data,
+	const TUint data_length);
+
+//------------------------------------------------------------------------
+
+#if defined(_DEBUG) || defined(DEBUG)
+
+	#define EAP_TRACE_DEBUG_SYMBIAN(_parameter_list_) \
+			{ \
+				RDebug::Print _parameter_list_ ; \
+			} \
+
+	#define EAP_TRACE_DATA_DEBUG_SYMBIAN(_parameter_list_) \
+			{ \
+				eap_trace_data_symbian _parameter_list_ ; \
+			} \
+
+#else // #if defined(_DEBUG) || defined(DEBUG)
+
+	#define EAP_TRACE_DEBUG_SYMBIAN(_parameter_list_) 
+
+	#define EAP_TRACE_DATA_DEBUG_SYMBIAN(_parameter_list_)
+
+#endif // #if defined(_DEBUG) || defined(DEBUG)
+
+//------------------------------------------------------------------------
+
+class eap_automatic_trace_string_symbian_c
+{
+private:
+
+	/// This is pointer to the string that will be traced on destructor.
+	const TPtrC m_string;
+
+public:
+	
+	/**
+	 * The destructor traces the string.
+	 */	
+	virtual ~eap_automatic_trace_string_symbian_c()
+	{
+		if (m_string.Length() > 0)
+		{
+			EAP_TRACE_DEBUG_SYMBIAN((_L("<<< %S <<<\n"), &m_string));
+		}
+	}
+	
+	/**
+	 * The constructor sets the values for the member variables
+	 */	
+	eap_automatic_trace_string_symbian_c(
+		const TPtrC string)
+		: m_string(string)
+	{
+	}
+};
+
+#if defined(_DEBUG) || defined(DEBUG)
+
+	#define EAP_TRACE_RETURN_STRING_SYMBIAN(string) \
+		eap_automatic_trace_string_symbian_c __eap_trace_function_returns__(string)
+
+#else // #if defined(_DEBUG) || defined(DEBUG)
+
+	#define EAP_TRACE_RETURN_STRING_SYMBIAN(string)
+
+#endif // #if defined(_DEBUG) || defined(DEBUG)
+
+//------------------------------------------------------------------------
+
+
+#endif //#if !defined( _EAP_AM_TRACE_SYMBIAN_H_ )
--- a/accesssec_plat/eap_type_api/inc/EapType.h	Thu May 13 22:51:27 2010 +0300
+++ b/accesssec_plat/eap_type_api/inc/EapType.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 18.1.3 %
+* %version: 33 %
 */
 
 #ifndef _EAPTYPE_H_
@@ -27,6 +27,7 @@
 #include <ecom/ecom.h> 
 
 #include <EapSettings.h>
+#include <EapTypeDefinitions.h>
 
 // FORWARD DECLARATIONS
 class abs_eap_am_tools_c;
@@ -39,101 +40,38 @@
 class abs_eap_configuration_if_c;
 #endif
 
-// LOCAL DATA
-// The UID for EAP plugin interface. ECom uses this.
-const TUid KEapTypeInterfaceUid = {0x101f8e4a};
-
-/// Possible services.
-enum TIndexType
-{
-	EDialoutISP,
-	EDialinISP,
-	EOutgoingGPRS,
-	ELan,
-	EVpn
-};
-
-struct SIapInfo {
-	TIndexType indexType;
-	TInt index;
-}; 
-
 // CLASS DECLARATION
 
 /**
 * The base interface class for EAP plug-in access.
 * Includes methods to create either the configuration interface or the EAP protocol interface.
 */
-class CEapType : public CBase  
+class CEapType
+: public CBase
 {
 public:
 
-	/**
-	* Factory function that loads the EAP type implementation DLL (plug-in).
-	* Uses ECom architecture to load the correct EAP type DLL. Calls the initialization
-	* function of the EAP type
-	* @param aCue EAP type id that specifies which plugin is loaded.
-	* @param aIndexType Indicates the bearer used for this connection.
-	* @param aIndex Index for the connection. aIndexType and aIndex uniquely specify the connection.
-	* @return Pointer to the implementation.
-	*/
-	inline static CEapType* NewL(const TDesC8& aCue, TIndexType aIndexType, TInt aIndex);	
-	
+    /**
+    * Factory function that loads the Generic EAP type implementation DLL (plug-in).
+    * @param aIndexType Indicates the bearer used for this connection.
+    * @param aIndex Index for the connection. aIndexType and aIndex uniquely specify the connection.
+    * @return Pointer to the implementation.
+    */
+	inline static CEapType* NewL(const TIndexType aIndexType, const TInt aIndex, const TEapExpandedType aEapType);
+
 	/**
 	* Unloads the implementation DLL.
 	*/
 	inline virtual ~CEapType();
 
-#ifndef RD_WLAN_3_1_BACKPORTING
-
-	/**
-	* Creates EAP protocol interface implementation. Instances an object that
-	* has been derived from eap_base_type_c that handles the communication 
-	* with EAP stack. 
-	* @param aTools Pointer to tools class.
-	* @param aPartner Used for callbacks to the stack.
-	* @param is_client_when_true Specifies whether the EAP type acts as a client or server.
-	* @param receive_network_id Network addresses
-	* @param eap_config_if Pointer used for call back to creater of stack (eapol_am_wlan_authentication_symbian_c class).
-	* @return Pointer to the implementation.
-	*/		
-	virtual eap_base_type_c* GetStackInterfaceL(abs_eap_am_tools_c* const aTools, 
-											   abs_eap_base_type_c* const aPartner,
-											   const bool is_client_when_true,
-											   const eap_am_network_id_c * const receive_network_id,
-											   abs_eap_configuration_if_c * const configuration_if) = 0;
-
-#else
 
-	/**
-	* Creates EAP protocol interface implementation. Instances an object that
-	* has been derived from eap_base_type_c that handles the communication 
-	* with EAP stack. 
-	* @param aTools Pointer to tools class.
-	* @param aPartner Used for callbacks to the stack.
-	* @param is_client_when_true Specifies whether the EAP type acts as a client or server.
-	* @param receive_network_id Network addresses
-	* @return Pointer to the implementation.
-	*/		
 
-	virtual eap_base_type_c* GetStackInterfaceL(abs_eap_am_tools_c* const aTools, 
-											   abs_eap_base_type_c* const aPartner,
-											   const bool is_client_when_true,
-											   const eap_am_network_id_c * const receive_network_id) = 0;
-	
-#endif // #ifndef RD_WLAN_3_1_BACKPORTING
-
-	/**
-	* Invokes the configuration UI. Displays a dialog for configuring the EAP type settings.
-	*/
-	virtual TInt InvokeUiL() = 0;
-	
 	/**
 	* Gets information about EAP type. 
 	* @return Pointer to a class that contains the EAP type information. Also pushed to cleanup stack.
 	*/
-	virtual CEapTypeInfo* GetInfoLC() = 0;
-	
+	virtual CEapTypeInfo* GetInfoL() = 0;
+
 	/**
 	* Deletes EAP type configuration
 	*/	
@@ -150,35 +88,11 @@
 	virtual TUint GetInterfaceVersion() = 0;
 
 	/**
-	* Parses the opaque_data field in CImplementationInformation and returns true if
-	* string NOT_OUTSIDE_PEAP is found.
-	* @param aImplInfo Implementation info returned by ListImplementations call
-	* @return Boolean
-	*/
-	inline static TBool IsDisallowedOutsidePEAP(const CImplementationInformation& aImplInfo);
-
-	/**
-	* Parses the opaque_data field in CImplementationInformation and returns true if
-	* string NOT_INSIDE_PEAP is found.
-	* @param aImplInfo Implementation info returned by ListImplementations call
-	* @return Boolean
-	*/	
-	inline static TBool IsDisallowedInsidePEAP(const CImplementationInformation& aImplInfo);
-
-	/**
-	* Parses the opaque_data field in CImplementationInformation and returns true if
-	* string NOT_INSIDE_TTLS is found.
-	* @param aImplInfo Implementation info returned by ListImplementations call
-	* @return Boolean
-	*/	
-	inline static TBool IsDisallowedInsideTTLS(const CImplementationInformation& aImplInfo);
-
-	/**
 	* Sets the tunneling type. This is used to indicate that this type is run inside another 
 	* EAP type. 
 	* @param aTunnelingType Type number for the tunneling type
 	*/	
-	virtual void SetTunnelingType(const TInt aTunnelingType) = 0;
+	virtual void SetTunnelingType(const TEapExpandedType aTunnelingType) = 0;
 	
 	/**
 	* Changes the index of the saved parameters.
--- a/accesssec_plat/eap_type_api/inc/EapType.inl	Thu May 13 22:51:27 2010 +0300
+++ b/accesssec_plat/eap_type_api/inc/EapType.inl	Mon May 24 20:32:47 2010 +0300
@@ -16,76 +16,41 @@
 */
 
 /*
-* %version: 11.1.2 %
+* %version: %
 */
 
-/* The meaning and bit positions used in "opaque_data" field in ECOM implementation
-
- 0 0 0 0 0 0 0 0 ---->All 0 means allowed both inside (encapsulated EAP) and outside (Outer EAP)
- | | | | | | | |
- | | | | | | | |_____ 1 means NOT_INSIDE_TUNNEL (NOT allowed as encapsulated EAP)
- | | | | | | |
- | | | | | | |_______ 1 means NOT_OUTSIDE_TUNNEL (only allowed as encapsulated EAP, NOT as outer EAP)
- | | | | | |  
- | | | | | |_________ 1 means NOT_INSIDE_PEAP
- | | | | |  
- | | | | |___________ 1 means NOT_OUTSIDE_PEAP  
- | | | | 
- | | | |_____________ 1 means NOT_INSIDE_TTLS
- | | | 
- | | |_______________ 1 means NOT_OUTSIDE_TTLS
- | | 
- | |_________________ 1 means NOT_INSIDE_FAST
- |
- |___________________ 1 means NOT_OUTSIDE_FAST
- 
- 
- // For historical reasons NOT_OUTSIDE_PEAP is used instead of NOT_OUTSIDE_TUNNEL
- // Both of these convey the same meaning. It means if an EAP is not allowed outside PEAP
- // (DisallowedOutsidePEAP), it can be used only as an encapsulated EAP.
- // EAP-MSCHAPv2 is an example for this.
-
- // The bits can be ORed. 
- // "NOT_OUTSIDE|NOT_OUTSIDE_PEAP" is 0x0A (0000 1010).
- // "NOT_OUTSIDE|NOT_OUTSIDE_PEAP|NOT_INSIDE_PEAP|NOT_INSIDE_FAST" is 0x4E (0100 1110).
- // "NOT_INSIDE|NOT_INSIDE_PEAP|NOT_INSIDE_TTLS|NOT_INSIDE_FAST" is 0x55 (0101 0101).
- // "NOT_INSIDE|NOT_INSIDE_PEAP|NOT_INSIDE_TTLS|NOT_INSIDE_FAST|NOT_OUTSIDE_PEAP|NOT_OUTSIDE" is 0x5F (0101 1111).
- 
-*/
+#include "EapTraceSymbian.h"
 
 
-
-const TUint8 KNotInsideTunnel = 0x01; // Only the last bit position is 1. 		(0000 0001)
-const TUint8 KNotOutsideTunnel = 0x02; // Only the 2nd last bit positions is 1. (0000 0010)
-
-const TUint8 KNotInsidePEAP = 0x04; // Only the 3rd last bit position is 1. 	(0000 0100)
-const TUint8 KNotOutsidePEAP = 0x08; // Only the 4th last bit positions is 1. 	(0000 1000)
-
-const TUint8 KNotInsideTTLS = 0x10; // Only the 5th last bit position is 1. 	(0001 0000)
-const TUint8 KNotOutsideTTLS = 0x20; // Only the 6th last bit position is 1. 	(0010 0000)
-
-const TUint8 KNotInsideFAST = 0x40; // Only the 7th last bit position is 1. 	(0100 0000)
-const TUint8 KNotOutsideFAST = 0x80;  // Only the first bit position is 1. 		(1000 0000)
-
-
-inline CEapType* CEapType::NewL(const TDesC8& aCue, TIndexType aIndexType, TInt aIndex)
+// Used By UI
+inline CEapType* CEapType::NewL(const TIndexType aIndexType, const TInt aIndex, const TEapExpandedType aEapType)
 {
-	// The EAP type id (aCue) is passed to ECom as resolver parameters
-    TEComResolverParams resolverParams;
-    resolverParams.SetDataType(aCue);
-	
-	// The arguments are stored to a iapInfo struct.
-	SIapInfo iapInfo;
-	iapInfo.indexType = aIndexType;
-	iapInfo.index = aIndex;
-	
-	// This call finds and loads the correct DLL and after that calls the
-	// entry function in the interface implementation in the DLL.
-    TAny* ptr = REComSession::CreateImplementationL(
-        KEapTypeInterfaceUid,
-        _FOFF(CEapType, iDtor_ID_Key), 
-		&iapInfo,
-        resolverParams);
+    EAP_TRACE_DEBUG_SYMBIAN((_L("CEapType::NewL(EapGeneric): start")));
+
+    // The arguments are stored to a iapInfo struct.
+    SIapInfo iapInfo;
+    iapInfo.indexType = aIndexType;
+    iapInfo.index = aIndex;
+    iapInfo.aEapType = aEapType;
+
+    // This call finds and loads the correct DLL and after that calls the
+    // entry function in the interface implementation in the DLL.
+    TAny* ptr = 0;
+
+    const TUid KimplementationUid = { 0x20026FD2 };
+
+    TRAPD( err, ptr = REComSession::CreateImplementationL(
+            KimplementationUid,
+            _FOFF(CEapType, iDtor_ID_Key), 
+            &iapInfo));
+
+    EAP_TRACE_DEBUG_SYMBIAN((_L("CEapType::NewL(EapGeneric): CreateImplementationL(Uid=0x%08x), err=%d, returns ptr=0x%08x\n"),
+		KimplementationUid.iUid,
+        err,
+        ptr));
+
+    User::LeaveIfError(err);
+
     return (CEapType *) ptr;
 }
 
@@ -95,40 +60,4 @@
     REComSession::DestroyedImplementation(iDtor_ID_Key);
 }
 
-inline TBool CEapType::IsDisallowedOutsidePEAP(const CImplementationInformation& aImplInfo)
-{
-	
-	const TUint8 pluginOpaqueData = *(aImplInfo.OpaqueData().Ptr());
-	
-	if(pluginOpaqueData & KNotOutsidePEAP)
-	{
-		return ETrue;
-	}
-	return EFalse;
-	
-}
-
-inline TBool CEapType::IsDisallowedInsidePEAP(const CImplementationInformation& aImplInfo)
-{
-	const TUint8 pluginOpaqueData = *(aImplInfo.OpaqueData().Ptr());
-	
-	if(pluginOpaqueData & KNotInsidePEAP)
-	{
-		return ETrue;
-	}
-	return EFalse;
-
-}
-
-inline TBool CEapType::IsDisallowedInsideTTLS(const CImplementationInformation& aImplInfo)
-{
-	const TUint8 pluginOpaqueData = *(aImplInfo.OpaqueData().Ptr());
-	
-	if(pluginOpaqueData & KNotInsideTTLS)
-	{
-		return ETrue;
-	}
-	return EFalse;
-}
-
 // End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accesssec_plat/eap_type_api/inc/EapTypeDefinitions.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,54 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 5 %
+*/
+
+#ifndef _EAP_TYPE_DEFINITIONS_H_
+#define _EAP_TYPE_DEFINITIONS_H_
+
+// INCLUDES
+#include <e32base.h>
+#include <ecom/ecom.h> 
+
+#include <EapExpandedType.h>
+
+// The UID for EAP plugin interface. ECom uses this.
+const TUid KEapTypeInterfaceUid = {0x101f8e4a};
+
+/// Possible services.
+enum TIndexType
+{
+	EDialoutISP,
+	EDialinISP,
+	EOutgoingGPRS,
+	ELan,
+	EVpn
+};
+
+struct SIapInfo
+{
+	TIndexType indexType;
+	TInt index;
+	TEapExpandedType aEapType;
+}; 
+
+
+#endif // _EAP_TYPE_DEFINITIONS_H_
+
+// End of file
--- a/accesssec_plat/eap_type_api/inc/EapTypeInfo.h	Thu May 13 22:51:27 2010 +0300
+++ b/accesssec_plat/eap_type_api/inc/EapTypeInfo.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7 %
+* %version: %
 */
 
 #ifndef _EAPTYPEINFO_H_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accesssec_plat/eap_type_api/inc/EapTypePlugin.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,207 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 8 %
+*/
+
+#ifndef _EAP_TYPE_PLUGIN_H_
+#define _EAP_TYPE_PLUGIN_H_
+
+// INCLUDES
+#include <e32base.h>
+#include <ecom/ecom.h> 
+
+#include <EapSettings.h>
+#include <EapTypeDefinitions.h>
+
+// FORWARD DECLARATIONS
+class abs_eap_am_tools_c;
+class eap_base_type_c;
+class abs_eap_base_type_c;
+class CEapTypeInfo;
+class eap_am_network_id_c;
+
+#ifndef RD_WLAN_3_1_BACKPORTING
+class abs_eap_configuration_if_c;
+#endif
+
+
+// CLASS DECLARATION
+
+/**
+* The interface class for direct EAP plug-in access.
+* Includes methods to create either the configuration interface or the EAP protocol interface.
+*/
+class CEapTypePlugin
+: public CBase
+{
+public:
+
+	/**
+	* Factory function that loads the EAP type implementation DLL (plug-in).
+	* Uses ECom architecture to load the correct EAP type DLL. Calls the initialization
+	* function of the EAP type
+	* @param aCue EAP type id that specifies which plugin is loaded.
+	* @param aIndexType Indicates the bearer used for this connection.
+	* @param aIndex Index for the connection. aIndexType and aIndex uniquely specify the connection.
+	* @return Pointer to the implementation.
+	*/
+	inline static CEapTypePlugin* NewL(const TDesC8& aCue, TIndexType aIndexType, TInt aIndex);	
+
+	/**
+	* Unloads the implementation DLL.
+	*/
+	inline virtual ~CEapTypePlugin();
+
+	/**
+	* Creates EAP protocol interface implementation. Instances an object that
+	* has been derived from eap_base_type_c that handles the communication 
+	* with EAP stack. 
+	* @param aTools Pointer to tools class.
+	* @param aPartner Used for callbacks to the stack.
+	* @param is_client_when_true Specifies whether the EAP type acts as a client or server.
+	* @param receive_network_id Network addresses
+	* @param eap_config_if Pointer used for call back to creater of stack (eapol_am_wlan_authentication_symbian_c class).
+	* @return Pointer to the implementation.
+	*/		
+	virtual eap_base_type_c* GetStackInterfaceL(abs_eap_am_tools_c* const aTools, 
+											   abs_eap_base_type_c* const aPartner,
+											   const bool is_client_when_true,
+											   const eap_am_network_id_c * const receive_network_id,
+											   abs_eap_configuration_if_c * const configuration_if) = 0;
+
+#if 0
+#ifndef RD_WLAN_3_1_BACKPORTING
+
+#else
+
+	/**
+	* Creates EAP protocol interface implementation. Instances an object that
+	* has been derived from eap_base_type_c that handles the communication 
+	* with EAP stack. 
+	* @param aTools Pointer to tools class.
+	* @param aPartner Used for callbacks to the stack.
+	* @param is_client_when_true Specifies whether the EAP type acts as a client or server.
+	* @param receive_network_id Network addresses
+	* @return Pointer to the implementation.
+	*/		
+
+	virtual eap_base_type_c* GetStackInterfaceL(abs_eap_am_tools_c* const aTools, 
+											   abs_eap_base_type_c* const aPartner,
+											   const bool is_client_when_true,
+											   const eap_am_network_id_c * const receive_network_id) = 0;
+	
+#endif // #ifndef RD_WLAN_3_1_BACKPORTING
+#endif
+
+
+	
+	/**
+	* Gets information about EAP type. 
+	* @return Pointer to a class that contains the EAP type information. Also pushed to cleanup stack.
+	*/
+	virtual CEapTypeInfo* GetInfoL() = 0;
+	
+	/**
+	* Deletes EAP type configuration
+	*/	
+	virtual void DeleteConfigurationL() = 0;
+
+	/**
+	* Returns the version of the interface that the EAP type implements.
+	* The client-side of the interface must always check the version with this function 
+	* and not call the functions that are not implemented. New functions must be
+	* added to the end of the interface so that the order of the old functions
+	* does not change.
+	* @return Integer indicating the version.
+	*/
+	virtual TUint GetInterfaceVersion() = 0;
+
+	/**
+	* Parses the opaque_data field in CImplementationInformation and returns true if
+	* string NOT_OUTSIDE_PEAP is found.
+	* @param aImplInfo Implementation info returned by ListImplementations call
+	* @return Boolean
+	*/
+	inline static TBool IsDisallowedOutsidePEAP(const CImplementationInformation& aImplInfo);
+
+	/**
+	* Parses the opaque_data field in CImplementationInformation and returns true if
+	* string NOT_INSIDE_PEAP is found.
+	* @param aImplInfo Implementation info returned by ListImplementations call
+	* @return Boolean
+	*/	
+	inline static TBool IsDisallowedInsidePEAP(const CImplementationInformation& aImplInfo);
+
+	/**
+	* Parses the opaque_data field in CImplementationInformation and returns true if
+	* string NOT_INSIDE_TTLS is found.
+	* @param aImplInfo Implementation info returned by ListImplementations call
+	* @return Boolean
+	*/	
+	inline static TBool IsDisallowedInsideTTLS(const CImplementationInformation& aImplInfo);
+
+	/**
+	* Sets the tunneling type. This is used to indicate that this type is run inside another 
+	* EAP type. 
+	* @param aTunnelingType Type number for the tunneling type
+	*/	
+	virtual void SetTunnelingType(const TEapExpandedType aTunnelingType) = 0;
+	
+	/**
+	* Changes the index of the saved parameters.
+	* @param aIndexType Indicates the bearer used for this connection.
+	* @param aIndex Index for the connection. aIndexType and aIndex uniquely specify the connection.
+	*/
+	virtual void SetIndexL(
+		const TIndexType aIndexType, 
+		const TInt aIndex) = 0;
+
+	/**
+	* Sets the EAP types configuration
+	* @param aSettings Structure containing the settings
+	*/
+	virtual void SetConfigurationL(const EAPSettings& aSettings) = 0;
+
+	/**
+	* Gets the EAP types configuration
+	* @param aSettings Structure containing the settings
+	*/
+	virtual void GetConfigurationL(EAPSettings& aSettings) = 0;
+	
+	/**
+	* Copies the EAP types configuration
+	* @param aDestinationIndexType index type of the destination, ELan for WLAN.
+	* @param aDestinationIndex ID to where copy the settings.
+	*/
+	virtual void CopySettingsL(
+		const TIndexType aDestinationIndexType, 
+		const TInt aDestinationIndex) = 0;
+
+
+private:
+
+	/// ECom uses this key to keep track of DLL usage.
+	TUid iDtor_ID_Key;
+};
+
+#include "EapTypePlugin.inl"
+
+#endif // _EAP_TYPE_PLUGIN_H_
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/accesssec_plat/eap_type_api/inc/EapTypePlugin.inl	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,155 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 5 %
+*/
+
+/* The meaning and bit positions used in "opaque_data" field in ECOM implementation
+
+ 0 0 0 0 0 0 0 0 ---->All 0 means allowed both inside (encapsulated EAP) and outside (Outer EAP)
+ | | | | | | | |
+ | | | | | | | |_____ 1 means NOT_INSIDE_TUNNEL (NOT allowed as encapsulated EAP)
+ | | | | | | |
+ | | | | | | |_______ 1 means NOT_OUTSIDE_TUNNEL (only allowed as encapsulated EAP, NOT as outer EAP)
+ | | | | | |  
+ | | | | | |_________ 1 means NOT_INSIDE_PEAP
+ | | | | |  
+ | | | | |___________ 1 means NOT_OUTSIDE_PEAP  
+ | | | | 
+ | | | |_____________ 1 means NOT_INSIDE_TTLS
+ | | | 
+ | | |_______________ 1 means NOT_OUTSIDE_TTLS
+ | | 
+ | |_________________ 1 means NOT_INSIDE_FAST
+ |
+ |___________________ 1 means NOT_OUTSIDE_FAST
+ 
+ 
+ // For historical reasons NOT_OUTSIDE_PEAP is used instead of NOT_OUTSIDE_TUNNEL
+ // Both of these convey the same meaning. It means if an EAP is not allowed outside PEAP
+ // (DisallowedOutsidePEAP), it can be used only as an encapsulated EAP.
+ // EAP-MSCHAPv2 is an example for this.
+
+ // The bits can be ORed. 
+ // "NOT_OUTSIDE|NOT_OUTSIDE_PEAP" is 0x0A (0000 1010).
+ // "NOT_OUTSIDE|NOT_OUTSIDE_PEAP|NOT_INSIDE_PEAP|NOT_INSIDE_FAST" is 0x4E (0100 1110).
+ // "NOT_INSIDE|NOT_INSIDE_PEAP|NOT_INSIDE_TTLS|NOT_INSIDE_FAST" is 0x55 (0101 0101).
+ // "NOT_INSIDE|NOT_INSIDE_PEAP|NOT_INSIDE_TTLS|NOT_INSIDE_FAST|NOT_OUTSIDE_PEAP|NOT_OUTSIDE" is 0x5F (0101 1111).
+ 
+*/
+
+#include "EapTraceSymbian.h"
+
+
+const TUint8 KNotInsideTunnel = 0x01; // Only the last bit position is 1. 		(0000 0001)
+const TUint8 KNotOutsideTunnel = 0x02; // Only the 2nd last bit positions is 1. (0000 0010)
+
+const TUint8 KNotInsidePEAP = 0x04; // Only the 3rd last bit position is 1. 	(0000 0100)
+const TUint8 KNotOutsidePEAP = 0x08; // Only the 4th last bit positions is 1. 	(0000 1000)
+
+const TUint8 KNotInsideTTLS = 0x10; // Only the 5th last bit position is 1. 	(0001 0000)
+const TUint8 KNotOutsideTTLS = 0x20; // Only the 6th last bit position is 1. 	(0010 0000)
+
+const TUint8 KNotInsideFAST = 0x40; // Only the 7th last bit position is 1. 	(0100 0000)
+const TUint8 KNotOutsideFAST = 0x80;  // Only the first bit position is 1. 		(1000 0000)
+
+// Used By Server
+inline CEapTypePlugin* CEapTypePlugin::NewL(const TDesC8& aCue, TIndexType aIndexType, TInt aIndex)
+{
+    EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTypePlugin::NewL(): start")));
+
+	// The EAP type id (aCue) is passed to ECom as resolver parameters
+    TEComResolverParams resolverParams;
+    resolverParams.SetDataType(aCue);
+	
+	// The arguments are stored to a iapInfo struct.
+	SIapInfo iapInfo;
+	iapInfo.indexType = aIndexType;
+	iapInfo.index = aIndex;
+	iapInfo.aEapType = aCue;
+
+	EAP_TRACE_DATA_DEBUG_SYMBIAN(("CEapTypePlugin::NewL(): resolverParams.DataType()",
+		resolverParams.DataType().Ptr(),
+		resolverParams.DataType().Size()));
+
+    EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTypePlugin::NewL(): iapInfo.aEapType=0xfe%06x%08x\n"),
+		iapInfo.aEapType.GetVendorId(),
+		iapInfo.aEapType.GetVendorType()));
+
+	// This call finds and loads the correct DLL and after that calls the
+	// entry function in the interface implementation in the DLL.
+	TAny* ptr = 0;
+
+    TRAPD( err, ptr = REComSession::CreateImplementationL(
+        KEapTypeInterfaceUid,
+        _FOFF(CEapTypePlugin, iDtor_ID_Key), 
+		&iapInfo,
+        resolverParams));
+
+    EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTypePlugin::NewL(): ends, err=%d, returns ptr=0x%08x\n"),
+		err,
+		ptr));
+
+	User::LeaveIfError(err);
+
+    return (CEapTypePlugin *) ptr;
+}
+
+inline CEapTypePlugin::~CEapTypePlugin()
+{
+	// Unload DLL
+    REComSession::DestroyedImplementation(iDtor_ID_Key);
+}
+
+inline TBool CEapTypePlugin::IsDisallowedOutsidePEAP(const CImplementationInformation& aImplInfo)
+{
+	
+	const TUint8 pluginOpaqueData = *(aImplInfo.OpaqueData().Ptr());
+	
+	if(pluginOpaqueData & KNotOutsidePEAP)
+	{
+		return ETrue;
+	}
+	return EFalse;
+	
+}
+
+inline TBool CEapTypePlugin::IsDisallowedInsidePEAP(const CImplementationInformation& aImplInfo)
+{
+	const TUint8 pluginOpaqueData = *(aImplInfo.OpaqueData().Ptr());
+	
+	if(pluginOpaqueData & KNotInsidePEAP)
+	{
+		return ETrue;
+	}
+	return EFalse;
+
+}
+
+inline TBool CEapTypePlugin::IsDisallowedInsideTTLS(const CImplementationInformation& aImplInfo)
+{
+	const TUint8 pluginOpaqueData = *(aImplInfo.OpaqueData().Ptr());
+	
+	if(pluginOpaqueData & KNotInsideTTLS)
+	{
+		return ETrue;
+	}
+	return EFalse;
+}
+
+// End of file
--- a/accesssec_plat/eap_vpn_api/group/bld.inf	Thu May 13 22:51:27 2010 +0300
+++ b/accesssec_plat/eap_vpn_api/group/bld.inf	Mon May 24 20:32:47 2010 +0300
@@ -17,7 +17,7 @@
 */
 
 /*
-* %version: tr1cfwln#8 %
+* %version: %
 */
 
 #include <platform_paths.hrh>
--- a/accesssec_plat/eap_vpn_api/inc/abs_eap_vpn_if.h	Thu May 13 22:51:27 2010 +0300
+++ b/accesssec_plat/eap_vpn_api/inc/abs_eap_vpn_if.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11 %
+* %version: %
 */
 
 #ifndef __EAPPLUGINCALLBACKINTERFACE_H__
--- a/accesssec_plat/eap_vpn_api/inc/eap_vpn_if.h	Thu May 13 22:51:27 2010 +0300
+++ b/accesssec_plat/eap_vpn_api/inc/eap_vpn_if.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11 %
+* %version: 9.1.2 %
 */
 
 #ifndef __EAPPLUGININTERFACE_H__
--- a/accesssec_plat/eap_vpn_api/inc/eap_vpn_if.inl	Thu May 13 22:51:27 2010 +0300
+++ b/accesssec_plat/eap_vpn_api/inc/eap_vpn_if.inl	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: 10.1.2 %
 */
 
 // Interface's (abstract base class's) static factory method implementation.
--- a/accesssec_plat/eap_vpn_api/inc/eap_vpn_if_uids.h	Thu May 13 22:51:27 2010 +0300
+++ b/accesssec_plat/eap_vpn_api/inc/eap_vpn_if_uids.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: 8.1.2 %
 */
 
 #ifndef __EAPPLUGINUIDS_H__
--- a/accesssec_plat/group/bld.inf	Thu May 13 22:51:27 2010 +0300
+++ b/accesssec_plat/group/bld.inf	Mon May 24 20:32:47 2010 +0300
@@ -1,22 +1,22 @@
 /*
-* Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
+* under the terms of the License "Symbian Foundation License v1.0"
 * which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
 *
 * Initial Contributors:
 * Nokia Corporation - initial contribution.
 *
 * Contributors:
 *
-* Description: Build information file
+* Description:  Build information file
 *
 */
 
 /*
-* %version: 8 %
+* %version: 3.1.2 %
 */
 
 PRJ_PLATFORMS
--- a/eapol/eapol_framework/eapol_common/am/common/DSS_random/dss_random.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/common/DSS_random/dss_random.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/am/common/DSS_random/dss_random.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/common/DSS_random/dss_random.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 #include "eap_am_types.h"
--- a/eapol/eapol_framework/eapol_common/am/common/abs_eap_am_mutex.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/common/abs_eap_am_mutex.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/am/common/abs_eap_am_semaphore.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/common/abs_eap_am_semaphore.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/am/common/bloom_algorithm/eap_am_bloom_algorithm.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/common/bloom_algorithm/eap_am_bloom_algorithm.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -153,7 +153,7 @@
 		}
 		else
 		{
-			const u8_t mask = 0xff << shift;
+			const u8_t mask = static_cast<const u8_t>(0xff << shift);
 			bit_index |= (input_data[data_ind] & mask) >> (shift);
 		}
 	}
--- a/eapol/eapol_framework/eapol_common/am/common/crypto/md4/eap_am_crypto_md4.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/common/crypto/md4/eap_am_crypto_md4.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/am/common/crypto/random/eap_am_random_test.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/common/crypto/random/eap_am_random_test.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/am/common/crypto/rc4/eap_am_crypto_rc4.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/common/crypto/rc4/eap_am_crypto_rc4.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/am/common/crypto/sha-256/eap_am_crypto_sha_256.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/common/crypto/sha-256/eap_am_crypto_sha_256.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 14 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/am/common/crypto/sha1/eap_am_crypto_sha1.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/common/crypto/sha1/eap_am_crypto_sha1.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 13 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/am/common/eap_am_memory.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/common/eap_am_memory.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/am/common/eap_am_memory_store.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/common/eap_am_memory_store.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 16 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/am/common/eap_am_memory_store_data.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/common/eap_am_memory_store_data.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/am/common/eap_am_network_id.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/common/eap_am_network_id.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 14 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -364,7 +364,8 @@
 // 
 EAP_FUNC_EXPORT const u8_t * eap_am_network_id_c::get_source() const
 {
-	if (m_data == 0)
+	if (m_data == 0
+		|| m_data->m_source.get_is_valid_data() == false)
 	{
 		return 0;
 	}
@@ -388,7 +389,8 @@
 // 
 EAP_FUNC_EXPORT const u8_t * eap_am_network_id_c::get_destination() const
 {
-	if (m_data == 0)
+	if (m_data == 0
+		|| m_data->m_destination.get_is_valid_data() == false)
 	{
 		return 0;
 	}
@@ -400,7 +402,8 @@
 // 
 EAP_FUNC_EXPORT u32_t eap_am_network_id_c::get_source_length() const
 {
-	if (m_data == 0)
+	if (m_data == 0
+		|| m_data->m_source.get_is_valid_data() == false)
 	{
 		return 0;
 	}
@@ -412,7 +415,8 @@
 // 
 EAP_FUNC_EXPORT u32_t eap_am_network_id_c::get_destination_length() const
 {
-	if (m_data == 0)
+	if (m_data == 0
+		|| m_data->m_destination.get_is_valid_data() == false)
 	{
 		return 0;
 	}
--- a/eapol/eapol_framework/eapol_common/am/common/eap_am_tools.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/common/eap_am_tools.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 25.1.3 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -301,14 +301,14 @@
 				data_start = ind;
 			}
 
-			*cursor_ascii++ = (*data >= 0x20 && *data < 0x7f) ? *data : '.';
+			*cursor_ascii++ = static_cast<u8_t>((*data >= 0x20 && *data < 0x7f) ? *data : '.');
 
 			*cursor++ = octet_to_ascii(((*data) & 0xf0) >> 4);
 			*cursor++ = octet_to_ascii(((*data) & 0x0f));
 			data++;
 
-			if (ind > 0u
-				&& ((ind+1) % byte_group_size) == 0
+			if ((ind > 0u
+				 && ((ind+1) % byte_group_size) == 0)
 				|| byte_group_size == 1ul)
 			{
 				*cursor++ = ' ';
@@ -445,7 +445,7 @@
 
 EAP_FUNC_EXPORT eap_status_e eap_am_tools_c::timer_thread_function()
 {
-	EAP_TRACE_TIMER(this, TRACE_FLAGS_DEFAULT, (EAPL("TIMER: Timer thread starts.\n")));
+	EAP_TRACE_TIMER(this, TRACE_FLAGS_TIMER, (EAPL("TIMER: Timer thread starts.\n")));
 
 	u32_t static_sleep_time = get_timer_resolution_ms();
 	u64_t start_time = get_clock_ticks();
@@ -462,7 +462,7 @@
 	// Note 64-bit casted to 32-bit.
 	EAP_TRACE_TIMER(
 		this,
-		TRACE_FLAGS_DEFAULT, (EAPL("TIMER: get_clock_ticks_of_second() = %lu\n"),
+		TRACE_FLAGS_TIMER, (EAPL("TIMER: get_clock_ticks_of_second() = %lu\n"),
 		static_cast<u32_t>(get_clock_ticks_of_second())));
 
 	hw_ticks_of_millisecond = get_clock_ticks_of_second();
@@ -488,14 +488,14 @@
 
 	EAP_TRACE_TIMER(
 		this,
-		TRACE_FLAGS_DEFAULT,
+		TRACE_FLAGS_TIMER,
 		(EAPL("MUTEX: eap_am_tools_c::timer_thread_function(): mutex_enter(): begin\n")));
 
 	mutex->mutex_enter();
 
 	EAP_TRACE_TIMER(
 		this,
-		TRACE_FLAGS_DEFAULT,
+		TRACE_FLAGS_TIMER,
 		(EAPL("MUTEX: eap_am_tools_c::timer_thread_function(): mutex_enter(): end\n")));
 
 	while(get_is_timer_thread_active())
@@ -506,7 +506,7 @@
 
 		EAP_TRACE_TIMER(
 			this,
-			TRACE_FLAGS_DEFAULT,
+			TRACE_FLAGS_TIMER,
 			(EAPL("TIMER: timer_sleep(): current_sleep_time=%d\n"),
 			 static_cast<u32_t>(current_sleep_time)));
 
@@ -515,14 +515,14 @@
 
 		EAP_TRACE_TIMER(
 			this,
-			TRACE_FLAGS_DEFAULT,
+			TRACE_FLAGS_TIMER,
 			(EAPL("MUTEX: eap_am_tools_c::timer_thread_function(): mutex_leave(): begin\n")));
 
 		mutex->mutex_leave(this);
 
 		EAP_TRACE_TIMER(
 			this,
-			TRACE_FLAGS_DEFAULT,
+			TRACE_FLAGS_TIMER,
 			(EAPL("MUTEX: eap_am_tools_c::timer_thread_function(): mutex_leave(): end\n")));
 
 		// Sleep happens outside of the mutex.
@@ -530,14 +530,14 @@
 
 		EAP_TRACE_TIMER(
 			this,
-			TRACE_FLAGS_DEFAULT,
+			TRACE_FLAGS_TIMER,
 			(EAPL("MUTEX: eap_am_tools_c::timer_thread_function(): mutex_enter(): begin\n")));
 
 		mutex->mutex_enter();
 
 		EAP_TRACE_TIMER(
 			this,
-			TRACE_FLAGS_DEFAULT,
+			TRACE_FLAGS_TIMER,
 			(EAPL("MUTEX: eap_am_tools_c::timer_thread_function(): mutex_enter(): end\n")));
 
 		end_time = get_clock_ticks();
@@ -549,7 +549,7 @@
 			delay_time = 0ul;
 			EAP_TRACE_TIMER(
 				this,
-				TRACE_FLAGS_DEFAULT,
+				TRACE_FLAGS_TIMER,
 				(EAPL("TIMER: empty timer queue\n")));
 		}
 		else
@@ -568,7 +568,7 @@
 		{
 			EAP_TRACE_TIMER(
 				this,
-				TRACE_FLAGS_DEFAULT,
+				TRACE_FLAGS_TIMER,
 				(EAPL("TIMER: real_sleep_time=%d, delay_time=%d\n"),
 				 static_cast<u32_t>(real_sleep_time),
 				 static_cast<u32_t>(delay_time)));
@@ -609,7 +609,7 @@
 
 		EAP_TRACE_TIMER(
 			this,
-			TRACE_FLAGS_DEFAULT,
+			TRACE_FLAGS_TIMER,
 			(EAPL("TIMER: Timer thread pulse_timer, sleep time = %4d ms, real_sleep_time %4d ms, ")
 			 EAPL("virtual_time %6d, real_time %6d, next_sleep_time %4d, delay_time %4d.\n"),
 			 current_sleep_time,
@@ -623,19 +623,19 @@
 
 	EAP_TRACE_TIMER(
 		this,
-		TRACE_FLAGS_DEFAULT,
+		TRACE_FLAGS_TIMER,
 		(EAPL("MUTEX: eap_am_tools_c::timer_thread_function(): mutex_leave(): begin\n")));
 
 	mutex->mutex_leave(this);
 
 	EAP_TRACE_TIMER(
 		this,
-		TRACE_FLAGS_DEFAULT,
+		TRACE_FLAGS_TIMER,
 		(EAPL("MUTEX: eap_am_tools_c::timer_thread_function(): mutex_leave(): end\n")));
 
 	delete mutex;
 
-	EAP_TRACE_TIMER(this, TRACE_FLAGS_DEFAULT, (EAPL("TIMER: Timer thread stops.\n")));
+	EAP_TRACE_TIMER(this, TRACE_FLAGS_TIMER, (EAPL("TIMER: Timer thread stops.\n")));
 
 	m_thread_stopped =true;
 
@@ -663,7 +663,7 @@
 	{
 		if (source_bytes[ind] >= 'a' && source_bytes[ind] <= 'z')
 		{
-			source_bytes[ind] -= 32;
+			source_bytes[ind] = static_cast<u8_t>(source_bytes[ind] - 32);
 		}
 	}
 
@@ -1064,7 +1064,7 @@
 		// +-+-+-+-+-+-+-+-+-+-+
 		*/
 		value = octet_from_ascii_armor(source_byte);
-		target[*output_ind] |= (value & 0x30) >> 4u;
+		target[*output_ind] = static_cast<u8_t>(target[*output_ind] | (value & 0x30) >> 4u);
 		++(*output_ind);
 		if (last_input_byte == false)
 		{
@@ -1098,7 +1098,7 @@
 		// +-+-+-+-+-+-+-+-+-+-+-+-+
 		*/
 		value = octet_from_ascii_armor(source_byte);
-		target[*output_ind] |= (value >> 2u) & 0x0f;
+		target[*output_ind] = static_cast<u8_t>(target[*output_ind] | ((value >> 2u) & 0x0f));
 		++(*output_ind);
 		if (last_input_byte == false)
 		{
@@ -1134,7 +1134,7 @@
 		// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 		*/
 		value = octet_from_ascii_armor(source_byte);
-		target[*output_ind] |= value;
+		target[*output_ind] = static_cast<u8_t>(target[*output_ind] | value);
 		++(*output_ind);
 		*missing_bit_count = 0u;
 	}
@@ -1656,8 +1656,12 @@
 	if (m_shutdown_was_called == false)
 	{
 		m_shutdown_was_called = true;
+		
+		// stop tracing as tools get deleted
+		set_trace_mask(eap_trace_mask_none);
 
 		#if !defined(NO_EAP_AM_MEMORY_STORE)
+		(void) am_cancel_all_timers();
 		if (m_memory_store != 0)
 		{
 			status = m_memory_store->shutdown();
@@ -1890,7 +1894,7 @@
 			}
 
 			previous_data = data[ind];
-			data[ind] ^= rnd;
+			data[ind] = static_cast<u8_t>(data[ind] ^ rnd);
 
 			if (previous_data != data[ind])
 			{
@@ -1968,7 +1972,7 @@
 					}
 
 					previous_data = data[index];
-					data[index] ^= rnd;
+					data[index] = static_cast<u8_t>(data[index] ^ rnd);
 				}
 				while(previous_data == data[index]);
 
@@ -2032,8 +2036,8 @@
 						return EAP_STATUS_RETURN(this, status);
 					}
 
-					delta_length %= (static_cast<i32_t>(sent_packet->get_data_length())
-									 - static_cast<i32_t>(minimum_packet_length) /*eapol_ethernet_header_wr_c::get_header_length()*/ );
+					delta_length = static_cast<u8_t>(delta_length % (static_cast<i32_t>(sent_packet->get_data_length())
+													- static_cast<i32_t>(minimum_packet_length)));
 
 					if (delta_length == 0)
 					{
@@ -2431,13 +2435,13 @@
 
 	// set the four most significant bits (bits 12 through 15) of the
 	// time_hi_and_version field to the appropriate 4-bit version number
-	hash[6] &= 0x0F;
-	hash[6] |= 0x50;
+	hash[6] = static_cast<u8_t>(hash[6] & 0x0F);
+	hash[6] = static_cast<u8_t>(hash[6] | 0x50);
 
 	// set the two most significant bits (bits 6 and 7) of the
     // clock_seq_hi_and_reserved to zero and one, respectively
-	hash[8] &= 0x3F;
-	hash[8] |= 0x80;
+	hash[8] = static_cast<u8_t>(hash[8] & 0x3F);
+	hash[8] = static_cast<u8_t>(hash[8] | 0x80);
 
 	return EAP_STATUS_RETURN(this, eap_status_ok);
 }
--- a/eapol/eapol_framework/eapol_common/am/common/eap_file_config.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/common/eap_file_config.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 17.1.3 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -31,6 +31,9 @@
 #include "eap_am_memory.h"
 #include "eap_file_config.h"
 #include "eap_automatic_variable.h"
+#include "eap_tlv_message_data.h"
+#include "eap_process_tlv_message_data.h"
+#include "eap_config.h"
 
 #if defined(_WIN32) && !defined(__GNUC__)
 	#pragma warning( disable : 4355 ) // 'this' : used in base member initializer list
@@ -47,13 +50,13 @@
 //-----------------------------------------------------------------
 //-----------------------------------------------------------------
 
-eap_config_value_c::~eap_config_value_c()
+EAP_FUNC_EXPORT eap_config_value_c::~eap_config_value_c()
 {
 	delete m_subsection_map;
 	m_subsection_map = 0;
 }
 
-eap_config_value_c::eap_config_value_c(
+EAP_FUNC_EXPORT eap_config_value_c::eap_config_value_c(
 	abs_eap_am_tools_c* const tools)
 	: m_am_tools(tools)
 	, m_subsection_map(0)
@@ -61,6 +64,13 @@
 	, m_type(eap_configure_type_none)
 	, m_is_valid(false)
 {
+	EAP_ASSERT(eap_configure_type_id[eap_configure_type_none].type == eap_configure_type_none);	
+	EAP_ASSERT(eap_configure_type_id[eap_configure_type_u32_t].type == eap_configure_type_u32_t);	
+	EAP_ASSERT(eap_configure_type_id[eap_configure_type_boolean].type == eap_configure_type_boolean);	
+	EAP_ASSERT(eap_configure_type_id[eap_configure_type_string].type == eap_configure_type_string);	
+	EAP_ASSERT(eap_configure_type_id[eap_configure_type_hex_data].type == eap_configure_type_hex_data);	
+	EAP_ASSERT(eap_configure_type_id[eap_configure_type_u32array].type == eap_configure_type_u32array);	
+
 	if (m_data.get_is_valid() == false)
 	{
 		return;
@@ -69,37 +79,47 @@
 	m_is_valid = true;
 }
 
-void eap_config_value_c::set_subsection(
+EAP_FUNC_EXPORT void eap_config_value_c::set_subsection(
 	eap_core_map_c<eap_config_value_c, abs_eap_core_map_c, eap_variable_data_c> * const subsection_map)
 {
 	m_subsection_map = subsection_map;
 }
 
-eap_core_map_c<eap_config_value_c, abs_eap_core_map_c, eap_variable_data_c> * eap_config_value_c::get_subsection()
+EAP_FUNC_EXPORT eap_core_map_c<eap_config_value_c, abs_eap_core_map_c, eap_variable_data_c> * eap_config_value_c::get_subsection()
 {
 	return m_subsection_map;
 }
 
-eap_variable_data_c * eap_config_value_c::get_data()
+EAP_FUNC_EXPORT eap_variable_data_c * eap_config_value_c::get_data()
+{
+	return &m_data;
+}
+
+EAP_FUNC_EXPORT const eap_variable_data_c * eap_config_value_c::get_const_data() const
 {
 	return &m_data;
 }
 
-void eap_config_value_c::set_type(const eap_configure_type_e type)
+EAP_FUNC_EXPORT void eap_config_value_c::set_type(const eap_configure_type_e type)
 {
 	m_type = type;
 }
 
-eap_configure_type_e eap_config_value_c::get_type()
+EAP_FUNC_EXPORT eap_configure_type_e eap_config_value_c::get_type()
 {
 	return m_type;
 }
 
-void eap_config_value_c::object_increase_reference_count()
+EAP_FUNC_EXPORT eap_configure_type_e eap_config_value_c::get_const_type() const
+{
+	return m_type;
+}
+
+EAP_FUNC_EXPORT void eap_config_value_c::object_increase_reference_count()
 {
 }
 
-bool eap_config_value_c::get_is_valid()
+EAP_FUNC_EXPORT bool eap_config_value_c::get_is_valid() const
 {
 	return m_is_valid;
 }
@@ -1262,6 +1282,13 @@
 			 config->get_data()->get_data(), 
 			 config->get_data()->get_data_length()));
 
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CONFIG: option type %d=%s\n"),
+			 config->get_type(),
+			 eap_configuration_field_c::get_configure_type_string(config->get_type())));
+
 		//-----------------------------------------------------------------------------
 
 	}
@@ -1542,6 +1569,11 @@
 		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 	
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("\n")));
+
 	if (is_environment_variable == true)
 	{
 		#if defined(EAP_FILE_CONFIG_USE_CONSOLE_PRINTS)
@@ -2063,6 +2095,486 @@
 
 //-----------------------------------------------------------------
 
+eap_status_e eap_file_config_c::read_all_configurations(
+	const eap_configuration_field_c * const field,
+	eap_variable_data_c* const data,
+	eap_core_map_c<eap_config_value_c, abs_eap_core_map_c, eap_variable_data_c> * const config_map)
+{
+	eap_status_e status = eap_status_process_general_error;
+
+	/**
+	 * Here is a figure of message data composed of Attribute-Value Pairs (See eap_tlv_header_c).
+	 * Value data follows eap_tlv_message_data_c.
+	 * @code
+	 *  Configuration data:
+	 *  0                   1                   2                   3   
+	 *  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 
+	 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -+
+	 * |       Type = eap_tlv_message_type_configuration_option        |  |
+	 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
+	 * |                             Length = 8+4+8+m+8+n              |  |
+	 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
+	 * |       Type = eap_tlv_message_type_u32_t                       |  |
+	 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
+	 * |                             Length = 4                        |  |
+	 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
+	 * |          option type eap_configure_type_hex_data              |  |
+	 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
+	 * |       Type = eap_tlv_message_type_variable_data               |  |
+	 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  | First configuration option
+	 * |                             Length = m                        |  |
+	 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
+	 * |               Value (m octets) option name                    |  |
+	 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
+	 * |       Type = eap_tlv_message_type_variable_data               |  |
+	 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
+	 * |                             Length = n                        |  |
+	 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
+	 * |               Value (n octets) option data                    |  |
+	 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -+
+	 * |       Type = eap_tlv_message_type_configuration_option        |  |
+	 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
+	 * |                             Length = 8+4+8+m+8+4              |  |
+	 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
+	 * |       Type = eap_tlv_message_type_u32_t                       |  |
+	 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
+	 * |                             Length = 4                        |  |
+	 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
+	 * |          option type  eap_configure_type_u32_t                |  |
+	 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
+	 * |       Type = eap_tlv_message_type_variable_data               |  |
+	 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  | Second configuration option
+	 * |                             Length = m                        |  |
+	 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
+	 * |               Value (m octets) option name                    |  |
+	 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
+	 * |       Type = eap_tlv_message_type_u32_t                       |  |
+	 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
+	 * |                             Length = 4                        |  |
+	 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
+	 * |               Value option data 32-bit integer                |  |
+	 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -+
+	 *
+	 * @endcode
+	 * 
+	 */
+
+	u32_t size_of_data(0ul);
+	u32_t ind(0ul);
+
+	eap_process_tlv_message_data_c message(m_am_tools);
+
+	if (message.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	for (ind = 0ul; ind < config_map->get_atom_count(); ++ind)
+	{
+		const eap_state_map_atom_c<eap_config_value_c, eap_variable_data_c> * atom = config_map->get_atom(ind);
+		while (atom != 0)
+		{
+			u32_t size = message.get_payload_size(
+					atom->get_selector(),
+					atom->get_const_object());
+
+			if (size > 0ul)
+			{
+				// The extra size of header is added because the whole allocated message size includes all headers.
+				// The get_payload_size() function calculates only payload of the option without the main header.
+				size_of_data +=
+					size
+					+ eap_tlv_header_c::get_header_length();
+			}
+			else
+			{
+				// Some konfiguration objects are not included to message yet.
+			}
+
+			atom = atom->get_next_atom();
+		}
+	}
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CONFIG: data size %d\n"),
+		 size_of_data));
+
+	status = message.allocate_message_data_buffer(size_of_data);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+
+	for (ind = 0ul; ind < config_map->get_atom_count(); ++ind)
+	{
+		const eap_state_map_atom_c<eap_config_value_c, eap_variable_data_c> * atom = config_map->get_atom(ind);
+		while (atom != 0)
+		{
+			status = message.add_parameter_data(atom->get_selector(), atom->get_const_object());
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+			atom = atom->get_next_atom();
+		}
+	}
+
+	status = data->set_copy_of_buffer(
+		message.get_message_data(),
+		message.get_message_data_length());
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//-----------------------------------------------------------------
+
+eap_status_e eap_file_config_c::add_option(
+	const eap_tlv_header_c * const option_header)
+{
+	eap_status_e status = eap_status_process_general_error;
+
+	eap_process_tlv_message_data_c message(m_am_tools);
+
+	if (message.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = message.set_message_data(option_header->get_value_length(), option_header->get_value(option_header->get_value_length()));
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	eap_array_c<eap_tlv_header_c> parameters(m_am_tools);
+
+	status = message.parse_message_data(&parameters);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	eap_config_value_c * config = new eap_config_value_c(m_am_tools);
+
+	eap_automatic_variable_c<eap_config_value_c>
+		automatic_config(m_am_tools, config);
+
+	if (config == 0
+		|| config->get_is_valid() == false)
+	{
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	u32_t parameter_index(0ul);
+
+	eap_variable_data_c selector(m_am_tools);
+	if (selector.get_is_valid() == false)
+	{
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	{
+		const eap_tlv_header_c * const a_option_header = parameters.get_object(parameter_index);
+		if (a_option_header == 0
+			|| a_option_header->get_type() != eap_tlv_message_type_u32_t)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+			status = eap_status_illegal_parameter;
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		u32_t value(0ul);
+
+		status = message.get_parameter_data(
+			a_option_header,
+			&value);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		config->set_type(static_cast<eap_configure_type_e>(value));
+	}
+
+	++parameter_index;
+	
+	{
+		const eap_tlv_header_c * const a_option_header = parameters.get_object(parameter_index);
+		if (a_option_header == 0
+			|| a_option_header->get_type() != eap_tlv_message_type_variable_data)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+			status = eap_status_illegal_parameter;
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.get_parameter_data(
+			a_option_header,
+			&selector);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+	
+	++parameter_index;
+
+	switch(config->get_type())
+	{
+	case eap_configure_type_string:
+	case eap_configure_type_hex_data:
+		{
+			const eap_tlv_header_c * const a_option_header = parameters.get_object(parameter_index);
+			if (a_option_header == 0
+				|| a_option_header->get_type() != eap_tlv_message_type_variable_data)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+				status = eap_status_illegal_parameter;
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+			status = message.get_parameter_data(
+				a_option_header,
+				config->get_data());
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+		break;
+	case eap_configure_type_u32_t:
+	case eap_configure_type_boolean:
+		{
+			const eap_tlv_header_c * const a_option_header = parameters.get_object(parameter_index);
+			if (a_option_header == 0
+				|| a_option_header->get_type() != eap_tlv_message_type_u32_t)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+				status = eap_status_illegal_parameter;
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+			u32_t value(0ul);
+
+			status = message.get_parameter_data(
+				a_option_header,
+				&value);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+			status = config->get_data()->set_copy_of_buffer(&value, sizeof(value));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+		break;
+	case eap_configure_type_u32array:
+		{
+			const eap_tlv_header_c * const a_option_header = parameters.get_object(parameter_index);
+			if (a_option_header == 0
+				|| a_option_header->get_type() != eap_tlv_message_type_array)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+				status = eap_status_illegal_parameter;
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+			eap_process_tlv_message_data_c array_message(m_am_tools);
+
+			if (array_message.get_is_valid() == false)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+			status = array_message.set_message_data(a_option_header->get_value_length(), a_option_header->get_value(a_option_header->get_value_length()));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+			eap_array_c<eap_tlv_header_c> array_parameters(m_am_tools);
+
+			status = array_message.parse_message_data(&array_parameters);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+			for (u32_t ind = 0ul; ind < array_parameters.get_object_count(); ++ind)
+			{
+				const eap_tlv_header_c * const a_option_header = array_parameters.get_object(ind);
+				if (a_option_header == 0
+					|| a_option_header->get_type() != eap_tlv_message_type_u32_t)
+				{
+					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+					status = eap_status_illegal_parameter;
+					return EAP_STATUS_RETURN(m_am_tools, status);
+				}
+
+				u32_t value(0ul);
+
+				status = array_message.get_parameter_data(
+					a_option_header,
+					&value);
+				if (status != eap_status_ok)
+				{
+					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+					return EAP_STATUS_RETURN(m_am_tools, status);
+				}
+
+				status = config->get_data()->add_data(&value, sizeof(value));
+				if (status != eap_status_ok)
+				{
+					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+					return EAP_STATUS_RETURN(m_am_tools, status);
+				}
+			}
+		}
+		break;
+	default:
+		break;
+	};
+
+	status = m_config_map.add_handler(&selector, config);
+	if (status == eap_status_ok)
+	{
+		automatic_config.do_not_free_variable();
+	}
+	else //if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("\n")));
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CONFIG MESSAGE: option added"),
+		 selector.get_data(),
+		 selector.get_data_length()));
+	
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("CONFIG MESSAGE: data"), 
+		 config->get_data()->get_data(), 
+		 config->get_data()->get_data_length()));
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CONFIG MESSAGE: option type %d=%s\n"),
+		 config->get_type(),
+		 eap_configuration_field_c::get_configure_type_string(config->get_type())));
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//-----------------------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_file_config_c::read_configuration_message(
+	const eap_variable_data_c * const configuration_message)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_file_config_c::read_configuration_message(): data=0x%08x, length=%d\n"),
+		configuration_message->get_data(),
+		configuration_message->get_data_length()));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_file_config_c::read_configuration_message()");
+
+	eap_status_e status = eap_status_process_general_error;
+
+	eap_process_tlv_message_data_c message(m_am_tools);
+
+	if (message.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = message.set_message_data(configuration_message->get_data_length(), configuration_message->get_data());
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	eap_array_c<eap_tlv_header_c> parameters(m_am_tools);
+
+	status = message.parse_message_data(&parameters);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	for (u32_t ind = 0ul; ind < parameters.get_object_count(); ++ind)
+	{
+		const eap_tlv_header_c * const option_header = parameters.get_object(ind);
+		if (option_header == 0
+			|| option_header->get_type() != eap_tlv_message_type_configuration_option)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+			status = eap_status_illegal_parameter;
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = add_option(option_header);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//-----------------------------------------------------------------
+
 EAP_FUNC_EXPORT eap_status_e eap_file_config_c::read_configure(
 	const eap_configuration_field_c * const field,
 	eap_variable_data_c* const data,
@@ -2161,9 +2673,11 @@
 				EAP_TRACE_DEBUG(
 					m_am_tools,
 					TRACE_FLAGS_DEFAULT,
-					(EAPL("WARNING: CONFIG: option type failed: required %d != actual %d\n"),
+					(EAPL("WARNING: CONFIG: option type failed: required %d=%s != actual %d=%s\n"),
 					 field->get_type(),
-					 config->get_type()));
+					 eap_configuration_field_c::get_configure_type_string(field->get_type()),
+					 config->get_type(),
+					 eap_configuration_field_c::get_configure_type_string(config->get_type())));
 				EAP_TRACE_DEBUG(
 					m_am_tools,
 					TRACE_FLAGS_DEFAULT,
@@ -2196,6 +2710,12 @@
 				(EAPL("WARNING: CONFIG: option not found"),
 				 field->get_field(),
 				 field->get_field_length()));
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("WARNING: CONFIG: option type %d=%s\n"),
+				 field->get_type(),
+				 eap_configuration_field_c::get_configure_type_string(field->get_type())));
 			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_configure_field);
 		}
@@ -2219,11 +2739,26 @@
 		 field->get_field(),
 		 field->get_field_length()));
 
-	eap_status_e status = read_configure(
-		field,
-		data,
-		&m_config_map,
-		true);
+	eap_status_e status(eap_status_process_general_error);
+
+	if (field->get_type() == eap_configure_type_all_configurations
+		&& field->compare(
+			m_am_tools,
+			cf_str_EAP_read_all_configurations.get_field()) == true)
+	{
+		status = read_all_configurations(
+			field,
+			data,
+			&m_config_map);
+	}
+	else
+	{
+		status = read_configure(
+			field,
+			data,
+			&m_config_map,
+			true);
+	}
 
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 	return EAP_STATUS_RETURN(m_am_tools, status);
--- a/eapol/eapol_framework/eapol_common/am/common/eap_timer_queue.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/common/eap_timer_queue.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 14.1.2 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -424,6 +424,16 @@
 
 	deactivate_timer_queue();
 
+	trace_timer();
+
+	EAP_TRACE_TIMER(
+		m_am_tools,
+		TRACE_FLAGS_TIMER_QUEUE,
+		(EAPL("TIMER: eap_timer_queue_c::~eap_timer_queue_c(): m_timer_queue=0x%08x, m_new_event_begin=0x%08x, m_new_event_end=0x%08x\n"),
+		m_timer_queue,
+		m_new_event_begin,
+		m_new_event_end));
+
 	// cancel_all_timers() must be called before destructor.
 	EAP_ASSERT_TOOLS(m_am_tools, m_timer_queue == 0);
 	EAP_ASSERT_TOOLS(m_am_tools, m_new_event_begin == 0);
@@ -689,10 +699,10 @@
 
 				if (current != 0)
 				{
-					EAP_TRACE_TIMER(
+					EAP_TRACE_DEBUG(
 						m_am_tools,
 						TRACE_FLAGS_DEFAULT,
-						(EAPL("TIMER: timer_expired(): [0x%08x]->initializer(0x%08x)->timer_expired(")
+						(EAPL("TIMER: eap_timer_queue_c::timer_expired(): [0x%08x]->initializer(0x%08x)->timer_expired(")
 						 EAPL("id 0x%02x, data 0x%08x, original time %8d)\n"),
 						 current,
 						 current->get_initializer(),
@@ -1270,10 +1280,10 @@
 		 event->get_time_ms()));
 
 	// Adds the new event to the end of the list to keep the order of events correct.
-	EAP_ASSERT(m_new_event_begin == 0
-		&& m_new_event_end == 0
-		|| m_new_event_begin != 0
-		&& m_new_event_end != 0);
+	EAP_ASSERT((m_new_event_begin == 0
+				&& m_new_event_end == 0)
+			   || (m_new_event_begin != 0
+				   && m_new_event_end != 0));
 
 	if (m_new_event_begin == 0
 		&& m_new_event_end == 0)
@@ -1343,6 +1353,16 @@
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
 	}
 
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("TIMER: eap_timer_queue_c::set_timer(): [0x%08x]->initializer(0x%08x)->set_timer(")
+		 EAPL("id 0x%02x, data 0x%08x, original time %8d)\n"),
+		 event,
+		 event->get_initializer(),
+		 event->get_id(),
+		 event->get_data(),
+		 event->get_original_time()));
 
 	if (m_use_eap_millisecond_timer == true)
 	{
@@ -1438,6 +1458,17 @@
 				m_new_event_end = previous;
 			}
 
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("TIMER: eap_timer_queue_c::cancel_pending_timer(): [0x%08x]->initializer(0x%08x)->cancel_pending_timer(")
+				 EAPL("id 0x%02x, data 0x%08x, original time %8d)\n"),
+				 remove,
+				 remove->get_initializer(),
+				 remove->get_id(),
+				 remove->get_data(),
+				 remove->get_original_time()));
+
 			remove->set_next(0);
 			delete remove;
 
@@ -1505,14 +1536,15 @@
 
 		while(cursor != 0)
 		{
-			EAP_TRACE_TIMER(
+			EAP_TRACE_DEBUG(
 				m_am_tools,
-				TRACE_FLAGS_TIMER,
-				(EAPL("TIMER: [0x%08x] cancel_timer(initializer 0x%08x, ")
-				 EAPL("id 0x%02x, original time %8d)\n"),
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("TIMER: eap_timer_queue_c::cancel_timer(): [0x%08x]->initializer(0x%08x)->cancel_timer(")
+				 EAPL("id 0x%02x, data 0x%08x, original time %8d)\n"),
 				 cursor,
-				 initializer,
-				 id,
+				 cursor->get_initializer(),
+				 cursor->get_id(),
+				 cursor->get_data(),
 				 cursor->get_original_time()));
 
 			if (cursor == m_timer_queue)
@@ -1677,11 +1709,16 @@
 
 			while (cursor != 0)
 			{
-				EAP_TRACE_TIMER(
+				EAP_TRACE_DEBUG(
 					m_am_tools,
-					TRACE_FLAGS_TIMER,
-					(EAPL("TIMER: [0x%08x] cancel_all_timers()\n"),
-					cursor));
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("TIMER: eap_timer_queue_c::cancel_all_timers(): [0x%08x]->initializer(0x%08x)->cancel_all_timers(")
+					 EAPL("id 0x%02x, data 0x%08x, original time %8d)\n"),
+					 cursor,
+					 cursor->get_initializer(),
+					 cursor->get_id(),
+					 cursor->get_data(),
+					 cursor->get_original_time()));
 
 				eap_timer_queue_event_c *next = cursor->get_next_same_time();
 
--- a/eapol/eapol_framework/eapol_common/am/common/fileconfig_utils.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/common/fileconfig_utils.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/am/common/stack/eap_am_stack_trace.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/common/stack/eap_am_stack_trace.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/am/common/stack/eap_am_stack_trace.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/common/stack/eap_am_stack_trace.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #if !defined(_STACK_OUTPUT_H_)
--- a/eapol/eapol_framework/eapol_common/am/core/eap_am_wimax_authentication.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/core/eap_am_wimax_authentication.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 4 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/am/core/eapol_am_wlan_authentication.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/core/eapol_am_wlan_authentication.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_aka_algorithm.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_aka_algorithm.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #if !defined(_ABS_AKA_ALGORITHM_H_)
--- a/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_bloom_algorithm_store.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_bloom_algorithm_store.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 #if !defined(_ABS_EAP_AM_BLOOM_ALGORITHM_STORE_H_)
--- a/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_crypto.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_crypto.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 6 %
+* %version: %
 */
 
 #if !defined( _ABS_EAP_AM_CRYPTO_H_ )
--- a/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_file_input.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_file_input.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 15 %
+* %version: %
 */
 
 #if !defined(_ABS_EAP_AM_FILE_INPUT_H_)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_general_settings.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 5 %
+*/
+
+#if !defined(_ABS_EAP_AM_GENERAL_SETTINGS_H_)
+#define _ABS_EAP_AM_GENERAL_SETTINGS_H_
+
+#include "eap_tools.h"
+#include "eap_status.h"
+#include "eap_am_export.h"
+
+/** @file */
+
+/// This class is the common part of EAP message interface.
+/// This class is interface to the message creation and parsing function.
+class EAP_EXPORT abs_eap_am_general_settings_c
+{
+
+private:
+
+	// ----------------------------------------------------------------------
+
+public:
+
+	virtual ~abs_eap_am_general_settings_c()
+	{
+	}
+
+	virtual eap_status_e complete_get_eap_methods(const eap_method_settings_c * const internal_settings) = 0;
+
+	virtual eap_status_e complete_set_eap_methods(const eap_method_settings_c * const internal_settings) = 0;
+
+	virtual eap_status_e complete_get_certificate_lists(const eap_method_settings_c * const internal_settings) = 0;
+
+	virtual eap_status_e complete_delete_all_eap_settings(const eap_method_settings_c * const internal_settings) = 0;
+
+	virtual eap_status_e complete_copy_all_eap_settings(const eap_method_settings_c * const internal_settings) = 0;
+
+	// ----------------------------------------------------------------------
+};
+
+#endif //#if !defined(_ABS_EAP_AM_GENERAL_SETTINGS_H_)
+
+
+//--------------------------------------------------
+// End
--- a/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_memory_store_data.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_memory_store_data.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 5 %
+* %version: %
 */
 
 #if !defined( _ABS_EAP_AM_TOOLS_MEMORY_STORE_DATA_H_ )
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_message_if.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,62 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#if !defined(_ABS_EAP_AM_MESSAGE_IF_H_)
+#define _ABS_EAP_AM_MESSAGE_IF_H_
+
+#include "eap_tools.h"
+#include "eap_am_export.h"
+
+//--------------------------------------------------
+
+/** @file */
+
+/// This class is abstract interface to send data messages through abstract interface.
+class EAP_EXPORT abs_eap_am_message_if_c
+{
+
+private:
+	//--------------------------------------------------
+
+	//--------------------------------------------------
+
+	//--------------------------------------------------
+public:
+	//--------------------------------------------------
+
+	virtual ~abs_eap_am_message_if_c()
+	{
+	}
+
+	/// Function sends the data message to lower layer.
+	/// Data is formatted to Attribute-Value Pairs.
+	/// Look at eap_tlv_header_c and eap_tlv_message_data_c.
+	virtual eap_status_e send_data(const void * const data, const u32_t length) = 0;
+
+}; // class abs_eap_am_message_if_c
+
+
+#endif //#if !defined(_ABS_EAP_AM_MESSAGE_IF_H_)
+
+//--------------------------------------------------
+
+
+// End.
--- a/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_mutex.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_mutex.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 5 %
+* %version: %
 */
 
 #if !defined( _ABS_EAP_AM_MUTEX_H_ )
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_pac_store.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,80 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#if !defined(_ABS_EAP_AM_PAC_STORE_H_)
+#define _ABS_EAP_AM_PAC_STORE_H_
+
+#include "eap_tools.h"
+#include "eap_status.h"
+#include "eap_am_export.h"
+
+/** @file */
+
+/// This class is the common part of EAP message interface.
+/// This class is interface to the message creation and parsing function.
+class EAP_EXPORT abs_eap_am_pac_store_c
+{
+
+private:
+
+	// ----------------------------------------------------------------------
+
+public:
+
+	virtual ~abs_eap_am_pac_store_c()
+	{
+	}
+
+	virtual eap_status_e complete_open_pac_store(
+		const eap_status_e completion_status) = 0;
+
+	virtual eap_status_e complete_create_device_seed(
+		const eap_status_e completion_status) = 0;
+
+	virtual eap_status_e complete_is_master_key_present(
+	  const bool is_present) = 0;
+
+	virtual eap_status_e complete_is_master_key_and_password_matching(
+	  const bool is_matching) = 0;
+
+	virtual eap_status_e complete_create_and_save_master_key(
+		const eap_status_e completion_status) = 0;
+
+	virtual eap_status_e complete_compare_pac_store_password(
+		const bool is_matching) = 0;
+
+	virtual eap_status_e complete_is_pacstore_password_present(
+		const bool is_present) = 0;
+
+	virtual eap_status_e complete_set_pac_store_password(
+		const eap_status_e completion_status) = 0;
+
+	virtual eap_status_e complete_destroy_pac_store(
+		const eap_status_e completion_status) = 0;
+
+	// ----------------------------------------------------------------------
+};
+
+#endif //#if !defined(_ABS_EAP_AM_PAC_STORE_H_)
+
+
+//--------------------------------------------------
+// End
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_plugin.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,69 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#if !defined(_ABS_EAP_AM_PLUGIN_H_)
+#define _ABS_EAP_AM_PLUGIN_H_
+
+#include "eap_tools.h"
+#include "eap_status.h"
+#include "eap_am_export.h"
+
+class eap_method_settings_c;
+
+/** @file */
+
+/// This class is the common part of EAP message interface.
+/// This class is interface to the message creation and parsing function.
+class EAP_EXPORT abs_eap_am_plugin_c
+{
+
+private:
+
+	// ----------------------------------------------------------------------
+
+public:
+
+	virtual ~abs_eap_am_plugin_c()
+	{
+	}
+
+	virtual eap_status_e complete_get_configuration(const eap_method_settings_c * const internal_settings) = 0;
+
+	virtual eap_status_e complete_set_configuration(const eap_method_settings_c * const internal_settings) = 0;
+
+	virtual eap_status_e complete_delete_configuration(const eap_method_settings_c * const internal_settings) = 0;
+
+	virtual eap_status_e complete_copy_configuration(const eap_method_settings_c * const internal_settings) = 0;
+
+	virtual eap_status_e complete_set_index(const eap_method_settings_c * const internal_settings) = 0;
+
+	virtual eap_status_e complete_get_type_info(const eap_method_settings_c * const internal_settings) = 0;
+
+	virtual eap_status_e complete_invoke_ui(const eap_method_settings_c * const internal_settings) = 0;
+
+	// ----------------------------------------------------------------------
+};
+
+#endif //#if !defined(_ABS_EAP_AM_PLUGIN_H_)
+
+
+//--------------------------------------------------
+// End
--- a/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_radius.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_radius.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 #if !defined(_ABS_EAP_AM_TYPE_RADIUS_H_)
--- a/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_semaphore.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_semaphore.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 #if !defined( _ABS_EAP_AM_SEMAPHORE_H_ )
--- a/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_sim_algorithm.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_sim_algorithm.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #if !defined(_ABS_SIM_ALGORITHM_H_)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_stack.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,68 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#if !defined(_ABS_EAP_AM_STACK_H_)
+#define _ABS_EAP_AM_STACK_H_
+
+#include "eap_tools.h"
+#include "eap_status.h"
+#include "eap_am_export.h"
+#include "eap_expanded_type.h"
+#include "eap_array.h"
+
+class abs_eap_am_message_if_c;
+class eap_configuration_field_c;
+class eap_variable_data_c;
+class abs_eap_am_tools_c;
+class abs_eap_base_type_c;
+class eap_base_type_c;
+class eap_am_network_id_c;
+
+/** @file */
+
+/// This class is the common part of EAP message interface.
+/// This class is interface to the message creation and parsing function.
+class EAP_EXPORT abs_eap_am_stack_c
+{
+
+private:
+
+	// ----------------------------------------------------------------------
+
+public:
+
+	virtual ~abs_eap_am_stack_c()
+	{
+	}
+
+	virtual eap_status_e complete_get_802_11_authentication_mode(
+		const eap_status_e completion_status,
+		const eap_am_network_id_c * const receive_network_id,
+		const eapol_key_802_11_authentication_mode_e mode) = 0;
+
+	// ----------------------------------------------------------------------
+};
+
+#endif //#if !defined(_ABS_EAP_AM_STACK_H_)
+
+
+//--------------------------------------------------
+// End
--- a/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_tools.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_tools.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7.1.2 %
+* %version: %
 */
 
 #if !defined( _ABS_EAP_AM_TOOLS_H_ )
@@ -369,6 +369,11 @@
 	virtual void set_trace_mask(const u32_t mask) = 0;
 
 	/**
+	 * This function sets the trace prefix string.
+	 */
+	virtual eap_status_e set_trace_prefix(const eap_variable_data_c * const prefix8bit) = 0;
+
+	/**
 	 * This function sets the trace output file name.
 	 */
 	virtual eap_status_e set_trace_file_name(const eap_variable_data_c * const trace_output_file) = 0;
--- a/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_type_aka.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_type_aka.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #if !defined(_ABS_EAP_AM_TYPE_AKA_H_)
--- a/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_type_gsmsim.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_type_gsmsim.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 4 %
+* %version: %
 */
 
 #if !defined(_ABS_EAP_AM_TYPE_GSMSIM_H_)
--- a/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_type_leap.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_type_leap.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 #ifndef ABS_EAP_AM_TYPE_LEAP_H
--- a/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_type_mschapv2.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_type_mschapv2.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7 %
+* %version: %
 */
 
 #if !defined(_ABS_EAP_AM_TYPE_MSCHAPV2_H_)
--- a/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_type_securid.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_type_securid.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 #ifndef ABS_EAP_AM_TYPE_SECURID_H
--- a/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_type_sim.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_type_sim.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #if !defined(_ABS_EAP_AM_TYPE_SIM_H_)
--- a/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_type_simple_config.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_type_simple_config.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #if !defined(_ABS_EAP_AM_TYPE_SIMPLE_CONFIG_H_)
--- a/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_type_tls_peap.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_type_tls_peap.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 #if !defined(_ABS_EAP_AM_TYPE_TLS_PEAP_H_)
--- a/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_wimax_authentication.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/abs_eap_am_wimax_authentication.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 4 %
+* %version: %
 */
 
 #if !defined(_ABS_EAP_AM_WIMAX_AUTHENTICATION_H_)
--- a/eapol/eapol_framework/eapol_common/am/include/abs_eapol_am_wlan_authentication.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/abs_eapol_am_wlan_authentication.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 4 %
+* %version: %
 */
 
 #if !defined(_ABS_EAPOL_AM_WLAN_AUTHENTICATION_H_)
--- a/eapol/eapol_framework/eapol_common/am/include/abs_simple_config_am_services.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/abs_simple_config_am_services.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: %
 */
 
 #if !defined(_ABS_SIMPLE_CONFIG_AM_SERVICES_H_)
--- a/eapol/eapol_framework/eapol_common/am/include/abs_tls_am_application_eap_fast.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/abs_tls_am_application_eap_fast.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 28 %
+* %version: %
 */
 
 #if !defined(_ABS_TLS_AM_APPLICATION_EAP_FAST_H_)
--- a/eapol/eapol_framework/eapol_common/am/include/abs_tls_am_services.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/abs_tls_am_services.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 17 %
+* %version: %
 */
 
 #if !defined(_ABS_TLS_AM_SERVICES_H_)
--- a/eapol/eapol_framework/eapol_common/am/include/eap_am_assert.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_am_assert.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 6 %
+* %version: %
 */
 
 #if !defined(_EAP_ASSERT_H_)
--- a/eapol/eapol_framework/eapol_common/am/include/eap_am_compiler_flags.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_am_compiler_flags.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 4 %
+* %version: %
 */
 
 #if !defined(_EAP_AM_COMPILER_FLAGS_H_)
@@ -64,7 +64,7 @@
 
 	#if !defined(USE_EAP_FILE_TRACE)
 		// This macro activates file tracing.
-		#define USE_EAP_FILE_TRACE
+		//#define USE_EAP_FILE_TRACE
 	#endif //#if !defined(USE_EAP_FILE_TRACE)
 
 	#if !defined(USE_EAP_HARDWARE_TRACE)
--- a/eapol/eapol_framework/eapol_common/am/include/eap_am_crypto_md4.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_am_crypto_md4.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #if !defined( _EAP_AM_CRYPTO_MD4_H_ )
--- a/eapol/eapol_framework/eapol_common/am/include/eap_am_crypto_openssl.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_am_crypto_openssl.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 13 %
+* %version: %
 */
 
 #if !defined( _EAP_AM_CRYPTO_OPENSSL_H_ )
--- a/eapol/eapol_framework/eapol_common/am/include/eap_am_crypto_rc4.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_am_crypto_rc4.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 //------------------------------------------------------------
--- a/eapol/eapol_framework/eapol_common/am/include/eap_am_crypto_sha1.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_am_crypto_sha1.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 #if !defined( _EAP_AM_CRYPTO_SHA1_H_ )
--- a/eapol/eapol_framework/eapol_common/am/include/eap_am_crypto_sha_256.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_am_crypto_sha_256.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 #if !defined( _EAP_AM_CRYPTO_SHA_256_H_ )
--- a/eapol/eapol_framework/eapol_common/am/include/eap_am_dh_primes.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_am_dh_primes.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7 %
+* %version: %
 */
 
 #if !defined(_EAP_AM_DH_PRIMES_H_)
--- a/eapol/eapol_framework/eapol_common/am/include/eap_am_export.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_am_export.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 6 %
+* %version: %
 */
 
 #if !defined( _EAP_EXPORT_H_ )
--- a/eapol/eapol_framework/eapol_common/am/include/eap_am_fast_pac_store_services.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_am_fast_pac_store_services.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 24 %
+* %version: %
 */
 
 #if !defined(_EAP_AM_FAST_PAC_STORE_SERVICES_H_)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_am_general_settings.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,81 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 7 %
+*/
+
+#if !defined(_EAP_AM_GENERAL_SETTINGS_H_)
+#define _EAP_AM_GENERAL_SETTINGS_H_
+
+#include "eap_tools.h"
+#include "eap_status.h"
+#include "eap_am_export.h"
+#include "eap_expanded_type.h"
+#include "eap_array.h"
+#include "eap_database_reference_if.h"
+
+class eap_method_settings_c;
+class abs_eap_am_general_settings_c;
+
+/** @file */
+
+/// This class is the common part of EAP message interface.
+/// This class is interface to the message creation and parsing function.
+class EAP_EXPORT eap_am_general_settings_c
+{
+
+private:
+
+	// ----------------------------------------------------------------------
+
+public:
+
+	virtual ~eap_am_general_settings_c()
+	{
+	}
+
+	virtual bool get_is_valid() = 0;
+
+	// This is documented in abs_eap_stack_interface_c::configure().
+	virtual eap_status_e configure() = 0;
+
+	// This is documented in abs_eap_stack_interface_c::shutdown().
+	virtual eap_status_e shutdown() = 0;
+
+	virtual eap_status_e get_eap_methods(const eap_method_settings_c * const internal_settings) = 0;
+
+	virtual eap_status_e set_eap_methods(const eap_method_settings_c * const internal_settings) = 0;
+
+	virtual eap_status_e get_certificate_lists(const eap_method_settings_c * const internal_settings) = 0;
+
+	virtual eap_status_e delete_all_eap_settings(const eap_method_settings_c * const internal_settings) = 0;
+
+	virtual eap_status_e copy_all_eap_settings(const eap_method_settings_c * const internal_settings) = 0;
+
+	// ----------------------------------------------------------------------
+};
+
+eap_am_general_settings_c * new_eap_am_general_settings_c(
+	abs_eap_am_tools_c * const tools,
+	abs_eap_am_general_settings_c * const partner);
+
+#endif //#if !defined(_EAP_AM_GENERAL_SETTINGS_H_)
+
+
+//--------------------------------------------------
+// End
--- a/eapol/eapol_framework/eapol_common/am/include/eap_am_memory.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_am_memory.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 6 %
+* %version: %
 */
 
 #if !defined(_EAP_MEMORY_H_)
--- a/eapol/eapol_framework/eapol_common/am/include/eap_am_memory_store.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_am_memory_store.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 13 %
+* %version: %
 */
 
 #if !defined( _EAP_AM_MEMORY_STORE_H_ )
--- a/eapol/eapol_framework/eapol_common/am/include/eap_am_memory_store_data.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_am_memory_store_data.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 5 %
+* %version: %
 */
 
 #if !defined( _EAP_AM_TOOLS_MEMORY_STORE_DATA_H_ )
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_am_message_if.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,93 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#if !defined(_EAP_AM_MESSAGE_IF_H_)
+#define _EAP_AM_MESSAGE_IF_H_
+
+#include "eap_tools.h"
+#include "eap_am_export.h"
+
+class abs_eap_general_settings_message_c;
+
+/** @file */
+
+/// This class is the common part of EAP message interface.
+/// This class is interface to the message creation and parsing function.
+class EAP_EXPORT eap_am_message_if_c
+{
+
+private:
+
+	// ----------------------------------------------------------------------
+
+public:
+
+	virtual ~eap_am_message_if_c()
+	{
+	}
+
+	virtual bool get_is_valid() = 0;
+
+	virtual void set_partner(abs_eap_am_message_if_c * const client) = 0;
+
+	/// Function receives the data message from lower layer.
+	/// Data is formatted to Attribute-Value Pairs.
+	/// Look at eap_tlv_header_c and eap_tlv_message_data_c.
+	virtual eap_status_e process_data(const void * const data, const u32_t length) = 0;
+
+	// This is documented in abs_eap_stack_interface_c::configure().
+	virtual eap_status_e configure(
+		const eap_variable_data_c * const client_configuration) = 0;
+
+	// This is documented in abs_eap_stack_interface_c::shutdown().
+	virtual eap_status_e shutdown() = 0;
+
+	static eap_am_message_if_c * new_eap_am_server_message_if_c(
+		abs_eap_am_tools_c * const tools,
+		const bool is_client_when_true,
+		const u32_t MTU);
+
+	static eap_am_message_if_c * new_eap_plugin_server_message_if_c(
+		abs_eap_am_tools_c * const tools);
+
+	static eap_am_message_if_c * new_eap_am_server_general_settings_c(
+		abs_eap_am_tools_c * const tools);
+
+	static eap_am_message_if_c * new_eap_general_settings_server_message_if_c(
+		abs_eap_am_tools_c * const tools);
+
+	static eap_am_message_if_c * new_eap_am_message_if_c(
+		abs_eap_am_tools_c * const tools);
+	
+	// ----------------------------------------------------------------------
+};
+
+EAP_FUNC_IMPORT eap_am_message_if_c * new_eap_am_client_message_if_c(
+	abs_eap_am_tools_c * const tools,
+	const bool is_client_when_true,
+	const u32_t MTU);
+
+
+#endif //#if !defined(_EAP_AM_MESSAGE_IF_H_)
+
+
+//--------------------------------------------------
+// End
--- a/eapol/eapol_framework/eapol_common/am/include/eap_am_network_id.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_am_network_id.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 4 %
+* %version: %
 */
 
 #if !defined(_EAP_NETWORK_ID_H_)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_am_pac_store.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,93 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#if !defined(_EAP_AM_PAC_STORE_H_)
+#define _EAP_AM_PAC_STORE_H_
+
+#include "eap_tools.h"
+#include "eap_status.h"
+#include "eap_am_export.h"
+#include "eap_expanded_type.h"
+#include "eap_array.h"
+#include "eap_database_reference_if.h"
+
+class eap_method_settings_c;
+class abs_eap_am_pac_store_c;
+
+/** @file */
+
+/// This class is the common part of EAP message interface.
+/// This class is interface to the message creation and parsing function.
+class EAP_EXPORT eap_am_pac_store_c
+{
+
+private:
+
+	// ----------------------------------------------------------------------
+
+public:
+
+	virtual ~eap_am_pac_store_c()
+	{
+	}
+
+	virtual bool get_is_valid() = 0;
+
+	// This is documented in abs_eap_stack_interface_c::configure().
+	virtual eap_status_e configure() = 0;
+
+	// This is documented in abs_eap_stack_interface_c::shutdown().
+	virtual eap_status_e shutdown() = 0;
+
+	virtual eap_status_e open_pac_store() = 0;
+
+	virtual eap_status_e create_device_seed() = 0;
+
+	virtual eap_status_e is_master_key_present() = 0;
+
+	virtual eap_status_e is_master_key_and_password_matching(
+		const eap_variable_data_c * const pac_store_password) = 0;
+
+	virtual eap_status_e create_and_save_master_key(
+		const eap_variable_data_c * const pac_store_password) = 0;
+
+	virtual eap_status_e compare_pac_store_password(
+		eap_variable_data_c * pac_store_password) = 0;
+
+	virtual eap_status_e is_pacstore_password_present() = 0;
+
+	virtual eap_status_e set_pac_store_password(
+		const eap_variable_data_c * pac_store_password) = 0;
+
+	virtual eap_status_e destroy_pac_store() = 0;
+
+	// ----------------------------------------------------------------------
+};
+
+eap_am_pac_store_c * new_eap_am_pac_store_c(
+	abs_eap_am_tools_c * const tools,
+	abs_eap_am_pac_store_c * const partner);
+
+#endif //#if !defined(_EAP_AM_PAC_STORE_H_)
+
+
+//--------------------------------------------------
+// End
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_am_plugin.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,85 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 7 %
+*/
+
+#if !defined(_EAP_AM_PLUGIN_H_)
+#define _EAP_AM_PLUGIN_H_
+
+#include "eap_tools.h"
+#include "eap_status.h"
+#include "eap_am_export.h"
+#include "eap_expanded_type.h"
+#include "eap_array.h"
+#include "eap_database_reference_if.h"
+
+class eap_method_settings_c;
+class abs_eap_am_plugin_c;
+
+/** @file */
+
+/// This class is the common part of EAP message interface.
+/// This class is interface to the message creation and parsing function.
+class EAP_EXPORT eap_am_plugin_c
+{
+
+private:
+
+	// ----------------------------------------------------------------------
+
+public:
+
+	virtual ~eap_am_plugin_c()
+	{
+	}
+
+	virtual bool get_is_valid() = 0;
+
+	// This is documented in abs_eap_stack_interface_c::configure().
+	virtual eap_status_e configure() = 0;
+
+	// This is documented in abs_eap_stack_interface_c::shutdown().
+	virtual eap_status_e shutdown() = 0;
+
+	virtual eap_status_e get_configuration(const eap_method_settings_c * const internal_settings) = 0;
+
+	virtual eap_status_e set_configuration(const eap_method_settings_c * const internal_settings) = 0;
+
+	virtual eap_status_e copy_configuration(const eap_method_settings_c * const internal_settings) = 0;
+
+	virtual eap_status_e delete_configuration(const eap_method_settings_c * const internal_settings) = 0;
+
+	virtual eap_status_e set_index(const eap_method_settings_c * const internal_settings) = 0;
+
+	virtual eap_status_e get_type_info(const eap_method_settings_c * const internal_settings) = 0;
+
+
+
+	// ----------------------------------------------------------------------
+};
+
+eap_am_plugin_c * new_eap_am_plugin_c(
+	abs_eap_am_tools_c * const tools,
+	abs_eap_am_plugin_c * const partner);
+
+#endif //#if !defined(_EAP_AM_PLUGIN_H_)
+
+
+//--------------------------------------------------
+// End
--- a/eapol/eapol_framework/eapol_common/am/include/eap_am_radius.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_am_radius.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11 %
+* %version: %
 */
 
 #if !defined(_EAP_AM_TYPE_RADIUS_H_)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_am_stack.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,120 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 11 %
+*/
+
+#if !defined(_EAP_AM_STACK_H_)
+#define _EAP_AM_STACK_H_
+
+#include "eap_tools.h"
+#include "eap_status.h"
+#include "eap_am_export.h"
+#include "eap_expanded_type.h"
+#include "eap_array.h"
+#include "eap_database_reference_if.h"
+#include "eapol_key_types.h"
+
+class abs_eap_am_message_if_c;
+class eap_configuration_field_c;
+class eap_variable_data_c;
+class abs_eap_am_tools_c;
+class abs_eap_base_type_c;
+class eap_base_type_c;
+class eap_am_network_id_c;
+class abs_eap_am_stack_c;
+class abs_eap_configuration_if_c;
+
+/** @file */
+
+/// This class is the common part of EAP message interface.
+/// This class is interface to the message creation and parsing function.
+class EAP_EXPORT eap_am_stack_c
+: public eap_database_reference_if_c 
+{
+
+private:
+
+	// ----------------------------------------------------------------------
+
+public:
+
+	virtual ~eap_am_stack_c()
+	{
+	}
+
+	virtual bool get_is_valid() = 0;
+
+	virtual eap_status_e set_partner(
+		abs_eap_am_stack_c * const partner
+#if defined(USE_EAP_SIMPLE_CONFIG)
+		, abs_eap_configuration_if_c * const configuration_if
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+		) = 0;
+
+	// This is documented in abs_eap_stack_interface_c::configure().
+	virtual eap_status_e configure(
+		const eap_variable_data_c * const client_configuration) = 0;
+
+	// This is documented in abs_eap_stack_interface_c::shutdown().
+	virtual eap_status_e shutdown() = 0;
+
+	virtual eap_status_e read_configure(
+		const eap_configuration_field_c * const field,
+		eap_variable_data_c * const data) = 0;
+
+	virtual eap_status_e set_timer(
+		abs_eap_base_timer_c * const p_initializer, 
+		const u32_t p_id, 
+		void * const p_data,
+		const u32_t p_time_ms) = 0;
+
+	virtual eap_status_e cancel_timer(
+		abs_eap_base_timer_c * const p_initializer, 
+		const u32_t p_id) = 0;
+
+	virtual eap_status_e check_is_valid_eap_type(
+		const eap_type_value_e eap_type) = 0;
+
+	virtual eap_status_e get_eap_type_list(
+		eap_array_c<eap_type_value_e> * const eap_type_list) = 0;
+
+	virtual eap_status_e load_module(
+		const eap_type_value_e type,
+		const eap_type_value_e tunneling_type,
+		abs_eap_base_type_c * const partner,
+		eap_base_type_c ** const eap_type,
+		const bool is_client_when_true,
+		const eap_am_network_id_c * const receive_network_id) = 0;
+
+	virtual eap_status_e get_802_11_authentication_mode(
+		const eap_am_network_id_c * const receive_network_id,
+		const eapol_key_authentication_type_e authentication_type) = 0;
+
+	// ----------------------------------------------------------------------
+};
+
+EAP_FUNC_IMPORT eap_am_stack_c * new_eap_am_stack_c(
+	abs_eap_am_tools_c * const tools,
+	const bool is_client_when_true);
+
+#endif //#if !defined(_EAP_AM_STACK_H_)
+
+
+//--------------------------------------------------
+// End
--- a/eapol/eapol_framework/eapol_common/am/include/eap_am_tools.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_am_tools.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 #if !defined( _EAP_AM_TOOLS_H_ )
--- a/eapol/eapol_framework/eapol_common/am/include/eap_am_trace.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_am_trace.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #error Not used any more.
--- a/eapol/eapol_framework/eapol_common/am/include/eap_am_type_aka.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_am_type_aka.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 13 %
+* %version: %
 */
 
 #if !defined(_EAP_AM_TYPE_AKA_H_)
--- a/eapol/eapol_framework/eapol_common/am/include/eap_am_type_gsmsim.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_am_type_gsmsim.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 5 %
+* %version: %
 */
 
 #if !defined(_EAP_AM_TYPE_GSMSIM_H_)
--- a/eapol/eapol_framework/eapol_common/am/include/eap_am_type_leap.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_am_type_leap.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: %
 */
 
 #ifndef EAP_AM_TYPE_LEAP_H
--- a/eapol/eapol_framework/eapol_common/am/include/eap_am_type_mschapv2.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_am_type_mschapv2.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: %
 */
 
 #ifndef _EAP_AM_TYPE_MSCHAPV2_H_
--- a/eapol/eapol_framework/eapol_common/am/include/eap_am_type_securid.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_am_type_securid.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 #ifndef EAP_AM_TYPE_SECURID_H
--- a/eapol/eapol_framework/eapol_common/am/include/eap_am_type_sim.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_am_type_sim.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 #if !defined(_EAP_AM_TYPE_SIM_H_)
--- a/eapol/eapol_framework/eapol_common/am/include/eap_am_type_simple_config.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_am_type_simple_config.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11 %
+* %version: %
 */
 
 #if !defined(_EAP_AM_TYPE_SIMPLE_CONFIG_H_)
--- a/eapol/eapol_framework/eapol_common/am/include/eap_am_type_tls_peap.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_am_type_tls_peap.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 16 %
+* %version: %
 */
 
 #if !defined(_EAP_AM_TYPE_TLS_PEAP_H_)
--- a/eapol/eapol_framework/eapol_common/am/include/eap_am_types.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_am_types.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 5.1.2 %
+* %version: %
 */
 
 /** @file */
@@ -126,7 +126,7 @@
 	 * This defines const reserved word for template types.
 	 * This is because the stupid Windows compiler cannot compile "const template_type<Type> * const".
 	 */
-	#define EAP_TEMPLATE_CONST
+	#define EAP_TEMPLATE_CONST const
 
 #endif
 
--- a/eapol/eapol_framework/eapol_common/am/include/eap_am_wimax_authentication.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_am_wimax_authentication.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 2.1.2 %
+* %version: %
 */
 
 #if !defined(_EAP_AM_WIMAX_AUTHENTICATION_H_)
@@ -33,7 +33,6 @@
 class eap_base_type_c;
 class eap_am_network_id_c;
 class eap_type_selection_c;
-class abs_eapol_wlan_database_reference_if_c;
 class abs_eap_state_notification_c;
 
 /// This is interface to adaptation module of class eap_wimax_authentication_c.
@@ -55,8 +54,7 @@
 
 	EAP_FUNC_IMPORT static eap_am_wimax_authentication_c* new_eap_am_wimax_authentication(
 		abs_eap_am_tools_c * const tools,
-		const bool is_client_when_true,
-		const abs_eapol_wlan_database_reference_if_c * const wimax_database_reference
+		const bool is_client_when_true
 		);
 
 	/// This is documented in abs_eap_stack_interface_c::get_is_valid().
--- a/eapol/eapol_framework/eapol_common/am/include/eap_file_config.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_file_config.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11.1.2 %
+* %version: %
 */
 
 #ifndef _FILECONFIG_H
@@ -26,6 +26,8 @@
 #include "eap_configuration_field.h"
 #include "abs_eap_am_file_input.h"
 
+class eap_tlv_header_c;
+
 
 template <class Type>
 Type minimum( Type a, Type b )
@@ -34,7 +36,7 @@
 }
 
 
-class eap_config_value_c
+class EAP_EXPORT eap_config_value_c
 {
 private:
 
@@ -50,25 +52,29 @@
 
 public:
 
-	virtual ~eap_config_value_c();
+	EAP_FUNC_IMPORT virtual ~eap_config_value_c();
 
-	eap_config_value_c(
+	EAP_FUNC_IMPORT eap_config_value_c(
 		abs_eap_am_tools_c* const tools);
 
-	void set_subsection(
+	EAP_FUNC_IMPORT void set_subsection(
 		eap_core_map_c<eap_config_value_c, abs_eap_core_map_c, eap_variable_data_c> * const subsection_map);
 
-	eap_core_map_c<eap_config_value_c, abs_eap_core_map_c, eap_variable_data_c> * get_subsection();
+	EAP_FUNC_IMPORT eap_core_map_c<eap_config_value_c, abs_eap_core_map_c, eap_variable_data_c> * get_subsection();
+
+	EAP_FUNC_IMPORT eap_variable_data_c * get_data();
 
-	eap_variable_data_c * get_data();
+	EAP_FUNC_IMPORT const eap_variable_data_c * get_const_data() const;
 
-	void set_type(const eap_configure_type_e type);
+	EAP_FUNC_IMPORT void set_type(const eap_configure_type_e type);
 
-	eap_configure_type_e get_type();
+	EAP_FUNC_IMPORT eap_configure_type_e get_type();
+
+	EAP_FUNC_IMPORT eap_configure_type_e get_const_type() const;
 
-	void object_increase_reference_count();
+	EAP_FUNC_IMPORT void object_increase_reference_count();
 
-	bool get_is_valid();
+	EAP_FUNC_IMPORT bool get_is_valid() const;
 
 };
 
@@ -220,6 +226,14 @@
 		eap_core_map_c<eap_config_value_c, abs_eap_core_map_c, eap_variable_data_c> * const config_map,
 		const bool check_subsection_when_true);
 
+	eap_status_e read_all_configurations(
+		const eap_configuration_field_c * const field,
+		eap_variable_data_c* const data,
+		eap_core_map_c<eap_config_value_c, abs_eap_core_map_c, eap_variable_data_c> * const config_map);
+
+	eap_status_e add_option(
+		const eap_tlv_header_c * const option_header);
+
  public:
 
 	EAP_FUNC_IMPORT eap_file_config_c(
@@ -230,6 +244,9 @@
 	EAP_FUNC_IMPORT eap_status_e configure(
 		abs_eap_am_file_input_c * const file);
 
+	EAP_FUNC_IMPORT eap_status_e read_configuration_message(
+		const eap_variable_data_c * const configuration_message);
+
 	EAP_FUNC_IMPORT eap_status_e read_configure(
 		const eap_configuration_field_c * const field,
 		eap_variable_data_c* const data);
--- a/eapol/eapol_framework/eapol_common/am/include/eap_sim_triplets.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/eap_sim_triplets.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 4 %
+* %version: %
 */
 
 #if !defined(_EAP_SIM_TRIPLETS_H_)
--- a/eapol/eapol_framework/eapol_common/am/include/eapol_am_wlan_authentication.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/eapol_am_wlan_authentication.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 2.1.2 %
+* %version: %
 */
 
 #if !defined(_EAPOL_AM_WLAN_AUTHENTICATION_H_)
@@ -34,8 +34,8 @@
 class eap_base_type_c;
 class eap_am_network_id_c;
 class eap_type_selection_c;
-class abs_eapol_wlan_database_reference_if_c;
 class abs_eap_state_notification_c;
+#include "eap_database_reference_if.h"
 
 #if defined(USE_EAP_SIMPLE_CONFIG)
 class abs_eap_configuration_if_c;
@@ -44,6 +44,7 @@
 
 /// This is interface to adaptation module of class eapol_wlan_authentication_c.
 class EAP_EXPORT eapol_am_wlan_authentication_c
+: public eap_database_reference_if_c
 {
 private:
 	//--------------------------------------------------
@@ -64,8 +65,7 @@
 	/// @param wlan_database_reference: third parameter is pointer to interface to read the current database reference.
 	EAP_FUNC_IMPORT static eapol_am_wlan_authentication_c * new_eapol_am_wlan_authentication(
 		abs_eap_am_tools_c * const tools,
-		const bool is_client_when_true,
-		const abs_eapol_wlan_database_reference_if_c * const wlan_database_reference
+		const bool is_client_when_true
 		);
 
 	/// This is documented in abs_eap_stack_interface_c::get_is_valid().
@@ -85,8 +85,8 @@
 #endif // #if defined(USE_EAP_SIMPLE_CONFIG)
 		) = 0;
 
-	/// Function resets current EAP-configuration.
-	virtual eap_status_e reset_eap_configuration() = 0;
+	/// Function resets current WPA-configuration.
+	virtual eap_status_e reset_wpa_configuration() = 0;
 
 	/// Function sets the new WLAN parameters.
 	virtual eap_status_e set_wlan_parameters(
@@ -105,13 +105,6 @@
 		const eap_am_network_id_c * const receive_network_id ///< source includes remote address, destination includes local address.
 		) = 0;
 
-	/**
-	 * This function queries the selected and active EAP-types that can be used
-	 * in current connection.
-	 */
-	virtual eap_status_e get_selected_eap_types(
-		eap_array_c<eap_type_selection_c> * const selected_eap_types) = 0;
-
 	/// Function gets the current WLAN configuration, now only the HASH of the WPA(2)-PSK.
 	virtual eap_status_e get_wlan_configuration(
 		eap_variable_data_c * const wpa_preshared_key_hash) = 0;
@@ -128,36 +121,6 @@
 		const eapol_key_authentication_type_e authentication_type) = 0;
 
 	/**
-	 * The load_module() function function indicates the lower level to
-	 * load new module of EAP-type.
-	 * @param type is the requested EAP-type.
-	 * @param tunneling_type is the EAP-type that tunnels the type. When plain EAP-type is used this parameter is eap_type_none.
-	 * @param partner is pointer to the caller object.
-	 * The partner of the new created EAP-type object is the caller object.
-	 * @param eap_type is a pointer to a pointer of EAP-type object.
-	 * Adaptation module sets eap_type pointer to created EAP-type object.
-	 * @param is_client_when_true parameter indicates whether the network entity should
-	 * act as a client (true) or server (false), in terms of EAP-protocol whether
-	 * this network entity is EAP-supplicant (true) or EAP-authenticator (false).
-	 * @param receive_network_id includes the addresses (network identity) and packet type.
-	 */
-	virtual eap_status_e load_module(
-		const eap_type_value_e type,
-		const eap_type_value_e tunneling_type,
-		abs_eap_base_type_c * const partner,
-		eap_base_type_c ** const eap_type,
-		const bool is_client_when_true,
-		const eap_am_network_id_c * const receive_network_id ///< source includes remote address, destination includes local address.
-		) = 0;
-
-	/**
-	 * The unload_module() function unloads the module of a EAP-type. 
-	 * @param eap_type is the requested EAP-type.
-	 */
-	virtual eap_status_e unload_module(
-		const eap_type_value_e type) = 0;
-
-	/**
 	 * The read_configure() function reads the configuration data identified
 	 * by the field string of field_length bytes length. Adaptation module must direct
 	 * the query to some persistent store.
@@ -217,21 +180,6 @@
 	virtual eap_status_e cancel_all_timers() = 0;
 
 	/**
-	 * This function queries the validity of EAP-type.
-	 * Lower layer should return eap_status_ok if this EAP-type is supported.
-	 */
-	virtual eap_status_e check_is_valid_eap_type(const eap_type_value_e eap_type) = 0;
-
-	/**
-	 * This function queries the list of supported EAP-types.
-	 * Lower layer should return eap_status_ok if this call succeeds.
-	 * @param eap_type_list will include the list of supported EAP-types. Each value in list
-	 * is type of u32_t and represent one supported EAP-type. List consists of subsequent u32_t type values.
-	 */
-	virtual eap_status_e get_eap_type_list(
-		eap_array_c<eap_type_value_e> * const eap_type_list) = 0;
-
-	/**
 	 * This is notification of internal state transition.
 	 * This is used for notifications, debugging and protocol testing.
 	 * The primal notifications are eap_state_variable_e::eap_state_authentication_finished_successfully
--- a/eapol/eapol_framework/eapol_common/am/include/ms_mppe_keys.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/ms_mppe_keys.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7 %
+* %version: %
 */
 
 #if !defined(_MS_MPPE_KEYS_H_)
--- a/eapol/eapol_framework/eapol_common/am/include/ms_mppe_send_recv_key.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/ms_mppe_send_recv_key.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7 %
+* %version: %
 */
 
 #if !defined(_MS_MPPE_SEND_RECV_KEY_H_)
--- a/eapol/eapol_framework/eapol_common/am/include/simple_config_am_services.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/simple_config_am_services.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 25 %
+* %version: %
 */
 
 #if !defined(_SIMPLE_CONFIG_AM_SERVICES_H_)
@@ -52,10 +52,11 @@
 public:
 	//--------------------------------------------------
 
+	/* The destructor does nothing */
 	virtual ~simple_config_am_services_c()
 	{
 	}
-
+	
 	/**
 	 * Object must indicate it's validity.
 	 * If object initialization fails this function must return false.
--- a/eapol/eapol_framework/eapol_common/am/include/tls_am_application_eap_fast.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/tls_am_application_eap_fast.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 29 %
+* %version: %
 */
 
 #if !defined(_TLS_AM_APPLICATION_EAP_FAST_H_)
--- a/eapol/eapol_framework/eapol_common/am/include/tls_am_services.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/include/tls_am_services.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 25 %
+* %version: %
 */
 
 #if !defined(_TLS_AM_SERVICES_H_)
--- a/eapol/eapol_framework/eapol_common/am/type/tls_peap/tls_am_services.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/am/type/tls_peap/tls_am_services.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/common/asn1_der_type.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/common/asn1_der_type.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 34 %
+* %version: %
 */
 
 #include "asn1_der_type.h"
@@ -674,7 +674,7 @@
 				"%02x \0",
 				oid_octet);
 
-			u8_t oid = oid_octet & (~OID_HIGH_BIT);
+			u8_t oid = static_cast<u8_t>(oid_octet & (~OID_HIGH_BIT));
 
 			if (ind > offset)
 			{
@@ -926,7 +926,7 @@
 		{
 			if ((extented_tag[0] & static_cast<u8_t>(asn1_high_bit_mask_tag)) == 0)
 			{
-				return (extented_tag - m_input_data);
+				return static_cast<u16_t>(extented_tag - m_input_data);
 			}
 
 			++extented_tag;
@@ -957,7 +957,7 @@
 	if ((length_octet1 & static_cast<u8_t>(asn1_high_bit_mask_tag)) == 0)
 	{
 		// Short Length field.
-		return m_offset_of_length_field + asn1_identifier_const_short_length_size;
+		return static_cast<u16_t>(m_offset_of_length_field + asn1_identifier_const_short_length_size);
 	}
 	else if (m_input_data_length > static_cast<u32_t>(m_offset_of_length_field + asn1_identifier_const_short_length_size))
 	{
@@ -1636,7 +1636,7 @@
 			status = sub_type->initialize(
 				current_type->get_unused_data_length(),
 				current_type->get_unused_data(),
-				current_type->get_recursion() + 1u,
+				static_cast<u16_t>(current_type->get_recursion() + 1u),
 				current_type->get_count_of_sub_types(),
 				debug_buffer);
 			if (status != eap_status_ok)
--- a/eapol/eapol_framework/eapol_common/common/eap_base_type.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/common/eap_base_type.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/common/eap_buffer.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/common/eap_buffer.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11.1.5 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/common/eap_crypto_api.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/common/eap_crypto_api.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 36 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -582,7 +582,7 @@
 
 		for (u32_t ind = 0u; ind < block_size/sizeof(u64_t); ind++)
 		{
-			pdata[ind] ^= pIV[ind];
+			pdata[ind] = static_cast<u64_t>(pdata[ind] ^ pIV[ind]);
 		}
 	}
 	else
@@ -595,7 +595,7 @@
 
 		for (u32_t ind = 0u; ind < block_size/sizeof(u32_t); ind++)
 		{
-			pdata[ind] ^= pIV[ind];
+			pdata[ind] = static_cast<u32_t>(pdata[ind] ^ pIV[ind]);
 		}
 	}
 	else if ((reinterpret_cast<u32_t>(cipher_IV) % sizeof(u16_t)) == 0
@@ -606,7 +606,7 @@
 
 		for (u32_t ind = 0u; ind < block_size/sizeof(u16_t); ind++)
 		{
-			pdata[ind] ^= pIV[ind];
+			pdata[ind] = static_cast<u16_t>(pdata[ind] ^ pIV[ind]);
 		}
 	}
 	else
@@ -616,7 +616,7 @@
 
 		for (u32_t ind = 0u; ind < block_size/sizeof(u8_t); ind++)
 		{
-			pdata[ind] ^= pIV[ind];
+			pdata[ind] = static_cast<u8_t>(pdata[ind] ^ pIV[ind]);
 		}
 	}
 }
@@ -5293,7 +5293,7 @@
 
 		for (j_ind = 0; j_ind < digest_length; j_ind++)
 		{
-			p_output[j_ind] ^= p_digest[j_ind];
+			p_output[j_ind] = static_cast<u8_t>(p_output[j_ind] ^ p_digest[j_ind]);
 		}
 	} // for()
 
--- a/eapol/eapol_framework/eapol_common/common/eap_expanded_type.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/common/eap_expanded_type.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12.1.2 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -67,6 +67,38 @@
 
 //--------------------------------------------------
 
+EAP_FUNC_EXPORT bool eap_expanded_type_c::get_is_valid() const
+{
+	return true;
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT bool eap_expanded_type_c::get_is_valid_data() const
+{
+	return get_is_valid();
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_expanded_type_c * eap_expanded_type_c::copy() const
+{
+	eap_expanded_type_c * const new_entry = new eap_expanded_type_c;
+
+	if (new_entry == 0
+		|| new_entry->get_is_valid() == false)
+	{
+		delete new_entry;
+		return 0;
+	}
+
+	new_entry->set_eap_type_values(m_vendor_id, m_vendor_type);
+
+	return new_entry;
+}
+
+//--------------------------------------------------
+
 EAP_FUNC_EXPORT bool eap_expanded_type_c::is_expanded_type(const eap_type_ietf_values_e eap_type)
 {
 	return (eap_type == eap_type_expanded_type);
@@ -74,26 +106,17 @@
 
 //--------------------------------------------------
 
-#if defined(USE_EAP_EXPANDED_TYPES)
 EAP_FUNC_EXPORT bool eap_expanded_type_c::is_ietf_type(const eap_expanded_type_c eap_type)
 {
 	return (eap_type.get_vendor_id() == eap_type_vendor_id_ietf
 			&& eap_type.get_vendor_type() < eap_type_expanded_type);
 }
 
-#else
-EAP_FUNC_EXPORT bool eap_expanded_type_c::is_ietf_type(const eap_type_ietf_values_e eap_type)
-{
-	return (eap_type < eap_type_expanded_type);
-}
-
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
-
 //--------------------------------------------------
 
 EAP_FUNC_EXPORT eap_status_e eap_expanded_type_c::get_type_data(
 	abs_eap_am_tools_c * const am_tools,
-	eap_type_ietf_values_e * const type)
+	eap_type_ietf_values_e * const type) const
 {
 	if (type == 0)
 	{
@@ -120,7 +143,7 @@
 
 EAP_FUNC_EXPORT eap_status_e eap_expanded_type_c::get_type_data(
 	abs_eap_am_tools_c * const am_tools,
-	eap_expanded_type_c * const type)
+	eap_expanded_type_c * const type) const
 {
 	if (type == 0)
 	{
@@ -137,9 +160,10 @@
 
 EAP_FUNC_EXPORT eap_status_e eap_expanded_type_c::get_expanded_type_data(
 	abs_eap_am_tools_c * const am_tools,
-	eap_variable_data_c * const data)
+	eap_variable_data_c * const data) const
 {
-	if (data == 0)
+	if (data == 0
+		|| data->get_is_valid() == false)
 	{
 		EAP_UNREFERENCED_PARAMETER(am_tools);
 		return EAP_STATUS_RETURN(am_tools, eap_status_illegal_parameter);
@@ -221,7 +245,8 @@
 	abs_eap_am_tools_c * const am_tools,
 	const eap_variable_data_c * const data)
 {
-	if (data->get_data_length() != get_eap_expanded_type_size()
+	if (data == 0
+		|| data->get_data_length() != get_eap_expanded_type_size()
 		|| data->get_data(data->get_data_length()) == 0)
 	{
 		EAP_UNREFERENCED_PARAMETER(am_tools);
@@ -271,6 +296,61 @@
 
 //--------------------------------------------------
 
+EAP_FUNC_EXPORT eap_status_e eap_expanded_type_c::set_expanded_type_data(
+	abs_eap_am_tools_c * const am_tools,
+	const void * const data,
+	const u32_t data_length)
+{
+	if (data_length != get_eap_expanded_type_size()
+		|| data == 0)
+	{
+		EAP_UNREFERENCED_PARAMETER(am_tools);
+		return EAP_STATUS_RETURN(am_tools, eap_status_illegal_parameter);
+	}
+
+	u32_t offset = 0ul;
+
+	{
+		const u8_t * const ietf_type = &(reinterpret_cast<const u8_t *>(data)[offset]);
+		if (ietf_type == 0)
+		{
+			return EAP_STATUS_RETURN(am_tools, eap_status_illegal_parameter);
+		}
+		offset += m_ietf_type_size;
+
+		if (static_cast<eap_type_ietf_values_e>(*ietf_type) != eap_type_expanded_type)
+		{
+			return EAP_STATUS_RETURN(am_tools, eap_status_illegal_parameter);
+		}
+	}
+
+	{
+		const u8_t * const vendor_id = &(reinterpret_cast<const u8_t *>(data)[offset]);
+		if (vendor_id == 0)
+		{
+			return EAP_STATUS_RETURN(am_tools, eap_status_illegal_parameter);
+		}
+		offset += m_vendor_id_size;
+
+		m_vendor_id = static_cast<eap_type_vendor_id_e>(eap_read_u24_t_network_order(vendor_id, m_vendor_id_size));
+	}
+
+	{
+		const u8_t * const vendor_type = &(reinterpret_cast<const u8_t *>(data)[offset]);
+		if (vendor_type == 0)
+		{
+			return EAP_STATUS_RETURN(am_tools, eap_status_illegal_parameter);
+		}
+		offset += m_vendor_type_size;
+
+		m_vendor_type = eap_read_u32_t_network_order(vendor_type, m_vendor_type_size);
+	}
+
+	return EAP_STATUS_RETURN(am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
 EAP_FUNC_EXPORT void eap_expanded_type_c::set_eap_type_values(
 	const eap_type_vendor_id_e vendor_id,
 	const u32_t vendor_type)
@@ -391,11 +471,7 @@
 	const u32_t index,
 	const void * const p_buffer,
 	const u32_t buffer_length,
-#if defined(USE_EAP_EXPANDED_TYPES)
 	eap_expanded_type_c * const type
-#else
-	eap_type_ietf_values_e * const type
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
 	)
 {
 	if (p_buffer == 0)
@@ -499,22 +575,11 @@
 						sizeof(u32_t));
 				}
 
-#if defined(USE_EAP_EXPANDED_TYPES)
 				type->set_eap_type_values(
 					vendor_id_value,
 					vendor_type_value);
 
 				EAP_ASSERT_TOOLS(am_tools, (ietf_eap_type == eap_type_expanded_type));
-#else
-				if (vendor_id_value == eap_type_vendor_id_ietf)
-				{
-					*type = static_cast<eap_type_value_e>(vendor_type_value); // Type field follows eap_header_c.
-				}
-				else
-				{
-					*type = ietf_eap_type; // Type field follows eap_header_c.
-				}
-#endif
 
 				return EAP_STATUS_RETURN(am_tools, eap_status_ok);
 			}
@@ -543,11 +608,7 @@
 	void * const p_buffer,
 	const u32_t buffer_length,
 	const bool write_extented_type_when_true,
-#if defined(USE_EAP_EXPANDED_TYPES)
 	const eap_expanded_type_c p_type ///< The EAP type to be written.
-#else
-	const eap_type_ietf_values_e p_type ///< The EAP type to be written.
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
 	)
 {
 	if (p_buffer == 0)
@@ -558,8 +619,6 @@
 
 	u8_t * const buffer = static_cast<u8_t *>(p_buffer);
 
-#if defined(USE_EAP_EXPANDED_TYPES)
-
 	if (write_extented_type_when_true == false
 		&& is_ietf_type(p_type) == true
 		&& buffer_length >= eap_expanded_type_c::m_ietf_type_size*(index+1ul))
@@ -632,34 +691,11 @@
 		return EAP_STATUS_RETURN(am_tools, eap_status_allocation_error);
 	}
 
-#else
-
-	EAP_UNREFERENCED_PARAMETER(write_extented_type_when_true); // Only Expanded Type version uses this.
-
-	if (buffer_length >= eap_expanded_type_c::m_ietf_type_size*(index+1ul))
-	{
-		u8_t * const type_data =
-			&(buffer[eap_expanded_type_c::m_ietf_type_size*index]);
-		if (type_data == 0)
-		{
-			return EAP_STATUS_RETURN(am_tools, eap_status_allocation_error);
-		}
-		*type_data = static_cast<u8_t>(p_type);
-	}
-	else
-	{
-		return EAP_STATUS_RETURN(am_tools, eap_status_allocation_error);
-	}
-
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
-
 	return EAP_STATUS_RETURN(am_tools, eap_status_ok);
 }
 
 //--------------------------------------------------
 
-#if defined(USE_EAP_EXPANDED_TYPES)
-
 EAP_FUNC_EXPORT i32_t eap_expanded_type_c::compare(const eap_expanded_type_c * const data) const
 {
 	if (*this == *data)
@@ -683,8 +719,6 @@
 	}
 }
 
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
-
 //--------------------------------------------------
 //--------------------------------------------------
 //--------------------------------------------------
@@ -698,8 +732,6 @@
 //--------------------------------------------------
 //--------------------------------------------------
 
-#if defined(USE_EAP_EXPANDED_TYPES)
-
 EAP_C_FUNC_EXPORT u32_t convert_eap_type_to_u32_t(eap_type_value_e type)
 {
 	// NOTE, this returns only 8 least significant bits of vendor type.
@@ -713,20 +745,6 @@
 		| static_cast<u64_t>(type.get_vendor_type());
 }
 
-#else
-
-EAP_C_FUNC_EXPORT u32_t convert_eap_type_to_u32_t(eap_type_value_e type)
-{
-	return static_cast<u32_t>(type);
-}
-
-EAP_C_FUNC_EXPORT u64_t convert_eap_type_to_u64_t(eap_type_value_e type)
-{
-	return static_cast<u64_t>(type);
-}
-
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
-
 //--------------------------------------------------
 //--------------------------------------------------
 //--------------------------------------------------
--- a/eapol/eapol_framework/eapol_common/common/eap_general_header_base.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/common/eap_general_header_base.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 13 %
+* %version: 11.1.2 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -53,7 +53,6 @@
 	, m_error_detected(true)
 #endif //#if defined(USE_EAP_ERROR_TESTS)
 {
-	EAP_ASSERT((m_header_buffer != 0 && m_header_buffer_length > 0ul) || (m_header_buffer == 0 && m_header_buffer_length == 0ul));
 }
 
 EAP_FUNC_EXPORT void eap_general_header_base_c::set_header_buffer(u8_t * const header_buffer, const u32_t header_buffer_length)
@@ -64,8 +63,6 @@
 
 EAP_FUNC_EXPORT u8_t * eap_general_header_base_c::get_header_buffer(const u32_t data_length) const
 {
-	EAP_ASSERT(m_header_buffer != 0 && m_header_buffer_length > 0ul && m_header_buffer_length >= data_length);
-
 	if (m_header_buffer_length >= data_length)
 	{
 		return m_header_buffer;
--- a/eapol/eapol_framework/eapol_common/common/eap_handle.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/common/eap_handle.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/common/eap_header.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/common/eap_header.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 20 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/common/eap_header_string.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/common/eap_header_string.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -83,9 +83,7 @@
 	else EAP_IF_RETURN_STRING(type, eap_type_fast)
 #endif //#if defined(USE_FAST_EAP_TYPE)
 	else EAP_IF_RETURN_STRING(type, eap_type_saesim)
-#if defined(USE_EAP_EXPANDED_TYPES)
 	else EAP_IF_RETURN_STRING(type, eap_expanded_type_simple_config.get_type())
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
 	else
 #endif // #if defined(USE_EAP_TRACE_STRINGS)
 	{
--- a/eapol/eapol_framework/eapol_common/common/eap_master_session_key.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/common/eap_master_session_key.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/common/eap_memory_store_variable_data.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/common/eap_memory_store_variable_data.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/common/eap_method_settings.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,1228 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP-settings class.
+*
+*/
+
+/*
+* %version: 23 %
+*/
+
+#include "eap_am_tools.h"
+#include "eap_am_export.h"
+#include "eap_method_settings.h"
+#include "eap_array_algorithms.h"
+#include "eap_automatic_variable.h"
+
+//-------------------------------------------------------------------------------
+
+eap_certificate_entry_c::~eap_certificate_entry_c()
+{
+}
+
+//-------------------------------------------------------------------------------
+
+eap_certificate_entry_c::eap_certificate_entry_c(
+	abs_eap_am_tools_c * const tools)
+: m_am_tools(tools)
+, m_CertType(eap_certificate_type_none)
+, m_SubjectNamePresent(false)
+, m_SubjectName(tools)
+, m_IssuerNamePresent(false)
+, m_IssuerName(tools)
+, m_SerialNumberPresent(false)
+, m_SerialNumber(tools)
+, m_SubjectKeyIDPresent(false)
+, m_SubjectKeyID(tools)
+, m_ThumbprintPresent(false)
+, m_Thumbprint(tools)
+, m_LabelPresent(false)
+, m_Label(tools)
+, m_PrimaryNamePresent(false)
+, m_PrimaryName(tools)
+, m_SecondaryNamePresent(false)
+, m_SecondaryName(tools)
+, m_iIsEnabledPresent(false)
+, m_iIsEnabled(false)
+{
+}
+
+//-------------------------------------------------------------------------------
+
+bool eap_certificate_entry_c::get_is_valid()
+{
+	return true;
+}
+
+//-------------------------------------------------------------------------------
+
+bool eap_certificate_entry_c::get_is_valid_data()
+{
+	return get_is_valid();
+}
+
+//-------------------------------------------------------------------------------
+
+eap_certificate_entry_c * eap_certificate_entry_c::copy()
+{
+	eap_certificate_entry_c * const new_entry = new eap_certificate_entry_c(m_am_tools);
+
+	eap_automatic_variable_c<eap_certificate_entry_c> automatic_new_entry(
+		m_am_tools,
+		new_entry);
+
+	if (new_entry == 0
+		|| new_entry->get_is_valid() == false)
+	{
+		(void) EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		return 0;
+	}
+
+	eap_status_e status(eap_status_ok);
+
+	new_entry->m_CertType = m_CertType;
+
+	new_entry->m_SubjectNamePresent = m_SubjectNamePresent;
+	if (m_SubjectNamePresent == true)
+	{
+		status = new_entry->m_SubjectName.set_copy_of_buffer(&m_SubjectName);
+		if (status != eap_status_ok)
+		{
+			(void) EAP_STATUS_RETURN(m_am_tools, status);
+			return 0;
+		}
+	}
+
+	new_entry->m_IssuerNamePresent = m_IssuerNamePresent;
+	if (m_IssuerNamePresent == true)
+	{
+		status = new_entry->m_IssuerName.set_copy_of_buffer(&m_IssuerName);
+		if (status != eap_status_ok)
+		{
+			(void) EAP_STATUS_RETURN(m_am_tools, status);
+			return 0;
+		}
+	}
+
+	new_entry->m_SerialNumberPresent = m_SerialNumberPresent;
+	if (m_SerialNumberPresent == true)
+	{
+		status = new_entry->m_SerialNumber.set_copy_of_buffer(&m_SerialNumber);
+		if (status != eap_status_ok)
+		{
+			(void) EAP_STATUS_RETURN(m_am_tools, status);
+			return 0;
+		}
+	}
+
+	new_entry->m_SubjectKeyIDPresent = m_SubjectKeyIDPresent;
+	if (m_SubjectKeyIDPresent == true)
+	{
+		status = new_entry->m_SubjectKeyID.set_copy_of_buffer(&m_SubjectKeyID);
+		if (status != eap_status_ok)
+		{
+			(void) EAP_STATUS_RETURN(m_am_tools, status);
+			return 0;
+		}
+	}
+
+	new_entry->m_ThumbprintPresent = m_ThumbprintPresent;
+	if (m_ThumbprintPresent == true)
+	{
+		status = new_entry->m_Thumbprint.set_copy_of_buffer(&m_Thumbprint);
+		if (status != eap_status_ok)
+		{
+			(void) EAP_STATUS_RETURN(m_am_tools, status);
+			return 0;
+		}
+	}
+
+	new_entry->m_LabelPresent = m_LabelPresent;
+	if (m_LabelPresent == true)
+	{
+		status = new_entry->m_Label.set_copy_of_buffer(&m_Label);
+		if (status != eap_status_ok)
+		{
+			(void) EAP_STATUS_RETURN(m_am_tools, status);
+			return 0;
+		}
+	}
+
+	new_entry->m_PrimaryNamePresent = m_PrimaryNamePresent;
+	if (m_PrimaryNamePresent == true)
+	{
+		status = new_entry->m_PrimaryName.set_copy_of_buffer(&m_PrimaryName);
+		if (status != eap_status_ok)
+		{
+			(void) EAP_STATUS_RETURN(m_am_tools, status);
+			return 0;
+		}
+	}
+
+	new_entry->m_SecondaryNamePresent = m_SecondaryNamePresent;
+	if (m_SecondaryNamePresent == true)
+	{
+		status = new_entry->m_SecondaryName.set_copy_of_buffer(&m_SecondaryName);
+		if (status != eap_status_ok)
+		{
+			(void) EAP_STATUS_RETURN(m_am_tools, status);
+			return 0;
+		}
+	}
+
+	new_entry->m_iIsEnabledPresent = m_iIsEnabledPresent;
+	new_entry->m_iIsEnabled = m_iIsEnabled;
+
+	automatic_new_entry.do_not_free_variable();
+
+	return new_entry;
+}
+
+//-------------------------------------------------------------------------------
+
+void eap_certificate_entry_c::trace() const
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_certificate_entry_c::trace(): m_CertType=%d\n"),
+		m_CertType));
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_certificate_entry_c::trace(): m_SubjectNamePresent=%d\n"),
+		m_SubjectNamePresent));
+	if (m_SubjectNamePresent == true)
+	{
+		EAP_TRACE_DATA_DEBUG(
+			m_am_tools, 
+			TRACE_FLAGS_DEFAULT, 
+			(EAPL("eap_certificate_entry_c::trace():     m_SubjectName"),
+			m_SubjectName.get_data(),
+			m_SubjectName.get_data_length()));
+	}
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_certificate_entry_c::trace(): m_IssuerNamePresent=%d\n"),
+		m_IssuerNamePresent));
+	if (m_IssuerNamePresent == true)
+	{
+		EAP_TRACE_DATA_DEBUG(
+			m_am_tools, 
+			TRACE_FLAGS_DEFAULT, 
+			(EAPL("eap_certificate_entry_c::trace():     m_IssuerName"),
+			m_IssuerName.get_data(),
+			m_IssuerName.get_data_length()));
+	}
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_certificate_entry_c::trace(): m_SerialNumberPresent=%d\n"),
+		m_SerialNumberPresent));
+	if (m_SerialNumberPresent == true)
+	{
+		EAP_TRACE_DATA_DEBUG(
+			m_am_tools, 
+			TRACE_FLAGS_DEFAULT, 
+			(EAPL("eap_certificate_entry_c::trace():     m_SerialNumber"),
+			m_SerialNumber.get_data(),
+			m_SerialNumber.get_data_length()));
+	}
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_certificate_entry_c::trace(): m_SubjectKeyIDPresent=%d\n"),
+		m_SubjectKeyIDPresent));
+	if (m_SubjectKeyIDPresent == true)
+	{
+		EAP_TRACE_DATA_DEBUG(
+			m_am_tools, 
+			TRACE_FLAGS_DEFAULT, 
+			(EAPL("eap_certificate_entry_c::trace():     m_SubjectKeyID"),
+			m_SubjectKeyID.get_data(),
+			m_SubjectKeyID.get_data_length()));
+	}
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_certificate_entry_c::trace(): m_ThumbprintPresent=%d\n"),
+		m_ThumbprintPresent));
+	if (m_ThumbprintPresent == true)
+	{
+		EAP_TRACE_DATA_DEBUG(
+			m_am_tools, 
+			TRACE_FLAGS_DEFAULT, 
+			(EAPL("eap_certificate_entry_c::trace():     m_Thumbprint"),
+			m_Thumbprint.get_data(),
+			m_Thumbprint.get_data_length()));
+	}
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_certificate_entry_c::trace(): m_LabelPresent=%d\n"),
+		m_LabelPresent));
+	if (m_LabelPresent == true)
+	{
+		EAP_TRACE_DATA_DEBUG(
+			m_am_tools, 
+			TRACE_FLAGS_DEFAULT, 
+			(EAPL("eap_certificate_entry_c::trace():     m_Label"),
+			m_Label.get_data(),
+			m_Label.get_data_length()));
+	}
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_certificate_entry_c::trace(): m_PrimaryNamePresent=%d\n"),
+		m_PrimaryNamePresent));
+	if (m_PrimaryNamePresent == true)
+	{
+		EAP_TRACE_DATA_DEBUG(
+			m_am_tools, 
+			TRACE_FLAGS_DEFAULT, 
+			(EAPL("eap_certificate_entry_c::trace():     m_PrimaryName"),
+			m_PrimaryName.get_data(),
+			m_PrimaryName.get_data_length()));
+	}
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_certificate_entry_c::trace(): m_SecondaryNamePresent=%d\n"),
+		m_SecondaryNamePresent));
+	if (m_SecondaryNamePresent == true)
+	{
+		EAP_TRACE_DATA_DEBUG(
+			m_am_tools, 
+			TRACE_FLAGS_DEFAULT, 
+			(EAPL("eap_certificate_entry_c::trace():     m_SecondaryName"),
+			m_SecondaryName.get_data(),
+			m_SecondaryName.get_data_length()));
+	}
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_certificate_entry_c::trace(): m_iIsEnabledPresent=%d\n"),
+		m_iIsEnabledPresent));
+	if (m_iIsEnabledPresent == true)
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_certificate_entry_c::trace():     m_iIsEnabled=%d\n"),
+			m_iIsEnabled));
+	}
+}
+
+//-------------------------------------------------------------------------------
+//-------------------------------------------------------------------------------
+//-------------------------------------------------------------------------------
+
+eap_method_values_c::~eap_method_values_c()
+{
+}
+
+//-------------------------------------------------------------------------------
+
+eap_method_values_c::eap_method_values_c(
+	abs_eap_am_tools_c * const tools)
+: m_am_tools(tools)
+, m_is_valid(false)
+, m_completion_status(eap_status_process_general_error)
+, m_EAPType(eap_type_none)
+, m_IndexType(0ul)
+, m_Index(0ul)
+, m_UseAutomaticCACertificatePresent(false)
+, m_UseAutomaticCACertificate(false)
+, m_UseAutomaticUsernamePresent(false)
+, m_UseAutomaticUsername(false)
+, m_UseAutomaticRealmPresent(false)
+, m_UseAutomaticRealm(false)
+, m_UsernamePresent(false)
+, m_Username_fix(tools)
+, m_PasswordExistPresent(false)
+, m_PasswordPresent(false)
+, m_Password(tools)
+, m_RealmPresent(false)
+, m_Realm(tools)
+, m_UsePseudonymsPresent(false)
+, m_UsePseudonyms(false)
+, m_VerifyServerRealmPresent(false)
+, m_VerifyServerRealm(false)
+, m_RequireClientAuthenticationPresent(false)
+, m_RequireClientAuthentication(false)
+, m_SessionValidityTimePresent(false)
+, m_SessionValidityTime(0ul)
+, m_CipherSuitesPresent(false)
+, m_CipherSuites(tools)
+, m_PEAPVersionsPresent(false)
+, m_PEAPv0Allowed(false)
+, m_PEAPv1Allowed(false)
+, m_PEAPv2Allowed(false)
+, m_CertificatesPresent(false)
+, m_Certificates(tools)
+, m_EnabledEncapsulatedEAPTypesPresent(false)
+, m_EnabledEncapsulatedEAPTypes(tools)
+, m_DisabledEncapsulatedEAPTypesPresent(false)
+, m_DisabledEncapsulatedEAPTypes(tools)
+, m_AuthProvModeAllowedPresent(false)
+, m_AuthProvModeAllowed(false)
+, m_UnauthProvModeAllowedPresent(false)
+, m_UnauthProvModeAllowed(false)
+, m_PACGroupReferencePresent(false)
+, m_PACGroupReference(tools)
+, m_WarnADHPNoPACPresent(false)
+, m_WarnADHPNoPAC(false)
+, m_WarnADHPNoMatchingPACPresent(false)
+, m_WarnADHPNoMatchingPAC(false)
+, m_WarnNotDefaultServerPresent(false)
+, m_WarnNotDefaultServer(false)
+, m_SelectedEAPTypesPresent(false)
+, m_active_eap_methods(tools)
+, m_disabled_eap_methods(tools)
+, m_TunnelingTypePresent(false)
+, m_TunnelingType(eap_type_none)
+, m_DestinationIndexAndTypePresent(false)
+, m_DestinationIndexType(0ul)
+, m_DestinationIndex(0ul)
+, m_MethodInfoPresent(false)
+, m_KReleaseDate(tools)
+, m_KEapTypeVersion(tools)
+, m_KManufacturer(tools)
+, m_ButtonIdPresent(false)
+, m_ButtonId(0)
+, m_ShowPassWordPromptPresent(false)
+, m_ShowPassWordPrompt(false)
+, m_UseIdentityPrivacyPresent(false)
+, m_UseIdentityPrivacy(false)
+{
+}
+
+//-------------------------------------------------------------------------------
+
+abs_eap_am_tools_c * eap_method_values_c::get_am_tools() const
+{
+	return m_am_tools;
+}
+
+
+//-------------------------------------------------------------------------------
+//-------------------------------------------------------------------------------
+//-------------------------------------------------------------------------------
+
+eap_method_settings_c::~eap_method_settings_c()
+{
+}
+
+//-------------------------------------------------------------------------------
+
+eap_method_settings_c::eap_method_settings_c(
+	abs_eap_am_tools_c * const tools)
+	: eap_method_values_c(tools)
+{
+	m_is_valid = true;
+}
+
+//-------------------------------------------------------------------------------
+
+eap_method_settings_c::eap_method_settings_c(
+	abs_eap_am_tools_c * const tools,
+	const eap_method_settings_c * const init)
+	: eap_method_values_c(tools)
+{
+	eap_status_e status(eap_status_ok);
+
+	// The correct status is set in the end of this function.
+	m_completion_status = eap_status_allocation_error;
+
+	m_EAPType = init->m_EAPType;
+
+	m_IndexType = init->m_IndexType;
+
+	m_Index = init->m_Index;
+
+	m_UseAutomaticCACertificatePresent = init->m_UseAutomaticCACertificatePresent;
+	m_UseAutomaticCACertificate = init->m_UseAutomaticCACertificate;
+
+	m_UseAutomaticUsernamePresent = init->m_UseAutomaticUsernamePresent;
+	m_UseAutomaticUsername = init->m_UseAutomaticUsername;
+
+	m_UseAutomaticRealmPresent = init->m_UseAutomaticRealmPresent;
+	m_UseAutomaticRealm = init->m_UseAutomaticRealm;
+
+	m_UsernamePresent = init->m_UsernamePresent;
+	if (m_UsernamePresent == true)
+	{
+		status = m_Username_fix.set_copy_of_buffer(&(init->m_Username_fix));
+		if (status != eap_status_ok)
+		{
+			return;
+		}
+	}
+
+	m_PasswordExistPresent = init->m_PasswordExistPresent;
+	m_PasswordExist = init->m_PasswordExist;
+
+	m_PasswordPresent = init->m_PasswordPresent;
+	if (m_PasswordPresent == true)
+	{
+		status = m_Password.set_copy_of_buffer(&(init->m_Password));
+		if (status != eap_status_ok)
+		{
+			return;
+		}
+	}
+
+	m_RealmPresent = init->m_RealmPresent;
+	if (m_RealmPresent == true)
+	{
+		status = m_Realm.set_copy_of_buffer(&(init->m_Realm));
+		if (status != eap_status_ok)
+		{
+			return;
+		}
+	}
+
+	m_UsePseudonymsPresent = init->m_UsePseudonymsPresent;
+	m_UsePseudonyms = init->m_UsePseudonyms;
+
+	m_VerifyServerRealmPresent = init->m_VerifyServerRealmPresent;
+	m_VerifyServerRealm = init->m_VerifyServerRealm;
+
+	m_RequireClientAuthenticationPresent = init->m_RequireClientAuthenticationPresent;
+	m_RequireClientAuthentication = init->m_RequireClientAuthentication;
+
+	m_SessionValidityTimePresent = init->m_SessionValidityTimePresent;
+	m_SessionValidityTime = init->m_SessionValidityTime;
+
+	m_CipherSuitesPresent = init->m_CipherSuitesPresent;
+	if (m_CipherSuitesPresent == true)
+	{
+		status = copy_simple<u16_t>(
+			&(init->m_CipherSuites),
+			&m_CipherSuites,
+			tools,
+			false);
+		if (status != eap_status_ok)
+		{
+			return;
+		}
+	}
+
+	m_PEAPVersionsPresent = init->m_PEAPVersionsPresent;
+	m_PEAPv0Allowed = init->m_PEAPv0Allowed;
+	m_PEAPv1Allowed = init->m_PEAPv1Allowed;
+	m_PEAPv2Allowed = init->m_PEAPv2Allowed;
+
+	m_CertificatesPresent = init->m_CertificatesPresent;
+	if (m_CertificatesPresent == true)
+	{
+		status = copy<eap_certificate_entry_c>(
+			&(init->m_Certificates),
+			&m_Certificates,
+			tools,
+			false);
+		if (status != eap_status_ok)
+		{
+			return;
+		}
+	}
+
+	m_EnabledEncapsulatedEAPTypesPresent = init->m_EnabledEncapsulatedEAPTypesPresent;
+	if (m_EnabledEncapsulatedEAPTypesPresent == true)
+	{
+		status = copy<eap_type_value_e>(
+			&(init->m_EnabledEncapsulatedEAPTypes),
+			&m_EnabledEncapsulatedEAPTypes,
+			tools,
+			false);
+		if (status != eap_status_ok)
+		{
+			return;
+		}
+	}
+
+	m_DisabledEncapsulatedEAPTypesPresent = init->m_DisabledEncapsulatedEAPTypesPresent;
+	if (m_DisabledEncapsulatedEAPTypesPresent == true)
+	{
+		status = copy<eap_type_value_e>(
+			&(init->m_DisabledEncapsulatedEAPTypes),
+			&m_DisabledEncapsulatedEAPTypes,
+			tools,
+			false);
+		if (status != eap_status_ok)
+		{
+			return;
+		}
+	}
+
+	m_AuthProvModeAllowedPresent = init->m_AuthProvModeAllowedPresent;
+	m_AuthProvModeAllowed = init->m_AuthProvModeAllowed;
+
+	m_UnauthProvModeAllowedPresent = init->m_UnauthProvModeAllowedPresent;
+	m_UnauthProvModeAllowed = init->m_UnauthProvModeAllowed;
+
+	m_PACGroupReferencePresent = init->m_PACGroupReferencePresent;
+	if (m_PACGroupReferencePresent == true)
+	{
+		status = m_PACGroupReference.set_copy_of_buffer(&(init->m_PACGroupReference));
+		if (status != eap_status_ok)
+		{
+			return;
+		}
+	}
+
+	m_WarnADHPNoPACPresent = init->m_WarnADHPNoPACPresent;
+	m_WarnADHPNoPAC = init->m_WarnADHPNoPAC;
+
+	m_WarnADHPNoMatchingPACPresent = init->m_WarnADHPNoMatchingPACPresent;
+	m_WarnADHPNoMatchingPAC = init->m_WarnADHPNoMatchingPAC;
+
+	m_WarnNotDefaultServerPresent = init->m_WarnNotDefaultServerPresent;
+	m_WarnNotDefaultServer = init->m_WarnNotDefaultServer;
+
+	m_SelectedEAPTypesPresent = init->m_SelectedEAPTypesPresent;
+	if (m_SelectedEAPTypesPresent == true)
+	{
+		status = copy<eap_type_value_e>(
+			&(init->m_active_eap_methods),
+			&m_active_eap_methods,
+			tools,
+			false);
+		if (status != eap_status_ok)
+		{
+			return;
+		}
+
+		status = copy<eap_type_value_e>(
+			&(init->m_disabled_eap_methods),
+			&m_disabled_eap_methods,
+			tools,
+			false);
+		if (status != eap_status_ok)
+		{
+			return;
+		}
+	}
+
+	m_TunnelingTypePresent = init->m_TunnelingTypePresent;
+	m_TunnelingType = init->m_TunnelingType;
+
+	m_DestinationIndexAndTypePresent = init->m_DestinationIndexAndTypePresent;
+	m_DestinationIndexType = init->m_DestinationIndexType;
+	m_DestinationIndex = init->m_DestinationIndex;
+
+	m_MethodInfoPresent = init->m_MethodInfoPresent;
+	if (m_MethodInfoPresent == true)
+	{
+		status = m_KReleaseDate.set_copy_of_buffer(&(init->m_KReleaseDate));
+		if (status != eap_status_ok)
+		{
+			return;
+		}
+
+		status = m_KEapTypeVersion.set_copy_of_buffer(&(init->m_KEapTypeVersion));
+		if (status != eap_status_ok)
+		{
+			return;
+		}
+
+		status = m_KManufacturer.set_copy_of_buffer(&(init->m_KManufacturer));
+		if (status != eap_status_ok)
+		{
+			return;
+		}
+	}
+
+	m_ButtonIdPresent = init->m_ButtonIdPresent;
+	m_ButtonId = init->m_ButtonId;
+
+	m_ShowPassWordPromptPresent = init->m_ShowPassWordPromptPresent;
+	m_ShowPassWordPrompt = init->m_ShowPassWordPrompt;
+
+	m_UseIdentityPrivacyPresent = init->m_UseIdentityPrivacyPresent;
+	m_UseIdentityPrivacy = init->m_UseIdentityPrivacy;
+
+	m_completion_status = init->m_completion_status;
+
+	m_is_valid = true;
+}
+
+//-------------------------------------------------------------------------------
+
+void eap_method_settings_c::trace() const
+{
+	u32_t ind = 0ul;
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_is_valid=%d\n"),
+		m_is_valid));
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_completion_status=%d\n"),
+		m_completion_status));
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_EAPType=0xfe%06x%08x\n"),
+		m_EAPType.get_vendor_id(),
+		m_EAPType.get_vendor_type()));
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_IndexType=%d\n"),
+		m_IndexType));
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_Index=%d\n"),
+		m_Index));
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_UseAutomaticCACertificatePresent=%d\n"),
+		m_UseAutomaticCACertificatePresent));
+	if (m_UseAutomaticCACertificatePresent == true)
+	{
+		EAP_TRACE_DEBUG(
+			get_am_tools(),
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_method_settings_c::trace():  m_UseAutomaticCACertificate=%d\n"),
+			m_UseAutomaticCACertificate));
+	}
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_UseAutomaticUsernamePresent=%d\n"),
+		m_UseAutomaticUsernamePresent));
+	if (m_UseAutomaticUsernamePresent == true)
+	{
+		EAP_TRACE_DEBUG(
+			get_am_tools(),
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_method_settings_c::trace():  m_UseAutomaticUsername=%d\n"),
+			m_UseAutomaticUsername));
+	}
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_UseAutomaticRealmPresent=%d\n"),
+		m_UseAutomaticRealmPresent));
+	if (m_UseAutomaticRealmPresent == true)
+	{
+		EAP_TRACE_DEBUG(
+			get_am_tools(),
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_method_settings_c::trace():  m_UseAutomaticRealm=%d\n"),
+			m_UseAutomaticRealm));
+	}
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_UsernamePresent=%d\n"),
+		m_UsernamePresent));
+	if (m_UsernamePresent == true)
+	{
+		EAP_TRACE_DATA_DEBUG(
+			get_am_tools(), 
+			TRACE_FLAGS_DEFAULT, 
+			(EAPL("eap_method_settings_c::trace():     m_Username_fix"),
+			m_Username_fix.get_data(),
+			m_Username_fix.get_data_length()));
+	}
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_PasswordExistPresent=%d\n"),
+		m_PasswordExistPresent));
+	if (m_PasswordExistPresent == true)
+	{
+		EAP_TRACE_DEBUG(
+			get_am_tools(),
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_method_settings_c::trace():     m_PasswordExist=%d\n"),
+			m_PasswordExist));
+	}
+
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_PasswordPresent=%d\n"),
+		m_PasswordPresent));
+	if (m_PasswordPresent == true)
+	{
+		EAP_TRACE_DATA_DEBUG(
+			get_am_tools(), 
+			TRACE_FLAGS_DEFAULT, 
+			(EAPL("eap_method_settings_c::trace():     m_Password"),
+			m_Password.get_data(),
+			m_Password.get_data_length()));
+	}
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_RealmPresent=%d\n"),
+		m_RealmPresent));
+	if (m_RealmPresent == true)
+	{
+		EAP_TRACE_DATA_DEBUG(
+			get_am_tools(), 
+			TRACE_FLAGS_DEFAULT, 
+			(EAPL("eap_method_settings_c::trace():     m_Realm"),
+			m_Realm.get_data(),
+			m_Realm.get_data_length()));
+	}
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_UsePseudonymsPresent=%d\n"),
+		m_UsePseudonymsPresent));
+	if (m_UsePseudonymsPresent == true)
+	{
+		EAP_TRACE_DEBUG(
+			get_am_tools(),
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_method_settings_c::trace():     m_UsePseudonyms=%d\n"),
+			m_UsePseudonyms));
+	}
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_VerifyServerRealmPresent=%d\n"),
+		m_VerifyServerRealmPresent));
+	if (m_VerifyServerRealmPresent == true)
+	{
+		EAP_TRACE_DEBUG(
+			get_am_tools(),
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_method_settings_c::trace():     m_VerifyServerRealm=%d\n"),
+			m_VerifyServerRealm));
+	}
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_RequireClientAuthenticationPresent=%d\n"),
+		m_RequireClientAuthenticationPresent));
+	if (m_RequireClientAuthenticationPresent == true)
+	{
+		EAP_TRACE_DEBUG(
+			get_am_tools(),
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_method_settings_c::trace():     m_RequireClientAuthentication=%d\n"),
+			m_RequireClientAuthentication));
+	}
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_SessionValidityTimePresent=%d\n"),
+		m_SessionValidityTimePresent));
+	if (m_SessionValidityTimePresent == true)
+	{
+		EAP_TRACE_DEBUG(
+			get_am_tools(),
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_method_settings_c::trace():     m_SessionValidityTime=%d\n"),
+			m_SessionValidityTime));
+	}
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_CipherSuitesPresent=%d\n"),
+		m_CipherSuitesPresent));
+	if (m_CipherSuitesPresent == true)
+	{
+		EAP_TRACE_DEBUG(
+			get_am_tools(),
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_method_settings_c::trace():     m_CipherSuites=%d\n"),
+			m_CipherSuites.get_object_count()));
+		for (ind = 0ul; ind < m_CipherSuites.get_object_count(); ++ind)
+		{
+			u16_t * cipher_suite = m_CipherSuites.get_object(ind);
+			if (cipher_suite != 0)
+			{
+				EAP_TRACE_DEBUG(
+					get_am_tools(),
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("eap_method_settings_c::trace():     cipher_suite=%d\n"),
+					*cipher_suite));
+			}
+		}
+	}
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_PEAPVersionsPresent=%d\n"),
+		m_PEAPVersionsPresent));
+	if (m_PEAPVersionsPresent == true)
+	{
+		EAP_TRACE_DEBUG(
+			get_am_tools(),
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_method_settings_c::trace():     m_PEAPv0Allowed=%d\n"),
+			m_PEAPv0Allowed));
+		EAP_TRACE_DEBUG(
+			get_am_tools(),
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_method_settings_c::trace():     m_PEAPv1Allowed=%d\n"),
+			m_PEAPv1Allowed));
+		EAP_TRACE_DEBUG(
+			get_am_tools(),
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_method_settings_c::trace():     m_PEAPv2Allowed=%d\n"),
+			m_PEAPv2Allowed));
+	}
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_CertificatesPresent=%d\n"),
+		m_CertificatesPresent));
+	if (m_CertificatesPresent == true)
+	{
+		EAP_TRACE_DEBUG(
+			get_am_tools(),
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_method_settings_c::trace():     m_Certificates=%d\n"),
+			m_Certificates.get_object_count()));
+		for (ind = 0ul; ind < m_Certificates.get_object_count(); ++ind)
+		{
+			eap_certificate_entry_c * entry = m_Certificates.get_object(ind);
+			if (entry != 0)
+			{
+				entry->trace();
+			}
+		}
+	}
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_EnabledEncapsulatedEAPTypesPresent=%d\n"),
+		m_EnabledEncapsulatedEAPTypesPresent));
+	if (m_EnabledEncapsulatedEAPTypesPresent == true)
+	{
+		EAP_TRACE_DEBUG(
+			get_am_tools(),
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_method_settings_c::trace():     m_EnabledEncapsulatedEAPTypes=%d\n"),
+			m_EnabledEncapsulatedEAPTypes.get_object_count()));
+		for (ind = 0ul; ind < m_EnabledEncapsulatedEAPTypes.get_object_count(); ++ind)
+		{
+			eap_type_value_e * type = m_EnabledEncapsulatedEAPTypes.get_object(ind);
+			if (type != 0)
+			{
+				EAP_TRACE_DEBUG(
+					get_am_tools(),
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("eap_method_settings_c::trace():     EAP-type=0xfe%06x%08x\n"),
+					type->get_vendor_id(),
+					type->get_vendor_type()));
+			}
+		}
+	}
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_DisabledEncapsulatedEAPTypesPresent=%d\n"),
+		m_DisabledEncapsulatedEAPTypesPresent));
+	if (m_DisabledEncapsulatedEAPTypesPresent == true)
+	{
+		EAP_TRACE_DEBUG(
+			get_am_tools(),
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_method_settings_c::trace():     m_DisabledEncapsulatedEAPTypes=%d\n"),
+			m_DisabledEncapsulatedEAPTypes.get_object_count()));
+		for (ind = 0ul; ind < m_DisabledEncapsulatedEAPTypes.get_object_count(); ++ind)
+		{
+			eap_type_value_e * type = m_DisabledEncapsulatedEAPTypes.get_object(ind);
+			if (type != 0)
+			{
+				EAP_TRACE_DEBUG(
+					get_am_tools(),
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("eap_method_settings_c::trace():     EAP-type=0xfe%06x%08x\n"),
+					type->get_vendor_id(),
+					type->get_vendor_type()));
+			}
+		}
+	}
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_AuthProvModeAllowedPresent=%d\n"),
+		m_AuthProvModeAllowedPresent));
+	if (m_AuthProvModeAllowedPresent == true)
+	{
+		EAP_TRACE_DEBUG(
+			get_am_tools(),
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_method_settings_c::trace():     m_AuthProvModeAllowed=%d\n"),
+			m_AuthProvModeAllowed));
+	}
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_UnauthProvModeAllowedPresent=%d\n"),
+		m_UnauthProvModeAllowedPresent));
+	if (m_UnauthProvModeAllowedPresent == true)
+	{
+		EAP_TRACE_DEBUG(
+			get_am_tools(),
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_method_settings_c::trace():     m_UnauthProvModeAllowed=%d\n"),
+			m_UnauthProvModeAllowed));
+	}
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_PACGroupReferencePresent=%d\n"),
+		m_PACGroupReferencePresent));
+	if (m_PACGroupReferencePresent == true)
+	{
+		EAP_TRACE_DATA_DEBUG(
+			get_am_tools(), 
+			TRACE_FLAGS_DEFAULT, 
+			(EAPL("eap_method_settings_c::trace():     m_PACGroupReference"),
+			m_PACGroupReference.get_data(),
+			m_PACGroupReference.get_data_length()));
+	}
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_WarnADHPNoPACPresent=%d\n"),
+		m_WarnADHPNoPACPresent));
+	if (m_WarnADHPNoPACPresent == true)
+	{
+		EAP_TRACE_DEBUG(
+			get_am_tools(),
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_method_settings_c::trace():     m_WarnADHPNoPAC=%d\n"),
+			m_WarnADHPNoPAC));
+	}
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_WarnADHPNoMatchingPACPresent=%d\n"),
+		m_WarnADHPNoMatchingPACPresent));
+	if (m_WarnADHPNoMatchingPACPresent == true)
+	{
+		EAP_TRACE_DEBUG(
+			get_am_tools(),
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_method_settings_c::trace():     m_WarnADHPNoMatchingPAC=%d\n"),
+			m_WarnADHPNoMatchingPAC));
+	}
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_WarnNotDefaultServerPresent=%d\n"),
+		m_WarnNotDefaultServerPresent));
+	if (m_WarnNotDefaultServerPresent == true)
+	{
+		EAP_TRACE_DEBUG(
+			get_am_tools(),
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_method_settings_c::trace():     m_WarnNotDefaultServer=%d\n"),
+			m_WarnNotDefaultServer));
+	}
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_SelectedEAPTypesPresent=%d\n"),
+		m_SelectedEAPTypesPresent));
+	if (m_SelectedEAPTypesPresent == true)
+	{
+		EAP_TRACE_DEBUG(
+			get_am_tools(),
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_method_settings_c::trace():     m_active_eap_methods=%d\n"),
+			m_active_eap_methods.get_object_count()));
+		for (ind = 0ul; ind < m_active_eap_methods.get_object_count(); ++ind)
+		{
+			eap_type_value_e * type = m_active_eap_methods.get_object(ind);
+			if (type != 0)
+			{
+				EAP_TRACE_DEBUG(
+					get_am_tools(),
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("eap_method_settings_c::trace():       active EAP-type=0xfe%06x%08x\n"),
+					type->get_vendor_id(),
+					type->get_vendor_type()));
+			}
+		}
+		EAP_TRACE_DEBUG(
+			get_am_tools(),
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_method_settings_c::trace(): m_disabled_eap_methods=%d\n"),
+			m_disabled_eap_methods.get_object_count()));
+		for (ind = 0ul; ind < m_disabled_eap_methods.get_object_count(); ++ind)
+		{
+			eap_type_value_e * type = m_disabled_eap_methods.get_object(ind);
+			if (type != 0)
+			{
+				EAP_TRACE_DEBUG(
+					get_am_tools(),
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("eap_method_settings_c::trace():     disabled EAP-type=0xfe%06x%08x\n"),
+					type->get_vendor_id(),
+					type->get_vendor_type()));
+			}
+		}
+	}
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_TunnelingTypePresent=%d\n"),
+		m_TunnelingTypePresent));
+	if (m_TunnelingTypePresent == true)
+	{
+		EAP_TRACE_DEBUG(
+			get_am_tools(),
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_method_settings_c::trace():     m_TunnelingType=0xfe%06x%08x\n"),
+			m_TunnelingType.get_vendor_id(),
+			m_TunnelingType.get_vendor_type()));
+	}
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_DestinationIndexAndTypePresent=%d\n"),
+		m_DestinationIndexAndTypePresent));
+	if (m_DestinationIndexAndTypePresent == true)
+	{
+		EAP_TRACE_DEBUG(
+			get_am_tools(),
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_method_settings_c::trace():     m_DestinationIndexType=%d\n"),
+			m_DestinationIndexType));
+		EAP_TRACE_DEBUG(
+			get_am_tools(),
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_method_settings_c::trace():     m_DestinationIndex=%d\n"),
+			m_DestinationIndex));
+	}
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_MethodInfoPresent=%d\n"),
+		m_MethodInfoPresent));
+	if (m_MethodInfoPresent == true)
+	{
+		EAP_TRACE_DATA_DEBUG(
+			get_am_tools(), 
+			TRACE_FLAGS_DEFAULT, 
+			(EAPL("eap_method_settings_c::trace():     m_KReleaseDate"),
+			m_KReleaseDate.get_data(),
+			m_KReleaseDate.get_data_length()));
+		EAP_TRACE_DATA_DEBUG(
+			get_am_tools(), 
+			TRACE_FLAGS_DEFAULT, 
+			(EAPL("eap_method_settings_c::trace():     m_KEapTypeVersion"),
+			m_KEapTypeVersion.get_data(),
+			m_KEapTypeVersion.get_data_length()));
+		EAP_TRACE_DATA_DEBUG(
+			get_am_tools(), 
+			TRACE_FLAGS_DEFAULT, 
+			(EAPL("eap_method_settings_c::trace():     m_KManufacturer"),
+			m_KManufacturer.get_data(),
+			m_KManufacturer.get_data_length()));
+	}
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_ButtonIdPresent=%d\n"),
+		m_ButtonIdPresent));
+	if (m_ButtonIdPresent == true)
+	{
+		EAP_TRACE_DEBUG(
+			get_am_tools(),
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_method_settings_c::trace():     m_ButtonId=%d\n"),
+			m_ButtonId));
+	}
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_ShowPassWordPromptPresent=%d\n"),
+		m_ShowPassWordPromptPresent));
+	if (m_ShowPassWordPromptPresent == true)
+	{
+		EAP_TRACE_DEBUG(
+			get_am_tools(),
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_method_settings_c::trace():     m_ShowPassWordPrompt=%d\n"),
+			m_ShowPassWordPrompt));
+	}
+
+	EAP_TRACE_DEBUG(
+		get_am_tools(),
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_method_settings_c::trace(): m_UseIdentityPrivacyPresent=%d\n"),
+		m_UseIdentityPrivacyPresent));
+	if (m_UseIdentityPrivacyPresent == true)
+	{
+		EAP_TRACE_DEBUG(
+			get_am_tools(),
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_method_settings_c::trace():     m_UseIdentityPrivacy=%d\n"),
+			m_UseIdentityPrivacy));
+	}
+}
+
+//-------------------------------------------------------------------------------
+
+// End of file
--- a/eapol/eapol_framework/eapol_common/common/eap_network_id_selector.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/common/eap_network_id_selector.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/common/eap_rogue_ap_entry.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/common/eap_rogue_ap_entry.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/common/eap_sim_triplets.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/common/eap_sim_triplets.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/common/eap_state_notification.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/common/eap_state_notification.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 20.1.2 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -33,10 +33,13 @@
 #include "eap_am_tools.h"
 #include "eap_tools.h"
 #include "eapol_key_types.h"
+#include "eap_am_network_id.h"
 
 
 EAP_FUNC_EXPORT eap_state_notification_c::~eap_state_notification_c()
 {
+	delete m_send_network_id;
+	m_send_network_id = 0;
 }
 
 EAP_FUNC_EXPORT eap_state_notification_c::eap_state_notification_c(
@@ -58,15 +61,30 @@
 	, m_eap_type(eap_type_none)
 	, m_previous_state(previous_state)
 	, m_current_state(current_state)
-	, m_send_network_id(send_network_id)
+	, m_send_network_id(0)
 	, m_is_client(is_client)
 	, m_eap_identifier(eap_identifier)
 	, m_allow_send_eap_success(allow_send_eap_success)
 	, m_authentication_error(eap_status_ok)
 {
-}
+	if (send_network_id == 0
+		|| send_network_id->get_is_valid() == false)
+	{
+		(void)EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		return;
+	}
+
+	m_send_network_id = send_network_id->copy();
 
-#if defined(USE_EAP_EXPANDED_TYPES)
+	if (m_send_network_id == 0
+		|| m_send_network_id->get_is_valid() == false)
+	{
+		delete m_send_network_id;
+		m_send_network_id = 0;
+		(void)EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		return;
+	}
+}
 
 EAP_FUNC_EXPORT eap_state_notification_c::eap_state_notification_c(
 	abs_eap_am_tools_c * const tools,
@@ -87,15 +105,30 @@
 	, m_eap_type(eap_type)
 	, m_previous_state(previous_state)
 	, m_current_state(current_state)
-	, m_send_network_id(send_network_id)
+	, m_send_network_id(0)
 	, m_is_client(is_client)
 	, m_eap_identifier(eap_identifier)
 	, m_allow_send_eap_success(allow_send_eap_success)
 	, m_authentication_error(eap_status_ok)
 {
-}
+	if (send_network_id == 0
+		|| send_network_id->get_is_valid() == false)
+	{
+		(void)EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		return;
+	}
+
+	m_send_network_id = send_network_id->copy();
 
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
+	if (m_send_network_id == 0
+		|| m_send_network_id->get_is_valid() == false)
+	{
+		delete m_send_network_id;
+		m_send_network_id = 0;
+		(void)EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		return;
+	}
+}
 
 
 EAP_FUNC_EXPORT eap_state_notification_c::eap_state_notification_c(
@@ -117,12 +150,29 @@
 	, m_eap_type(eap_type)
 	, m_previous_state(previous_state)
 	, m_current_state(current_state)
-	, m_send_network_id(send_network_id)
+	, m_send_network_id(0)
 	, m_is_client(is_client)
 	, m_eap_identifier(eap_identifier)
 	, m_allow_send_eap_success(allow_send_eap_success)
 	, m_authentication_error(eap_status_ok)
 {
+	if (send_network_id == 0
+		|| send_network_id->get_is_valid() == false)
+	{
+		(void)EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		return;
+	}
+
+	m_send_network_id = send_network_id->copy();
+
+	if (m_send_network_id == 0
+		|| m_send_network_id->get_is_valid() == false)
+	{
+		delete m_send_network_id;
+		m_send_network_id = 0;
+		(void)EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		return;
+	}
 }
 
 EAP_FUNC_EXPORT const eap_am_network_id_c * eap_state_notification_c::get_send_network_id() const
@@ -371,6 +421,7 @@
 #if defined(USE_WAPI_CORE)
 		else EAP_IF_RETURN_STRING(protocol, eapol_key_handshake_type_wai_handshake)
 #endif //#if defined(USE_WAPI_CORE)
+		else EAP_IF_RETURN_STRING(protocol, eapol_key_handshake_type_authenticated)
 		else
 		{
 			return EAPL("Unknown EAPOL protocol");
--- a/eapol/eapol_framework/eapol_common/common/eap_status_string.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/common/eap_status_string.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 17 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/common/eap_tlv_header.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/common/eap_tlv_header.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 13 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/common/eap_tlv_message_data.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/common/eap_tlv_message_data.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 21 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/common/eap_tools.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/common/eap_tools.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 15 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/common/eap_variable_data.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/common/eap_variable_data.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 22 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/common/eapol_ethernet_address.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/common/eapol_ethernet_address.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/common/eapol_ethernet_header.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/common/eapol_ethernet_header.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/common/eapol_header.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/common/eapol_header.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/common/eapol_session_key.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/common/eapol_session_key.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 14 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/common/wlan_eap_if_send_status.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/common/wlan_eap_if_send_status.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #include "eap_am_export.h"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/core/dummy_eap_core.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,1185 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+// This is enumeration of EAPOL source code.
+#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
+	#undef EAP_FILE_NUMBER_ENUM
+	#define EAP_FILE_NUMBER_ENUM 44 
+	#undef EAP_FILE_NUMBER_DATE 
+	#define EAP_FILE_NUMBER_DATE 1127594498 
+#endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
+
+
+
+#include "eap_am_memory.h"
+#include "eap_tools.h"
+#include "dummy_eap_core.h"
+#include "eap_core_nak_info.h"
+#include "eap_state_notification.h"
+#include "eap_network_id_selector.h"
+#include "eap_buffer.h"
+#include "eap_header_string.h"
+#include "eap_automatic_variable.h"
+
+
+//--------------------------------------------------
+
+// 
+EAP_FUNC_EXPORT dummy_eap_core_c::~dummy_eap_core_c()
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("dummy_eap_core_c::~dummy_eap_core_c: ")
+		 EAPL("this = 0x%08x\n"),
+		 this));
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+}
+
+//--------------------------------------------------
+
+#if defined(_WIN32) && !defined(__GNUC__)
+	#pragma warning( disable : 4355 ) // 'this' : used in base member initializer list
+#endif
+
+// 
+EAP_FUNC_EXPORT dummy_eap_core_c::dummy_eap_core_c(
+	abs_eap_am_tools_c * const tools,
+	abs_eap_core_c * const partner,
+	const bool is_client_when_true,
+	const eap_am_network_id_c * const receive_network_id,
+	const bool is_tunneled_eap)
+	: m_partner(partner)
+	, m_am_tools(tools)
+	, m_type_map(tools, this)
+	, m_current_eap_type(eap_type_none)
+	, m_default_eap_type(eap_type_none)
+	, m_eap_identity(tools)
+	, m_eap_header_offset(0u)
+	, m_MTU(0u)
+	, m_trailer_length(0u)
+	, m_receive_network_id(tools)
+	, m_retransmission(0)
+	, m_retransmission_time(EAP_CORE_RETRANSMISSION_TIME)
+	, m_retransmission_counter(EAP_CORE_RETRANSMISSION_COUNTER)
+	, m_session_timeout(EAP_CORE_SESSION_TIMEOUT)
+	, m_eap_core_failure_received_timeout(EAP_CORE_FAILURE_RECEIVED_TIMEOUT)
+	, m_remove_session_timeout(EAP_CORE_REMOVE_SESSION_TIMEOUT)
+#if defined(USE_EAP_CORE_WAIT_REQUEST_TYPE_TIMER)
+	, m_wait_eap_request_type_timeout(EAP_CORE_WAIT_EAP_REQUEST_TYPE_TIMEOUT)
+	, m_wait_eap_request_type_timeout_set(false)
+#endif //#if defined(USE_EAP_CORE_WAIT_REQUEST_TYPE_TIMER)
+	, m_eap_identity_request_identifier_client(0)
+	, m_is_client(is_client_when_true)
+	, m_is_client_role(is_client_when_true)
+	, m_is_valid(false)
+	, m_client_restart_authentication_initiated(false)
+	, m_marked_removed(false)
+	, m_eap_identity_response_accepted(false)
+	, m_shutdown_was_called(false)
+	, m_eap_type_response_sent(false)
+	, m_is_tunneled_eap(is_tunneled_eap)
+#if defined(USE_EAP_CORE_SERVER)
+	, m_process_eap_nak_immediately(EAP_CORE_PROCESS_EAP_NAK_IMMEDIATELY)
+	, m_nak_process_timer_active(false)
+	, m_eap_identity_request_send(false)
+	, m_eap_identity_response_received(false)
+	, m_eap_failure_sent(false)
+	, m_send_eap_success_after_notification(false)
+#if defined(USE_EAP_CORE_WAIT_REQUEST_TYPE_TIMER)
+	, m_skip_eap_request_identity(false)
+#endif //#if defined(USE_EAP_CORE_WAIT_REQUEST_TYPE_TIMER)
+#endif //#if defined(USE_EAP_CORE_SERVER)
+	, m_use_eap_expanded_type(false)
+	, m_ignore_eap_failure(false)
+	, m_ignore_notifications(false)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("ummy_eap_core_c::dummy_eap_core_c: ")
+		 EAPL("this = 0x%08x\n"),
+		 this));
+
+	set_is_valid();
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT abs_eap_core_c * dummy_eap_core_c::get_partner()
+{
+
+	return m_partner;
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT void dummy_eap_core_c::set_partner(abs_eap_core_c * const partner)
+{
+
+	m_partner = partner;
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT void dummy_eap_core_c::set_is_valid()
+{
+	m_is_valid = true;
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT bool dummy_eap_core_c::get_is_valid()
+{
+	return m_is_valid;
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT void dummy_eap_core_c::object_increase_reference_count()
+{
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT u32_t dummy_eap_core_c::object_decrease_reference_count()
+{
+	return 0u;
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT bool dummy_eap_core_c::get_marked_removed()
+{
+	return false;
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT void dummy_eap_core_c::set_marked_removed()
+{
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT void dummy_eap_core_c::unset_marked_removed()
+{
+}
+
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT void dummy_eap_core_c::ignore_notifications()
+{
+}
+
+//--------------------------------------------------
+
+//
+eap_status_e dummy_eap_core_c::initialize_asynchronous_init_remove_eap_session(
+	const u32_t remove_session_timeout)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("dummy_eap_core_c::initialize_asynchronous_init_remove_eap_session(): %s.\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	eap_status_e status = eap_status_process_general_error;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e dummy_eap_core_c::cancel_asynchronous_init_remove_eap_session()
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+		eap_status_e status = eap_status_process_general_error;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+eap_status_e dummy_eap_core_c::asynchronous_init_remove_eap_session()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("dummy_eap_core_c::asynchronous_init_remove_eap_session(): %s.\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+		eap_status_e status = eap_status_process_general_error;
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+eap_status_e dummy_eap_core_c::init_end_of_session(
+	const abs_eap_state_notification_c * const state)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("dummy_eap_core_c::init_end_of_session(): %s.\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	eap_status_e status(eap_status_process_general_error);
+
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT void dummy_eap_core_c::state_notification(
+	const abs_eap_state_notification_c * const state)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_base_type_c * dummy_eap_core_c::load_type(
+	const eap_type_value_e type,
+	const eap_type_value_e tunneling_type,
+	const eap_am_network_id_c * const receive_network_id)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_base_type_c *handler = 0;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return handler;
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::check_is_valid_eap_type(const eap_type_value_e eap_type)
+{
+		eap_status_e status = eap_status_process_general_error;
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::get_eap_type_list(
+	eap_array_c<eap_type_value_e> * const eap_type_list)
+{
+		eap_status_e status = eap_status_process_general_error;
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::initialize_session_timeout(const u32_t session_timeout_ms)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+		eap_status_e status = eap_status_process_general_error;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::cancel_session_timeout()
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+		eap_status_e status = eap_status_process_general_error;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT void dummy_eap_core_c::trace_eap_packet(
+	eap_const_string prefix,
+	const eap_header_wr_c * const eap_header)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+}
+
+
+//--------------------------------------------------
+
+#if defined(USE_EAP_CORE_SERVER)
+
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::restart_with_new_type(
+	const eap_type_value_e used_eap_type,
+	const eap_am_network_id_c * const receive_network_id,
+	const u8_t eap_identifier)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+		eap_status_e status = eap_status_process_general_error;
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+#endif //#if defined(USE_EAP_CORE_SERVER)
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::client_proposes_eap_types(
+	const eap_am_network_id_c * const receive_network_id,
+	const u8_t eap_identifier)
+{
+
+	/**
+	 * @{ 2005-04-19 complete Expanded Nak Type to client_proposes_eap_types(). }
+	 */
+		eap_status_e status = eap_status_process_general_error;
+
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::packet_process_type(
+	const eap_type_value_e used_eap_type,
+	const eap_am_network_id_c * const receive_network_id,
+	eap_general_header_base_c * const packet_data,
+	const u32_t packet_length)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("dummy_eap_core_c::packet_process_type(): %s\n"),
+		(m_is_client == true) ? "client": "server"));
+
+
+	eap_status_e status = eap_status_process_general_error;
+
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+/**
+ * @{ 2003-10-01 draft-ietf-eap-rfc2284bis-06.txt chapter 2.1 Support for sequences:
+ * An EAP conversation MAY utilize a sequence of methods.  A common
+ * example of this is an Identity request followed by a single EAP
+ * authentication method such as an MD5-Challenge.  However the peer and
+ * authenticator MUST utilize only one authentication method (Type 4 or
+ * greater) within an EAP conversation, after which the authenticator
+ * MUST send a Success or Failure packet.
+ * Once a peer has sent a Response of the same Type as the initial
+ * Request, an authenticator MUST NOT send a Request of a different Type
+ * prior to completion of the final round of a given method (with the
+ * exception of a Notification-Request) and MUST NOT send a Request for
+ * an additional method of any Type after completion of the initial
+ * authentication method; a peer receiving such Requests MUST treat them
+ * as invalid, and silently discard them. As a result, Identity Requery
+ * is not supported.
+ * A peer MUST NOT send a Nak (legacy or expanded) in reply to a
+ * Request, after an initial non-Nak Response has been sent.  Since
+ * spoofed EAP Request packets may be sent by an attacker, an
+ * authenticator receiving an unexpected Nak SHOULD discard it and log
+ * the event.
+ * Multiple authentication methods within an EAP conversation are not
+ * supported due to their vulnerability to man-in-the-middle attacks
+ * (see Section 7.4) and incompatibility with existing implementations.
+ * }
+ */
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::packet_process(
+	const eap_am_network_id_c * const receive_network_id,
+	eap_general_header_base_c * const packet_data,
+	const u32_t packet_length)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("dummy_eap_core_c::packet_process(): %s\n"),
+		(m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: dummy_eap_core_c::packet_process()");
+
+	eap_status_e status = eap_status_process_general_error;
+
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::packet_send(
+	const eap_am_network_id_c * const send_network_id,
+	eap_buf_chain_wr_c * const sent_packet,
+	const u32_t header_offset,
+	const u32_t data_length,
+	const u32_t buffer_length)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status = eap_status_process_general_error;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::resend_packet(
+	const eap_am_network_id_c * const send_network_id,
+	eap_buf_chain_wr_c * const sent_packet,
+	const u32_t header_offset,
+	const u32_t data_length,
+	const u32_t buffer_length,
+	const u32_t retransmission_counter)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status = eap_status_process_general_error;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::cancel_retransmission()
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status = eap_status_process_general_error;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::init_retransmission(
+	const eap_am_network_id_c * const send_network_id,
+	eap_buf_chain_wr_c * const sent_packet,
+	const u32_t header_offset,
+	const u32_t data_length,
+	const eap_code_value_e eap_code,
+	const u8_t eap_identifier,
+	const eap_type_value_e eap_type
+	)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+	eap_status_e status = eap_status_process_general_error;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::set_eap_failure_timeout()
+{
+	eap_status_e status = eap_status_process_general_error;
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::cancel_eap_failure_timeout()
+{
+	eap_status_e status = eap_status_process_general_error;
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+
+}
+
+//--------------------------------------------------
+
+#if defined(USE_EAP_CORE_WAIT_REQUEST_TYPE_TIMER)
+
+//
+eap_status_e dummy_eap_core_c::set_wait_eap_request_type_timeout()
+{
+
+	eap_status_e status = eap_status_process_general_error;
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+#endif //#if defined(USE_EAP_CORE_WAIT_REQUEST_TYPE_TIMER)
+
+//--------------------------------------------------
+
+#if defined(USE_EAP_CORE_WAIT_REQUEST_TYPE_TIMER)
+
+//
+eap_status_e dummy_eap_core_c::cancel_wait_eap_request_type_timeout()
+{
+	eap_status_e status = eap_status_process_general_error;
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+
+}
+
+#endif //#if defined(USE_EAP_CORE_WAIT_REQUEST_TYPE_TIMER)
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT u32_t dummy_eap_core_c::get_header_offset(
+	u32_t * const MTU,
+	u32_t * const trailer_length)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	const u32_t offset = 0;
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("dummy_eap_core_c::get_header_offset(): offset=%d, MTU=%d, trailer_length=%d\n"),
+		offset,
+		*MTU,
+		*trailer_length));
+
+	return offset;
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::load_module(
+	const eap_type_value_e type,
+	const eap_type_value_e tunneling_type,
+	abs_eap_base_type_c * const partner,
+	eap_base_type_c ** const handler,
+	const bool is_client_when_true,
+	const eap_am_network_id_c * const receive_network_id)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status = eap_status_process_general_error;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::configure()
+	{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+#if !defined(USE_EAP_DEBUG_TRACE)
+	EAP_TRACE_ALWAYS(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("dummy_eap_core_c::configure(): %s: %s.\n"),
+		 ((m_is_client == true) ? "client": "server"),
+		 (m_is_tunneled_eap == true) ? "tunneled": "outer most"));
+#else
+	EAP_TRACE_ALWAYS(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("dummy_eap_core_c::configure(): %s: %s, this = 0x%08x => 0x%08x.\n"),
+		 ((m_is_client == true) ? "client": "server"),
+		 (m_is_tunneled_eap == true) ? "tunneled": "outer most",
+		 this,
+		 dynamic_cast<abs_eap_base_timer_c *>(this)));
+#endif
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: dummy_eap_core_c::configure()");
+
+	eap_status_e status(eap_status_process_general_error);
+
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::shutdown_operation(
+	eap_base_type_c * const handler,
+	abs_eap_am_tools_c * const m_am_tools)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_UNREFERENCED_PARAMETER(m_am_tools);
+
+	EAP_TRACE_ALWAYS(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("dummy_eap_core_c::shutdown_operation(): handler=0x%08x.\n"),
+		 handler));
+
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::shutdown()
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+	
+	eap_status_e status(eap_status_ok);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::unload_module(const eap_type_value_e type)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::eap_acknowledge(
+	const eap_am_network_id_c * const receive_network_id)
+{
+	// Any Network Protocol packet is accepted as a success indication.
+	// This is described in RFC 2284 "PPP Extensible Authentication Protocol (EAP)".
+
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::restart_authentication(
+	const eap_am_network_id_c * const send_network_id,
+	const bool is_client_when_true)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status = eap_status_process_general_error;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+#if defined(USE_EAP_CORE_SERVER)
+
+//
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::send_eap_identity_request(
+	const eap_am_network_id_c * const receive_network_id)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status = eap_status_process_general_error;
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("dummy_eap_core_c::send_eap_identity_request(): %s, %s\n"),
+		 (m_is_client == true) ? "client": "server",
+		 (m_is_tunneled_eap == true) ? "tunneled": "outer most"
+		 ));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: dummy_eap_core_c::send_eap_identity_request()");
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+#endif //#if defined(USE_EAP_CORE_SERVER)
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::send_eap_nak_response(
+	const eap_am_network_id_c * const receive_network_id,
+	const u8_t eap_identifier,
+	const eap_array_c<eap_type_value_e> * const eap_type_list)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status = eap_status_process_general_error;
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("dummy_eap_core_c::send_eap_nak_response(): %s, %s\n"),
+		 (m_is_client == true) ? "client": "server",
+		 (m_is_tunneled_eap == true) ? "tunneled": "outer most"
+		 ));
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::packet_data_crypto_keys(
+	const eap_am_network_id_c * const send_network_id,
+	const eap_master_session_key_c * const master_session_key
+	)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status = eap_status_process_general_error;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::read_configure(
+	const eap_configuration_field_c * const field,
+	eap_variable_data_c * const data)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status = eap_status_process_general_error;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::write_configure(
+	const eap_configuration_field_c * const field,
+	eap_variable_data_c * const data)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status = eap_status_process_general_error;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::timer_expired(
+	const u32_t id, void *data)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status = eap_status_process_general_error;
+
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::timer_delete_data(
+	const u32_t id, void *data)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status = eap_status_process_general_error;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::reset_operation(
+	eap_base_type_c * const handler,
+	abs_eap_am_tools_c * const m_am_tools)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_UNREFERENCED_PARAMETER(m_am_tools);
+
+	EAP_TRACE_ALWAYS(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("dummy_eap_core_c::reset_operation(): handler=0x%08x.\n"),
+		 handler));
+
+	eap_status_e status = eap_status_process_general_error;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::reset()
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+#if !defined(USE_EAP_DEBUG_TRACE)
+	EAP_TRACE_ALWAYS(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("dummy_eap_core_c::reset(): %s: %s.\n"),
+		 ((m_is_client == true) ? "client": "server"),
+		 (m_is_tunneled_eap == true) ? "tunneled": "outer most"));
+#else
+	EAP_TRACE_ALWAYS(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("dummy_eap_core_c::reset(): %s: %s, this = 0x%08x => 0x%08x.\n"),
+		 ((m_is_client == true) ? "client": "server"),
+		 (m_is_tunneled_eap == true) ? "tunneled": "outer most",
+		 this,
+		 dynamic_cast<abs_eap_base_timer_c *>(this)));
+#endif
+
+	eap_status_e status = eap_status_process_general_error;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+// 
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::handle_eap_identity_request(
+	const eap_type_value_e used_eap_type,
+	const u8_t eap_identifier,
+	const eap_am_network_id_c * const receive_network_id)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status = eap_status_process_general_error;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+#if defined(USE_EAP_CORE_SERVER)
+
+// 
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::handle_eap_identity_response(
+	eap_base_type_c * const handler,
+	const eap_type_value_e used_eap_type,
+	const eap_am_network_id_c * const receive_network_id,
+	eap_header_wr_c * const eap,
+	const u32_t packet_length)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+	EAP_UNREFERENCED_PARAMETER(used_eap_type); 
+
+	eap_status_e status = eap_status_process_general_error;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+#endif //#if defined(USE_EAP_CORE_SERVER)
+
+//--------------------------------------------------
+
+#if defined(USE_EAP_CORE_SERVER)
+
+//
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::send_eap_success(
+	const eap_am_network_id_c * const send_network_id,
+	const u8_t eap_identifier)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status = eap_status_process_general_error;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+#endif //#if defined(USE_EAP_CORE_SERVER)
+
+//--------------------------------------------------
+
+#if defined(USE_EAP_CORE_SERVER)
+
+//
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::send_eap_failure(
+	const eap_am_network_id_c * const send_network_id,
+	const u8_t eap_identifier)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status = eap_status_process_general_error;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+#endif //#if defined(USE_EAP_CORE_SERVER)
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::send_eap_notification_response(
+	const eap_am_network_id_c * const send_network_id,
+	const u8_t eap_identifier)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status = eap_status_process_general_error;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::create_eap_identity_response(
+	eap_buf_chain_wr_c * const response_packet,
+	const eap_variable_data_c * const identity,
+	const u8_t eap_identifier
+	)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status = eap_status_process_general_error;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::send_eap_identity_response(
+	const eap_am_network_id_c * const send_network_id,
+	const eap_variable_data_c * const identity,
+	const u8_t eap_identifier
+	)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status = eap_status_process_general_error;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+eap_status_e dummy_eap_core_c::set_eap_identity_routing_info_and_nai_decoration(
+	eap_variable_data_c * const identity)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status = eap_status_process_general_error;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::complete_eap_identity_query(
+	const eap_am_network_id_c * const send_network_id,
+	const eap_variable_data_c * const identity,
+	const u8_t /*eap_identifier*/) // Remove eap_identifier parameter.
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+		eap_status_e status = eap_status_process_general_error;
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::get_saved_eap_identity(
+	eap_variable_data_c * const identity)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status = eap_status_process_general_error;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN_WARNING(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::set_session_timeout(
+	const u32_t session_timeout_ms)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status = eap_status_process_general_error;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::set_timer(
+	abs_eap_base_timer_c * const p_initializer, 
+	const u32_t p_id, 
+	void * const p_data,
+	const u32_t p_time_ms)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	const eap_status_e status = m_am_tools->am_set_timer(
+		p_initializer, 
+		p_id, 
+		p_data,
+		p_time_ms);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::cancel_timer(
+	abs_eap_base_timer_c * const p_initializer, 
+	const u32_t p_id)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	const eap_status_e status = m_am_tools->am_cancel_timer(
+		p_initializer, 
+		p_id);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::set_authentication_role(const bool when_true_set_client)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e dummy_eap_core_c::add_rogue_ap(
+	eap_array_c<eap_rogue_ap_entry_c> & rogue_ap_list)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status = eap_status_process_general_error;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT bool dummy_eap_core_c::get_is_tunneled_eap() const
+{
+	return m_is_tunneled_eap;
+}
+
+//--------------------------------------------------
+//--------------------------------------------------
+
+
+
+// End.
--- a/eapol/eapol_framework/eapol_common/core/eap_config.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/core/eap_config.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/core/eap_core.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/core/eap_core.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 63 %
+* %version: 58.1.11 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -383,29 +383,13 @@
 	// Remove session only if the stack is not already being deleted
 	if (m_shutdown_was_called == false)
 	{
-		#if defined(USE_EAPOL_KEY_STATE) && defined(USE_EAP_CORE_RESTART_AUTHENTICATION)
-			#error ERROR: USE_EAPOL_KEY_STATE and USE_EAP_CORE_RESTART_AUTHENTICATION cannot be used same time.
-		#endif //#if defined(USE_EAPOL_KEY_STATE) && defined(USE_EAP_CORE_RESTART_AUTHENTICATION)
-
-		#if defined(USE_EAP_CORE_SIMULATOR_VERSION) && defined(USE_EAP_CORE_RESTART_AUTHENTICATION)
-
-			// Simulator reuses current session.
-			status = restart_authentication(
-				state->get_send_network_id(),
-				m_is_client);
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);
-			}
-
-		#elif defined(USE_EAP_CORE_SIMULATOR_VERSION) && defined(USE_EAPOL_KEY_STATE)
+		#if defined(USE_EAP_CORE_SIMULATOR_VERSION)
 
 			EAP_TRACE_DEBUG(
 				m_am_tools,
 				TRACE_FLAGS_DEFAULT,
 				(EAPL("eap_core_c::state_notification(): %s, %s, Ignored notification: ")
-				 EAPL("Protocol layer %d, EAP type 0x%02x, State transition from ")
+				 EAPL("Protocol layer %d, EAP-type 0x%02x, State transition from ")
 				 EAPL("%d=%s to %d=%s, client %d.\n"),
 				 (m_is_client == true) ? "client": "server",
 				 (m_is_tunneled_eap == true) ? "tunneled": "outer most",
@@ -433,7 +417,7 @@
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
 			(EAPL("eap_core_c::state_notification(): %s, %s, Ignored notification: ")
-			 EAPL("Protocol layer %d, EAP type 0x%02x, State transition from ")
+			 EAPL("Protocol layer %d, EAP-type 0x%02x, State transition from ")
 			 EAPL("%d=%s to %d=%s, client %d when shutdown was called.\n"),
 			 (m_is_client == true) ? "client": "server",
 			 (m_is_tunneled_eap == true) ? "tunneled": "outer most",
@@ -460,22 +444,21 @@
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
 	eap_status_string_c status_string;
-	eap_header_string_c eap_string;
 	EAP_UNREFERENCED_PARAMETER(status_string); // in release
-	EAP_UNREFERENCED_PARAMETER(eap_string); // in release
 
 	EAP_TRACE_DEBUG(
 		m_am_tools, 
 		TRACE_FLAGS_DEFAULT, 
-		(EAPL("eap_core_c::state_notification(), %s, %s, protocol_layer %d=%s, protocol %d=%s, EAP-type 0x%08x=%s.\n"),
+		(EAPL("eap_core_c::state_notification(), %s, %s, protocol_layer %d=%s, protocol %d=%s, EAP-type 0xfe%06x%08x=%s.\n"),
 		(m_is_client == true) ? "client": "server",
 		(m_is_tunneled_eap == true) ? "tunneled": "outer most",
 		state->get_protocol_layer(),
 		state->get_protocol_layer_string(),
 		state->get_protocol(),
 		state->get_protocol_string(),
-		convert_eap_type_to_u32_t(state->get_eap_type()),
-		eap_string.get_eap_type_string(state->get_eap_type())));
+		state->get_eap_type().get_vendor_id(),
+		state->get_eap_type().get_vendor_type(),
+		eap_header_string_c::get_eap_type_string(state->get_eap_type())));
 
 	EAP_TRACE_DEBUG(
 		m_am_tools, 
@@ -506,7 +489,7 @@
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
 			(EAPL("eap_core_c::state_notification(): %s, %s, Ignored notification: ")
-			 EAPL("Protocol layer %d, non-active EAP type 0x%02x, current EAP type 0x%08x, State transition from ")
+			 EAPL("Protocol layer %d, non-active EAP-type 0x%02x, current EAP type 0x%08x, State transition from ")
 			 EAPL("%d=%s to %d=%s, client %d\n"),
 			 (m_is_client == true) ? "client": "server",
 			 (m_is_tunneled_eap == true) ? "tunneled": "outer most",
@@ -791,9 +774,14 @@
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
-	eap_status_e status = m_partner->cancel_timer(
-		this,
-		EAP_CORE_SESSION_TIMEOUT_ID);
+	eap_status_e status(eap_status_ok);
+
+	if (m_am_tools != 0)
+	{
+		status = m_partner->cancel_timer(
+			this,
+			EAP_CORE_SESSION_TIMEOUT_ID);
+	}
 	
 	EAP_UNREFERENCED_PARAMETER(status); // in release
 	
@@ -1312,9 +1300,9 @@
 		}
 	}
 #endif //#if defined(USE_EAP_CORE_SERVER)
-	else if ((eap.get_code() == eap_code_request
+	else if (((eap.get_code() == eap_code_request
 				|| eap.get_code() == eap_code_response)
-			&& eap.get_type() == used_eap_type
+			  && eap.get_type() == used_eap_type)
 		|| eap.get_code() == eap_code_success
 		|| eap.get_code() == eap_code_failure)
 	{
@@ -1524,17 +1512,15 @@
 #if defined (_DEBUG)
 	if (m_retransmission != 0)
 	{
-		eap_header_string_c eap_string;
-
 		EAP_TRACE_DEBUG(
 			m_am_tools, 
 			TRACE_FLAGS_DEFAULT, 
 			(EAPL("EAP_Core: eap_core_c::packet_process(): %s, retransmission counter %d, retrans EAP-type %s, retrans EAP-Id %d, current EAP-type %s, current EAP-Id %d, session 0x%08x.\n"),
 			 (m_is_client_role == true) ? "client": "server",
 			 m_retransmission->get_retransmission_counter(),
-			 eap_string.get_eap_type_string(m_retransmission->get_eap_type()),
+			 eap_header_string_c::get_eap_type_string(m_retransmission->get_eap_type()),
 			 m_retransmission->get_eap_identifier(),
-			 eap_string.get_eap_type_string(eap.get_type()),
+			 eap_header_string_c::get_eap_type_string(eap.get_type()),
 			 eap.get_identifier(),
 			 this));
 	}
@@ -2223,7 +2209,8 @@
 			 (m_is_tunneled_eap == true) ? "tunneled": "outer most"
 			 ));
 
-		if (m_is_client_role == false)
+		if (m_is_client_role == false
+			&& m_partner != 0)
 		{
 			// Only EAP-server uses timer to re-transmits EAP-packets.
 			m_partner->cancel_timer(this, EAP_CORE_TIMER_RETRANSMISSION_ID);
@@ -2404,9 +2391,16 @@
 		 (m_is_tunneled_eap == true) ? "tunneled": "outer most"
 		 ));
 
-	return m_partner->cancel_timer(
-		this,
-		EAP_CORE_FAILURE_RECEIVED_ID);
+	eap_status_e status(eap_status_ok);
+
+	if (m_am_tools != 0)
+	{
+		status = m_partner->cancel_timer(
+			this,
+			EAP_CORE_FAILURE_RECEIVED_ID);
+	}
+	
+	return EAP_STATUS_RETURN(m_am_tools, status);
 }
 
 //--------------------------------------------------
@@ -2474,9 +2468,16 @@
 
 		m_wait_eap_request_type_timeout_set = false;
 
-		return m_partner->cancel_timer(
-			this,
-			EAP_CORE_WAIT_EAP_REQUEST_TYPE_ID);
+		eap_status_e status(eap_status_ok);
+
+		if (m_am_tools != 0)
+		{
+			m_partner->cancel_timer(
+				this,
+				EAP_CORE_WAIT_EAP_REQUEST_TYPE_ID);
+		}
+
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 	else
 	{
@@ -3014,7 +3015,6 @@
 
 	//----------------------------------------------------------
 
-#if defined(USE_EAP_EXPANDED_TYPES)
 	{
 		eap_variable_data_c use_eap_expanded_type(m_am_tools);
 
@@ -3040,7 +3040,6 @@
 			}
 		}
 	}
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
 
 	//----------------------------------------------------------
 
@@ -5403,10 +5402,12 @@
 		EAP_TRACE_DEBUG(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
-			(EAPL("WARNING: %s, %s, EAP-identity is unknown: current EAP-type 0x%08x\n"),
+			(EAPL("WARNING: %s, %s, EAP-identity is unknown: current EAP-type 0xfe%06x%08x=%s\n"),
 			 (m_is_client == true) ? "client": "server",
 			 (m_is_tunneled_eap == true) ? "tunneled": "outer most",
-			 convert_eap_type_to_u32_t(m_current_eap_type)));
+			 m_current_eap_type.get_vendor_id(),
+			 m_current_eap_type.get_vendor_type(),
+			 eap_header_string_c::get_eap_type_string(m_current_eap_type)));
 	}
 
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -5488,21 +5489,6 @@
 
 //--------------------------------------------------
 
-//
-EAP_FUNC_EXPORT eap_status_e eap_core_c::cancel_all_timers()
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
-
-	const eap_status_e status = m_partner->cancel_all_timers();
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, status);
-}
-
-//--------------------------------------------------
-
 EAP_FUNC_EXPORT eap_status_e eap_core_c::set_authentication_role(const bool when_true_set_client)
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/core/eap_core_client_message_if.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,1483 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 29 %
+*/
+
+// This is enumeration of EAPOL source code.
+#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
+	#undef EAP_FILE_NUMBER_ENUM
+	#define EAP_FILE_NUMBER_ENUM 60 
+	#undef EAP_FILE_NUMBER_DATE 
+	#define EAP_FILE_NUMBER_DATE 1127594498 
+#endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
+
+
+
+#include "eap_am_memory.h"
+#include "eap_tools.h"
+#include "eap_core_client_message_if.h"
+#include "eap_state_notification.h"
+#include "eap_network_id_selector.h"
+#include "abs_eap_am_mutex.h"
+#include "eap_config.h"
+#include "eap_core.h"
+#include "eap_buffer.h"
+#include "eap_base_type.h"
+#include "eap_automatic_variable.h"
+#include "eap_process_tlv_message_data.h"
+#include "eap_master_session_key.h"
+#include "eapol_key_types.h"
+
+#if defined(USE_EAP_SIMPLE_CONFIG)
+#include "simple_config_types.h"
+#include "simple_config_credential.h"
+#include "simple_config_payloads.h"
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+
+//--------------------------------------------------
+
+// 
+EAP_FUNC_EXPORT eap_core_client_message_if_c::~eap_core_client_message_if_c()
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_core_client_message_if_c::~eap_core_client_message_if_c(): this = 0x%08x => 0x%08x.\n"),
+		this,
+		dynamic_cast<abs_eap_base_timer_c *>(this)));
+
+	EAP_ASSERT(m_shutdown_was_called == true);
+
+	delete m_server_if;
+	m_server_if = 0;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+}
+
+//--------------------------------------------------
+
+#if defined(_WIN32) && !defined(__GNUC__)
+	#pragma warning( disable : 4355 ) // 'this' : used in base member initializer list
+#endif
+
+// 
+EAP_FUNC_EXPORT eap_core_client_message_if_c::eap_core_client_message_if_c(
+	abs_eap_am_tools_c * const tools,
+	eap_am_message_if_c * const server,
+	abs_eap_session_core_c * const partner,
+	const bool is_client_when_true)
+: m_am_tools(tools)
+, m_server_if(server)
+, m_partner(partner)
+, m_error_code(eap_status_ok)
+, m_error_function(eap_tlv_message_type_function_none)
+, m_eap_header_offset(0ul)
+, m_MTU(0ul)
+, m_trailer_length(0ul)
+, m_is_client(is_client_when_true)
+, m_is_valid(false)
+, m_shutdown_was_called(false)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_core_client_message_if_c::eap_core_client_message_if_c(): this = 0x%08x => 0x%08x.\n"),
+		this,
+		dynamic_cast<abs_eap_base_timer_c *>(this)));
+
+	set_is_valid();
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_core_client_message_if_c::process_message(eap_process_tlv_message_data_c * const message)
+{
+	// Sends message data composed of Attribute-Value Pairs.
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_client_message_if_c::send_message()");
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_core_client_message_if_c::send_message()"),
+		message->get_message_data(),
+		message->get_message_data_length()));
+
+	{
+		eap_status_e send_status = m_server_if->process_data(
+			message->get_message_data(),
+			message->get_message_data_length());
+		if (send_status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, send_status);
+		}
+
+
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, send_status);
+	}
+
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT void eap_core_client_message_if_c::set_is_valid()
+{
+	m_is_valid = true;
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT bool eap_core_client_message_if_c::get_is_valid()
+{
+	return m_is_valid;
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_core_client_message_if_c::reset()
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_core_client_message_if_c::reset(): this = 0x%08x => 0x%08x.\n"),
+		this,
+		dynamic_cast<abs_eap_base_timer_c *>(this)));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_client_message_if_c::reset()");
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_core_client_message_if_c::packet_process(
+	const eap_am_network_id_c * const receive_network_id,
+	eap_general_header_base_c * const packet_data,
+	const u32_t packet_length)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_core_client_message_if_c::packet_process(): this = 0x%08x => 0x%08x.\n"),
+		this,
+		dynamic_cast<abs_eap_base_timer_c *>(this)));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_client_message_if_c::packet_process()");
+
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	// Creates message data composed of Attribute-Value Pairs.
+	eap_process_tlv_message_data_c message(m_am_tools);
+
+	if (message.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	status = message.add_parameter_data(eap_tlv_message_type_function_packet_process);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = message.add_parameter_data(
+		receive_network_id);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	if (packet_length != packet_data->get_header_buffer_length())
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	status = message.add_parameter_data(
+		packet_data);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = process_message(&message);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_core_client_message_if_c::configure()
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	m_eap_header_offset = m_partner->get_header_offset(
+		&m_MTU, &m_trailer_length);
+
+	eap_variable_data_c client_configuration(m_am_tools);
+
+	eap_status_e status = m_partner->read_configure(
+		cf_str_EAP_read_all_configurations.get_field(),
+		&client_configuration);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = m_server_if->configure(&client_configuration);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = eap_mtu(m_MTU);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_core_client_message_if_c::shutdown()
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_core_client_message_if_c::shutdown(): this = 0x%08x => 0x%08x.\n"),
+		this,
+		dynamic_cast<abs_eap_base_timer_c *>(this)));
+
+	if (m_shutdown_was_called == true)
+	{
+		// Shutdown function was called already.
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+	}
+	m_shutdown_was_called = true;
+
+	if (m_server_if != 0)
+	{
+		(void)m_server_if->shutdown();
+	}
+
+	eap_status_e status = reset();
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+eap_status_e eap_core_client_message_if_c::eap_mtu(
+	const u32_t MTU)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_core_client_message_if_c::eap_mtu(): this = 0x%08x => 0x%08x.\n"),
+		this,
+		dynamic_cast<abs_eap_base_timer_c *>(this)));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_client_message_if_c::eap_mtu()");
+
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_eap_mtu);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(MTU);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = process_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_core_client_message_if_c::eap_acknowledge(
+	const eap_am_network_id_c * const receive_network_id)
+{
+	// Any Network Protocol packet is accepted as a success indication.
+	// This is described in RFC 2284 "PPP Extensible Authentication Protocol (EAP)".
+
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_core_client_message_if_c::eap_acknowledge(): this = 0x%08x => 0x%08x.\n"),
+		this,
+		dynamic_cast<abs_eap_base_timer_c *>(this)));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_client_message_if_c::eap_acknowledge()");
+
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	if (receive_network_id == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_eap_acknowledge);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(receive_network_id);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = process_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+#if defined(USE_EAP_CORE_SERVER)
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_core_client_message_if_c::send_eap_identity_request(
+	const eap_am_network_id_c * const receive_network_id)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_core_client_message_if_c::send_eap_identity_request(): this = 0x%08x => 0x%08x.\n"),
+		this,
+		dynamic_cast<abs_eap_base_timer_c *>(this)));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_client_message_if_c::send_eap_identity_request()");
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_send_eap_identity_request);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(receive_network_id);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = process_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+#endif //#if defined(USE_EAP_CORE_SERVER)
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_core_client_message_if_c::set_eap_database_reference_values(
+	const eap_variable_data_c * const reference)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_core_client_message_if_c::set_eap_database_reference_values(): this = 0x%08x => 0x%08x.\n"),
+		this,
+		dynamic_cast<abs_eap_base_timer_c *>(this)));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_client_message_if_c::set_eap_database_reference_values()");
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_set_eap_database_reference_values);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(reference);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = process_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_core_client_message_if_c::timer_expired(
+	const u32_t id, void *data)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("TIMER: [0x%08x]->eap_core_client_message_if_c::")
+		 EAPL("timer_expired(id 0x%02x, data 0x%08x), %s.\n"),
+		 this,
+		 id,
+		 data,
+		 (m_is_client == true) ? "client": "server"));
+
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_core_client_message_if_c::timer_delete_data(
+	const u32_t id, void *data)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("TIMER: [0x%08x]->eap_core_client_message_if_c::")
+		 EAPL("timer_delete_data(id 0x%02x, data 0x%08x).\n"),
+		this, id, data));
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_core_client_message_if_c::cancel_all_eap_sessions()
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_core_client_message_if_c::cancel_all_eap_sessions(): this = 0x%08x => 0x%08x.\n"),
+		this,
+		dynamic_cast<abs_eap_base_timer_c *>(this)));
+
+	eap_status_e status = reset();
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_core_client_message_if_c::create_eap_session(
+	const eap_am_network_id_c * const receive_network_id)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_core_client_message_if_c::create_eap_session(): this = 0x%08x => 0x%08x.\n"),
+		this,
+		dynamic_cast<abs_eap_base_timer_c *>(this)));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_client_message_if_c::create_eap_session()");
+
+	eap_status_e status(eap_status_process_general_error);
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_create_eap_session);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(receive_network_id);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = process_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_core_client_message_if_c::remove_eap_session(
+	const bool complete_to_lower_layer,
+	const eap_am_network_id_c * const receive_network_id)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_core_client_message_if_c::remove_eap_session(): this = 0x%08x => 0x%08x.\n"),
+		this,
+		dynamic_cast<abs_eap_base_timer_c *>(this)));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_client_message_if_c::remove_eap_session()");
+
+	eap_status_e status(eap_status_process_general_error);
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_remove_eap_session);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(complete_to_lower_layer);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(receive_network_id);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = process_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_core_client_message_if_c::get_802_11_authentication_mode(
+	const eap_am_network_id_c * const receive_network_id,
+	const eapol_key_authentication_type_e authentication_type,
+	const eap_variable_data_c * const SSID,
+	const eap_variable_data_c * const preshared_key)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_core_client_message_if_c::get_802_11_authentication_mode(): this = 0x%08x => 0x%08x.\n"),
+		this,
+		dynamic_cast<abs_eap_base_timer_c *>(this)));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_client_message_if_c::get_802_11_authentication_mode()");
+
+	eap_status_e status(eap_status_process_general_error);
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_get_802_11_authentication_mode);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(receive_network_id);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(authentication_type);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(SSID);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(preshared_key);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = process_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_core_client_message_if_c::packet_send(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_core_client_message_if_c::packet_send(): this = 0x%08x => 0x%08x.\n"),
+		this,
+		dynamic_cast<abs_eap_base_timer_c *>(this)));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_client_message_if_c::packet_send()");
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_am_network_id_c send_network_id(m_am_tools);
+
+	eap_status_e status = message_data.read_parameter_data(parameters, parameter_index, &send_network_id);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	++parameter_index;
+
+	eap_buf_chain_wr_c packet_buffer(eap_write_buffer, m_am_tools);
+
+	if (packet_buffer.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	{
+		eap_variable_data_c packet_data(m_am_tools);
+
+		if (packet_data.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message_data.read_parameter_data(parameters, parameter_index, &packet_data);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = packet_buffer.add_data_to_offset(m_eap_header_offset, &packet_data);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	status = m_partner->packet_send(
+		&send_network_id,
+		&packet_buffer,
+		m_eap_header_offset,
+		packet_buffer.get_data_length()-m_eap_header_offset,
+		packet_buffer.get_data_length());
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_core_client_message_if_c::state_notification(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_core_client_message_if_c::state_notification(): this = 0x%08x => 0x%08x.\n"),
+		this,
+		dynamic_cast<abs_eap_base_timer_c *>(this)));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_client_message_if_c::state_notification()");
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_state_notification_c * state = 0;
+
+	eap_status_e status = message_data.read_parameter_data(parameters, parameter_index, &state);
+	if (status != eap_status_ok)
+	{
+		delete state;
+		state = 0;
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	m_partner->state_notification(
+		state);
+
+	delete state;
+	state = 0;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_core_client_message_if_c::packet_data_crypto_keys(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_am_network_id_c send_network_id(m_am_tools);
+
+	eap_status_e status = message_data.read_parameter_data(parameters, parameter_index, &send_network_id);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	++parameter_index;
+
+	eap_type_value_e eap_type(eap_type_none);
+
+	status = message_data.read_parameter_data(parameters, parameter_index, &eap_type);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	++parameter_index;
+
+	eap_master_session_key_c master_session_key(m_am_tools, eap_type);
+
+	status = message_data.read_parameter_data(parameters, parameter_index, &master_session_key);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	master_session_key.set_eap_type(eap_type);
+
+
+	status = m_partner->packet_data_crypto_keys(
+		&send_network_id,
+		&master_session_key);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_core_client_message_if_c::restart_authentication(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_am_network_id_c send_network_id(m_am_tools);
+
+	eap_status_e status = message_data.read_parameter_data(parameters, parameter_index, &send_network_id);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	++parameter_index;
+
+	bool is_client_when_true(false);
+
+	status = message_data.read_parameter_data(parameters, parameter_index, &is_client_when_true);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	++parameter_index;
+
+	bool force_clean_restart(false);
+
+	status = message_data.read_parameter_data(parameters, parameter_index, &force_clean_restart);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	++parameter_index;
+
+	bool from_timer(false);
+
+	status = message_data.read_parameter_data(parameters, parameter_index, &from_timer);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+
+	status = m_partner->restart_authentication(
+		&send_network_id,
+		is_client_when_true,
+		force_clean_restart,
+		from_timer);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+#if defined(USE_EAP_SIMPLE_CONFIG)
+
+eap_status_e eap_core_client_message_if_c::new_protected_setup_credentials(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_status_e status(eap_status_process_general_error);
+
+#if defined(USE_EAP_SIMPLE_CONFIG)
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_array_c<simple_config_credential_c> credential_array(m_am_tools);
+
+	status = message_data.read_parameter_data(parameters, parameter_index, &credential_array);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = m_partner->save_simple_config_session(
+		simple_config_state_simple_config_success,
+		&credential_array,
+		0,
+		simple_config_Device_Password_ID_Default_PIN,
+		0);
+
+#endif //#if defined(USE_EAP_SIMPLE_CONFIG)
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+
+//--------------------------------------------------
+
+eap_status_e eap_core_client_message_if_c::complete_get_802_11_authentication_mode(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_status_e completion_status(eap_status_process_general_error);
+
+	eap_status_e status = message_data.read_parameter_data(parameters, parameter_index, eap_tlv_message_type_eap_status, &completion_status);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	++parameter_index;
+
+	eap_am_network_id_c receive_network_id(m_am_tools);
+
+	status = message_data.read_parameter_data(parameters, parameter_index, &receive_network_id);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	++parameter_index;
+
+	eapol_key_802_11_authentication_mode_e mode(eapol_key_802_11_authentication_mode_none);
+
+	status = message_data.read_parameter_data(parameters, parameter_index, &mode);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = m_partner->complete_get_802_11_authentication_mode(
+		completion_status,
+		&receive_network_id,
+		mode);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_core_client_message_if_c::complete_remove_eap_session(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	bool complete_to_lower_layer(false);
+
+	eap_status_e status = message_data.read_parameter_data(parameters, parameter_index, &complete_to_lower_layer);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	++parameter_index;
+
+	eap_am_network_id_c receive_network_id(m_am_tools);
+
+	status = message_data.read_parameter_data(parameters, parameter_index, &receive_network_id);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = m_partner->complete_remove_eap_session(
+		complete_to_lower_layer,
+		&receive_network_id);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_core_client_message_if_c::process_error_message(
+	const eap_status_e error_code,
+	const eap_tlv_message_type_function_e function)
+{
+	eap_status_e status(eap_status_ok);
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(
+			eap_tlv_message_type_error,
+			static_cast<u32_t>(error_code));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(function);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = process_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_core_client_message_if_c::process_message_type_error(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	eap_status_e status(eap_status_ok);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// Error payload is the first in this case.
+	status = message_data.read_parameter_data(parameters, eap_message_payload_index_function, eap_tlv_message_type_error, &m_error_code);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// Fuction payload is the second in this case.
+	status = message_data.read_parameter_data(parameters, eap_message_payload_index_first_parameter, &m_error_function);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_core_client_message_if_c::send_data(const void * const data, const u32_t length)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_core_client_message_if_c::send_data(): this = 0x%08x => 0x%08x.\n"),
+		this,
+		dynamic_cast<abs_eap_base_timer_c *>(this)));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_client_message_if_c::send_data()");
+
+	eap_status_e status(eap_status_process_general_error);
+
+	// Parses message data composed of Attribute-Value Pairs.
+	eap_process_tlv_message_data_c message(m_am_tools);
+
+	if (message.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	status = message.set_message_data(length, data);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_core_client_message_if_c::send_data()"),
+		message.get_message_data(),
+		message.get_message_data_length()));
+
+	eap_array_c<eap_tlv_header_c> parameters(m_am_tools);
+
+	status = message.parse_message_data(&parameters);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	if (parameters.get_object_count() == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const eap_tlv_header_c * const function_header = parameters.get_object(eap_message_payload_index_function);
+	if (function_header == 0
+		|| (function_header->get_type() != eap_tlv_message_type_error
+			&& function_header->get_type() != eap_tlv_message_type_function))
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	if (function_header->get_type() == eap_tlv_message_type_error)
+	{
+		status = process_message_type_error(&parameters);
+	}
+	else // function_header->get_type() == eap_tlv_message_type_function
+	{
+		eap_tlv_message_type_function_e function(eap_tlv_message_type_function_none);
+
+		status = message.get_parameter_data(function_header, &function);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		switch(function)
+		{
+		case eap_tlv_message_type_function_packet_send:
+			status = packet_send(&parameters);
+			break;
+		case eap_tlv_message_type_function_state_notification:
+			status = state_notification(&parameters);
+			break;
+		case eap_tlv_message_type_function_packet_data_crypto_keys:
+			status = packet_data_crypto_keys(&parameters);
+			break;
+		case eap_tlv_message_type_function_restart_authentication:
+			status = restart_authentication(&parameters);
+			break;
+#if defined(USE_EAP_SIMPLE_CONFIG)
+		case eap_tlv_message_type_function_new_protected_setup_credentials:
+			status = new_protected_setup_credentials(&parameters);
+			break;
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+		case eap_tlv_message_type_function_complete_get_802_11_authentication_mode:
+			status = complete_get_802_11_authentication_mode(&parameters);
+			break;
+		case eap_tlv_message_type_function_complete_remove_eap_session:
+			status = complete_remove_eap_session(&parameters);
+			break;
+		default:
+			EAP_TRACE_ERROR(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("ERROR: send_data(): unknown function %d.\n"),
+				 function));
+
+			EAP_ASSERT_ANYWAY_TOOLS(m_am_tools);
+
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+		};
+
+		if (status != eap_status_ok)
+		{
+			(void) process_error_message(
+				status,
+				function);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+// End.
--- a/eapol/eapol_framework/eapol_common/core/eap_core_map.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/core/eap_core_map.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/core/eap_core_nak_info.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/core/eap_core_nak_info.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/core/eap_core_retransmission.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/core/eap_core_retransmission.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8.1.2 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -32,13 +32,12 @@
 #include "eap_am_memory.h"
 #include "eap_tools.h"
 #include "eap_am_export.h"
-#include "abs_eap_core.h"
-#include "eap_core.h"
 #include "eap_base_type.h"
 #include "eap_variable_data.h"
 #include "abs_eap_base_timer.h"
 #include "eap_core_retransmission.h"
 #include "eap_buffer.h"
+#include "eap_am_network_id.h"
 
 //--------------------------------------------------
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/core/eap_core_server_message_if.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,2056 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 29 %
+*/
+
+// This is enumeration of EAPOL source code.
+#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
+	#undef EAP_FILE_NUMBER_ENUM
+	#define EAP_FILE_NUMBER_ENUM 48 
+	#undef EAP_FILE_NUMBER_DATE 
+	#define EAP_FILE_NUMBER_DATE 1127594498 
+#endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
+
+
+
+#include "eap_am_memory.h"
+#include "eap_tools.h"
+#include "eap_core_server_message_if.h"
+#include "eap_crypto_api.h"
+#include "eap_state_notification.h"
+#include "eap_automatic_variable.h"
+#include "eap_network_id_selector.h"
+#include "eap_config.h"
+#include "eap_buffer.h"
+#include "eapol_session_key.h"
+#include "eap_master_session_key.h"
+#include "eap_am_stack.h"
+
+//--------------------------------------------------
+
+// 
+EAP_FUNC_EXPORT eap_core_server_message_if_c::~eap_core_server_message_if_c()
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_core_server_message_if_c::~eap_core_server_message_if_c(): this = 0x%08x\n"),
+		this));
+
+	EAP_ASSERT(m_shutdown_was_called == true);
+
+	delete m_eap_core;
+	delete m_am_stack;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+}
+
+//--------------------------------------------------
+
+#if defined(_WIN32) && !defined(__GNUC__)
+	#pragma warning( disable : 4355 ) // 'this' : used in base member initializer list
+#endif
+
+// 
+EAP_FUNC_EXPORT eap_core_server_message_if_c::eap_core_server_message_if_c(
+	abs_eap_am_tools_c * const tools,
+	const bool is_client_when_true,
+	const u32_t MTU)
+	: m_partner(0)
+	, m_eap_core(eap_session_core_base_c::new_eap_session_core_c(tools, this, is_client_when_true, MTU))
+	, m_am_stack(new_eap_am_stack_c(tools, is_client_when_true))
+	, m_am_tools(tools)
+	, m_eap_header_offset(0u)
+	, m_MTU(MTU)
+	, m_trailer_length(0u)
+	, m_error_code(eap_status_ok)
+	, m_error_function(eap_tlv_message_type_function_none)
+	, m_is_client(is_client_when_true)
+	, m_is_valid(false)
+	, m_shutdown_was_called(false)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_core_server_message_if_c::eap_core_server_message_if_c(): %s, this = 0x%08x => 0x%08x, compiled %s %s.\n"),
+		(m_is_client == true) ? "client": "server",
+		this,
+		dynamic_cast<abs_eap_base_timer_c *>(this),
+		__DATE__,
+		__TIME__));
+
+	if (m_eap_core != 0
+		&& m_eap_core->get_is_valid() == true
+		&& m_am_stack != 0
+		&& m_am_stack->get_is_valid() == true)
+	{
+		set_is_valid();
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_core_server_message_if_c::configure(
+	const eap_variable_data_c * const client_configuration)
+{
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("%s: eap_core_server_message_if_c::configure()\n"),
+		(m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::configure()");
+
+	eap_status_e status(eap_status_process_general_error);
+
+	m_eap_header_offset = 0ul;
+	m_trailer_length = 0ul;
+
+	if (m_am_stack != 0)
+	{
+		status = m_am_stack->set_partner(
+			this
+#if defined(USE_EAP_SIMPLE_CONFIG)
+			, this
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+			);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = m_am_stack->configure(client_configuration);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+	
+	if (m_eap_core != 0)
+	{
+		status = m_eap_core->configure();
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_core_server_message_if_c::shutdown()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("%s: eap_core_server_message_if_c::shutdown(), m_shutdown_was_called=%d\n"),
+		(m_is_client == true) ? "client": "server",
+		m_shutdown_was_called));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::shutdown()");
+
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	if (m_shutdown_was_called == true)
+	{
+		// Shutdown function was called already.
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+	}
+	m_shutdown_was_called = true;
+
+	if (m_eap_core != 0)
+	{
+		(void) m_eap_core->shutdown();
+	}
+
+	if (m_am_stack != 0)
+	{
+		(void) m_am_stack->shutdown();
+	}
+
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT void eap_core_server_message_if_c::set_partner(abs_eap_am_message_if_c * const partner)
+{
+	m_partner = partner;
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_core_server_message_if_c::send_error_message(
+	const eap_status_e error_code,
+	const eap_tlv_message_type_function_e function)
+{
+	eap_status_e status(eap_status_ok);
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(
+			eap_tlv_message_type_error,
+			static_cast<u32_t>(error_code));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(function);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = send_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_core_server_message_if_c::send_message(eap_process_tlv_message_data_c * const message)
+{
+	// Sends message data composed of Attribute-Value Pairs.
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_core_client_message_if_c::send_message()"),
+		message->get_message_data(),
+		message->get_message_data_length()));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_client_message_if_c::send_message()");
+
+
+	{
+		eap_status_e send_status = m_partner->send_data(
+			message->get_message_data(),
+			message->get_message_data_length());
+		if (send_status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, send_status);
+		}
+
+
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, send_status);
+	}
+
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_core_server_message_if_c::process_message_type_error(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	eap_status_e status(eap_status_ok);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// Error payload is the first in this case.
+	status = message_data.read_parameter_data(parameters, eap_message_payload_index_function, eap_tlv_message_type_error, &m_error_code);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// Fuction payload is the second in this case.
+	status = message_data.read_parameter_data(parameters, eap_message_payload_index_first_parameter, &m_error_function);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_core_server_message_if_c::process_message(eap_process_tlv_message_data_c * const message)
+{
+	// Parses message data composed of Attribute-Value Pairs.
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_core_server_message_if_c::process_message()"),
+		message->get_message_data(),
+		message->get_message_data_length()));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::process_message()");
+
+	eap_array_c<eap_tlv_header_c> parameters(m_am_tools);
+
+	eap_status_e status = message->parse_message_data(&parameters);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+		(void) send_error_message(
+			status,
+			eap_tlv_message_type_function_none);
+
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	if (parameters.get_object_count() == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+		status = eap_status_illegal_parameter;
+
+		(void) send_error_message(
+			status,
+			eap_tlv_message_type_function_none);
+
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	const eap_tlv_header_c * const function_header = parameters.get_object(eap_message_payload_index_function);
+	if (function_header == 0
+		|| (function_header->get_type() != eap_tlv_message_type_error
+			&& function_header->get_type() != eap_tlv_message_type_function))
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+		status = eap_status_illegal_parameter;
+
+		(void) send_error_message(
+			status,
+			eap_tlv_message_type_function_none);
+
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	if (function_header->get_type() == eap_tlv_message_type_error)
+	{
+		status = process_message_type_error(&parameters);
+	}
+	else // function_header->get_type() == eap_tlv_message_type_function
+	{
+		eap_tlv_message_type_function_e function(eap_tlv_message_type_function_none);
+
+		status = message->get_parameter_data(function_header, &function);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+			(void) send_error_message(
+				status,
+				eap_tlv_message_type_function_none);
+
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		switch(function)
+		{
+		case eap_tlv_message_type_function_create_eap_session:
+			status = create_eap_session(&parameters);
+			break;
+		case eap_tlv_message_type_function_remove_eap_session:
+			status = remove_eap_session(&parameters);
+			break;
+		case eap_tlv_message_type_function_send_eap_identity_request:
+			status = send_eap_identity_request(&parameters);
+			break;
+		case eap_tlv_message_type_function_packet_process:
+			status = packet_process(&parameters);
+			break;
+		case eap_tlv_message_type_function_eap_acknowledge:
+			status = eap_acknowledge(&parameters);
+			break;
+		case eap_tlv_message_type_function_set_eap_database_reference_values:
+			status = set_eap_database_reference_values(&parameters);
+			break;
+		case eap_tlv_message_type_function_eap_mtu:
+			status = eap_mtu(&parameters);
+			break;
+		case eap_tlv_message_type_function_get_802_11_authentication_mode:
+			status = get_802_11_authentication_mode(&parameters);
+			break;
+		default:
+			EAP_TRACE_ERROR(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("ERROR: process_data(): unknown function %d.\n"),
+				 function));
+
+			status = eap_status_illegal_parameter;
+
+			EAP_ASSERT_ANYWAY_TOOLS(m_am_tools);
+		};
+
+		if (status != eap_status_ok
+			&& status != eap_status_success
+			&& status != eap_status_pending_request
+			&& status != eap_status_completed_request
+			&& status != eap_status_drop_packet_quietly)
+		{
+			(void) send_error_message(
+				status,
+				function);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+/// Function receives the data message from lower layer.
+/// Data is formatted to Attribute-Value Pairs.
+/// Look at eap_tlv_header_c and eap_tlv_message_data_c.
+EAP_FUNC_EXPORT eap_status_e eap_core_server_message_if_c::process_data(const void * const data, const u32_t length)
+{
+	eap_status_e status(eap_status_process_general_error);
+
+	{
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+			status = eap_status_allocation_error;
+
+			(void) send_error_message(
+				status,
+				eap_tlv_message_type_function_none);
+
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.set_message_data(length, data);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+			(void) send_error_message(
+				status,
+				eap_tlv_message_type_function_none);
+
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = process_message(&message);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_core_server_message_if_c::packet_send(
+	const eap_am_network_id_c * const send_network_id,
+	eap_buf_chain_wr_c * const sent_packet,
+	const u32_t header_offset,
+	const u32_t data_length,
+	const u32_t buffer_length)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+	EAP_ASSERT(header_offset < sent_packet->get_data_length());
+	EAP_ASSERT(data_length <= sent_packet->get_data_length());
+	EAP_ASSERT(sent_packet->get_data_length() <= buffer_length);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	if (sent_packet->get_do_length_checks() == true)
+	{
+		if (header_offset != 0ul)
+		{
+			EAP_TRACE_ERROR(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("ERROR: packet_send: packet buffer corrupted (header_offset != %d).\n"),
+				0ul));
+			EAP_ASSERT_ALWAYS(header_offset == 0ul);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_process_general_error);
+		}
+		else if (header_offset+data_length != sent_packet->get_data_length())
+		{
+			EAP_TRACE_ERROR(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("ERROR: packet_send: packet buffer corrupted ")
+				 EAPL("(data_length %d != sent_packet->get_data_length() %d).\n"),
+				 header_offset+data_length,
+				 sent_packet->get_data_length()));
+			EAP_ASSERT_ALWAYS(data_length == sent_packet->get_buffer_length());
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_process_general_error);
+		}
+		else if (header_offset+data_length > buffer_length)
+		{
+			EAP_TRACE_ERROR(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("ERROR: packet_send: packet buffer corrupted ")
+				 EAPL("(header_offset+data_length %d > buffer_length %d).\n"),
+				 header_offset+data_length,
+				 buffer_length));
+			EAP_ASSERT_ALWAYS(header_offset+data_length <= buffer_length);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_process_general_error);
+		}
+		else if (header_offset+data_length > m_MTU)
+		{
+			EAP_TRACE_ERROR(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("ERROR: packet_send: packet buffer corrupted ")
+				 EAPL("(header_offset+data_length %d > m_MTU %d).\n"),
+				 header_offset+data_length,
+				 m_MTU));
+			EAP_ASSERT_ALWAYS(header_offset+data_length <= m_MTU);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_process_general_error);
+		}
+	}
+	else
+	{
+		// Always we need at least the EAP header.
+		if (sent_packet->get_data_length()
+			< eap_header_base_c::get_header_length())
+		{
+			EAP_TRACE_ERROR(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("ERROR: packet_send: packet buffer corrupted ")
+				 EAPL("(sent_packet->get_data_length() %d < ")
+				 EAPL("eap_header_base_c::get_header_length() %d).\n"),
+				 sent_packet->get_data_length(),
+				 eap_header_base_c::get_header_length()));
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_process_general_error);
+		}
+	}
+	
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_packet_send);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(send_network_id);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(sent_packet);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = send_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT u32_t eap_core_server_message_if_c::get_header_offset(
+	u32_t * const MTU,
+	u32_t * const trailer_length)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	const u32_t offset = 0ul;
+
+	*MTU = m_MTU;
+	*trailer_length = m_trailer_length;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return offset;
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_core_server_message_if_c::load_module(
+	const eap_type_value_e type,
+	const eap_type_value_e tunneling_type,
+	abs_eap_base_type_c * const partner,
+	eap_base_type_c ** const eap_type,
+	const bool is_client_when_true,
+	const eap_am_network_id_c * const receive_network_id)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status = m_am_stack->load_module(
+		type,
+		tunneling_type,
+		partner,
+		eap_type,
+		is_client_when_true,
+		receive_network_id);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_core_server_message_if_c::unload_module(const eap_type_value_e type)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_ASSERT_ANYWAY_TOOLS(m_am_tools);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_core_server_message_if_c::packet_data_crypto_keys(
+	const eap_am_network_id_c * const send_network_id,
+	const eap_master_session_key_c * const master_session_key
+	)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("%s: eap_core_server_message_if_c::packet_data_crypto_keys()\n"),
+		(m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::packet_data_crypto_keys()");
+
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	if (master_session_key == 0
+		|| master_session_key->get_is_valid() == false)
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("ERROR: eap_core_server_message_if_c::packet_data_crypto_keys(), invalid key.\n")));
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_key_error);
+	}
+	
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_core_server_message_if_c::packet_data_crypto_keys(): master_session_key"), 
+		 master_session_key->get_data(),
+		 master_session_key->get_data_length()));
+	
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_packet_data_crypto_keys);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(send_network_id);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		// This adds only the EAP-type.
+		status = message.add_parameter_data(master_session_key->get_eap_type());
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		// This adds only the eap_variable_data.
+		status = message.add_parameter_data(master_session_key);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = send_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_core_server_message_if_c::complete_get_802_11_authentication_mode(
+	const eap_status_e completion_status,
+	const eap_am_network_id_c * const receive_network_id,
+	const eapol_key_802_11_authentication_mode_e mode)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("%s: eap_core_server_message_if_c::complete_get_802_11_authentication_mode()\n"),
+		(m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::complete_get_802_11_authentication_mode()");
+
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_complete_get_802_11_authentication_mode);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(completion_status);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(receive_network_id);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(mode);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = send_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_core_server_message_if_c::complete_remove_eap_session(
+	const bool complete_to_lower_layer,
+	const eap_am_network_id_c * const receive_network_id)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("%s: eap_core_server_message_if_c::complete_remove_eap_session(): complete_to_lower_layer=%s\n"),
+		(m_is_client == true) ? "client": "server",
+		(complete_to_lower_layer == true) ? "true": "false"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::complete_remove_eap_session()");
+
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_complete_remove_eap_session);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(complete_to_lower_layer);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(receive_network_id);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = send_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_core_server_message_if_c::read_configure(
+	const eap_configuration_field_c * const field,
+	eap_variable_data_c * const data)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	eap_status_e status = m_am_stack->read_configure(
+		field,
+		data);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_core_server_message_if_c::write_configure(
+	const eap_configuration_field_c * const field,
+	eap_variable_data_c * const data)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_ASSERT_ANYWAY_TOOLS(m_am_tools);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT void eap_core_server_message_if_c::set_is_valid()
+{
+	m_is_valid = true;
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT bool eap_core_server_message_if_c::get_is_valid()
+{
+	return m_is_valid;
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_core_server_message_if_c::timer_expired(
+	const u32_t id, void *data)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("TIMER: %s: [0x%08x]->eap_core_server_message_if_c::timer_expired(id 0x%02x, data 0x%08x).\n"),
+		 (m_is_client == true) ? "client": "server",
+		 this,
+		 id,
+		 data));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::timer_expired()");
+
+
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_core_server_message_if_c::timer_delete_data(
+	const u32_t id, void *data)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("TIMER: %s: [0x%08x]->eap_core_server_message_if_c::timer_delete_data(id 0x%02x, data 0x%08x).\n"),
+		(m_is_client == true) ? "client": "server",
+		this, id, data));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::timer_delete_data()");
+
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT void eap_core_server_message_if_c::state_notification(
+	const abs_eap_state_notification_c * const state)
+{
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_core_server_message_if_c::state_notification()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::state_notification()");
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			(void)EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+			return;
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_state_notification);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			(void)EAP_STATUS_RETURN(m_am_tools, status);
+			return;
+		}
+
+		status = message.add_parameter_data(state);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			(void)EAP_STATUS_RETURN(m_am_tools, status);
+			return;
+		}
+
+		status = send_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			(void)EAP_STATUS_RETURN(m_am_tools, status);
+			return;
+		}
+	}
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_core_server_message_if_c::asynchronous_init_remove_eap_session(
+	const eap_am_network_id_c * const /* send_network_id */)
+{
+	// eap_core_server_message_if_c object does not support asynchronous_init_remove_eap_session().
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_not_supported);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_core_server_message_if_c::asynchronous_start_authentication(
+	const eap_am_network_id_c * const /* receive_network_id */,
+	const bool /* is_client_when_true */)
+{
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_not_supported);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_core_server_message_if_c::restart_authentication(
+	const eap_am_network_id_c * const send_network_id,
+	const bool is_client_when_true,
+	const bool force_clean_restart,
+	const bool from_timer)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("%s: eap_core_server_message_if_c::restart_authentication()\n"),
+		(m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::restart_authentication()");
+
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_restart_authentication);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(send_network_id);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(is_client_when_true);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(force_clean_restart);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(from_timer);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = send_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_core_server_message_if_c::set_timer(
+	abs_eap_base_timer_c * const p_initializer, 
+	const u32_t p_id, 
+	void * const p_data,
+	const u32_t p_time_ms)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	eap_status_e status = m_am_stack->set_timer(
+		p_initializer, 
+		p_id, 
+		p_data,
+		p_time_ms);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_core_server_message_if_c::cancel_timer(
+	abs_eap_base_timer_c * const p_initializer, 
+	const u32_t p_id)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	eap_status_e status(eap_status_ok);
+
+	if (m_am_stack != 0)
+	{
+		status = m_am_stack->cancel_timer(
+			p_initializer, 
+			p_id);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_core_server_message_if_c::check_is_valid_eap_type(
+	const eap_type_value_e eap_type)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	eap_status_e status = m_am_stack->check_is_valid_eap_type(eap_type);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_core_server_message_if_c::get_eap_type_list(
+	eap_array_c<eap_type_value_e> * const eap_type_list)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status = m_am_stack->get_eap_type_list(eap_type_list);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+/// @see abs_eap_core_c::add_rogue_ap().
+EAP_FUNC_EXPORT eap_status_e eap_core_server_message_if_c::add_rogue_ap(
+	eap_array_c<eap_rogue_ap_entry_c> & rogue_ap_list)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_core_server_message_if_c::add_rogue_ap(): Does nothing.\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	eap_status_e status(eap_status_ok);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_core_server_message_if_c::set_session_timeout(
+	const u32_t /* session_timeout_ms */)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_not_supported);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_core_server_message_if_c::create_eap_session(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_core_server_message_if_c::create_eap_session()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::create_eap_session()");
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_status_e status(eap_status_ok);
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_am_network_id_c receive_network_id(m_am_tools);
+
+	status = message_data.read_parameter_data(parameters, parameter_index, &receive_network_id);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = m_eap_core->create_eap_session(
+		&receive_network_id ///< source includes remote address, destination includes local address.
+		);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_core_server_message_if_c::remove_eap_session(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_core_server_message_if_c::remove_eap_session()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::remove_eap_session()");
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_status_e status(eap_status_ok);
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	bool complete_to_lower_layer(false);
+
+	status = message_data.read_parameter_data(parameters, parameter_index, &complete_to_lower_layer);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	++parameter_index;
+
+	eap_am_network_id_c receive_network_id(m_am_tools);
+
+	status = message_data.read_parameter_data(parameters, parameter_index, &receive_network_id);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = m_eap_core->remove_eap_session(
+		complete_to_lower_layer,
+		&receive_network_id ///< source includes remote address, destination includes local address.
+		);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	// This is a new function to synchronize EAP-client and EAP-server.
+	eap_status_e completion_status = complete_remove_eap_session(
+		complete_to_lower_layer,
+		&receive_network_id ///< source includes remote address, destination includes local address.
+		);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, completion_status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_core_server_message_if_c::send_eap_identity_request(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_core_server_message_if_c::send_eap_identity_request()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::send_eap_identity_request()");
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_status_e status(eap_status_ok);
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_am_network_id_c receive_network_id(m_am_tools);
+
+	status = message_data.read_parameter_data(parameters, parameter_index, &receive_network_id);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = m_eap_core->send_eap_identity_request(
+		&receive_network_id ///< source includes remote address, destination includes local address.
+		);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_core_server_message_if_c::packet_process(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_core_server_message_if_c::packet_process()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::packet_process()");
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_status_e status(eap_status_ok);
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_am_network_id_c receive_network_id(m_am_tools);
+
+	status = message_data.read_parameter_data(parameters, parameter_index, &receive_network_id);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	++parameter_index;
+
+	eap_variable_data_c packet_data_payload(m_am_tools);
+
+	status = message_data.read_parameter_data(parameters, parameter_index, &packet_data_payload);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_header_wr_c eap(
+		m_am_tools,
+		packet_data_payload.get_data(),
+		packet_data_payload.get_data_length());
+	if (eap.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	status = m_eap_core->packet_process(
+		&receive_network_id,
+		&eap,
+		packet_data_payload.get_data_length()
+		);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_core_server_message_if_c::eap_acknowledge(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_core_server_message_if_c::eap_acknowledge()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::eap_acknowledge()");
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_status_e status(eap_status_ok);
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_am_network_id_c receive_network_id(m_am_tools);
+
+	status = message_data.read_parameter_data(parameters, parameter_index, &receive_network_id);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = m_eap_core->eap_acknowledge(
+		&receive_network_id ///< source includes remote address, destination includes local address.
+		);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_core_server_message_if_c::eap_mtu(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_core_server_message_if_c::eap_mtu()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::eap_mtu()");
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_status_e status(eap_status_ok);
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = message_data.read_parameter_data(parameters, parameter_index, &m_MTU);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_core_server_message_if_c::get_802_11_authentication_mode(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_core_server_message_if_c::get_802_11_authentication_mode()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::get_802_11_authentication_mode()");
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_status_e status(eap_status_ok);
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_am_network_id_c receive_network_id(m_am_tools);
+
+	status = message_data.read_parameter_data(parameters, parameter_index, &receive_network_id);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	++parameter_index;
+
+	eapol_key_authentication_type_e authentication_type(eapol_key_authentication_type_none);
+
+	status = message_data.read_parameter_data(parameters, parameter_index, &authentication_type);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	++parameter_index;
+
+	eap_variable_data_c SSID(m_am_tools);
+
+	status = message_data.read_parameter_data(parameters, parameter_index, &SSID);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	++parameter_index;
+
+	eap_variable_data_c preshared_key(m_am_tools);
+
+	status = message_data.read_parameter_data(parameters, parameter_index, &preshared_key);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (authentication_type == eapol_key_authentication_type_WPS)
+	{
+		// Save SSID and pre-shared key for WPS to memory store.
+		eap_variable_data_c memory_store_key(m_am_tools);
+
+		eap_status_e status = memory_store_key.set_copy_of_buffer(
+			EAP_WPS_CONFIGURATION_MEMORY_STORE_KEY,
+			sizeof(EAP_WPS_CONFIGURATION_MEMORY_STORE_KEY));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = memory_store_key.add_data(
+			&m_is_client,
+			sizeof(m_is_client));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		eap_network_id_selector_c state_selector(
+			m_am_tools,
+			&receive_network_id);
+
+		status = memory_store_key.add_data(
+			&state_selector);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		eap_tlv_message_data_c tlv_data(m_am_tools);
+
+		status = tlv_data.add_message_data(
+			eap_type_protected_setup_stored_preshared_key,
+			preshared_key.get_data_length(),
+			preshared_key.get_data());
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = tlv_data.add_message_data(
+			eap_type_protected_setup_stored_ssid,
+			SSID.get_data_length(),
+			SSID.get_data());
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = m_am_tools->memory_store_remove_data(&memory_store_key);
+		if (status != eap_status_ok
+			&& status != eap_status_not_found)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = m_am_tools->memory_store_add_data(
+			&memory_store_key,
+			&tlv_data,
+			eap_type_default_credential_timeout);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_ERROR(
+				m_am_tools,
+				TRACE_FLAGS_ERROR,
+				(EAPL("eap_core_server_message_if_c::get_802_11_authentication_mode(): cannot store WPS credentials\n")));
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = m_am_stack->get_802_11_authentication_mode(
+		&receive_network_id, ///< source includes remote address, destination includes local address.
+		authentication_type);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_core_server_message_if_c::set_eap_database_reference_values(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_core_server_message_if_c::set_eap_database_reference_values()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::set_eap_database_reference_values()");
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_status_e status(eap_status_ok);
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_variable_data_c reference(m_am_tools);
+
+	status = message_data.read_parameter_data(parameters, parameter_index, &reference);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = m_am_stack->set_eap_database_reference_values(
+		&reference
+		);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+#if defined(USE_EAP_SIMPLE_CONFIG)
+
+EAP_FUNC_EXPORT eap_status_e eap_core_server_message_if_c::save_simple_config_session(
+	const simple_config_state_e state,
+	EAP_TEMPLATE_CONST eap_array_c<simple_config_credential_c> * const credential_array,
+	const eap_variable_data_c * const new_password,
+	const simple_config_Device_Password_ID_e Device_Password_ID,
+	const simple_config_payloads_c * const other_configuration)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_core_server_message_if_c::save_simple_config_session()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::save_simple_config_session()");
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	// Message is formatted as:
+	// 0                   1                   2                   3   
+	//  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 
+	// +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+	// |                    Type = Function                            |
+	// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	// |                    Length = 4                                 |
+	// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	// |                    Value = New_protected_setup_credentials    |
+	// +#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+ <= start of Array of Protected setup credential
+	// |                    Type = Array                               |
+	// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	// |                    Length = 137                               |
+	// +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ <= start of Array of Protected setup credential value
+	// |                    Type = Protected setup credential          |
+	// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	// |                    Length = 129                               |
+	// +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+	// |                    Type = Unsigned 8 bit integer              |
+	// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	// |                    Length = 1                                 |
+	// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	// |   u8_t value  |
+	// +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+	// |                    Type = Variable data                       |
+	// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	// |                    Length = 12                                |
+	// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	// |                    Value = SSID string                        |
+	// +-+-+-+-                                                 -+-+-+-+
+	// |                                                               |
+	// +-+-+-+-                                                 -+-+-+-+
+	// |                                                               |
+	// +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+	// |                    Type = Unsigned 16 bit integer             |
+	// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	// |                    Length = 2                                 |
+	// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	// |   u16_t Authentication type   |
+	// +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+	// |                    Type = Unsigned 16 bit integer             |
+	// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	// |                    Length = 2                                 |
+	// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	// |   u16_t Encryption type       |
+	// +#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+ <= start of Array of Network key
+	// |                    Type = Array                               |
+	// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	// |                    Length = 66                                |
+	// +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ <= start of Array of Network key value
+	// |                    Type = Network key                         |
+	// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	// |                    Length = 25                                |
+	// +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+	// |                    Type = Unsigned 8 bit integer              |
+	// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	// |                    Length = 1                                 |
+	// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	// |   u8_t value  |
+	// +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+	// |                    Type = Variable data                       |
+	// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	// |                    Length = 8                                 |
+	// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	// |                    Value = Network key                        |
+	// +-+-+-+-                                                 -+-+-+-+
+	// |                                                               |
+	// +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+	// |                    Type = Network key                         |
+	// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	// |                    Length = 25                                |
+	// +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+	// |                    Type = Unsigned 8 bit integer              |
+	// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	// |                    Length = 1                                 |
+	// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	// |   u8_t value  |
+	// +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
+	// |                    Type = Variable data                       |
+	// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	// |                    Length = 8                                 |
+	// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	// |                    Value = Network key                        |
+	// +-+-+-+-                                                 -+-+-+-+
+	// |                                                               |
+	// +#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+ <= end of Array of Network key
+	// |                    Type = Variable data                       |
+	// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	// |                    Length = 6                                 |
+	// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	// |                    Value = MAC address                        |
+	// +-+-+-+-                        +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	// |                               |
+	// +#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+                                 <= end of Array of Protected setup credential
+
+
+	eap_status_e status(eap_status_ok);
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_new_protected_setup_credentials);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(credential_array);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = send_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+
+//--------------------------------------------------
+
+eap_am_message_if_c * eap_am_message_if_c::new_eap_am_server_message_if_c(
+	abs_eap_am_tools_c * const tools,
+	const bool is_client_when_true,
+	const u32_t MTU)
+{
+	eap_am_message_if_c * server = new eap_core_server_message_if_c(
+		tools,
+		is_client_when_true,
+		MTU);
+
+	eap_automatic_variable_c<eap_am_message_if_c> automatic_server(
+		tools,
+		server);
+
+	if (server == 0
+		|| server->get_is_valid() == false)
+	{
+		// ERROR.
+		if (server != 0)
+		{
+			EAP_TRACE_DEBUG(
+				tools,
+				TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+				(EAPL("ERROR: calls: eap_am_message_if_c::new_eap_am_server_message_if_c(): server->shutdown(): %s.\n"),
+				(is_client_when_true == true) ? "client": "server"));
+
+			server->shutdown();
+		}
+
+		return 0;
+	}
+
+	automatic_server.do_not_free_variable();
+
+	return server;
+}
+
+//--------------------------------------------------
+// End.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/core/eap_general_settings_client_message_if.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,805 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Class creates and reads the messages used in EAP-general settings interface on the client side.
+*
+*/
+
+/*
+* %version: 11 %
+*/
+
+#include "eap_am_tools.h"
+#include "eap_tools.h"
+#include "eap_am_export.h"
+#include "eap_am_assert.h"
+#include "eap_general_settings_client_message_if.h"
+#include "abs_eap_plugin_message.h"
+#include "abs_eap_am_message_if.h"
+#include "eap_am_message_if.h"
+#include "eap_automatic_variable.h"
+#include "eap_process_tlv_message_data.h"
+#include "eap_method_settings.h"
+#include "eap_am_network_id.h"
+#include "abs_eap_general_settings_message.h"
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_general_settings_client_message_if_c::~eap_general_settings_client_message_if_c()
+{
+	delete m_client_if;
+	m_client_if = 0;
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_general_settings_client_message_if_c::eap_general_settings_client_message_if_c(
+	abs_eap_am_tools_c * const tools,
+	eap_am_message_if_c * const client_if,
+	abs_eap_general_settings_message_c * const partner)
+: m_am_tools(tools)
+, m_client_if(client_if)
+, m_partner(partner)
+, m_is_valid(false)
+, m_error_code(eap_status_ok)
+, m_error_function(eap_tlv_message_type_function_none)
+{
+	if (m_am_tools == 0
+		|| m_am_tools->get_is_valid() == false
+		|| m_client_if == 0
+		|| m_client_if->get_is_valid() == false
+		|| m_partner == 0)
+	{
+		return;
+	}
+
+	m_is_valid = true;
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_general_settings_client_message_if_c::reset()
+{
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+// This is documented in abs_eap_stack_interface_c::configure().
+EAP_FUNC_EXPORT eap_status_e eap_general_settings_client_message_if_c::configure()
+{
+	eap_status_e status(eap_status_process_general_error);
+
+	if (m_client_if != 0)
+	{
+		status = m_client_if->configure(0);
+	}
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+// This is documented in abs_eap_stack_interface_c::shutdown().
+EAP_FUNC_EXPORT eap_status_e eap_general_settings_client_message_if_c::shutdown()
+{
+	eap_status_e status(eap_status_process_general_error);
+
+	if (m_client_if != 0)
+	{
+		status = m_client_if->shutdown();
+	}
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+// This is documented in abs_eap_stack_interface_c::get_is_valid().
+EAP_FUNC_EXPORT bool eap_general_settings_client_message_if_c::get_is_valid()
+{
+	return m_is_valid;
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_general_settings_client_message_if_c::process_message(eap_process_tlv_message_data_c * const message)
+{
+	// Process message data composed of Attribute-Value Pairs.
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_general_settings_client_message_if_c::process_message(): this = 0x%08x, m_client_if=0x%08x.\n"),
+		this,
+		m_client_if));
+
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_client_message_if_c::send_message()");
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_general_settings_client_message_if_c::process_message()"),
+		message->get_message_data(),
+		message->get_message_data_length()));
+
+	eap_status_e send_status = m_client_if->process_data(
+		message->get_message_data(),
+		message->get_message_data_length());
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, send_status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_general_settings_client_message_if_c::set_eap_methods(const eap_method_settings_c * const internal_settings)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_general_settings_client_message_if_c::set_eap_methods(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_client_message_if_c::set_eap_methods()");
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_general_settings_set_eap_methods);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(internal_settings);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = process_message(&message);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_general_settings_client_message_if_c::get_eap_methods(const eap_method_settings_c * const internal_settings)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_general_settings_client_message_if_c::get_eap_methods(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_client_message_if_c::get_eap_methods()");
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_general_settings_get_eap_methods);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(internal_settings);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = process_message(&message);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_general_settings_client_message_if_c::get_certificate_lists(const eap_method_settings_c * const internal_settings)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_general_settings_client_message_if_c::get_certificate_lists(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_client_message_if_c::get_certificate_lists()");
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_general_settings_get_certificate_lists);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(internal_settings);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = process_message(&message);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_general_settings_client_message_if_c::delete_all_eap_settings(const eap_method_settings_c * const internal_settings)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_general_settings_client_message_if_c::delete_all_eap_settings(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_client_message_if_c::delete_all_eap_settings()");
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_general_settings_delete_all_eap_settings);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(internal_settings);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = process_message(&message);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_general_settings_client_message_if_c::copy_all_eap_settings(const eap_method_settings_c * const internal_settings)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_general_settings_client_message_if_c::copy_all_eap_settings(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_client_message_if_c::copy_all_eap_settings()");
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_general_settings_copy_all_eap_settings);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(internal_settings);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = process_message(&message);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_general_settings_client_message_if_c::complete_set_eap_methods(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_general_settings_client_message_if_c::complete_set_eap_methods(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_client_message_if_c::complete_set_eap_methods()");
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_method_settings_c * const internal_settings = new eap_method_settings_c(m_am_tools);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_internal_settings(m_am_tools, internal_settings);
+
+	if (internal_settings == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	eap_status_e status = message_data.read_parameter_data(parameters, parameter_index, internal_settings);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = m_partner->complete_set_eap_methods(
+		internal_settings->m_completion_status);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_general_settings_client_message_if_c::complete_get_eap_methods(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_general_settings_client_message_if_c::complete_get_eap_methods(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_client_message_if_c::complete_get_eap_methods()");
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_method_settings_c * const internal_settings = new eap_method_settings_c(m_am_tools);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_internal_settings(m_am_tools, internal_settings);
+
+	if (internal_settings == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	eap_status_e status = message_data.read_parameter_data(parameters, parameter_index, internal_settings);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = m_partner->complete_get_eap_methods(
+		internal_settings);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_general_settings_client_message_if_c::complete_get_certificate_lists(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_general_settings_client_message_if_c::complete_get_certificate_lists(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_client_message_if_c::complete_get_certificate_lists()");
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_method_settings_c * const internal_settings = new eap_method_settings_c(m_am_tools);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_internal_settings(m_am_tools, internal_settings);
+
+	if (internal_settings == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	eap_status_e status = message_data.read_parameter_data(parameters, parameter_index, internal_settings);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = m_partner->complete_get_certificate_lists(
+		internal_settings);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_general_settings_client_message_if_c::complete_delete_all_eap_settings(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_general_settings_client_message_if_c::complete_delete_all_eap_settings(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_client_message_if_c::complete_delete_all_eap_settings()");
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_method_settings_c * const internal_settings = new eap_method_settings_c(m_am_tools);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_internal_settings(m_am_tools, internal_settings);
+
+	if (internal_settings == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	eap_status_e status = message_data.read_parameter_data(parameters, parameter_index, internal_settings);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = m_partner->complete_delete_all_eap_settings(
+		internal_settings->m_completion_status);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_general_settings_client_message_if_c::complete_copy_all_eap_settings(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_general_settings_client_message_if_c::complete_copy_all_eap_settings(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_client_message_if_c::complete_copy_all_eap_settings()");
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_method_settings_c * const internal_settings = new eap_method_settings_c(m_am_tools);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_internal_settings(m_am_tools, internal_settings);
+
+	if (internal_settings == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	eap_status_e status = message_data.read_parameter_data(parameters, parameter_index, internal_settings);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = m_partner->complete_copy_all_eap_settings(
+		internal_settings->m_completion_status);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_general_settings_client_message_if_c::process_message_type_error(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_general_settings_client_message_if_c::process_message_type_error(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_client_message_if_c::process_message_type_error()");
+
+	eap_status_e status(eap_status_ok);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// Error payload is the first in this case.
+	status = message_data.read_parameter_data(parameters, eap_message_payload_index_function, eap_tlv_message_type_error, &m_error_code);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// Fuction payload is the second in this case.
+	status = message_data.read_parameter_data(parameters, eap_message_payload_index_first_parameter, &m_error_function);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_general_settings_client_message_if_c::send_data(const void * const data, const u32_t length)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_general_settings_client_message_if_c::send_data(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_client_message_if_c::send_data()");
+
+	eap_status_e status(eap_status_process_general_error);
+
+	// Parses message data composed of Attribute-Value Pairs.
+	eap_process_tlv_message_data_c message(m_am_tools);
+
+	if (message.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	status = message.set_message_data(length, data);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_general_settings_client_message_if_c::send_data()"),
+		message.get_message_data(),
+		message.get_message_data_length()));
+
+	eap_array_c<eap_tlv_header_c> parameters(m_am_tools);
+
+	status = message.parse_message_data(&parameters);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	if (parameters.get_object_count() == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const eap_tlv_header_c * const function_header = parameters.get_object(eap_message_payload_index_function);
+	if (function_header == 0
+		|| (function_header->get_type() != eap_tlv_message_type_error
+			&& function_header->get_type() != eap_tlv_message_type_function))
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	if (function_header->get_type() == eap_tlv_message_type_error)
+	{
+		status = process_message_type_error(&parameters);
+	}
+	else
+	{
+		eap_tlv_message_type_function_e function(eap_tlv_message_type_function_none);
+
+		status = message.get_parameter_data(function_header, &function);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		switch(function)
+		{
+		case eap_tlv_message_type_function_general_settings_complete_set_eap_methods:
+			status = complete_set_eap_methods(&parameters);
+			break;
+		case eap_tlv_message_type_function_general_settings_complete_get_eap_methods:
+			status = complete_get_eap_methods(&parameters);
+			break;
+		case eap_tlv_message_type_function_general_settings_complete_get_certificate_lists:
+			status = complete_get_certificate_lists(&parameters);
+			break;
+		case eap_tlv_message_type_function_general_settings_complete_delete_all_eap_settings:
+			status = complete_delete_all_eap_settings(&parameters);
+			break;
+		case eap_tlv_message_type_function_general_settings_complete_copy_all_eap_settings:
+			status = complete_copy_all_eap_settings(&parameters);
+			break;
+		default:
+			EAP_TRACE_ERROR(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("ERROR: send_data(): unknown function %d.\n"),
+				 function));
+
+			EAP_ASSERT_ANYWAY_TOOLS(m_am_tools);
+
+			status = eap_status_illegal_parameter;
+		};
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+// End.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/core/eap_general_settings_message.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Class is interface from user of EAP-general settings to eap_general_settings_client_message_if_c.
+*
+*/
+
+/*
+* %version: 4 %
+*/
+
+#include "eap_am_tools.h"
+#include "eap_am_export.h"
+#include "eap_general_settings_message.h"
+
+EAP_FUNC_EXPORT  eap_general_settings_message_c::~eap_general_settings_message_c()
+{
+}
+
+EAP_FUNC_EXPORT eap_general_settings_message_c::eap_general_settings_message_c()
+{
+}
+
+//--------------------------------------------------
+// End.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/core/eap_general_settings_server_message_if.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,977 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Class creates and reads the messages used in EAP-general settings interface on the server side.
+*
+*/
+
+/*
+* %version: 11 %
+*/
+
+// This is enumeration of EAPOL source code.
+#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
+	#undef EAP_FILE_NUMBER_ENUM
+	#define EAP_FILE_NUMBER_ENUM 48 
+	#undef EAP_FILE_NUMBER_DATE 
+	#define EAP_FILE_NUMBER_DATE 1127594498 
+#endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
+
+
+
+#include "eap_am_memory.h"
+#include "eap_tools.h"
+#include "eap_general_settings_server_message_if.h"
+#include "eap_crypto_api.h"
+#include "eap_state_notification.h"
+#include "eap_automatic_variable.h"
+#include "eap_network_id_selector.h"
+#include "eap_config.h"
+#include "eap_am_general_settings.h"
+
+//--------------------------------------------------
+
+// 
+EAP_FUNC_EXPORT eap_general_settings_server_message_if_c::~eap_general_settings_server_message_if_c()
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_general_settings_server_message_if_c::~eap_general_settings_server_message_if_c(): this = 0x%08x\n"),
+		this));
+
+	EAP_ASSERT(m_shutdown_was_called == true);
+
+	delete m_am_settings;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+}
+
+//--------------------------------------------------
+
+#if defined(_WIN32) && !defined(__GNUC__)
+	#pragma warning( disable : 4355 ) // 'this' : used in base member initializer list
+#endif
+
+// 
+EAP_FUNC_EXPORT eap_general_settings_server_message_if_c::eap_general_settings_server_message_if_c(
+	abs_eap_am_tools_c * const tools)
+	: m_partner(0)
+	, m_am_settings(new_eap_am_general_settings_c(tools, this))
+	, m_am_tools(tools)
+	, m_error_code(eap_status_ok)
+	, m_error_function(eap_tlv_message_type_function_none)
+	, m_is_valid(false)
+	, m_shutdown_was_called(false)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_general_settings_server_message_if_c::eap_general_settings_server_message_if_c(): %s, this = 0x%08x => 0x%08x, compiled %s %s.\n"),
+		(m_is_client == true) ? "client": "server",
+		this,
+		dynamic_cast<abs_eap_base_timer_c *>(this),
+		__DATE__,
+		__TIME__));
+
+	if (m_am_settings != 0
+		&& m_am_settings->get_is_valid() == true)
+	{
+		set_is_valid();
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_general_settings_server_message_if_c::configure(
+	const eap_variable_data_c * const client_configuration)
+{
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("%s: eap_general_settings_server_message_if_c::configure()\n"),
+		(m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_server_message_if_c::configure()");
+
+	eap_status_e status(eap_status_process_general_error);
+
+	if (m_am_settings != 0)
+	{
+		status = m_am_settings->configure();
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_general_settings_server_message_if_c::shutdown()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("%s: eap_general_settings_server_message_if_c::shutdown(), m_shutdown_was_called=%d\n"),
+		(m_is_client == true) ? "client": "server",
+		m_shutdown_was_called));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_server_message_if_c::shutdown()");
+
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	if (m_shutdown_was_called == true)
+	{
+		// Shutdown function was called already.
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+	}
+	m_shutdown_was_called = true;
+
+	if (m_am_settings != 0)
+	{
+		(void) m_am_settings->shutdown();
+	}
+
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT void eap_general_settings_server_message_if_c::set_partner(abs_eap_am_message_if_c * const partner)
+{
+	m_partner = partner;
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_general_settings_server_message_if_c::send_error_message(
+	const eap_status_e error_code,
+	const eap_tlv_message_type_function_e function)
+{
+	eap_status_e status(eap_status_ok);
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(
+			eap_tlv_message_type_error,
+			static_cast<u32_t>(error_code));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(function);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = send_message(&message);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_general_settings_server_message_if_c::send_message(eap_process_tlv_message_data_c * const message)
+{
+	// Sends message data composed of Attribute-Value Pairs.
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_core_client_message_if_c::send_message()"),
+		message->get_message_data(),
+		message->get_message_data_length()));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_client_message_if_c::send_message()");
+
+
+	eap_status_e send_status = m_partner->send_data(
+		message->get_message_data(),
+		message->get_message_data_length());
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, send_status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_general_settings_server_message_if_c::process_message_type_error(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	eap_status_e status(eap_status_ok);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// Error payload is the first in this case.
+	status = message_data.read_parameter_data(parameters, eap_message_payload_index_function, eap_tlv_message_type_error, &m_error_code);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// Fuction payload is the second in this case.
+	status = message_data.read_parameter_data(parameters, eap_message_payload_index_first_parameter, &m_error_function);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_general_settings_server_message_if_c::process_message(eap_process_tlv_message_data_c * const message)
+{
+	// Parses message data composed of Attribute-Value Pairs.
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_general_settings_server_message_if_c::process_message()"),
+		message->get_message_data(),
+		message->get_message_data_length()));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_server_message_if_c::process_message()");
+
+	eap_array_c<eap_tlv_header_c> parameters(m_am_tools);
+
+	eap_status_e status = message->parse_message_data(&parameters);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+		(void) send_error_message(
+			status,
+			eap_tlv_message_type_function_none);
+
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	if (parameters.get_object_count() == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+		status = eap_status_illegal_parameter;
+
+		(void) send_error_message(
+			status,
+			eap_tlv_message_type_function_none);
+
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	const eap_tlv_header_c * const function_header = parameters.get_object(eap_message_payload_index_function);
+	if (function_header == 0
+		|| (function_header->get_type() != eap_tlv_message_type_error
+			&& function_header->get_type() != eap_tlv_message_type_function))
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+		status = eap_status_illegal_parameter;
+
+		(void) send_error_message(
+			status,
+			eap_tlv_message_type_function_none);
+
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	if (function_header->get_type() == eap_tlv_message_type_error)
+	{
+		status = process_message_type_error(&parameters);
+	}
+	else // function_header->get_type() == eap_tlv_message_type_function
+	{
+		eap_tlv_message_type_function_e function(eap_tlv_message_type_function_none);
+
+		status = message->get_parameter_data(function_header, &function);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+			(void) send_error_message(
+				status,
+				eap_tlv_message_type_function_none);
+
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		switch(function)
+		{
+		case eap_tlv_message_type_function_general_settings_set_eap_methods:
+			status = set_eap_methods(&parameters);
+			break;
+		case eap_tlv_message_type_function_general_settings_get_eap_methods:
+			status = get_eap_methods(&parameters);
+			break;
+		case eap_tlv_message_type_function_general_settings_get_certificate_lists:
+			status = get_certificate_lists(&parameters);
+			break;
+		case eap_tlv_message_type_function_general_settings_delete_all_eap_settings:
+			status = delete_all_eap_settings(&parameters);
+			break;
+		case eap_tlv_message_type_function_general_settings_copy_all_eap_settings:
+			status = copy_all_eap_settings(&parameters);
+			break;
+		default:
+			EAP_TRACE_ERROR(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("ERROR: process_data(): unknown function %d.\n"),
+				 function));
+
+			status = eap_status_illegal_parameter;
+
+			EAP_ASSERT_ANYWAY_TOOLS(m_am_tools);
+		};
+
+		if (status != eap_status_ok
+			&& status != eap_status_success
+			&& status != eap_status_pending_request
+			&& status != eap_status_completed_request
+			&& status != eap_status_drop_packet_quietly)
+		{
+			(void) send_error_message(
+				status,
+				function);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+/// Function receives the data message from lower layer.
+/// Data is formatted to Attribute-Value Pairs.
+/// Look at eap_tlv_header_c and eap_tlv_message_data_c.
+EAP_FUNC_EXPORT eap_status_e eap_general_settings_server_message_if_c::process_data(const void * const data, const u32_t length)
+{
+	eap_status_e status(eap_status_process_general_error);
+
+	{
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+			status = eap_status_allocation_error;
+
+			(void) send_error_message(
+				status,
+				eap_tlv_message_type_function_none);
+
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.set_message_data(length, data);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+			(void) send_error_message(
+				status,
+				eap_tlv_message_type_function_none);
+
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = process_message(&message);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT void eap_general_settings_server_message_if_c::set_is_valid()
+{
+	m_is_valid = true;
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT bool eap_general_settings_server_message_if_c::get_is_valid()
+{
+	return m_is_valid;
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_general_settings_server_message_if_c::timer_expired(
+	const u32_t id, void *data)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("TIMER: %s: [0x%08x]->eap_general_settings_server_message_if_c::timer_expired(id 0x%02x, data 0x%08x).\n"),
+		 (m_is_client == true) ? "client": "server",
+		 this,
+		 id,
+		 data));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_server_message_if_c::timer_expired()");
+
+
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_general_settings_server_message_if_c::timer_delete_data(
+	const u32_t id, void *data)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("TIMER: %s: [0x%08x]->eap_general_settings_server_message_if_c::timer_delete_data(id 0x%02x, data 0x%08x).\n"),
+		(m_is_client == true) ? "client": "server",
+		this, id, data));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_server_message_if_c::timer_delete_data()");
+
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_general_settings_server_message_if_c::set_eap_methods(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_general_settings_server_message_if_c::set_eap_methods()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_server_message_if_c::set_eap_methods()");
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_status_e status(eap_status_ok);
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_method_settings_c internal_settings(m_am_tools);
+
+	status = message_data.read_parameter_data(parameters, parameter_index, &internal_settings);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = m_am_settings->set_eap_methods(
+		&internal_settings
+		);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_general_settings_server_message_if_c::get_eap_methods(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_general_settings_server_message_if_c::get_eap_methods()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_server_message_if_c::get_eap_methods()");
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_status_e status(eap_status_ok);
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_method_settings_c internal_settings(m_am_tools);
+
+	status = message_data.read_parameter_data(parameters, parameter_index, &internal_settings);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = m_am_settings->get_eap_methods(
+		&internal_settings
+		);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_general_settings_server_message_if_c::get_certificate_lists(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_general_settings_server_message_if_c::get_certificate_lists()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_server_message_if_c::get_certificate_lists()");
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_status_e status(eap_status_ok);
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_method_settings_c internal_settings(m_am_tools);
+
+	status = message_data.read_parameter_data(parameters, parameter_index, &internal_settings);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = m_am_settings->get_certificate_lists(
+		&internal_settings
+		);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_general_settings_server_message_if_c::delete_all_eap_settings(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_general_settings_server_message_if_c::get_certificate_lists()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_server_message_if_c::delete_all_eap_settings()");
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_status_e status(eap_status_ok);
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_method_settings_c internal_settings(m_am_tools);
+
+	status = message_data.read_parameter_data(parameters, parameter_index, &internal_settings);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = m_am_settings->delete_all_eap_settings(
+		&internal_settings
+		);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_general_settings_server_message_if_c::copy_all_eap_settings(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_general_settings_server_message_if_c::get_certificate_lists()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_general_settings_server_message_if_c::copy_all_eap_settings()");
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_status_e status(eap_status_ok);
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_method_settings_c internal_settings(m_am_tools);
+
+	status = message_data.read_parameter_data(parameters, parameter_index, &internal_settings);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = m_am_settings->copy_all_eap_settings(
+		&internal_settings
+		);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_general_settings_server_message_if_c::complete_set_eap_methods(const eap_method_settings_c * const internal_settings)
+{
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_core_server_message_if_c::complete_set_eap_methods()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::complete_set_eap_methods()");
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_general_settings_complete_set_eap_methods);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(internal_settings);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = send_message(&message);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_general_settings_server_message_if_c::complete_get_eap_methods(const eap_method_settings_c * const internal_settings)
+{
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_core_server_message_if_c::complete_get_eap_methods()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::complete_get_eap_methods()");
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_general_settings_complete_get_eap_methods);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(internal_settings);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = send_message(&message);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_general_settings_server_message_if_c::complete_get_certificate_lists(const eap_method_settings_c * const internal_settings)
+{
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_core_server_message_if_c::complete_get_certificate_lists()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::complete_get_certificate_lists()");
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_general_settings_complete_get_certificate_lists);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(internal_settings);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = send_message(&message);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_general_settings_server_message_if_c::complete_delete_all_eap_settings(const eap_method_settings_c * const internal_settings)
+{
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_core_server_message_if_c::complete_delete_all_eap_settings()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::complete_delete_all_eap_settings()");
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_general_settings_complete_delete_all_eap_settings);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(internal_settings);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = send_message(&message);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_general_settings_server_message_if_c::complete_copy_all_eap_settings(const eap_method_settings_c * const internal_settings)
+{
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_core_server_message_if_c::complete_copy_all_eap_settings()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::complete_copy_all_eap_settings()");
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_general_settings_complete_copy_all_eap_settings);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(internal_settings);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = send_message(&message);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+// End.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/core/eap_pac_store_client_message_if.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,1225 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#include "eap_am_tools.h"
+#include "eap_tools.h"
+#include "eap_am_export.h"
+#include "eap_am_assert.h"
+#include "eap_pac_store_client_message_if.h"
+#include "abs_eap_plugin_message.h"
+#include "abs_eap_am_message_if.h"
+#include "eap_am_message_if.h"
+#include "eap_automatic_variable.h"
+#include "eap_process_tlv_message_data.h"
+#include "eap_method_settings.h"
+#include "eap_am_network_id.h"
+
+//--------------------------------------------------
+
+/**
+ * The destructor of the eap_core class does nothing special.
+ */
+EAP_FUNC_EXPORT eap_pac_store_client_message_if_c::~eap_pac_store_client_message_if_c()
+{
+
+}
+
+//--------------------------------------------------
+
+/**
+ * The constructor initializes member attributes using parameters passed to it.
+ * @param tools is pointer to the tools class. @see abs_eap_am_tools_c.
+ * @param partner is back pointer to object which created this object.
+ * @param is_client_when_true indicates whether the network entity should act
+ * as a client (true) or server (false), in terms of EAP-protocol
+ * whether this network entity is EAP-supplicant (true) or EAP-authenticator (false).
+ */
+
+EAP_FUNC_EXPORT eap_pac_store_client_message_if_c::eap_pac_store_client_message_if_c(
+	abs_eap_am_tools_c * const tools,
+	eap_am_message_if_c * const client_if,
+	abs_eap_pac_store_message_c * const partner)
+: m_am_tools(tools)
+, m_client_if(client_if)
+, m_partner(partner)
+, m_is_valid(false)
+, m_error_code(eap_status_ok)
+, m_error_function(eap_tlv_message_type_function_none)
+{
+	if (m_am_tools == 0
+		|| m_am_tools->get_is_valid() == false
+		|| m_client_if == 0
+		|| m_client_if->get_is_valid() == false
+		|| m_partner == 0)
+	{
+		return;
+	}
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_pac_store_client_message_if_c::eap_pac_store_client_message_if_c(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_client_message_if_c::eap_pac_store_client_message_if_c()");
+
+	m_is_valid = true;
+}
+
+//--------------------------------------------------
+
+/**
+ * This function must reset the state of object to same as 
+ * state was after the configure() function call.
+ * If object reset succeeds this function must return eap_status_ok.
+ * If object reset fails this function must return corresponding error status.
+ * @return This function returns the status of reset operation.
+ */
+EAP_FUNC_EXPORT eap_status_e eap_pac_store_client_message_if_c::reset()
+{
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+// This is documented in abs_eap_stack_interface_c::configure().
+EAP_FUNC_EXPORT eap_status_e eap_pac_store_client_message_if_c::configure()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_pac_store_client_message_if_c::configure(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_client_message_if_c::configure()");
+
+	eap_status_e status = m_client_if->configure(0);
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+// This is documented in abs_eap_stack_interface_c::shutdown().
+EAP_FUNC_EXPORT eap_status_e eap_pac_store_client_message_if_c::shutdown()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_pac_store_client_message_if_c::shutdown(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_client_message_if_c::shutdown()");
+
+	eap_status_e status = m_client_if->shutdown();
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+// This is documented in abs_eap_stack_interface_c::get_is_valid().
+EAP_FUNC_EXPORT bool eap_pac_store_client_message_if_c::get_is_valid()
+{
+	return m_is_valid;
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_pac_store_client_message_if_c::process_message(eap_process_tlv_message_data_c * const message)
+{
+	// Sends message data composed of Attribute-Value Pairs.
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_client_message_if_c::process_message()");
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_pac_store_client_message_if_c::process_message()"),
+		message->get_message_data(),
+		message->get_message_data_length()));
+
+	{
+		eap_status_e send_status = m_client_if->process_data(
+			message->get_message_data(),
+			message->get_message_data_length());
+		if (send_status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, send_status);
+		}
+
+
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, send_status);
+	}
+
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_pac_store_client_message_if_c::open_pac_store(
+		const eap_status_e completion_status)
+		{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_pac_store_client_message_if_c::open_pac_store(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_client_message_if_c::open_pac_store()");
+
+// Creates message data composed of Attribute-Value Pairs.
+
+	eap_process_tlv_message_data_c message(m_am_tools);
+
+	if (message.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	status = message.add_parameter_data(eap_tlv_message_type_function_pac_store_open_pac_store);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = process_message(&message);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+
+		}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_pac_store_client_message_if_c::destroy_pac_store(
+		const eap_status_e completion_status)
+		{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_pac_store_client_message_if_c::destroy_pac_store(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_client_message_if_c::destroy_pac_store()");
+
+// Creates message data composed of Attribute-Value Pairs.
+
+	eap_process_tlv_message_data_c message(m_am_tools);
+
+	if (message.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	status = message.add_parameter_data(eap_tlv_message_type_function_pac_store_destroy_pac_store);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = process_message(&message);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+
+		}
+//--------------------------------------------------------------------------------------------
+EAP_FUNC_EXPORT eap_status_e eap_pac_store_client_message_if_c::create_device_seed(
+		const eap_status_e completion_status)
+		{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_pac_store_client_message_if_c::create_device_seed(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_client_message_if_c::create_device_seed()");
+
+// Creates message data composed of Attribute-Value Pairs.
+
+	eap_process_tlv_message_data_c message(m_am_tools);
+
+	if (message.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	status = message.add_parameter_data(eap_tlv_message_type_function_pac_store_create_device_seed);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = process_message(&message);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+			
+		}
+
+//--------------------------------------------------
+EAP_FUNC_EXPORT eap_status_e eap_pac_store_client_message_if_c::is_master_key_present(
+		const eap_status_e completion_status)
+		{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_pac_store_client_message_if_c::is_master_key_present(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_client_message_if_c::is_master_key_present()");
+			
+	eap_process_tlv_message_data_c message(m_am_tools);
+
+	if (message.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	status = message.add_parameter_data(eap_tlv_message_type_function_pac_store_is_master_key_present);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = process_message(&message);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+//--------------------------------------------------
+EAP_FUNC_EXPORT eap_status_e eap_pac_store_client_message_if_c::is_master_key_and_password_matching(
+		const eap_variable_data_c * const pac_store_password
+		,const eap_status_e completion_status)
+		{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_pac_store_client_message_if_c::is_master_key_and_password_matching(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_client_message_if_c::is_master_key_and_password_matching()");
+			
+// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_pac_store_is_master_key_and_password_matching);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(pac_store_password);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = process_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+
+	}
+
+//--------------------------------------------------
+EAP_FUNC_EXPORT eap_status_e eap_pac_store_client_message_if_c::create_and_save_master_key(
+		const eap_variable_data_c * const pac_store_password
+		,const eap_status_e completion_status)
+		{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_pac_store_client_message_if_c::create_and_save_master_key(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_client_message_if_c::create_and_save_master_key()");
+			
+// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_pac_store_create_and_save_master_key);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(pac_store_password);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = process_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+
+		}
+
+//--------------------------------------------------
+EAP_FUNC_EXPORT eap_status_e eap_pac_store_client_message_if_c::compare_pac_store_password(
+		eap_variable_data_c * pac_store_password)
+		{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_pac_store_client_message_if_c::compare_pac_store_password(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_client_message_if_c::compare_pac_store_password()");
+
+// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_pac_store_compare_pac_store_password);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(pac_store_password);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = process_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+			
+		}
+//--------------------------------------------------
+EAP_FUNC_EXPORT eap_status_e eap_pac_store_client_message_if_c::is_pacstore_password_present()
+		{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_pac_store_client_message_if_c::is_pacstore_password_present(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_client_message_if_c::is_pacstore_password_present()");
+			
+	eap_process_tlv_message_data_c message(m_am_tools);
+
+	if (message.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	status = message.add_parameter_data(eap_tlv_message_type_function_pac_store_is_pacstore_password_present);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = process_message(&message);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+
+//--------------------------------------------------
+EAP_FUNC_EXPORT eap_status_e eap_pac_store_client_message_if_c::set_pac_store_password(
+		const eap_variable_data_c * const pac_store_password
+		,const eap_status_e completion_status)
+		{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_pac_store_client_message_if_c::set_pac_store_password(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_client_message_if_c::set_pac_store_password()");
+
+// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_pac_store_set_pac_store_password);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(pac_store_password);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = process_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+			
+		}
+
+//--------------------------------------------------
+eap_status_e eap_pac_store_client_message_if_c::complete_open_pac_store(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_pac_store_client_message_if_c::complete_open_pac_store(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_client_message_if_c::complete_open_pac_store()");
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+		{
+		status = m_partner->complete_open_pac_store(
+			eap_status_allocation_error);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+  eap_status_e return_status;
+	status = message_data.read_parameter_data(parameters, parameter_index, eap_tlv_message_type_eap_status, &return_status);
+	if (status != eap_status_ok)
+		{
+		status = m_partner->complete_open_pac_store(
+			status);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	
+	status = m_partner->complete_open_pac_store(
+		return_status);
+		
+	return status;	
+	
+
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_pac_store_client_message_if_c::complete_create_device_seed(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status(eap_status_ok);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_pac_store_client_message_if_c::complete_create_device_seed(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_client_message_if_c::complete_create_device_seed()");
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+	status = m_partner->complete_create_device_seed(eap_status_allocation_error);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+  eap_status_e return_status;
+	status = message_data.read_parameter_data(parameters, parameter_index, eap_tlv_message_type_eap_status, &return_status);
+	if (status != eap_status_ok)
+	{
+	status = m_partner->complete_create_device_seed(status);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = m_partner->complete_create_device_seed(return_status);
+
+	return status;
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_pac_store_client_message_if_c::complete_is_master_key_present(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status(eap_status_ok);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_pac_store_client_message_if_c::complete_is_master_key_present(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_client_message_if_c::complete_is_master_key_present()");
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+	status = m_partner->complete_is_master_key_present(
+		false, eap_status_allocation_error);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+  bool is_present = false;
+	status = message_data.read_parameter_data(parameters, parameter_index, &is_present);
+	if (status != eap_status_ok)
+	{
+	status = m_partner->complete_is_master_key_present(
+		false, status);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = m_partner->complete_is_master_key_present(is_present, status);
+	return status;
+
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_pac_store_client_message_if_c::complete_is_master_key_and_password_matching(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status(eap_status_ok);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_pac_store_client_message_if_c::complete_is_master_key_and_password_matching(): this = 0x%08x.\n"),
+		this));
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+	status = m_partner->complete_is_master_key_and_password_matching(
+		false, eap_status_allocation_error);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	bool is_matching = false;
+
+	status = message_data.read_parameter_data(parameters, parameter_index, &is_matching);
+	if (status != eap_status_ok)
+	{
+	status = m_partner->complete_is_master_key_and_password_matching(
+		false, status);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = m_partner->complete_is_master_key_and_password_matching(is_matching, status);
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_client_message_if_c::complete_is_master_key_and_password_matching()");
+  return status;
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_pac_store_client_message_if_c::complete_create_and_save_master_key(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_pac_store_client_message_if_c::complete_create_and_save_master_key(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_client_message_if_c::complete_create_and_save_master_key()");
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+	status = m_partner->complete_create_and_save_master_key(
+		eap_status_allocation_error);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+  eap_status_e return_status;
+	status = message_data.read_parameter_data(parameters, parameter_index, eap_tlv_message_type_eap_status, &return_status);
+	if (status != eap_status_ok)
+	{
+	status = m_partner->complete_create_and_save_master_key(
+		status);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = m_partner->complete_create_and_save_master_key(return_status);
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+
+}
+//--------------------------------------------------
+
+eap_status_e eap_pac_store_client_message_if_c::complete_is_pacstore_password_present(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status(eap_status_ok);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_pac_store_client_message_if_c::complete_is_pacstore_password_present(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_client_message_if_c::complete_is_pacstore_password_present()");
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+	status = m_partner->complete_is_pacstore_password_present(
+		false);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+  bool is_present = false;
+	status = message_data.read_parameter_data(parameters, parameter_index, &is_present);
+	if (status != eap_status_ok)
+	{
+	status = m_partner->complete_is_pacstore_password_present(
+		false);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = m_partner->complete_is_pacstore_password_present(is_present);
+	return status;
+
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_pac_store_client_message_if_c::complete_compare_pac_store_password(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status(eap_status_ok);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_pac_store_client_message_if_c::complete_compare_pac_store_password(): this = 0x%08x.\n"),
+		this));
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+	status = m_partner->complete_compare_pac_store_password(
+		false);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	bool is_matching = false;
+
+	status = message_data.read_parameter_data(parameters, parameter_index, &is_matching);
+	if (status != eap_status_ok)
+	{
+	status = m_partner->complete_compare_pac_store_password(
+		false);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = m_partner->complete_compare_pac_store_password(is_matching);
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_client_message_if_c::complete_compare_pac_store_password()");
+  return status;
+}
+
+//--------------------------------------------------
+
+//--------------------------------------------------
+/*
+eap_status_e eap_pac_store_client_message_if_c::complete_get_pac_store_password(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_pac_store_client_message_if_c::complete_get_pac_store_password(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_client_message_if_c::complete_get_pac_store_password()");
+	
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+	status = m_partner->complete_get_pac_store_password(
+		NULL);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	eap_variable_data_c * const password = new eap_variable_data_c(m_am_tools);
+	// eap_automatic_variable_c can be used in this block because no functions are leaving here.
+	eap_automatic_variable_c<eap_variable_data_c> automatic_password_data(m_am_tools, password);
+
+	if (password == 0)
+	{
+	status = m_partner->complete_get_pac_store_password(
+		password);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	status = message_data.read_parameter_data(parameters, parameter_index, password);
+	if (status != eap_status_ok)
+	{
+	status = m_partner->complete_get_pac_store_password(
+		password);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+
+	status = m_partner->complete_get_pac_store_password(
+		password);
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+
+
+}
+*/
+//--------------------------------------------------
+
+eap_status_e eap_pac_store_client_message_if_c::complete_set_pac_store_password(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_pac_store_client_message_if_c::complete_set_pac_store_password(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_client_message_if_c::complete_set_pac_store_password()");
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+	status = m_partner->complete_set_pac_store_password(
+		eap_status_allocation_error);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+  eap_status_e return_status;
+	status = message_data.read_parameter_data(parameters, parameter_index, eap_tlv_message_type_eap_status, &return_status);
+	if (status != eap_status_ok)
+	{
+	status = m_partner->complete_set_pac_store_password(
+		status);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = m_partner->complete_set_pac_store_password(
+		return_status);
+
+  return status;
+}
+
+//--------------------------------------------------
+eap_status_e eap_pac_store_client_message_if_c::complete_destroy_pac_store(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_pac_store_client_message_if_c::complete_destroy_pac_store(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_client_message_if_c::complete_destroy_pac_store()");
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+	status = m_partner->complete_destroy_pac_store(
+		eap_status_allocation_error);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+  eap_status_e return_status;
+	status = message_data.read_parameter_data(parameters, parameter_index, eap_tlv_message_type_eap_status, &return_status);
+	if (status != eap_status_ok)
+	{
+	status = m_partner->complete_destroy_pac_store(
+		status);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+	
+	status = m_partner->complete_destroy_pac_store(
+		return_status);
+		
+	return status;	
+	
+
+}
+
+//--------------------------------------------------
+
+//--------------------------------------------------
+
+
+//--------------------------------------------------
+
+
+//--------------------------------------------------
+
+
+//--------------------------------------------------
+
+//--------------------------------------------------
+//--------------------------------------------------
+
+//--------------------------------------------------
+
+eap_status_e eap_pac_store_client_message_if_c::process_message_type_error(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	eap_status_e status(eap_status_ok);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// Error payload is the first in this case.
+	status = message_data.read_parameter_data(parameters, eap_message_payload_index_function, eap_tlv_message_type_error, &m_error_code);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// Fuction payload is the second in this case.
+	status = message_data.read_parameter_data(parameters, eap_message_payload_index_first_parameter, &m_error_function);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_pac_store_client_message_if_c::send_data(const void * const data, const u32_t length)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_pac_store_client_message_if_c::send_data(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_client_message_if_c::send_data()");
+
+	eap_status_e status(eap_status_process_general_error);
+
+	// Parses message data composed of Attribute-Value Pairs.
+	eap_process_tlv_message_data_c message(m_am_tools);
+
+	if (message.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	status = message.set_message_data(length, data);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_pac_store_client_message_if_c::send_data()"),
+		message.get_message_data(),
+		message.get_message_data_length()));
+
+	eap_array_c<eap_tlv_header_c> parameters(m_am_tools);
+
+	status = message.parse_message_data(&parameters);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	if (parameters.get_object_count() == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const eap_tlv_header_c * const function_header = parameters.get_object(eap_message_payload_index_function);
+	if (function_header == 0
+		|| (function_header->get_type() != eap_tlv_message_type_error
+			&& function_header->get_type() != eap_tlv_message_type_function))
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	if (function_header->get_type() == eap_tlv_message_type_error)
+	{
+		status = process_message_type_error(&parameters);
+	}
+	else // function_header->get_type() == eap_tlv_message_type_function
+	{
+		eap_tlv_message_type_function_e function(eap_tlv_message_type_function_none);
+
+		status = message.get_parameter_data(function_header, &function);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		switch(function)
+		{
+		case eap_tlv_message_type_function_pac_store_complete_open_pac_store:
+			status = complete_open_pac_store(&parameters);
+			break;
+		case eap_tlv_message_type_function_pac_store_complete_create_device_seed:
+			status = complete_create_device_seed(&parameters);
+			break;
+		case eap_tlv_message_type_function_pac_store_complete_is_master_key_present:
+			status = complete_is_master_key_present(&parameters);
+			break;
+		case eap_tlv_message_type_function_pac_store_complete_is_master_key_and_password_matching:
+			status = complete_is_master_key_and_password_matching(&parameters);
+			break;
+		case eap_tlv_message_type_function_pac_store_complete_create_and_save_master_key:
+			status = complete_create_and_save_master_key(&parameters);
+			break;
+		case eap_tlv_message_type_function_pac_store_complete_compare_pac_store_password:
+			status = complete_compare_pac_store_password(&parameters);
+			break;
+		case eap_tlv_message_type_function_pac_store_complete_is_pacstore_password_present:
+			status = complete_is_pacstore_password_present(&parameters);
+			break;
+		case eap_tlv_message_type_function_pac_store_complete_set_pac_store_password:
+			status = complete_set_pac_store_password(&parameters);
+			break;
+		case eap_tlv_message_type_function_pac_store_complete_destroy_pac_store:
+			status = complete_destroy_pac_store(&parameters);
+			break;
+		default:
+			EAP_TRACE_ERROR(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("ERROR: send_data(): unknown function %d.\n"),
+				 function));
+
+			EAP_ASSERT_ANYWAY_TOOLS(m_am_tools);
+
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+		};
+
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+// End.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/core/eap_pac_store_message_base.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,46 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#include "eap_am_tools.h"
+#include "eap_am_export.h"
+#include "eap_pac_store_message_base.h"
+
+/**
+ * The destructor of the eap_core class does nothing special.
+ */
+EAP_FUNC_EXPORT  eap_pac_store_message_base_c::~eap_pac_store_message_base_c()
+{
+}
+
+/**
+ * The constructor initializes member attributes using parameters passed to it.
+ * @param tools is pointer to the tools class. @see abs_eap_am_tools_c.
+ * @param partner is back pointer to object which created this object.
+ * @param is_client_when_true indicates whether the network entity should act
+ * as a client (true) or server (false), in terms of EAP-protocol
+ * whether this network entity is EAP-supplicant (true) or EAP-authenticator (false).
+ */
+EAP_FUNC_EXPORT eap_pac_store_message_base_c::eap_pac_store_message_base_c()
+{
+}
+
+//--------------------------------------------------
+// End.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/core/eap_pac_store_server_message_if.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,1339 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 9 %
+*/
+
+// This is enumeration of EAPOL source code.
+#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
+	#undef EAP_FILE_NUMBER_ENUM
+	#define EAP_FILE_NUMBER_ENUM 48 
+	#undef EAP_FILE_NUMBER_DATE 
+	#define EAP_FILE_NUMBER_DATE 1127594498 
+#endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
+
+
+
+#include "eap_am_memory.h"
+#include "eap_tools.h"
+#include "eap_pac_store_server_message_if.h"
+#include "eap_crypto_api.h"
+#include "eap_state_notification.h"
+#include "eap_automatic_variable.h"
+#include "eap_network_id_selector.h"
+#include "eap_config.h"
+#include "eap_am_pac_store.h"
+#include "eap_am_pac_store_symbian.h"
+
+//--------------------------------------------------
+
+// 
+EAP_FUNC_EXPORT eap_pac_store_server_message_if_c::~eap_pac_store_server_message_if_c()
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_pac_store_server_message_if_c::~eap_pac_store_server_message_if_c(): this = 0x%08x\n"),
+		this));
+
+	EAP_ASSERT(m_shutdown_was_called == true);
+
+	if (m_am_client != 0)
+		{
+		m_am_client->shutdown();
+		delete m_am_client;
+		}
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+}
+
+//--------------------------------------------------
+
+#if defined(_WIN32) && !defined(__GNUC__)
+	#pragma warning( disable : 4355 ) // 'this' : used in base member initializer list
+#endif
+
+// 
+EAP_FUNC_EXPORT eap_pac_store_server_message_if_c::eap_pac_store_server_message_if_c(
+	abs_eap_am_tools_c * const tools)
+	: m_partner(0)
+	, m_am_client(eap_am_pac_store_symbian_c::new_eap_am_pac_store_symbian_c(tools, this))
+	, m_am_tools(tools)
+	, m_error_code(eap_status_ok)
+	, m_error_function(eap_tlv_message_type_function_none)
+	, m_is_valid(false)
+	, m_shutdown_was_called(false)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_pac_store_server_message_if_c::eap_pac_store_server_message_if_c(): %s, this = 0x%08x => 0x%08x, compiled %s %s.\n"),
+		(m_is_client == true) ? "client": "server",
+		this,
+		dynamic_cast<abs_eap_base_timer_c *>(this),
+		__DATE__,
+		__TIME__));
+
+	if (m_am_client != 0
+		&& m_am_client->get_is_valid() == true)
+	{
+		set_is_valid();
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::configure(
+	const eap_variable_data_c * const client_configuration)
+{
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("%s: eap_pac_store_server_message_if_c::configure()\n"),
+		(m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_server_message_if_c::configure()");
+
+	eap_status_e status(eap_status_process_general_error);
+
+	if (m_am_client != 0)
+	{
+		status = m_am_client->configure();
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::shutdown()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("%s: eap_pac_store_server_message_if_c::shutdown(), m_shutdown_was_called=%d\n"),
+		(m_is_client == true) ? "client": "server",
+		m_shutdown_was_called));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_server_message_if_c::shutdown()");
+
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	if (m_shutdown_was_called == true)
+	{
+		// Shutdown function was called already.
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+	}
+	m_shutdown_was_called = true;
+
+	if (m_am_client != 0)
+	{
+		(void) m_am_client->shutdown();
+	}
+
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT void eap_pac_store_server_message_if_c::set_partner(abs_eap_am_message_if_c * const partner)
+{
+	m_partner = partner;
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::send_error_message(
+	const eap_status_e error_code,
+	const eap_tlv_message_type_function_e function)
+{
+	eap_status_e status(eap_status_ok);
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(
+			eap_tlv_message_type_error,
+			static_cast<u32_t>(error_code));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(function);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = send_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::send_message(eap_process_tlv_message_data_c * const message)
+{
+	// Sends message data composed of Attribute-Value Pairs.
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_core_client_message_if_c::send_message()"),
+		message->get_message_data(),
+		message->get_message_data_length()));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_client_message_if_c::send_message()");
+
+
+	{
+		eap_status_e send_status = m_partner->send_data(
+			message->get_message_data(),
+			message->get_message_data_length());
+		if (send_status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, send_status);
+		}
+
+
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, send_status);
+	}
+
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::process_message_type_error(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	eap_status_e status(eap_status_ok);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// Error payload is the first in this case.
+	status = message_data.read_parameter_data(parameters, eap_message_payload_index_function, eap_tlv_message_type_error, &m_error_code);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// Fuction payload is the second in this case.
+	status = message_data.read_parameter_data(parameters, eap_message_payload_index_first_parameter, &m_error_function);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::process_message(eap_process_tlv_message_data_c * const message)
+{
+	// Parses message data composed of Attribute-Value Pairs.
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_pac_store_server_message_if_c::process_message()"),
+		message->get_message_data(),
+		message->get_message_data_length()));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_server_message_if_c::process_message()");
+
+	eap_array_c<eap_tlv_header_c> parameters(m_am_tools);
+
+	eap_status_e status = message->parse_message_data(&parameters);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+		(void) send_error_message(
+			status,
+			eap_tlv_message_type_function_none);
+
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	if (parameters.get_object_count() == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+		status = eap_status_illegal_parameter;
+
+		(void) send_error_message(
+			status,
+			eap_tlv_message_type_function_none);
+
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	const eap_tlv_header_c * const function_header = parameters.get_object(eap_message_payload_index_function);
+	if (function_header == 0
+		|| (function_header->get_type() != eap_tlv_message_type_error
+			&& function_header->get_type() != eap_tlv_message_type_function))
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+		status = eap_status_illegal_parameter;
+
+		(void) send_error_message(
+			status,
+			eap_tlv_message_type_function_none);
+
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	if (function_header->get_type() == eap_tlv_message_type_error)
+	{
+		status = process_message_type_error(&parameters);
+	}
+	else // function_header->get_type() == eap_tlv_message_type_function
+	{
+		eap_tlv_message_type_function_e function(eap_tlv_message_type_function_none);
+
+		status = message->get_parameter_data(function_header, &function);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+			(void) send_error_message(
+				status,
+				eap_tlv_message_type_function_none);
+
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		switch(function)
+		{
+		case eap_tlv_message_type_function_pac_store_open_pac_store:
+			status = open_pac_store(&parameters);
+			break;
+		case eap_tlv_message_type_function_pac_store_create_device_seed:
+			status = create_device_seed(&parameters);
+			break;
+		case eap_tlv_message_type_function_pac_store_is_master_key_present:
+			status = is_master_key_present(&parameters);
+			break;
+		case eap_tlv_message_type_function_pac_store_is_master_key_and_password_matching:
+			status = is_master_key_and_password_matching(&parameters);
+			break;
+		case eap_tlv_message_type_function_pac_store_create_and_save_master_key:
+			status = create_and_save_master_key(&parameters);
+			break;
+		case eap_tlv_message_type_function_pac_store_compare_pac_store_password:
+			status = compare_pac_store_password(&parameters);
+			break;
+		case eap_tlv_message_type_function_pac_store_is_pacstore_password_present:
+			status = is_pacstore_password_present(&parameters);
+			break;
+		case eap_tlv_message_type_function_pac_store_set_pac_store_password:
+			status = set_pac_store_password(&parameters);
+			break;
+		case eap_tlv_message_type_function_pac_store_destroy_pac_store:
+			status = destroy_pac_store(&parameters);
+			break;
+		default:
+			EAP_TRACE_ERROR(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("ERROR: process_data(): unknown function %d.\n"),
+				 function));
+
+			status = eap_status_illegal_parameter;
+
+			EAP_ASSERT_ANYWAY_TOOLS(m_am_tools);
+		};
+
+		if (status != eap_status_ok
+			&& status != eap_status_success
+			&& status != eap_status_pending_request
+			&& status != eap_status_completed_request
+			&& status != eap_status_drop_packet_quietly)
+		{
+			(void) send_error_message(
+				status,
+				function);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+/// Function receives the data message from lower layer.
+/// Data is formatted to Attribute-Value Pairs.
+/// Look at eap_tlv_header_c and eap_tlv_message_data_c.
+EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::process_data(const void * const data, const u32_t length)
+{
+	eap_status_e status(eap_status_process_general_error);
+
+	{
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+			status = eap_status_allocation_error;
+
+			(void) send_error_message(
+				status,
+				eap_tlv_message_type_function_none);
+
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.set_message_data(length, data);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+			(void) send_error_message(
+				status,
+				eap_tlv_message_type_function_none);
+
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = process_message(&message);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT void eap_pac_store_server_message_if_c::set_is_valid()
+{
+	m_is_valid = true;
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT bool eap_pac_store_server_message_if_c::get_is_valid()
+{
+	return m_is_valid;
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::timer_expired(
+	const u32_t id, void *data)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("TIMER: %s: [0x%08x]->eap_pac_store_server_message_if_c::timer_expired(id 0x%02x, data 0x%08x).\n"),
+		 (m_is_client == true) ? "client": "server",
+		 this,
+		 id,
+		 data));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_server_message_if_c::timer_expired()");
+
+
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::timer_delete_data(
+	const u32_t id, void *data)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("TIMER: %s: [0x%08x]->eap_pac_store_server_message_if_c::timer_delete_data(id 0x%02x, data 0x%08x).\n"),
+		(m_is_client == true) ? "client": "server",
+		this, id, data));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_server_message_if_c::timer_delete_data()");
+
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_pac_store_server_message_if_c::open_pac_store(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_pac_store_server_message_if_c::open_pac_store()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_server_message_if_c::open_pac_store()");
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_status_e status(eap_status_ok);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = m_am_client->open_pac_store();
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_pac_store_server_message_if_c::create_device_seed(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+    {
+    EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+    eap_status_e status(eap_status_ok);
+
+    EAP_TRACE_DEBUG(
+        m_am_tools, 
+        EAP_TRACE_FLAGS_MESSAGE_DATA, 
+        (EAPL("eap_pac_store_server_message_if_c::create_device_seed(): this = 0x%08x.\n"),
+        this));
+
+    EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_server_message_if_c::create_device_seed()");
+
+    status = m_am_client->create_device_seed();
+
+    return status;
+    
+    }
+//--------------------------------------------------
+
+eap_status_e eap_pac_store_server_message_if_c::is_master_key_present(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+    {
+    EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+    eap_status_e status(eap_status_ok);
+
+    EAP_TRACE_DEBUG(
+        m_am_tools, 
+        EAP_TRACE_FLAGS_MESSAGE_DATA, 
+        (EAPL("eap_pac_store_server_message_if_c::is_master_key_present(): this = 0x%08x.\n"),
+        this));
+
+    EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_server_message_if_c::is_master_key_present()");
+ 
+    status = m_am_client->is_master_key_present();
+
+    return status;
+    
+    }
+//--------------------------------------------------
+
+eap_status_e eap_pac_store_server_message_if_c::is_master_key_and_password_matching(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+    {
+    EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+    eap_status_e status(eap_status_ok);
+
+    EAP_TRACE_DEBUG(
+        m_am_tools, 
+        EAP_TRACE_FLAGS_MESSAGE_DATA, 
+        (EAPL("eap_pac_store_server_message_if_c::is_master_key_and_password_matching(): this = 0x%08x.\n"),
+        this));
+
+    EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_server_message_if_c::is_master_key_and_password_matching()");
+ 
+    u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+    eap_process_tlv_message_data_c message_data(m_am_tools);
+
+    if (message_data.get_is_valid() == false)
+        {
+        EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+        return EAP_STATUS_RETURN(m_am_tools, status);
+        }
+
+    eap_variable_data_c * const password = new eap_variable_data_c(m_am_tools);
+    // eap_automatic_variable_c can be used in this block because no functions are leaving here.
+    eap_automatic_variable_c<eap_variable_data_c> automatic_password_data(m_am_tools, password);
+
+    if (password == 0)
+    {
+    EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+    return EAP_STATUS_RETURN(m_am_tools, status);
+    }
+
+    status = message_data.read_parameter_data(parameters, parameter_index, password);
+    if (status != eap_status_ok)
+    {
+    EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+    return EAP_STATUS_RETURN(m_am_tools, status);
+    }
+    status = m_am_client->is_master_key_and_password_matching(password);
+
+    return status;
+   
+    }
+//--------------------------------------------------
+
+eap_status_e eap_pac_store_server_message_if_c::create_and_save_master_key(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+    {
+    EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+    eap_status_e status(eap_status_ok);
+
+    EAP_TRACE_DEBUG(
+        m_am_tools, 
+        EAP_TRACE_FLAGS_MESSAGE_DATA, 
+        (EAPL("eap_pac_store_server_message_if_c::create_and_save_master_key(): this = 0x%08x.\n"),
+        this));
+
+    EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_server_message_if_c::create_and_save_master_key()");
+
+    u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+    eap_process_tlv_message_data_c message_data(m_am_tools);
+
+    if (message_data.get_is_valid() == false)
+        {
+        EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+        return EAP_STATUS_RETURN(m_am_tools, status);
+        }
+
+    eap_variable_data_c * const password = new eap_variable_data_c(m_am_tools);
+    // eap_automatic_variable_c can be used in this block because no functions are leaving here.
+    eap_automatic_variable_c<eap_variable_data_c> automatic_password_data(m_am_tools, password);
+
+    if (password == 0)
+    {
+    EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+    return EAP_STATUS_RETURN(m_am_tools, status);
+    }
+
+    status = message_data.read_parameter_data(parameters, parameter_index, password);
+    if (status != eap_status_ok)
+    {
+    EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+    return EAP_STATUS_RETURN(m_am_tools, status);
+    }
+    status = m_am_client->create_and_save_master_key(password);
+
+    return status;
+    
+    }
+//--------------------------------------------------
+
+eap_status_e eap_pac_store_server_message_if_c::is_pacstore_password_present(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+    {
+    EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+    eap_status_e status(eap_status_ok);
+
+    EAP_TRACE_DEBUG(
+        m_am_tools, 
+        EAP_TRACE_FLAGS_MESSAGE_DATA, 
+        (EAPL("eap_pac_store_server_message_if_c::is_pacstore_password_present(): this = 0x%08x.\n"),
+        this));
+
+    EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_server_message_if_c::is_pacstore_password_present()");
+
+    eap_process_tlv_message_data_c message_data(m_am_tools);
+
+    if (message_data.get_is_valid() == false)
+        {
+        EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+        return EAP_STATUS_RETURN(m_am_tools, status);
+        }
+
+    status = m_am_client->is_pacstore_password_present();
+
+    return status;
+    
+    }
+//--------------------------------------------------
+eap_status_e eap_pac_store_server_message_if_c::compare_pac_store_password(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+    {
+    EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+    eap_status_e status(eap_status_ok);
+
+    EAP_TRACE_DEBUG(
+        m_am_tools, 
+        EAP_TRACE_FLAGS_MESSAGE_DATA, 
+        (EAPL("eap_pac_store_server_message_if_c::compare_pac_store_password(): this = 0x%08x.\n"),
+        this));
+
+    EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_server_message_if_c::compare_pac_store_password()");
+
+    u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+    eap_process_tlv_message_data_c message_data(m_am_tools);
+
+    if (message_data.get_is_valid() == false)
+        {
+        EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+        return EAP_STATUS_RETURN(m_am_tools, status);
+        }
+
+    eap_variable_data_c * const password = new eap_variable_data_c(m_am_tools);
+    // eap_automatic_variable_c can be used in this block because no functions are leaving here.
+    eap_automatic_variable_c<eap_variable_data_c> automatic_password_data(m_am_tools, password);
+
+    if (password == 0)
+    {
+    EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+    return EAP_STATUS_RETURN(m_am_tools, status);
+    }
+
+    status = message_data.read_parameter_data(parameters, parameter_index, password);
+    if (status != eap_status_ok)
+    {
+    EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+    return EAP_STATUS_RETURN(m_am_tools, status);
+    }
+
+    status = m_am_client->compare_pac_store_password(password);
+
+    return status;
+    
+    }
+//--------------------------------------------------
+
+eap_status_e eap_pac_store_server_message_if_c::set_pac_store_password(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+    {
+    EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+    eap_status_e status(eap_status_ok);
+
+    EAP_TRACE_DEBUG(
+        m_am_tools, 
+        EAP_TRACE_FLAGS_MESSAGE_DATA, 
+        (EAPL("eap_pac_store_server_message_if_c::set_pac_store_password(): this = 0x%08x.\n"),
+        this));
+
+    EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_server_message_if_c::set_pac_store_password()");
+
+    u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+    eap_process_tlv_message_data_c message_data(m_am_tools);
+
+    if (message_data.get_is_valid() == false)
+        {
+        EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+        return EAP_STATUS_RETURN(m_am_tools, status);
+        }
+
+    eap_variable_data_c * const password = new eap_variable_data_c(m_am_tools);
+    // eap_automatic_variable_c can be used in this block because no functions are leaving here.
+    eap_automatic_variable_c<eap_variable_data_c> automatic_password_data(m_am_tools, password);
+
+    if (password == 0)
+    {
+    EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+    return EAP_STATUS_RETURN(m_am_tools, status);
+    }
+
+    status = message_data.read_parameter_data(parameters, parameter_index, password);
+    if (status != eap_status_ok)
+    {
+    EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+    return EAP_STATUS_RETURN(m_am_tools, status);
+    }
+    status = m_am_client->set_pac_store_password(password);
+
+    return status;
+    
+    }
+//--------------------------------------------------
+
+eap_status_e eap_pac_store_server_message_if_c::destroy_pac_store(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+    {
+    EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+    eap_status_e status(eap_status_ok);
+
+    EAP_TRACE_DEBUG(
+        m_am_tools, 
+        EAP_TRACE_FLAGS_MESSAGE_DATA, 
+        (EAPL("eap_pac_store_server_message_if_c::destroy_pac_store(): this = 0x%08x.\n"),
+        this));
+
+    EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_pac_store_server_message_if_c::destroy_pac_store()");
+ 
+    status = m_am_client->destroy_pac_store();
+
+    return status;
+   
+    }
+//--------------------------------------------------
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::complete_open_pac_store(const eap_status_e completion_status)
+{
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_core_server_message_if_c::complete_open_pac_store()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::complete_open_pac_store()");
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_pac_store_complete_open_pac_store);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(completion_status);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = send_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+
+
+
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::complete_create_device_seed(
+    const eap_status_e completion_status)
+    {
+    eap_status_e status(eap_status_process_general_error);
+
+    EAP_TRACE_DEBUG(
+        m_am_tools, 
+        EAP_TRACE_FLAGS_MESSAGE_DATA, 
+        (EAPL("%s: eap_core_server_message_if_c::complete_create_device_seed()\n"),
+         (m_is_client == true) ? "client": "server"));
+
+    EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::complete_create_device_seed()");
+
+    {
+        // Creates message data composed of Attribute-Value Pairs.
+        eap_process_tlv_message_data_c message(m_am_tools);
+
+        if (message.get_is_valid() == false)
+        {
+            EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+            return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+        }
+
+        status = message.add_parameter_data(eap_tlv_message_type_function_pac_store_complete_create_device_seed);
+        if (status != eap_status_ok)
+        {
+            EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+            return EAP_STATUS_RETURN(m_am_tools, status);
+        }
+
+        status = message.add_parameter_data(completion_status);
+        if (status != eap_status_ok)
+        {
+            EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+            return EAP_STATUS_RETURN(m_am_tools, status);
+        }
+
+        status = send_message(&message);
+        if (status != eap_status_ok)
+        {
+            EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+            return EAP_STATUS_RETURN(m_am_tools, status);
+        }
+    }
+
+    EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+    return EAP_STATUS_RETURN(m_am_tools, status);
+    
+    }
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::complete_is_master_key_present(
+        const bool is_present)
+    {
+    eap_status_e status(eap_status_process_general_error);
+
+    EAP_TRACE_DEBUG(
+        m_am_tools, 
+        EAP_TRACE_FLAGS_MESSAGE_DATA, 
+        (EAPL("%s: eap_core_server_message_if_c::complete_is_master_key_present()\n"),
+         (m_is_client == true) ? "client": "server"));
+
+    EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::complete_is_master_key_present()");
+
+    {
+        // Creates message data composed of Attribute-Value Pairs.
+        eap_process_tlv_message_data_c message(m_am_tools);
+
+        if (message.get_is_valid() == false)
+        {
+            EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+            return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+        }
+
+        status = message.add_parameter_data(eap_tlv_message_type_function_pac_store_complete_is_master_key_present);
+        if (status != eap_status_ok)
+        {
+            EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+            return EAP_STATUS_RETURN(m_am_tools, status);
+        }
+
+        status = message.add_parameter_data(is_present);
+        if (status != eap_status_ok)
+        {
+            EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+            return EAP_STATUS_RETURN(m_am_tools, status);
+        }
+
+        status = send_message(&message);
+        if (status != eap_status_ok)
+        {
+            EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+            return EAP_STATUS_RETURN(m_am_tools, status);
+        }
+    }
+
+    EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+    return EAP_STATUS_RETURN(m_am_tools, status);
+    
+    }
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::complete_is_master_key_and_password_matching(
+        const bool is_matching)
+    {
+    eap_status_e status(eap_status_process_general_error);
+
+    EAP_TRACE_DEBUG(
+        m_am_tools, 
+        EAP_TRACE_FLAGS_MESSAGE_DATA, 
+        (EAPL("%s: eap_core_server_message_if_c::complete_is_master_key_and_password_matching()\n"),
+         (m_is_client == true) ? "client": "server"));
+
+    EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::complete_is_master_key_and_password_matching()");
+
+    {
+        // Creates message data composed of Attribute-Value Pairs.
+        eap_process_tlv_message_data_c message(m_am_tools);
+
+        if (message.get_is_valid() == false)
+        {
+            EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+            return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+        }
+
+        status = message.add_parameter_data(eap_tlv_message_type_function_pac_store_complete_is_master_key_and_password_matching);
+        if (status != eap_status_ok)
+        {
+            EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+            return EAP_STATUS_RETURN(m_am_tools, status);
+        }
+
+        status = message.add_parameter_data(is_matching);
+        if (status != eap_status_ok)
+        {
+            EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+            return EAP_STATUS_RETURN(m_am_tools, status);
+        }
+
+        status = send_message(&message);
+        if (status != eap_status_ok)
+        {
+            EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+            return EAP_STATUS_RETURN(m_am_tools, status);
+        }
+    }
+
+    EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+    return EAP_STATUS_RETURN(m_am_tools, status);
+    
+    }
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::complete_create_and_save_master_key(
+        const eap_status_e completion_status)
+    {
+    eap_status_e status(eap_status_process_general_error);
+
+    EAP_TRACE_DEBUG(
+        m_am_tools, 
+        EAP_TRACE_FLAGS_MESSAGE_DATA, 
+        (EAPL("%s: eap_core_server_message_if_c::complete_create_and_save_master_key()\n"),
+         (m_is_client == true) ? "client": "server"));
+
+    EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::complete_create_and_save_master_key()");
+
+    {
+        // Creates message data composed of Attribute-Value Pairs.
+        eap_process_tlv_message_data_c message(m_am_tools);
+
+        if (message.get_is_valid() == false)
+        {
+            EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+            return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+        }
+
+        status = message.add_parameter_data(eap_tlv_message_type_function_pac_store_complete_create_and_save_master_key);
+        if (status != eap_status_ok)
+        {
+            EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+            return EAP_STATUS_RETURN(m_am_tools, status);
+        }
+
+        status = message.add_parameter_data(completion_status);
+        if (status != eap_status_ok)
+        {
+            EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+            return EAP_STATUS_RETURN(m_am_tools, status);
+        }
+
+        status = send_message(&message);
+        if (status != eap_status_ok)
+        {
+            EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+            return EAP_STATUS_RETURN(m_am_tools, status);
+        }
+    }
+
+    EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+    return EAP_STATUS_RETURN(m_am_tools, status);
+    
+    }
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::complete_is_pacstore_password_present(
+        const bool is_present)
+    {
+    eap_status_e status(eap_status_process_general_error);
+
+    EAP_TRACE_DEBUG(
+        m_am_tools, 
+        EAP_TRACE_FLAGS_MESSAGE_DATA, 
+        (EAPL("%s: eap_core_server_message_if_c::complete_is_pacstore_password_present()\n"),
+         (m_is_client == true) ? "client": "server"));
+
+    EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::complete_is_pacstore_password_present()");
+
+    {
+        // Creates message data composed of Attribute-Value Pairs.
+        eap_process_tlv_message_data_c message(m_am_tools);
+
+        if (message.get_is_valid() == false)
+        {
+            EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+            return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+        }
+
+        status = message.add_parameter_data(eap_tlv_message_type_function_pac_store_complete_is_pacstore_password_present);
+        if (status != eap_status_ok)
+        {
+            EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+            return EAP_STATUS_RETURN(m_am_tools, status);
+        }
+
+        status = message.add_parameter_data(is_present);
+        if (status != eap_status_ok)
+        {
+            EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+            return EAP_STATUS_RETURN(m_am_tools, status);
+        }
+
+        status = send_message(&message);
+        if (status != eap_status_ok)
+        {
+            EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+            return EAP_STATUS_RETURN(m_am_tools, status);
+        }
+    }
+
+    EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+    return EAP_STATUS_RETURN(m_am_tools, status);
+    
+    }
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::complete_compare_pac_store_password(
+        const bool is_matching)
+    {
+    eap_status_e status(eap_status_process_general_error);
+
+    EAP_TRACE_DEBUG(
+        m_am_tools, 
+        EAP_TRACE_FLAGS_MESSAGE_DATA, 
+        (EAPL("%s: eap_core_server_message_if_c::complete_compare_pac_store_password()\n"),
+         (m_is_client == true) ? "client": "server"));
+
+    EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::complete_compare_pac_store_password()");
+
+    {
+        // Creates message data composed of Attribute-Value Pairs.
+        eap_process_tlv_message_data_c message(m_am_tools);
+
+        if (message.get_is_valid() == false)
+        {
+            EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+            return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+        }
+
+        status = message.add_parameter_data(eap_tlv_message_type_function_pac_store_complete_compare_pac_store_password);
+        if (status != eap_status_ok)
+        {
+            EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+            return EAP_STATUS_RETURN(m_am_tools, status);
+        }
+
+        status = message.add_parameter_data(is_matching);
+        if (status != eap_status_ok)
+        {
+            EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+            return EAP_STATUS_RETURN(m_am_tools, status);
+        }
+
+        status = send_message(&message);
+        if (status != eap_status_ok)
+        {
+            EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+            return EAP_STATUS_RETURN(m_am_tools, status);
+        }
+    }
+
+    EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+    return EAP_STATUS_RETURN(m_am_tools, status);
+    
+    }
+//--------------------------------------------------
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::complete_set_pac_store_password(
+        const eap_status_e completion_status)
+    {
+    eap_status_e status(eap_status_process_general_error);
+
+    EAP_TRACE_DEBUG(
+        m_am_tools, 
+        EAP_TRACE_FLAGS_MESSAGE_DATA, 
+        (EAPL("%s: eap_core_server_message_if_c::complete_set_pac_store_password()\n"),
+         (m_is_client == true) ? "client": "server"));
+
+    EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::complete_set_pac_store_password()");
+
+    {
+        // Creates message data composed of Attribute-Value Pairs.
+        eap_process_tlv_message_data_c message(m_am_tools);
+
+        if (message.get_is_valid() == false)
+        {
+            EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+            return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+        }
+
+        status = message.add_parameter_data(eap_tlv_message_type_function_pac_store_complete_set_pac_store_password);
+        if (status != eap_status_ok)
+        {
+            EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+            return EAP_STATUS_RETURN(m_am_tools, status);
+        }
+
+        status = message.add_parameter_data(completion_status);
+        if (status != eap_status_ok)
+        {
+            EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+            return EAP_STATUS_RETURN(m_am_tools, status);
+        }
+
+        status = send_message(&message);
+        if (status != eap_status_ok)
+        {
+            EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+            return EAP_STATUS_RETURN(m_am_tools, status);
+        }
+    }
+
+    EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+    return EAP_STATUS_RETURN(m_am_tools, status);
+    
+    }
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_pac_store_server_message_if_c::complete_destroy_pac_store(
+    const eap_status_e completion_status)
+    {
+    eap_status_e status(eap_status_process_general_error);
+
+    EAP_TRACE_DEBUG(
+        m_am_tools, 
+        EAP_TRACE_FLAGS_MESSAGE_DATA, 
+        (EAPL("%s: eap_core_server_message_if_c::complete_destroy_pac_store()\n"),
+         (m_is_client == true) ? "client": "server"));
+
+    EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::complete_destroy_pac_store()");
+
+    {
+        // Creates message data composed of Attribute-Value Pairs.
+        eap_process_tlv_message_data_c message(m_am_tools);
+
+        if (message.get_is_valid() == false)
+        {
+            EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+            return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+        }
+
+        status = message.add_parameter_data(eap_tlv_message_type_function_pac_store_complete_destroy_pac_store);
+        if (status != eap_status_ok)
+        {
+            EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+            return EAP_STATUS_RETURN(m_am_tools, status);
+        }
+
+        status = message.add_parameter_data(completion_status);
+        if (status != eap_status_ok)
+        {
+            EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+            return EAP_STATUS_RETURN(m_am_tools, status);
+        }
+
+        status = send_message(&message);
+        if (status != eap_status_ok)
+        {
+            EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+            return EAP_STATUS_RETURN(m_am_tools, status);
+        }
+    }
+
+    EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+    return EAP_STATUS_RETURN(m_am_tools, status);
+    
+    }
+//--------------------------------------------------
+
+
+eap_am_pac_store_c* eap_am_pac_store_symbian_c::new_eap_am_pac_store_symbian_c(
+        abs_eap_am_tools_c * const tools,
+        abs_eap_am_pac_store_c * const partner)
+    {
+    eap_am_pac_store_c *server =  new eap_am_pac_store_symbian_c(
+        tools, partner);
+/*    
+    eap_automatic_variable_c<eap_am_pac_store_c> automatic_server(
+        tools,
+        server);
+*/
+    if (server == 0)
+      	{
+        EAP_TRACE_DEBUG(
+            tools,
+            TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+            (EAPL("calls: eap_pac_store_server_message_if_c(): server == 0 !!!:.\n")));
+      	}
+    else if (server->get_is_valid() == false)
+        {
+        EAP_TRACE_DEBUG(
+            tools,
+            TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+            (EAPL("calls: eap_pac_store_server_message_if_c(): server->shutdown():.\n")));
+            server->shutdown();
+            delete server;
+            server = 0;
+        }
+   
+    return server;
+    
+    }
+
+
+//--------------------------------------------------
+// End.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/core/eap_plugin_client_message_if.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,1010 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP-plugin interface message class.
+*
+*/
+
+/*
+* %version: 9 %
+*/
+
+#include "eap_am_tools.h"
+#include "eap_tools.h"
+#include "eap_am_export.h"
+#include "eap_am_assert.h"
+#include "eap_plugin_client_message_if.h"
+#include "abs_eap_plugin_message.h"
+#include "abs_eap_am_message_if.h"
+#include "eap_am_message_if.h"
+#include "eap_automatic_variable.h"
+#include "eap_process_tlv_message_data.h"
+#include "eap_method_settings.h"
+#include "eap_am_network_id.h"
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_plugin_client_message_if_c::~eap_plugin_client_message_if_c()
+{
+	delete m_client_if;
+	m_client_if = 0;
+}
+
+//--------------------------------------------------
+
+/**
+ * The constructor initializes member attributes using parameters passed to it.
+ * @param tools is pointer to the tools class. @see abs_eap_am_tools_c.
+ * @param client_if is pointer to client interface.
+ * @param partner is back pointer to object which created this object.
+ */
+EAP_FUNC_EXPORT eap_plugin_client_message_if_c::eap_plugin_client_message_if_c(
+	abs_eap_am_tools_c * const tools,
+	eap_am_message_if_c * const client_if,
+	abs_eap_plugin_message_c * const partner)
+: m_am_tools(tools)
+, m_client_if(client_if)
+, m_partner(partner)
+, m_is_valid(false)
+, m_error_code(eap_status_ok)
+, m_error_function(eap_tlv_message_type_function_none)
+{
+	if (m_am_tools == 0
+		|| m_am_tools->get_is_valid() == false
+		|| m_client_if == 0
+		|| m_client_if->get_is_valid() == false
+		|| m_partner == 0)
+	{
+		return;
+	}
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_plugin_client_message_if_c::eap_plugin_client_message_if_c(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_plugin_client_message_if_c::eap_plugin_client_message_if_c()");
+
+	m_is_valid = true;
+}
+
+//--------------------------------------------------
+
+/**
+ * This function must reset the state of object to same as 
+ * state was after the configure() function call.
+ * If object reset succeeds this function must return eap_status_ok.
+ * If object reset fails this function must return corresponding error status.
+ * @return This function returns the status of reset operation.
+ */
+EAP_FUNC_EXPORT eap_status_e eap_plugin_client_message_if_c::reset()
+{
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+// This is documented in abs_eap_stack_interface_c::configure().
+EAP_FUNC_EXPORT eap_status_e eap_plugin_client_message_if_c::configure()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_plugin_client_message_if_c::configure(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_plugin_client_message_if_c::configure()");
+
+	eap_status_e status = m_client_if->configure(0);
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+// This is documented in abs_eap_stack_interface_c::shutdown().
+EAP_FUNC_EXPORT eap_status_e eap_plugin_client_message_if_c::shutdown()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_plugin_client_message_if_c::shutdown(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_plugin_client_message_if_c::shutdown()");
+
+	eap_status_e status = m_client_if->shutdown();
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+// This is documented in abs_eap_stack_interface_c::get_is_valid().
+EAP_FUNC_EXPORT bool eap_plugin_client_message_if_c::get_is_valid()
+{
+	return m_is_valid;
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_plugin_client_message_if_c::process_message(eap_process_tlv_message_data_c * const message)
+{
+	// Process message data composed of Attribute-Value Pairs.
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_plugin_client_message_if_c::process_message()");
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_plugin_client_message_if_c::process_message()"),
+		message->get_message_data(),
+		message->get_message_data_length()));
+
+	eap_status_e send_status = m_client_if->process_data(
+		message->get_message_data(),
+		message->get_message_data_length());
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, send_status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_plugin_client_message_if_c::get_configuration(const eap_method_settings_c * const internal_settings)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_plugin_client_message_if_c::get_configuration(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_plugin_client_message_if_c::get_configuration()");
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_plugin_get_configuration);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(internal_settings);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = process_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_plugin_client_message_if_c::set_configuration(const eap_method_settings_c * const internal_settings)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_plugin_client_message_if_c::set_configuration(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_plugin_client_message_if_c::set_configuration()");
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_plugin_set_configuration);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(internal_settings);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = process_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_plugin_client_message_if_c::copy_configuration(const eap_method_settings_c * const internal_settings)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_plugin_client_message_if_c::copy_configuration(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_plugin_client_message_if_c::copy_configuration()");
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_plugin_copy_configuration);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(internal_settings);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = process_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_plugin_client_message_if_c::delete_configuration(const eap_method_settings_c * const internal_settings)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_plugin_client_message_if_c::delete_configuration(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_plugin_client_message_if_c::delete_configuration()");
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_plugin_delete_configuration);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(internal_settings);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = process_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_plugin_client_message_if_c::set_index(const eap_method_settings_c * const internal_settings)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_plugin_client_message_if_c::set_index(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_plugin_client_message_if_c::set_index()");
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_plugin_set_index);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(internal_settings);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = process_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_plugin_client_message_if_c::get_type_info(const eap_method_settings_c * const internal_settings)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_plugin_client_message_if_c::get_type_info(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_plugin_client_message_if_c::get_type_info()");
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_plugin_get_type_info);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(internal_settings);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = process_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_plugin_client_message_if_c::invoke_ui(const eap_method_settings_c * const internal_settings)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_plugin_client_message_if_c::invoke_ui(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_plugin_client_message_if_c::invoke_ui()");
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_plugin_invoke_ui);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(internal_settings);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = process_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_plugin_client_message_if_c::complete_get_configuration(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_method_settings_c * const internal_settings = new eap_method_settings_c(m_am_tools);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_internal_settings(m_am_tools, internal_settings);
+
+	if (internal_settings == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	eap_status_e status = message_data.read_parameter_data(parameters, parameter_index, internal_settings);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = m_partner->complete_get_configuration(
+		internal_settings);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_plugin_client_message_if_c::complete_set_configuration(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_method_settings_c * const internal_settings = new eap_method_settings_c(m_am_tools);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_internal_settings(m_am_tools, internal_settings);
+
+	if (internal_settings == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	eap_status_e status = message_data.read_parameter_data(parameters, parameter_index, internal_settings);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = m_partner->complete_set_configuration(
+		internal_settings->m_completion_status);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_plugin_client_message_if_c::complete_delete_configuration(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_method_settings_c * const internal_settings = new eap_method_settings_c(m_am_tools);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_internal_settings(m_am_tools, internal_settings);
+
+	if (internal_settings == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	eap_status_e status = message_data.read_parameter_data(parameters, parameter_index, internal_settings);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = m_partner->complete_delete_configuration(
+		internal_settings->m_completion_status);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_plugin_client_message_if_c::complete_copy_configuration(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_method_settings_c * const internal_settings = new eap_method_settings_c(m_am_tools);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_internal_settings(m_am_tools, internal_settings);
+
+	if (internal_settings == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	eap_status_e status = message_data.read_parameter_data(parameters, parameter_index, internal_settings);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = m_partner->complete_copy_configuration(
+		internal_settings->m_completion_status);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_plugin_client_message_if_c::complete_set_index(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_method_settings_c * const internal_settings = new eap_method_settings_c(m_am_tools);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_internal_settings(m_am_tools, internal_settings);
+
+	if (internal_settings == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	eap_status_e status = message_data.read_parameter_data(parameters, parameter_index, internal_settings);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = m_partner->complete_set_index(
+		internal_settings->m_completion_status);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_plugin_client_message_if_c::complete_get_type_info(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_method_settings_c * const internal_settings = new eap_method_settings_c(m_am_tools);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_internal_settings(m_am_tools, internal_settings);
+
+	if (internal_settings == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	eap_status_e status = message_data.read_parameter_data(parameters, parameter_index, internal_settings);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = m_partner->complete_get_type_info(
+		internal_settings);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_plugin_client_message_if_c::complete_invoke_ui(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_method_settings_c * const internal_settings = new eap_method_settings_c(m_am_tools);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_internal_settings(m_am_tools, internal_settings);
+
+	if (internal_settings == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	eap_status_e status = message_data.read_parameter_data(parameters, parameter_index, internal_settings);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = m_partner->complete_invoke_ui(
+		internal_settings);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_plugin_client_message_if_c::process_message_type_error(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	eap_status_e status(eap_status_ok);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// Error payload is the first in this case.
+	status = message_data.read_parameter_data(parameters, eap_message_payload_index_function, eap_tlv_message_type_error, &m_error_code);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// Fuction payload is the second in this case.
+	status = message_data.read_parameter_data(parameters, eap_message_payload_index_first_parameter, &m_error_function);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_plugin_client_message_if_c::send_data(const void * const data, const u32_t length)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_plugin_client_message_if_c::send_data(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_plugin_client_message_if_c::send_data()");
+
+	eap_status_e status(eap_status_process_general_error);
+
+	// Parses message data composed of Attribute-Value Pairs.
+	eap_process_tlv_message_data_c message(m_am_tools);
+
+	if (message.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	status = message.set_message_data(length, data);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_plugin_client_message_if_c::send_data()"),
+		message.get_message_data(),
+		message.get_message_data_length()));
+
+	eap_array_c<eap_tlv_header_c> parameters(m_am_tools);
+
+	status = message.parse_message_data(&parameters);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	if (parameters.get_object_count() == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const eap_tlv_header_c * const function_header = parameters.get_object(eap_message_payload_index_function);
+	if (function_header == 0
+		|| (function_header->get_type() != eap_tlv_message_type_error
+			&& function_header->get_type() != eap_tlv_message_type_function))
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	if (function_header->get_type() == eap_tlv_message_type_error)
+	{
+		status = process_message_type_error(&parameters);
+	}
+	else // function_header->get_type() == eap_tlv_message_type_function
+	{
+		eap_tlv_message_type_function_e function(eap_tlv_message_type_function_none);
+
+		status = message.get_parameter_data(function_header, &function);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		switch(function)
+		{
+		case eap_tlv_message_type_function_plugin_complete_get_configuration:
+			status = complete_get_configuration(&parameters);
+			break;
+		case eap_tlv_message_type_function_plugin_complete_set_configuration:
+			status = complete_set_configuration(&parameters);
+			break;
+		case eap_tlv_message_type_function_plugin_complete_delete_configuration:
+			status = complete_delete_configuration(&parameters);
+			break;
+		case eap_tlv_message_type_function_plugin_complete_copy_configuration:
+			status = complete_copy_configuration(&parameters);
+			break;
+		case eap_tlv_message_type_function_plugin_complete_set_index:
+			status = complete_set_index(&parameters);
+			break;
+		case eap_tlv_message_type_function_plugin_complete_get_type_info:
+			status = complete_get_type_info(&parameters);
+			break;
+		case eap_tlv_message_type_function_plugin_complete_invoke_ui:
+			status = complete_invoke_ui(&parameters);
+			break;
+		default:
+			EAP_TRACE_ERROR(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("ERROR: send_data(): unknown function %d.\n"),
+				 function));
+
+			EAP_ASSERT_ANYWAY_TOOLS(m_am_tools);
+
+			status = EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+		};
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+// End.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/core/eap_plugin_message_base.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,41 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  virtual functions of EAP-plugin interface.
+*
+*/
+
+/*
+* %version: 3 %
+*/
+
+#include "eap_am_tools.h"
+#include "eap_am_export.h"
+#include "eap_plugin_message_base.h"
+
+/**
+ * The destructor of the eap_core class does nothing special.
+ */
+EAP_FUNC_EXPORT  eap_plugin_message_base_c::~eap_plugin_message_base_c()
+{
+}
+
+/**
+ * The constructor initializes member attributes.
+ */
+EAP_FUNC_EXPORT eap_plugin_message_base_c::eap_plugin_message_base_c()
+{
+}
+
+//--------------------------------------------------
+// End.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/core/eap_plugin_server_message_if.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,1281 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP-plugin message interface in the server.
+*
+*/
+
+/*
+* %version: 11 %
+*/
+
+// This is enumeration of EAPOL source code.
+#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
+	#undef EAP_FILE_NUMBER_ENUM
+	#define EAP_FILE_NUMBER_ENUM 48 
+	#undef EAP_FILE_NUMBER_DATE 
+	#define EAP_FILE_NUMBER_DATE 1127594498 
+#endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
+
+
+
+#include "eap_am_memory.h"
+#include "eap_tools.h"
+#include "eap_plugin_server_message_if.h"
+#include "eap_crypto_api.h"
+#include "eap_state_notification.h"
+#include "eap_automatic_variable.h"
+#include "eap_network_id_selector.h"
+#include "eap_config.h"
+
+//--------------------------------------------------
+
+// 
+EAP_FUNC_EXPORT eap_plugin_server_message_if_c::~eap_plugin_server_message_if_c()
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_plugin_server_message_if_c::~eap_plugin_server_message_if_c(): this = 0x%08x\n"),
+		this));
+
+	EAP_ASSERT(m_shutdown_was_called == true);
+
+	delete m_am_plugin;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+}
+
+//--------------------------------------------------
+
+#if defined(_WIN32) && !defined(__GNUC__)
+	#pragma warning( disable : 4355 ) // 'this' : used in base member initializer list
+#endif
+
+// 
+EAP_FUNC_EXPORT eap_plugin_server_message_if_c::eap_plugin_server_message_if_c(
+	abs_eap_am_tools_c * const tools)
+	: m_partner(0)
+	, m_am_plugin(new_eap_am_plugin_c(tools, this))
+	, m_am_tools(tools)
+	, m_error_code(eap_status_ok)
+	, m_error_function(eap_tlv_message_type_function_none)
+	, m_is_client(false)
+	, m_is_valid(false)
+	, m_shutdown_was_called(false)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_plugin_server_message_if_c::eap_plugin_server_message_if_c(): %s, this = 0x%08x => 0x%08x, compiled %s %s.\n"),
+		(m_is_client == true) ? "client": "server",
+		this,
+		dynamic_cast<abs_eap_base_timer_c *>(this),
+		__DATE__,
+		__TIME__));
+
+	if (m_am_plugin != 0
+		&& m_am_plugin->get_is_valid() == true)
+	{
+		set_is_valid();
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_plugin_server_message_if_c::configure(
+	const eap_variable_data_c * const client_configuration)
+{
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("%s: eap_plugin_server_message_if_c::configure()\n"),
+		(m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_plugin_server_message_if_c::configure()");
+
+	eap_status_e status(eap_status_process_general_error);
+
+	if (m_am_plugin != 0)
+	{
+		status = m_am_plugin->configure();
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_plugin_server_message_if_c::shutdown()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("%s: eap_plugin_server_message_if_c::shutdown(), m_shutdown_was_called=%d\n"),
+		(m_is_client == true) ? "client": "server",
+		m_shutdown_was_called));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_plugin_server_message_if_c::shutdown()");
+
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	if (m_shutdown_was_called == true)
+	{
+		// Shutdown function was called already.
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+	}
+	m_shutdown_was_called = true;
+
+	if (m_am_plugin != 0)
+	{
+		(void) m_am_plugin->shutdown();
+	}
+
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT void eap_plugin_server_message_if_c::set_partner(abs_eap_am_message_if_c * const partner)
+{
+	m_partner = partner;
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_plugin_server_message_if_c::send_error_message(
+	const eap_status_e error_code,
+	const eap_tlv_message_type_function_e function)
+{
+	eap_status_e status(eap_status_ok);
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(
+			eap_tlv_message_type_error,
+			static_cast<u32_t>(error_code));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(function);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = send_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_plugin_server_message_if_c::send_message(eap_process_tlv_message_data_c * const message)
+{
+	// Sends message data composed of Attribute-Value Pairs.
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_core_client_message_if_c::send_message()"),
+		message->get_message_data(),
+		message->get_message_data_length()));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_client_message_if_c::send_message()");
+
+	eap_status_e send_status = m_partner->send_data(
+		message->get_message_data(),
+		message->get_message_data_length());
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, send_status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_plugin_server_message_if_c::process_message_type_error(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	eap_status_e status(eap_status_ok);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// Error payload is the first in this case.
+	status = message_data.read_parameter_data(parameters, eap_message_payload_index_function, eap_tlv_message_type_error, &m_error_code);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// Fuction payload is the second in this case.
+	status = message_data.read_parameter_data(parameters, eap_message_payload_index_first_parameter, &m_error_function);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_plugin_server_message_if_c::process_message(eap_process_tlv_message_data_c * const message)
+{
+	// Parses message data composed of Attribute-Value Pairs.
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_plugin_server_message_if_c::process_message()"),
+		message->get_message_data(),
+		message->get_message_data_length()));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_plugin_server_message_if_c::process_message()");
+
+	eap_array_c<eap_tlv_header_c> parameters(m_am_tools);
+
+	eap_status_e status = message->parse_message_data(&parameters);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+		(void) send_error_message(
+			status,
+			eap_tlv_message_type_function_none);
+
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	if (parameters.get_object_count() == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+		status = eap_status_illegal_parameter;
+
+		(void) send_error_message(
+			status,
+			eap_tlv_message_type_function_none);
+
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	const eap_tlv_header_c * const function_header = parameters.get_object(eap_message_payload_index_function);
+	if (function_header == 0
+		|| (function_header->get_type() != eap_tlv_message_type_error
+			&& function_header->get_type() != eap_tlv_message_type_function))
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+		status = eap_status_illegal_parameter;
+
+		(void) send_error_message(
+			status,
+			eap_tlv_message_type_function_none);
+
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	if (function_header->get_type() == eap_tlv_message_type_error)
+	{
+		status = process_message_type_error(&parameters);
+	}
+	else // function_header->get_type() == eap_tlv_message_type_function
+	{
+		eap_tlv_message_type_function_e function(eap_tlv_message_type_function_none);
+
+		status = message->get_parameter_data(function_header, &function);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+			(void) send_error_message(
+				status,
+				eap_tlv_message_type_function_none);
+
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		switch(function)
+		{
+		case eap_tlv_message_type_function_plugin_get_configuration:
+			status = get_configuration(&parameters);
+			break;
+		case eap_tlv_message_type_function_plugin_set_configuration:
+			status = set_configuration(&parameters);
+			break;
+		case eap_tlv_message_type_function_plugin_copy_configuration:
+			status = copy_configuration(&parameters);
+			break;
+		case eap_tlv_message_type_function_plugin_delete_configuration:
+			status = delete_configuration(&parameters);
+			break;
+		case eap_tlv_message_type_function_plugin_set_index:
+			status = set_index(&parameters);
+			break;
+		case eap_tlv_message_type_function_plugin_get_type_info:
+			status = get_type_info(&parameters);
+			break;
+		case eap_tlv_message_type_function_plugin_invoke_ui:
+			status = invoke_ui(&parameters);
+			break;
+		default:
+			EAP_TRACE_ERROR(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("ERROR: process_data(): unknown function %d.\n"),
+				 function));
+
+			status = eap_status_illegal_parameter;
+
+			EAP_ASSERT_ANYWAY_TOOLS(m_am_tools);
+		};
+
+		if (status != eap_status_ok
+			&& status != eap_status_success
+			&& status != eap_status_pending_request
+			&& status != eap_status_completed_request
+			&& status != eap_status_drop_packet_quietly)
+		{
+			(void) send_error_message(
+				status,
+				function);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+/// Function receives the data message from lower layer.
+/// Data is formatted to Attribute-Value Pairs.
+/// Look at eap_tlv_header_c and eap_tlv_message_data_c.
+EAP_FUNC_EXPORT eap_status_e eap_plugin_server_message_if_c::process_data(const void * const data, const u32_t length)
+{
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_plugin_server_message_if_c::process_data()"),
+		data,
+		length));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_plugin_server_message_if_c::process_message()");
+
+	eap_status_e status(eap_status_process_general_error);
+
+	{
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+			status = eap_status_allocation_error;
+
+			(void) send_error_message(
+				status,
+				eap_tlv_message_type_function_none);
+
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.set_message_data(length, data);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+			(void) send_error_message(
+				status,
+				eap_tlv_message_type_function_none);
+
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = process_message(&message);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT void eap_plugin_server_message_if_c::set_is_valid()
+{
+	m_is_valid = true;
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT bool eap_plugin_server_message_if_c::get_is_valid()
+{
+	return m_is_valid;
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_plugin_server_message_if_c::timer_expired(
+	const u32_t id, void *data)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("TIMER: %s: [0x%08x]->eap_plugin_server_message_if_c::timer_expired(id 0x%02x, data 0x%08x).\n"),
+		 (m_is_client == true) ? "client": "server",
+		 this,
+		 id,
+		 data));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_plugin_server_message_if_c::timer_expired()");
+
+
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_plugin_server_message_if_c::timer_delete_data(
+	const u32_t id, void *data)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("TIMER: %s: [0x%08x]->eap_plugin_server_message_if_c::timer_delete_data(id 0x%02x, data 0x%08x).\n"),
+		(m_is_client == true) ? "client": "server",
+		this, id, data));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_plugin_server_message_if_c::timer_delete_data()");
+
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_plugin_server_message_if_c::get_configuration(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_plugin_server_message_if_c::get_configuration(): parameters=0x%08x, count=%d\n"),
+		 (m_is_client == true) ? "client": "server",
+		 parameters,
+		 (parameters != 0) ? parameters->get_object_count(): 0));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_plugin_server_message_if_c::get_configuration()");
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_status_e status(eap_status_ok);
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_method_settings_c * const internal_settings = new eap_method_settings_c(m_am_tools);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_internal_settings(m_am_tools, internal_settings);
+
+	if (internal_settings == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	status = message_data.read_parameter_data(parameters, parameter_index, internal_settings);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = m_am_plugin->get_configuration(
+		internal_settings
+		);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_plugin_server_message_if_c::set_configuration(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_plugin_server_message_if_c::set_configuration()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_plugin_server_message_if_c::set_configuration()");
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_status_e status(eap_status_ok);
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_method_settings_c * const internal_settings = new eap_method_settings_c(m_am_tools);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_internal_settings(m_am_tools, internal_settings);
+
+	if (internal_settings == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	status = message_data.read_parameter_data(parameters, parameter_index, internal_settings);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = m_am_plugin->set_configuration(
+		internal_settings
+		);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_plugin_server_message_if_c::copy_configuration(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_plugin_server_message_if_c::copy_configuration()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_plugin_server_message_if_c::copy_configuration()");
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_status_e status(eap_status_ok);
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_method_settings_c * const internal_settings = new eap_method_settings_c(m_am_tools);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_internal_settings(m_am_tools, internal_settings);
+
+	if (internal_settings == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	status = message_data.read_parameter_data(parameters, parameter_index, internal_settings);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = m_am_plugin->copy_configuration(
+		internal_settings
+		);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_plugin_server_message_if_c::delete_configuration(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_plugin_server_message_if_c::delete_configuration()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_plugin_server_message_if_c::delete_configuration()");
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_status_e status(eap_status_ok);
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_method_settings_c * const internal_settings = new eap_method_settings_c(m_am_tools);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_internal_settings(m_am_tools, internal_settings);
+
+	if (internal_settings == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	status = message_data.read_parameter_data(parameters, parameter_index, internal_settings);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = m_am_plugin->delete_configuration(
+		internal_settings
+		);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_plugin_server_message_if_c::set_index(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_plugin_server_message_if_c::set_index()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_plugin_server_message_if_c::set_index()");
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_status_e status(eap_status_ok);
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_method_settings_c * const internal_settings = new eap_method_settings_c(m_am_tools);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_internal_settings(m_am_tools, internal_settings);
+
+	if (internal_settings == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	status = message_data.read_parameter_data(parameters, parameter_index, internal_settings);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = m_am_plugin->set_index(
+		internal_settings
+		);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_plugin_server_message_if_c::get_type_info(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_plugin_server_message_if_c::get_type_info()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_plugin_server_message_if_c::get_type_info()");
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_status_e status(eap_status_ok);
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_method_settings_c * const internal_settings = new eap_method_settings_c(m_am_tools);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_internal_settings(m_am_tools, internal_settings);
+
+	if (internal_settings == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	status = message_data.read_parameter_data(parameters, parameter_index, internal_settings);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = m_am_plugin->get_type_info(
+		internal_settings
+		);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_status_e eap_plugin_server_message_if_c::invoke_ui(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_plugin_server_message_if_c::invoke_ui()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_plugin_server_message_if_c::invoke_ui()");
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_status_e status(eap_status_ok);
+
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eap_process_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	eap_method_settings_c * const internal_settings = new eap_method_settings_c(m_am_tools);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_internal_settings(m_am_tools, internal_settings);
+
+	if (internal_settings == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	status = message_data.read_parameter_data(parameters, parameter_index, internal_settings);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_plugin_server_message_if_c::complete_get_configuration(const eap_method_settings_c * const internal_settings)
+{
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_core_server_message_if_c::complete_get_configuration()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::complete_get_configuration()");
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_plugin_complete_get_configuration);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(internal_settings);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = send_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_plugin_server_message_if_c::complete_set_configuration(const eap_method_settings_c * const internal_settings)
+{
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_core_server_message_if_c::complete_set_configuration()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::complete_set_configuration()");
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_plugin_complete_set_configuration);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(internal_settings);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = send_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_plugin_server_message_if_c::complete_delete_configuration(const eap_method_settings_c * const internal_settings)
+{
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_core_server_message_if_c::complete_delete_configuration()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::complete_delete_configuration()");
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_plugin_complete_delete_configuration);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(internal_settings);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = send_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_plugin_server_message_if_c::complete_copy_configuration(const eap_method_settings_c * const internal_settings)
+{
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_core_server_message_if_c::complete_copy_configuration()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::complete_copy_configuration()");
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_plugin_complete_copy_configuration);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(internal_settings);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = send_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_plugin_server_message_if_c::complete_set_index(const eap_method_settings_c * const internal_settings)
+{
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_core_server_message_if_c::complete_set_index()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::complete_set_index()");
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_plugin_complete_set_index);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(internal_settings);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = send_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_plugin_server_message_if_c::complete_get_type_info(const eap_method_settings_c * const internal_settings)
+{
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_core_server_message_if_c::complete_get_type_info()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::complete_get_type_info()");
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_plugin_complete_get_type_info);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(internal_settings);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = send_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_plugin_server_message_if_c::complete_invoke_ui(const eap_method_settings_c * const internal_settings)
+{
+	eap_status_e status(eap_status_process_general_error);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("%s: eap_core_server_message_if_c::complete_invoke_ui()\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_core_server_message_if_c::complete_invoke_ui()");
+
+	{
+		// Creates message data composed of Attribute-Value Pairs.
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = message.add_parameter_data(eap_tlv_message_type_function_plugin_complete_invoke_ui);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = message.add_parameter_data(internal_settings);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = send_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+// End.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/core/eap_process_tlv_message_data.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,8117 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 41 %
+*/
+
+// This is enumeration of EAPOL source code.
+#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
+	#undef EAP_FILE_NUMBER_ENUM
+	#define EAP_FILE_NUMBER_ENUM 40
+	#undef EAP_FILE_NUMBER_DATE
+	#define EAP_FILE_NUMBER_DATE 1127594498
+#endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
+
+
+#include "eap_am_memory.h"
+#include "eap_automatic_variable.h"
+#include "eap_process_tlv_message_data.h"
+#include "eap_variable_data.h"
+#include "eap_am_network_id.h"
+#include "eap_buffer.h"
+#include "eapol_session_key.h"
+#include "abs_eap_state_notification.h"
+#include "eap_state_notification.h"
+
+
+/** @file */
+
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_process_tlv_message_data_c::~eap_process_tlv_message_data_c()
+{
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_process_tlv_message_data_c::eap_process_tlv_message_data_c(
+	abs_eap_am_tools_c * const tools)
+	: eap_tlv_message_data_c(tools)
+	, m_am_tools(tools)
+	, m_is_valid(true)
+{
+}
+
+//-------------------------------------------------------------------
+
+/**
+ * This function should increase reference count.
+ */
+EAP_FUNC_EXPORT void eap_process_tlv_message_data_c::object_increase_reference_count()
+{
+}
+
+//-------------------------------------------------------------------
+
+/**
+ * This function should first decrease reference count
+ * and second return the remaining reference count.
+ * Reference count must not be decreased when it is zero.
+ */
+EAP_FUNC_EXPORT u32_t eap_process_tlv_message_data_c::object_decrease_reference_count()
+{
+	return 0;
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT bool eap_process_tlv_message_data_c::get_is_valid()
+{
+	return m_is_valid && eap_tlv_message_data_c::get_is_valid();
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT u32_t eap_process_tlv_message_data_c::get_payload_size(
+	const eap_variable_data_c * const data) const
+{
+	return
+		(eap_tlv_header_c::get_header_length() // Each attribute have their own header.
+		+ data->get_data_length());
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT u32_t eap_process_tlv_message_data_c::get_payload_size(
+	const eap_am_network_id_c * const network_id) const
+{
+	if (network_id == 0
+		|| network_id->get_is_valid_data() == false)
+	{
+		return 0ul;
+	}
+
+	return
+		(3ul * eap_tlv_header_c::get_header_length() // Each attribute have their own header.
+		+ network_id->get_source_id()->get_data_length()
+		+ network_id->get_destination_id()->get_data_length()
+		+ sizeof(network_id->get_type()));
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT u32_t eap_process_tlv_message_data_c::get_payload_size(
+	const abs_eap_state_notification_c * const state) const
+{
+	return
+		(7ul * eap_tlv_header_c::get_header_length()) // Each attribute have their own header.
+		+ (get_payload_size(state->get_send_network_id())
+		+ sizeof(u32_t) // eap_protocol_layer_e
+		+ sizeof(state->get_protocol())
+		+ eap_expanded_type_c::get_eap_expanded_type_size()
+		+ sizeof(state->get_current_state())
+		+ sizeof(u32_t) // bool is_client
+		+ sizeof(u32_t) // eap_status_e authentication error
+		);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT u32_t eap_process_tlv_message_data_c::get_payload_size(
+	const eapol_session_key_c * const session_key) const
+{
+	return
+		((5ul * eap_tlv_header_c::get_header_length()) // Each attribute have their own header.
+		+ session_key->get_key()->get_data_length()
+		+ session_key->get_sequence_number()->get_data_length()
+		+ sizeof(u32_t) // const eapol_key_type_e m_key_type
+		+ sizeof(session_key->get_key_index())
+		+ sizeof(u32_t) // const bool m_key_tx_bit
+		);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT u32_t eap_process_tlv_message_data_c::get_payload_size(
+	EAP_TEMPLATE_CONST eap_array_c<u16_t> * const ushort_array) const
+{
+	u32_t size(0ul);
+
+	for (u32_t ind = 0ul; ind < ushort_array->get_object_count(); ind++)
+	{
+		u16_t * const value = ushort_array->get_object(ind);
+		if (value != 0)
+		{
+			size += eap_tlv_header_c::get_header_length() // TLV-header of u16_t.
+				+ sizeof(u16_t); // Size of u16_t
+		}
+	} // for ()
+
+	return (size);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT u32_t eap_process_tlv_message_data_c::get_payload_size(
+	const eap_certificate_entry_c * const cert) const
+{
+	u32_t size =
+		(10ul * eap_tlv_header_c::get_header_length() // Each attribute have their own header.
+		+ sizeof(u32_t) // eap_certificate_type_e m_CertType
+		+ sizeof(u32_t) // bool m_SubjectNamePresent
+		+ sizeof(u32_t) // bool m_IssuerNamePresent
+		+ sizeof(u32_t) // bool m_SerialNumberPresent
+		+ sizeof(u32_t) // bool m_SubjectKeyIDPresent
+		+ sizeof(u32_t) // bool m_ThumbprintPresent
+		+ sizeof(u32_t) // bool m_LabelPresent
+		+ sizeof(u32_t) // bool m_PrimaryNamePresent
+		+ sizeof(u32_t) // bool m_SecondaryNamePresent
+		+ sizeof(u32_t) // bool m_iIsEnabledPresent
+		);
+
+	if (cert->m_SubjectNamePresent == true)
+	{
+		size += get_payload_size(&(cert->m_SubjectName));
+	}
+
+	if (cert->m_IssuerNamePresent == true)
+	{
+		size += get_payload_size(&(cert->m_IssuerName));
+	}
+
+	if (cert->m_SerialNumberPresent == true)
+	{
+		size += get_payload_size(&(cert->m_SerialNumber));
+	}
+
+	if (cert->m_SubjectKeyIDPresent == true)
+	{
+		size += get_payload_size(&(cert->m_SubjectKeyID));
+	}
+
+	if (cert->m_ThumbprintPresent == true)
+	{
+		size += get_payload_size(&(cert->m_Thumbprint));
+	}
+
+	if (cert->m_LabelPresent == true)
+	{
+		size += get_payload_size(&(cert->m_Label));
+	}
+
+	if (cert->m_PrimaryNamePresent == true)
+	{
+		size += get_payload_size(&(cert->m_PrimaryName));
+	}
+
+	if (cert->m_SecondaryNamePresent == true)
+	{
+		size += get_payload_size(&(cert->m_SecondaryName));
+	}
+
+	if (cert->m_iIsEnabledPresent == true)
+	{
+		size += eap_tlv_header_c::get_header_length();
+		size += sizeof(u32_t); // bool m_iIsEnabled
+	}
+
+	return size;
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT u32_t eap_process_tlv_message_data_c::get_payload_size(
+	const eap_method_settings_c * const internal_settings) const
+{
+	u32_t size =
+		(4ul * eap_tlv_header_c::get_header_length() // Each attribute have their own header.
+		+ sizeof(u32_t) // eap_status_e m_completion_status
+		+ eap_expanded_type_c::get_eap_expanded_type_size() // eap_type_value_e m_EAPType
+		+ sizeof(u32_t) // u32_t m_IndexType
+		+ sizeof(u32_t) // u32_t m_Index
+		);
+
+	size += eap_tlv_header_c::get_header_length();
+	size += sizeof(u32_t); // bool m_UseAutomaticCACertificatePresent
+	if (internal_settings->m_UseAutomaticCACertificatePresent == true)
+	{
+		size += eap_tlv_header_c::get_header_length();
+		size += sizeof(u32_t); // bool m_UseAutomaticCACertificate
+	}
+
+	size += eap_tlv_header_c::get_header_length();
+	size += sizeof(u32_t); // bool m_UseAutomaticUsernamePresent
+	if (internal_settings->m_UseAutomaticUsernamePresent == true)
+	{
+		size += eap_tlv_header_c::get_header_length();
+		size += sizeof(u32_t); // bool m_UseAutomaticUsername
+	}
+
+	size += eap_tlv_header_c::get_header_length();
+	size += sizeof(u32_t); // bool m_UseAutomaticRealmPresent
+	if (internal_settings->m_UseAutomaticRealmPresent == true)
+	{
+		size += eap_tlv_header_c::get_header_length();
+		size += sizeof(u32_t); // bool m_UseAutomaticRealm
+	}
+
+	size += eap_tlv_header_c::get_header_length();
+	size += sizeof(u32_t); // bool m_UsernamePresent
+	if (internal_settings->m_UsernamePresent == true)
+	{
+		size += get_payload_size(&(internal_settings->m_Username_fix));
+	}
+
+	size += eap_tlv_header_c::get_header_length();
+	size += sizeof(u32_t); // bool m_PasswordExistPresent
+	if (internal_settings->m_PasswordExistPresent == true)
+	{
+		size += eap_tlv_header_c::get_header_length();
+		size += sizeof(u32_t); // bool m_PasswordExist
+	}
+
+	size += eap_tlv_header_c::get_header_length();
+	size += sizeof(u32_t); // bool m_PasswordPresent
+	if (internal_settings->m_PasswordPresent == true)
+	{
+		size += get_payload_size(&(internal_settings->m_Password));
+	}
+
+	size += eap_tlv_header_c::get_header_length();
+	size += sizeof(u32_t); // bool m_RealmPresent
+	if (internal_settings->m_RealmPresent == true)
+	{
+		size += get_payload_size(&(internal_settings->m_Realm));
+	}
+
+	size += eap_tlv_header_c::get_header_length();
+	size += sizeof(u32_t); // bool m_UsePseudonymsPresent
+	if (internal_settings->m_UsePseudonymsPresent == true)
+	{
+		size += eap_tlv_header_c::get_header_length();
+		size += sizeof(u32_t); // bool m_UsePseudonyms
+	}
+
+	size += eap_tlv_header_c::get_header_length();
+	size += sizeof(u32_t); // bool m_VerifyServerRealmPresent
+	if (internal_settings->m_VerifyServerRealmPresent == true)
+	{
+		size += eap_tlv_header_c::get_header_length();
+		size += sizeof(u32_t); // bool m_VerifyServerRealm
+	}
+
+	size += eap_tlv_header_c::get_header_length();
+	size += sizeof(u32_t); // bool m_RequireClientAuthenticationPresent
+	if (internal_settings->m_RequireClientAuthenticationPresent == true)
+	{
+		size += eap_tlv_header_c::get_header_length();
+		size += sizeof(u32_t); // bool m_RequireClientAuthentication
+	}
+
+	size += eap_tlv_header_c::get_header_length();
+	size += sizeof(u32_t); // bool m_SessionValidityTimePresent
+	if (internal_settings->m_SessionValidityTimePresent == true)
+	{
+		size += eap_tlv_header_c::get_header_length();
+		size += sizeof(u32_t); // u32_t m_SessionValidityTime
+	}
+
+	size += eap_tlv_header_c::get_header_length();
+	size += sizeof(u32_t); // bool m_CipherSuitesPresent
+	if (internal_settings->m_CipherSuitesPresent == true)
+	{
+		// Array header.
+		size += eap_tlv_header_c::get_header_length();
+		size += get_payload_size(&(internal_settings->m_CipherSuites));
+	}
+
+	size += eap_tlv_header_c::get_header_length();
+	size += sizeof(u32_t); // bool m_PEAPVersionsPresent
+	if (internal_settings->m_PEAPVersionsPresent == true)
+	{
+		size += (3ul * eap_tlv_header_c::get_header_length());
+		size += sizeof(u32_t); // bool m_PEAPv0Allowed
+		size += sizeof(u32_t); // bool m_PEAPv1Allowed
+		size += sizeof(u32_t); // bool m_PEAPv2Allowed
+	}
+
+	size += eap_tlv_header_c::get_header_length();
+	size += sizeof(u32_t); // bool m_CertificatesPresent
+	if (internal_settings->m_CertificatesPresent == true)
+	{
+		// Array header.
+		size += eap_tlv_header_c::get_header_length();
+		size += get_payload_size(&(internal_settings->m_Certificates));
+	}
+
+	size += eap_tlv_header_c::get_header_length();
+	size += sizeof(u32_t); // bool m_EnabledEncapsulatedEAPTypesPresent
+	if (internal_settings->m_EnabledEncapsulatedEAPTypesPresent == true)
+	{
+		// Array header.
+		size += eap_tlv_header_c::get_header_length();
+		size += get_payload_size(&(internal_settings->m_EnabledEncapsulatedEAPTypes));
+	}
+
+	size += eap_tlv_header_c::get_header_length();
+	size += sizeof(u32_t); // bool m_DisabledEncapsulatedEAPTypesPresent
+	if (internal_settings->m_DisabledEncapsulatedEAPTypesPresent == true)
+	{
+		// Array header.
+		size += eap_tlv_header_c::get_header_length();
+		size += get_payload_size(&(internal_settings->m_DisabledEncapsulatedEAPTypes));
+	}
+
+	size += eap_tlv_header_c::get_header_length();
+	size += sizeof(u32_t); // bool m_AuthProvModeAllowedPresent
+	if (internal_settings->m_AuthProvModeAllowedPresent == true)
+	{
+		size += eap_tlv_header_c::get_header_length();
+		size += sizeof(u32_t); // bool m_AuthProvModeAllowed
+	}
+
+	size += eap_tlv_header_c::get_header_length();
+	size += sizeof(u32_t); // bool m_UnauthProvModeAllowedPresent
+	if (internal_settings->m_UnauthProvModeAllowedPresent == true)
+	{
+		size += eap_tlv_header_c::get_header_length();
+		size += sizeof(u32_t); // bool m_UnauthProvModeAllowed
+	}
+
+	size += eap_tlv_header_c::get_header_length();
+	size += sizeof(u32_t); // bool m_PACGroupReferencePresent
+	if (internal_settings->m_PACGroupReferencePresent == true)
+	{
+		size += get_payload_size(&(internal_settings->m_PACGroupReference));
+	}
+
+	size += eap_tlv_header_c::get_header_length();
+	size += sizeof(u32_t); // bool m_WarnADHPNoPACPresent
+	if (internal_settings->m_WarnADHPNoPACPresent == true)
+	{
+		size += eap_tlv_header_c::get_header_length();
+		size += sizeof(u32_t); // bool m_WarnADHPNoPAC
+	}
+
+	size += eap_tlv_header_c::get_header_length();
+	size += sizeof(u32_t); // bool m_WarnADHPNoMatchingPACPresent
+	if (internal_settings->m_WarnADHPNoMatchingPACPresent == true)
+	{
+		size += eap_tlv_header_c::get_header_length();
+		size += sizeof(u32_t); // bool m_WarnADHPNoMatchingPAC
+	}
+
+	size += eap_tlv_header_c::get_header_length();
+	size += sizeof(u32_t); // bool m_WarnNotDefaultServerPresent
+	if (internal_settings->m_WarnNotDefaultServerPresent == true)
+	{
+		size += eap_tlv_header_c::get_header_length();
+		size += sizeof(u32_t); // bool m_WarnNotDefaultServer
+	}
+
+	size += eap_tlv_header_c::get_header_length();
+	size += sizeof(u32_t); // bool m_SelectedEAPTypesPresent
+	if (internal_settings->m_SelectedEAPTypesPresent == true)
+	{
+		// Array header.
+		size += eap_tlv_header_c::get_header_length();
+		size += get_payload_size(&(internal_settings->m_active_eap_methods));
+
+		// Array header.
+		size += eap_tlv_header_c::get_header_length();
+		size += get_payload_size(&(internal_settings->m_disabled_eap_methods));
+	}
+
+	size += eap_tlv_header_c::get_header_length();
+	size += sizeof(u32_t); // bool m_TunnelingTypePresent
+	if (internal_settings->m_TunnelingTypePresent == true)
+	{
+		size += eap_tlv_header_c::get_header_length();
+		size += eap_expanded_type_c::get_eap_expanded_type_size(); // eap_type_value_e m_TunnelingType
+	}
+
+	size += eap_tlv_header_c::get_header_length();
+	size += sizeof(u32_t); // bool m_DestinationIndexAndTypePresent
+	if (internal_settings->m_DestinationIndexAndTypePresent == true)
+	{
+		size += (2ul * eap_tlv_header_c::get_header_length());
+		size += sizeof(u32_t); // u32_t m_DestinationIndexType
+		size += sizeof(u32_t); // u32_t m_DestinationIndex
+	}
+
+	size += eap_tlv_header_c::get_header_length();
+	size += sizeof(u32_t); // bool m_MethodInfoPresent
+	if (internal_settings->m_MethodInfoPresent == true)
+	{
+		size += get_payload_size(&(internal_settings->m_KReleaseDate));
+		size += get_payload_size(&(internal_settings->m_KEapTypeVersion));
+		size += get_payload_size(&(internal_settings->m_KManufacturer));
+	}
+
+	size += eap_tlv_header_c::get_header_length();
+	size += sizeof(u32_t); // bool m_ButtonIdPresent
+	if (internal_settings->m_ButtonIdPresent == true)
+	{
+		size += eap_tlv_header_c::get_header_length();
+		size += sizeof(u32_t); // i32_t m_ButtonId
+	}
+
+	size += eap_tlv_header_c::get_header_length();
+	size += sizeof(u32_t); // bool m_ShowPassWordPromptPresent
+	if (internal_settings->m_ShowPassWordPromptPresent == true)
+	{
+		size += eap_tlv_header_c::get_header_length();
+		size += sizeof(u32_t); // bool m_ShowPassWordPrompt));
+	}
+
+	size += eap_tlv_header_c::get_header_length();
+	size += sizeof(u32_t); // bool m_UseIdentityPrivacyPresent
+	if (internal_settings->m_UseIdentityPrivacyPresent == true)
+	{
+		size += eap_tlv_header_c::get_header_length();
+		size += sizeof(u32_t); // bool m_UseIdentityPrivacy));
+	}
+
+	return size;
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT u32_t eap_process_tlv_message_data_c::get_payload_size(
+	EAP_TEMPLATE_CONST eap_array_c<eap_certificate_entry_c> * const cert_array) const
+{
+	u32_t size(0ul);
+
+	for (u32_t ind = 0ul; ind < cert_array->get_object_count(); ind++)
+	{
+		eap_certificate_entry_c * const value = cert_array->get_object(ind);
+		if (value != 0)
+		{
+			// Structure header.
+			size += eap_tlv_header_c::get_header_length();
+
+			size += get_payload_size(value);
+		}
+	} // for ()
+
+	return (size);
+}
+
+//--------------------------------------------------
+
+#if defined(USE_EAP_SIMPLE_CONFIG)
+
+EAP_FUNC_EXPORT u32_t eap_process_tlv_message_data_c::get_payload_size(
+	const network_key_and_index_c * const key) const
+{
+	u32_t size(0ul);
+
+	if (key != 0)
+	{
+		size += eap_tlv_header_c::get_header_length()
+			+ sizeof(key->get_network_key_index()) // Size of Network Key Index
+			+ eap_tlv_header_c::get_header_length()
+			+ key->get_network_key_const()->get_data_length() // Size of Network Key
+			;
+	}
+
+	return (size);
+}
+
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+
+//--------------------------------------------------
+
+#if defined(USE_EAP_SIMPLE_CONFIG)
+
+EAP_FUNC_EXPORT u32_t eap_process_tlv_message_data_c::get_payload_size(
+	const eap_array_c<network_key_and_index_c> * const network_keys) const
+{
+	u32_t size(0ul);
+
+	for (u32_t ind_network_key = 0ul; ind_network_key < network_keys->get_object_count(); ind_network_key++)
+	{
+		network_key_and_index_c * const key = network_keys->get_object(ind_network_key);
+		if (key != 0)
+		{
+			size += eap_tlv_header_c::get_header_length() // Size of structure header
+				+ get_payload_size(key); // Size of Network Key
+		}
+	} // for ()
+
+	return (size);
+}
+
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+
+//--------------------------------------------------
+
+#if defined(USE_EAP_SIMPLE_CONFIG)
+
+EAP_FUNC_EXPORT u32_t eap_process_tlv_message_data_c::get_payload_size(
+	const simple_config_credential_c * const credential) const
+{
+	u32_t size(0ul);
+
+	if (credential != 0)
+	{
+		size += eap_tlv_header_c::get_header_length()
+			+ sizeof(credential->get_network_index()) // Size of Network Index
+			+ eap_tlv_header_c::get_header_length()
+			+ credential->get_SSID_const()->get_data_length() // Size of SSID
+			+ eap_tlv_header_c::get_header_length()
+			+ sizeof(u16_t) // Size of Authentiction type
+			+ eap_tlv_header_c::get_header_length()
+			+ sizeof(u16_t) // Size of Encryption type
+			;
+
+		size += eap_tlv_header_c::get_header_length() // Size of header of Array
+			+ get_payload_size(credential->get_network_keys_const());
+
+		size += eap_tlv_header_c::get_header_length()
+			+ credential->get_MAC_address_const()->get_data_length() // Size of MAC Address
+			;
+	}
+
+	return (size);
+}
+
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+
+//--------------------------------------------------
+
+#if defined(USE_EAP_SIMPLE_CONFIG)
+
+EAP_FUNC_EXPORT u32_t eap_process_tlv_message_data_c::get_payload_size(
+	EAP_TEMPLATE_CONST eap_array_c<simple_config_credential_c> * const credential_array) const
+{
+	u32_t size(0ul);
+
+	for (u32_t ind_credential = 0ul; ind_credential < credential_array->get_object_count(); ind_credential++)
+	{
+		simple_config_credential_c * const credential = credential_array->get_object(ind_credential);
+		if (credential != 0)
+		{
+			size += eap_tlv_header_c::get_header_length() // Size of structure header
+				+ get_payload_size(credential);
+		}
+	} // for ()
+
+	return (size);
+}
+
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT u32_t eap_process_tlv_message_data_c::get_payload_size(
+	const eap_variable_data_c * const selector,
+	const eap_config_value_c * const configuration_option) const
+{
+	u32_t size_of_data(0ul);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::get_payload_size(): type=%d=%s\n"),
+		configuration_option->get_const_type(),
+		eap_configuration_field_c::get_configure_type_string(configuration_option->get_const_type())));
+
+	switch(configuration_option->get_const_type())
+	{
+	case eap_configure_type_string:
+	case eap_configure_type_hex_data:
+		size_of_data += 3ul * eap_tlv_header_c::get_header_length()
+			+ sizeof(u32_t) // Length of the type.
+			+ selector->get_data_length() // Length of the option name.
+			+ configuration_option->get_const_data()->get_data_length(); // Length of the option data.
+		break;
+	case eap_configure_type_u32_t:
+	case eap_configure_type_boolean:
+		size_of_data += 3ul * eap_tlv_header_c::get_header_length()
+			+ sizeof(u32_t) // Length of the type.
+			+ selector->get_data_length() // Length of the option name.
+			+ sizeof(u32_t); // Length of the option data.
+		break;
+	case eap_configure_type_u32array:
+		{
+			const u32_t count_of_values = configuration_option->get_const_data()->get_data_length() / sizeof(u32_t);
+			size_of_data += 3ul * eap_tlv_header_c::get_header_length()
+				+ sizeof(u32_t) // Length of the type.
+				+ selector->get_data_length() // Length of the option name.
+				+ count_of_values*(eap_tlv_header_c::get_header_length()+sizeof(u32_t)); // Length of the option data.
+		}
+		break;
+	case eap_configure_type_subsection:
+		// No size.
+		break;
+	default:
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("ERROR: eap_process_tlv_message_data_c::get_payload_size(): Unknown type=%d=%s\n"),
+			configuration_option->get_const_type(),
+			eap_configuration_field_c::get_configure_type_string(configuration_option->get_const_type())));
+		break;
+	};
+
+	return (size_of_data);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::add_structured_parameter_header(
+	const eap_tlv_message_type_e type,
+	const u32_t length)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::add_structured_parameter_header(): type=%d=%s\n"),
+		type,
+		 get_type_string(type)));
+
+	return add_message_header(
+		type,
+		length);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::add_parameter_data(
+	const eap_tlv_message_type_e type,
+	const u32_t integer)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s\n"),
+		type,
+		 get_type_string(type)));
+
+	const u32_t network_order_integer(eap_htonl(integer));
+
+	eap_status_e status = add_message_data(
+		type,
+		sizeof(network_order_integer),
+		&network_order_integer);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::add_parameter_data(
+	const u64_t long_integer)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s\n"),
+		eap_tlv_message_type_u64_t,
+		 get_type_string(eap_tlv_message_type_u64_t)));
+
+	const u64_t network_order_long_integer(eap_htonll(long_integer));
+
+	eap_status_e status = add_message_data(
+		eap_tlv_message_type_u64_t,
+		sizeof(network_order_long_integer),
+		&network_order_long_integer);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::add_parameter_data(
+	const u32_t integer)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s\n"),
+		eap_tlv_message_type_u32_t,
+		 get_type_string(eap_tlv_message_type_u32_t)));
+
+	const u32_t network_order_integer(eap_htonl(integer));
+
+	eap_status_e status = add_message_data(
+		eap_tlv_message_type_u32_t,
+		sizeof(network_order_integer),
+		&network_order_integer);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::add_parameter_data(
+	const u16_t short_integer)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s\n"),
+		eap_tlv_message_type_u16_t,
+		 get_type_string(eap_tlv_message_type_u16_t)));
+
+	const u16_t network_order_short_integer(eap_htons(short_integer));
+
+	eap_status_e status = add_message_data(
+		eap_tlv_message_type_u16_t,
+		sizeof(network_order_short_integer),
+		&network_order_short_integer);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::add_parameter_data(
+	const u8_t byte_integer)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s\n"),
+		eap_tlv_message_type_u8_t,
+		 get_type_string(eap_tlv_message_type_u8_t)));
+
+	eap_status_e status = add_message_data(
+		eap_tlv_message_type_u8_t,
+		sizeof(byte_integer),
+		&byte_integer);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::add_parameter_data(
+	const i32_t integer)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s\n"),
+		eap_tlv_message_type_i32_t,
+		 get_type_string(eap_tlv_message_type_i32_t)));
+
+	const i32_t network_order_integer(eap_htonl(integer));
+
+	eap_status_e status = add_message_data(
+		eap_tlv_message_type_i32_t,
+		sizeof(network_order_integer),
+		&network_order_integer);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::add_parameter_data(
+	const i16_t integer)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s\n"),
+		eap_tlv_message_type_i16_t,
+		 get_type_string(eap_tlv_message_type_i16_t)));
+
+	const i16_t network_order_short_integer(eap_htons(integer));
+
+	eap_status_e status = add_message_data(
+		eap_tlv_message_type_i16_t,
+		sizeof(network_order_short_integer),
+		&network_order_short_integer);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::add_parameter_data(
+	const i8_t byte_integer)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s\n"),
+		eap_tlv_message_type_i8_t,
+		 get_type_string(eap_tlv_message_type_i8_t)));
+
+	eap_status_e status = add_message_data(
+		eap_tlv_message_type_i8_t,
+		sizeof(byte_integer),
+		&byte_integer);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::add_parameter_data(
+	const bool boolean)
+{
+	const u32_t value((boolean == false) ? 0u: 1u);
+
+	return add_parameter_data(
+		eap_tlv_message_type_boolean,
+		value);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::add_parameter_data(
+	const eap_status_e status)
+{
+	const u32_t value(static_cast<u32_t>(status));
+
+	return add_parameter_data(
+		eap_tlv_message_type_eap_status,
+		value);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::add_parameter_data(
+	const eapol_key_authentication_type_e authentication_type)
+{
+	const u32_t value(static_cast<u32_t>(authentication_type));
+
+	return add_parameter_data(
+		eap_tlv_message_type_eapol_key_authentication_type,
+		value);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::add_parameter_data(
+	const eapol_key_802_11_authentication_mode_e mode)
+{
+	const u32_t value(static_cast<u32_t>(mode));
+
+	return add_parameter_data(
+		eap_tlv_message_type_eapol_key_802_11_authentication_mode,
+		value);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::add_parameter_data(
+	const eap_tlv_message_type_function_e function)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, function=%s\n"),
+		eap_tlv_message_type_function,
+		 get_type_string(eap_tlv_message_type_function),
+		 get_function_string(function)));
+
+	if (function < eap_tlv_message_type_function_none
+		|| function >= eap_tlv_message_type_function_illegal_value)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const u32_t network_order_function(eap_htonl(function));
+
+	eap_status_e status = add_message_data(
+		eap_tlv_message_type_function,
+		sizeof(network_order_function),
+		&network_order_function);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::add_parameter_data(
+	const eap_variable_data_c * const variable_data)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s\n"),
+		eap_tlv_message_type_variable_data,
+		 get_type_string(eap_tlv_message_type_variable_data)));
+
+	if (variable_data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	eap_status_e status(eap_status_process_general_error);
+
+	if (variable_data->get_is_valid_data() == false)
+	{
+		// Empty variable data. Add just the header.
+		status = add_structured_parameter_header(
+			eap_tlv_message_type_variable_data,
+			0ul);
+	}
+	else
+	{
+		status = add_message_data(
+			eap_tlv_message_type_variable_data,
+			variable_data->get_data_length(),
+			variable_data->get_data());
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::add_parameter_data(
+	const eap_am_network_id_c * const network_id)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s\n"),
+		eap_tlv_message_type_network_id,
+		 get_type_string(eap_tlv_message_type_network_id)));
+
+	if (network_id == 0
+		|| network_id->get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const u32_t size_of_network_id = get_payload_size(network_id);
+
+	eap_status_e status = add_structured_parameter_header(
+		eap_tlv_message_type_network_id,
+		size_of_network_id);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = add_parameter_data(
+		network_id->get_source_id());
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = add_parameter_data(
+		network_id->get_destination_id());
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = add_parameter_data(
+		network_id->get_type());
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::add_parameter_data(
+	const eap_buf_chain_wr_c * const packet_buffer)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s\n"),
+		eap_tlv_message_type_variable_data,
+		 get_type_string(eap_tlv_message_type_variable_data)));
+
+	if (packet_buffer == 0
+		|| packet_buffer->get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	eap_status_e status = add_message_data(
+		eap_tlv_message_type_variable_data,
+		packet_buffer->get_data_length(),
+		packet_buffer->get_data(packet_buffer->get_data_length()));
+
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::add_parameter_data(
+	const eapol_session_key_c * const session_key)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s\n"),
+		eap_tlv_message_type_session_key,
+		 get_type_string(eap_tlv_message_type_session_key)));
+
+	if (session_key == 0
+		|| session_key->get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const u32_t size_of_session_key(get_payload_size(session_key));
+
+	eap_status_e status = add_structured_parameter_header(
+		eap_tlv_message_type_session_key,
+		size_of_session_key);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = add_parameter_data(
+		session_key->get_key());
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = add_parameter_data(
+		session_key->get_sequence_number());
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = add_parameter_data(
+		eap_tlv_message_type_eapol_key_type,
+		static_cast<u32_t>(session_key->get_key_type()));
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = add_parameter_data(session_key->get_key_index());
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = add_parameter_data(session_key->get_key_tx_bit());
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::add_parameter_data(
+	const abs_eap_state_notification_c * const state)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s\n"),
+		eap_tlv_message_type_eap_state_notification,
+		 get_type_string(eap_tlv_message_type_eap_state_notification)));
+
+	if (state == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const u32_t size_of_state(get_payload_size(state));
+
+	eap_status_e status = add_structured_parameter_header(
+		eap_tlv_message_type_eap_state_notification,
+		size_of_state);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = add_parameter_data(state->get_send_network_id());
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = add_parameter_data(
+		eap_tlv_message_type_eap_protocol_layer,
+		static_cast<u32_t>(state->get_protocol_layer()));
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = add_parameter_data(state->get_protocol());
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = add_parameter_data(state->get_eap_type());
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = add_parameter_data(state->get_current_state());
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = add_parameter_data(state->get_is_client());
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = add_parameter_data(state->get_authentication_error());
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::add_parameter_data(
+	const eap_type_value_e eap_type)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s\n"),
+		eap_tlv_message_type_eap_type,
+		 get_type_string(eap_tlv_message_type_eap_type)));
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("add_parameter_data(eap_type_value_e)"),
+		 &eap_type,
+		 sizeof(eap_type)));
+
+	void * type_buffer = 0;
+
+	eap_status_e status = allocate_message_buffer(
+		eap_tlv_message_type_eap_type,
+		eap_expanded_type_c::get_eap_expanded_type_size(),
+		&type_buffer);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = eap_expanded_type_c::write_type(
+		m_am_tools,
+		0ul, ///< Index is from 0 to n. Index 0 is the first EAP type field after base EAP header.
+		type_buffer,
+		eap_expanded_type_c::get_eap_expanded_type_size(),
+		true, ///< True value writes always Extented Type.
+		eap_type ///< The EAP type to be written.
+		);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_tlv_message_data_c::add_message_data():   type %2d=0x%08x, length %3d=0x%08x\n"),
+		 eap_tlv_message_type_eap_type,
+		 eap_tlv_message_type_eap_type,
+		 eap_expanded_type_c::get_eap_expanded_type_size(),
+		 eap_expanded_type_c::get_eap_expanded_type_size()));
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("add_message_data()"),
+		type_buffer,
+		eap_expanded_type_c::get_eap_expanded_type_size()));
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::add_parameter_data(
+	const eap_general_header_base_c * const packet_data)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s\n"),
+		eap_tlv_message_type_variable_data,
+		 get_type_string(eap_tlv_message_type_variable_data)));
+
+	if (packet_data == 0
+		|| packet_data->get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	eap_status_e status = add_message_data(
+		eap_tlv_message_type_variable_data,
+		packet_data->get_header_buffer_length(),
+		packet_data->get_header_buffer(packet_data->get_header_buffer_length()));
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::add_parameter_data(
+	const eap_certificate_entry_c * const certificate_entry)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s\n"),
+		eap_tlv_message_type_eap_certificate_entry,
+		 get_type_string(eap_tlv_message_type_eap_certificate_entry)));
+
+	eap_status_e status(eap_status_not_supported);
+
+
+	const u32_t size_of_certificate(get_payload_size(certificate_entry));
+
+	status = add_structured_parameter_header(
+		eap_tlv_message_type_eap_certificate_entry,
+		size_of_certificate);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+
+	{
+		// Specifies whether this entry describes user or CA certificate (mandatory)
+		status = add_parameter_data(static_cast<u32_t>(certificate_entry->m_CertType));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	{
+		// Subject name in distinguished name ASCII form. This is optional.
+		// For example "/C=US/O=Some organization/CN=Some common name".
+		status = add_parameter_data(certificate_entry->m_SubjectNamePresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (certificate_entry->m_SubjectNamePresent == true)
+		{
+			status = add_parameter_data(&(certificate_entry->m_SubjectName));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	{
+		// Issuer name in distinguished name ASCII form. This is optional.
+		// For example "/C=US/O=Some organization/CN=Some common name".
+		status = add_parameter_data(certificate_entry->m_IssuerNamePresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (certificate_entry->m_IssuerNamePresent == true)
+		{
+			status = add_parameter_data(&(certificate_entry->m_IssuerName));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	{
+		// Serial number in ASCII form. This is optional.
+		status = add_parameter_data(certificate_entry->m_SerialNumberPresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (certificate_entry->m_SerialNumberPresent == true)
+		{
+			status = add_parameter_data(&(certificate_entry->m_SerialNumber));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	{
+		// Subject key in binary form. This is mandatory.
+		status = add_parameter_data(certificate_entry->m_SubjectKeyIDPresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (certificate_entry->m_SubjectKeyIDPresent == true)
+		{
+			status = add_parameter_data(&(certificate_entry->m_SubjectKeyID));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	{
+		// Thumbprint in binary form. This is optional.
+		status = add_parameter_data(certificate_entry->m_ThumbprintPresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (certificate_entry->m_ThumbprintPresent == true)
+		{
+			status = add_parameter_data(&(certificate_entry->m_Thumbprint));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+
+	{
+		// This holds only the certificate label. This is the text UI will show.
+		status = add_parameter_data(certificate_entry->m_LabelPresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (certificate_entry->m_LabelPresent == true)
+		{
+			status = add_parameter_data(&(certificate_entry->m_Label));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	{
+		// Primary name of the certificate if any, UI uses this.
+		status = add_parameter_data(certificate_entry->m_PrimaryNamePresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (certificate_entry->m_PrimaryNamePresent == true)
+		{
+			status = add_parameter_data(&(certificate_entry->m_PrimaryName));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	{
+		// Secondary name of the certificate if any, UI uses this.
+		status = add_parameter_data(certificate_entry->m_SecondaryNamePresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (certificate_entry->m_SecondaryNamePresent == true)
+		{
+			status = add_parameter_data(&(certificate_entry->m_SecondaryName));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	{
+		// UI uses this to indicate enabled certificate.
+		status = add_parameter_data(certificate_entry->m_iIsEnabledPresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (certificate_entry->m_iIsEnabledPresent == true)
+		{
+			status = add_parameter_data((certificate_entry->m_iIsEnabled));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::add_parameter_data(
+	const eap_method_settings_c * const internal_settings)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s\n"),
+		eap_tlv_message_type_eap_method_settings,
+		 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+	eap_status_e status(eap_status_not_supported);
+
+	const u32_t size_of_settings(get_payload_size(internal_settings));
+
+	status = add_structured_parameter_header(
+		eap_tlv_message_type_eap_method_settings,
+		size_of_settings);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_completion_status\n"),
+		eap_tlv_message_type_eap_method_settings,
+		 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+	status = add_parameter_data((internal_settings->m_completion_status));
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_EAPType\n"),
+		eap_tlv_message_type_eap_method_settings,
+		 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+	// Specifies the EAP-method these settings are for.
+	status = add_parameter_data(internal_settings->m_EAPType);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_IndexType\n"),
+		eap_tlv_message_type_eap_method_settings,
+		 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+	status = add_parameter_data((internal_settings->m_IndexType));
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_Index\n"),
+		eap_tlv_message_type_eap_method_settings,
+		 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+	status = add_parameter_data((internal_settings->m_Index));
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_UseAutomaticCACertificatePresent\n"),
+			eap_tlv_message_type_eap_method_settings,
+			 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+		// Use automatic CA certificate.
+		status = add_parameter_data(internal_settings->m_UseAutomaticCACertificatePresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_UseAutomaticCACertificatePresent == true)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_UseAutomaticCACertificate\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data((internal_settings->m_UseAutomaticCACertificate));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_UseAutomaticUsernamePresent\n"),
+			eap_tlv_message_type_eap_method_settings,
+			 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+		// Use automatic username.
+		status = add_parameter_data(internal_settings->m_UseAutomaticUsernamePresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_UseAutomaticUsernamePresent == true)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_UseAutomaticUsername\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data((internal_settings->m_UseAutomaticUsername));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_UseAutomaticRealmPresent\n"),
+			eap_tlv_message_type_eap_method_settings,
+			 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+		// Use automatic username.
+		status = add_parameter_data(internal_settings->m_UseAutomaticRealmPresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_UseAutomaticRealmPresent == true)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_UseAutomaticRealm\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data((internal_settings->m_UseAutomaticRealm));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_UsernamePresent\n"),
+			eap_tlv_message_type_eap_method_settings,
+			 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+		// Username in ASCII format
+		status = add_parameter_data(internal_settings->m_UsernamePresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_UsernamePresent == true)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_Username_fix\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data(&(internal_settings->m_Username_fix));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_PasswordExistPresent\n"),
+			eap_tlv_message_type_eap_method_settings,
+			 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+		// Password existence
+		status = add_parameter_data(internal_settings->m_PasswordExistPresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_PasswordExistPresent == true)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_PasswordExist\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data(internal_settings->m_PasswordExist);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_PasswordPresent\n"),
+			eap_tlv_message_type_eap_method_settings,
+			 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+		// Password in ASCII format
+		status = add_parameter_data(internal_settings->m_PasswordPresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_PasswordPresent == true)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_Password\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data(&(internal_settings->m_Password));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_RealmPresent\n"),
+			eap_tlv_message_type_eap_method_settings,
+			 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+		// Realm in ASCII format
+		status = add_parameter_data(internal_settings->m_RealmPresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_RealmPresent == true)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_Realm\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data(&(internal_settings->m_Realm));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_UsePseudonymsPresent\n"),
+			eap_tlv_message_type_eap_method_settings,
+			 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+		// Use pseudonym identities in EAP-SIM/AKA
+		status = add_parameter_data(internal_settings->m_UsePseudonymsPresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_UsePseudonymsPresent == true)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_UsePseudonyms\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data((internal_settings->m_UsePseudonyms));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_VerifyServerRealmPresent\n"),
+			eap_tlv_message_type_eap_method_settings,
+			 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+		// Whether EAP-TLS/TTLS/PEAP should verify server realm
+		status = add_parameter_data(internal_settings->m_VerifyServerRealmPresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_VerifyServerRealmPresent == true)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_VerifyServerRealm\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data((internal_settings->m_VerifyServerRealm));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_RequireClientAuthenticationPresent\n"),
+			eap_tlv_message_type_eap_method_settings,
+			 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+		// Whether EAP-TLS/TTLS/PEAP should require client authentication
+		status = add_parameter_data(internal_settings->m_RequireClientAuthenticationPresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_RequireClientAuthenticationPresent == true)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_RequireClientAuthentication\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data((internal_settings->m_RequireClientAuthentication));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_SessionValidityTimePresent\n"),
+			eap_tlv_message_type_eap_method_settings,
+			 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+		// General session validity time (in minutes)
+		status = add_parameter_data(internal_settings->m_SessionValidityTimePresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_SessionValidityTimePresent == true)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_SessionValidityTime\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data((internal_settings->m_SessionValidityTime));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_CipherSuitesPresent\n"),
+			eap_tlv_message_type_eap_method_settings,
+			 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+		// An array of allowed cipher suites for EAP-TLS/TTLS/PEAP.
+		// Refer to RFC2246 chapter A.5 for the values.
+		status = add_parameter_data(internal_settings->m_CipherSuitesPresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_CipherSuitesPresent == true)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_CipherSuites\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data(&(internal_settings->m_CipherSuites));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_PEAPVersionsPresent\n"),
+			eap_tlv_message_type_eap_method_settings,
+			 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+		// Which EAP-PEAP versions are allowed
+		status = add_parameter_data(internal_settings->m_PEAPVersionsPresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_PEAPVersionsPresent == true)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_PEAPv0Allowed\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data((internal_settings->m_PEAPv0Allowed));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_PEAPv1Allowed\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data((internal_settings->m_PEAPv1Allowed));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_PEAPv2Allowed\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data((internal_settings->m_PEAPv2Allowed));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_CertificatesPresent\n"),
+			eap_tlv_message_type_eap_method_settings,
+			 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+  		// Array listing the allowed certificates for EAP-TLS/TTLS/PEAP.
+  		// Subject key ID and Certificate type are the only mandatory certificate
+  		// details needed at the moment.
+		status = add_parameter_data(internal_settings->m_CertificatesPresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_CertificatesPresent == true)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_Certificates\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data(&(internal_settings->m_Certificates));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_EnabledEncapsulatedEAPTypesPresent\n"),
+			eap_tlv_message_type_eap_method_settings,
+			 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+		// Array listing the enabled encapsulated EAP types (in priority order).
+		// Use EAP type values from eap_type_value_e.
+		status = add_parameter_data(internal_settings->m_EnabledEncapsulatedEAPTypesPresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_EnabledEncapsulatedEAPTypesPresent == true)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_EnabledEncapsulatedEAPTypes\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data(&(internal_settings->m_EnabledEncapsulatedEAPTypes));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_DisabledEncapsulatedEAPTypesPresent\n"),
+			eap_tlv_message_type_eap_method_settings,
+			 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+		// Array listing the disabled encapsulated EAP types (in priority order).
+		// Use EAP type values from eap_type_value_e.
+		status = add_parameter_data(internal_settings->m_DisabledEncapsulatedEAPTypesPresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_DisabledEncapsulatedEAPTypesPresent == true)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_DisabledEncapsulatedEAPTypes\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data(&(internal_settings->m_DisabledEncapsulatedEAPTypes));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_AuthProvModeAllowedPresent\n"),
+			eap_tlv_message_type_eap_method_settings,
+			 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+		// Whether Authenticated provisioning mode allowed or not in EAP-FAST.
+		status = add_parameter_data(internal_settings->m_AuthProvModeAllowedPresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_AuthProvModeAllowedPresent == true)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_AuthProvModeAllowed\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data((internal_settings->m_AuthProvModeAllowed));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_UnauthProvModeAllowedPresent\n"),
+			eap_tlv_message_type_eap_method_settings,
+			 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+		// Whether Unauthenticated provisioning mode allowed or not in EAP-FAST.
+		status = add_parameter_data(internal_settings->m_UnauthProvModeAllowedPresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_UnauthProvModeAllowedPresent == true)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_UnauthProvModeAllowed\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data((internal_settings->m_UnauthProvModeAllowed));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_PACGroupReferencePresent\n"),
+			eap_tlv_message_type_eap_method_settings,
+			 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+		// PAC group reference in ASCII format for EAP-FAST.
+		status = add_parameter_data(internal_settings->m_PACGroupReferencePresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_PACGroupReferencePresent == true)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_PACGroupReference\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data(&(internal_settings->m_PACGroupReference));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_WarnADHPNoPACPresent\n"),
+			eap_tlv_message_type_eap_method_settings,
+			 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+		// Whether to Warn (or Prompt) for ADHP (Authenticated Diffie-Hellman Protocol)
+		// auto-provisioning when there is no PAC at all. EAP-FAST specific.
+		status = add_parameter_data(internal_settings->m_WarnADHPNoPACPresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_WarnADHPNoPACPresent == true)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_WarnADHPNoPAC\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data((internal_settings->m_WarnADHPNoPAC));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_WarnADHPNoMatchingPACPresent\n"),
+			eap_tlv_message_type_eap_method_settings,
+			 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+		// Whether to Warn (or Prompt) for ADHP auto-provisioning when
+		// there is no PAC that matches the A-ID sent by server. EAP-FAST specific.
+		status = add_parameter_data(internal_settings->m_WarnADHPNoMatchingPACPresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_WarnADHPNoMatchingPACPresent == true)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_WarnADHPNoMatchingPAC\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data((internal_settings->m_WarnADHPNoMatchingPAC));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_WarnNotDefaultServerPresent\n"),
+			eap_tlv_message_type_eap_method_settings,
+			 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+		// Whether to Warn (or Prompt) when client encouters a server that has provisioned
+		// the client with a PAC before but is not currently selected as the default server.
+		// EAP-FAST specific.
+		status = add_parameter_data(internal_settings->m_WarnNotDefaultServerPresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_WarnNotDefaultServerPresent == true)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_WarnNotDefaultServer\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data((internal_settings->m_WarnNotDefaultServer));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_SelectedEAPTypesPresent\n"),
+			eap_tlv_message_type_eap_method_settings,
+			 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+		// Array listing the active and disabled EAP types (in priority order).
+		// Use EAP type values from eap_type_value_e.
+		status = add_parameter_data(internal_settings->m_SelectedEAPTypesPresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_SelectedEAPTypesPresent == true)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_active_eap_methods\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data(&(internal_settings->m_active_eap_methods));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_disabled_eap_methods\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data(&(internal_settings->m_disabled_eap_methods));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_TunnelingTypePresent\n"),
+			eap_tlv_message_type_eap_method_settings,
+			 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+		status = add_parameter_data(internal_settings->m_TunnelingTypePresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_TunnelingTypePresent == true)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_TunnelingType\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data((internal_settings->m_TunnelingType));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_DestinationIndexAndTypePresent\n"),
+			eap_tlv_message_type_eap_method_settings,
+			 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+		status = add_parameter_data(internal_settings->m_DestinationIndexAndTypePresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_DestinationIndexAndTypePresent == true)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_DestinationIndexType\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data((internal_settings->m_DestinationIndexType));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_DestinationIndex\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data((internal_settings->m_DestinationIndex));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_MethodInfoPresent\n"),
+			eap_tlv_message_type_eap_method_settings,
+			 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+		status = add_parameter_data(internal_settings->m_MethodInfoPresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_MethodInfoPresent == true)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_KReleaseDate\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data(&(internal_settings->m_KReleaseDate));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_KEapTypeVersion\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data(&(internal_settings->m_KEapTypeVersion));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_KManufacturer\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data(&(internal_settings->m_KManufacturer));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_ButtonIdPresent\n"),
+			eap_tlv_message_type_eap_method_settings,
+			 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+		status = add_parameter_data(internal_settings->m_ButtonIdPresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_ButtonIdPresent == true)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_ButtonId\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data((internal_settings->m_ButtonId));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_ShowPassWordPromptPresent\n"),
+			eap_tlv_message_type_eap_method_settings,
+			 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+		// Whether to show (or Prompt) password.
+		status = add_parameter_data(internal_settings->m_ShowPassWordPromptPresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_ShowPassWordPromptPresent == true)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_ShowPassWordPrompt\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data((internal_settings->m_ShowPassWordPrompt));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_UseIdentityPrivacyPresent\n"),
+			eap_tlv_message_type_eap_method_settings,
+			 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+		// Whether to show (or Prompt) password.
+		status = add_parameter_data(internal_settings->m_UseIdentityPrivacyPresent);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_UseIdentityPrivacyPresent == true)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s, m_UseIdentityPrivacy\n"),
+				eap_tlv_message_type_eap_method_settings,
+				 get_type_string(eap_tlv_message_type_eap_method_settings)));
+
+			status = add_parameter_data((internal_settings->m_UseIdentityPrivacy));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::add_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<u16_t> * const ushort_array)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): array type=%d=%s\n"),
+		eap_tlv_message_type_u16_t,
+		 get_type_string(eap_tlv_message_type_u16_t)));
+
+	if (ushort_array == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const u32_t size_of_ushort_array(get_payload_size(ushort_array));
+
+	eap_status_e status = add_structured_parameter_header(
+		eap_tlv_message_type_array,
+		size_of_ushort_array);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+
+	for (u32_t ind = 0ul; ind < ushort_array->get_object_count(); ind++)
+	{
+		const u16_t * const value = ushort_array->get_object(ind);
+		if (value != 0)
+		{
+			status = add_parameter_data(*value);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::add_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<eap_certificate_entry_c> * const cert_array)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): array type=%d=%s\n"),
+		eap_tlv_message_type_eap_certificate_entry,
+		 get_type_string(eap_tlv_message_type_eap_certificate_entry)));
+
+	if (cert_array == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const u32_t size_of_cert_array(get_payload_size(cert_array));
+
+	eap_status_e status = add_structured_parameter_header(
+		eap_tlv_message_type_array,
+		size_of_cert_array);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+
+	for (u32_t ind = 0ul; ind < cert_array->get_object_count(); ind++)
+	{
+		const eap_certificate_entry_c * const value = cert_array->get_object(ind);
+		if (value != 0)
+		{
+			status = add_parameter_data(value);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+#if defined(USE_EAP_SIMPLE_CONFIG)
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::add_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<simple_config_credential_c> * const credential_array)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): array type=%d=%s\n"),
+		eap_tlv_message_type_protected_setup_credential,
+		 get_type_string(eap_tlv_message_type_protected_setup_credential)));
+
+	if (credential_array == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const u32_t size_of_credential_array(get_payload_size(credential_array));
+
+	eap_status_e status = add_structured_parameter_header(
+		eap_tlv_message_type_array,
+		size_of_credential_array);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+
+	for (u32_t ind_credential = 0ul; ind_credential < credential_array->get_object_count(); ind_credential++)
+	{
+		simple_config_credential_c * const credential = credential_array->get_object(ind_credential);
+		if (credential != 0)
+		{
+			const u32_t size_of_credential(get_payload_size(credential));
+
+			eap_status_e status = add_structured_parameter_header(
+				eap_tlv_message_type_protected_setup_credential,
+				size_of_credential);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+			status = add_parameter_data(credential->get_network_index());
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+			status = add_parameter_data(credential->get_SSID());
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+			status = add_parameter_data(static_cast<u16_t>(credential->get_Authentication_Type()));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+			status = add_parameter_data(static_cast<u16_t>(credential->get_Encryption_Type()));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+			const u32_t size_of_network_key_array(get_payload_size(credential->get_network_keys()));
+
+			status = add_structured_parameter_header(
+				eap_tlv_message_type_array,
+				size_of_network_key_array);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+			for (u32_t ind_network_key = 0ul; ind_network_key < credential->get_network_keys()->get_object_count(); ind_network_key++)
+			{
+				network_key_and_index_c * const network_key = credential->get_network_keys()->get_object(ind_network_key);
+				if (network_key != 0)
+				{
+					const u32_t size_of_network_key(get_payload_size(network_key));
+
+					status = add_structured_parameter_header(
+						eap_tlv_message_type_network_key,
+						size_of_network_key);
+					if (status != eap_status_ok)
+					{
+						EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+						return EAP_STATUS_RETURN(m_am_tools, status);
+					}
+
+					status = add_parameter_data(network_key->get_network_key_index());
+					if (status != eap_status_ok)
+					{
+						EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+						return EAP_STATUS_RETURN(m_am_tools, status);
+					}
+
+					status = add_parameter_data(network_key->get_network_key());
+					if (status != eap_status_ok)
+					{
+						EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+						return EAP_STATUS_RETURN(m_am_tools, status);
+					}
+				}
+			} // for ()
+
+			status = add_parameter_data(credential->get_MAC_address());
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	} // for ()
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::add_parameter_data(
+	const eap_variable_data_c * const selector,
+	const eap_config_value_c * const configuration_option)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::add_parameter_data(): type=%d=%s\n"),
+		eap_tlv_message_type_variable_data,
+		 get_type_string(eap_tlv_message_type_variable_data)));
+
+	if (selector == 0
+		|| selector->get_is_valid_data() == false
+		|| configuration_option == 0
+		|| configuration_option->get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	eap_status_e status(eap_status_ok);
+
+	u32_t size_of_data = get_payload_size(
+		selector,
+		configuration_option);
+
+	if (size_of_data > 0ul)
+	{
+		status = add_structured_parameter_header(
+				eap_tlv_message_type_configuration_option,
+				size_of_data);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = add_parameter_data(static_cast<u32_t>(configuration_option->get_const_type()));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = add_parameter_data(selector);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+
+		switch(configuration_option->get_const_type())
+		{
+		case eap_configure_type_string:
+		case eap_configure_type_hex_data:
+			status = add_parameter_data(configuration_option->get_const_data());
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+			break;
+		case eap_configure_type_u32_t:
+		case eap_configure_type_boolean:
+			{
+				const u32_t * value = reinterpret_cast<const u32_t *>(configuration_option->get_const_data()->get_data(sizeof(u32_t)));
+				if (value != 0)
+				{
+					status = add_parameter_data(*value);
+					if (status != eap_status_ok)
+					{
+						EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+						return EAP_STATUS_RETURN(m_am_tools, status);
+					}
+				}
+			}
+			break;
+		case eap_configure_type_u32array:
+			{
+				const u32_t count_of_values = configuration_option->get_const_data()->get_data_length() / sizeof(u32_t);
+				const u32_t * value = reinterpret_cast<const u32_t *>(configuration_option->get_const_data()->get_data(sizeof(u32_t)));
+				if (value != 0)
+				{
+					status = add_structured_parameter_header(
+							eap_tlv_message_type_array,
+							count_of_values*(eap_tlv_header_c::get_header_length()+sizeof(u32_t)));
+					if (status != eap_status_ok)
+					{
+						EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+						return EAP_STATUS_RETURN(m_am_tools, status);
+					}
+
+					for (u32_t ind = 0ul; ind < count_of_values; ++ind)
+					{
+						status = add_parameter_data(value[ind]);
+						if (status != eap_status_ok)
+						{
+							EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+							return EAP_STATUS_RETURN(m_am_tools, status);
+						}
+					}
+				}
+			}
+			break;
+		default:
+			break;
+		};
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::get_parameter_data(
+	const eap_tlv_header_c * const integer_header,
+	u64_t * const value)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s\n"),
+		integer_header->get_type(),
+		 get_type_string(static_cast<eap_tlv_message_type_e>(integer_header->get_type()))));
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("get_parameter_data(u64_t *)"),
+		integer_header->get_header_buffer(integer_header->get_header_buffer_length()),
+		integer_header->get_header_buffer_length()));
+
+	if (static_cast<eap_tlv_message_type_e>(integer_header->get_type())
+		!= eap_tlv_message_type_u64_t)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
+	}
+
+	const u8_t * const data = integer_header->get_value(sizeof(u64_t));
+	if (data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	*value =
+		eap_read_u64_t_network_order(
+			data,
+			sizeof(u64_t));
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::get_parameter_data(
+	const eap_tlv_header_c * const integer_header,
+	u32_t * const value)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s\n"),
+		integer_header->get_type(),
+		 get_type_string(static_cast<eap_tlv_message_type_e>(integer_header->get_type()))));
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("get_parameter_data(u32_t *)"),
+		integer_header->get_header_buffer(integer_header->get_header_buffer_length()),
+		integer_header->get_header_buffer_length()));
+
+	if (static_cast<eap_tlv_message_type_e>(integer_header->get_type())
+			!= eap_tlv_message_type_boolean
+		&& static_cast<eap_tlv_message_type_e>(integer_header->get_type())
+			!= eap_tlv_message_type_eap_protocol_layer
+		&& static_cast<eap_tlv_message_type_e>(integer_header->get_type())
+			!= eap_tlv_message_type_eapol_key_802_11_authentication_mode
+		&& static_cast<eap_tlv_message_type_e>(integer_header->get_type())
+			!= eap_tlv_message_type_eapol_key_authentication_type
+		&& static_cast<eap_tlv_message_type_e>(integer_header->get_type())
+			!= eap_tlv_message_type_eapol_key_type
+		&& static_cast<eap_tlv_message_type_e>(integer_header->get_type())
+			!= eap_tlv_message_type_eapol_tkip_mic_failure_type
+		&& static_cast<eap_tlv_message_type_e>(integer_header->get_type())
+			!= eap_tlv_message_type_eapol_wlan_authentication_state
+		&& static_cast<eap_tlv_message_type_e>(integer_header->get_type())
+			!= eap_tlv_message_type_error
+		&& static_cast<eap_tlv_message_type_e>(integer_header->get_type())
+			!= eap_tlv_message_type_function
+		&& static_cast<eap_tlv_message_type_e>(integer_header->get_type())
+			!= eap_tlv_message_type_RSNA_cipher
+		&& static_cast<eap_tlv_message_type_e>(integer_header->get_type())
+			!= eap_tlv_message_type_u32_t
+		&& static_cast<eap_tlv_message_type_e>(integer_header->get_type())
+			!= eap_tlv_message_type_eap_status
+			)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
+	}
+
+	const u8_t * const data = integer_header->get_value(sizeof(u32_t));
+	if (data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	*value =
+		eap_read_u32_t_network_order(
+			data,
+			sizeof(u32_t));
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::get_parameter_data(
+	const eap_tlv_header_c * const integer_header,
+	u16_t * const value)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s\n"),
+		integer_header->get_type(),
+		 get_type_string(static_cast<eap_tlv_message_type_e>(integer_header->get_type()))));
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("get_parameter_data(u16_t *)"),
+		integer_header->get_header_buffer(integer_header->get_header_buffer_length()),
+		integer_header->get_header_buffer_length()));
+
+	if (static_cast<eap_tlv_message_type_e>(integer_header->get_type())
+		!= eap_tlv_message_type_u16_t)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
+	}
+
+	const u8_t * const data = integer_header->get_value(sizeof(u16_t));
+	if (data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	*value =
+		eap_read_u16_t_network_order(
+			data,
+			sizeof(u16_t));
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::get_parameter_data(
+	const eap_tlv_header_c * const integer_header,
+	u8_t * const value)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s\n"),
+		integer_header->get_type(),
+		 get_type_string(static_cast<eap_tlv_message_type_e>(integer_header->get_type()))));
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("get_parameter_data(u8_t *)"),
+		integer_header->get_header_buffer(integer_header->get_header_buffer_length()),
+		integer_header->get_header_buffer_length()));
+
+	if (static_cast<eap_tlv_message_type_e>(integer_header->get_type())
+		!= eap_tlv_message_type_u8_t)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
+	}
+
+	const u8_t * const data = integer_header->get_value(sizeof(u8_t));
+	if (data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	*value = *data;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::get_parameter_data(
+	const eap_tlv_header_c * const integer_header,
+	i32_t * const value)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s\n"),
+		integer_header->get_type(),
+		 get_type_string(static_cast<eap_tlv_message_type_e>(integer_header->get_type()))));
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("get_parameter_data(u8_t *)"),
+		integer_header->get_header_buffer(integer_header->get_header_buffer_length()),
+		integer_header->get_header_buffer_length()));
+
+	if (static_cast<eap_tlv_message_type_e>(integer_header->get_type())
+		!= eap_tlv_message_type_i32_t)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
+	}
+
+	const u8_t * const data = integer_header->get_value(sizeof(i32_t));
+	if (data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	*value = static_cast<i32_t>(eap_read_u32_t_network_order(
+			data,
+			sizeof(i32_t)));
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::get_parameter_data(
+	const eap_tlv_header_c * const integer_header,
+	i16_t * const value)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s\n"),
+		integer_header->get_type(),
+		 get_type_string(static_cast<eap_tlv_message_type_e>(integer_header->get_type()))));
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("get_parameter_data(u8_t *)"),
+		integer_header->get_header_buffer(integer_header->get_header_buffer_length()),
+		integer_header->get_header_buffer_length()));
+
+	if (static_cast<eap_tlv_message_type_e>(integer_header->get_type())
+		!= eap_tlv_message_type_i16_t)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
+	}
+
+	const u8_t * const data = integer_header->get_value(sizeof(i16_t));
+	if (data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	*value = static_cast<i16_t>(eap_read_u16_t_network_order(
+			data,
+			sizeof(i16_t)));
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::get_parameter_data(
+	const eap_tlv_header_c * const integer_header,
+	i8_t * const value)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s\n"),
+		integer_header->get_type(),
+		 get_type_string(static_cast<eap_tlv_message_type_e>(integer_header->get_type()))));
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("get_parameter_data(u8_t *)"),
+		integer_header->get_header_buffer(integer_header->get_header_buffer_length()),
+		integer_header->get_header_buffer_length()));
+
+	if (static_cast<eap_tlv_message_type_e>(integer_header->get_type())
+		!= eap_tlv_message_type_i8_t)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
+	}
+
+	const u8_t * const data = integer_header->get_value(sizeof(i8_t));
+	if (data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	*value = static_cast<i8_t>(*data);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::get_parameter_data(
+	const eap_tlv_header_c * const function_header,
+	eap_tlv_message_type_function_e * const function)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s\n"),
+		function_header->get_type(),
+		 get_type_string(static_cast<eap_tlv_message_type_e>(function_header->get_type()))));
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("get_parameter_data(eap_tlv_message_type_function_e *)"),
+		function_header->get_header_buffer(function_header->get_header_buffer_length()),
+		function_header->get_header_buffer_length()));
+
+	if (static_cast<eap_tlv_message_type_e>(function_header->get_type())
+		!= eap_tlv_message_type_function)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
+	}
+
+	u32_t host_order(0ul);
+
+	eap_status_e status = get_parameter_data(
+		function_header,
+		&host_order);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	*function = static_cast<eap_tlv_message_type_function_e>(host_order);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, function=%s\n"),
+		eap_tlv_message_type_function,
+		 get_type_string(eap_tlv_message_type_function),
+		 get_function_string(*function)
+		 ));
+
+	if (*function < eap_tlv_message_type_function_none
+		|| eap_tlv_message_type_function_illegal_value <= *function)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::get_parameter_data(
+	const eap_tlv_header_c * const network_id_header,
+	eap_am_network_id_c * const new_network_id)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s\n"),
+		network_id_header->get_type(),
+		 get_type_string(static_cast<eap_tlv_message_type_e>(network_id_header->get_type()))));
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("get_parameter_data(eap_am_network_id_c *)"),
+		network_id_header->get_header_buffer(network_id_header->get_header_buffer_length()),
+		network_id_header->get_header_buffer_length()));
+
+	if (static_cast<eap_tlv_message_type_e>(network_id_header->get_type())
+		!= eap_tlv_message_type_network_id)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
+	}
+
+	eap_process_tlv_message_data_c network_id_data(m_am_tools);
+
+	if (network_id_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	eap_status_e status = network_id_data.set_message_data(
+		network_id_header->get_value_length(),
+		network_id_header->get_value(network_id_header->get_value_length()));
+
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	eap_array_c<eap_tlv_header_c> network_id_members(m_am_tools);
+
+	status = network_id_data.parse_message_data(&network_id_members);
+
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+
+	u32_t member_index(0ul);
+
+	eap_variable_data_c source_id(
+		m_am_tools);
+
+	if (source_id.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	{
+		const eap_tlv_header_c * const source_id_header = network_id_members.get_object(member_index);
+		if (source_id_header == 0)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+		}
+
+		status = network_id_data.get_parameter_data(source_id_header, &source_id);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+
+	++member_index;
+
+	eap_variable_data_c destination_id(
+		m_am_tools);
+
+	if (destination_id.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	{
+		const eap_tlv_header_c * const destination_id_header = network_id_members.get_object(member_index);
+		if (destination_id_header == 0)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+		}
+
+		status = network_id_data.get_parameter_data(destination_id_header, &destination_id);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+
+	++member_index;
+
+	u16_t type_value(0ul);
+
+	{
+		const eap_tlv_header_c * const type_header = network_id_members.get_object(member_index);
+		if (type_header == 0)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+		}
+
+		status = network_id_data.get_parameter_data(type_header, &type_value);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+
+	status = new_network_id->set_copy_of_am_network_id(
+		source_id.get_data(),
+		source_id.get_data_length(),
+		destination_id.get_data(),
+		destination_id.get_data_length(),
+		type_value);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::get_parameter_data(
+	const eap_tlv_header_c * const variable_data_header,
+	eap_variable_data_c * const variable_data)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s\n"),
+		variable_data_header->get_type(),
+		 get_type_string(static_cast<eap_tlv_message_type_e>(variable_data_header->get_type()))));
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("get_parameter_data(eap_variable_data_c *)"),
+		variable_data_header->get_header_buffer(variable_data_header->get_header_buffer_length()),
+		variable_data_header->get_header_buffer_length()));
+
+	if (variable_data == 0
+		|| variable_data->get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	if (static_cast<eap_tlv_message_type_e>(variable_data_header->get_type())
+		!= eap_tlv_message_type_variable_data)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
+	}
+
+	eap_status_e status = variable_data->set_copy_of_buffer(
+		variable_data_header->get_value(variable_data_header->get_value_length()),
+		variable_data_header->get_value_length());
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::get_parameter_data(
+	const eap_tlv_header_c * const session_key_header,
+		eapol_session_key_c * const session_key)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s\n"),
+		session_key_header->get_type(),
+		 get_type_string(static_cast<eap_tlv_message_type_e>(session_key_header->get_type()))));
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("get_parameter_data(eapol_session_key_c *)"),
+		session_key_header->get_header_buffer(session_key_header->get_header_buffer_length()),
+		session_key_header->get_header_buffer_length()));
+
+	if (static_cast<eap_tlv_message_type_e>(session_key_header->get_type())
+		!= eap_tlv_message_type_session_key)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
+	}
+
+	eap_process_tlv_message_data_c session_key_data(m_am_tools);
+
+	if (session_key_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	eap_status_e status = session_key_data.set_message_data(
+		session_key_header->get_value_length(),
+		session_key_header->get_value(session_key_header->get_value_length()));
+
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	eap_array_c<eap_tlv_header_c> session_key_members(m_am_tools);
+
+	status = session_key_data.parse_message_data(&session_key_members);
+
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	u32_t member_index(0ul);
+
+	{
+		const eap_tlv_header_c * const a_session_key_header = session_key_members.get_object(member_index);
+		if (a_session_key_header == 0)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+		}
+
+		eap_variable_data_c key(
+			m_am_tools);
+
+		if (key.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = session_key_data.get_parameter_data(a_session_key_header, &key);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = session_key->set_key(&key);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	++member_index;
+
+	{
+		const eap_tlv_header_c * const sequence_number_header = session_key_members.get_object(member_index);
+		if (sequence_number_header == 0)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+		}
+
+		eap_variable_data_c sequence_number(
+			m_am_tools);
+
+		if (sequence_number.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		status = session_key_data.get_parameter_data(sequence_number_header, &sequence_number);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = session_key->set_sequence_number(&sequence_number);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	++member_index;
+
+	{
+		const eap_tlv_header_c * const key_type_header = session_key_members.get_object(member_index);
+		if (key_type_header == 0)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+		}
+
+		u32_t value(0ul);
+
+		status = session_key_data.get_parameter_data(key_type_header, &value);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		session_key->set_key_type(static_cast<eapol_key_type_e>(value));
+	}
+
+	++member_index;
+
+	{
+		const eap_tlv_header_c * const key_index_header = session_key_members.get_object(member_index);
+		if (key_index_header == 0)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+		}
+
+		u32_t value(0ul);
+
+		status = session_key_data.get_parameter_data(key_index_header, &value);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		session_key->set_key_index(value);
+	}
+
+	++member_index;
+
+	{
+		const eap_tlv_header_c * const key_tx_bit_header = session_key_members.get_object(member_index);
+		if (key_tx_bit_header == 0)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+		}
+
+		u32_t value(0ul);
+
+		status = session_key_data.get_parameter_data(key_tx_bit_header, &value);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		session_key->set_key_tx_bit((value == 0) ? false : true);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::get_parameter_data(
+	const eap_tlv_header_c * const state_header,
+	eap_state_notification_c * * const state)
+
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s\n"),
+		state_header->get_type(),
+		 get_type_string(static_cast<eap_tlv_message_type_e>(state_header->get_type()))));
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("get_parameter_data(eap_state_notification_c *)"),
+		state_header->get_header_buffer(state_header->get_header_buffer_length()),
+		state_header->get_header_buffer_length()));
+
+	if (static_cast<eap_tlv_message_type_e>(state_header->get_type())
+		!= eap_tlv_message_type_eap_state_notification)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
+	}
+
+	eap_process_tlv_message_data_c session_key_data(m_am_tools);
+
+	if (session_key_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	eap_status_e status = session_key_data.set_message_data(
+		state_header->get_value_length(),
+		state_header->get_value(state_header->get_value_length()));
+
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	eap_array_c<eap_tlv_header_c> session_key_members(m_am_tools);
+
+	status = session_key_data.parse_message_data(&session_key_members);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+
+	u32_t member_index(0ul);
+
+	eap_am_network_id_c send_network_id(m_am_tools);
+
+	{
+		const eap_tlv_header_c * const send_network_id_header = session_key_members.get_object(member_index);
+		if (send_network_id_header == 0)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+		}
+
+		status = get_parameter_data(send_network_id_header, &send_network_id);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+
+	++member_index;
+
+	eap_protocol_layer_e protocol_layer(eap_protocol_layer_none);
+
+	{
+		const eap_tlv_header_c * const protocol_layer_header = session_key_members.get_object(member_index);
+		if (protocol_layer_header == 0)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+		}
+
+		u32_t value(0ul);
+
+		status = session_key_data.get_parameter_data(protocol_layer_header, &value);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		protocol_layer = static_cast<eap_protocol_layer_e>(value);
+	}
+
+
+	++member_index;
+
+	u32_t protocol(0ul);
+
+	{
+		const eap_tlv_header_c * const protocol_header = session_key_members.get_object(member_index);
+		if (protocol_header == 0)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+		}
+
+		status = session_key_data.get_parameter_data(protocol_header, &protocol);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+
+	++member_index;
+
+	eap_type_value_e eap_type(eap_type_none);
+
+	{
+		const eap_tlv_header_c * const eap_type_header = session_key_members.get_object(member_index);
+		if (eap_type_header == 0)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+		}
+
+		status = session_key_data.get_parameter_data(eap_type_header, &eap_type);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+
+	++member_index;
+
+	u32_t current_state(0ul);
+
+	{
+		const eap_tlv_header_c * const current_state_header = session_key_members.get_object(member_index);
+		if (current_state_header == 0)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+		}
+
+		status = session_key_data.get_parameter_data(current_state_header, &current_state);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+
+	++member_index;
+
+	bool is_client(true);
+
+	{
+		const eap_tlv_header_c * const is_client_header = session_key_members.get_object(member_index);
+		if (is_client_header == 0)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+		}
+
+		u32_t value(0ul);
+
+		status = session_key_data.get_parameter_data(is_client_header, &value);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		is_client = (value == 0ul) ? false : true;
+	}
+
+
+	++member_index;
+
+	eap_status_e authentication_error(eap_status_ok);
+
+	{
+		const eap_tlv_header_c * const authentication_error_header = session_key_members.get_object(member_index);
+		if (authentication_error_header == 0)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+		}
+
+		u32_t value(0ul);
+
+		status = session_key_data.get_parameter_data(authentication_error_header, &value);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		authentication_error = static_cast<eap_status_e>(value);
+	}
+
+	if (eap_type != eap_type_none)
+	{
+		*state = new eap_state_notification_c(
+			m_am_tools,
+			&send_network_id,
+			is_client,
+			eap_state_notification_eap,
+			protocol_layer,
+			eap_type,
+			current_state,
+			current_state,
+			0ul,
+			false);
+	}
+	else
+	{
+
+
+		*state = new eap_state_notification_c(
+			m_am_tools,
+			&send_network_id,
+			is_client,
+			eap_state_notification_generic,
+			protocol_layer,
+			protocol,
+			current_state,
+			current_state,
+			0ul,
+			false);
+	}
+
+	if ((*state) == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	(*state)->set_authentication_error(authentication_error);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::get_parameter_data(
+	const eap_tlv_header_c * const eap_type_header,
+	eap_type_value_e * const eap_type)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s\n"),
+		eap_type_header->get_type(),
+		 get_type_string(static_cast<eap_tlv_message_type_e>(eap_type_header->get_type()))));
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("get_parameter_data(eap_type_value_e *)"),
+		eap_type_header->get_header_buffer(eap_type_header->get_header_buffer_length()),
+		eap_type_header->get_header_buffer_length()));
+
+	if (static_cast<eap_tlv_message_type_e>(eap_type_header->get_type())
+		!= eap_tlv_message_type_eap_type)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
+	}
+
+	eap_status_e status = eap_expanded_type_c::read_type(
+		m_am_tools,
+		0ul,
+		eap_type_header->get_value(eap_type_header->get_value_length()),
+		eap_type_header->get_value_length(),
+		eap_type);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::get_parameter_data(
+	const eap_tlv_header_c * const settings_header,
+	eap_method_settings_c * const internal_settings)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s\n"),
+		settings_header->get_type(),
+		 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("get_parameter_data(eap_method_settings_c *)"),
+		settings_header->get_header_buffer(settings_header->get_header_buffer_length()),
+		settings_header->get_header_buffer_length()));
+
+	if (static_cast<eap_tlv_message_type_e>(settings_header->get_type())
+		!= eap_tlv_message_type_eap_method_settings)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
+	}
+
+	eap_process_tlv_message_data_c settings_data(m_am_tools);
+
+	if (settings_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	eap_status_e status = settings_data.set_message_data(
+		settings_header->get_value_length(),
+		settings_header->get_value(settings_header->get_value_length()));
+
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	eap_array_c<eap_tlv_header_c> settings_members(m_am_tools);
+
+	status = settings_data.parse_message_data(&settings_members);
+
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	u32_t member_index(0ul);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_completion_status\n"),
+		settings_header->get_type(),
+		 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+	status = read_parameter_data(
+		&settings_members,
+		member_index,
+		eap_tlv_message_type_eap_status,
+		&(internal_settings->m_completion_status));
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	++member_index;
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_EAPType\n"),
+		settings_header->get_type(),
+		 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+	status = read_parameter_data(
+		&settings_members,
+		member_index,
+		&(internal_settings->m_EAPType));
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	++member_index;
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_IndexType\n"),
+		settings_header->get_type(),
+		 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+	status = read_parameter_data(
+		&settings_members,
+		member_index,
+		&(internal_settings->m_IndexType));
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	++member_index;
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_Index\n"),
+		settings_header->get_type(),
+		 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+	status = read_parameter_data(
+		&settings_members,
+		member_index,
+		&(internal_settings->m_Index));
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	++member_index;
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_UseAutomaticCACertificatePresent\n"),
+			settings_header->get_type(),
+			 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+		// Use automatic CA certificate.
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(internal_settings->m_UseAutomaticCACertificatePresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_UseAutomaticCACertificatePresent == true)
+		{
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_UseAutomaticCACertificate\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_UseAutomaticCACertificate));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_UseAutomaticUsernamePresent\n"),
+			settings_header->get_type(),
+			 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+		// Use automatic username.
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(internal_settings->m_UseAutomaticUsernamePresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_UseAutomaticUsernamePresent == true)
+		{
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_UseAutomaticUsername\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_UseAutomaticUsername));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_UseAutomaticRealmPresent\n"),
+			settings_header->get_type(),
+			 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+		// Use automatic username.
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(internal_settings->m_UseAutomaticRealmPresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_UseAutomaticRealmPresent == true)
+		{
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_UseAutomaticRealm\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_UseAutomaticRealm));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_UsernamePresent\n"),
+			settings_header->get_type(),
+			 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+		// Username in ASCII format
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(internal_settings->m_UsernamePresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_UsernamePresent == true)
+		{
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_Username_fix\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_Username_fix));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_PasswordExistPresent\n"),
+			settings_header->get_type(),
+			 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+		// Password existence
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(internal_settings->m_PasswordExistPresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_PasswordExistPresent == true)
+		{
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_PasswordExist\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_PasswordExist));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_PasswordPresent\n"),
+			settings_header->get_type(),
+			 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+		// Password in ASCII format
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(internal_settings->m_PasswordPresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_PasswordPresent == true)
+		{
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_Password\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_Password));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_RealmPresent\n"),
+			settings_header->get_type(),
+			 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+		// Realm in ASCII format
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(internal_settings->m_RealmPresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_RealmPresent == true)
+		{
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_Realm\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_Realm));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_UsePseudonymsPresent\n"),
+			settings_header->get_type(),
+			 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+		// Use pseudonym identities in EAP-SIM/AKA
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(internal_settings->m_UsePseudonymsPresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_UsePseudonymsPresent == true)
+		{
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_UsePseudonyms\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_UsePseudonyms));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_VerifyServerRealmPresent\n"),
+			settings_header->get_type(),
+			 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+		// Whether EAP-TLS/TTLS/PEAP should verify server realm
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(internal_settings->m_VerifyServerRealmPresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_VerifyServerRealmPresent == true)
+		{
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_VerifyServerRealm\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_VerifyServerRealm));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_RequireClientAuthenticationPresent\n"),
+			settings_header->get_type(),
+			 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+		// Whether EAP-TLS/TTLS/PEAP should require client authentication
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(internal_settings->m_RequireClientAuthenticationPresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_RequireClientAuthenticationPresent == true)
+		{
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_RequireClientAuthentication\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_RequireClientAuthentication));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_SessionValidityTimePresent\n"),
+			settings_header->get_type(),
+			 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+		// General session validity time (in minutes)
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(internal_settings->m_SessionValidityTimePresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_SessionValidityTimePresent == true)
+		{
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_SessionValidityTime\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_SessionValidityTime));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_CipherSuitesPresent\n"),
+			settings_header->get_type(),
+			 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+		// An array of allowed cipher suites for EAP-TLS/TTLS/PEAP.
+		// Refer to RFC2246 chapter A.5 for the values.
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(internal_settings->m_CipherSuitesPresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_CipherSuitesPresent == true)
+		{
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_CipherSuites\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_CipherSuites));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_PEAPVersionsPresent\n"),
+			settings_header->get_type(),
+			 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+		// Which EAP-PEAP versions are allowed
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(internal_settings->m_PEAPVersionsPresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_PEAPVersionsPresent == true)
+		{
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_PEAPv0Allowed\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_PEAPv0Allowed));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_PEAPv1Allowed\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_PEAPv1Allowed));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_PEAPv2Allowed\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_PEAPv2Allowed));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_CertificatesPresent\n"),
+			settings_header->get_type(),
+			 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+  		// Array listing the allowed certificates for EAP-TLS/TTLS/PEAP.
+  		// Subject key ID and Certificate type are the only mandatory certificate
+  		// details needed at the moment.
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(internal_settings->m_CertificatesPresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_CertificatesPresent == true)
+		{
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_Certificates\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_Certificates));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_EnabledEncapsulatedEAPTypesPresent\n"),
+			settings_header->get_type(),
+			 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+		// Array listing the encapsulated EAP types (in priority order).
+		// Use EAP type values from eap_type_value_e.
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(internal_settings->m_EnabledEncapsulatedEAPTypesPresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_EnabledEncapsulatedEAPTypesPresent == true)
+		{
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_EnabledEncapsulatedEAPTypes\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_EnabledEncapsulatedEAPTypes));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_DisabledEncapsulatedEAPTypesPresent\n"),
+			settings_header->get_type(),
+			 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+		// Array listing the encapsulated EAP types (in priority order).
+		// Use EAP type values from eap_type_value_e.
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(internal_settings->m_DisabledEncapsulatedEAPTypesPresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_DisabledEncapsulatedEAPTypesPresent == true)
+		{
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_DisabledEncapsulatedEAPTypes\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_DisabledEncapsulatedEAPTypes));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_AuthProvModeAllowedPresent\n"),
+			settings_header->get_type(),
+			 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+		// Whether Authenticated provisioning mode allowed or not in EAP-FAST.
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(internal_settings->m_AuthProvModeAllowedPresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_AuthProvModeAllowedPresent == true)
+		{
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_AuthProvModeAllowed\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_AuthProvModeAllowed));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_UnauthProvModeAllowedPresent\n"),
+			settings_header->get_type(),
+			 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+		// Whether Unauthenticated provisioning mode allowed or not in EAP-FAST.
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(internal_settings->m_UnauthProvModeAllowedPresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_UnauthProvModeAllowedPresent == true)
+		{
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_UnauthProvModeAllowed\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_UnauthProvModeAllowed));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_PACGroupReferencePresent\n"),
+			settings_header->get_type(),
+			 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+		// PAC group reference in ASCII format for EAP-FAST.
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(internal_settings->m_PACGroupReferencePresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_PACGroupReferencePresent == true)
+		{
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_PACGroupReference\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_PACGroupReference));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_WarnADHPNoPACPresent\n"),
+			settings_header->get_type(),
+			 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+		// Whether to Warn (or Prompt) for ADHP (Authenticated Diffie-Hellman Protocol)
+		// auto-provisioning when there is no PAC at all. EAP-FAST specific.
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(internal_settings->m_WarnADHPNoPACPresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_WarnADHPNoPACPresent == true)
+		{
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_WarnADHPNoPAC\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_WarnADHPNoPAC));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_WarnADHPNoMatchingPACPresent\n"),
+			settings_header->get_type(),
+			 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+		// Whether to Warn (or Prompt) for ADHP auto-provisioning when
+		// there is no PAC that matches the A-ID sent by server. EAP-FAST specific.
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(internal_settings->m_WarnADHPNoMatchingPACPresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_WarnADHPNoMatchingPACPresent == true)
+		{
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_WarnADHPNoMatchingPAC\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_WarnADHPNoMatchingPAC));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_WarnNotDefaultServerPresent\n"),
+			settings_header->get_type(),
+			 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+		// Whether to Warn (or Prompt) when client encouters a server that has provisioned
+		// the client with a PAC before but is not currently selected as the default server.
+		// EAP-FAST specific.
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(internal_settings->m_WarnNotDefaultServerPresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_WarnNotDefaultServerPresent == true)
+		{
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_WarnNotDefaultServer\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_WarnNotDefaultServer));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_SelectedEAPTypesPresent\n"),
+			settings_header->get_type(),
+			 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+		// Array listing the active and disabled EAP types (in priority order).
+		// Use EAP type values from eap_type_value_e.
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(internal_settings->m_SelectedEAPTypesPresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_SelectedEAPTypesPresent == true)
+		{
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_active_eap_methods\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_active_eap_methods));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_disabled_eap_methods\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_disabled_eap_methods));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_TunnelingTypePresent\n"),
+			settings_header->get_type(),
+			 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(internal_settings->m_TunnelingTypePresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_TunnelingTypePresent == true)
+		{
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_TunnelingType\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_TunnelingType));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_DestinationIndexAndTypePresent\n"),
+			settings_header->get_type(),
+			 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(internal_settings->m_DestinationIndexAndTypePresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_DestinationIndexAndTypePresent == true)
+		{
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_DestinationIndexType\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_DestinationIndexType));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_DestinationIndex\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_DestinationIndex));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_MethodInfoPresent\n"),
+			settings_header->get_type(),
+			 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(internal_settings->m_MethodInfoPresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_MethodInfoPresent == true)
+		{
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_KReleaseDate\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_KReleaseDate));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_KEapTypeVersion\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_KEapTypeVersion));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_KManufacturer\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_KManufacturer));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_ButtonIdPresent\n"),
+			settings_header->get_type(),
+			 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(internal_settings->m_ButtonIdPresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_ButtonIdPresent == true)
+		{
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_ButtonId\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_ButtonId));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_ShowPassWordPromptPresent\n"),
+			settings_header->get_type(),
+			 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(internal_settings->m_ShowPassWordPromptPresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_ShowPassWordPromptPresent == true)
+		{
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_ShowPassWordPrompt\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_ShowPassWordPrompt));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			EAP_TRACE_FLAGS_MESSAGE_DATA,
+			(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_UseIdentityPrivacyPresent\n"),
+			settings_header->get_type(),
+			 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(internal_settings->m_UseIdentityPrivacyPresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (internal_settings->m_UseIdentityPrivacyPresent == true)
+		{
+			++member_index;
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				EAP_TRACE_FLAGS_MESSAGE_DATA,
+				(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s, m_UseIdentityPrivacy\n"),
+				settings_header->get_type(),
+				 get_type_string(static_cast<eap_tlv_message_type_e>(settings_header->get_type()))));
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(internal_settings->m_UseIdentityPrivacy));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::get_parameter_data(
+	const eap_tlv_header_c * const cert_entry_header,
+	eap_certificate_entry_c * const cert_entry)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s\n"),
+		cert_entry_header->get_type(),
+		 get_type_string(static_cast<eap_tlv_message_type_e>(cert_entry_header->get_type()))));
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("get_parameter_data(eap_certificate_entry_c *)"),
+		cert_entry_header->get_header_buffer(cert_entry_header->get_header_buffer_length()),
+		cert_entry_header->get_header_buffer_length()));
+
+	if (static_cast<eap_tlv_message_type_e>(cert_entry_header->get_type())
+		!= eap_tlv_message_type_eap_certificate_entry)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
+	}
+
+	eap_process_tlv_message_data_c settings_data(m_am_tools);
+
+	if (settings_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	eap_status_e status = settings_data.set_message_data(
+		cert_entry_header->get_value_length(),
+		cert_entry_header->get_value(cert_entry_header->get_value_length()));
+
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	eap_array_c<eap_tlv_header_c> settings_members(m_am_tools);
+
+	status = settings_data.parse_message_data(&settings_members);
+
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	u32_t member_index(0ul);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	{
+		// Specifies whether this entry describes user or CA certificate (mandatory)
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(cert_entry->m_CertType));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	++member_index;
+
+	{
+		// Subject name in distinguished name ASCII form. This is optional.
+		// For example "/C=US/O=Some organization/CN=Some common name".
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(cert_entry->m_SubjectNamePresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (cert_entry->m_SubjectNamePresent == true)
+		{
+			++member_index;
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(cert_entry->m_SubjectName));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		// Issuer name in distinguished name ASCII form. This is optional.
+		// For example "/C=US/O=Some organization/CN=Some common name".
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(cert_entry->m_IssuerNamePresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (cert_entry->m_IssuerNamePresent == true)
+		{
+			++member_index;
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(cert_entry->m_IssuerName));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		// Serial number in ASCII form. This is optional.
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(cert_entry->m_SerialNumberPresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (cert_entry->m_SerialNumberPresent == true)
+		{
+			++member_index;
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(cert_entry->m_SerialNumber));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		// Subject key in binary form. This is mandatory.
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(cert_entry->m_SubjectKeyIDPresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (cert_entry->m_SubjectKeyIDPresent == true)
+		{
+			++member_index;
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(cert_entry->m_SubjectKeyID));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		// Subject key in binary form. This is mandatory.
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(cert_entry->m_ThumbprintPresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (cert_entry->m_ThumbprintPresent == true)
+		{
+			++member_index;
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(cert_entry->m_Thumbprint));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		// This holds only the certificate label. This is the text UI will show.
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(cert_entry->m_LabelPresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (cert_entry->m_LabelPresent == true)
+		{
+			++member_index;
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(cert_entry->m_Label));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		// Primary name of the certificate if any, UI uses this.
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(cert_entry->m_PrimaryNamePresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (cert_entry->m_PrimaryNamePresent == true)
+		{
+			++member_index;
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(cert_entry->m_PrimaryName));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		// Secondary name of the certificate if any, UI uses this.
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(cert_entry->m_SecondaryNamePresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (cert_entry->m_SecondaryNamePresent == true)
+		{
+			++member_index;
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(cert_entry->m_SecondaryName));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	++member_index;
+
+	{
+		// UI uses this to indicate enabled certificate.
+		status = read_parameter_data(
+			&settings_members,
+			member_index,
+			&(cert_entry->m_iIsEnabledPresent));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (cert_entry->m_iIsEnabledPresent == true)
+		{
+			++member_index;
+
+			status = read_parameter_data(
+				&settings_members,
+				member_index,
+				&(cert_entry->m_iIsEnabled));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::get_parameter_data(
+	const eap_tlv_header_c * const ushort_array_header,
+	eap_array_c<u16_t> * const ushort_array)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s\n"),
+		ushort_array_header->get_type(),
+		 get_type_string(static_cast<eap_tlv_message_type_e>(ushort_array_header->get_type()))));
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("get_parameter_data(eap_array_c<u16_t> *)"),
+		ushort_array_header->get_header_buffer(ushort_array_header->get_header_buffer_length()),
+		ushort_array_header->get_header_buffer_length()));
+
+	if (static_cast<eap_tlv_message_type_e>(ushort_array_header->get_type())
+		!= eap_tlv_message_type_array)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
+	}
+
+	eap_process_tlv_message_data_c ushort_array_data(m_am_tools);
+
+	if (ushort_array_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	eap_status_e status = ushort_array_data.set_message_data(
+		ushort_array_header->get_value_length(),
+		ushort_array_header->get_value(ushort_array_header->get_value_length()));
+
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	eap_array_c<eap_tlv_header_c> ushort_array_members(m_am_tools);
+
+	status = ushort_array_data.parse_message_data(&ushort_array_members);
+
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+
+	for (u32_t ind_member = 0ul; ind_member < ushort_array_members.get_object_count(); ind_member++)
+	{
+		u16_t * const ushort_value = new u16_t;
+
+		eap_automatic_variable_c<u16_t> automatic_ushort_value(m_am_tools, ushort_value);
+
+		if (ushort_value == 0)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		{
+			const eap_tlv_header_c * const ushort_header = ushort_array_members.get_object(ind_member);
+			if (ushort_header == 0)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+			}
+
+			status = ushort_array_data.get_parameter_data(ushort_header, ushort_value);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+			automatic_ushort_value.do_not_free_variable();
+
+			status = ushort_array->add_object(ushort_value, true);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	} // for ()
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT u32_t eap_process_tlv_message_data_c::get_payload_size(
+	EAP_TEMPLATE_CONST eap_array_c<eap_type_value_e> * const eap_type_array) const
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::get_payload_size(eap_array_c<eap_type_value_e> * )\n")));
+
+	u32_t size = eap_type_array->get_object_count()
+				* (eap_tlv_header_c::get_header_length()
+					+ eap_expanded_type_c::get_eap_expanded_type_size()); // Size of eap_type_value_e
+
+	return (size);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::add_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<eap_type_value_e> * const eap_type_array)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::add_parameter_data(eap_array_c<eap_type_value_e> * )\n")));
+
+	const u32_t size_of_eap_type_array(get_payload_size(eap_type_array));
+
+	eap_status_e status = add_structured_parameter_header(
+		eap_tlv_message_type_array,
+		size_of_eap_type_array);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	for (u32_t ind = 0ul; ind < eap_type_array->get_object_count(); ind++)
+	{
+		const eap_type_value_e * const value = eap_type_array->get_object(ind);
+		if (value != 0)
+		{
+			status = add_parameter_data(*value);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::get_parameter_data(
+	const eap_tlv_header_c * const eap_type_array_header,
+	eap_array_c<eap_type_value_e> * const eap_type_array)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s\n"),
+		eap_type_array_header->get_type(),
+		 get_type_string(static_cast<eap_tlv_message_type_e>(eap_type_array_header->get_type()))));
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("get_parameter_data(eap_array_c<eap_type_value_e> *)"),
+		eap_type_array_header->get_header_buffer(eap_type_array_header->get_header_buffer_length()),
+		eap_type_array_header->get_header_buffer_length()));
+
+	if (static_cast<eap_tlv_message_type_e>(eap_type_array_header->get_type())
+		!= eap_tlv_message_type_array)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
+	}
+
+	eap_process_tlv_message_data_c ushort_array_data(m_am_tools);
+
+	if (ushort_array_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	eap_status_e status = ushort_array_data.set_message_data(
+		eap_type_array_header->get_value_length(),
+		eap_type_array_header->get_value(eap_type_array_header->get_value_length()));
+
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	eap_array_c<eap_tlv_header_c> ushort_array_members(m_am_tools);
+
+	status = ushort_array_data.parse_message_data(&ushort_array_members);
+
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+
+	for (u32_t ind_member = 0ul; ind_member < ushort_array_members.get_object_count(); ind_member++)
+	{
+		eap_type_value_e * const eap_type_value = new eap_type_value_e();
+
+		eap_automatic_variable_c<eap_type_value_e> automatic_eap_type_value(m_am_tools, eap_type_value);
+
+		if (eap_type_value == 0)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		{
+			const eap_tlv_header_c * const eap_type_value_header = ushort_array_members.get_object(ind_member);
+			if (eap_type_value_header == 0)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+			}
+
+			status = ushort_array_data.get_parameter_data(eap_type_value_header, eap_type_value);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+			automatic_eap_type_value.do_not_free_variable();
+
+			status = eap_type_array->add_object(eap_type_value, true);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	} // for ()
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::get_parameter_data(
+	const eap_tlv_header_c * const cert_array_header,
+	eap_array_c<eap_certificate_entry_c> * const cert_array)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s\n"),
+		cert_array_header->get_type(),
+		 get_type_string(static_cast<eap_tlv_message_type_e>(cert_array_header->get_type()))));
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("get_parameter_data(eap_array_c<eap_certificate_entry_c> *)"),
+		cert_array_header->get_header_buffer(cert_array_header->get_header_buffer_length()),
+		cert_array_header->get_header_buffer_length()));
+
+	if (static_cast<eap_tlv_message_type_e>(cert_array_header->get_type())
+		!= eap_tlv_message_type_array)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
+	}
+
+	eap_process_tlv_message_data_c cert_array_data(m_am_tools);
+
+	if (cert_array_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	eap_status_e status = cert_array_data.set_message_data(
+		cert_array_header->get_value_length(),
+		cert_array_header->get_value(cert_array_header->get_value_length()));
+
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	eap_array_c<eap_tlv_header_c> cert_array_members(m_am_tools);
+
+	status = cert_array_data.parse_message_data(&cert_array_members);
+
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+
+	for (u32_t ind_member = 0ul; ind_member < cert_array_members.get_object_count(); ind_member++)
+	{
+		eap_certificate_entry_c * const cert_entry = new eap_certificate_entry_c(m_am_tools);
+
+		eap_automatic_variable_c<eap_certificate_entry_c> automatic_cert_entry(m_am_tools, cert_entry);
+
+		if (cert_entry == 0)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		{
+			const eap_tlv_header_c * const cert_entry_header = cert_array_members.get_object(ind_member);
+			if (cert_entry_header == 0)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+			}
+
+			status = cert_array_data.get_parameter_data(cert_entry_header, cert_entry);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+			automatic_cert_entry.do_not_free_variable();
+
+			status = cert_array->add_object(cert_entry, true);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	} // for ()
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+#if defined(USE_EAP_SIMPLE_CONFIG)
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::get_parameter_data(
+	const eap_tlv_header_c * const network_key_header,
+	network_key_and_index_c * const network_key)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s\n"),
+		network_key_header->get_type(),
+		 get_type_string(static_cast<eap_tlv_message_type_e>(network_key_header->get_type()))));
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("get_parameter_data(network_key_and_index_c *)"),
+		network_key_header->get_header_buffer(network_key_header->get_header_buffer_length()),
+		network_key_header->get_header_buffer_length()));
+
+	if (static_cast<eap_tlv_message_type_e>(network_key_header->get_type())
+		!= eap_tlv_message_type_network_key)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
+	}
+
+	eap_process_tlv_message_data_c credential_data(m_am_tools);
+
+	if (credential_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	eap_status_e status = credential_data.set_message_data(
+		network_key_header->get_value_length(),
+		network_key_header->get_value(network_key_header->get_value_length()));
+
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	eap_array_c<eap_tlv_header_c> credential_members(m_am_tools);
+
+	status = credential_data.parse_message_data(&credential_members);
+
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	u32_t member_index(0ul);
+
+	u8_t network_key_index(0ul);
+
+	{
+		const eap_tlv_header_c * const network_key_index_header = credential_members.get_object(member_index);
+		if (network_key_index_header == 0)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+		}
+
+		status = credential_data.get_parameter_data(network_key_index_header, &network_key_index);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	++member_index;
+
+	eap_variable_data_c key(m_am_tools);
+
+	{
+		const eap_tlv_header_c * const key_header = credential_members.get_object(member_index);
+		if (key_header == 0)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+		}
+
+		status = credential_data.get_parameter_data(key_header, &key);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	++member_index;
+
+	network_key->set_network_key_index(network_key_index);
+
+	status = network_key->get_network_key()->set_copy_of_buffer(&key);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+
+//--------------------------------------------------
+
+#if defined(USE_EAP_SIMPLE_CONFIG)
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::get_parameter_data(
+	const eap_tlv_header_c * const network_keys_array_header,
+	eap_array_c<network_key_and_index_c> * const network_keys_array)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s\n"),
+		network_keys_array_header->get_type(),
+		 get_type_string(static_cast<eap_tlv_message_type_e>(network_keys_array_header->get_type()))));
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("get_parameter_data(eap_array_c<network_key_and_index_c> *)"),
+		network_keys_array_header->get_header_buffer(network_keys_array_header->get_header_buffer_length()),
+		network_keys_array_header->get_header_buffer_length()));
+
+	if (static_cast<eap_tlv_message_type_e>(network_keys_array_header->get_type())
+		!= eap_tlv_message_type_array)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
+	}
+
+	eap_process_tlv_message_data_c credential_array_data(m_am_tools);
+
+	if (credential_array_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	eap_status_e status = credential_array_data.set_message_data(
+		network_keys_array_header->get_value_length(),
+		network_keys_array_header->get_value(network_keys_array_header->get_value_length()));
+
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	eap_array_c<eap_tlv_header_c> credential_array_members(m_am_tools);
+
+	status = credential_array_data.parse_message_data(&credential_array_members);
+
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+
+	for (u32_t ind_member = 0ul; ind_member < credential_array_members.get_object_count(); ind_member++)
+	{
+		network_key_and_index_c * const network_key = new network_key_and_index_c(m_am_tools);
+
+		eap_automatic_variable_c<network_key_and_index_c> automatic_network_key(m_am_tools, network_key);
+
+		if (network_key == 0
+			|| network_key->get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		{
+			const eap_tlv_header_c * const simple_config_credential_header = credential_array_members.get_object(ind_member);
+			if (simple_config_credential_header == 0)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+			}
+
+			status = credential_array_data.get_parameter_data(simple_config_credential_header, network_key);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+			automatic_network_key.do_not_free_variable();
+
+			status = network_keys_array->add_object(network_key, true);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	} // for ()
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+
+//--------------------------------------------------
+
+#if defined(USE_EAP_SIMPLE_CONFIG)
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::get_parameter_data(
+	const eap_tlv_header_c * const credential_header,
+	simple_config_credential_c * const credential)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s\n"),
+		credential_header->get_type(),
+		 get_type_string(static_cast<eap_tlv_message_type_e>(credential_header->get_type()))));
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("get_parameter_data(simple_config_credential_c *)"),
+		credential_header->get_header_buffer(credential_header->get_header_buffer_length()),
+		credential_header->get_header_buffer_length()));
+
+	if (static_cast<eap_tlv_message_type_e>(credential_header->get_type())
+		!= eap_tlv_message_type_protected_setup_credential)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
+	}
+
+	eap_process_tlv_message_data_c credential_data(m_am_tools);
+
+	if (credential_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	eap_status_e status = credential_data.set_message_data(
+		credential_header->get_value_length(),
+		credential_header->get_value(credential_header->get_value_length()));
+
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	eap_array_c<eap_tlv_header_c> credential_members(m_am_tools);
+
+	status = credential_data.parse_message_data(&credential_members);
+
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	u32_t member_index(0ul);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	u8_t network_index(0ul);
+
+	status = credential_data.read_parameter_data(
+			&credential_members,
+			member_index,
+			&network_index);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	++member_index;
+
+	eap_variable_data_c SSID(m_am_tools);
+
+	status = credential_data.read_parameter_data(
+			&credential_members,
+			member_index,
+			&SSID);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	++member_index;
+
+	simple_config_Authentication_Type_e authentication_type(simple_config_Authentication_Type_None);
+
+	status = credential_data.read_parameter_data(
+			&credential_members,
+			member_index,
+			&authentication_type);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	++member_index;
+
+	simple_config_Encryption_Type_e encryption_type(simple_config_Encryption_Type_None);
+
+	status = credential_data.read_parameter_data(
+			&credential_members,
+			member_index,
+			&encryption_type);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	++member_index;
+
+	 eap_array_c<network_key_and_index_c> network_keys_array(m_am_tools);
+
+	status = credential_data.read_parameter_data(
+			&credential_members,
+			member_index,
+			&network_keys_array);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	++member_index;
+
+	 eap_variable_data_c MAC_address(m_am_tools);
+
+	status = credential_data.read_parameter_data(
+			&credential_members,
+			member_index,
+			&MAC_address);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	credential->set_network_index(network_index);
+
+	status = credential->get_SSID()->set_copy_of_buffer(&SSID);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	credential->set_Authentication_Type(authentication_type);
+
+	credential->set_Encryption_Type(encryption_type);
+
+	status = copy(
+		&network_keys_array,
+		credential->get_network_keys(),
+		m_am_tools,
+		false);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = credential->get_MAC_address()->set_copy_of_buffer(&MAC_address);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+
+//--------------------------------------------------
+
+#if defined(USE_EAP_SIMPLE_CONFIG)
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::get_parameter_data(
+	const eap_tlv_header_c * const credential_array_header,
+	eap_array_c<simple_config_credential_c> * const credential_array)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("eap_process_tlv_message_data_c::get_parameter_data(): type=%d=%s\n"),
+		credential_array_header->get_type(),
+		 get_type_string(static_cast<eap_tlv_message_type_e>(credential_array_header->get_type()))));
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
+		(EAPL("get_parameter_data(eap_array_c<simple_config_credential_c> *)"),
+		credential_array_header->get_header_buffer(credential_array_header->get_header_buffer_length()),
+		credential_array_header->get_header_buffer_length()));
+
+	if (static_cast<eap_tlv_message_type_e>(credential_array_header->get_type())
+		!= eap_tlv_message_type_array)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
+	}
+
+	eap_process_tlv_message_data_c credential_array_data(m_am_tools);
+
+	if (credential_array_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	eap_status_e status = credential_array_data.set_message_data(
+		credential_array_header->get_value_length(),
+		credential_array_header->get_value(credential_array_header->get_value_length()));
+
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	eap_array_c<eap_tlv_header_c> credential_array_members(m_am_tools);
+
+	status = credential_array_data.parse_message_data(&credential_array_members);
+
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+
+	for (u32_t ind_member = 0ul; ind_member < credential_array_members.get_object_count(); ind_member++)
+	{
+		simple_config_credential_c * const simple_config_credential = new simple_config_credential_c(m_am_tools);
+
+		eap_automatic_variable_c<simple_config_credential_c> automatic_simple_config_credential(m_am_tools, simple_config_credential);
+
+		if (simple_config_credential == 0
+			|| simple_config_credential->get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		{
+			const eap_tlv_header_c * const simple_config_credential_header = credential_array_members.get_object(ind_member);
+			if (simple_config_credential_header == 0)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+			}
+
+			status = credential_array_data.get_parameter_data(simple_config_credential_header, simple_config_credential);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+			automatic_simple_config_credential.do_not_free_variable();
+
+			status = credential_array->add_object(simple_config_credential, true);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
+	} // for ()
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::read_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+	const u32_t parameter_index,
+	eap_am_network_id_c * const out_data)
+{
+	if (parameters == 0
+		|| out_data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const eap_tlv_header_c * const positional_parameter
+		= parameters->get_object(parameter_index);
+
+	if (positional_parameter == 0
+		|| positional_parameter->get_type() != eap_tlv_message_type_network_id)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	eap_status_e status = get_parameter_data(positional_parameter, out_data);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::read_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+	const u32_t parameter_index,
+	eap_variable_data_c * const out_data)
+{
+	if (parameters == 0
+		|| out_data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const eap_tlv_header_c * const positional_parameter
+		= parameters->get_object(parameter_index);
+
+	if (positional_parameter == 0
+		|| positional_parameter->get_type() != eap_tlv_message_type_variable_data)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	eap_status_e status = get_parameter_data(positional_parameter, out_data);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::read_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+	const u32_t parameter_index,
+	const eap_tlv_message_type_e type,
+	eap_status_e * const out_data)
+{
+	if (parameters == 0
+		|| out_data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const eap_tlv_header_c * const positional_parameter
+		= parameters->get_object(parameter_index);
+
+	if (positional_parameter == 0
+		|| positional_parameter->get_type() != static_cast<eap_tlv_type_t>(type))
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	u32_t value(0ul);
+
+	eap_status_e status = get_parameter_data(positional_parameter, &value);
+
+	*out_data = static_cast<eap_status_e>(value);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::read_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+	const u32_t parameter_index,
+	eap_array_c<eap_am_network_id_c> * const out_data)
+{
+	if (parameters == 0
+		|| out_data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const eap_tlv_header_c * const array_of_network_ids
+		= parameters->get_object(parameter_index);
+
+	if (array_of_network_ids == 0
+		|| array_of_network_ids->get_type() != eap_tlv_message_type_array)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	eap_process_tlv_message_data_c array_data(m_am_tools);
+
+	if (array_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	eap_status_e status = array_data.set_message_data(
+		array_of_network_ids->get_value_length(),
+		array_of_network_ids->get_value(array_of_network_ids->get_value_length()));
+
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	eap_array_c<eap_tlv_header_c> network_ids(m_am_tools);
+
+	status = array_data.parse_message_data(
+		&network_ids);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	for (u32_t ind = 0ul; ind < network_ids.get_object_count(); ++ind)
+	{
+		const eap_tlv_header_c * const header = network_ids.get_object(ind);
+
+		if (header == 0)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+		}
+
+		eap_am_network_id_c * const new_network_id = new eap_am_network_id_c(m_am_tools);
+		if (new_network_id == 0)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		eap_automatic_variable_c<eap_am_network_id_c> automatic_new_network_id(m_am_tools, new_network_id);
+
+		status = array_data.get_parameter_data(header, new_network_id);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		automatic_new_network_id.do_not_free_variable();
+
+		status = out_data->add_object(
+			new_network_id,
+			true);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+	} // for()
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::read_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+	const u32_t parameter_index,
+	eap_state_notification_c * * const out_data)
+{
+	if (parameters == 0
+		|| out_data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const eap_tlv_header_c * const positional_parameter
+		= parameters->get_object(parameter_index);
+
+	if (positional_parameter == 0
+		|| positional_parameter->get_type() != eap_tlv_message_type_eap_state_notification)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	eap_status_e status = get_parameter_data(positional_parameter, out_data);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::read_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+	const u32_t parameter_index,
+	eapol_RSNA_key_header_c::eapol_RSNA_cipher_e * const out_data)
+{
+	if (parameters == 0
+		|| out_data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const eap_tlv_header_c * const positional_parameter
+		= parameters->get_object(parameter_index);
+
+	if (positional_parameter == 0
+		|| positional_parameter->get_type() != eap_tlv_message_type_RSNA_cipher)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	u32_t value(0ul);
+
+	eap_status_e status = get_parameter_data(positional_parameter, &value);
+
+	*out_data = static_cast<eapol_RSNA_key_header_c::eapol_RSNA_cipher_e>(value);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::read_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+	const u32_t parameter_index,
+	bool * const out_data)
+{
+	if (parameters == 0
+		|| out_data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const eap_tlv_header_c * const positional_parameter
+		= parameters->get_object(parameter_index);
+
+	if (positional_parameter == 0
+		|| positional_parameter->get_type() != eap_tlv_message_type_boolean)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	u32_t value(0ul);
+
+	eap_status_e status = get_parameter_data(positional_parameter, &value);
+
+	*out_data = (value == 0) ? false: true;
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::read_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+	const u32_t parameter_index,
+	eap_type_value_e * const out_data)
+{
+	if (parameters == 0
+		|| out_data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const eap_tlv_header_c * const positional_parameter
+		= parameters->get_object(parameter_index);
+
+	if (positional_parameter == 0
+		|| positional_parameter->get_type() != eap_tlv_message_type_eap_type)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	eap_status_e status = get_parameter_data(positional_parameter, out_data);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::read_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+	const u32_t parameter_index,
+	eapol_key_authentication_type_e * const out_data)
+{
+	if (parameters == 0
+		|| out_data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const eap_tlv_header_c * const positional_parameter
+		= parameters->get_object(parameter_index);
+
+	if (positional_parameter == 0
+		|| positional_parameter->get_type() != eap_tlv_message_type_eapol_key_authentication_type)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	u32_t value(0ul);
+
+	eap_status_e status = get_parameter_data(positional_parameter, &value);
+
+	*out_data = static_cast<eapol_key_authentication_type_e>(value);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::read_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+	const u32_t parameter_index,
+	eapol_session_key_c * const out_data)
+{
+	if (parameters == 0
+		|| out_data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const eap_tlv_header_c * const positional_parameter
+		= parameters->get_object(parameter_index);
+
+	if (positional_parameter == 0
+		|| positional_parameter->get_type() != eap_tlv_message_type_session_key)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	eap_status_e status = get_parameter_data(positional_parameter, out_data);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::read_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+	const u32_t parameter_index,
+	eap_tlv_message_type_function_e * const out_data)
+{
+	if (parameters == 0
+		|| out_data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const eap_tlv_header_c * const positional_parameter
+		= parameters->get_object(parameter_index);
+
+	if (positional_parameter == 0
+		|| positional_parameter->get_type() != eap_tlv_message_type_function)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	eap_status_e status = get_parameter_data(positional_parameter, out_data);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::read_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+	const u32_t parameter_index,
+	eapol_key_802_11_authentication_mode_e * const out_data)
+{
+	if (parameters == 0
+		|| out_data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const eap_tlv_header_c * const positional_parameter
+		= parameters->get_object(parameter_index);
+
+	if (positional_parameter == 0
+		|| positional_parameter->get_type() != eap_tlv_message_type_eapol_key_802_11_authentication_mode)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	u32_t value(0ul);
+
+	eap_status_e status = get_parameter_data(positional_parameter, &value);
+
+	*out_data = static_cast<eapol_key_802_11_authentication_mode_e>(value);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::read_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+	const u32_t parameter_index,
+	eapol_RSNA_key_header_c::eapol_tkip_mic_failure_type_e * const out_data)
+{
+	if (parameters == 0
+		|| out_data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const eap_tlv_header_c * const positional_parameter
+		= parameters->get_object(parameter_index);
+
+	if (positional_parameter == 0
+		|| positional_parameter->get_type() != eap_tlv_message_type_eapol_tkip_mic_failure_type)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	u32_t value(0ul);
+
+	eap_status_e status = get_parameter_data(positional_parameter, &value);
+
+	*out_data = static_cast<eapol_RSNA_key_header_c::eapol_tkip_mic_failure_type_e>(value);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::read_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+	const u32_t parameter_index,
+	eapol_wlan_authentication_state_e * const out_data)
+{
+	if (parameters == 0
+		|| out_data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const eap_tlv_header_c * const positional_parameter
+		= parameters->get_object(parameter_index);
+
+	if (positional_parameter == 0
+		|| positional_parameter->get_type() != eap_tlv_message_type_eapol_wlan_authentication_state)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	u32_t value(0ul);
+
+	eap_status_e status = get_parameter_data(positional_parameter, &value);
+
+	*out_data = static_cast<eapol_wlan_authentication_state_e>(value);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::read_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+	const u32_t parameter_index,
+	u64_t * const out_data)
+{
+	if (parameters == 0
+		|| out_data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const eap_tlv_header_c * const positional_parameter
+		= parameters->get_object(parameter_index);
+
+	if (positional_parameter == 0
+		|| positional_parameter->get_type() != eap_tlv_message_type_u64_t)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	eap_status_e status = get_parameter_data(positional_parameter, out_data);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::read_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+	const u32_t parameter_index,
+	u32_t * const out_data)
+{
+	if (parameters == 0
+		|| out_data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const eap_tlv_header_c * const positional_parameter
+		= parameters->get_object(parameter_index);
+
+	if (positional_parameter == 0
+		|| positional_parameter->get_type() != eap_tlv_message_type_u32_t)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	eap_status_e status = get_parameter_data(positional_parameter, out_data);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::read_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+	const u32_t parameter_index,
+	u16_t * const out_data)
+{
+	if (parameters == 0
+		|| out_data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const eap_tlv_header_c * const positional_parameter
+		= parameters->get_object(parameter_index);
+
+	if (positional_parameter == 0
+		|| positional_parameter->get_type() != eap_tlv_message_type_u16_t)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	eap_status_e status = get_parameter_data(positional_parameter, out_data);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::read_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+	const u32_t parameter_index,
+	u8_t * const out_data)
+{
+	if (parameters == 0
+		|| out_data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const eap_tlv_header_c * const positional_parameter
+		= parameters->get_object(parameter_index);
+
+	if (positional_parameter == 0
+		|| positional_parameter->get_type() != eap_tlv_message_type_u8_t)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	eap_status_e status = get_parameter_data(positional_parameter, out_data);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::read_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+	const u32_t parameter_index,
+	i32_t * const out_data)
+{
+	if (parameters == 0
+		|| out_data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const eap_tlv_header_c * const positional_parameter
+		= parameters->get_object(parameter_index);
+
+	if (positional_parameter == 0
+		|| positional_parameter->get_type() != eap_tlv_message_type_i32_t)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	eap_status_e status = get_parameter_data(positional_parameter, out_data);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::read_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+	const u32_t parameter_index,
+	i16_t * const out_data)
+{
+	if (parameters == 0
+		|| out_data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const eap_tlv_header_c * const positional_parameter
+		= parameters->get_object(parameter_index);
+
+	if (positional_parameter == 0
+		|| positional_parameter->get_type() != eap_tlv_message_type_i16_t)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	eap_status_e status = get_parameter_data(positional_parameter, out_data);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::read_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+	const u32_t parameter_index,
+	i8_t * const out_data)
+{
+	if (parameters == 0
+		|| out_data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const eap_tlv_header_c * const positional_parameter
+		= parameters->get_object(parameter_index);
+
+	if (positional_parameter == 0
+		|| positional_parameter->get_type() != eap_tlv_message_type_i8_t)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	eap_status_e status = get_parameter_data(positional_parameter, out_data);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::read_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+	const u32_t parameter_index,
+	eap_method_settings_c * const out_data)
+{
+	if (parameters == 0
+		|| out_data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const eap_tlv_header_c * const positional_parameter
+		= parameters->get_object(parameter_index);
+
+	if (positional_parameter == 0
+		|| positional_parameter->get_type() != eap_tlv_message_type_eap_method_settings)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	eap_status_e status = get_parameter_data(positional_parameter, out_data);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::read_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+	const u32_t parameter_index,
+	eap_array_c<u16_t> * const out_data)
+{
+	if (parameters == 0
+		|| out_data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const eap_tlv_header_c * const positional_parameter
+		= parameters->get_object(parameter_index);
+
+	if (positional_parameter == 0
+		|| positional_parameter->get_type() != eap_tlv_message_type_array)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	eap_status_e status = get_parameter_data(positional_parameter, out_data);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::read_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+	const u32_t parameter_index,
+	eap_array_c<eap_type_value_e> * const out_data)
+{
+	if (parameters == 0
+		|| out_data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const eap_tlv_header_c * const positional_parameter
+		= parameters->get_object(parameter_index);
+
+	if (positional_parameter == 0
+		|| positional_parameter->get_type() != eap_tlv_message_type_array)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	eap_status_e status = get_parameter_data(positional_parameter, out_data);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::read_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+	const u32_t parameter_index,
+	eap_array_c<eap_certificate_entry_c> * const out_data)
+{
+	if (parameters == 0
+		|| out_data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const eap_tlv_header_c * const positional_parameter
+		= parameters->get_object(parameter_index);
+
+	if (positional_parameter == 0
+		|| positional_parameter->get_type() != eap_tlv_message_type_array)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	eap_status_e status = get_parameter_data(positional_parameter, out_data);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::read_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+	const u32_t parameter_index,
+	eap_certificate_entry_c::eap_certificate_type_e * const out_data)
+{
+	if (parameters == 0
+		|| out_data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	u32_t integer_value(0ul);
+
+	eap_status_e status = read_parameter_data(
+		parameters,
+		parameter_index,
+		&integer_value);
+
+	*out_data = static_cast<eap_certificate_entry_c::eap_certificate_type_e>(integer_value);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+#if defined(USE_EAP_SIMPLE_CONFIG)
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::read_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+	const u32_t parameter_index,
+	simple_config_Encryption_Type_e * const out_data)
+{
+	if (parameters == 0
+		|| out_data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	u16_t integer_value(0ul);
+
+	eap_status_e status = read_parameter_data(
+		parameters,
+		parameter_index,
+		&integer_value);
+
+	*out_data = static_cast<simple_config_Encryption_Type_e>(integer_value);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+
+//--------------------------------------------------
+
+#if defined(USE_EAP_SIMPLE_CONFIG)
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::read_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+	const u32_t parameter_index,
+	simple_config_Authentication_Type_e * const out_data)
+{
+	if (parameters == 0
+		|| out_data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	u16_t integer_value(0ul);
+
+	eap_status_e status = read_parameter_data(
+		parameters,
+		parameter_index,
+		&integer_value);
+
+	*out_data = static_cast<simple_config_Authentication_Type_e>(integer_value);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+
+//--------------------------------------------------
+
+#if defined(USE_EAP_SIMPLE_CONFIG)
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::read_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+	const u32_t parameter_index,
+	eap_array_c<simple_config_credential_c> * const out_data)
+{
+	if (parameters == 0
+		|| out_data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const eap_tlv_header_c * const positional_parameter
+		= parameters->get_object(parameter_index);
+
+	if (positional_parameter == 0
+		|| positional_parameter->get_type() != eap_tlv_message_type_array)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	eap_status_e status = get_parameter_data(positional_parameter, out_data);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+
+//--------------------------------------------------
+
+#if defined(USE_EAP_SIMPLE_CONFIG)
+
+EAP_FUNC_EXPORT eap_status_e eap_process_tlv_message_data_c::read_parameter_data(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+	const u32_t parameter_index,
+	eap_array_c<network_key_and_index_c> * const out_data)
+{
+	if (parameters == 0
+		|| out_data == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	const eap_tlv_header_c * const positional_parameter
+		= parameters->get_object(parameter_index);
+
+	if (positional_parameter == 0
+		|| positional_parameter->get_type() != eap_tlv_message_type_array)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	eap_status_e status = get_parameter_data(positional_parameter, out_data);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_const_string eap_process_tlv_message_data_c::get_type_string(const eap_tlv_message_type_e type)
+{
+#if defined(USE_EAP_TRACE_STRINGS)
+	EAP_IF_RETURN_STRING(type, eap_tlv_message_type_none)
+	else EAP_IF_RETURN_STRING(type, eap_tlv_message_type_array)
+	else EAP_IF_RETURN_STRING(type, eap_tlv_message_type_boolean)
+	else EAP_IF_RETURN_STRING(type, eap_tlv_message_type_eap_protocol_layer)
+	else EAP_IF_RETURN_STRING(type, eap_tlv_message_type_eap_state_notification)
+	else EAP_IF_RETURN_STRING(type, eap_tlv_message_type_eap_status)
+	else EAP_IF_RETURN_STRING(type, eap_tlv_message_type_eap_type)
+	else EAP_IF_RETURN_STRING(type, eap_tlv_message_type_eapol_key_802_11_authentication_mode)
+	else EAP_IF_RETURN_STRING(type, eap_tlv_message_type_eapol_key_authentication_type)
+	else EAP_IF_RETURN_STRING(type, eap_tlv_message_type_eapol_key_type)
+	else EAP_IF_RETURN_STRING(type, eap_tlv_message_type_eapol_tkip_mic_failure_type)
+	else EAP_IF_RETURN_STRING(type, eap_tlv_message_type_eapol_wlan_authentication_state)
+	else EAP_IF_RETURN_STRING(type, eap_tlv_message_type_error)
+	else EAP_IF_RETURN_STRING(type, eap_tlv_message_type_function)
+	else EAP_IF_RETURN_STRING(type, eap_tlv_message_type_network_id)
+	else EAP_IF_RETURN_STRING(type, eap_tlv_message_type_network_key)
+	else EAP_IF_RETURN_STRING(type, eap_tlv_message_type_protected_setup_credential)
+	else EAP_IF_RETURN_STRING(type, eap_tlv_message_type_RSNA_cipher)
+	else EAP_IF_RETURN_STRING(type, eap_tlv_message_type_session_key)
+	else EAP_IF_RETURN_STRING(type, eap_tlv_message_type_u8_t)
+	else EAP_IF_RETURN_STRING(type, eap_tlv_message_type_u16_t)
+	else EAP_IF_RETURN_STRING(type, eap_tlv_message_type_u32_t)
+	else EAP_IF_RETURN_STRING(type, eap_tlv_message_type_u64_t)
+	else EAP_IF_RETURN_STRING(type, eap_tlv_message_type_variable_data)
+	else EAP_IF_RETURN_STRING(type, eap_tlv_message_type_eap_method_settings)
+	else EAP_IF_RETURN_STRING(type, eap_tlv_message_type_eap_certificate_entry)
+	else EAP_IF_RETURN_STRING(type, eap_tlv_message_type_i8_t)
+	else EAP_IF_RETURN_STRING(type, eap_tlv_message_type_i16_t)
+	else EAP_IF_RETURN_STRING(type, eap_tlv_message_type_i32_t)
+	else EAP_IF_RETURN_STRING(type, eap_tlv_message_type_configuration_option)
+	else
+#endif // #if defined(USE_EAP_TRACE_STRINGS)
+	{
+		EAP_UNREFERENCED_PARAMETER(type);
+
+		return EAPL("Unknown EAPOL-TLV message type");
+	}
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_const_string eap_process_tlv_message_data_c::get_function_string(const eap_tlv_message_type_function_e function)
+{
+#if defined(USE_EAP_TRACE_STRINGS)
+	EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_none)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_check_pmksa_cache)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_start_authentication)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_complete_association)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_disassociation)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_start_preauthentication)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_start_reassociation)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_complete_reassociation)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_start_WPXM_reassociation)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_complete_WPXM_reassociation)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_packet_process)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_tkip_mic_failure)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_eap_acknowledge)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_update_header_offset)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_complete_check_pmksa_cache)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_packet_send)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_associate)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_disassociate)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_packet_data_session_key)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_state_notification)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_reassociate)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_update_wlan_database_reference_values)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_complete_start_WPXM_reassociation)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_new_protected_setup_credentials)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_create_eap_session)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_remove_eap_session)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_send_eap_identity_request)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_packet_data_crypto_keys)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_restart_authentication)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_create_state)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_remove_bksa_from_cache)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_association)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_set_eap_database_reference_values)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_eap_mtu)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_get_802_11_authentication_mode)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_complete_get_802_11_authentication_mode)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_complete_remove_eap_session)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_complete_disassociation)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_last_function)
+
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_plugin_get_configuration)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_plugin_set_configuration)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_plugin_copy_configuration)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_plugin_delete_configuration)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_plugin_set_index)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_plugin_get_type_info)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_plugin_invoke_ui)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_plugin_complete_get_configuration)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_plugin_complete_set_configuration)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_plugin_complete_delete_configuration)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_plugin_complete_copy_configuration)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_plugin_complete_set_index)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_plugin_complete_get_type_info)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_plugin_complete_invoke_ui)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_plugin_last_function)
+
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_general_settings_set_eap_methods)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_general_settings_get_eap_methods)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_general_settings_get_certificate_lists)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_general_settings_complete_set_eap_methods)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_general_settings_complete_get_eap_methods)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_general_settings_complete_get_certificate_lists)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_general_settings_complete_delete_all_eap_settings)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_general_settings_complete_copy_all_eap_settings)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_general_settings_last_function)
+
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_pac_store_open_pac_store)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_pac_store_create_device_seed)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_pac_store_is_master_key_present)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_pac_store_is_master_key_and_password_matching)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_pac_store_create_and_save_master_key)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_pac_store_compare_pac_store_password)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_pac_store_is_pacstore_password_present)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_pac_store_set_pac_store_password)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_pac_store_destroy_pac_store)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_pac_store_complete_open_pac_store)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_pac_store_complete_create_device_seed)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_pac_store_complete_is_master_key_present)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_pac_store_complete_is_master_key_and_password_matching)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_pac_store_complete_create_and_save_master_key)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_pac_store_complete_is_pacstore_password_present)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_pac_store_complete_compare_pac_store_password)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_pac_store_complete_set_pac_store_password)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_pac_store_complete_destroy_pac_store)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_pac_store_last_function)
+
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_wapi_settings_get_all_certificate_labels)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_wapi_settings_reset_certificate_store)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_wapi_settings_get_configuration)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_wapi_settings_set_configuration)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_wapi_settings_set_ca_cert)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_wapi_settings_set_user_cert)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_wapi_settings_delete_configuration)
+
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_wapi_settings_complete_get_all_certificate_labels)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_wapi_settings_complete_reset_certificate_store)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_wapi_settings_complete_get_configuration)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_wapi_settings_complete_set_configuration)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_wapi_settings_complete_set_ca_cert)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_wapi_settings_complete_set_user_cert)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_wapi_settings_complete_delete_configuration)
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_wapi_settings_complete_last_function)
+
+	else EAP_IF_RETURN_STRING(function, eap_tlv_message_type_function_illegal_value)
+	else
+#endif // #if defined(USE_EAP_TRACE_STRINGS)
+	{
+		EAP_UNREFERENCED_PARAMETER(function);
+
+		return EAPL("Unknown EAPOL-TLV message function");
+	}
+}
+
+//--------------------------------------------------
+
+// End.
--- a/eapol/eapol_framework/eapol_common/core/eap_session_core.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/core/eap_session_core.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 19.1.2 %
+* %version: 33 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -70,7 +70,7 @@
 // 
 EAP_FUNC_EXPORT eap_session_core_c::eap_session_core_c(
 	abs_eap_am_tools_c * const tools,
-	abs_eap_core_c * const partner,
+	abs_eap_session_core_c * const partner,
 	const bool is_client_when_true)
 : m_partner(partner)
 , m_am_tools(tools)
@@ -98,7 +98,7 @@
 //--------------------------------------------------
 
 //
-EAP_FUNC_EXPORT abs_eap_core_c * eap_session_core_c::get_partner()
+EAP_FUNC_EXPORT abs_eap_session_core_c * eap_session_core_c::get_partner()
 {
 	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
 
@@ -250,7 +250,7 @@
 	EAP_TRACE_DATA_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
-		(EAPL("create_new_session() EAP-session"),
+		(EAPL("eap_session_core_c::create_new_session() EAP-session"),
 		 selector.get_data(selector.get_data_length()),
 		 selector.get_data_length()));
 
@@ -277,6 +277,14 @@
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("eap_session_core_c::reset_or_remove_session(): %s.\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, TRACE_FLAGS_DEFAULT, "returns: eap_session_core_c::reset_or_remove_session()");
+
 	eap_status_e status(eap_status_process_general_error);
 
 	if (session == 0
@@ -459,7 +467,7 @@
 	EAP_TRACE_DATA_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
-		(EAPL("packet_process() EAP-session"),
+		(EAPL("eap_session_core_c::packet_process() EAP-session"),
 		 selector.get_data(selector.get_data_length()),
 		 selector.get_data_length()));
 
@@ -467,18 +475,8 @@
 
 	if (session == 0)
 	{
-
-#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_handler_does_not_exists_error);
-
-#else
 		// Create a new session.
 		session = create_new_session(receive_network_id);
-
-#endif //#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
 	}
 
 	if (session != 0)
@@ -714,7 +712,7 @@
 	EAP_TRACE_DATA_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
-		(EAPL("eap_acknowledge() EAP-session"),
+		(EAPL("eap_session_core_c::eap_acknowledge() EAP-session"),
 		 selector.get_data(selector.get_data_length()),
 		 selector.get_data_length()));
 
@@ -761,7 +759,7 @@
 	EAP_TRACE_DATA_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
-		(EAPL("restart_authentication() EAP-session"),
+		(EAPL("eap_session_core_c::restart_authentication() EAP-session"),
 		 selector.get_data(selector.get_data_length()),
 		 selector.get_data_length()));
 
@@ -814,7 +812,7 @@
 	EAP_TRACE_DATA_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
-		(EAPL("restart_authentication() EAP-session"),
+		(EAPL("eap_session_core_c::restart_authentication() EAP-session"),
 		 selector.get_data(selector.get_data_length()),
 		 selector.get_data_length()));
 
@@ -882,7 +880,7 @@
 	EAP_TRACE_DATA_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
-		(EAPL("send_eap_identity_request() EAP-session"),
+		(EAPL("eap_session_core_c::send_eap_identity_request() EAP-session"),
 		 selector.get_data(selector.get_data_length()),
 		 selector.get_data_length()));
 
@@ -994,7 +992,7 @@
 		EAP_TRACE_DATA_DEBUG(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
-			(EAPL("timer_expired() EAP-session"),
+			(EAPL("eap_session_core_c::timer_expired() EAP-session"),
 			 selector->get_data(selector->get_data_length()),
 			 selector->get_data_length()));
 
@@ -1078,14 +1076,14 @@
 
 //--------------------------------------------------
 
-EAP_FUNC_EXPORT eap_status_e eap_session_core_c::synchronous_cancel_all_eap_sessions()
+EAP_FUNC_EXPORT eap_status_e eap_session_core_c::cancel_all_eap_sessions()
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
 	EAP_TRACE_DEBUG(
 		m_am_tools, 
 		TRACE_FLAGS_DEFAULT, 
-		(EAPL("eap_session_core_c::synchronous_cancel_all_eap_sessions(): this = 0x%08x => 0x%08x.\n"),
+		(EAPL("eap_session_core_c::cancel_all_eap_sessions(): this = 0x%08x => 0x%08x.\n"),
 		this,
 		dynamic_cast<abs_eap_base_timer_c *>(this)));
 
@@ -1097,9 +1095,7 @@
 
 //--------------------------------------------------
 
-#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
-EAP_FUNC_EXPORT eap_status_e eap_session_core_c::synchronous_create_eap_session(
+EAP_FUNC_EXPORT eap_status_e eap_session_core_c::create_eap_session(
 	const eap_am_network_id_c * const receive_network_id)
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -1107,7 +1103,7 @@
 	EAP_TRACE_DEBUG(
 		m_am_tools, 
 		TRACE_FLAGS_DEFAULT, 
-		(EAPL("eap_session_core_c::synchronous_create_eap_session(): this = 0x%08x => 0x%08x.\n"),
+		(EAPL("eap_session_core_c::create_eap_session(): this = 0x%08x => 0x%08x.\n"),
 		this,
 		dynamic_cast<abs_eap_base_timer_c *>(this)));
 
@@ -1137,7 +1133,7 @@
 	EAP_TRACE_DATA_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
-		(EAPL("synchronous_create_eap_session() EAP-session"),
+		(EAPL("eap_session_core_c::create_eap_session() EAP-session"),
 		 selector.get_data(selector.get_data_length()),
 		 selector.get_data_length()));
 
@@ -1166,11 +1162,10 @@
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
 
-#endif //#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
 //--------------------------------------------------
 
-EAP_FUNC_EXPORT eap_status_e eap_session_core_c::synchronous_remove_eap_session(
+EAP_FUNC_EXPORT eap_status_e eap_session_core_c::remove_eap_session(
+	const bool /* complete_to_lower_layer */,
 	const eap_am_network_id_c * const receive_network_id)
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -1178,10 +1173,12 @@
 	EAP_TRACE_DEBUG(
 		m_am_tools, 
 		TRACE_FLAGS_DEFAULT, 
-		(EAPL("eap_session_core_c::synchronous_remove_eap_session(): this = 0x%08x => 0x%08x.\n"),
+		(EAPL("eap_session_core_c::remove_eap_session(): this = 0x%08x => 0x%08x.\n"),
 		this,
 		dynamic_cast<abs_eap_base_timer_c *>(this)));
 
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, TRACE_FLAGS_DEFAULT, "returns: eap_session_core_c::remove_eap_session()");
+
 	eap_status_e status = eap_status_process_general_error;
 
 	// Here we swap the addresses.
@@ -1208,7 +1205,7 @@
 	EAP_TRACE_DATA_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
-		(EAPL("synchronous_remove_eap_session() EAP-session"),
+		(EAPL("eap_session_core_c::remove_eap_session() EAP-session"),
 		 selector.get_data(selector.get_data_length()),
 		 selector.get_data_length()));
 
@@ -1230,6 +1227,11 @@
 	else
 	{
 		// Not found, no need to remove.
+		EAP_TRACE_DEBUG(
+			m_am_tools, 
+			TRACE_FLAGS_DEFAULT, 
+			(EAPL("eap_session_core_c::remove_eap_session(): session not found.\n")));
+
 		status = eap_status_ok;
 	}
 
@@ -1261,7 +1263,7 @@
 	EAP_TRACE_DATA_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
-		(EAPL("asynchronous_init_remove_eap_session() EAP-session"),
+		(EAPL("eap_session_core_c::asynchronous_init_remove_eap_session() EAP-session"),
 		 state_selector.get_data(state_selector.get_data_length()),
 		 state_selector.get_data_length()));
 
@@ -1283,7 +1285,7 @@
 		(EAPL("eap_session_core_c::asynchronous_init_remove_eap_session(): %s.\n"),
 		 (m_is_client == true) ? "client": "server"));
 
-	// NOTE: we cannot call directly synchronous_remove_eap_session(), because we will
+	// NOTE: we cannot call directly remove_eap_session(), because we will
 	// return from here to removed object.
 
 	eap_status_e status = eap_status_process_general_error;
@@ -1291,7 +1293,7 @@
 	EAP_TRACE_DATA_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
-		(EAPL("asynchronous_init_remove_eap_session() EAP-session"),
+		(EAPL("eap_session_core_c::asynchronous_init_remove_eap_session() EAP-session"),
 		 state_selector->get_data(state_selector->get_data_length()),
 		 state_selector->get_data_length()));
 
@@ -1398,21 +1400,6 @@
 
 //--------------------------------------------------
 
-//
-EAP_FUNC_EXPORT eap_status_e eap_session_core_c::cancel_all_timers()
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
-
-	const eap_status_e status = m_partner->cancel_all_timers();
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, status);
-}
-
-//--------------------------------------------------
-
 EAP_FUNC_EXPORT eap_status_e eap_session_core_c::check_is_valid_eap_type(
 	const eap_type_value_e eap_type)
 {
@@ -1460,6 +1447,22 @@
 
 //--------------------------------------------------
 
+EAP_FUNC_EXPORT eap_status_e eap_session_core_c::set_eap_database_reference_values(
+	const eap_variable_data_c * const reference)
+{
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_not_supported);
+}
 
+//--------------------------------------------------
 
+EAP_FUNC_EXPORT eap_status_e eap_session_core_c::get_802_11_authentication_mode(
+	const eap_am_network_id_c * const receive_network_id,
+	const eapol_key_authentication_type_e authentication_type,
+	const eap_variable_data_c * const SSID,
+	const eap_variable_data_c * const preshared_key)
+{
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_not_supported);
+}
+
+//--------------------------------------------------
 // End.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/core/eap_session_core_base.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,89 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+// This is enumeration of EAPOL source code.
+#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
+	#undef EAP_FILE_NUMBER_ENUM
+	#define EAP_FILE_NUMBER_ENUM 20 
+	#undef EAP_FILE_NUMBER_DATE 
+	#define EAP_FILE_NUMBER_DATE 1127594498 
+#endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
+
+
+#include "eap_session_core_base.h"
+#include "eap_session_core.h"
+#include "eap_core_client_message_if.h"
+#include "eap_automatic_variable.h"
+
+
+EAP_FUNC_EXPORT eap_session_core_base_c::~eap_session_core_base_c()
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+}
+
+EAP_FUNC_EXPORT eap_session_core_base_c::eap_session_core_base_c()
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+}
+
+//--------------------------------------------------
+//--------------------------------------------------
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_session_core_base_c * eap_session_core_base_c::new_eap_session_core_c(
+	abs_eap_am_tools_c * const tools,
+	abs_eap_session_core_c * const partner,
+	const bool is_client_when_true,
+	const u32_t /* MTU */)
+{
+	eap_session_core_c * new_session_core = new eap_session_core_c(tools, partner, is_client_when_true);
+
+	eap_automatic_variable_c<eap_session_core_c> automatic_new_session_core(
+		tools,
+		new_session_core);
+
+	if (new_session_core == 0
+		|| new_session_core->get_is_valid() == false)
+	{
+		// ERROR.
+		if (new_session_core != 0)
+		{
+			EAP_TRACE_DEBUG(
+				tools,
+				TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+				(EAPL("calls: new_eap_session_core_c(): new_session_core->shutdown(): %s.\n"),
+				(is_client_when_true == true) ? "client": "server"));
+
+			new_session_core->shutdown();
+		}
+		return 0;
+	}
+
+	automatic_new_session_core.do_not_free_variable();
+
+	return new_session_core;
+}
+
+//--------------------------------------------------
+// End.
--- a/eapol/eapol_framework/eapol_common/core/eap_type_selection.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/core/eap_type_selection.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/core/eap_wimax_authentication.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/core/eap_wimax_authentication.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 5.1.2 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -158,8 +158,7 @@
 EAP_FUNC_EXPORT eap_wimax_authentication_c* eap_wimax_authentication_c::new_eap_wimax_authentication_c
 (abs_eap_am_tools_c* const tools,
  abs_eap_wimax_authentication_c* const partner,
- const bool is_client_when_true,
- const abs_eapol_wlan_database_reference_if_c* const wimax_database_reference)
+ const bool is_client_when_true)
 {
   EAP_TRACE_DEBUG
     (tools, 
@@ -317,15 +316,15 @@
       EAP_TRACE_DEBUG
 		(m_am_tools,
 		TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
-		(EAPL("calls eap: eap_wimax_authentication_c:cancel_all_authentication_sessions(): m_eap_core->synchronous_cancel_all_eap_sessions(): %s.\n"),
+		(EAPL("calls eap: eap_wimax_authentication_c:cancel_all_authentication_sessions(): m_eap_core->cancel_all_eap_sessions(): %s.\n"),
 		(m_is_client == true) ? "client": "server"));
 
-      status = m_eap_core->synchronous_cancel_all_eap_sessions();
+      status = m_eap_core->cancel_all_eap_sessions();
 
       EAP_TRACE_DEBUG
 		(m_am_tools,
 		TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
-		(EAPL("returns from eap: eap_wimax_authentication_c:cancel_all_authentication_sessions(): m_eap_core->synchronous_cancel_all_eap_sessions(): %s, status = %s.\n"),
+		(EAPL("returns from eap: eap_wimax_authentication_c:cancel_all_authentication_sessions(): m_eap_core->cancel_all_eap_sessions(): %s, status = %s.\n"),
 		(m_is_client == true) ? "client": "server",
 		eap_status_string_c::get_status_string(status)));
 
--- a/eapol/eapol_framework/eapol_common/core/eapol_core.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/core/eapol_core.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 67.1.2 %
+* %version: 97 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -61,6 +61,7 @@
 	EAP_ASSERT(m_shutdown_was_called == true);
 
 	delete m_eap_core;
+	m_eap_core = 0;
 
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 }
@@ -77,14 +78,8 @@
 	abs_eapol_core_c * const partner,
 	const bool is_client_when_true)
 	: m_partner(partner)
-#if !defined(NO_EAP_SESSION_CORE)
-	  , m_eap_core(new eap_session_core_c(tools, this, is_client_when_true))
-#else
-	  , m_eap_core(new eap_core_c(tools, this, is_client_when_true, 0, false))
-#endif
-#if defined(USE_EAPOL_KEY_STATE)
+	, m_eap_core(0)
 	  , m_eapol_key_state_map(tools, this)
-#endif //#if defined(USE_EAPOL_KEY_STATE)
 	  , m_am_tools(tools)
 	  , m_master_session_key(m_am_tools)
 	  , m_authentication_type(eapol_key_authentication_type_none)
@@ -98,9 +93,7 @@
 	  , m_is_valid(false)
 	  , m_shutdown_was_called(false)
 	  , m_block_state_notifications(false)
-#if defined(USE_EAPOL_KEY_STATE)
 	  , m_skip_start_4_way_handshake(false)
-#endif //#if defined(USE_EAPOL_KEY_STATE)
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
@@ -114,8 +107,7 @@
 		__DATE__,
 		__TIME__));
 
-	if (m_eap_core != 0
-		&& m_eap_core->get_is_valid() == true)
+	if (m_partner != 0)
 	{
 		set_is_valid();
 	}
@@ -126,6 +118,118 @@
 //--------------------------------------------------
 
 //
+EAP_FUNC_EXPORT eap_status_e eapol_core_c::configure()
+{
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("%s: eapol_core_c::configure()\n"),
+		(m_is_client == true) ? "client": "server"));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_core_c::configure()");
+
+	eap_status_e status(eap_status_process_general_error);
+
+	m_eapol_header_offset = m_partner->get_header_offset(
+		&m_MTU, &m_trailer_length);
+
+#if defined(NO_EAP_CORE_CLIENT_MESSAGE_IF)
+	m_eap_core = eap_session_core_base_c::new_eap_session_core_c(
+		m_am_tools,
+		this,
+		m_is_client,
+		m_MTU-eapol_header_wr_c::get_header_length());
+#else
+	m_eap_core = new_eap_core_client_message_if_c(
+		m_am_tools,
+		this,
+		m_is_client,
+		m_MTU-eapol_header_wr_c::get_header_length());
+#endif
+
+	if (m_eap_core == 0
+		|| m_eap_core->get_is_valid() == false)
+	{
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	{
+		eap_variable_data_c max_eapol_starts(m_am_tools);
+
+		status = read_configure(
+			cf_str_EAPOL_CORE_starts_max_count.get_field(),
+			&max_eapol_starts);
+		if (status != eap_status_ok 
+			|| max_eapol_starts.get_is_valid_data() == false
+			|| max_eapol_starts.get_data_length() < sizeof(u32_t))
+		{
+			// Probably not found from db. Use the default value.
+			m_max_eapol_starts = EAPOL_CORE_MAX_EAPOL_START_SENDINGS;						
+		} 
+		else 
+		{
+			m_max_eapol_starts = *reinterpret_cast<u32_t *>(
+				max_eapol_starts.get_data(sizeof(u32_t)));
+		}
+	}
+
+	{
+		eap_variable_data_c eapol_start_interval(m_am_tools);
+
+		status = read_configure(
+			cf_str_EAPOL_CORE_send_start_interval.get_field(),
+			&eapol_start_interval);
+		if (status != eap_status_ok 
+			|| eapol_start_interval.get_is_valid_data() == false
+			|| eapol_start_interval.get_data_length() < sizeof(u32_t))
+		{
+			// Probably not found from db. Use the default value.
+			m_eapol_start_interval = EAPOL_CORE_TIMER_SEND_START_AGAIN_TIMEOUT;						
+		} 
+		else 
+		{
+			m_eapol_start_interval = *reinterpret_cast<u32_t *>(
+				eapol_start_interval.get_data(sizeof(u32_t)));
+		}
+	}
+
+#if defined(USE_EAP_CORE_SERVER)
+	if (m_is_client == false)
+	{
+		eap_variable_data_c data(m_am_tools);
+
+		eap_status_e status = read_configure(
+			cf_str_EAPOL_CORE_skip_start_4_way_handshake.get_field(),
+			&data);
+		if (status == eap_status_ok
+			&& data.get_data_length() == sizeof(u32_t)
+			&& data.get_data(data.get_data_length()) != 0)
+		{
+			u32_t *flag = reinterpret_cast<u32_t *>(data.get_data(data.get_data_length()));
+
+			if (flag != 0)
+			{
+				if ((*flag) != 0ul)
+				{
+					m_skip_start_4_way_handshake = true;
+				}
+				else
+				{
+					m_skip_start_4_way_handshake = false;
+				}
+			}
+		}
+	}
+#endif //#if defined(USE_EAP_CORE_SERVER)
+
+	return EAP_STATUS_RETURN(m_am_tools, m_eap_core->configure());
+}
+
+//--------------------------------------------------
+
+//
 EAP_FUNC_EXPORT eap_status_e eapol_core_c::packet_process(
 	const eap_am_network_id_c * const receive_network_id,
 	eap_general_header_base_c * const packet_data,
@@ -261,11 +365,12 @@
 	{
 		if (m_authentication_type != eapol_key_authentication_type_RSNA_EAP
 			&& m_authentication_type != eapol_key_authentication_type_WPA_EAP
-			&& m_authentication_type != eapol_key_authentication_type_802_1X
+			&& m_authentication_type != eapol_key_authentication_type_dynamic_WEP
 #if defined(EAP_USE_WPXM)
 			&& m_authentication_type != eapol_key_authentication_type_WPXM
 #endif //#if defined(EAP_USE_WPXM)
-			&& m_authentication_type != eapol_key_authentication_type_WFA_SC
+			&& m_authentication_type != eapol_key_authentication_type_WPS
+			&& m_authentication_type != eapol_key_authentication_type_EAP_authentication_no_encryption
 			)
 		{
 			EAP_TRACE_DEBUG(
@@ -278,34 +383,26 @@
 			return EAP_STATUS_RETURN(m_am_tools, eap_status_wrong_eapol_type);
 		}
 
-
-#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
 		// Test first we are connected.
 		if (eapol_key_state->get_is_associated() == true)
 		{
-			status = m_eap_core->synchronous_create_eap_session(receive_network_id);
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);
-			}
+			eap_header_wr_c eap(
+				m_am_tools,
+				eapol.get_eap_header(),
+				eapol.get_data_length());
+
+			status = m_eap_core->packet_process(
+				receive_network_id,
+				&eap,
+				eapol.get_data_length());
+
+			EAP_GENERAL_HEADER_COPY_ERROR_PARAMETERS(packet_data, &eap);
 		}
-
-#endif //#if !defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
-
-		eap_header_wr_c eap(
-			m_am_tools,
-			eapol.get_eap_header(),
-			eapol.get_data_length());
-
-		status = m_eap_core->packet_process(
-			receive_network_id,
-			&eap,
-			eapol.get_data_length());
-
-		EAP_GENERAL_HEADER_COPY_ERROR_PARAMETERS(packet_data, &eap);
+		else
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_drop_packet_quietly);
+		}
 	}
 	else if (m_is_client == false
 		&& eapol.get_packet_type() == eapol_packet_type_logoff)
@@ -317,11 +414,12 @@
 	{
 		if (m_authentication_type != eapol_key_authentication_type_RSNA_EAP
 			&& m_authentication_type != eapol_key_authentication_type_WPA_EAP
-			&& m_authentication_type != eapol_key_authentication_type_802_1X
-			&& m_authentication_type != eapol_key_authentication_type_WFA_SC
+			&& m_authentication_type != eapol_key_authentication_type_dynamic_WEP
+			&& m_authentication_type != eapol_key_authentication_type_WPS
 #if defined(EAP_USE_WPXM)
 			&& m_authentication_type != eapol_key_authentication_type_WPXM
 #endif //#if defined(EAP_USE_WPXM)
+			&& m_authentication_type != eapol_key_authentication_type_EAP_authentication_no_encryption
 			)
 		{
 			EAP_TRACE_DEBUG(
@@ -340,17 +438,17 @@
 			m_is_client,
 			false);
 	}
-#if defined(USE_EAPOL_KEY_STATE)
 	else if (eapol.get_packet_type() == eapol_packet_type_key)
 	{
 		if (m_authentication_type != eapol_key_authentication_type_RSNA_EAP
 			&& m_authentication_type != eapol_key_authentication_type_RSNA_PSK
 			&& m_authentication_type != eapol_key_authentication_type_WPA_EAP
 			&& m_authentication_type != eapol_key_authentication_type_WPA_PSK
-			&& m_authentication_type != eapol_key_authentication_type_802_1X
+			&& m_authentication_type != eapol_key_authentication_type_dynamic_WEP
 #if defined(EAP_USE_WPXM)
 			&& m_authentication_type != eapol_key_authentication_type_WPXM
 #endif //#if defined(EAP_USE_WPXM)
+			&& m_authentication_type != eapol_key_authentication_type_EAP_authentication_no_encryption
 			)
 		{
 			EAP_TRACE_DEBUG(
@@ -386,40 +484,6 @@
 			return EAP_STATUS_RETURN(m_am_tools, eap_status_handler_does_not_exists_error);
 		}
 	}
-#endif //#if defined(USE_EAPOL_KEY_STATE)
-#if ! defined(USE_EAPOL_KEY_STATE)
-	else if (
-		m_is_client == true
-		&& eapol.get_packet_type() == eapol_packet_type_key)
-	{
-		// Handle EAPOL-Key frame.
-		// Here is assumed the EAPOL-Key frame includes RC4 Key Descriptor.
-		/**
-		 * @{ Here we need to check the Descriptor Type field.
-		 * It may be RC4 Key Descriptor, RSNA Key Descriptor or other descriptor. }
-		 */
-		
-		eapol_RC4_key_header_c eapol_key_msg(
-			m_am_tools,
-			eapol.get_header_buffer(eapol.get_header_buffer_length()),
-			eapol.get_header_buffer_length());
-		if (eapol_key_msg.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_header_corrupted);
-		}
-		else if (eapol_key_msg.check_header() != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		status = handle_RC4_key_descriptor(
-			receive_network_id,
-			&eapol_key_msg,
-			packet_length);
-	}
-#endif //#if ! defined(USE_EAPOL_KEY_STATE)
 	else
 	{
 		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: %s, packet_type=0x%02x=%s not handled, data length 0x%04x.\n"),
@@ -454,7 +518,7 @@
 	EAP_ASSERT(data_length <= sent_packet->get_data_length());
 	EAP_ASSERT(sent_packet->get_data_length() <= buffer_length);
 
-	if (header_offset < eap_header_wr_c::get_header_length())
+	if (header_offset < m_eapol_header_offset+eapol_header_wr_c::get_header_length())
 	{
 		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("packet_send: packet buffer corrupted.\n")));
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -464,7 +528,7 @@
 	eapol_header_wr_c eapol(
 		m_am_tools,
 		sent_packet->get_data_offset(
-			header_offset-eap_header_wr_c::get_header_length(), data_length),
+			header_offset-eapol_header_wr_c::get_header_length(), data_length),
 		data_length);
 
 	if (eapol.get_is_valid() == false)
@@ -536,8 +600,11 @@
 	}
 
 	eap_status_e status = m_partner->packet_send(
-		send_network_id, sent_packet, header_offset-eapol_header_wr_c::get_header_length(),
-		data_length+eapol_header_wr_c::get_header_length(), buffer_length);
+		send_network_id,
+		sent_packet,
+		header_offset-eapol_header_wr_c::get_header_length(),
+		data_length+eapol_header_wr_c::get_header_length(),
+		buffer_length);
 
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 	return EAP_STATUS_RETURN(m_am_tools, status);
@@ -669,13 +736,6 @@
 			this,
 			EAPOL_CORE_TIMER_SEND_START_AGAIN_ID);
 
-#if !defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-#if !defined(NO_EAP_SESSION_CORE)
-		// First we remove possible EAP session.
-		(void) m_eap_core->synchronous_remove_eap_session(receive_network_id);
-#endif
-#endif //#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
 		// Here we swap the addresses.
 		eap_am_network_id_c send_network_id(m_am_tools,
 			receive_network_id->get_destination_id(),
@@ -746,6 +806,52 @@
 			m_eapol_header_offset,
 			eapol_header_wr_c::get_header_length()+eapol.get_data_length(),
 			buffer_size);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		if (m_authentication_type == eapol_key_authentication_type_EAP_authentication_no_encryption)
+		{
+			// Some APs need broadcast EAPOL-Start-message.
+
+			const u8_t BROADCAST_ADDRESS[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
+
+			eap_variable_data_c broadcast_destination(
+				m_am_tools,
+				BROADCAST_ADDRESS,
+				sizeof(BROADCAST_ADDRESS),
+				false,
+				false);
+		
+			if (broadcast_destination.get_is_valid_data() == false)
+			{
+				return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+			}
+
+			// Here we swap the addresses.
+			eap_am_network_id_c broadcast_send_network_id(m_am_tools,
+				receive_network_id->get_destination_id(),
+				&broadcast_destination,
+				receive_network_id->get_type());
+			if (send_network_id.get_is_valid_data() == false)
+			{
+				return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+			}
+
+			status = m_partner->packet_send(
+				&broadcast_send_network_id,
+				&start_packet,
+				m_eapol_header_offset,
+				eapol_header_wr_c::get_header_length()+eapol.get_data_length(),
+				buffer_size);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		}
 
 		if (from_timer == false)
 		{
@@ -815,23 +921,22 @@
 		{
 			// It is bad idea to terminate on-going authentication
 			// when EAPOL-Start is received.
-			// Because of that synchronous_remove_eap_session() is called
+			// Because of that remove_eap_session() is called
 			// only when force_clean_restart is true.
-#if !defined(NO_EAP_SESSION_CORE)
 			bool previous_block = m_block_state_notifications;
 			m_block_state_notifications = true;
-			(void) m_eap_core->synchronous_remove_eap_session(receive_network_id);
+			(void) m_eap_core->remove_eap_session(false, receive_network_id);
 			m_block_state_notifications = previous_block;
-#endif
 		}
 
 		if (m_authentication_type == eapol_key_authentication_type_RSNA_EAP
 			|| m_authentication_type == eapol_key_authentication_type_WPA_EAP
-			|| m_authentication_type == eapol_key_authentication_type_802_1X
+			|| m_authentication_type == eapol_key_authentication_type_dynamic_WEP
 #if defined(EAP_USE_WPXM)
 			|| m_authentication_type == eapol_key_authentication_type_WPXM
 #endif //#if defined(EAP_USE_WPXM)
-			|| m_authentication_type == eapol_key_authentication_type_WFA_SC
+			|| m_authentication_type == eapol_key_authentication_type_WPS
+			|| m_authentication_type == eapol_key_authentication_type_EAP_authentication_no_encryption
 			)
 		{
 			status = m_eap_core->send_eap_identity_request(receive_network_id);
@@ -945,6 +1050,13 @@
 		}
 	} // for()
 
+#if 1
+
+	status = m_partner->complete_check_pmksa_cache(bssid_sta_receive_network_ids);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+
+#else
+
 	if (bssid_sta_receive_network_ids->get_object_count() > 0ul)
 	{
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
@@ -955,6 +1067,9 @@
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_not_found);
 	}
+
+#endif
+
 }
 
 //--------------------------------------------------
@@ -996,13 +1111,14 @@
 	}
 
 	status = remove_eapol_key_state(
-		&send_network_id);
+		&send_network_id,
+		true);
 	if (status != eap_status_ok)
 	{
 		EAP_TRACE_DEBUG(
 			m_am_tools, 
 			TRACE_FLAGS_DEFAULT, 
-			(EAPL("WARNING: eapol_core_c::disassociation(): ")
+			(EAPL("WARNING: eapol_core_c::remove_pmksa_from_cache(): ")
 			 EAPL("remove_eapol_key_state(), eap_status_e %d\n"),
 			status));
 		return EAP_STATUS_RETURN(m_am_tools, status);
@@ -1028,8 +1144,6 @@
 
 	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_core_c::start_preauthentication()");
 
-#if defined(USE_EAPOL_KEY_STATE)
-
 	if (receive_network_id->get_type() != eapol_ethernet_type_preauthentication)
 	{
 		EAP_TRACE_DEBUG(
@@ -1172,7 +1286,8 @@
 	if (status != eap_status_ok)
 	{
 		status = remove_eapol_key_state(
-			&send_network_id);
+			&send_network_id,
+			true);
 		if (status != eap_status_ok)
 		{
 			EAP_TRACE_DEBUG(
@@ -1194,8 +1309,6 @@
 		true,
 		false);
 
-#endif //#if defined(USE_EAPOL_KEY_STATE)
-
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
@@ -1234,8 +1347,6 @@
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
 	}
 
-#if defined(USE_EAPOL_KEY_STATE)
-
 	// Here we swap the addresses.
 	eap_am_network_id_c old_send_network_id(
 		m_am_tools,
@@ -1332,8 +1443,6 @@
 		}
 	}
 
-#endif //#if defined(USE_EAPOL_KEY_STATE)
-
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
@@ -1379,8 +1488,6 @@
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
 	}
 
-#if defined(USE_EAPOL_KEY_STATE)
-
 	// Here we swap the addresses.
 	eap_am_network_id_c old_send_network_id(
 		m_am_tools,
@@ -1480,8 +1587,6 @@
 		status = eap_status_not_found;
 	}
 
-#endif //#if defined(USE_EAPOL_KEY_STATE)
-
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
@@ -1509,8 +1614,6 @@
 
 	eap_status_e status(eap_status_process_general_error);
 
-#if defined(USE_EAPOL_KEY_STATE)
-
 	// No need to check authentication type anymore. It can be changed in reassociation.
 
 #if defined(EAP_USE_WPXM)
@@ -1616,8 +1719,6 @@
 		status = eap_status_not_found;
 	}
 
-#endif //#if defined(USE_EAPOL_KEY_STATE)
-
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
@@ -1684,7 +1785,6 @@
 			return EAP_STATUS_RETURN(m_am_tools, status);
 		}
 
-#if defined(USE_EAPOL_KEY_STATE)
 		if (m_skip_start_4_way_handshake == true
 			&& (authentication_type == eapol_key_authentication_type_RSNA_EAP
 				|| authentication_type == eapol_key_authentication_type_RSNA_PSK
@@ -1701,7 +1801,6 @@
 			return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
 		}
 		else
-#endif //#if defined(USE_EAPOL_KEY_STATE)
 		{
 #if !defined(NO_EAPOL_KEY_STATE_SERVER)
 			status = eapol_key_state->start_4_way_handshake(
@@ -1759,8 +1858,6 @@
 
 	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_core_c::complete_reassociation()");
 
-#if defined(USE_EAPOL_KEY_STATE)
-
 	// Here we swap the addresses.
 	eap_am_network_id_c send_network_id(
 		m_am_tools,
@@ -1813,7 +1910,6 @@
 		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 	else
-#endif //#if defined(USE_EAPOL_KEY_STATE)
 	{
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_authentication_failure);
@@ -1949,8 +2045,6 @@
 			 master_session_key->get_data_length()));
 	}
 
-#if defined(USE_EAPOL_KEY_STATE)
-
 	eap_network_id_selector_c state_selector(
 		m_am_tools,
 		send_network_id);
@@ -1986,20 +2080,6 @@
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_handler_does_not_exists_error);
 	}
 
-#else
-
-	// Store the session key so it can be used when EAPOL-Key is received.
-	m_master_session_key.reset();
-
-	status = m_master_session_key.set_copy_of_buffer(master_session_key);
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-#endif //#if defined(USE_EAPOL_KEY_STATE)
-
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
@@ -2054,369 +2134,6 @@
 
 //--------------------------------------------------
 
-#if !defined(USE_EAPOL_KEY_STATE)
-
-//
-eap_status_e eapol_core_c::handle_RC4_key_descriptor(
-	const eap_am_network_id_c * const receive_network_id,
-	eapol_RC4_key_header_c* const packet,
-	const u32_t packet_length)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("%s: eapol_core_c::handle_RC4_key_descriptor()\n"),
-		(m_is_client == true) ? "client": "server"));
-
-	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_core_c::handle_RC4_key_descriptor()");
-
-	eap_status_e status = eap_status_process_general_error;
-
-	// Check the packet length
-	if (static_cast<u32_t>(packet->get_header_length()) != packet_length
-		&& static_cast<u32_t>(packet->get_header_length() + packet->get_key_length()) != packet_length)
-	{
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("ERROR: Illegal EAPOL-Key frame length, packet->get_header_length() %d, packet_length %d\n"),
-			packet->get_header_length(),
-			packet_length));
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_process_illegal_packet_error);
-	}
-
-	// Get MS-MPPE-Recv-Key and MS-MPPE-Send-Key
-	// Recv-Key is the first 32 bytes of master session key and Send-Key is the next 32 bytes.
-	eap_variable_data_c mppe_recv_key(m_am_tools);
-	eap_variable_data_c mppe_send_key(m_am_tools);
-	if (m_master_session_key.get_data_length() == 16ul)
-	{
-		status = mppe_recv_key.set_buffer(
-			m_master_session_key.get_data(m_master_session_key.get_data_length()),
-			m_master_session_key.get_data_length(),
-			false,
-			false);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		status = mppe_send_key.set_buffer(
-			m_master_session_key.get_data(m_master_session_key.get_data_length()),
-			m_master_session_key.get_data_length(),
-			false,
-			false);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-	}
-	else
-	{
-		status = mppe_recv_key.set_buffer(
-			m_master_session_key.get_data(MPPE_KEY_LENGTH),
-			MPPE_KEY_LENGTH,
-			false,
-			false);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		status = mppe_send_key.set_buffer(
-			m_master_session_key.get_data_offset(MPPE_KEY_LENGTH, MPPE_KEY_LENGTH),
-			MPPE_KEY_LENGTH,
-			false,
-			false);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-	}
-
-	if (mppe_recv_key.get_is_valid() == false
-		|| mppe_send_key.get_is_valid() == false)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-	}
-
-	// Verify the the MD5 signature in Eapol-Key
-	crypto_md5_c md5(m_am_tools);
-	crypto_hmac_c hmac_md5(m_am_tools, &md5, false);
-	if (hmac_md5.get_is_valid() == false)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-	}
-
-	// MPPE-Send-Key is used as the signature key.
-	if (hmac_md5.hmac_set_key(&mppe_send_key) != eap_status_ok)
-	{
-		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: hmac_md5_init failed\n")));
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-	}
-
-	// Save the signature from the packet
-	eap_variable_data_c signature(m_am_tools);
-	status = signature.set_copy_of_buffer(packet->get_key_signature(), EAPOL_RC4_KEY_SIGNATURE_LENGTH);
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	// Replace the signature with zeros.
-	packet->zero_key_signature(m_am_tools);
-
-	// Send the data to HMAC-MD5 module
-	if (hmac_md5.hmac_update(packet->get_header_buffer(packet_length), packet_length) != eap_status_ok)
-	{
-		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: hmac_md5_update failed\n")));
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);		
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_process_general_error);
-	}
-
-	// Get the calculated signature
-	u8_t tmp_signature[EAPOL_RC4_KEY_SIGNATURE_LENGTH];
-	u32_t length = EAPOL_RC4_KEY_SIGNATURE_LENGTH;
-	if (hmac_md5.hmac_final(tmp_signature, &length) != eap_status_ok)
-	{
-		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: hmac_md5_final failed\n")));
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_process_general_error);
-	}
-	
-	// Compare the calculated and original signature
-	if (m_am_tools->memcmp(
-		tmp_signature,
-		signature.get_data(
-			EAPOL_RC4_KEY_SIGNATURE_LENGTH),
-			EAPOL_RC4_KEY_SIGNATURE_LENGTH) != 0)
-	{
-		// Signatures did not match. Something's wrong.
-		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: EAPOL-Key HMAC-MD5 check failed.\n")));
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_header_corrupted);
-	}
-	EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("EAPOL-Key HMAC-MD5 check passed.\n")));
-
-	eap_variable_data_c key_out(m_am_tools);
-	// Decrypt the RC4 encrypted key
-	if (packet->get_key() == 0)
-	{
-		// EAPOL-Key does not contain the key. This means that we should use
-		// the first bytes from MS-MPPE-Recv-Key as the key. There is a slight 
-		// confusion in draft-congdon-radius-8021x-23.txt regarding this but this is how
-		// it works.
-		if (packet->get_key_length() > 0)
-		{
-			status = key_out.set_copy_of_buffer(mppe_recv_key.get_data(packet->get_key_length()), packet->get_key_length());	
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);
-			}
-		} 
-		else
-		{
-			// Key message with no key length?
-			// Just ignore the message.
-			EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("Got empty WEP unicast key message.\n")));
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
-		}
-	} 
-	else
-	{
-		// Set-up RC4 key. Key is the IV and the MS-MPPE-Recv-Key truncated together.
-		eap_variable_data_c rc4_key(m_am_tools);
-		status = rc4_key.set_copy_of_buffer(packet->get_key_IV(), EAPOL_RC4_KEY_IV_LENGTH);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		rc4_key.add_data(&mppe_recv_key);
-
-		// Set-up RC4 module
-		crypto_rc4_c rc4(m_am_tools);
-		// Set the key for RC4
-		if (rc4.set_key(&rc4_key) != eap_status_ok)
-		{
-			EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: rc4_set_key failed\n")));
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_process_general_error);
-		}
-
-		// Decrypt the key to key_out
-		key_out.set_buffer_length(packet->get_key_length());
-		if (rc4.decrypt_data(packet->get_key(), key_out.get_data(packet->get_key_length()), packet->get_key_length()) != eap_status_ok)
-		{
-			EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: rc4 failed\n")));
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_process_general_error);
-		}		
-		key_out.set_data_length(packet->get_key_length());
-	}
-
-	// Find out the key type. At the moment only WEP keys are supported.
-	eapol_key_type_e key_type;
-	switch (packet->get_key_flag())
-	{
-	case eapol_RC4_key_flag_broadcast:
-		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("Got WEP broadcast key\n")));
-		key_type = eapol_key_type_broadcast;
-		break;
-	case eapol_RC4_key_flag_unicast:
-		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("Got WEP unicast key\n")));
-		key_type = eapol_key_type_unicast;
-		break;
-	default:
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_header_corrupted);
-	}
-
-	EAP_TRACE_DATA_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("Key"),
-		 key_out.get_data(key_out.get_data_length()),
-		 key_out.get_data_length()));
-
-	// Here we swap the addresses.
-	eap_am_network_id_c send_network_id(m_am_tools,
-		receive_network_id->get_destination_id(),
-		receive_network_id->get_source_id(),
-		receive_network_id->get_type());
-	if (send_network_id.get_is_valid_data() == false)
-	{
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-	}
-
-	eapol_session_key_c wep_key(
-		m_am_tools,
-		&key_out,
-		key_type,
-		packet->get_key_index(),
-		true);
-
-	// Forward the keys to lower layers
-	status = m_partner->packet_data_session_key(
-		&send_network_id,
-		&wep_key);
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, status);
-}
-
-#endif //#if !defined(USE_EAPOL_KEY_STATE)
-
-//--------------------------------------------------
-
-//
-EAP_FUNC_EXPORT eap_status_e eapol_core_c::configure()
-{
-	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("%s: eapol_core_c::configure()\n"),
-		(m_is_client == true) ? "client": "server"));
-
-	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_core_c::configure()");
-
-	m_eapol_header_offset = m_partner->get_header_offset(
-		&m_MTU, &m_trailer_length);
-	
-	eap_status_e status = eap_status_process_general_error;
-
-	{
-		eap_variable_data_c max_eapol_starts(m_am_tools);
-
-		status = read_configure(
-			cf_str_EAPOL_CORE_starts_max_count.get_field(),
-			&max_eapol_starts);
-		if (status != eap_status_ok 
-			|| max_eapol_starts.get_is_valid_data() == false
-			|| max_eapol_starts.get_data_length() < sizeof(u32_t))
-		{
-			// Probably not found from db. Use the default value.
-			m_max_eapol_starts = EAPOL_CORE_MAX_EAPOL_START_SENDINGS;						
-		} 
-		else 
-		{
-			m_max_eapol_starts = *reinterpret_cast<u32_t *>(
-				max_eapol_starts.get_data(sizeof(u32_t)));
-		}
-	}
-
-	{
-		eap_variable_data_c eapol_start_interval(m_am_tools);
-
-		status = read_configure(
-			cf_str_EAPOL_CORE_send_start_interval.get_field(),
-			&eapol_start_interval);
-		if (status != eap_status_ok 
-			|| eapol_start_interval.get_is_valid_data() == false
-			|| eapol_start_interval.get_data_length() < sizeof(u32_t))
-		{
-			// Probably not found from db. Use the default value.
-			m_eapol_start_interval = EAPOL_CORE_TIMER_SEND_START_AGAIN_TIMEOUT;						
-		} 
-		else 
-		{
-			m_eapol_start_interval = *reinterpret_cast<u32_t *>(
-				eapol_start_interval.get_data(sizeof(u32_t)));
-		}
-	}
-
-#if defined(USE_EAP_CORE_SERVER)
-	if (m_is_client == false)
-	{
-		eap_variable_data_c data(m_am_tools);
-
-		eap_status_e status = read_configure(
-			cf_str_EAPOL_CORE_skip_start_4_way_handshake.get_field(),
-			&data);
-		if (status == eap_status_ok
-			&& data.get_data_length() == sizeof(u32_t)
-			&& data.get_data(data.get_data_length()) != 0)
-		{
-			u32_t *flag = reinterpret_cast<u32_t *>(data.get_data(data.get_data_length()));
-
-			if (flag != 0)
-			{
-				if ((*flag) != 0ul)
-				{
-					m_skip_start_4_way_handshake = true;
-				}
-				else
-				{
-					m_skip_start_4_way_handshake = false;
-				}
-			}
-		}
-	}
-#endif //#if defined(USE_EAP_CORE_SERVER)
-
-	return EAP_STATUS_RETURN(m_am_tools, m_eap_core->configure());
-}
-
-//--------------------------------------------------
-
-#if defined(USE_EAPOL_KEY_STATE)
-
 //
 EAP_FUNC_EXPORT eap_status_e eapol_core_c::shutdown_operation(
 	eapol_key_state_c * const handler,
@@ -2432,8 +2149,6 @@
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
 
-#endif //#if defined(USE_EAPOL_KEY_STATE)
-
 //--------------------------------------------------
 
 //
@@ -2457,10 +2172,7 @@
 	}
 	m_shutdown_was_called = true;
 
-	eap_status_e status;
-#if defined(USE_EAPOL_KEY_STATE)
-	status = m_eapol_key_state_map.for_each(shutdown_operation, true);
-#endif //#if defined(USE_EAPOL_KEY_STATE)
+	eap_status_e status = m_eapol_key_state_map.for_each(shutdown_operation, true);
 
 	if (m_eap_core != 0)
 	{
@@ -2469,9 +2181,7 @@
 
 	// This will cancel all timers of this object.
 	m_partner->cancel_timer(this, EAPOL_CORE_TIMER_SEND_START_AGAIN_ID);
-#if defined(USE_EAPOL_KEY_STATE)
 	m_partner->cancel_timer(this, EAPOL_REMOVE_EAPOL_KEY_HANDSHAKE_ID);
-#endif //#if defined(USE_EAPOL_KEY_STATE)
 	
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
@@ -2597,7 +2307,6 @@
 			state_notification(&notification);
 		}
 	}
-#if defined(USE_EAPOL_KEY_STATE)
 	else if (id == EAPOL_REMOVE_EAPOL_KEY_HANDSHAKE_ID)
 	{
 		EAP_TRACE_DEBUG(
@@ -2613,9 +2322,8 @@
 			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
 		}
 
-		(void) remove_eapol_key_state(send_network_id);
+		(void) remove_eapol_key_state(send_network_id, false);
 	}
-#endif //#if defined(USE_EAPOL_KEY_STATE)
 
 	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
 }
@@ -2643,7 +2351,6 @@
 			= reinterpret_cast<const eap_am_network_id_c *>(data);
 		delete send_network_id;
 	}
-#if defined(USE_EAPOL_KEY_STATE)
 	else if (id == EAPOL_REMOVE_EAPOL_KEY_HANDSHAKE_ID)
 
 	{
@@ -2651,15 +2358,12 @@
 			= reinterpret_cast<const eap_am_network_id_c *>(data);
 		delete send_network_id;
 	}
-#endif //#if defined(USE_EAPOL_KEY_STATE)
 
 	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
 }
 
 //--------------------------------------------------
 
-#if defined(USE_EAPOL_KEY_STATE)
-
 //
 EAP_FUNC_EXPORT eap_status_e eapol_core_c::init_eapol_key_pmksa_caching_timeout(
 	const eap_am_network_id_c * const send_network_id)
@@ -2718,12 +2422,8 @@
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
 
-#endif //#if defined(USE_EAPOL_KEY_STATE)
-
 //--------------------------------------------------
 
-#if defined(USE_EAPOL_KEY_STATE)
-
 //
 EAP_FUNC_EXPORT eap_status_e eapol_core_c::indicate_eapol_key_state_started_eap_authentication(
 	const eap_am_network_id_c * const send_network_id)
@@ -2774,15 +2474,12 @@
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
 
-#endif //#if defined(USE_EAPOL_KEY_STATE)
-
 //--------------------------------------------------
 
-#if defined(USE_EAPOL_KEY_STATE)
-
 //
 EAP_FUNC_EXPORT eap_status_e eapol_core_c::remove_eapol_key_state(
-	const eap_am_network_id_c * const send_network_id)
+	const eap_am_network_id_c * const send_network_id,
+	const bool force_remove)
 {
 	EAP_TRACE_DEBUG(
 		m_am_tools, 
@@ -2814,7 +2511,8 @@
 
 	if (eapol_key_state != 0)
 	{
-		if (eapol_key_state->get_marked_removed() == false)
+		if (force_remove == false
+			&& eapol_key_state->get_marked_removed() == false)
 		{
 			// Do not remove object in use.
 			EAP_TRACE_DEBUG(
@@ -2850,12 +2548,8 @@
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
 
-#endif //#if defined(USE_EAPOL_KEY_STATE)
-
 //--------------------------------------------------
 
-#if defined(USE_EAPOL_KEY_STATE)
-
 //
 eap_status_e eapol_core_c::asynchronous_init_remove_eapol_key_state(
 	const eap_am_network_id_c * const send_network_id)
@@ -2941,8 +2635,6 @@
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
 
-#endif //#if defined(USE_EAPOL_KEY_STATE)
-
 //--------------------------------------------------
 
 EAP_FUNC_EXPORT void eapol_core_c::state_notification(
@@ -2993,7 +2685,6 @@
 			if (state->get_current_state() == eap_state_identity_request_received
 				|| state->get_current_state() == eap_state_eap_response_sent)
 			{
-#if defined(USE_EAPOL_KEY_STATE)
 				// Indicate EAPOL Key state the started EAP-authentication.
 				status = indicate_eapol_key_state_started_eap_authentication(
 					state->get_send_network_id());
@@ -3006,7 +2697,6 @@
 						 EAPL("indicate_eapol_key_state_started_eap_authentication(), eap_status_e %d\n"),
 						status));
 				}
-#endif //#if defined(USE_EAPOL_KEY_STATE)
 			}
 
 		}
@@ -3018,10 +2708,10 @@
 				(EAPL("ERROR: eapol_core_c::state_notification(): %s: EAP-authentication FAILED\n"),
 				 (state->get_is_client() == true ? "client": "server")));
 
-#if defined(USE_EAPOL_KEY_STATE)
 			// Remove possible EAPOL Key state.
 			status = remove_eapol_key_state(
-				state->get_send_network_id());
+				state->get_send_network_id(),
+				true);
 			if (status != eap_status_ok)
 			{
 				EAP_TRACE_DEBUG(
@@ -3031,7 +2721,6 @@
 					 EAPL("remove_eapol_key_state(), eap_status_e %d\n"),
 					status));
 			}
-#endif //#if defined(USE_EAPOL_KEY_STATE)
 
 		}
 		else if (state->get_current_state() == eap_state_authentication_finished_successfully)
@@ -3042,7 +2731,6 @@
 				(EAPL("eapol_core_c::state_notification(): %s: EAP authentication SUCCESS\n"),
 				(state->get_is_client() == true ? "client": "server")));
 
-#if defined(USE_EAPOL_KEY_STATE)
 			eap_network_id_selector_c state_selector(
 				m_am_tools,
 				state->get_send_network_id());
@@ -3170,7 +2858,6 @@
 						 EAPL("allow_4_way_handshake() failed, no eapol_key_state_c object\n")));
 				}
 			}
-#endif //#if defined(USE_EAPOL_KEY_STATE)
 		}
 		else
 		{
@@ -3189,7 +2876,6 @@
 				state->get_is_client()));
 		}
 	}
-#if defined(USE_EAPOL_KEY_STATE)
 	else if (state->get_protocol_layer() == eap_protocol_layer_eapol_key)
 	{
 		// This nofifation is from eapol_key_state_c object.
@@ -3343,8 +3029,6 @@
 				state->get_is_client()));
 		}
 	}
-#endif //#if defined(USE_EAPOL_KEY_STATE)
-
 
 	m_partner->state_notification(state);
 }
@@ -3413,21 +3097,6 @@
 
 //--------------------------------------------------
 
-//
-EAP_FUNC_EXPORT eap_status_e eapol_core_c::cancel_all_timers()
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
-
-	const eap_status_e status = m_partner->cancel_all_timers();
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, status);
-}
-
-//--------------------------------------------------
-
 EAP_FUNC_EXPORT eap_status_e eapol_core_c::check_is_valid_eap_type(
 	const eap_type_value_e eap_type)
 {
@@ -3448,8 +3117,6 @@
 
 //--------------------------------------------------
 
-#if defined(USE_EAPOL_KEY_STATE)
-
 //
 EAP_FUNC_EXPORT eap_status_e eapol_core_c::cancel_authentication_session(
 	eapol_key_state_c * const handler,
@@ -3472,8 +3139,6 @@
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
 
-#endif //#if defined(USE_EAPOL_KEY_STATE)
-
 //--------------------------------------------------
 
 EAP_FUNC_EXPORT eap_status_e eapol_core_c::cancel_all_authentication_sessions()
@@ -3495,26 +3160,19 @@
 	bool previous_block = m_block_state_notifications;
 	m_block_state_notifications = true;
 
-#if !defined(NO_EAP_SESSION_CORE)
 	if (m_eap_core != 0)
 	{
-		status = m_eap_core->synchronous_cancel_all_eap_sessions();
+		status = m_eap_core->cancel_all_eap_sessions();
 	}
-#endif //#if !defined(NO_EAP_SESSION_CORE)
-
-
-#if defined(USE_EAPOL_KEY_STATE)
+
 	status = m_eapol_key_state_map.for_each(cancel_authentication_session, true);
-#endif //#if defined(USE_EAPOL_KEY_STATE)
 
 	m_block_state_notifications = previous_block;
 
 
 	// This will cancel all timers of this object.
 	m_partner->cancel_timer(this, EAPOL_CORE_TIMER_SEND_START_AGAIN_ID);
-#if defined(USE_EAPOL_KEY_STATE)
 	m_partner->cancel_timer(this, EAPOL_REMOVE_EAPOL_KEY_HANDSHAKE_ID);
-#endif //#if defined(USE_EAPOL_KEY_STATE)
 
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 	return EAP_STATUS_RETURN(m_am_tools, status);
@@ -3522,8 +3180,6 @@
 
 //--------------------------------------------------
 
-#if defined(USE_EAPOL_KEY_STATE)
-
 EAP_FUNC_EXPORT eap_status_e eapol_core_c::get_and_increment_global_key_counter(
 	eap_variable_data_c * const key_counter)
 {
@@ -3531,11 +3187,8 @@
 	return EAP_STATUS_RETURN(m_am_tools, eap_status_not_supported);
 }
 
-#endif //#if defined(USE_EAPOL_KEY_STATE)
-
 //--------------------------------------------------
 
-#if defined(USE_EAPOL_KEY_STATE) && defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
 /**
  * Function creates a state for later use. This is for optimazing 4-Way Handshake.
  * @param receive_network_id carries the MAC addresses.
@@ -3703,7 +3356,8 @@
 	if (status != eap_status_ok)
 	{
 		status = remove_eapol_key_state(
-			&send_network_id);
+			&send_network_id,
+			true);
 		if (status != eap_status_ok)
 		{
 			EAP_TRACE_DEBUG(
@@ -3721,11 +3375,8 @@
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
 
-#endif //#if defined(USE_EAPOL_KEY_STATE) && defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
 //--------------------------------------------------
 
-#if defined(USE_EAPOL_KEY_STATE)
 /**
  * @param receive_network_id carries the MAC addresses.
  * MAC address of Authenticator should be in source address. MAC address of 
@@ -3802,112 +3453,10 @@
 
 	eapol_key_state_c *eapol_key_state = m_eapol_key_state_map.get_handler(&state_selector);
 
-#if !defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-	if (eapol_key_state != 0)
-	{
-		// Reuse the session.
-		eapol_key_state->unset_marked_removed();
-
-		if (m_is_client == false)
-		{
-			// In test version do not reset server.
-		}
-		else
-		{
-			status = eapol_key_state->reset();
-			if (status != eap_status_ok)
-			{
-				// We cannot reuse the session.
-				EAP_TRACE_ERROR(
-					m_am_tools,
-					TRACE_FLAGS_ERROR,
-					(EAPL("eapol_core_c::association(): eapol_key_state NOT reused.\n")));
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);
-			}
-		}
-	}
-#endif //#if !defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
-
 	if (eapol_key_state == 0)
 	{
-
-#if !defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
-		eapol_key_state = new eapol_key_state_c(
-			m_am_tools,
-			this,
-			m_partner,
-			m_is_client,
-			receive_network_id,
-			authentication_type,
-			authenticator_RSNA_IE,
-			supplicant_RSNA_IE,
-			eapol_pairwise_cipher,
-			eapol_group_cipher,
-			pre_shared_key_PSK);
-		if (eapol_key_state == 0
-			|| eapol_key_state->get_is_valid() == false)
-		{
-			if (eapol_key_state != 0)
-			{
-				eapol_key_state->shutdown();
-			}
-			else
-			{
-				EAP_TRACE_DEBUG(
-					m_am_tools, 
-					TRACE_FLAGS_DEFAULT, 
-					(EAPL("WARNING: eapol_core_c::association(): Cannot run eapol_key_state->shutdown() 0x%08x\n"),
-					eapol_key_state));
-			}
-			delete eapol_key_state;
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		status = eapol_key_state->initialize(
-			receive_network_id,
-			authentication_type,
-			authenticator_RSNA_IE,
-			supplicant_RSNA_IE,
-			eapol_pairwise_cipher,
-			eapol_group_cipher,
-			pre_shared_key_PSK);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		status = m_eapol_key_state_map.add_handler(&state_selector, eapol_key_state);
-		if (status != eap_status_ok)
-		{
-			if (eapol_key_state != 0)
-			{
-				eapol_key_state->shutdown();
-			}
-			else
-			{
-				EAP_TRACE_DEBUG(
-					m_am_tools, 
-					TRACE_FLAGS_DEFAULT, 
-					(EAPL("WARNING: eapol_core_c::association(): Cannot run eapol_key_state->shutdown() 0x%08x\n"),
-					eapol_key_state));
-			}
-			delete eapol_key_state;
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-#else
-
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_handler_does_not_exists_error);
-
-#endif //#if !defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
 	}
 	else
 	{
@@ -3926,29 +3475,6 @@
 		}
 	}
 
-
-#if !defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-	status = eapol_key_state->configure();
-	if (status != eap_status_ok)
-	{
-		status = remove_eapol_key_state(
-			&send_network_id);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_DEBUG(
-				m_am_tools, 
-				TRACE_FLAGS_DEFAULT, 
-				(EAPL("WARNING: eapol_core_c::association(): ")
-				 EAPL("remove_eapol_key_state(), eap_status_e %d\n"),
-				status));
-		}
-
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-#endif //#if !defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
-
 	if (authentication_type == eapol_key_authentication_type_RSNA_PSK
 		|| authentication_type == eapol_key_authentication_type_WPA_PSK)
 	{
@@ -3956,7 +3482,6 @@
 #if !defined(NO_EAPOL_KEY_STATE_SERVER)
 		if (m_is_client == false)
 		{
-#if defined(USE_EAPOL_KEY_STATE)
 			if (m_skip_start_4_way_handshake == true)
 			{
 				// This is test to skip 4-Way Handshake start.
@@ -3969,7 +3494,6 @@
 				return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
 			}
 			else
-#endif //#if defined(USE_EAPOL_KEY_STATE)
 			{
 				status = eapol_key_state->start_4_way_handshake(
 					receive_network_id);
@@ -3987,38 +3511,35 @@
 			eapol_key_state->allow_4_way_handshake();
 		}
 	}
-#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
 	else if (authentication_type == eapol_key_authentication_type_RSNA_EAP
 		|| authentication_type == eapol_key_authentication_type_WPA_EAP
-		|| authentication_type == eapol_key_authentication_type_802_1X
+		|| authentication_type == eapol_key_authentication_type_dynamic_WEP
 		|| authentication_type == eapol_key_authentication_type_WPXM
-		|| authentication_type == eapol_key_authentication_type_WFA_SC)
+		|| authentication_type == eapol_key_authentication_type_WPS
+		|| authentication_type == eapol_key_authentication_type_EAP_authentication_no_encryption
+		)
 	{
 		// Creates a EAP-session.
-		status = m_eap_core->synchronous_create_eap_session(receive_network_id);
+		status = m_eap_core->create_eap_session(receive_network_id);
 		if (status != eap_status_ok)
 		{
 			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 			return EAP_STATUS_RETURN(m_am_tools, status);
 		}
 	}
-#endif //#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
 
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
 
-#endif //#if defined(USE_EAPOL_KEY_STATE)
-
 //--------------------------------------------------
 
-#if defined(USE_EAPOL_KEY_STATE)
 /**
  * @param receive_network_id carries the MAC addresses.
  * MAC address of Authenticator should be in source address.
  * MAC address of Supplicant should be in destination address.
  */
 EAP_FUNC_EXPORT eap_status_e eapol_core_c::disassociation(
+	const bool complete_to_lower_layer,
 	const eap_am_network_id_c * const receive_network_id
 	)
 {
@@ -4051,10 +3572,10 @@
 
 	(void) m_partner->cancel_timer(this, EAPOL_CORE_TIMER_SEND_START_AGAIN_ID);
 
-#if !defined(NO_EAP_SESSION_CORE)
 	// First we remove possible EAP session.
-	(void) m_eap_core->synchronous_remove_eap_session(receive_network_id);
-#endif
+	(void) m_eap_core->remove_eap_session(
+		complete_to_lower_layer,
+		receive_network_id);
 
 	status = init_eapol_key_pmksa_caching_timeout(
 		&send_network_id);
@@ -4072,8 +3593,6 @@
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
 
-#endif //#if defined(USE_EAPOL_KEY_STATE)
-
 //--------------------------------------------------
 
 /// @see abs_eap_core_c::add_rogue_ap().
@@ -4111,8 +3630,6 @@
 
 	eap_status_e status = eap_status_process_general_error;
 
-#if defined(USE_EAPOL_KEY_STATE)
-
 	// Here we swap the addresses.
 	eap_am_network_id_c send_network_id(
 		m_am_tools,
@@ -4155,12 +3672,6 @@
 		status = eap_status_handler_does_not_exists_error;
 	}
 
-#else
-
-	status = eap_status_not_supported;
-
-#endif //#if defined(USE_EAPOL_KEY_STATE)
-
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
@@ -4181,6 +3692,154 @@
 
 //--------------------------------------------------
 
-
-
+#if defined(USE_EAP_SIMPLE_CONFIG)
+
+EAP_FUNC_EXPORT eap_status_e eapol_core_c::save_simple_config_session(
+	const simple_config_state_e state,
+	EAP_TEMPLATE_CONST eap_array_c<simple_config_credential_c> * const credential_array,
+	const eap_variable_data_c * const new_password,
+	const simple_config_Device_Password_ID_e Device_Password_ID,
+	const simple_config_payloads_c * const other_configuration)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("%s: eapol_core_c::save_simple_config_session().\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	const eap_status_e status = m_partner->save_simple_config_session(
+		state,
+		credential_array,
+		new_password,
+		Device_Password_ID,
+		other_configuration);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eapol_core_c::set_eap_database_reference_values(
+	const eap_variable_data_c * const reference)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eapol_core_c::set_eap_database_reference_values()\n")));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_core_c::set_eap_database_reference_values()");
+
+	eap_status_e status(eap_status_ok);
+
+	if (m_eap_core != 0)
+	{
+		status = m_eap_core->set_eap_database_reference_values(reference);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eapol_core_c::get_802_11_authentication_mode(
+	const eap_am_network_id_c * const receive_network_id,
+	const eapol_key_authentication_type_e authentication_type,
+	const eap_variable_data_c * const SSID,
+	const eap_variable_data_c * const preshared_key)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eapol_core_c::get_802_11_authentication_mode()\n")));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_core_c::get_802_11_authentication_mode()");
+
+	eap_status_e status(eap_status_ok);
+
+	if (m_eap_core != 0)
+	{
+		status = m_eap_core->get_802_11_authentication_mode(
+			receive_network_id,
+			authentication_type,
+			SSID,
+			preshared_key);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eapol_core_c::complete_get_802_11_authentication_mode(
+		const eap_status_e completion_status,
+		const eap_am_network_id_c * const receive_network_id,
+		const eapol_key_802_11_authentication_mode_e mode)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eapol_core_c::complete_get_802_11_authentication_mode()\n")));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_core_c::complete_get_802_11_authentication_mode()");
+
+	eap_status_e status(eap_status_ok);
+
+	if (m_partner != 0)
+	{
+		status = m_partner->complete_get_802_11_authentication_mode(
+			completion_status,
+			receive_network_id,
+			mode);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eapol_core_c::complete_remove_eap_session(
+	const bool complete_to_lower_layer,
+	const eap_am_network_id_c * const receive_network_id)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eapol_core_c::complete_remove_eap_session()\n")));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_core_c::complete_remove_eap_session()");
+
+	eap_status_e status(eap_status_ok);
+
+	if (m_partner != 0)
+	{
+		status = m_partner->complete_disassociation(
+			complete_to_lower_layer,
+			receive_network_id);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
 // End.
--- a/eapol/eapol_framework/eapol_common/core/eapol_handle_tlv_message_data.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/core/eapol_handle_tlv_message_data.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 31.1.3 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -59,2451 +59,18 @@
 
 EAP_FUNC_EXPORT eapol_handle_tlv_message_data_c::eapol_handle_tlv_message_data_c(
 	abs_eap_am_tools_c * const tools)
-	: eap_tlv_message_data_c(tools)
+	: eap_process_tlv_message_data_c(tools)
 	, m_am_tools(tools)
 	, m_is_valid(true)
 {
 }
 
-//-------------------------------------------------------------------
-
-/**
- * This function should increase reference count.
- */
-EAP_FUNC_EXPORT void eapol_handle_tlv_message_data_c::object_increase_reference_count()
-{
-}
-
-//-------------------------------------------------------------------
-
-/**
- * This function should first decrease reference count
- * and second return the remaining reference count.
- * Reference count must not be decreased when it is zero.
- */
-EAP_FUNC_EXPORT u32_t eapol_handle_tlv_message_data_c::object_decrease_reference_count()
-{
-	return 0;
-}
-
 //--------------------------------------------------
 
 EAP_FUNC_EXPORT bool eapol_handle_tlv_message_data_c::get_is_valid()
 {
-	return m_is_valid && eap_tlv_message_data_c::get_is_valid();
-}
-
-//--------------------------------------------------
-
-EAP_FUNC_EXPORT u32_t eapol_handle_tlv_message_data_c::get_payload_size(
-	const eap_am_network_id_c * const network_id) const
-{
-	return
-		(3ul * eap_tlv_header_c::get_header_length() // Each attribute have their own header.
-		+ network_id->get_source_id()->get_data_length()
-		+ network_id->get_destination_id()->get_data_length()
-		+ sizeof(network_id->get_type()));
-}
-
-//--------------------------------------------------
-
-EAP_FUNC_EXPORT u32_t eapol_handle_tlv_message_data_c::get_payload_size(
-	const abs_eap_state_notification_c * const state) const
-{
-	return
-		(7ul * eap_tlv_header_c::get_header_length()) // Each attribute have their own header.
-		+ (get_payload_size(state->get_send_network_id())
-		+ sizeof(u32_t) // eap_protocol_layer_e
-		+ sizeof(state->get_protocol())
-		+ eap_expanded_type_c::get_eap_expanded_type_size()
-		+ sizeof(state->get_current_state())
-		+ sizeof(u32_t) // bool is_client
-		+ sizeof(u32_t) // eap_status_e authentication error
-		);
-}
-
-//--------------------------------------------------
-
-EAP_FUNC_EXPORT u32_t eapol_handle_tlv_message_data_c::get_payload_size(
-	const eapol_session_key_c * const session_key) const
-{
-	return
-		((5ul * eap_tlv_header_c::get_header_length()) // Each attribute have their own header.
-		+ session_key->get_key()->get_data_length()
-		+ session_key->get_sequence_number()->get_data_length()
-		+ sizeof(u32_t) // const eapol_key_type_e m_key_type
-		+ sizeof(session_key->get_key_index())
-		+ sizeof(u32_t) // const bool m_key_tx_bit
-		);
-}
-
-//--------------------------------------------------
-
-#if defined(USE_EAP_SIMPLE_CONFIG)
-
-EAP_FUNC_EXPORT u32_t eapol_handle_tlv_message_data_c::get_payload_size(
-	network_key_and_index_c * key) const
-{
-	u32_t size(0ul);
-
-	if (key != 0)
-	{
-		size += eap_tlv_header_c::get_header_length()
-			+ sizeof(key->get_network_key_index()) // Size of Network Key Index
-			+ eap_tlv_header_c::get_header_length()
-			+ key->get_network_key()->get_data_length() // Size of Network Key
-			;
-	}
-
-	return (size);
-}
-
-#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
-
-//--------------------------------------------------
-
-#if defined(USE_EAP_SIMPLE_CONFIG)
-
-EAP_FUNC_EXPORT u32_t eapol_handle_tlv_message_data_c::get_payload_size(
-	EAP_TEMPLATE_CONST eap_array_c<network_key_and_index_c> * network_keys) const
-{
-	u32_t size(0ul);
-
-	for (u32_t ind_network_key = 0ul; ind_network_key < network_keys->get_object_count(); ind_network_key++)
-	{
-		network_key_and_index_c * const key = network_keys->get_object(ind_network_key);
-		if (key != 0)
-		{
-			size += eap_tlv_header_c::get_header_length() // Size of structure header
-				+ get_payload_size(key); // Size of Network Key
-		}
-	} // for ()
-
-	return (size);
-}
-
-#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
-
-//--------------------------------------------------
-
-#if defined(USE_EAP_SIMPLE_CONFIG)
-
-EAP_FUNC_EXPORT u32_t eapol_handle_tlv_message_data_c::get_payload_size(
-	simple_config_credential_c * const credential) const
-{
-	u32_t size(0ul);
-
-	if (credential != 0)
-	{
-		size += eap_tlv_header_c::get_header_length()
-			+ sizeof(credential->get_network_index()) // Size of Network Index
-			+ eap_tlv_header_c::get_header_length()
-			+ credential->get_SSID()->get_data_length() // Size of SSID
-			+ eap_tlv_header_c::get_header_length()
-			+ sizeof(u16_t) // Size of Authentiction type
-			+ eap_tlv_header_c::get_header_length()
-			+ sizeof(u16_t) // Size of Encryption type
-			;
-
-		size += eap_tlv_header_c::get_header_length() // Size of header of Array
-			+ get_payload_size(credential->get_network_keys());
-
-		size += eap_tlv_header_c::get_header_length()
-			+ credential->get_MAC_address()->get_data_length() // Size of MAC Address
-			;
-	}
-
-	return (size);
-}
-
-#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
-
-//--------------------------------------------------
-
-#if defined(USE_EAP_SIMPLE_CONFIG)
-
-EAP_FUNC_EXPORT u32_t eapol_handle_tlv_message_data_c::get_payload_size(
-	EAP_TEMPLATE_CONST eap_array_c<simple_config_credential_c> * const credential_array) const
-{
-	u32_t size(0ul);
-
-	for (u32_t ind_credential = 0ul; ind_credential < credential_array->get_object_count(); ind_credential++)
-	{
-		simple_config_credential_c * const credential = credential_array->get_object(ind_credential);
-		if (credential != 0)
-		{
-			size += eap_tlv_header_c::get_header_length() // Size of structure header
-				+ get_payload_size(credential);
-		}
-	} // for ()
-
-	return (size);
-}
-
-#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
-
-//--------------------------------------------------
-
-EAP_FUNC_EXPORT eap_status_e eapol_handle_tlv_message_data_c::add_structured_parameter_header(
-	const eapol_tlv_message_type_e type,
-	const u32_t length)
-{
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("eapol_handle_tlv_message_data_c::add_structured_parameter_header(): type=%s\n"),
-		 get_type_string(type)));
-
-	return add_message_header(
-		type,
-		length);
-}
-
-//--------------------------------------------------
-
-EAP_FUNC_EXPORT eap_status_e eapol_handle_tlv_message_data_c::add_parameter_data(
-	const eapol_tlv_message_type_e type,
-	const u32_t integer)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("eapol_handle_tlv_message_data_c::add_parameter_data(): type=%s\n"),
-		 get_type_string(type)));
-
-	const u32_t network_order_integer(eap_htonl(integer));
-
-	eap_status_e status = add_message_data(
-		type,
-		sizeof(network_order_integer),
-		&network_order_integer);
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, status);
-}
-
-//--------------------------------------------------
-
-EAP_FUNC_EXPORT eap_status_e eapol_handle_tlv_message_data_c::add_parameter_data(
-	const u64_t long_integer)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("eapol_handle_tlv_message_data_c::add_parameter_data(): type=%s\n"),
-		 get_type_string(eapol_tlv_message_type_u64_t)));
-
-	const u64_t network_order_long_integer(eap_htonll(long_integer));
-
-	eap_status_e status = add_message_data(
-		eapol_tlv_message_type_u64_t,
-		sizeof(network_order_long_integer),
-		&network_order_long_integer);
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, status);
-}
-
-//--------------------------------------------------
-
-EAP_FUNC_EXPORT eap_status_e eapol_handle_tlv_message_data_c::add_parameter_data(
-	const u32_t integer)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("eapol_handle_tlv_message_data_c::add_parameter_data(): type=%s\n"),
-		 get_type_string(eapol_tlv_message_type_u32_t)));
-
-	const u32_t network_order_integer(eap_htonl(integer));
-
-	eap_status_e status = add_message_data(
-		eapol_tlv_message_type_u32_t,
-		sizeof(network_order_integer),
-		&network_order_integer);
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, status);
-}
-
-//--------------------------------------------------
-
-EAP_FUNC_EXPORT eap_status_e eapol_handle_tlv_message_data_c::add_parameter_data(
-	const u16_t short_integer)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("eapol_handle_tlv_message_data_c::add_parameter_data(): type=%s\n"),
-		 get_type_string(eapol_tlv_message_type_u16_t)));
-
-	const u16_t network_order_short_integer(eap_htons(short_integer));
-
-	eap_status_e status = add_message_data(
-		eapol_tlv_message_type_u16_t,
-		sizeof(network_order_short_integer),
-		&network_order_short_integer);
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, status);
-}
-
-//--------------------------------------------------
-
-EAP_FUNC_EXPORT eap_status_e eapol_handle_tlv_message_data_c::add_parameter_data(
-	const u8_t byte_integer)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("eapol_handle_tlv_message_data_c::add_parameter_data(): type=%s\n"),
-		 get_type_string(eapol_tlv_message_type_u8_t)));
-
-	eap_status_e status = add_message_data(
-		eapol_tlv_message_type_u8_t,
-		sizeof(byte_integer),
-		&byte_integer);
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, status);
-}
-
-//--------------------------------------------------
-
-EAP_FUNC_EXPORT eap_status_e eapol_handle_tlv_message_data_c::add_parameter_data(
-	const bool boolean)
-{
-	const u32_t value((boolean == false) ? 0u: 1u);
-
-	return add_parameter_data(
-		eapol_tlv_message_type_boolean,
-		value);
-}
-
-//--------------------------------------------------
-
-EAP_FUNC_EXPORT eap_status_e eapol_handle_tlv_message_data_c::add_parameter_data(
-	const eap_status_e status)
-{
-	const u32_t value(static_cast<u32_t>(status));
-
-	return add_parameter_data(
-		eapol_tlv_message_type_eap_status,
-		value);
-}
-
-//--------------------------------------------------
-
-EAP_FUNC_EXPORT eap_status_e eapol_handle_tlv_message_data_c::add_parameter_data(
-	const eapol_tlv_message_type_function_e function)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("eapol_handle_tlv_message_data_c::add_parameter_data(): type=%s, function=%s\n"),
-		 get_type_string(eapol_tlv_message_type_function),
-		 get_function_string(function)));
-
-	if (function < eapol_tlv_message_type_function_none
-		|| function >= eapol_tlv_message_type_function_illegal_value)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-	}
-
-	const u32_t network_order_function(eap_htonl(function));
-
-	eap_status_e status = add_message_data(
-		eapol_tlv_message_type_function,
-		sizeof(network_order_function),
-		&network_order_function);
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, status);
-}
-
-//--------------------------------------------------
-
-EAP_FUNC_EXPORT eap_status_e eapol_handle_tlv_message_data_c::add_parameter_data(
-	const eap_variable_data_c * const variable_data)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("eapol_handle_tlv_message_data_c::add_parameter_data(): type=%s\n"),
-		 get_type_string(eapol_tlv_message_type_variable_data)));
-
-	if (variable_data == 0)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-	}
-
-	eap_status_e status(eap_status_process_general_error);
-
-	if (variable_data->get_is_valid_data() == false)
-	{
-		// Empty variable data. Add just the header.
-		status = add_structured_parameter_header(
-			eapol_tlv_message_type_variable_data,
-			0ul);
-	}
-	else
-	{
-		status = add_message_data(
-			eapol_tlv_message_type_variable_data,
-			variable_data->get_data_length(),
-			variable_data->get_data());
-	}
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, status);
-}
-
-//--------------------------------------------------
-
-EAP_FUNC_EXPORT eap_status_e eapol_handle_tlv_message_data_c::add_parameter_data(
-	const eap_am_network_id_c * const network_id)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("eapol_handle_tlv_message_data_c::add_parameter_data(): type=%s\n"),
-		 get_type_string(eapol_tlv_message_type_network_id)));
-
-	if (network_id == 0
-		|| network_id->get_is_valid() == false)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-	}
-
-	const u32_t size_of_network_id = get_payload_size(network_id);
-
-	eap_status_e status = add_structured_parameter_header(
-		eapol_tlv_message_type_network_id,
-		size_of_network_id);
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	status = add_parameter_data(
-		network_id->get_source_id());
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	status = add_parameter_data(
-		network_id->get_destination_id());
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	status = add_parameter_data(
-		network_id->get_type());
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
-}
-
-//--------------------------------------------------
-
-EAP_FUNC_EXPORT eap_status_e eapol_handle_tlv_message_data_c::add_parameter_data(
-	const eap_buf_chain_wr_c * const packet_buffer)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("eapol_handle_tlv_message_data_c::add_parameter_data(): type=%s\n"),
-		 get_type_string(eapol_tlv_message_type_variable_data)));
-
-	if (packet_buffer == 0
-		|| packet_buffer->get_is_valid() == false)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-	}
-
-	eap_status_e status = add_message_data(
-		eapol_tlv_message_type_variable_data,
-		packet_buffer->get_data_length(),
-		packet_buffer->get_data(packet_buffer->get_data_length()));
-
-	
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, status);
-}
-
-//--------------------------------------------------
-
-EAP_FUNC_EXPORT eap_status_e eapol_handle_tlv_message_data_c::add_parameter_data(
-	const eapol_session_key_c * const session_key)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("eapol_handle_tlv_message_data_c::add_parameter_data(): type=%s\n"),
-		 get_type_string(eapol_tlv_message_type_session_key)));
-
-	if (session_key == 0
-		|| session_key->get_is_valid() == false)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-	}
-
-	const u32_t size_of_session_key(get_payload_size(session_key));
-
-	eap_status_e status = add_structured_parameter_header(
-		eapol_tlv_message_type_session_key,
-		size_of_session_key);
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	status = add_parameter_data(
-		session_key->get_key());
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	status = add_parameter_data(
-		session_key->get_sequence_number());
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	status = add_parameter_data(
-		eapol_tlv_message_type_eapol_key_type,
-		static_cast<u32_t>(session_key->get_key_type()));
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	status = add_parameter_data(session_key->get_key_index());
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	status = add_parameter_data(session_key->get_key_tx_bit());
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
-}
-
-//--------------------------------------------------
-
-EAP_FUNC_EXPORT eap_status_e eapol_handle_tlv_message_data_c::add_parameter_data(
-	const abs_eap_state_notification_c * const state)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("eapol_handle_tlv_message_data_c::add_parameter_data(): type=%s\n"),
-		 get_type_string(eapol_tlv_message_type_eap_state_notification)));
-
-	if (state == 0)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-	}
-
-	const u32_t size_of_state(get_payload_size(state));
-
-	eap_status_e status = add_structured_parameter_header(
-		eapol_tlv_message_type_eap_state_notification,
-		size_of_state);
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	status = add_parameter_data(state->get_send_network_id());
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	status = add_parameter_data(
-		eapol_tlv_message_type_eap_protocol_layer,
-		static_cast<u32_t>(state->get_protocol_layer()));
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	status = add_parameter_data(state->get_protocol());
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	status = add_parameter_data(state->get_eap_type());
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	status = add_parameter_data(state->get_current_state());
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	status = add_parameter_data(state->get_is_client());
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	status = add_parameter_data(state->get_authentication_error());
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
-}
-
-//--------------------------------------------------
-
-EAP_FUNC_EXPORT eap_status_e eapol_handle_tlv_message_data_c::add_parameter_data(
-	const eap_type_value_e eap_type)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("eapol_handle_tlv_message_data_c::add_parameter_data(): type=%s\n"),
-		 get_type_string(eapol_tlv_message_type_eap_type)));
-
-	void * type_buffer = 0;
-
-	eap_status_e status = allocate_message_buffer(
-		eapol_tlv_message_type_eap_type,
-		eap_expanded_type_c::get_eap_expanded_type_size(),
-		&type_buffer);
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	status = eap_expanded_type_c::write_type(
-		m_am_tools,
-		0ul, ///< Index is from 0 to n. Index 0 is the first EAP type field after base EAP header.
-		type_buffer,
-		eap_expanded_type_c::get_eap_expanded_type_size(),
-		true, ///< True value writes always Extented Type.
-		eap_type ///< The EAP type to be written.
-		);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("eap_tlv_message_data_c::add_message_data():   type %2d=0x%08x, length %3d=0x%08x\n"),
-		 eapol_tlv_message_type_eap_type,
-		 eapol_tlv_message_type_eap_type,
-		 eap_expanded_type_c::get_eap_expanded_type_size(),
-		 eap_expanded_type_c::get_eap_expanded_type_size()));
-
-	EAP_TRACE_DATA_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("add_message_data()"),
-		type_buffer,
-		eap_expanded_type_c::get_eap_expanded_type_size()));
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
-}
-
-//--------------------------------------------------
-
-EAP_FUNC_EXPORT eap_status_e eapol_handle_tlv_message_data_c::add_parameter_data(
-	const eap_general_header_base_c * const packet_data)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("eapol_handle_tlv_message_data_c::add_parameter_data(): type=%s\n"),
-		 get_type_string(eapol_tlv_message_type_variable_data)));
-
-	if (packet_data == 0
-		|| packet_data->get_is_valid() == false)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-	}
-
-	eap_status_e status = add_message_data(
-		eapol_tlv_message_type_variable_data,
-		packet_data->get_header_buffer_length(),
-		packet_data->get_header_buffer(packet_data->get_header_buffer_length()));
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, status);
-}
-
-//--------------------------------------------------
-
-#if defined(USE_EAP_SIMPLE_CONFIG)
-
-EAP_FUNC_EXPORT eap_status_e eapol_handle_tlv_message_data_c::add_parameter_data(
-	EAP_TEMPLATE_CONST eap_array_c<simple_config_credential_c> * const credential_array)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("eapol_handle_tlv_message_data_c::add_parameter_data(): type=%s\n"),
-		 get_type_string(eapol_tlv_message_type_protected_setup_credential)));
-
-	if (credential_array == 0)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-	}
-
-	const u32_t size_of_credential_array(get_payload_size(credential_array));
-
-	eap_status_e status = add_structured_parameter_header(
-		eapol_tlv_message_type_array,
-		size_of_credential_array);
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-
-	for (u32_t ind_credential = 0ul; ind_credential < credential_array->get_object_count(); ind_credential++)
-	{
-		simple_config_credential_c * const credential = credential_array->get_object(ind_credential);
-		if (credential != 0)
-		{
-			const u32_t size_of_credential(get_payload_size(credential));
-
-			eap_status_e status = add_structured_parameter_header(
-				eapol_tlv_message_type_protected_setup_credential,
-				size_of_credential);
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);
-			}
-
-			status = add_parameter_data(credential->get_network_index());
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);
-			}
-
-			status = add_parameter_data(credential->get_SSID());
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);
-			}
-
-			status = add_parameter_data(static_cast<u16_t>(credential->get_Authentication_Type()));
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);
-			}
-
-			status = add_parameter_data(static_cast<u16_t>(credential->get_Encryption_Type()));
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);
-			}
-
-			const u32_t size_of_network_key_array(get_payload_size(credential->get_network_keys()));
-
-			status = add_structured_parameter_header(
-				eapol_tlv_message_type_array,
-				size_of_network_key_array);
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);
-			}
-
-			for (u32_t ind_network_key = 0ul; ind_network_key < credential->get_network_keys()->get_object_count(); ind_network_key++)
-			{
-				network_key_and_index_c * const network_key = credential->get_network_keys()->get_object(ind_network_key);
-				if (network_key != 0)
-				{
-					const u32_t size_of_network_key(get_payload_size(network_key));
-
-					status = add_structured_parameter_header(
-						eapol_tlv_message_type_network_key,
-						size_of_network_key);
-					if (status != eap_status_ok)
-					{
-						EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-						return EAP_STATUS_RETURN(m_am_tools, status);
-					}
-
-					status = add_parameter_data(network_key->get_network_key_index());
-					if (status != eap_status_ok)
-					{
-						EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-						return EAP_STATUS_RETURN(m_am_tools, status);
-					}
-
-					status = add_parameter_data(network_key->get_network_key());
-					if (status != eap_status_ok)
-					{
-						EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-						return EAP_STATUS_RETURN(m_am_tools, status);
-					}
-				}
-			} // for ()
-
-			status = add_parameter_data(credential->get_MAC_address());
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);
-			}
-		}
-	} // for ()
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
-}
-
-#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
-
-//--------------------------------------------------
-
-EAP_FUNC_EXPORT eap_status_e eapol_handle_tlv_message_data_c::get_parameter_data(
-	const eap_tlv_header_c * const integer_header,
-	u64_t * const value)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("eapol_handle_tlv_message_data_c::get_parameter_data(): type=%s\n"),
-		 get_type_string(static_cast<eapol_tlv_message_type_e>(integer_header->get_type()))));
-
-	EAP_TRACE_DATA_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("get_parameter_data(u64_t *)"),
-		integer_header->get_header_buffer(integer_header->get_header_buffer_length()),
-		integer_header->get_header_buffer_length()));
-
-	if (static_cast<eapol_tlv_message_type_e>(integer_header->get_type())
-		!= eapol_tlv_message_type_u64_t)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
-	}
-
-	const u8_t * const data = integer_header->get_value(sizeof(u64_t));
-	if (data == 0)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-	}
-
-	*value =
-		eap_read_u64_t_network_order(
-			data,
-			sizeof(u64_t));
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
-}
-
-//--------------------------------------------------
-
-EAP_FUNC_EXPORT eap_status_e eapol_handle_tlv_message_data_c::get_parameter_data(
-	const eap_tlv_header_c * const integer_header,
-	u32_t * const value)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("eapol_handle_tlv_message_data_c::get_parameter_data(): type=%s\n"),
-		 get_type_string(static_cast<eapol_tlv_message_type_e>(integer_header->get_type()))));
-
-	EAP_TRACE_DATA_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("get_parameter_data(u32_t *)"),
-		integer_header->get_header_buffer(integer_header->get_header_buffer_length()),
-		integer_header->get_header_buffer_length()));
-
-	if (static_cast<eapol_tlv_message_type_e>(integer_header->get_type())
-			!= eapol_tlv_message_type_boolean
-		&& static_cast<eapol_tlv_message_type_e>(integer_header->get_type())
-			!= eapol_tlv_message_type_eap_protocol_layer
-		&& static_cast<eapol_tlv_message_type_e>(integer_header->get_type())
-			!= eapol_tlv_message_type_eapol_key_802_11_authentication_mode
-		&& static_cast<eapol_tlv_message_type_e>(integer_header->get_type())
-			!= eapol_tlv_message_type_eapol_key_authentication_type
-		&& static_cast<eapol_tlv_message_type_e>(integer_header->get_type())
-			!= eapol_tlv_message_type_eapol_key_type
-		&& static_cast<eapol_tlv_message_type_e>(integer_header->get_type())
-			!= eapol_tlv_message_type_eapol_tkip_mic_failure_type
-		&& static_cast<eapol_tlv_message_type_e>(integer_header->get_type())
-			!= eapol_tlv_message_type_eapol_wlan_authentication_state
-		&& static_cast<eapol_tlv_message_type_e>(integer_header->get_type())
-			!= eapol_tlv_message_type_error
-		&& static_cast<eapol_tlv_message_type_e>(integer_header->get_type())
-			!= eapol_tlv_message_type_function
-		&& static_cast<eapol_tlv_message_type_e>(integer_header->get_type())
-			!= eapol_tlv_message_type_RSNA_cipher
-		&& static_cast<eapol_tlv_message_type_e>(integer_header->get_type())
-			!= eapol_tlv_message_type_u32_t
-		&& static_cast<eapol_tlv_message_type_e>(integer_header->get_type())
-			!= eapol_tlv_message_type_eap_status
-			)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
-	}
-
-	const u8_t * const data = integer_header->get_value(sizeof(u32_t));
-	if (data == 0)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-	}
-
-	*value =
-		eap_read_u32_t_network_order(
-			data,
-			sizeof(u32_t));
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
-}
-
-//--------------------------------------------------
-
-EAP_FUNC_EXPORT eap_status_e eapol_handle_tlv_message_data_c::get_parameter_data(
-	const eap_tlv_header_c * const integer_header,
-	u16_t * const value)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("eapol_handle_tlv_message_data_c::get_parameter_data(): type=%s\n"),
-		 get_type_string(static_cast<eapol_tlv_message_type_e>(integer_header->get_type()))));
-
-	EAP_TRACE_DATA_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("get_parameter_data(u16_t *)"),
-		integer_header->get_header_buffer(integer_header->get_header_buffer_length()),
-		integer_header->get_header_buffer_length()));
-
-	if (static_cast<eapol_tlv_message_type_e>(integer_header->get_type())
-		!= eapol_tlv_message_type_u16_t)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
-	}
-
-	const u8_t * const data = integer_header->get_value(sizeof(u16_t));
-	if (data == 0)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-	}
-
-	*value =
-		eap_read_u16_t_network_order(
-			data,
-			sizeof(u16_t));
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
-}
-
-//--------------------------------------------------
-
-EAP_FUNC_EXPORT eap_status_e eapol_handle_tlv_message_data_c::get_parameter_data(
-	const eap_tlv_header_c * const integer_header,
-	u8_t * const value)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("eapol_handle_tlv_message_data_c::get_parameter_data(): type=%s\n"),
-		 get_type_string(static_cast<eapol_tlv_message_type_e>(integer_header->get_type()))));
-
-	EAP_TRACE_DATA_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("get_parameter_data(u8_t *)"),
-		integer_header->get_header_buffer(integer_header->get_header_buffer_length()),
-		integer_header->get_header_buffer_length()));
-
-	if (static_cast<eapol_tlv_message_type_e>(integer_header->get_type())
-		!= eapol_tlv_message_type_u8_t)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
-	}
-
-	const u8_t * const data = integer_header->get_value(sizeof(u8_t));
-	if (data == 0)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-	}
-
-	*value = *data;
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
-}
-
-//--------------------------------------------------
-
-EAP_FUNC_EXPORT eap_status_e eapol_handle_tlv_message_data_c::get_parameter_data(
-	const eap_tlv_header_c * const function_header,
-	eapol_tlv_message_type_function_e * const function)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("eapol_handle_tlv_message_data_c::get_parameter_data(): type=%s\n"),
-		 get_type_string(static_cast<eapol_tlv_message_type_e>(function_header->get_type()))));
-
-	EAP_TRACE_DATA_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("get_parameter_data(eapol_tlv_message_type_function_e *)"),
-		function_header->get_header_buffer(function_header->get_header_buffer_length()),
-		function_header->get_header_buffer_length()));
-
-	if (static_cast<eapol_tlv_message_type_e>(function_header->get_type())
-		!= eapol_tlv_message_type_function)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
-	}
-
-	u32_t host_order(0ul);
-
-	eap_status_e status = get_parameter_data(
-		function_header,
-		&host_order);
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	*function = static_cast<eapol_tlv_message_type_function_e>(host_order);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("eapol_handle_tlv_message_data_c::get_parameter_data(): type=%s, function=%s\n"),
-		 get_type_string(eapol_tlv_message_type_function),
-		 get_function_string(*function)
-		 ));
-
-	if (*function < eapol_tlv_message_type_function_none
-		|| eapol_tlv_message_type_function_illegal_value <= *function)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-	}
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+	return m_is_valid && eap_process_tlv_message_data_c::get_is_valid();
 }
 
 //--------------------------------------------------
-
-EAP_FUNC_EXPORT eap_status_e eapol_handle_tlv_message_data_c::get_parameter_data(
-	const eap_tlv_header_c * const network_id_header,
-	eap_am_network_id_c * const new_network_id)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("eapol_handle_tlv_message_data_c::get_parameter_data(): type=%s\n"),
-		 get_type_string(static_cast<eapol_tlv_message_type_e>(network_id_header->get_type()))));
-
-	EAP_TRACE_DATA_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("get_parameter_data(eap_am_network_id_c *)"),
-		network_id_header->get_header_buffer(network_id_header->get_header_buffer_length()),
-		network_id_header->get_header_buffer_length()));
-
-	if (static_cast<eapol_tlv_message_type_e>(network_id_header->get_type())
-		!= eapol_tlv_message_type_network_id)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
-	}
-
-	eapol_handle_tlv_message_data_c network_id_data(m_am_tools);
-
-	if (network_id_data.get_is_valid() == false)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-	}
-
-	eap_status_e status = network_id_data.set_message_data(
-		network_id_header->get_value_length(),
-		network_id_header->get_value(network_id_header->get_value_length()));
-
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	eap_array_c<eap_tlv_header_c> network_id_members(m_am_tools);
-
-	status = network_id_data.parse_message_data(&network_id_members);
-
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-
-	u32_t member_index(0ul);
-
-	eap_variable_data_c source_id(
-		m_am_tools);
-
-	if (source_id.get_is_valid() == false)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-	}
-
-	{
-		const eap_tlv_header_c * const source_id_header = network_id_members.get_object(member_index);
-		if (source_id_header == 0)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		status = network_id_data.get_parameter_data(source_id_header, &source_id);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-	}
-
-
-	++member_index;
-
-	eap_variable_data_c destination_id(
-		m_am_tools);
-
-	if (destination_id.get_is_valid() == false)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-	}
-
-	{
-		const eap_tlv_header_c * const destination_id_header = network_id_members.get_object(member_index);
-		if (destination_id_header == 0)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		status = network_id_data.get_parameter_data(destination_id_header, &destination_id);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-	}
-
-
-	++member_index;
-
-	u16_t type_value(0ul);
-
-	{
-		const eap_tlv_header_c * const type_header = network_id_members.get_object(member_index);
-		if (type_header == 0)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		status = network_id_data.get_parameter_data(type_header, &type_value);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-	}
-
-
-	status = new_network_id->set_copy_of_am_network_id(
-		source_id.get_data(),
-		source_id.get_data_length(),
-		destination_id.get_data(),
-		destination_id.get_data_length(),
-		type_value);
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
-}
-
-//--------------------------------------------------
-
-EAP_FUNC_EXPORT eap_status_e eapol_handle_tlv_message_data_c::get_parameter_data(
-	const eap_tlv_header_c * const variable_data_header,
-	eap_variable_data_c * const variable_data)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("eapol_handle_tlv_message_data_c::get_parameter_data(): type=%s\n"),
-		 get_type_string(static_cast<eapol_tlv_message_type_e>(variable_data_header->get_type()))));
-
-	EAP_TRACE_DATA_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("get_parameter_data(eap_variable_data_c *)"),
-		variable_data_header->get_header_buffer(variable_data_header->get_header_buffer_length()),
-		variable_data_header->get_header_buffer_length()));
-
-	if (static_cast<eapol_tlv_message_type_e>(variable_data_header->get_type())
-		!= eapol_tlv_message_type_variable_data)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
-	}
-
-	eap_status_e status = variable_data->set_copy_of_buffer(
-		variable_data_header->get_value(variable_data_header->get_value_length()),
-		variable_data_header->get_value_length());
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
-}
-
-//--------------------------------------------------
-
-EAP_FUNC_EXPORT eap_status_e eapol_handle_tlv_message_data_c::get_parameter_data(
-	const eap_tlv_header_c * const session_key_header,
-		eapol_session_key_c * const session_key)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("eapol_handle_tlv_message_data_c::get_parameter_data(): type=%s\n"),
-		 get_type_string(static_cast<eapol_tlv_message_type_e>(session_key_header->get_type()))));
-
-	EAP_TRACE_DATA_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("get_parameter_data(eapol_session_key_c *)"),
-		session_key_header->get_header_buffer(session_key_header->get_header_buffer_length()),
-		session_key_header->get_header_buffer_length()));
-
-	if (static_cast<eapol_tlv_message_type_e>(session_key_header->get_type())
-		!= eapol_tlv_message_type_session_key)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
-	}
-
-	eapol_handle_tlv_message_data_c session_key_data(m_am_tools);
-
-	if (session_key_data.get_is_valid() == false)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-	}
-
-	eap_status_e status = session_key_data.set_message_data(
-		session_key_header->get_value_length(),
-		session_key_header->get_value(session_key_header->get_value_length()));
-
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	eap_array_c<eap_tlv_header_c> session_key_members(m_am_tools);
-
-	status = session_key_data.parse_message_data(&session_key_members);
-
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	u32_t member_index(0ul);
-
-	{
-		const eap_tlv_header_c * const tmp_session_key_header = session_key_members.get_object(member_index);
-		if (tmp_session_key_header == 0)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eap_variable_data_c key(
-			m_am_tools);
-
-		if (key.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		status = session_key_data.get_parameter_data(tmp_session_key_header, &key);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		status = session_key->set_key(&key);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-	}
-
-	++member_index;
-
-	{
-		const eap_tlv_header_c * const sequence_number_header = session_key_members.get_object(member_index);
-		if (sequence_number_header == 0)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eap_variable_data_c sequence_number(
-			m_am_tools);
-
-		if (sequence_number.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		status = session_key_data.get_parameter_data(sequence_number_header, &sequence_number);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		status = session_key->set_sequence_number(&sequence_number);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-	}
-
-	++member_index;
-
-	{
-		const eap_tlv_header_c * const key_type_header = session_key_members.get_object(member_index);
-		if (key_type_header == 0)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		u32_t value(0ul);
-
-		status = session_key_data.get_parameter_data(key_type_header, &value);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		session_key->set_key_type(static_cast<eapol_key_type_e>(value));
-	}
-
-	++member_index;
-
-	{
-		const eap_tlv_header_c * const key_index_header = session_key_members.get_object(member_index);
-		if (key_index_header == 0)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		u32_t value(0ul);
-
-		status = session_key_data.get_parameter_data(key_index_header, &value);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		session_key->set_key_index(value);
-	}
-
-	++member_index;
-
-	{
-		const eap_tlv_header_c * const key_tx_bit_header = session_key_members.get_object(member_index);
-		if (key_tx_bit_header == 0)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		u32_t value(0ul);
-
-		status = session_key_data.get_parameter_data(key_tx_bit_header, &value);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		session_key->set_key_tx_bit((value == 0) ? false : true);
-	}
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
-}
-
-//--------------------------------------------------
-
-EAP_FUNC_EXPORT eap_status_e eapol_handle_tlv_message_data_c::get_parameter_data(
-	const eap_tlv_header_c * const state_header,
-	eap_state_notification_c * * const state)
-
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("eapol_handle_tlv_message_data_c::get_parameter_data(): type=%s\n"),
-		 get_type_string(static_cast<eapol_tlv_message_type_e>(state_header->get_type()))));
-
-	EAP_TRACE_DATA_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("get_parameter_data(eap_state_notification_c *)"),
-		state_header->get_header_buffer(state_header->get_header_buffer_length()),
-		state_header->get_header_buffer_length()));
-
-	if (static_cast<eapol_tlv_message_type_e>(state_header->get_type())
-		!= eapol_tlv_message_type_eap_state_notification)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
-	}
-
-	eapol_handle_tlv_message_data_c session_key_data(m_am_tools);
-
-	if (session_key_data.get_is_valid() == false)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-	}
-
-	eap_status_e status = session_key_data.set_message_data(
-		state_header->get_value_length(),
-		state_header->get_value(state_header->get_value_length()));
-
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	eap_array_c<eap_tlv_header_c> session_key_members(m_am_tools);
-
-	status = session_key_data.parse_message_data(&session_key_members);
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-
-	u32_t member_index(0ul);
-
-	eap_am_network_id_c send_network_id(m_am_tools);
-
-	{
-		const eap_tlv_header_c * const send_network_id_header = session_key_members.get_object(member_index);
-		if (send_network_id_header == 0)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		status = get_parameter_data(send_network_id_header, &send_network_id);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-	}
-
-
-	++member_index;
-
-	eap_protocol_layer_e protocol_layer(eap_protocol_layer_none);
-
-	{
-		const eap_tlv_header_c * const protocol_layer_header = session_key_members.get_object(member_index);
-		if (protocol_layer_header == 0)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		u32_t value(0ul);
-
-		status = session_key_data.get_parameter_data(protocol_layer_header, &value);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		protocol_layer = static_cast<eap_protocol_layer_e>(value);
-	}
-
-
-	++member_index;
-
-	u32_t protocol(0ul);
-
-	{
-		const eap_tlv_header_c * const protocol_header = session_key_members.get_object(member_index);
-		if (protocol_header == 0)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		status = session_key_data.get_parameter_data(protocol_header, &protocol);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-	}
-
-
-	++member_index;
-
-	eap_type_value_e eap_type(eap_type_none);
-
-	{
-		const eap_tlv_header_c * const eap_type_header = session_key_members.get_object(member_index);
-		if (eap_type_header == 0)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		status = session_key_data.get_parameter_data(eap_type_header, &eap_type);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-	}
-
-
-	++member_index;
-
-	u32_t current_state(0ul);
-
-	{
-		const eap_tlv_header_c * const current_state_header = session_key_members.get_object(member_index);
-		if (current_state_header == 0)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		status = session_key_data.get_parameter_data(current_state_header, &current_state);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-	}
-
-
-	++member_index;
-
-	bool is_client(true);
-
-	{
-		const eap_tlv_header_c * const is_client_header = session_key_members.get_object(member_index);
-		if (is_client_header == 0)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		u32_t value(0ul);
-
-		status = session_key_data.get_parameter_data(is_client_header, &value);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		is_client = (value == 0ul) ? false : true;
-	}
-
-
-	++member_index;
-
-	eap_status_e authentication_error(eap_status_ok);
-
-	{
-		const eap_tlv_header_c * const authentication_error_header = session_key_members.get_object(member_index);
-		if (authentication_error_header == 0)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		u32_t value(0ul);
-
-		status = session_key_data.get_parameter_data(authentication_error_header, &value);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		authentication_error = static_cast<eap_status_e>(value);
-	}
-
-
-	if (eap_type != eap_type_none)
-	{
-		*state = new eap_state_notification_c(
-			m_am_tools,
-			&send_network_id,
-			is_client,
-			eap_state_notification_eap,
-			protocol_layer,
-			eap_type,
-			current_state,
-			current_state,
-			0ul,
-			false);
-	}
-	else
-	{
-		
-
-		*state = new eap_state_notification_c(
-			m_am_tools,
-			&send_network_id,
-			is_client,
-			eap_state_notification_generic,
-			protocol_layer,
-			protocol,
-			current_state,
-			current_state,
-			0ul,
-			false);
-	}
-
-	if ((*state) == 0)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-	}
-
-	(*state)->set_authentication_error(authentication_error);
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
-}
-
-//--------------------------------------------------
-
-EAP_FUNC_EXPORT eap_status_e eapol_handle_tlv_message_data_c::get_parameter_data(
-	const eap_tlv_header_c * const eap_type_header,
-	eap_type_value_e * const eap_type)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("eapol_handle_tlv_message_data_c::get_parameter_data(): type=%s\n"),
-		 get_type_string(static_cast<eapol_tlv_message_type_e>(eap_type_header->get_type()))));
-
-	EAP_TRACE_DATA_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("get_parameter_data(eap_type_value_e *)"),
-		eap_type_header->get_header_buffer(eap_type_header->get_header_buffer_length()),
-		eap_type_header->get_header_buffer_length()));
-
-	if (static_cast<eapol_tlv_message_type_e>(eap_type_header->get_type())
-		!= eapol_tlv_message_type_eap_type)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
-	}
-
-	eap_status_e status = eap_expanded_type_c::read_type(
-		m_am_tools,
-		0ul,
-		eap_type_header->get_value(eap_type_header->get_value_length()),
-		eap_type_header->get_value_length(),
-		eap_type);
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, status);
-}
-
-//--------------------------------------------------
-
-#if defined(USE_EAP_SIMPLE_CONFIG)
-
-EAP_FUNC_EXPORT eap_status_e eapol_handle_tlv_message_data_c::get_parameter_data(
-	const eap_tlv_header_c * const network_key_header,
-	network_key_and_index_c * const network_key)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("eapol_handle_tlv_message_data_c::get_parameter_data(): type=%s\n"),
-		 get_type_string(static_cast<eapol_tlv_message_type_e>(network_key_header->get_type()))));
-
-	EAP_TRACE_DATA_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("get_parameter_data(simple_config_credential_c *)"),
-		network_key_header->get_header_buffer(network_key_header->get_header_buffer_length()),
-		network_key_header->get_header_buffer_length()));
-
-	if (static_cast<eapol_tlv_message_type_e>(network_key_header->get_type())
-		!= eapol_tlv_message_type_network_key)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
-	}
-
-	eapol_handle_tlv_message_data_c credential_data(m_am_tools);
-
-	if (credential_data.get_is_valid() == false)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-	}
-
-	eap_status_e status = credential_data.set_message_data(
-		network_key_header->get_value_length(),
-		network_key_header->get_value(network_key_header->get_value_length()));
-
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	eap_array_c<eap_tlv_header_c> credential_members(m_am_tools);
-
-	status = credential_data.parse_message_data(&credential_members);
-
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	u32_t member_index(0ul);
-
-	u8_t network_key_index(0ul);
-
-	{
-		const eap_tlv_header_c * const network_key_index_header = credential_members.get_object(member_index);
-		if (network_key_index_header == 0)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		status = credential_data.get_parameter_data(network_key_index_header, &network_key_index);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-	}
-
-	++member_index;
-
-	eap_variable_data_c key(m_am_tools);
-
-	{
-		const eap_tlv_header_c * const key_header = credential_members.get_object(member_index);
-		if (key_header == 0)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		status = credential_data.get_parameter_data(key_header, &key);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-	}
-
-	++member_index;
-
-	network_key->set_network_key_index(network_key_index);
-
-	status = network_key->get_network_key()->set_copy_of_buffer(&key);
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
-}
-
-#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
-
-//--------------------------------------------------
-
-#if defined(USE_EAP_SIMPLE_CONFIG)
-
-EAP_FUNC_EXPORT eap_status_e eapol_handle_tlv_message_data_c::get_parameter_data(
-	const eap_tlv_header_c * const network_keys_array_header,
-	eap_array_c<network_key_and_index_c> * const network_keys_array)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("eapol_handle_tlv_message_data_c::get_parameter_data(): type=%s\n"),
-		 get_type_string(static_cast<eapol_tlv_message_type_e>(network_keys_array_header->get_type()))));
-
-	EAP_TRACE_DATA_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("get_parameter_data(eap_array_c<simple_config_credential_c> *)"),
-		network_keys_array_header->get_header_buffer(network_keys_array_header->get_header_buffer_length()),
-		network_keys_array_header->get_header_buffer_length()));
-
-	if (static_cast<eapol_tlv_message_type_e>(network_keys_array_header->get_type())
-		!= eapol_tlv_message_type_array)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
-	}
-
-	eapol_handle_tlv_message_data_c credential_array_data(m_am_tools);
-
-	if (credential_array_data.get_is_valid() == false)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-	}
-
-	eap_status_e status = credential_array_data.set_message_data(
-		network_keys_array_header->get_value_length(),
-		network_keys_array_header->get_value(network_keys_array_header->get_value_length()));
-
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	eap_array_c<eap_tlv_header_c> credential_array_members(m_am_tools);
-
-	status = credential_array_data.parse_message_data(&credential_array_members);
-
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-
-	for (u32_t ind_member = 0ul; ind_member < credential_array_members.get_object_count(); ind_member++)
-	{
-		network_key_and_index_c * const network_key = new network_key_and_index_c(m_am_tools);
-
-		eap_automatic_variable_c<network_key_and_index_c> automatic_network_key(m_am_tools, network_key);
-
-		if (network_key == 0
-			|| network_key->get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		{
-			const eap_tlv_header_c * const simple_config_credential_header = credential_array_members.get_object(ind_member);
-			if (simple_config_credential_header == 0)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-			}
-
-			status = credential_array_data.get_parameter_data(simple_config_credential_header, network_key);
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);
-			}
-
-			automatic_network_key.do_not_free_variable();
-
-			status = network_keys_array->add_object(network_key, true);
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);
-			}
-		}
-	} // for ()
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
-}
-
-#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
-
-//--------------------------------------------------
-
-#if defined(USE_EAP_SIMPLE_CONFIG)
-
-EAP_FUNC_EXPORT eap_status_e eapol_handle_tlv_message_data_c::get_parameter_data(
-	const eap_tlv_header_c * const credential_header,
-	simple_config_credential_c * const credential)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("eapol_handle_tlv_message_data_c::get_parameter_data(): type=%s\n"),
-		 get_type_string(static_cast<eapol_tlv_message_type_e>(credential_header->get_type()))));
-
-	EAP_TRACE_DATA_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("get_parameter_data(simple_config_credential_c *)"),
-		credential_header->get_header_buffer(credential_header->get_header_buffer_length()),
-		credential_header->get_header_buffer_length()));
-
-	if (static_cast<eapol_tlv_message_type_e>(credential_header->get_type())
-		!= eapol_tlv_message_type_protected_setup_credential)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
-	}
-
-	eapol_handle_tlv_message_data_c credential_data(m_am_tools);
-
-	if (credential_data.get_is_valid() == false)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-	}
-
-	eap_status_e status = credential_data.set_message_data(
-		credential_header->get_value_length(),
-		credential_header->get_value(credential_header->get_value_length()));
-
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	eap_array_c<eap_tlv_header_c> credential_members(m_am_tools);
-
-	status = credential_data.parse_message_data(&credential_members);
-
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	u32_t member_index(0ul);
-
-	u8_t network_index(0ul);
-
-	{
-		const eap_tlv_header_c * const network_index_header = credential_members.get_object(member_index);
-		if (network_index_header == 0)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		status = credential_data.get_parameter_data(network_index_header, &network_index);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-	}
-
-	++member_index;
-
-	eap_variable_data_c SSID(m_am_tools);
-
-	{
-		const eap_tlv_header_c * const SSID_header = credential_members.get_object(member_index);
-		if (SSID_header == 0)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		status = credential_data.get_parameter_data(SSID_header, &SSID);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-	}
-
-	++member_index;
-
-	simple_config_Authentication_Type_e authentication_type(simple_config_Authentication_Type_None);
-
-	{
-		const eap_tlv_header_c * const authentication_type_header = credential_members.get_object(member_index);
-		if (authentication_type_header == 0)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		u16_t integer_value(0ul);
-
-		status = credential_data.get_parameter_data(authentication_type_header, &integer_value);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		authentication_type = static_cast<simple_config_Authentication_Type_e>(integer_value);
-	}
-
-	++member_index;
-
-	simple_config_Encryption_Type_e encryption_type(simple_config_Encryption_Type_None);
-
-	{
-		const eap_tlv_header_c * const encryption_type_header = credential_members.get_object(member_index);
-		if (encryption_type_header == 0)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		u16_t integer_value(0ul);
-
-		status = credential_data.get_parameter_data(encryption_type_header, &integer_value);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		encryption_type = static_cast<simple_config_Encryption_Type_e>(integer_value);
-	}
-
-	++member_index;
-
-	 eap_array_c<network_key_and_index_c> network_keys_array(m_am_tools);
-
-	{
-		const eap_tlv_header_c * const network_keys_array_header = credential_members.get_object(member_index);
-		if (network_keys_array_header == 0)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		status = credential_data.get_parameter_data(network_keys_array_header, &network_keys_array);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-	}
-
-	++member_index;
-
-	 eap_variable_data_c MAC_address(m_am_tools);
-
-	{
-		const eap_tlv_header_c * const MAC_address_header = credential_members.get_object(member_index);
-		if (MAC_address_header == 0)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		status = credential_data.get_parameter_data(MAC_address_header, &MAC_address);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-	}
-
-	++member_index;
-
-
-	credential->set_network_index(network_index);
-
-	status = credential->get_SSID()->set_copy_of_buffer(&SSID);
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	credential->set_Authentication_Type(authentication_type);
-
-	credential->set_Encryption_Type(encryption_type);
-
-	status = copy(
-		&network_keys_array,
-		credential->get_network_keys(),
-		m_am_tools,
-		false);
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	status = credential->get_MAC_address()->set_copy_of_buffer(&MAC_address);
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
-}
-
-#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
-
-//--------------------------------------------------
-
-#if defined(USE_EAP_SIMPLE_CONFIG)
-
-EAP_FUNC_EXPORT eap_status_e eapol_handle_tlv_message_data_c::get_parameter_data(
-	const eap_tlv_header_c * const credential_array_header,
-	eap_array_c<simple_config_credential_c> * const credential_array)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("eapol_handle_tlv_message_data_c::get_parameter_data(): type=%s\n"),
-		 get_type_string(static_cast<eapol_tlv_message_type_e>(credential_array_header->get_type()))));
-
-	EAP_TRACE_DATA_DEBUG(
-		m_am_tools,
-		EAP_TRACE_FLAGS_MESSAGE_DATA,
-		(EAPL("get_parameter_data(eap_array_c<simple_config_credential_c> *)"),
-		credential_array_header->get_header_buffer(credential_array_header->get_header_buffer_length()),
-		credential_array_header->get_header_buffer_length()));
-
-	if (static_cast<eapol_tlv_message_type_e>(credential_array_header->get_type())
-		!= eapol_tlv_message_type_array)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
-	}
-
-	eapol_handle_tlv_message_data_c credential_array_data(m_am_tools);
-
-	if (credential_array_data.get_is_valid() == false)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-	}
-
-	eap_status_e status = credential_array_data.set_message_data(
-		credential_array_header->get_value_length(),
-		credential_array_header->get_value(credential_array_header->get_value_length()));
-
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	eap_array_c<eap_tlv_header_c> credential_array_members(m_am_tools);
-
-	status = credential_array_data.parse_message_data(&credential_array_members);
-
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-
-	for (u32_t ind_member = 0ul; ind_member < credential_array_members.get_object_count(); ind_member++)
-	{
-		simple_config_credential_c * const simple_config_credential = new simple_config_credential_c(m_am_tools);
-
-		eap_automatic_variable_c<simple_config_credential_c> automatic_simple_config_credential(m_am_tools, simple_config_credential);
-
-		if (simple_config_credential == 0
-			|| simple_config_credential->get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		{
-			const eap_tlv_header_c * const simple_config_credential_header = credential_array_members.get_object(ind_member);
-			if (simple_config_credential_header == 0)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-			}
-
-			status = credential_array_data.get_parameter_data(simple_config_credential_header, simple_config_credential);
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);
-			}
-
-			automatic_simple_config_credential.do_not_free_variable();
-
-			status = credential_array->add_object(simple_config_credential, true);
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);
-			}
-		}
-	} // for ()
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
-}
-
-#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
-
-//--------------------------------------------------
-
-EAP_FUNC_EXPORT eap_const_string eapol_handle_tlv_message_data_c::get_type_string(const eapol_tlv_message_type_e type)
-{
-#if defined(USE_EAP_TRACE_STRINGS)
-	EAP_IF_RETURN_STRING(type, eapol_tlv_message_type_none)
-	else EAP_IF_RETURN_STRING(type, eapol_tlv_message_type_array)
-	else EAP_IF_RETURN_STRING(type, eapol_tlv_message_type_boolean)
-	else EAP_IF_RETURN_STRING(type, eapol_tlv_message_type_eap_protocol_layer)
-	else EAP_IF_RETURN_STRING(type, eapol_tlv_message_type_eap_state_notification)
-	else EAP_IF_RETURN_STRING(type, eapol_tlv_message_type_eap_type)
-	else EAP_IF_RETURN_STRING(type, eapol_tlv_message_type_eapol_key_802_11_authentication_mode)
-	else EAP_IF_RETURN_STRING(type, eapol_tlv_message_type_eapol_key_authentication_type)
-	else EAP_IF_RETURN_STRING(type, eapol_tlv_message_type_eapol_key_type)
-	else EAP_IF_RETURN_STRING(type, eapol_tlv_message_type_eapol_tkip_mic_failure_type)
-	else EAP_IF_RETURN_STRING(type, eapol_tlv_message_type_eapol_wlan_authentication_state)
-	else EAP_IF_RETURN_STRING(type, eapol_tlv_message_type_error)
-	else EAP_IF_RETURN_STRING(type, eapol_tlv_message_type_function)
-	else EAP_IF_RETURN_STRING(type, eapol_tlv_message_type_network_id)
-	else EAP_IF_RETURN_STRING(type, eapol_tlv_message_type_RSNA_cipher)
-	else EAP_IF_RETURN_STRING(type, eapol_tlv_message_type_session_key)
-	else EAP_IF_RETURN_STRING(type, eapol_tlv_message_type_u8_t)
-	else EAP_IF_RETURN_STRING(type, eapol_tlv_message_type_u16_t)
-	else EAP_IF_RETURN_STRING(type, eapol_tlv_message_type_u32_t)
-	else EAP_IF_RETURN_STRING(type, eapol_tlv_message_type_u64_t)
-	else EAP_IF_RETURN_STRING(type, eapol_tlv_message_type_variable_data)
-	else EAP_IF_RETURN_STRING(type, eapol_tlv_message_type_network_key)
-	else EAP_IF_RETURN_STRING(type, eapol_tlv_message_type_protected_setup_credential)
-	else
-#endif // #if defined(USE_EAP_TRACE_STRINGS)
-	{
-		EAP_UNREFERENCED_PARAMETER(type);
-
-		return EAPL("Unknown EAPOL-TLV message type");
-	}
-}
-
-//--------------------------------------------------
-
-EAP_FUNC_EXPORT eap_const_string eapol_handle_tlv_message_data_c::get_function_string(const eapol_tlv_message_type_function_e function)
-{
-#if defined(USE_EAP_TRACE_STRINGS)
-	EAP_IF_RETURN_STRING(function, eapol_tlv_message_type_function_none)
-	else EAP_IF_RETURN_STRING(function, eapol_tlv_message_type_function_check_pmksa_cache)
-	else EAP_IF_RETURN_STRING(function, eapol_tlv_message_type_function_start_authentication)
-	else EAP_IF_RETURN_STRING(function, eapol_tlv_message_type_function_complete_association)
-	else EAP_IF_RETURN_STRING(function, eapol_tlv_message_type_function_disassociation)
-	else EAP_IF_RETURN_STRING(function, eapol_tlv_message_type_function_start_preauthentication)
-	else EAP_IF_RETURN_STRING(function, eapol_tlv_message_type_function_start_reassociation)
-	else EAP_IF_RETURN_STRING(function, eapol_tlv_message_type_function_complete_reassociation)
-	else EAP_IF_RETURN_STRING(function, eapol_tlv_message_type_function_start_WPXM_reassociation)
-	else EAP_IF_RETURN_STRING(function, eapol_tlv_message_type_function_complete_WPXM_reassociation)
-	else EAP_IF_RETURN_STRING(function, eapol_tlv_message_type_function_packet_process)
-	else EAP_IF_RETURN_STRING(function, eapol_tlv_message_type_function_tkip_mic_failure)
-	else EAP_IF_RETURN_STRING(function, eapol_tlv_message_type_function_eap_acknowledge)
-	else EAP_IF_RETURN_STRING(function, eapol_tlv_message_type_function_update_header_offset)
-	else EAP_IF_RETURN_STRING(function, eapol_tlv_message_type_function_complete_check_pmksa_cache)
-	else EAP_IF_RETURN_STRING(function, eapol_tlv_message_type_function_packet_send)
-	else EAP_IF_RETURN_STRING(function, eapol_tlv_message_type_function_associate)
-	else EAP_IF_RETURN_STRING(function, eapol_tlv_message_type_function_disassociate)
-	else EAP_IF_RETURN_STRING(function, eapol_tlv_message_type_function_packet_data_session_key)
-	else EAP_IF_RETURN_STRING(function, eapol_tlv_message_type_function_state_notification)
-	else EAP_IF_RETURN_STRING(function, eapol_tlv_message_type_function_reassociate)
-	else EAP_IF_RETURN_STRING(function, eapol_tlv_message_type_function_update_wlan_database_reference_values)
-	else EAP_IF_RETURN_STRING(function, eapol_tlv_message_type_function_complete_start_WPXM_reassociation)
-	else EAP_IF_RETURN_STRING(function, eapol_tlv_message_type_function_new_protected_setup_credentials)
-	else EAP_IF_RETURN_STRING(function, eapol_tlv_message_type_function_illegal_value)
-	else
-#endif // #if defined(USE_EAP_TRACE_STRINGS)
-	{
-		EAP_UNREFERENCED_PARAMETER(function);
-
-		return EAPL("Unknown EAPOL-TLV message function");
-	}
-}
-
-//--------------------------------------------------
-
 // End.
--- a/eapol/eapol_framework/eapol_common/core/eapol_key_state_client.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/core/eapol_key_state_client.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 61 %
+* %version: 57.1.5 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -421,14 +421,12 @@
 
 	eap_status_e status = eap_status_process_general_error;
 
-	eapol_key_state_string_c state_string;
-
 	EAP_TRACE_DEBUG(
 		m_am_tools, 
 		TRACE_FLAGS_DEFAULT, 
 		(EAPL("EAPOL_KEY: %s: eapol_key_state_c::process_4_way_handshake_message_1(): eapol_key_descriptor_type = %s = 0x%02x\n"),
 		(m_is_client == true ? "client": "server"),
-		state_string.get_eapol_key_descriptor_type_string(eapol_key_message->get_key_descriptor_type()),
+		eapol_key_state_string_c::get_eapol_key_descriptor_type_string(eapol_key_message->get_key_descriptor_type()),
 		eapol_key_message->get_key_descriptor_type()));
 
 	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_key_state_c::process_4_way_handshake_message_1()");
@@ -436,6 +434,7 @@
 	// Only client (supplicant) could receive 4-Way Handshake message 1.
 	EAP_ASSERT_ALWAYS(m_is_client == true);
 
+#if 0
 	if (m_eapol_key_handshake_type == eapol_key_handshake_type_none)
 	{
 		// 4-Way Handshake started again.
@@ -448,10 +447,12 @@
 			(EAPL("EAPOL_KEY: %s: process_4_way_handshake_message_1(): 4-Way Handshake restarted.\n"),
 			(m_is_client == true ? "client": "server")));
 	}
+#endif
 
 	if (get_eapol_key_state() != eapol_key_state_wait_4_way_handshake_message_1
 		&& get_eapol_key_state() != eapol_key_state_wait_4_way_handshake_message_3
 		&& get_eapol_key_state() != eapol_key_state_4_way_handshake_successfull
+		&& get_eapol_key_state() != eapol_key_state_group_key_handshake_successfull
 		&& get_eapol_key_state() != eapol_key_state_preauthenticated
 #if defined(EAP_USE_WPXM)
 		&& get_eapol_key_state() != eapol_key_state_wpxm_reassociation_finished_successfull
@@ -463,7 +464,7 @@
 			TRACE_FLAGS_DEFAULT,
 			(EAPL("WARNING: EAPOL_KEY: %s: process_4_way_handshake_message_1(): wrong state %s\n"),
 			(m_is_client == true ? "client": "server"),
-			state_string.get_eapol_key_state_string(get_eapol_key_state())));
+			eapol_key_state_string_c::get_eapol_key_state_string(get_eapol_key_state())));
 
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_wrong_eap_type_state);
@@ -1120,15 +1121,13 @@
 	}
 	else
 	{
-		eapol_key_state_string_c state_string;
-
 		EAP_TRACE_DEBUG(
 			m_am_tools, 
 			TRACE_FLAGS_DEFAULT, 
 			(EAPL("WARNING: EAPOL_KEY: eapol_key_state_c::process_4_way_handshake_message_3_payloads_b(): ")
 			 EAPL("No keys are set on state %d=%s.\n"),
 			 get_eapol_key_state(),
-			 state_string.get_eapol_key_state_string(get_eapol_key_state())));
+			 eapol_key_state_string_c::get_eapol_key_state_string(get_eapol_key_state())));
 	}
 
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -1148,14 +1147,12 @@
 
 	eap_status_e status = eap_status_process_general_error;
 
-	eapol_key_state_string_c state_string;
-
 	EAP_TRACE_DEBUG(
 		m_am_tools, 
 		TRACE_FLAGS_DEFAULT, 
 		(EAPL("EAPOL_KEY: %s: eapol_key_state_c::process_4_way_handshake_message_3(): eapol_key_descriptor_type = %s = 0x%02x\n"),
 		(m_is_client == true ? "client": "server"),
-		state_string.get_eapol_key_descriptor_type_string(eapol_key_message->get_key_descriptor_type()),
+		eapol_key_state_string_c::get_eapol_key_descriptor_type_string(eapol_key_message->get_key_descriptor_type()),
 		eapol_key_message->get_key_descriptor_type()));
 
 	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_key_state_c::process_4_way_handshake_message_3()");
@@ -1168,13 +1165,12 @@
 	if (m_eapol_key_handshake_type != eapol_key_handshake_type_4_way_handshake
 		&& m_eapol_key_handshake_type != eapol_key_handshake_type_group_key_handshake)
 	{
-		eapol_key_state_string_c state_string;
 		EAP_TRACE_ERROR(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
 			(EAPL("WARNING: EAPOL_KEY: %s: process_4_way_handshake_message_3(): wrong handshake type %s\n"),
 			(m_is_client == true ? "client": "server"),
-			state_string.get_eapol_key_handshake_type_string(m_eapol_key_handshake_type)));
+			eapol_key_state_string_c::get_eapol_key_handshake_type_string(m_eapol_key_handshake_type)));
 
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_wrong_eap_type_state);
@@ -1192,7 +1188,7 @@
 			TRACE_FLAGS_DEFAULT,
 			(EAPL("WARNING: EAPOL_KEY: %s: process_4_way_handshake_message_3(): wrong state %s\n"),
 			(m_is_client == true ? "client": "server"),
-			state_string.get_eapol_key_state_string(get_eapol_key_state())));
+			eapol_key_state_string_c::get_eapol_key_state_string(get_eapol_key_state())));
 
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_wrong_eap_type_state);
@@ -1429,15 +1425,13 @@
 	}
 	else
 	{
-		eapol_key_state_string_c state_string;
-
 		EAP_TRACE_DEBUG(
 			m_am_tools, 
 			TRACE_FLAGS_DEFAULT, 
 			(EAPL("WARNING: EAPOL_KEY: eapol_key_state_c::process_4_way_handshake_message_3(): ")
 			 EAPL("No keys are set on state %d=%s.\n"),
 			 get_eapol_key_state(),
-			 state_string.get_eapol_key_state_string(get_eapol_key_state())));
+			 eapol_key_state_string_c::get_eapol_key_state_string(get_eapol_key_state())));
 	}
 
 
@@ -1754,13 +1748,12 @@
 	if (m_eapol_key_handshake_type != eapol_key_handshake_type_none
 		&& m_eapol_key_handshake_type != eapol_key_handshake_type_group_key_handshake)
 	{
-		eapol_key_state_string_c state_string;
 		EAP_TRACE_ERROR(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
 			(EAPL("WARNING: EAPOL_KEY: %s: start_group_key_handshake(): wrong handshake type %s\n"),
 			(m_is_client == true ? "client": "server"),
-			state_string.get_eapol_key_handshake_type_string(m_eapol_key_handshake_type)));
+			eapol_key_state_string_c::get_eapol_key_handshake_type_string(m_eapol_key_handshake_type)));
 
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_wrong_eap_type_state);
@@ -1774,13 +1767,12 @@
 #endif //#if defined(EAP_USE_WPXM)
 		)
 	{
-		eapol_key_state_string_c state_string;
 		EAP_TRACE_ERROR(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
 			(EAPL("WARNING: EAPOL_KEY: %s: process_group_key_handshake_message_1(): wrong state %s\n"),
 			(m_is_client == true ? "client": "server"),
-			state_string.get_eapol_key_state_string(get_eapol_key_state())));
+			eapol_key_state_string_c::get_eapol_key_state_string(get_eapol_key_state())));
 
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_wrong_eap_type_state);
@@ -2117,7 +2109,7 @@
 
 		set_eapol_key_state(eapol_key_state_group_key_handshake_successfull);
 
-		m_eapol_key_handshake_type = eapol_key_handshake_type_none;
+		m_eapol_key_handshake_type = eapol_key_handshake_type_authenticated;
 
 		if (get_is_WPXM() == true)
 		{
@@ -2143,15 +2135,13 @@
 	}
 	else
 	{
-		eapol_key_state_string_c state_string;
-
 		EAP_TRACE_DEBUG(
 			m_am_tools, 
 			TRACE_FLAGS_DEFAULT, 
 			(EAPL("WARNING: EAPOL_KEY: eapol_key_state_c::process_group_key_handshake_message_1(): ")
 			 EAPL("No keys are set on state %d=%s.\n"),
 			 get_eapol_key_state(),
-			 state_string.get_eapol_key_state_string(get_eapol_key_state())));
+			 eapol_key_state_string_c::get_eapol_key_state_string(get_eapol_key_state())));
 	}
 
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -2179,13 +2169,12 @@
 
 	if (m_eapol_key_handshake_type != eapol_key_handshake_type_dynamic_WEP)
 	{
-		eapol_key_state_string_c state_string;
 		EAP_TRACE_ERROR(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
 			(EAPL("ERROR: EAPOL_KEY: %s: process_RC4_key_descriptor(): wrong handshake type %s\n"),
 			(m_is_client == true ? "client": "server"),
-			state_string.get_eapol_key_handshake_type_string(m_eapol_key_handshake_type)));
+			eapol_key_state_string_c::get_eapol_key_handshake_type_string(m_eapol_key_handshake_type)));
 
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_wrong_eap_type_state);
@@ -2193,13 +2182,12 @@
 
 	if (get_eapol_key_state() != eapol_key_state_wait_rc4_key_message)
 	{
-		eapol_key_state_string_c state_string;
 		EAP_TRACE_ERROR(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
 			(EAPL("WARNING: EAPOL_KEY: %s: process_RC4_key_descriptor(): wrong state %s\n"),
 			(m_is_client == true ? "client": "server"),
-			state_string.get_eapol_key_state_string(get_eapol_key_state())));
+			eapol_key_state_string_c::get_eapol_key_state_string(get_eapol_key_state())));
 
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_wrong_eap_type_state);
@@ -2576,20 +2564,24 @@
 	EAP_TRACE_DEBUG(
 		m_am_tools, 
 		TRACE_FLAGS_DEFAULT, 
-		(EAPL("EAPOL_KEY: %s: eapol_key_state_c::initialize_4_way_handshake()\n"),
-		(m_is_client == true ? "client": "server")));
+		(EAPL("EAPOL_KEY: %s: eapol_key_state_c::initialize_4_way_handshake(): m_eapol_key_handshake_type=%d=%s, m_eapol_key_state=%d=%s\n"),
+		(m_is_client == true ? "client": "server"),
+		m_eapol_key_handshake_type,
+		eapol_key_state_string_c::get_eapol_key_handshake_type_string(m_eapol_key_handshake_type),
+		m_eapol_key_state,
+		eapol_key_state_string_c::get_eapol_key_state_string(m_eapol_key_state)));
 
 	if (m_eapol_key_handshake_type != eapol_key_handshake_type_none
+		&& m_eapol_key_handshake_type != eapol_key_handshake_type_authenticated
 		&& m_eapol_key_handshake_type != eapol_key_handshake_type_group_key_handshake
 		&& m_eapol_key_handshake_type != eapol_key_handshake_type_4_way_handshake)
 	{
-		eapol_key_state_string_c state_string;
 		EAP_TRACE_ERROR(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
 			(EAPL("WARNING: EAPOL_KEY: %s: initialize_4_way_handshake(): wrong handshake type %s\n"),
 			(m_is_client == true ? "client": "server"),
-			state_string.get_eapol_key_handshake_type_string(m_eapol_key_handshake_type)));
+			eapol_key_state_string_c::get_eapol_key_handshake_type_string(m_eapol_key_handshake_type)));
 
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_wrong_eap_type_state);
--- a/eapol/eapol_framework/eapol_common/core/eapol_key_state_common.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/core/eapol_key_state_common.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 120.1.6 %
+* %version: 132 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -63,14 +63,13 @@
 	m_eapol_pairwise_cipher = eapol_pairwise_cipher;
 	m_eapol_group_cipher = eapol_group_cipher;
 
-	eapol_key_state_string_c state_string;
 	EAP_TRACE_DEBUG(
 		m_am_tools, 
 		TRACE_FLAGS_DEFAULT, 
 		(EAPL("EAPOL_KEY: %s: eapol_key_state_c::save_parameters(): m_authentication_type=%s, ")
 		 EAPL("m_eapol_pairwise_cipher=%d, m_eapol_group_cipher=%d.\n"),
 		 (m_is_client == true) ? "client": "server",
-		 state_string.get_eapol_key_authentication_type_string(m_authentication_type),
+		 eapol_key_state_string_c::get_eapol_key_authentication_type_string(m_authentication_type),
 		 m_eapol_pairwise_cipher,
 		 m_eapol_group_cipher));
 	
@@ -230,7 +229,9 @@
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_cipher_suite);
 	}
-	else if (m_authentication_type == eapol_key_authentication_type_802_1X)
+	else if (m_authentication_type == eapol_key_authentication_type_dynamic_WEP
+		|| m_authentication_type == eapol_key_authentication_type_EAP_authentication_no_encryption
+	)
 	{
 		// OK, cannot check the pairwise and group ciphers.
 		// AP will tell these in the EAPOL RC4 Key message.
@@ -276,7 +277,6 @@
 		}
 	}
 
-#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
 	{
 		m_is_associated = true;
 
@@ -287,15 +287,12 @@
 			 (m_is_client == true) ? "client": "server",
 			 (m_is_associated == true) ? "true": "false"));
 	}
-#endif //#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
 
 	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
 }
 
 //--------------------------------------------------
 
-#if defined(USE_EAPOL_KEY_STATE) && defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
 // 
 EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::initialize(
 	const eap_am_network_id_c * const receive_network_id,
@@ -327,7 +324,6 @@
 
 	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
-#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
 	// Creates SNonce. This is done here in early phase of authentication.
 	// This will reduce the CPU load when time critical first message
 	// of 4-Way handshake is processed.
@@ -337,7 +333,6 @@
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
-#endif //#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
 
 	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
@@ -345,8 +340,6 @@
 	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
 }
 
-#endif //#if defined(USE_EAPOL_KEY_STATE) && defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
 //--------------------------------------------------
 
 // 
@@ -520,9 +513,7 @@
 	, m_indicate_pmkid_to_lower_layer(false)
 	, m_handshake_timeout_set(false)
 	, m_server_TEST_group_key_update(false)
-#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
 	, m_is_associated(false)
-#endif //#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
@@ -615,9 +606,7 @@
 	, m_indicate_pmkid_to_lower_layer(false)
 	, m_handshake_timeout_set(false)
 	, m_server_TEST_group_key_update(false)
-#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
 	, m_is_associated(false)
-#endif //#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
@@ -954,7 +943,6 @@
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
-	eapol_key_state_string_c state_string;
 	EAP_TRACE_DEBUG(
 		m_am_tools, 
 		TRACE_FLAGS_DEFAULT, 
@@ -962,9 +950,9 @@
 		 (m_is_client == true) ? "client": "server",
 		 this,
 		 get_eapol_key_state(),
-		 state_string.get_eapol_key_state_string(get_eapol_key_state()),
+		 eapol_key_state_string_c::get_eapol_key_state_string(get_eapol_key_state()),
 		 m_authentication_type,
-		 state_string.get_eapol_key_authentication_type_string(m_authentication_type)));
+		 eapol_key_state_string_c::get_eapol_key_authentication_type_string(m_authentication_type)));
 
 	eap_status_e status = m_pairwise_PMK_WPXK3.set_copy_of_buffer(pairwise_PMK_WPXK3);
 	if (status != eap_status_ok)
@@ -1049,7 +1037,7 @@
 		(EAPL("EAPOL_KEY: %s: eapol_key_state_c::set_reassociation_parameters(): m_authentication_type=%s, ")
 		 EAPL("m_eapol_pairwise_cipher=%d, m_eapol_group_cipher=%d.\n"),
 		 (m_is_client == true) ? "client": "server",
-		 state_string.get_eapol_key_authentication_type_string(m_authentication_type),
+		 eapol_key_state_string_c::get_eapol_key_authentication_type_string(m_authentication_type),
 		 m_eapol_pairwise_cipher,
 		 m_eapol_group_cipher));
 	
@@ -1148,8 +1136,6 @@
 	}
 
 
-#if defined(USE_EAPOL_KEY_STATE) && defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
 	status = new_state->initialize(
 		receive_network_id,
 		m_authentication_type);
@@ -1161,9 +1147,6 @@
 		return 0;
 	}
 
-#endif //#if defined(USE_EAPOL_KEY_STATE) && defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
-
 	eapol_key_handshake_type_e eapol_key_handshake_type(m_eapol_key_handshake_type);
 
 	eapol_key_authentication_type_e authentication_type(m_authentication_type);
@@ -1219,9 +1202,11 @@
 	EAP_TRACE_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
-		(EAPL("eapol_key_state_c::handshake_failure_notification(): %s, m_eapol_key_handshake_type=%s, get_eapol_key_state()=%s\n"),
+		(EAPL("eapol_key_state_c::handshake_failure_notification(): %s, m_eapol_key_handshake_type=%d=%s, get_eapol_key_state()=%d=%s\n"),
 		 (m_is_client == true) ? "client": "server",
+		 m_eapol_key_handshake_type,
 		 eapol_key_state_string.get_eapol_key_handshake_type_string(m_eapol_key_handshake_type),
+		 get_eapol_key_state(),
 		 eapol_key_state_string.get_eapol_key_state_string(get_eapol_key_state())));
 
 	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
@@ -1322,7 +1307,8 @@
 				(m_is_client == true ? "client": "server")));
 		}
 	}
-	else if (m_eapol_key_handshake_type == eapol_key_handshake_type_none)
+	else if (m_eapol_key_handshake_type == eapol_key_handshake_type_none
+		|| m_eapol_key_handshake_type == eapol_key_handshake_type_authenticated)
 	{
 		EAP_TRACE_ALWAYS(
 			m_am_tools,
@@ -1415,19 +1401,24 @@
 
 	eap_status_e status = eap_status_ok;
 
-	eapol_key_state_string_c state_string;
 	EAP_TRACE_DEBUG(
 		m_am_tools, 
 		TRACE_FLAGS_DEFAULT, 
-		(EAPL("EAPOL_KEY: %s: eapol_key_state_c::check_pmksa_cache(): this = 0x%08x, state %d=%s, selected_eapol_key_authentication_type %d=%s, m_authentication_type %d=%s.\n"),
+		(EAPL("EAPOL_KEY: %s: eapol_key_state_c::check_pmksa_cache(): this = 0x%08x, state %d=%s,\n"),
 		 (m_is_client == true) ? "client": "server",
 		 this,
 		 get_eapol_key_state(),
-		 state_string.get_eapol_key_state_string(get_eapol_key_state()),
+		 eapol_key_state_string_c::get_eapol_key_state_string(get_eapol_key_state())));
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("EAPOL_KEY: %s: eapol_key_state_c::check_pmksa_cache(): selected_eapol_key_authentication_type %d=%s, m_authentication_type %d=%s.\n"),
+		 (m_is_client == true) ? "client": "server",
 		 selected_eapol_key_authentication_type,
-		 state_string.get_eapol_key_authentication_type_string(selected_eapol_key_authentication_type),
+		 eapol_key_state_string_c::get_eapol_key_authentication_type_string(selected_eapol_key_authentication_type),
 		 m_authentication_type,
-		 state_string.get_eapol_key_authentication_type_string(m_authentication_type)));
+		 eapol_key_state_string_c::get_eapol_key_authentication_type_string(m_authentication_type)));
 
 
 	if (selected_eapol_key_authentication_type != eapol_key_authentication_type_RSNA_EAP
@@ -1455,7 +1446,6 @@
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);	
 
-	eapol_key_state_string_c state_string;
 	EAP_TRACE_DEBUG(
 		m_am_tools, 
 		TRACE_FLAGS_DEFAULT, 
@@ -1463,9 +1453,9 @@
 		 (m_is_client == true) ? "client": "server",
 		 this,
 		 get_eapol_key_state(),
-		 state_string.get_eapol_key_state_string(get_eapol_key_state()),
+		 eapol_key_state_string_c::get_eapol_key_state_string(get_eapol_key_state()),
 		 m_authentication_type,
-		 state_string.get_eapol_key_authentication_type_string(m_authentication_type)));
+		 eapol_key_state_string_c::get_eapol_key_authentication_type_string(m_authentication_type)));
 
 	eap_status_e status(eap_status_process_general_error);
 
@@ -1481,7 +1471,9 @@
 	if (m_authentication_type == eapol_key_authentication_type_none
 		|| m_authentication_type == eapol_key_authentication_type_RSNA_PSK
 		|| m_authentication_type == eapol_key_authentication_type_WPA_PSK
-		|| m_authentication_type == eapol_key_authentication_type_802_1X)
+		|| m_authentication_type == eapol_key_authentication_type_dynamic_WEP
+		|| m_authentication_type == eapol_key_authentication_type_EAP_authentication_no_encryption
+		)
 	{
 		// Illegal authentication type.
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -1521,7 +1513,6 @@
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);	
 
-	eapol_key_state_string_c state_string;
 	EAP_TRACE_DEBUG(
 		m_am_tools, 
 		TRACE_FLAGS_DEFAULT, 
@@ -1529,9 +1520,9 @@
 		 (m_is_client == true) ? "client": "server",
 		 this,
 		 get_eapol_key_state(),
-		 state_string.get_eapol_key_state_string(get_eapol_key_state()),
+		 eapol_key_state_string_c::get_eapol_key_state_string(get_eapol_key_state()),
 		 m_authentication_type,
-		 state_string.get_eapol_key_authentication_type_string(m_authentication_type)));
+		 eapol_key_state_string_c::get_eapol_key_authentication_type_string(m_authentication_type)));
 
 
 	(void) cancel_pmksa_caching_timeout();
@@ -1567,7 +1558,6 @@
 
 	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
-#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
 	// Creates SNonce. This is done here in early phase of authentication.
 	// This will reduce the CPU load when time critical first message
 	// of 4-Way handshake is processed.
@@ -1577,7 +1567,6 @@
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
-#endif //#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
 
 	status = init_handshake_timeout(m_handshake_timeout);
 	if (status != eap_status_ok)
@@ -1597,7 +1586,7 @@
 			 (m_is_client == true) ? "client": "server",
 			 this,
 			 get_eapol_key_state(),
-			 state_string.get_eapol_key_state_string(get_eapol_key_state())));
+			 eapol_key_state_string_c::get_eapol_key_state_string(get_eapol_key_state())));
 
 		EAP_TRACE_DEBUG(
 			m_am_tools, 
@@ -1605,9 +1594,9 @@
 			(EAPL("ERROR: EAPOL_KEY: %s: || (m_authentication_type=%d=%s) != (required_authentication_type=%d=%s)\n"),
 			 (m_is_client == true) ? "client": "server",
 			 m_authentication_type,
-			 state_string.get_eapol_key_authentication_type_string(m_authentication_type),
+			 eapol_key_state_string_c::get_eapol_key_authentication_type_string(m_authentication_type),
 			 required_authentication_type,
-			 state_string.get_eapol_key_authentication_type_string(required_authentication_type)));
+			 eapol_key_state_string_c::get_eapol_key_authentication_type_string(required_authentication_type)));
 
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_authentication_failure);
@@ -1743,7 +1732,6 @@
 			return EAP_STATUS_RETURN(m_am_tools, eap_status_authentication_failure);
 		}
 
-#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
 		{
 			m_is_associated = true;
 
@@ -1754,8 +1742,6 @@
 				 (m_is_client == true) ? "client": "server",
 				 (m_is_associated == true) ? "true": "false"));
 		}
-#endif //#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
 	}
 	else
 	{
@@ -1836,14 +1822,13 @@
 
 	if (id == EAPOL_KEY_STATE_TIMER_HANDSHAKE_TIMEOUT_ID)
 	{
-		eapol_key_state_string_c state_string;
 		EAP_TRACE_DEBUG(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
 			(EAPL("TIMER: EAPOL_KEY: %s: EAPOL_KEY_STATE_TIMER_HANDSHAKE_TIMEOUT_ID expired, eapol_key_state=%d=%s\n"),
 			 (m_is_client == true ? "client": "server"),
 			 get_eapol_key_state(),
-			 state_string.get_eapol_key_state_string(get_eapol_key_state())));
+			 eapol_key_state_string_c::get_eapol_key_state_string(get_eapol_key_state())));
 
 		if ((m_is_client == true
 			&& get_eapol_key_state() == eapol_key_state_wait_4_way_handshake_message_3)
@@ -1859,8 +1844,10 @@
 			}
 			else if (m_authentication_type == eapol_key_authentication_type_RSNA_EAP
 					|| m_authentication_type == eapol_key_authentication_type_WPA_EAP
-					|| m_authentication_type == eapol_key_authentication_type_802_1X
-					|| m_authentication_type == eapol_key_authentication_type_WPXM)
+					|| m_authentication_type == eapol_key_authentication_type_dynamic_WEP
+					|| m_authentication_type == eapol_key_authentication_type_WPXM
+					|| m_authentication_type == eapol_key_authentication_type_EAP_authentication_no_encryption
+					)
 			{
 				send_error_notification(eap_status_authentication_failure);
 			}
@@ -2783,19 +2770,37 @@
 			 expected_key_message));
 	}
 
-	if (get_is_RSNA() == true
-		&& eapol_key_descriptor_type == eapol_key_descriptor_type_RSNA
-		&& current_key_descriptor_type == eapol_RSNA_key_data_type_RSN_key_data
+	if (current_key_descriptor_type == eapol_RSNA_key_data_type_RSN_key_data
 		&& check_is_aes_key_wrap_padding(
 			current_key_descriptor_type,
 			key_data_payload,
 			*key_data_max_length) == eap_status_ok)
 	{
+		if (get_is_RSNA() == false)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("WARNING: EAPOL_KEY: eapol_key_state_c::parse_generic_key_data_payload(0x%08x): AES key wrapping padding in non RSNA\n"),
+				 key_data_payload));
+		}
+
+		if (eapol_key_descriptor_type != eapol_key_descriptor_type_RSNA)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("WARNING: EAPOL_KEY: eapol_key_state_c::parse_generic_key_data_payload(0x%08x): AES key wrapping padding in non RSNA, eapol_key_descriptor_type=%d\n"),
+				 key_data_payload,
+				 eapol_key_descriptor_type));
+		}
+
 		EAP_TRACE_DEBUG(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
-			(EAPL("EAPOL_KEY: eapol_key_state_c::parse_generic_key_data_payload(0x%08x): AES key wrapping padding\n"),
-			 key_data_payload));
+			(EAPL("EAPOL_KEY: eapol_key_state_c::parse_generic_key_data_payload(0x%08x): AES key wrapping padding, %d bytes\n"),
+			 key_data_payload,
+			 *key_data_max_length));
 
 		// This is AES key wrap padding.
 		*key_data_max_length = 0ul;
@@ -3605,15 +3610,27 @@
 
 	if (*buffer_length != 0u)
 	{
-		if (key_descriptor_version == eapol_RSNA_key_header_c::m_key_descriptor_version_1)
+		// Check is this padding.
+		const u8_t * const padding = payload.get_header_offset(payload.get_header_and_body_length(), *buffer_length);
+
+		status = check_padding(padding, *buffer_length);
+
+		if (status != eap_status_ok
+			&& key_descriptor_version == eapol_RSNA_key_header_c::m_key_descriptor_version_1)
 		{
 			EAP_TRACE_ERROR(
 				m_am_tools,
 				TRACE_FLAGS_EAPOL_KEY_DATA_ERROR,
 				(EAPL("ERROR: EAPOL_KEY: eapol_key_state_c::parse_key_data(): ")
 				 EAPL("EAPOl Key Data-header is corrupted. Buffer length ")
-				 EAPL("and payload length does not match. %lu illegal bytes.\n"),
+				 EAPL("and payload length does not match. %d illegal bytes.\n"),
 				 *buffer_length));
+			EAP_TRACE_DATA_ERROR(
+				m_am_tools,
+				TRACE_FLAGS_EAPOL_KEY_DATA_ERROR,
+				(EAPL("ERROR: illegal padding"),
+				padding,
+				*buffer_length));
 			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 			return EAP_STATUS_RETURN(m_am_tools, eap_status_header_corrupted);
 		}
@@ -4304,6 +4321,32 @@
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
 	}
 
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	crypto_aes_wrap_c aes_wrap(m_am_tools);
+
+	if (aes_wrap.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	u32_t padding_length(0ul);
+	u32_t min_key_data_length = 2ul * aes_wrap.get_block_size();
+
+	if (eapol_key_message->get_key_data_length() < min_key_data_length)
+	{
+		padding_length = min_key_data_length - eapol_key_message->get_key_data_length();
+	}
+	else if ((eapol_key_message->get_key_data_length() % aes_wrap.get_block_size()) != 0)
+	{
+		padding_length = aes_wrap.get_block_size()
+			- (eapol_key_message->get_key_data_length() % aes_wrap.get_block_size());
+	}
+
+	u32_t padding_offset = eapol_key_message->get_key_data_length();
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	if (m_eapol_pairwise_cipher
 		== eapol_RSNA_key_header_c::eapol_RSNA_cipher_CCMP
@@ -4315,14 +4358,6 @@
 			TRACE_FLAGS_DEFAULT,
 			(EAPL("EAPOL_KEY: AES-WRAP encryption algorithm.\n")));
 
-		crypto_aes_wrap_c aes_wrap(m_am_tools);
-
-		if (aes_wrap.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
 		status = aes_wrap.set_encryption_key(
 			m_encryption_KEK.get_data(),
 			m_encryption_KEK.get_data_length());
@@ -4332,21 +4367,6 @@
 			return EAP_STATUS_RETURN(m_am_tools, status);
 		}
 
-		u32_t padding_length(0ul);
-		u32_t min_key_data_length = 2ul * aes_wrap.get_block_size();
-
-		if (eapol_key_message->get_key_data_length() < min_key_data_length)
-		{
-			padding_length = min_key_data_length - eapol_key_message->get_key_data_length();
-		}
-		else if ((eapol_key_message->get_key_data_length() % aes_wrap.get_block_size()) != 0)
-		{
-			padding_length = aes_wrap.get_block_size()
-				- (eapol_key_message->get_key_data_length() % aes_wrap.get_block_size());
-		}
-
-		u32_t padding_offset = eapol_key_message->get_key_data_length();
-
 		// AES-Wrap increases message length with one block.
 		status = eapol_key_message->set_key_data_length(
 			static_cast<u16_t>(eapol_key_message->get_key_data_length()
@@ -4451,6 +4471,34 @@
 			return EAP_STATUS_RETURN(m_am_tools, status);
 		}
 
+		if (padding_length > 0ul)
+		{
+			// Of course some access points use padding also with RC4 encryption. It is required only with AES-wrap algorithm.
+			crypto_aes_wrap_c aes_wrap(m_am_tools);
+
+			if (aes_wrap.get_is_valid() == false)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+			}
+
+			aes_wrap.add_padding_bytes(
+				eapol_key_message->get_key_data_offset(
+					padding_offset,
+					padding_length),
+				padding_length);
+
+			status = eapol_key_message->set_key_data_length(
+				static_cast<u16_t>(eapol_key_message->get_key_data_length()
+				+ padding_length));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+		}
+
 		EAP_TRACE_DATA_DEBUG(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
@@ -5113,6 +5161,17 @@
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("EAPOL_KEY: %s: eapol_key_state_c::process_eapol_key_frame(): ")
+		 EAPL("m_authentication_type=%d=%s, m_eapol_key_state=%d=%s\n"),
+		(m_is_client == true ? "client": "server"),
+		m_authentication_type,
+		eapol_key_state_string_c::get_eapol_key_authentication_type_string(m_authentication_type),
+		m_eapol_key_state,
+		eapol_key_state_string_c::get_eapol_key_state_string(m_eapol_key_state)));
+
 	eap_status_e status = eap_status_not_supported;
 
 	if (packet_length < eapol_header_wr_c::get_header_length()
@@ -5228,8 +5287,6 @@
 
 //--------------------------------------------------
 
-#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
 EAP_FUNC_EXPORT bool eapol_key_state_c::get_is_associated()
 {
 	EAP_TRACE_DEBUG(
@@ -5242,23 +5299,19 @@
 	return m_is_associated;
 }
 
-#endif //#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
 //--------------------------------------------------
 
 EAP_FUNC_EXPORT void eapol_key_state_c::set_eapol_key_state(const eapol_key_state_e state)
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
-	eapol_key_state_string_c state_string;
-
 	EAP_TRACE_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
 		(EAPL("EAPOL_KEY: %s: eapol_key_state_c::set_eapol_key_state(): set_eapol_key_state() from %s to %s\n"),
 		(m_is_client == true ? "client": "server"),
-		state_string.get_eapol_key_state_string(m_eapol_key_state),
-		state_string.get_eapol_key_state_string(state)));
+		eapol_key_state_string_c::get_eapol_key_state_string(m_eapol_key_state),
+		eapol_key_state_string_c::get_eapol_key_state_string(state)));
 
 	m_eapol_key_state = state;
 
@@ -5397,7 +5450,6 @@
 EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::init_handshake_timeout(
 	const u32_t timeout)
 {
-	eapol_key_state_string_c state_string;
 	EAP_TRACE_DEBUG(
 		m_am_tools, 
 		TRACE_FLAGS_DEFAULT, 
@@ -5405,9 +5457,9 @@
 		 (m_is_client == true) ? "client": "server",
 		 this,
 		 get_eapol_key_state(),
-		 state_string.get_eapol_key_state_string(get_eapol_key_state()),
+		 eapol_key_state_string_c::get_eapol_key_state_string(get_eapol_key_state()),
 		 m_authentication_type,
-		 state_string.get_eapol_key_authentication_type_string(m_authentication_type)));
+		 eapol_key_state_string_c::get_eapol_key_authentication_type_string(m_authentication_type)));
 
 	if (m_handshake_timeout_set == true)
 	{
@@ -5475,7 +5527,6 @@
 eap_status_e eapol_key_state_c::init_reassociate_timeout(
 	const u32_t timeout)
 {
-	eapol_key_state_string_c state_string;
 	EAP_TRACE_DEBUG(
 		m_am_tools, 
 		TRACE_FLAGS_DEFAULT, 
@@ -5483,9 +5534,9 @@
 		 (m_is_client == true) ? "client": "server",
 		 this,
 		 get_eapol_key_state(),
-		 state_string.get_eapol_key_state_string(get_eapol_key_state()),
+		 eapol_key_state_string_c::get_eapol_key_state_string(get_eapol_key_state()),
 		 m_authentication_type,
-		 state_string.get_eapol_key_authentication_type_string(m_authentication_type)));
+		 eapol_key_state_string_c::get_eapol_key_authentication_type_string(m_authentication_type)));
 
 	eap_status_e status = m_key_state_partner->set_timer(
 		this,
@@ -5540,7 +5591,6 @@
 
 eap_status_e eapol_key_state_c::init_4_way_handshake_start_timeout()
 {
-	eapol_key_state_string_c state_string;
 	EAP_TRACE_DEBUG(
 		m_am_tools, 
 		TRACE_FLAGS_DEFAULT, 
@@ -5548,9 +5598,9 @@
 		 (m_is_client == true) ? "client": "server",
 		 this,
 		 get_eapol_key_state(),
-		 state_string.get_eapol_key_state_string(get_eapol_key_state()),
+		 eapol_key_state_string_c::get_eapol_key_state_string(get_eapol_key_state()),
 		 m_authentication_type,
-		 state_string.get_eapol_key_authentication_type_string(m_authentication_type)));
+		 eapol_key_state_string_c::get_eapol_key_authentication_type_string(m_authentication_type)));
 
 	eap_status_e status = m_key_state_partner->set_timer(
 		this,
@@ -5605,7 +5655,6 @@
 
 EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::cancel_authentication_session()
 {
-	eapol_key_state_string_c state_string;
 	EAP_TRACE_DEBUG(
 		m_am_tools, 
 		TRACE_FLAGS_DEFAULT, 
@@ -5613,9 +5662,9 @@
 		 (m_is_client == true) ? "client": "server",
 		 this,
 		 get_eapol_key_state(),
-		 state_string.get_eapol_key_state_string(get_eapol_key_state()),
+		 eapol_key_state_string_c::get_eapol_key_state_string(get_eapol_key_state()),
 		 m_authentication_type,
-		 state_string.get_eapol_key_authentication_type_string(m_authentication_type)));
+		 eapol_key_state_string_c::get_eapol_key_authentication_type_string(m_authentication_type)));
 
 	eap_status_e status(eap_status_process_general_error);
 
@@ -5630,7 +5679,6 @@
 
 EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::init_pmksa_caching_timeout()
 {
-	eapol_key_state_string_c state_string;
 	EAP_TRACE_DEBUG(
 		m_am_tools, 
 		TRACE_FLAGS_DEFAULT, 
@@ -5638,13 +5686,12 @@
 		 (m_is_client == true) ? "client": "server",
 		 this,
 		 get_eapol_key_state(),
-		 state_string.get_eapol_key_state_string(get_eapol_key_state()),
+		 eapol_key_state_string_c::get_eapol_key_state_string(get_eapol_key_state()),
 		 m_authentication_type,
-		 state_string.get_eapol_key_authentication_type_string(m_authentication_type)));
+		 eapol_key_state_string_c::get_eapol_key_authentication_type_string(m_authentication_type)));
 
 	eap_status_e status(eap_status_process_general_error);
 
-#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
 	{
 		m_is_associated = false;
 
@@ -5655,7 +5702,6 @@
 			 (m_is_client == true) ? "client": "server",
 			 (m_is_associated == true) ? "true": "false"));
 	}
-#endif //#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
 
 	if ((m_authentication_type == eapol_key_authentication_type_RSNA_EAP
 #if defined(EAP_USE_WPXM)
@@ -5890,7 +5936,6 @@
 EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::init_group_key_update_timeout(
 	const u32_t timeout)
 {
-	eapol_key_state_string_c state_string;
 	EAP_TRACE_DEBUG(
 		m_am_tools, 
 		TRACE_FLAGS_DEFAULT, 
@@ -5898,9 +5943,9 @@
 		 (m_is_client == true) ? "client": "server",
 		 this,
 		 get_eapol_key_state(),
-		 state_string.get_eapol_key_state_string(get_eapol_key_state()),
+		 eapol_key_state_string_c::get_eapol_key_state_string(get_eapol_key_state()),
 		 m_authentication_type,
-		 state_string.get_eapol_key_authentication_type_string(m_authentication_type)));
+		 eapol_key_state_string_c::get_eapol_key_authentication_type_string(m_authentication_type)));
 
 	eap_status_e status = m_key_state_partner->set_timer(
 		this,
@@ -5955,7 +6000,6 @@
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
-	eapol_key_state_string_c state_string;
 	EAP_TRACE_DEBUG(
 		m_am_tools, 
 		TRACE_FLAGS_DEFAULT, 
@@ -5963,9 +6007,9 @@
 		 (m_is_client == true) ? "client": "server",
 		 this,
 		 get_eapol_key_state(),
-		 state_string.get_eapol_key_state_string(get_eapol_key_state()),
+		 eapol_key_state_string_c::get_eapol_key_state_string(get_eapol_key_state()),
 		 m_authentication_type,
-		 state_string.get_eapol_key_authentication_type_string(m_authentication_type)));
+		 eapol_key_state_string_c::get_eapol_key_authentication_type_string(m_authentication_type)));
 
 	eap_status_e status = eap_status_ok;
 
@@ -6292,7 +6336,9 @@
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_process_general_error);
 	}
-	else if (m_authentication_type != eapol_key_authentication_type_802_1X)
+	else if (m_authentication_type != eapol_key_authentication_type_dynamic_WEP
+		&& m_authentication_type != eapol_key_authentication_type_EAP_authentication_no_encryption
+	)
 	{
 		// Truncate PMK only in WPA and RSN case
 		if (pmk_key_length > EAPOL_RSNA_PMK_LENGTH_BYTES)
@@ -6354,6 +6400,31 @@
 //--------------------------------------------------
 
 //
+EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::check_padding(
+		const u8_t * const field,
+		const u32_t field_length)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	eap_status_e status = eap_status_ok;
+
+	if (field == 0
+		|| field_length == 0ul
+		|| field[0] != eapol_RSNA_key_data_type_RSN_key_data
+		|| verify_field_is_zero(
+			field+1,
+			field_length-1) != eap_status_ok)
+	{
+		status = eap_status_illegal_padding;
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
 eap_status_e eapol_key_state_c::packet_data_session_key(
 	eap_variable_data_c * const key, ///< Here is the key.
 	const eapol_key_type_e key_type, ///< This the type of the key.
@@ -6428,14 +6499,35 @@
 			m_am_tools, 
 			TRACE_FLAGS_DEFAULT, 
 			(EAPL("EAPOL_KEY: %s: eapol_key_state_c::allow_4_way_handshake(): ")
-			 EAPL("Allow 4-Way Handshake, m_authentication_type=%d\n"),
+			 EAPL("Allow 4-Way Handshake, m_authentication_type=%d=%s\n"),
 			(m_is_client == true ? "client": "server"),
-			m_authentication_type));
+			m_authentication_type,
+			eapol_key_state_string_c::get_eapol_key_authentication_type_string(m_authentication_type)));
 
 		m_eapol_key_handshake_type = eapol_key_handshake_type_4_way_handshake;
 		m_eapol_key_state = eapol_key_state_wait_4_way_handshake_message_1;
 	}
-	else if (m_authentication_type == eapol_key_authentication_type_802_1X)
+	else if (m_authentication_type == eapol_key_authentication_type_dynamic_WEP)
+	{
+		// No 4-Way Handshake needed.
+		// AP will send unicast and broad cast keys in EAPOL key RC4 messages.
+		EAP_TRACE_DEBUG(
+			m_am_tools, 
+			TRACE_FLAGS_DEFAULT, 
+			(EAPL("EAPOL_KEY: %s: eapol_key_state_c::allow_4_way_handshake(): ")
+			 EAPL("Dynamic WEP, m_authentication_type=%d=%s\n"),
+			(m_is_client == true ? "client": "server"),
+			m_authentication_type,
+			eapol_key_state_string_c::get_eapol_key_authentication_type_string(m_authentication_type)));
+
+		m_eapol_key_handshake_type = eapol_key_handshake_type_dynamic_WEP;
+		m_eapol_key_state = eapol_key_state_wait_rc4_key_message;
+
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+	}
+	else if (m_authentication_type == eapol_key_authentication_type_EAP_authentication_no_encryption
+			)
 	{
 		// No 4-Way Handshake needed.
 		// AP will send unicast and broad cast keys in EAPOL key messages.
@@ -6447,8 +6539,34 @@
 			(m_is_client == true ? "client": "server"),
 			m_authentication_type));
 
-		m_eapol_key_handshake_type = eapol_key_handshake_type_dynamic_WEP;
-		m_eapol_key_state = eapol_key_state_wait_rc4_key_message;
+		m_eapol_key_handshake_type = eapol_key_handshake_type_EAP_authentication_no_encryption;
+		m_eapol_key_state = eapol_key_state_802_11i_authentication_finished_successfull;
+
+		{
+			// This is notification to eapol_core_c object.
+			// EAP authentication without encryption finished successfully.
+			eap_state_notification_c * notification = new eap_state_notification_c(
+				m_am_tools,
+				&m_send_network_id,
+				m_is_client,
+				eap_state_notification_generic,
+				eap_protocol_layer_eapol_key,
+				eapol_key_authentication_type_EAP_authentication_no_encryption,
+				get_eapol_key_state(),
+				eapol_key_state_802_11i_authentication_finished_successfull,
+				0ul,
+				false);
+			if (notification == 0)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+			}
+			m_key_state_partner->state_notification(notification);
+
+			delete notification;
+		}
+
+		cancel_handshake_timeout();
 
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
@@ -6460,26 +6578,15 @@
 			m_am_tools, 
 			TRACE_FLAGS_DEFAULT, 
 			(EAPL("EAPOL_KEY: %s: eapol_key_state_c::allow_4_way_handshake(): ")
-			 EAPL("No 4-Way Handshake, m_authentication_type=%d\n"),
+			 EAPL("No 4-Way Handshake, m_authentication_type=%d=%s\n"),
 			(m_is_client == true ? "client": "server"),
-			m_authentication_type));
+			m_authentication_type,
+			eapol_key_state_string_c::get_eapol_key_authentication_type_string(m_authentication_type)));
 
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
 	}
 	
-#if !defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-	// Creates SNonce. This is done here in early phase of authentication.
-	// This will reduce the CPU load when time critical first message
-	// of 4-Way handshake is processed.
-	status = create_nonce(&m_SNonce, EAPOL_RSNA_NONCE_LENGTH_BYTES);
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-#endif //#if !defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
 	status = init_handshake_timeout(m_handshake_timeout);
 	if (status != eap_status_ok)
 	{
@@ -6519,17 +6626,16 @@
 		(EAPL("EAPOL_KEY: %s: eapol_key_state_c::start_group_key_handshake()\n"),
 		(m_is_client == true ? "client": "server")));
 
-	if (m_eapol_key_handshake_type != eapol_key_handshake_type_none
+	if (m_eapol_key_handshake_type != eapol_key_handshake_type_authenticated
 		&& m_eapol_key_handshake_type != eapol_key_handshake_type_group_key_handshake
 		&& m_eapol_key_handshake_type != eapol_key_handshake_type_4_way_handshake)
 	{
-		eapol_key_state_string_c state_string;
 		EAP_TRACE_ERROR(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
 			(EAPL("WARNING: EAPOL_KEY: %s: start_group_key_handshake(): wrong handshake type %s\n"),
 			(m_is_client == true ? "client": "server"),
-			state_string.get_eapol_key_handshake_type_string(m_eapol_key_handshake_type)));
+			eapol_key_state_string_c::get_eapol_key_handshake_type_string(m_eapol_key_handshake_type)));
 
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_wrong_eap_type_state);
@@ -6538,13 +6644,12 @@
 	if (get_eapol_key_state() != eapol_key_state_4_way_handshake_successfull
 		&& get_eapol_key_state() != eapol_key_state_group_key_handshake_successfull)
 	{
-		eapol_key_state_string_c state_string;
 		EAP_TRACE_ERROR(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
 			(EAPL("WARNING: EAPOL_KEY: %s: start_group_key_handshake(): wrong state %s\n"),
 			(m_is_client == true ? "client": "server"),
-			state_string.get_eapol_key_state_string(get_eapol_key_state())));
+			eapol_key_state_string_c::get_eapol_key_state_string(get_eapol_key_state())));
 
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_wrong_eap_type_state);
@@ -7012,12 +7117,11 @@
 	else
 	{
 		// Unknown message received and dropped quietly.
-		eapol_key_state_string_c state_string;
 		EAP_TRACE_ERROR(
 			m_am_tools,
 			TRACE_FLAGS_EAPOL_KEY_DATA_ERROR,
 			(EAPL("WARNING: EAPOL_KEY: Handshake in NOT supported in m_eapol_key_handshake_type %s.\n"),
-			state_string.get_eapol_key_handshake_type_string(m_eapol_key_handshake_type)));
+			eapol_key_state_string_c::get_eapol_key_handshake_type_string(m_eapol_key_handshake_type)));
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_process_illegal_packet_error);
 	}
--- a/eapol/eapol_framework/eapol_common/core/eapol_key_state_server.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/core/eapol_key_state_server.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 46 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -356,8 +356,8 @@
 
 	u32_t extra_encryption_padding_and_block(0ul);
 
-	if (m_eapol_pairwise_cipher == eapol_RSNA_key_header_c::eapol_RSNA_cipher_CCMP
-		|| m_eapol_group_cipher == eapol_RSNA_key_header_c::eapol_RSNA_cipher_CCMP)
+	//if (m_eapol_pairwise_cipher == eapol_RSNA_key_header_c::eapol_RSNA_cipher_CCMP
+	//	|| m_eapol_group_cipher == eapol_RSNA_key_header_c::eapol_RSNA_cipher_CCMP)
 	{
 		extra_encryption_padding_and_block = 2ul * EAP_CRYPTO_AES_WRAP_BLOCK_SIZE;
 	}
@@ -978,11 +978,14 @@
 			m_am_tools, 
 			TRACE_FLAGS_DEFAULT, 
 			(EAPL("EAPOL_KEY: %s: eapol_key_state_c::start_4_way_handshake(): ")
-			 EAPL("Start 4-Way Handshake, m_authentication_type=%d\n"),
+			 EAPL("Start 4-Way Handshake, m_authentication_type=%d=%s\n"),
 			 (m_is_client == true ? "client": "server"),
-			 m_authentication_type));
+			 m_authentication_type,
+			 eapol_key_state_string_c::get_eapol_key_authentication_type_string(m_authentication_type)));
 	}
-	else if (m_authentication_type == eapol_key_authentication_type_802_1X)
+	else if (m_authentication_type == eapol_key_authentication_type_dynamic_WEP
+			|| m_authentication_type == eapol_key_authentication_type_EAP_authentication_no_encryption
+			)
 	{
 		// No 4-Way Handshake needed.
 		// AP will send unicast and broad cast keys in EAPOL key messages.
@@ -990,9 +993,10 @@
 			m_am_tools, 
 			TRACE_FLAGS_DEFAULT, 
 			(EAPL("EAPOL_KEY: %s: eapol_key_state_c::start_4_way_handshake(): ")
-			 EAPL("Dynamic WEP, m_authentication_type=%d\n"),
+			 EAPL("Dynamic WEP, m_authentication_type=%d=%s\n"),
 			(m_is_client == true ? "client": "server"),
-			m_authentication_type));
+			m_authentication_type,
+			eapol_key_state_string_c::get_eapol_key_authentication_type_string(m_authentication_type)));
 
 		m_eapol_key_handshake_type = eapol_key_handshake_type_dynamic_WEP;
 
@@ -1008,22 +1012,25 @@
 			m_am_tools, 
 			TRACE_FLAGS_DEFAULT, 
 			(EAPL("EAPOL_KEY: %s: eapol_key_state_c::start_4_way_handshake(): ")
-			 EAPL("No 4-Way Handshake, m_authentication_type=%d\n"),
+			 EAPL("No 4-Way Handshake, m_authentication_type=%d=%s\n"),
 			(m_is_client == true ? "client": "server"),
-			m_authentication_type));
+			m_authentication_type,
+			eapol_key_state_string_c::get_eapol_key_authentication_type_string(m_authentication_type)));
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
 	}
 
 	if (m_eapol_key_handshake_type != eapol_key_handshake_type_none
+		&& m_eapol_key_handshake_type != eapol_key_handshake_type_authenticated
 		&& m_eapol_key_handshake_type != eapol_key_handshake_type_4_way_handshake)
 	{
 		eapol_key_state_string_c state_string;
 		EAP_TRACE_ERROR(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
-			(EAPL("WARNING: EAPOL_KEY: %s: start_4_way_handshake(): wrong handshake type %s\n"),
+			(EAPL("WARNING: EAPOL_KEY: %s: start_4_way_handshake(): wrong handshake type m_eapol_key_handshake_type=%d=%s\n"),
 			(m_is_client == true ? "client": "server"),
+			m_eapol_key_handshake_type,
 			state_string.get_eapol_key_handshake_type_string(m_eapol_key_handshake_type)));
 
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -1835,7 +1842,7 @@
 
 	set_eapol_key_state(eapol_key_state_4_way_handshake_successfull);
 
-	m_eapol_key_handshake_type = eapol_key_handshake_type_none;
+	m_eapol_key_handshake_type = eapol_key_handshake_type_authenticated;
 
 	cancel_retransmission();
 
@@ -2469,7 +2476,7 @@
 
 	set_eapol_key_state(eapol_key_state_group_key_handshake_successfull);
 
-	m_eapol_key_handshake_type = eapol_key_handshake_type_none;
+	m_eapol_key_handshake_type = eapol_key_handshake_type_authenticated;
 
 	cancel_retransmission();
 	cancel_handshake_timeout();
--- a/eapol/eapol_framework/eapol_common/core/eapol_key_state_string.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/core/eapol_key_state_string.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -45,7 +45,7 @@
 //--------------------------------------------------
 
 EAP_FUNC_EXPORT eap_const_string eapol_key_state_string_c::get_eapol_key_state_string(
-	const eapol_key_state_e state) const
+	const eapol_key_state_e state)
 {
 #if defined(USE_EAP_TRACE_STRINGS)
 	EAP_IF_RETURN_STRING(state, eapol_key_state_none)
@@ -87,7 +87,7 @@
 //--------------------------------------------------
 
 EAP_FUNC_EXPORT eap_const_string eapol_key_state_string_c::get_eapol_key_handshake_type_string(
-	const eapol_key_handshake_type_e handshake_type) const
+	const eapol_key_handshake_type_e handshake_type)
 {
 
 #if defined(USE_EAP_TRACE_STRINGS)
@@ -103,6 +103,7 @@
 #if defined(USE_WAPI_CORE)
 	else EAP_IF_RETURN_STRING(handshake_type, eapol_key_handshake_type_wai_handshake)
 #endif //#if defined(USE_WAPI_CORE)
+	else EAP_IF_RETURN_STRING(handshake_type, eapol_key_handshake_type_authenticated)
 	else
 #endif // #if defined(USE_EAP_TRACE_STRINGS)
 	{
@@ -115,7 +116,7 @@
 //--------------------------------------------------
 
 EAP_FUNC_EXPORT eap_const_string eapol_key_state_string_c::get_eapol_key_authentication_type_string(
-	const eapol_key_authentication_type_e authentication_type) const
+	const eapol_key_authentication_type_e authentication_type)
 {
 
 #if defined(USE_EAP_TRACE_STRINGS)
@@ -124,15 +125,17 @@
 	else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_RSNA_PSK)
 	else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_WPA_EAP)
 	else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_WPA_PSK)
-	else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_802_1X)
+	else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_dynamic_WEP)
 #if defined(EAP_USE_WPXM)
 	else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_WPXM)
 #endif //#if defined(EAP_USE_WPXM)
-	else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_WFA_SC)
+	else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_WPS)
 #if defined(USE_WAPI_CORE)
 	else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_WAI_PSK)
 	else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_WAI_certificate)
 #endif //#if defined(USE_WAPI_CORE)
+	else EAP_IF_RETURN_STRING(authentication_type, eapol_key_authentication_type_EAP_authentication_no_encryption)
+
 	else
 #endif // #if defined(USE_EAP_TRACE_STRINGS)
 	{
@@ -144,8 +147,8 @@
 
 //--------------------------------------------------
 
-eap_const_string eapol_key_state_string_c::get_eapol_key_descriptor_type_string(
-	const eapol_key_descriptor_type_e key_descriptor_type) const
+EAP_FUNC_EXPORT eap_const_string eapol_key_state_string_c::get_eapol_key_descriptor_type_string(
+	const eapol_key_descriptor_type_e key_descriptor_type)
 {
 
 #if defined(USE_EAP_TRACE_STRINGS)
--- a/eapol/eapol_framework/eapol_common/core/eapol_message_wlan_authentication.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/core/eapol_message_wlan_authentication.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 46.1.2 %
+* %version: 60 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -82,7 +82,7 @@
 	, m_MTU(0ul)
 	, m_trailer_length(0ul)
 	, m_error_code(wlan_eap_if_send_status_ok)
-	, m_error_function(eapol_tlv_message_type_function_none)
+	, m_error_function(eap_tlv_message_type_function_none)
 	, m_use_asyncronous_test(false)
 	, m_is_valid(true)
 {
@@ -109,8 +109,7 @@
 	m_wauth = eapol_wlan_authentication_c::new_eapol_wlan_authentication(
 		m_am_tools,
 		this,
-		true,
-		this);
+		true);
 	if (m_wauth != 0
 		&& m_wauth->get_is_valid() == true)
 	{
@@ -183,7 +182,7 @@
 	
 	EAP_TRACE_DEBUG(
 		m_am_tools, 
-		TRACE_FLAGS_DEFAULT, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
 		(EAPL("TIMER: [0x%08x]->eapol_message_wlan_authentication_c::timer_expired")
 		 EAPL("(id 0x%02x, data 0x%08x).\n"),
 		 this, id, data));
@@ -194,7 +193,7 @@
 	{
 		EAP_TRACE_DEBUG(
 			m_am_tools, 
-			TRACE_FLAGS_DEFAULT, 
+			EAP_TRACE_FLAGS_MESSAGE_DATA, 
 			(EAPL("TIMER: [0x%08x]->eapol_message_wlan_authentication_c::timer_expired: EAPOL_MESSAGE_TIMER_PROCESS_DATA_ID")
 			 EAPL("(id 0x%02x, data 0x%08x).\n"),
 			 this, id, data));
@@ -211,7 +210,7 @@
 	{
 		EAP_TRACE_DEBUG(
 			m_am_tools, 
-			TRACE_FLAGS_DEFAULT, 
+			EAP_TRACE_FLAGS_MESSAGE_DATA, 
 			(EAPL("TIMER: [0x%08x]->eapol_message_wlan_authentication_c::timer_expired: EAPOL_MESSAGE_TIMER_SEND_DATA_ID")
 			 EAPL("(id 0x%02x, data 0x%08x).\n"),
 			 this, id, data));
@@ -335,6 +334,9 @@
 	}
 	else
 	{
+
+#if !defined(EAPOL_SKIP_ETHERNET_HEADER)
+
 		// Always we need at least the Ethernet header.
 		if (sent_packet->get_data_length()
 			< eapol_ethernet_header_wr_c::get_header_length())
@@ -349,6 +351,9 @@
 				 eapol_ethernet_header_wr_c::get_header_length()));
 			return EAP_STATUS_RETURN(m_am_tools, eap_status_process_general_error);
 		}
+
+#endif //#if !defined(EAPOL_SKIP_ETHERNET_HEADER)
+
 	}
 	
 	eapol_ethernet_header_wr_c eth(
@@ -372,7 +377,7 @@
 			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
 		}
 
-		status = message.add_parameter_data(eapol_tlv_message_type_function_packet_send);
+		status = message.add_parameter_data(eap_tlv_message_type_function_packet_send);
 		if (status != eap_status_ok)
 		{
 			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -439,7 +444,7 @@
 			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
 		}
 
-		status = message.add_parameter_data(eapol_tlv_message_type_function_associate);
+		status = message.add_parameter_data(eap_tlv_message_type_function_associate);
 		if (status != eap_status_ok)
 		{
 			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -447,7 +452,7 @@
 		}
 
 		status = message.add_parameter_data(
-			eapol_tlv_message_type_eapol_key_802_11_authentication_mode,
+			eap_tlv_message_type_eapol_key_802_11_authentication_mode,
 			static_cast<u32_t>(authentication_mode));
 		if (status != eap_status_ok)
 		{
@@ -485,7 +490,7 @@
 			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
 		}
 
-		status = message.add_parameter_data(eapol_tlv_message_type_function_disassociate);
+		status = message.add_parameter_data(eap_tlv_message_type_function_disassociate);
 		if (status != eap_status_ok)
 		{
 			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -540,14 +545,14 @@
 	
 	EAP_TRACE_DEBUG(
 		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
 		(EAPL("test_eapol_c::packet_data_session_key(): key_type 0x%02x, key_index %d\n"),
 		 key->get_key_type(),
 		 key->get_key_index()));
 	
 	EAP_TRACE_DATA_DEBUG(
 		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
 		(EAPL("test_eapol_c::packet_data_session_key"), 
 		 key->get_key()->get_data(key->get_key()->get_data_length()),
 		 key->get_key()->get_data_length()));
@@ -562,7 +567,7 @@
 			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
 		}
 
-		status = message.add_parameter_data(eapol_tlv_message_type_function_packet_data_session_key);
+		status = message.add_parameter_data(eap_tlv_message_type_function_packet_data_session_key);
 		if (status != eap_status_ok)
 		{
 			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -615,7 +620,7 @@
 			return;
 		}
 
-		status = message.add_parameter_data(eapol_tlv_message_type_function_state_notification);
+		status = message.add_parameter_data(eap_tlv_message_type_function_state_notification);
 		if (status != eap_status_ok)
 		{
 			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -673,7 +678,7 @@
 	
 	EAP_TRACE_DATA_DEBUG(
 		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
+		EAP_TRACE_FLAGS_MESSAGE_DATA,
 		(EAPL("eapol_message_wlan_authentication_c::reassociate"), 
 		 PMKID->get_data(PMKID->get_data_length()),
 		 PMKID->get_data_length()));
@@ -688,7 +693,7 @@
 			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
 		}
 
-		status = message.add_parameter_data(eapol_tlv_message_type_function_reassociate);
+		status = message.add_parameter_data(eap_tlv_message_type_function_reassociate);
 		if (status != eap_status_ok)
 		{
 			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -703,7 +708,7 @@
 		}
 
 		status = message.add_parameter_data(
-			eapol_tlv_message_type_eapol_key_authentication_type,
+			eap_tlv_message_type_eapol_key_authentication_type,
 			static_cast<u32_t>(authentication_type));
 		if (status != eap_status_ok)
 		{
@@ -732,33 +737,9 @@
 
 //--------------------------------------------------
 
-EAP_FUNC_EXPORT eap_status_e eapol_message_wlan_authentication_c::get_wlan_database_reference_values(
-	eap_variable_data_c * const reference) const
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	if (m_wlan_database_reference.get_is_valid_data() == true
-		&& m_wlan_database_reference.get_data_length() > 0ul)
-	{
-
-		return reference->set_copy_of_buffer(&m_wlan_database_reference);
-	}
-	else
-	{
-		EAP_TRACE_ERROR(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("ERROR: get_header_offset(): no completed parameters.\n")));
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT)
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-	}
-}
-
-//--------------------------------------------------
-
 EAP_FUNC_EXPORT eap_status_e eapol_message_wlan_authentication_c::send_error_message(
 	const eap_status_e function_status,
-	const eapol_tlv_message_type_function_e function)
+	const eap_tlv_message_type_function_e function)
 {
 	wlan_eap_if_send_status_e error_code = wlan_eap_if_send_status_conversion_c::convert(function_status);
 
@@ -775,7 +756,7 @@
 		}
 
 		status = message.add_parameter_data(
-			eapol_tlv_message_type_error,
+			eap_tlv_message_type_error,
 			static_cast<u32_t>(error_code));
 		if (status != eap_status_ok)
 		{
@@ -927,7 +908,7 @@
 			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
 		}
 
-		status = message.add_parameter_data(eapol_tlv_message_type_function_new_protected_setup_credentials);
+		status = message.add_parameter_data(eap_tlv_message_type_function_new_protected_setup_credentials);
 		if (status != eap_status_ok)
 		{
 			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -957,67 +938,160 @@
 
 //--------------------------------------------------
 
-EAP_FUNC_EXPORT eap_status_e eapol_message_wlan_authentication_c::process_message_type_error(
-	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+EAP_FUNC_EXPORT eap_status_e eapol_message_wlan_authentication_c::complete_check_pmksa_cache(
+	EAP_TEMPLATE_CONST eap_array_c<eap_am_network_id_c> * const bssid_sta_receive_network_ids)
 {
-	eap_status_e status(eap_status_ok);
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eapol_message_wlan_authentication_c::complete_check_pmksa_cache()\n")));
+
+	eap_status_e status(eap_status_process_general_error);
+
+	// Creates message data composed of Attribute-Value Pairs.
+	eapol_handle_tlv_message_data_c message(m_am_tools);
+
+	if (message.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	status = message.add_parameter_data(eap_tlv_message_type_function_complete_check_pmksa_cache);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
 
 	{
-		// Error payload is the first in this case.
-		const eap_tlv_header_c * const error_header = parameters->get_object(eapol_message_payload_index_function);
-
-		if (error_header == 0
-			|| error_header->get_type() != eapol_tlv_message_type_error)
+		u32_t bssid_sta_receive_network_ids_size(0ul);
+		u32_t ind(0ul);
+
+		for (ind = 0ul; ind < bssid_sta_receive_network_ids->get_object_count(); ++ind)
 		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		u32_t value(0ul);
-
-		status = message_data.get_parameter_data(error_header, &value);
+			const eap_am_network_id_c * const network_id = bssid_sta_receive_network_ids->get_object(ind);
+			if (network_id == 0)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+			}
+
+			const u32_t size_of_network_id = 
+				eap_tlv_header_c::get_header_length()
+				+ message.get_payload_size(network_id);
+
+			bssid_sta_receive_network_ids_size += size_of_network_id;
+		} // for()
+
+		eap_status_e status = message.add_structured_parameter_header(
+			eap_tlv_message_type_array,
+			bssid_sta_receive_network_ids_size);
 		if (status != eap_status_ok)
 		{
 			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 			return EAP_STATUS_RETURN(m_am_tools, status);
 		}
 
-		m_error_code = static_cast<wlan_eap_if_send_status_e>(value);
+		for (ind = 0ul; ind < bssid_sta_receive_network_ids->get_object_count(); ++ind)
+		{
+			status = message.add_parameter_data(
+				bssid_sta_receive_network_ids->get_object(ind));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+		} // for()
 	}
 
+	status = send_message(&message);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eapol_message_wlan_authentication_c::complete_disassociation(
+	const eap_am_network_id_c * const receive_network_id) ///< source includes remote address, destination includes local address.
+{
+	eap_status_e status(eap_status_ok);
+
 	{
-		// Fuction payload is the second in this case.
-		const eap_tlv_header_c * const function_header = parameters->get_object(eapol_message_payload_index_first_parameter);
-
-		if (function_header == 0
-			|| function_header->get_type() != eapol_tlv_message_type_function)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
+		// Creates message data composed of Attribute-Value Pairs.
+		eapol_handle_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
 		{
 			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
 		}
 
-		status = message_data.get_parameter_data(function_header, &m_error_function);
+		status = message.add_parameter_data(eap_tlv_message_type_function_complete_disassociation);
 		if (status != eap_status_ok)
 		{
 			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 			return EAP_STATUS_RETURN(m_am_tools, status);
 		}
+
+		status = message.add_parameter_data(receive_network_id);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = send_message(&message);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eapol_message_wlan_authentication_c::process_message_type_error(
+	EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters)
+{
+	eap_status_e status(eap_status_ok);
+
+	eapol_handle_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	eap_status_e code(eap_status_process_general_error);
+
+	// Error payload is the first in this case.
+	status = message_data.read_parameter_data(parameters, eap_message_payload_index_function, eap_tlv_message_type_error, &code);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	m_error_code = wlan_eap_if_send_status_conversion_c::convert(code);
+
+	// Fuction payload is the second in this case.
+	status = message_data.read_parameter_data(parameters, eap_message_payload_index_first_parameter, &m_error_function);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -1056,7 +1130,7 @@
 
 			(void) send_error_message(
 				status,
-				eapol_tlv_message_type_function_none);
+				eap_tlv_message_type_function_none);
 
 			return EAP_STATUS_RETURN(m_am_tools, status);
 		}
@@ -1070,7 +1144,7 @@
 
 			(void) send_error_message(
 				status,
-				eapol_tlv_message_type_function_none);
+				eap_tlv_message_type_function_none);
 
 			return EAP_STATUS_RETURN(m_am_tools, status);
 		}
@@ -1144,7 +1218,7 @@
 
 			(void) send_error_message(
 				status,
-				eapol_tlv_message_type_function_none);
+				eap_tlv_message_type_function_none);
 
 			return wlan_eap_if_send_status_conversion_c::convert(
 				EAP_STATUS_RETURN(m_am_tools, status));
@@ -1157,7 +1231,7 @@
 
 			(void) send_error_message(
 				status,
-				eapol_tlv_message_type_function_none);
+				eap_tlv_message_type_function_none);
 
 			return wlan_eap_if_send_status_conversion_c::convert(
 				EAP_STATUS_RETURN(m_am_tools, status));
@@ -1167,7 +1241,7 @@
 
 		EAP_TRACE_DEBUG(
 			m_am_tools, 
-			TRACE_FLAGS_DEFAULT, 
+			EAP_TRACE_FLAGS_MESSAGE_DATA, 
 			(EAPL("TIMER: eapol_message_wlan_authentication_c::process_data(): sets EAPOL_MESSAGE_TIMER_PROCESS_DATA_ID\n")));
 	
 		status = m_am_tools->am_set_timer(
@@ -1197,7 +1271,7 @@
 
 			(void) send_error_message(
 				status,
-				eapol_tlv_message_type_function_none);
+				eap_tlv_message_type_function_none);
 
 			return wlan_eap_if_send_status_conversion_c::convert(
 				EAP_STATUS_RETURN(m_am_tools, status));
@@ -1210,7 +1284,7 @@
 
 			(void) send_error_message(
 				status,
-				eapol_tlv_message_type_function_none);
+				eap_tlv_message_type_function_none);
 
 			return wlan_eap_if_send_status_conversion_c::convert(
 				EAP_STATUS_RETURN(m_am_tools, status));
@@ -1245,7 +1319,7 @@
 
 		(void) send_error_message(
 			status,
-			eapol_tlv_message_type_function_none);
+			eap_tlv_message_type_function_none);
 
 		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
@@ -1258,15 +1332,15 @@
 
 		(void) send_error_message(
 			status,
-			eapol_tlv_message_type_function_none);
+			eap_tlv_message_type_function_none);
 
 		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
-	const eap_tlv_header_c * const function_header = parameters.get_object(eapol_message_payload_index_function);
+	const eap_tlv_header_c * const function_header = parameters.get_object(eap_message_payload_index_function);
 	if (function_header == 0
-		|| (function_header->get_type() != eapol_tlv_message_type_error
-			&& function_header->get_type() != eapol_tlv_message_type_function))
+		|| (function_header->get_type() != eap_tlv_message_type_error
+			&& function_header->get_type() != eap_tlv_message_type_function))
 	{
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 
@@ -1274,18 +1348,18 @@
 
 		(void) send_error_message(
 			status,
-			eapol_tlv_message_type_function_none);
+			eap_tlv_message_type_function_none);
 
 		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
-	if (function_header->get_type() == eapol_tlv_message_type_error)
+	if (function_header->get_type() == eap_tlv_message_type_error)
 	{
 		status = process_message_type_error(&parameters);
 	}
-	else // function_header->get_type() == eapol_tlv_message_type_function
+	else // function_header->get_type() == eap_tlv_message_type_function
 	{
-		eapol_tlv_message_type_function_e function(eapol_tlv_message_type_function_none);
+		eap_tlv_message_type_function_e function(eap_tlv_message_type_function_none);
 
 		status = message->get_parameter_data(function_header, &function);
 		if (status != eap_status_ok)
@@ -1294,53 +1368,53 @@
 
 			(void) send_error_message(
 				status,
-				eapol_tlv_message_type_function_none);
+				eap_tlv_message_type_function_none);
 
 			return EAP_STATUS_RETURN(m_am_tools, status);
 		}
 
 		switch(function)
 		{
-		case eapol_tlv_message_type_function_check_pmksa_cache:
+		case eap_tlv_message_type_function_check_pmksa_cache:
 			status = check_pmksa_cache(&parameters);
 			break;
-		case eapol_tlv_message_type_function_start_authentication:
+		case eap_tlv_message_type_function_start_authentication:
 			status = start_authentication(&parameters);
 			break;
-		case eapol_tlv_message_type_function_complete_association:
+		case eap_tlv_message_type_function_complete_association:
 			status = complete_association(&parameters);
 			break;
-		case eapol_tlv_message_type_function_disassociation:
+		case eap_tlv_message_type_function_disassociation:
 			status = disassociation(&parameters);
 			break;
-		case eapol_tlv_message_type_function_start_preauthentication:
+		case eap_tlv_message_type_function_start_preauthentication:
 			status = start_preauthentication(&parameters);
 			break;
-		case eapol_tlv_message_type_function_start_reassociation:
+		case eap_tlv_message_type_function_start_reassociation:
 			status = start_reassociation(&parameters);
 			break;
-		case eapol_tlv_message_type_function_complete_reassociation:
+		case eap_tlv_message_type_function_complete_reassociation:
 			status = complete_reassociation(&parameters);
 			break;
-		case eapol_tlv_message_type_function_start_WPXM_reassociation:
+		case eap_tlv_message_type_function_start_WPXM_reassociation:
 			status = start_WPXM_reassociation(&parameters);
 			break;
-		case eapol_tlv_message_type_function_complete_WPXM_reassociation:
+		case eap_tlv_message_type_function_complete_WPXM_reassociation:
 			status = complete_WPXM_reassociation(&parameters);
 			break;
-		case eapol_tlv_message_type_function_packet_process:
+		case eap_tlv_message_type_function_packet_process:
 			status = packet_process(&parameters);
 			break;
-		case eapol_tlv_message_type_function_tkip_mic_failure:
+		case eap_tlv_message_type_function_tkip_mic_failure:
 			status = tkip_mic_failure(&parameters);
 			break;
-		case eapol_tlv_message_type_function_eap_acknowledge:
+		case eap_tlv_message_type_function_eap_acknowledge:
 			status = eap_acknowledge(&parameters);
 			break;
-		case eapol_tlv_message_type_function_update_header_offset:
+		case eap_tlv_message_type_function_update_header_offset:
 			status = update_header_offset(&parameters);
 			break;
-		case eapol_tlv_message_type_function_update_wlan_database_reference_values:
+		case eap_tlv_message_type_function_update_wlan_database_reference_values:
 			status = update_wlan_database_reference_values(&parameters);
 			break;
 		default:
@@ -1380,195 +1454,64 @@
 
 	eap_status_e status(eap_status_ok);
 
-	u32_t parameter_index(eapol_message_payload_index_first_parameter);
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eapol_handle_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	eap_array_c<eap_am_network_id_c> bssid_sta_receive_network_ids(m_am_tools);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &bssid_sta_receive_network_ids);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const array_of_network_ids
-			= parameters->get_object(parameter_index);
-
-		if (array_of_network_ids == 0
-			|| array_of_network_ids->get_type() != eapol_tlv_message_type_array)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c array_data(m_am_tools);
-
-		if (array_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		status = array_data.set_message_data(
-			array_of_network_ids->get_value_length(),
-			array_of_network_ids->get_value(array_of_network_ids->get_value_length()));
-
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		eap_array_c<eap_tlv_header_c> network_ids(m_am_tools);
-
-		status = array_data.parse_message_data(
-			&network_ids);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		for (u32_t ind = 0ul; ind < network_ids.get_object_count(); ++ind)
-		{
-			const eap_tlv_header_c * const header = network_ids.get_object(ind);
-
-			if (header == 0)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-			}
-
-			eap_am_network_id_c * const new_network_id = new eap_am_network_id_c(m_am_tools);
-			if (new_network_id == 0)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-			}
-
-			eap_automatic_variable_c<eap_am_network_id_c> automatic_new_network_id(m_am_tools, new_network_id);
-
-			status = array_data.get_parameter_data(header, new_network_id);
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);
-			}
-
-			automatic_new_network_id.do_not_free_variable();
-
-			status = bssid_sta_receive_network_ids.add_object(
-				new_network_id,
-				true);
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);
-			}
-
-		} // for()
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	++parameter_index;
 
 	eapol_key_authentication_type_e selected_eapol_key_authentication_type(eapol_key_authentication_type_none);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &selected_eapol_key_authentication_type);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const authentication_type
-			= parameters->get_object(parameter_index);
-
-		if (authentication_type == 0
-			|| authentication_type->get_type() != eapol_tlv_message_type_eapol_key_authentication_type)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		u32_t value(0ul);
-
-		status = message_data.get_parameter_data(authentication_type, &value);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		selected_eapol_key_authentication_type = static_cast<eapol_key_authentication_type_e>(value);
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	++parameter_index;
 
 	eapol_RSNA_key_header_c::eapol_RSNA_cipher_e pairwise_key_cipher_suite(eapol_RSNA_key_header_c::eapol_RSNA_cipher_none);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &pairwise_key_cipher_suite);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const authentication_type
-			= parameters->get_object(parameter_index);
-
-		if (authentication_type == 0
-			|| authentication_type->get_type() != eapol_tlv_message_type_RSNA_cipher)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		u32_t value(0ul);
-
-		status = message_data.get_parameter_data(authentication_type, &value);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		pairwise_key_cipher_suite = static_cast<eapol_RSNA_key_header_c::eapol_RSNA_cipher_e>(value);
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	++parameter_index;
 
 	eapol_RSNA_key_header_c::eapol_RSNA_cipher_e group_key_cipher_suite(eapol_RSNA_key_header_c::eapol_RSNA_cipher_none);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &group_key_cipher_suite);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const authentication_type
-			= parameters->get_object(parameter_index);
-
-		if (authentication_type == 0
-			|| authentication_type->get_type() != eapol_tlv_message_type_RSNA_cipher)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		u32_t value(0ul);
-
-		status = message_data.get_parameter_data(authentication_type, &value);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		group_key_cipher_suite = static_cast<eapol_RSNA_key_header_c::eapol_RSNA_cipher_e>(value);
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
 	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -1581,6 +1524,8 @@
 
 	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
+#if 0
+
 	if (status == eap_status_ok
 		|| status == eap_status_not_found)
 	{
@@ -1594,7 +1539,7 @@
 		}
 
 		status = message.add_parameter_data(
-			eapol_tlv_message_type_function_complete_check_pmksa_cache);
+			eap_tlv_message_type_function_complete_check_pmksa_cache);
 		if (status != eap_status_ok)
 		{
 			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -1620,7 +1565,7 @@
 		}
 
 		status = message.add_structured_parameter_header(
-			eapol_tlv_message_type_array,
+			eap_tlv_message_type_array,
 			network_id_parameters_size);
 		if (status != eap_status_ok)
 		{
@@ -1655,6 +1600,8 @@
 		}
 	}
 
+#endif //#if 0
+
 	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -1672,7 +1619,17 @@
 
 	eap_status_e status(eap_status_ok);
 
-	u32_t parameter_index(eapol_message_payload_index_first_parameter);
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eapol_handle_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	eap_variable_data_c SSID(m_am_tools);
 
@@ -1682,183 +1639,73 @@
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
 	}
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &SSID);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const ssid_parameter
-			= parameters->get_object(parameter_index);
-
-		if (ssid_parameter == 0
-			|| ssid_parameter->get_type() != eapol_tlv_message_type_variable_data)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		status = message_data.get_parameter_data(ssid_parameter, &SSID);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	++parameter_index;
 
 	eapol_key_authentication_type_e selected_eapol_key_authentication_type(eapol_key_authentication_type_none);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &selected_eapol_key_authentication_type);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const authentication_type_parameter
-			= parameters->get_object(parameter_index);
-
-		if (authentication_type_parameter == 0
-			|| authentication_type_parameter->get_type() != eapol_tlv_message_type_eapol_key_authentication_type)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		u32_t value(0ul);
-
-		status = message_data.get_parameter_data(authentication_type_parameter, &value);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		selected_eapol_key_authentication_type = static_cast<eapol_key_authentication_type_e>(value);
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	++parameter_index;
 
 	eap_variable_data_c wpa_preshared_key(m_am_tools);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &wpa_preshared_key);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const wpa_preshared_key_parameter
-			= parameters->get_object(parameter_index);
-
-		if (wpa_preshared_key_parameter == 0
-			|| wpa_preshared_key_parameter->get_type() != eapol_tlv_message_type_variable_data)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		status = message_data.get_parameter_data(wpa_preshared_key_parameter, &wpa_preshared_key);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	++parameter_index;
 
 	bool WPA_override_enabled(false);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &WPA_override_enabled);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const WPA_override_enabled_parameter
-			= parameters->get_object(parameter_index);
-
-		if (WPA_override_enabled_parameter == 0
-			|| WPA_override_enabled_parameter->get_type() != eapol_tlv_message_type_boolean)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		u32_t value(0ul);
-
-		status = message_data.get_parameter_data(WPA_override_enabled_parameter, &value);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		WPA_override_enabled = (value == 0) ? false: true;
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
-
-#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	++parameter_index;
 
 	eap_am_network_id_c receive_network_id(m_am_tools);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &receive_network_id);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const receive_network_id_parameter
-			= parameters->get_object(parameter_index);
-
-		if (receive_network_id_parameter == 0
-			|| receive_network_id_parameter->get_type() != eapol_tlv_message_type_network_id)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		status = message_data.get_parameter_data(receive_network_id_parameter, &receive_network_id);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
-#endif //#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
 	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	status = m_wauth->start_authentication(
 		&SSID,
 		selected_eapol_key_authentication_type,
 		&wpa_preshared_key,
-		WPA_override_enabled
-#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-		, &receive_network_id
-#endif //#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
+		WPA_override_enabled,
+		&receive_network_id
 		);
 
 	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -1878,206 +1725,91 @@
 
 	eap_status_e status(eap_status_ok);
 
-	u32_t parameter_index(eapol_message_payload_index_first_parameter);
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eapol_handle_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	eapol_wlan_authentication_state_e association_result(eapol_wlan_authentication_state_none);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &association_result);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const association_result_parameter
-			= parameters->get_object(parameter_index);
-
-		if (association_result_parameter == 0
-			|| association_result_parameter->get_type() != eapol_tlv_message_type_eapol_wlan_authentication_state)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		u32_t value(0ul);
-
-		status = message_data.get_parameter_data(association_result_parameter, &value);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		association_result = static_cast<eapol_wlan_authentication_state_e>(value);
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	++parameter_index;
 
 	eap_am_network_id_c receive_network_id(m_am_tools);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &receive_network_id);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const receive_network_id_parameter
-			= parameters->get_object(parameter_index);
-
-		if (receive_network_id_parameter == 0
-			|| receive_network_id_parameter->get_type() != eapol_tlv_message_type_network_id)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		status = message_data.get_parameter_data(receive_network_id_parameter, &receive_network_id);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
 
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
 	++parameter_index;
 
 	eap_variable_data_c received_WPA_IE(m_am_tools);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &received_WPA_IE);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const received_WPA_IE_parameter
-			= parameters->get_object(parameter_index);
-
-		if (received_WPA_IE_parameter == 0
-			|| received_WPA_IE_parameter->get_type() != eapol_tlv_message_type_variable_data)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		status = message_data.get_parameter_data(received_WPA_IE_parameter, &received_WPA_IE);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	++parameter_index;
 
 	eap_variable_data_c sent_WPA_IE(m_am_tools);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &sent_WPA_IE);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const sent_WPA_IE_parameter
-			= parameters->get_object(parameter_index);
-
-		if (sent_WPA_IE_parameter == 0
-			|| sent_WPA_IE_parameter->get_type() != eapol_tlv_message_type_variable_data)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		status = message_data.get_parameter_data(sent_WPA_IE_parameter, &sent_WPA_IE);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	++parameter_index;
 
 	eapol_RSNA_key_header_c::eapol_RSNA_cipher_e pairwise_key_cipher_suite(eapol_RSNA_key_header_c::eapol_RSNA_cipher_none);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &pairwise_key_cipher_suite);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const pairwise_key_cipher_suite_parameter
-			= parameters->get_object(parameter_index);
-
-		if (pairwise_key_cipher_suite_parameter == 0
-			|| pairwise_key_cipher_suite_parameter->get_type() != eapol_tlv_message_type_RSNA_cipher)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		u32_t value(0ul);
-
-		status = message_data.get_parameter_data(pairwise_key_cipher_suite_parameter, &value);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		pairwise_key_cipher_suite = static_cast<eapol_RSNA_key_header_c::eapol_RSNA_cipher_e>(value);
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
 	++parameter_index;
 
 	eapol_RSNA_key_header_c::eapol_RSNA_cipher_e group_key_cipher_suite(eapol_RSNA_key_header_c::eapol_RSNA_cipher_none);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &group_key_cipher_suite);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const group_key_cipher_suite_parameter
-			= parameters->get_object(parameter_index);
-
-		if (group_key_cipher_suite_parameter == 0
-			|| group_key_cipher_suite_parameter->get_type() != eapol_tlv_message_type_RSNA_cipher)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		u32_t value(0ul);
-
-		status = message_data.get_parameter_data(group_key_cipher_suite_parameter, &value);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		group_key_cipher_suite = static_cast<eapol_RSNA_key_header_c::eapol_RSNA_cipher_e>(value);
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
 	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -2108,35 +1840,25 @@
 
 	eap_status_e status(eap_status_ok);
 
-	u32_t parameter_index(eapol_message_payload_index_first_parameter);
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eapol_handle_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	eap_am_network_id_c receive_network_id(m_am_tools);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &receive_network_id);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const receive_network_id_parameter
-			= parameters->get_object(parameter_index);
-
-		if (receive_network_id_parameter == 0
-			|| receive_network_id_parameter->get_type() != eapol_tlv_message_type_network_id)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		status = message_data.get_parameter_data(receive_network_id_parameter, &receive_network_id);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
 	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -2162,35 +1884,25 @@
 
 	eap_status_e status(eap_status_ok);
 
-	u32_t parameter_index(eapol_message_payload_index_first_parameter);
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eapol_handle_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	eap_am_network_id_c receive_network_id(m_am_tools);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &receive_network_id);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const receive_network_id_parameter
-			= parameters->get_object(parameter_index);
-
-		if (receive_network_id_parameter == 0
-			|| receive_network_id_parameter->get_type() != eapol_tlv_message_type_network_id)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		status = message_data.get_parameter_data(receive_network_id_parameter, &receive_network_id);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
 	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -2216,105 +1928,53 @@
 
 	eap_status_e status(eap_status_ok);
 
-	u32_t parameter_index(eapol_message_payload_index_first_parameter);
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eapol_handle_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	eap_am_network_id_c old_receive_network_id(m_am_tools);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &old_receive_network_id);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const old_receive_network_id_parameter
-			= parameters->get_object(parameter_index);
-
-		if (old_receive_network_id_parameter == 0
-			|| old_receive_network_id_parameter->get_type() != eapol_tlv_message_type_network_id)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		status = message_data.get_parameter_data(old_receive_network_id_parameter, &old_receive_network_id);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
 	++parameter_index;
 
 	eap_am_network_id_c new_receive_network_id(m_am_tools);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &new_receive_network_id);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const new_receive_network_id_parameter
-			= parameters->get_object(parameter_index);
-
-		if (new_receive_network_id_parameter == 0
-			|| new_receive_network_id_parameter->get_type() != eapol_tlv_message_type_network_id)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		status = message_data.get_parameter_data(new_receive_network_id_parameter, &new_receive_network_id);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	++parameter_index;
 
 	eapol_key_authentication_type_e selected_eapol_key_authentication_type(eapol_key_authentication_type_none);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &selected_eapol_key_authentication_type);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const authentication_type
-			= parameters->get_object(parameter_index);
-
-		if (authentication_type == 0
-			|| authentication_type->get_type() != eapol_tlv_message_type_eapol_key_authentication_type)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		u32_t value(0ul);
-
-		status = message_data.get_parameter_data(authentication_type, &value);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		selected_eapol_key_authentication_type = static_cast<eapol_key_authentication_type_e>(value);
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
-
 	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	status = m_wauth->start_reassociation(
@@ -2339,206 +1999,91 @@
 
 	eap_status_e status(eap_status_ok);
 
-	u32_t parameter_index(eapol_message_payload_index_first_parameter);
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eapol_handle_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	eapol_wlan_authentication_state_e association_result(eapol_wlan_authentication_state_none);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &association_result);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const association_result_parameter
-			= parameters->get_object(parameter_index);
-
-		if (association_result_parameter == 0
-			|| association_result_parameter->get_type() != eapol_tlv_message_type_eapol_wlan_authentication_state)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		u32_t value(0ul);
-
-		status = message_data.get_parameter_data(association_result_parameter, &value);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		association_result = static_cast<eapol_wlan_authentication_state_e>(value);
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	++parameter_index;
 
 	eap_am_network_id_c receive_network_id(m_am_tools);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &receive_network_id);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const receive_network_id_parameter
-			= parameters->get_object(parameter_index);
-
-		if (receive_network_id_parameter == 0
-			|| receive_network_id_parameter->get_type() != eapol_tlv_message_type_network_id)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		status = message_data.get_parameter_data(receive_network_id_parameter, &receive_network_id);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
 
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
 	++parameter_index;
 
 	eap_variable_data_c received_WPA_IE(m_am_tools);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &received_WPA_IE);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const received_WPA_IE_parameter
-			= parameters->get_object(parameter_index);
-
-		if (received_WPA_IE_parameter == 0
-			|| received_WPA_IE_parameter->get_type() != eapol_tlv_message_type_variable_data)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		status = message_data.get_parameter_data(received_WPA_IE_parameter, &received_WPA_IE);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	++parameter_index;
 
 	eap_variable_data_c sent_WPA_IE(m_am_tools);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &sent_WPA_IE);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const sent_WPA_IE_parameter
-			= parameters->get_object(parameter_index);
-
-		if (sent_WPA_IE_parameter == 0
-			|| sent_WPA_IE_parameter->get_type() != eapol_tlv_message_type_variable_data)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		status = message_data.get_parameter_data(sent_WPA_IE_parameter, &sent_WPA_IE);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	++parameter_index;
 
 	eapol_RSNA_key_header_c::eapol_RSNA_cipher_e pairwise_key_cipher_suite(eapol_RSNA_key_header_c::eapol_RSNA_cipher_none);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &pairwise_key_cipher_suite);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const pairwise_key_cipher_suite_parameter
-			= parameters->get_object(parameter_index);
-
-		if (pairwise_key_cipher_suite_parameter == 0
-			|| pairwise_key_cipher_suite_parameter->get_type() != eapol_tlv_message_type_RSNA_cipher)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		u32_t value(0ul);
-
-		status = message_data.get_parameter_data(pairwise_key_cipher_suite_parameter, &value);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		pairwise_key_cipher_suite = static_cast<eapol_RSNA_key_header_c::eapol_RSNA_cipher_e>(value);
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
 	++parameter_index;
 
 	eapol_RSNA_key_header_c::eapol_RSNA_cipher_e group_key_cipher_suite(eapol_RSNA_key_header_c::eapol_RSNA_cipher_none);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &group_key_cipher_suite);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const group_key_cipher_suite_parameter
-			= parameters->get_object(parameter_index);
-
-		if (group_key_cipher_suite_parameter == 0
-			|| group_key_cipher_suite_parameter->get_type() != eapol_tlv_message_type_RSNA_cipher)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		u32_t value(0ul);
-
-		status = message_data.get_parameter_data(group_key_cipher_suite_parameter, &value);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		group_key_cipher_suite = static_cast<eapol_RSNA_key_header_c::eapol_RSNA_cipher_e>(value);
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
 	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -2569,35 +2114,25 @@
 
 	eap_status_e status(eap_status_ok);
 
-	u32_t parameter_index(eapol_message_payload_index_first_parameter);
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eapol_handle_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	eap_am_network_id_c old_receive_network_id(m_am_tools);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &old_receive_network_id);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const receive_network_id_parameter
-			= parameters->get_object(parameter_index);
-
-		if (receive_network_id_parameter == 0
-			|| receive_network_id_parameter->get_type() != eapol_tlv_message_type_network_id)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		status = message_data.get_parameter_data(receive_network_id_parameter, &old_receive_network_id);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
 	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -2606,65 +2141,24 @@
 
 	eap_am_network_id_c new_receive_network_id(m_am_tools);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &new_receive_network_id);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const receive_network_id_parameter
-			= parameters->get_object(parameter_index);
-
-		if (receive_network_id_parameter == 0
-			|| receive_network_id_parameter->get_type() != eapol_tlv_message_type_network_id)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		status = message_data.get_parameter_data(receive_network_id_parameter, &new_receive_network_id);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
 	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
-
 	++parameter_index;
 
 	eap_variable_data_c send_reassociation_request_ie(m_am_tools);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &send_reassociation_request_ie);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const send_reassociation_request_ie_parameter
-			= parameters->get_object(parameter_index);
-
-		if (send_reassociation_request_ie_parameter == 0
-			|| send_reassociation_request_ie_parameter->get_type() != eapol_tlv_message_type_variable_data)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		status = message_data.get_parameter_data(send_reassociation_request_ie_parameter, &send_reassociation_request_ie);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
 	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -2675,26 +2169,11 @@
 
 	if (parameters->get_object_count() > parameter_index)
 	{
-		const eap_tlv_header_c * const send_reassociation_request_ie_parameter
-			= parameters->get_object(parameter_index);
-
-		if (send_reassociation_request_ie_parameter != 0
-			&& send_reassociation_request_ie_parameter->get_type() == eapol_tlv_message_type_variable_data)
+		status = message_data.read_parameter_data(parameters, parameter_index, &received_WPA_ie);
+		if (status != eap_status_ok)
 		{
-			eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-			if (message_data.get_is_valid() == false)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-			}
-
-			status = message_data.get_parameter_data(send_reassociation_request_ie_parameter, &received_WPA_ie);
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);
-			}
+			// This is optional parameter.
+			(void) EAP_STATUS_RETURN(m_am_tools, status);
 		}
 	}
 
@@ -2706,26 +2185,11 @@
 
 	if (parameters->get_object_count() > parameter_index)
 	{
-		const eap_tlv_header_c * const send_reassociation_request_ie_parameter
-			= parameters->get_object(parameter_index);
-
-		if (send_reassociation_request_ie_parameter != 0
-			&& send_reassociation_request_ie_parameter->get_type() == eapol_tlv_message_type_variable_data)
+		status = message_data.read_parameter_data(parameters, parameter_index, &sent_WPA_ie);
+		if (status != eap_status_ok)
 		{
-			eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-			if (message_data.get_is_valid() == false)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-			}
-
-			status = message_data.get_parameter_data(send_reassociation_request_ie_parameter, &sent_WPA_ie);
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);
-			}
+			// This is optional parameter.
+			(void) EAP_STATUS_RETURN(m_am_tools, status);
 		}
 	}
 
@@ -2752,7 +2216,7 @@
 			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
 		}
 
-		status = message.add_parameter_data(eapol_tlv_message_type_function_complete_start_WPXM_reassociation);
+		status = message.add_parameter_data(eap_tlv_message_type_function_complete_start_WPXM_reassociation);
 		if (status != eap_status_ok)
 		{
 			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -2798,106 +2262,54 @@
 
 	eap_status_e status(eap_status_ok);
 
-	u32_t parameter_index(eapol_message_payload_index_first_parameter);
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eapol_handle_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	eapol_wlan_authentication_state_e reassociation_result(eapol_wlan_authentication_state_none);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &reassociation_result);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const reassociation_result_parameter
-			= parameters->get_object(parameter_index);
-
-		if (reassociation_result_parameter == 0
-			|| reassociation_result_parameter->get_type() != eapol_tlv_message_type_eapol_wlan_authentication_state)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		u32_t value(0ul);
-
-		status = message_data.get_parameter_data(reassociation_result_parameter, &value);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		reassociation_result = static_cast<eapol_wlan_authentication_state_e>(value);
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	++parameter_index;
 
 	eap_am_network_id_c receive_network_id(m_am_tools);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &receive_network_id);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const receive_network_id_parameter
-			= parameters->get_object(parameter_index);
-
-		if (receive_network_id_parameter == 0
-			|| receive_network_id_parameter->get_type() != eapol_tlv_message_type_network_id)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		status = message_data.get_parameter_data(receive_network_id_parameter, &receive_network_id);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
 
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
 	++parameter_index;
 
 	eap_variable_data_c received_reassociation_ie(m_am_tools);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &received_reassociation_ie);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const received_reassociation_ie_parameter
-			= parameters->get_object(parameter_index);
-
-		if (received_reassociation_ie_parameter == 0
-			|| received_reassociation_ie_parameter->get_type() != eapol_tlv_message_type_variable_data)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		status = message_data.get_parameter_data(received_reassociation_ie_parameter, &received_reassociation_ie);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
-
 	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	status = m_wauth->complete_WPXM_reassociation(
@@ -2922,70 +2334,41 @@
 
 	eap_status_e status(eap_status_ok);
 
-	u32_t parameter_index(eapol_message_payload_index_first_parameter);
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eapol_handle_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	eap_am_network_id_c receive_network_id(m_am_tools);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &receive_network_id);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const receive_network_id_parameter
-			= parameters->get_object(parameter_index);
-
-		if (receive_network_id_parameter == 0
-			|| receive_network_id_parameter->get_type() != eapol_tlv_message_type_network_id)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		status = message_data.get_parameter_data(receive_network_id_parameter, &receive_network_id);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
 
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
 	++parameter_index;
 
 	eap_variable_data_c packet_data_payload(m_am_tools);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &packet_data_payload);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const packet_data_parameter
-			= parameters->get_object(parameter_index);
-
-		if (packet_data_parameter == 0
-			|| packet_data_parameter->get_type() != eapol_tlv_message_type_variable_data)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		status = message_data.get_parameter_data(packet_data_parameter, &packet_data_payload);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
-
 	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	eapol_ethernet_header_wr_c eth(
@@ -3021,106 +2404,51 @@
 
 	eap_status_e status(eap_status_ok);
 
-	u32_t parameter_index(eapol_message_payload_index_first_parameter);
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eapol_handle_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	eap_am_network_id_c receive_network_id(m_am_tools);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &receive_network_id);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const receive_network_id_parameter
-			= parameters->get_object(parameter_index);
-
-		if (receive_network_id_parameter == 0
-			|| receive_network_id_parameter->get_type() != eapol_tlv_message_type_network_id)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		status = message_data.get_parameter_data(receive_network_id_parameter, &receive_network_id);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
 	++parameter_index;
 
 	bool fatal_failure_when_true(false);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &fatal_failure_when_true);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const fatal_failure_when_true_parameter
-			= parameters->get_object(parameter_index);
-
-		if (fatal_failure_when_true_parameter == 0
-			|| fatal_failure_when_true_parameter->get_type() != eapol_tlv_message_type_boolean)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		u32_t value(0ul);
-
-		status = message_data.get_parameter_data(fatal_failure_when_true_parameter, &value);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		fatal_failure_when_true = (value == 0) ? false: true;
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	++parameter_index;
 
 	eapol_RSNA_key_header_c::eapol_tkip_mic_failure_type_e tkip_mic_failure_type(eapol_RSNA_key_header_c::eapol_tkip_mic_failure_type_group_key);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &tkip_mic_failure_type);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const tkip_mic_failure_type_parameter
-			= parameters->get_object(parameter_index);
-
-		if (tkip_mic_failure_type_parameter == 0
-			|| tkip_mic_failure_type_parameter->get_type() != eapol_tlv_message_type_eapol_tkip_mic_failure_type)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		u32_t value(0ul);
-
-		status = message_data.get_parameter_data(tkip_mic_failure_type_parameter, &value);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		tkip_mic_failure_type = static_cast<eapol_RSNA_key_header_c::eapol_tkip_mic_failure_type_e>(value);
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
 	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -3148,35 +2476,25 @@
 
 	eap_status_e status(eap_status_ok);
 
-	u32_t parameter_index(eapol_message_payload_index_first_parameter);
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eapol_handle_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	eap_am_network_id_c receive_network_id(m_am_tools);
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &receive_network_id);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const receive_network_id_parameter
-			= parameters->get_object(parameter_index);
-
-		if (receive_network_id_parameter == 0
-			|| receive_network_id_parameter->get_type() != eapol_tlv_message_type_network_id)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		status = message_data.get_parameter_data(receive_network_id_parameter, &receive_network_id);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
 	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -3202,93 +2520,43 @@
 
 	eap_status_e status(eap_status_ok);
 
-	u32_t parameter_index(eapol_message_payload_index_first_parameter);
-
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eapol_handle_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
 	{
-		const eap_tlv_header_c * const header_offset_value_parameter
-			= parameters->get_object(parameter_index);
-
-		if (header_offset_value_parameter == 0
-			|| header_offset_value_parameter->get_type() != eapol_tlv_message_type_u32_t)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		status = message_data.get_parameter_data(header_offset_value_parameter, &m_header_offset);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
 	}
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &m_header_offset);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	++parameter_index;
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &m_MTU);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const MTU_value_parameter
-			= parameters->get_object(parameter_index);
-
-		if (MTU_value_parameter == 0
-			|| MTU_value_parameter->get_type() != eapol_tlv_message_type_u32_t)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		status = message_data.get_parameter_data(MTU_value_parameter, &m_MTU);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	++parameter_index;
 
+	status = message_data.read_parameter_data(parameters, parameter_index, &m_trailer_length);
+	if (status != eap_status_ok)
 	{
-		const eap_tlv_header_c * const trailer_length_parameter
-			= parameters->get_object(parameter_index);
-
-		if (trailer_length_parameter == 0
-			|| trailer_length_parameter->get_type() != eapol_tlv_message_type_u32_t)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		status = message_data.get_parameter_data(trailer_length_parameter, &m_trailer_length);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
 	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -3308,33 +2576,30 @@
 
 	eap_status_e status(eap_status_ok);
 
-	u32_t parameter_index(eapol_message_payload_index_first_parameter);
-
+	u32_t parameter_index(eap_message_payload_index_first_parameter);
+
+	eapol_handle_tlv_message_data_c message_data(m_am_tools);
+
+	if (message_data.get_is_valid() == false)
 	{
-		const eap_tlv_header_c * const reference_parameter
-			= parameters->get_object(parameter_index);
-
-		if (reference_parameter == 0
-			|| reference_parameter->get_type() != eapol_tlv_message_type_variable_data)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
-		}
-
-		eapol_handle_tlv_message_data_c message_data(m_am_tools);
-
-		if (message_data.get_is_valid() == false)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-
-		status = message_data.get_parameter_data(reference_parameter, &m_wlan_database_reference);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = message_data.read_parameter_data(parameters, parameter_index, &m_wlan_database_reference);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = m_wauth->set_eap_database_reference_values(&m_wlan_database_reference);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
 	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--- a/eapol/eapol_framework/eapol_common/core/eapol_rc4_key_header.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/core/eapol_rc4_key_header.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -308,7 +308,8 @@
 	u8_t * const data = get_header_offset(m_offset_key_index, sizeof(u8_t));
 	if (data != 0)
 	{
-		*data = ((*data) & ~m_flag_mask_key_flag) | static_cast<u8_t>((((flags << m_flag_shift_key_flag) & m_flag_mask_key_flag)));
+		*data = static_cast<u8_t>(((*data) & ~m_flag_mask_key_flag)
+								  | static_cast<u8_t>((flags << m_flag_shift_key_flag) & m_flag_mask_key_flag));
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
 	}
 	else
@@ -324,7 +325,8 @@
 	u8_t * const data = get_header_offset(m_offset_key_index, sizeof(u8_t));
 	if (data != 0)
 	{
-		*data = ((*data) & m_flag_mask_key_flag) | static_cast<u8_t>((index & ~m_flag_mask_key_flag));
+		*data = static_cast<u8_t>(((*data) & m_flag_mask_key_flag)
+								  | static_cast<u8_t>((index & ~m_flag_mask_key_flag)));
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
 	}
 	else
--- a/eapol/eapol_framework/eapol_common/core/eapol_rsna_key_data_gtk_header.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/core/eapol_rsna_key_data_gtk_header.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/core/eapol_rsna_key_data_header.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/core/eapol_rsna_key_data_header.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/core/eapol_rsna_key_data_payloads.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/core/eapol_rsna_key_data_payloads.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/core/eapol_rsna_key_header.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/core/eapol_rsna_key_header.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 15 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/core/eapol_wlan_authentication.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/core/eapol_wlan_authentication.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 86.1.2 %
+* %version: 114 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -50,6 +50,7 @@
 #include "eap_array_algorithms.h"
 #include "eap_state_notification.h"
 #include "eap_automatic_variable.h"
+#include "eapol_key_state_string.h"
 
 // LOCAL CONSTANTS
 
@@ -84,8 +85,7 @@
 EAP_FUNC_EXPORT eapol_wlan_authentication_c * eapol_wlan_authentication_c::new_eapol_wlan_authentication(
 	abs_eap_am_tools_c * const tools,
 	abs_eapol_wlan_authentication_c * const partner,
-	const bool is_client_when_true,
-	const abs_eapol_wlan_database_reference_if_c * const wlan_database_reference
+	const bool is_client_when_true
 	)
 {
 	EAP_TRACE_DEBUG(
@@ -97,8 +97,7 @@
 
 	eapol_am_wlan_authentication_c * m_am_wauth = eapol_am_wlan_authentication_c::new_eapol_am_wlan_authentication(
 		tools,
-		is_client_when_true,
-		wlan_database_reference);
+		is_client_when_true);
 	if (m_am_wauth == 0
 		|| m_am_wauth->get_is_valid() == false)
 	{
@@ -158,7 +157,7 @@
 , m_am_wauth(am_wauth)
 , m_ethernet_core(0)
 , m_am_tools(tools)
-, m_selected_eap_types(tools)
+//, m_selected_eap_types(tools)
 , m_wpa_preshared_key_hash(tools)
 , m_authentication_type(eapol_key_authentication_type_none)
 , m_802_11_authentication_mode(eapol_key_802_11_authentication_mode_none)
@@ -399,12 +398,9 @@
 EAP_FUNC_EXPORT eap_status_e eapol_wlan_authentication_c::start_authentication(
 	const eap_variable_data_c * const SSID,
 	const eapol_key_authentication_type_e selected_eapol_key_authentication_type,
-	const eap_variable_data_c * const wpa_preshared_key,
-	const bool WPA_override_enabled
-#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-	,
+	const eap_variable_data_c * const preshared_key, // This does include WPA pre-shared key or WPS PIN.
+	const bool WPA_override_enabled,
 	const eap_am_network_id_c * const receive_network_id ///< source includes remote address, destination includes local address.
-#endif //#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
 	)
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);	
@@ -418,8 +414,9 @@
 	EAP_TRACE_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
-		(EAPL("Starting authentication, selected_eapol_key_authentication_type = %d.\n"),
-		selected_eapol_key_authentication_type));
+		(EAPL("Starting authentication, selected_eapol_key_authentication_type=%d=%s.\n"),
+		selected_eapol_key_authentication_type,
+		eapol_key_state_string_c::get_eapol_key_authentication_type_string(selected_eapol_key_authentication_type)));
 
 	EAP_TRACE_RETURN_STRING(m_am_tools, "returns to partner: eapol_wlan_authentication_c::start_authentication()");
 
@@ -442,11 +439,11 @@
 	status = m_am_wauth->set_wlan_parameters(
 		SSID,
 		WPA_override_enabled,
-		wpa_preshared_key,
+		preshared_key,
 		selected_eapol_key_authentication_type);
 	if (status != eap_status_ok)
 	{
-		(void) disassociation(0); // Note we have no addresses yet.
+		(void) internal_disassociation(false, 0); // Note we have no addresses yet.
 
 		(void) eapol_indication(
 			0, // Note we have no addresses yet.
@@ -458,13 +455,13 @@
 	EAP_TRACE_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
-		(EAPL("calls: eapol_wlan_authentication_c::start_authentication(): m_am_wauth->reset_eap_configuration(): %s.\n"),
+		(EAPL("calls: eapol_wlan_authentication_c::start_authentication(): m_am_wauth->reset_wpa_configuration(): %s.\n"),
 		(m_is_client == true) ? "client": "server"));
 
-	status = m_am_wauth->reset_eap_configuration();
+	status = m_am_wauth->reset_wpa_configuration();
 	if (status != eap_status_ok)
 	{
-		(void) disassociation(0); // Note we have no addresses yet.
+		(void) internal_disassociation(false, 0); // Note we have no addresses yet.
 
 		(void) eapol_indication(
 			0, // Note we have no addresses yet.
@@ -479,12 +476,6 @@
 		(EAPL("calls: eapol_wlan_authentication_c::start_authentication(): m_am_wauth->get_selected_eap_types(): %s.\n"),
 		(m_is_client == true) ? "client": "server"));
 
-	status = m_am_wauth->get_selected_eap_types(&m_selected_eap_types);
-	if (status != eap_status_ok)
-	{
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
 	EAP_TRACE_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
@@ -500,6 +491,28 @@
 
 	// Start new authentication from scratch.
 	
+	WAUTH_ENTER_MUTEX(m_am_tools);
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+		(EAPL("calls eapol: eapol_wlan_authentication_c::start_authentication(): m_ethernet_core->create_state(): %s.\n"),
+		(m_is_client == true) ? "client": "server"));
+	status = m_ethernet_core->create_state(
+		receive_network_id,
+		m_authentication_type
+		);
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+		(EAPL("returns from eapol: eapol_wlan_authentication_c::start_authentication(): m_ethernet_core->create_state(): %s, status = %s.\n"),
+		(m_is_client == true) ? "client": "server",
+		eap_status_string_c::get_status_string(status)));
+	WAUTH_LEAVE_MUTEX(m_am_tools);
+	if (status != eap_status_ok)
+	{
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
 	if (m_authentication_type == eapol_key_authentication_type_RSNA_PSK
 		|| m_authentication_type == eapol_key_authentication_type_WPA_PSK)
 	{
@@ -520,128 +533,40 @@
 				TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
 				(EAPL("start_authentication(): Trying auth mode OPEN and WPA-PSK.\n")));
 		}
+
+		status = complete_get_802_11_authentication_mode(
+			eap_status_ok,
+			receive_network_id,
+			m_802_11_authentication_mode);
 	}
-	else //if (wpa_preshared_key == 0
-		//|| wpa_preshared_key->get_is_valid_data() == false
+	else //if (preshared_key == 0
+		//|| preshared_key->get_is_valid_data() == false
 		//|| WPA_override_enabled == false)
 	{
-		// Check the first enabled type
-		eap_type_selection_c * eap_type = 0;
-		u32_t ind_type = 0ul;
-
-		for (ind_type = 0; ind_type < m_selected_eap_types.get_object_count(); ind_type++)
-		{
-			// Check if type is enabled
-			eap_type = m_selected_eap_types.get_object(ind_type);
-
-			if (eap_type->get_is_enabled() == true)
-			{	
-				break;
-			}
-		}
-
-		if (ind_type >= m_selected_eap_types.get_object_count())
+		WAUTH_ENTER_MUTEX(m_am_tools);
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+			(EAPL("calls eapol: eapol_wlan_authentication_c::start_authentication(): m_ethernet_core->get_802_11_authentication_mode(): %s.\n"),
+			(m_is_client == true) ? "client": "server"));
+		status = m_ethernet_core->get_802_11_authentication_mode(
+			receive_network_id,
+			m_authentication_type,
+			SSID,
+			preshared_key);
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+			(EAPL("returns from eapol: eapol_wlan_authentication_c::start_authentication(): m_ethernet_core->get_802_11_authentication_mode(): %s, status = %s.\n"),
+			(m_is_client == true) ? "client": "server",
+			eap_status_string_c::get_status_string(status)));
+		WAUTH_LEAVE_MUTEX(m_am_tools);
+		if (status != eap_status_ok)
 		{
-			// No enabled EAP types.
-			EAP_TRACE_ALWAYS(
-				m_am_tools,
-				TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT,
-				(EAPL("No enabled EAP types.\n")));
-			EAP_TRACE_ALWAYS(
-				m_am_tools,
-				TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT,
-				(EAPL("Indication sent to WLM: eap_status_failed_completely.\n")));
-
-			(void) disassociation(0); // Note we have no addresses yet.
-
-			status = eapol_indication(
-				0, // Note we have no addresses yet.
-				eapol_wlan_authentication_state_failed_completely);
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);
-			}
-
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
-		}	
-
-		// reset index (start from the first enabled EAP type)
-		m_current_eap_index = ind_type;
-		
-		if (eap_type->get_type() == eap_type_leap)
-		{
-			if (m_authentication_type == eapol_key_authentication_type_802_1X)
-			{
-				// LEAP uses it's own 802.11 authentication mode when 802.1X (dynamic WEP) is used.
-				m_802_11_authentication_mode = eapol_key_802_11_authentication_mode_leap;
-
-				EAP_TRACE_ALWAYS(
-					m_am_tools,
-					TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
-					(EAPL("start_authentication(): Trying auth mode LEAP (802.1x mode).\n")));
-			}
-			else
-			{
-				// If security mode is WPA or RSNA then even LEAP uses open authentication!
-				m_802_11_authentication_mode = eapol_key_802_11_authentication_mode_open;
-
-				EAP_TRACE_ALWAYS(
-					m_am_tools,
-					TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
-					(EAPL("start_authentication(): Trying auth mode OPEN (LEAP in WPA mode).\n")));
-			}
-
-		}
-		else
-		{
-			m_802_11_authentication_mode = eapol_key_802_11_authentication_mode_open;
-
-			EAP_TRACE_ALWAYS(
-				m_am_tools,
-				TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
-				(EAPL("start_authentication(): Trying auth mode OPEN.\n")));
+			return EAP_STATUS_RETURN(m_am_tools, status);
 		}
 	}
 
-#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-	WAUTH_ENTER_MUTEX(m_am_tools);
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
-		(EAPL("calls eapol: eapol_wlan_authentication_c::start_authentication(): m_ethernet_core->create_state(): %s.\n"),
-		(m_is_client == true) ? "client": "server"));
-	status = m_ethernet_core->create_state(
-		receive_network_id,
-		selected_eapol_key_authentication_type
-		);
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
-		(EAPL("returns from eapol: eapol_wlan_authentication_c::start_authentication(): m_ethernet_core->create_state(): %s, status = %s.\n"),
-		(m_is_client == true) ? "client": "server",
-		eap_status_string_c::get_status_string(status)));
-	WAUTH_LEAVE_MUTEX(m_am_tools);
-#endif //#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-	
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
-		(EAPL("calls partner: eapol_wlan_authentication_c::start_authentication(): m_partner->associate(%d).\n"),
-		m_802_11_authentication_mode));
-
-	status = m_partner->associate(m_802_11_authentication_mode);
-	(void)EAP_STATUS_RETURN(m_am_tools, status);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
-		(EAPL("returns from partner: eapol_wlan_authentication_c::start_authentication(): %s: m_partner->associate(): status = %s\n"),
-		 (m_is_client == true) ? "client": "server",
-		 eap_status_string_c::get_status_string(status)));
-
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
@@ -717,7 +642,7 @@
 			TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT,
 			(EAPL("Indication sent to WLM: eap_status_this_ap_failed.\n")));
 
-		(void) disassociation(receive_network_id);
+		(void) internal_disassociation(false, receive_network_id);
 
 		status = eapol_indication(
 			receive_network_id,
@@ -831,7 +756,7 @@
 			(EAPL("calls: eapol_wlan_authentication_c::complete_association(): this->disassociation(): %s.\n"),
 			(m_is_client == true) ? "client": "server"));
 
-		(void) disassociation(receive_network_id);
+		(void) internal_disassociation(false, receive_network_id);
 
 		status = eapol_indication(
 			receive_network_id,
@@ -848,11 +773,12 @@
 
 	if (m_authentication_type == eapol_key_authentication_type_RSNA_EAP
 		|| m_authentication_type == eapol_key_authentication_type_WPA_EAP
-		|| m_authentication_type == eapol_key_authentication_type_802_1X
-		|| m_authentication_type == eapol_key_authentication_type_WFA_SC
+		|| m_authentication_type == eapol_key_authentication_type_dynamic_WEP
+		|| m_authentication_type == eapol_key_authentication_type_WPS
 #if defined(EAP_USE_WPXM)
 		|| m_authentication_type == eapol_key_authentication_type_WPXM
 #endif //#if defined(EAP_USE_WPXM)
+		|| m_authentication_type == eapol_key_authentication_type_EAP_authentication_no_encryption
 		)
 	{
 		// Start authentication if mode is not pre-shared key. If mode is pre-shared key then
@@ -1023,10 +949,10 @@
 	EAP_TRACE_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
-		(EAPL("calls: eapol_wlan_authentication_c::start_reassociation(): m_am_wauth->reset_eap_configuration(): %s.\n"),
+		(EAPL("calls: eapol_wlan_authentication_c::start_reassociation(): m_am_wauth->reset_wpa_configuration(): %s.\n"),
 		(m_is_client == true) ? "client": "server"));
 
-	status = m_am_wauth->reset_eap_configuration();
+	status = m_am_wauth->reset_wpa_configuration();
 	if (status != eap_status_ok)
 	{
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
@@ -1079,9 +1005,10 @@
 		EAP_TRACE_DEBUG(
 			m_am_tools,
 			TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
-			(EAPL("calls partner: eapol_wlan_authentication_c::start_reassociation(): %s: m_partner->reassociate(): m_authentication_type=%d.\n"),
+			(EAPL("calls partner: eapol_wlan_authentication_c::start_reassociation(): %s: m_partner->reassociate(): m_authentication_type=%d=%s.\n"),
 			 (m_is_client == true) ? "client": "server",
-			 m_authentication_type));
+			 m_authentication_type,
+			 eapol_key_state_string_c::get_eapol_key_authentication_type_string(m_authentication_type)));
 
 		status = m_partner->reassociate(
 			&send_network_id,
@@ -1209,12 +1136,16 @@
 
 	EAP_TRACE_RETURN_STRING(m_am_tools, "returns to partner: eapol_wlan_authentication_c::packet_process()");
 
+#if !defined(EAPOL_SKIP_ETHERNET_HEADER)
+
 	if (packet_length < eapol_ethernet_header_wr_c::get_header_length())
 	{
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_too_short_message);
 	}
 
+#endif //#if !defined(EAPOL_SKIP_ETHERNET_HEADER)
+
 	eapol_ethernet_header_wr_c eth_header(
 		m_am_tools,
 		packet_data->get_header_buffer(packet_length),
@@ -1222,8 +1153,11 @@
 
 	eap_status_e status(eap_status_process_general_error);
 
+#if !defined(EAPOL_SKIP_ETHERNET_HEADER)
 	if (eth_header.get_type() == eapol_ethernet_type_pae
 		|| eth_header.get_type() == eapol_ethernet_type_preauthentication)
+#endif //#if !defined(EAPOL_SKIP_ETHERNET_HEADER)
+
 	{
 		// Forward the packet to the Ethernet layer of the EAPOL stack.
 		// Ignore return value. Failure is signalled using state_notification.
@@ -1247,6 +1181,7 @@
 
 		EAP_GENERAL_HEADER_COPY_ERROR_PARAMETERS(packet_data, &eth_header);
 	} 
+#if !defined(EAPOL_SKIP_ETHERNET_HEADER)
 	else
 	{
 		EAP_TRACE_DEBUG(
@@ -1255,6 +1190,7 @@
 			(EAPL("Not supported ethernet type 0x%04x\n"), eth_header.get_type()));
 		status = eap_status_ethernet_type_not_supported;
 	}
+#endif //#if !defined(EAPOL_SKIP_ETHERNET_HEADER)
 	
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 	return EAP_STATUS_RETURN(m_am_tools, status);
@@ -1866,14 +1802,15 @@
 		EAP_TRACE_DEBUG(
 			m_am_tools, 
 			TRACE_FLAGS_DEFAULT, 
-			(EAPL("eapol_wlan_authentication_c::state_notification() %s: protocol layer %d=%s, protocol %d=%s, EAP-type 0x%08x=%s\n"),
+			(EAPL("eapol_wlan_authentication_c::state_notification() %s: protocol layer %d=%s, protocol %d=%s, EAP-type 0xfe%06x%08x=%s\n"),
 			(state->get_is_client() == true ? "client": "server"),
 			state->get_protocol_layer(),
 			state->get_protocol_layer_string(),
 			state->get_protocol(),
 			state->get_protocol_string(),
-			convert_eap_type_to_u32_t(state->get_eap_type()),
-			eap_string.get_eap_type_string(state->get_eap_type())));
+			state->get_eap_type().get_vendor_id(),
+			state->get_eap_type().get_vendor_type(),
+			eap_header_string_c::get_eap_type_string(state->get_eap_type())));
 
 		EAP_TRACE_DEBUG(
 			m_am_tools, 
@@ -1887,26 +1824,6 @@
 	}
 
 
-#if !defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
-		(EAPL("calls partner: eapol_wlan_authentication_c::state_notification(): %s: m_partner->state_notification()\n"),
-		 (m_is_client == true) ? "client": "server"));
-
-	// Calls lower layer.
-	// Note the optimization prevents most of the state notifications to lower layer.
-	m_partner->state_notification(state);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
-		(EAPL("returns from partner: eapol_wlan_authentication_c::state_notification(): %s: m_partner->state_notification()\n"),
-		 (m_is_client == true) ? "client": "server"));
-
-#endif //#if !defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
 	if(state->get_protocol_layer() == eap_protocol_layer_general)
 	{
 		if (state->get_current_state() == eap_general_state_authentication_cancelled)
@@ -1958,14 +1875,15 @@
 			EAP_TRACE_ERROR(
 				m_am_tools, 
 				TRACE_FLAGS_DEFAULT, 
-				(EAPL("ERROR: eapol_wlan_authentication_c::state_notification() %s: protocol layer %d=%s, protocol %d=%s, EAP-type 0x%08x=%s\n"),
+				(EAPL("ERROR: eapol_wlan_authentication_c::state_notification() %s: protocol layer %d=%s, protocol %d=%s, EAP-type 0xfe%06x%08x=%s\n"),
 				(state->get_is_client() == true ? "client": "server"),
 				state->get_protocol_layer(),
 				state->get_protocol_layer_string(),
 				state->get_protocol(),
 				state->get_protocol_string(),
-				convert_eap_type_to_u32_t(state->get_eap_type()),
-				eap_string.get_eap_type_string(state->get_eap_type())));
+				state->get_eap_type().get_vendor_id(),
+				state->get_eap_type().get_vendor_type(),
+				eap_header_string_c::get_eap_type_string(state->get_eap_type())));
 
 			EAP_TRACE_ERROR(
 				m_am_tools, 
@@ -1977,7 +1895,6 @@
 				state->get_authentication_error(),
 				status_string.get_status_string(state->get_authentication_error())));
 
-#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
 			EAP_TRACE_DEBUG(
 				m_am_tools,
 				TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
@@ -1994,8 +1911,6 @@
 				(EAPL("returns from partner: eapol_wlan_authentication_c::state_notification(): %s: m_partner->state_notification()\n"),
 				 (m_is_client == true) ? "client": "server"));
 
-#endif //#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
 			(void) cancel_timer_this_ap_failed();
 
 			set_timer(
@@ -2020,14 +1935,15 @@
 			EAP_TRACE_DEBUG(
 				m_am_tools, 
 				TRACE_FLAGS_DEFAULT, 
-				(EAPL("eapol_wlan_authentication_c::state_notification() %s: protocol layer %d=%s, protocol %d=%s, EAP-type 0x%08x=%s\n"),
+				(EAPL("eapol_wlan_authentication_c::state_notification() %s: protocol layer %d=%s, protocol %d=%s, EAP-type 0xfe%06x%08x=%s\n"),
 				(state->get_is_client() == true ? "client": "server"),
 				state->get_protocol_layer(),
 				state->get_protocol_layer_string(),
 				state->get_protocol(),
 				state->get_protocol_string(),
-				convert_eap_type_to_u32_t(state->get_eap_type()),
-				eap_string.get_eap_type_string(state->get_eap_type())));
+				state->get_eap_type().get_vendor_id(),
+				state->get_eap_type().get_vendor_type(),
+				eap_header_string_c::get_eap_type_string(state->get_eap_type())));
 
 			EAP_TRACE_DEBUG(
 				m_am_tools, 
@@ -2078,8 +1994,6 @@
 					(EAPL("calls: eapol_wlan_authentication_c::state_notification(): m_am_wauth->authentication_finished(): %s.\n"),
 					(m_is_client == true) ? "client": "server"));
 
-#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
 				EAP_TRACE_DEBUG(
 					m_am_tools,
 					TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
@@ -2096,14 +2010,11 @@
 					(EAPL("returns from partner: eapol_wlan_authentication_c::state_notification(): %s: m_partner->state_notification()\n"),
 					 (m_is_client == true) ? "client": "server"));
 
-#endif //#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
 				m_am_wauth->authentication_finished(
 					true,
 					state->get_eap_type(),
 					m_authentication_type);
 
-#if defined(USE_EAP_EXPANDED_TYPES)
 				if (state->get_eap_type() == eap_expanded_type_simple_config.get_type())
 				{
 					increment_authentication_counter();
@@ -2124,8 +2035,6 @@
 						return;
 					}
 				}
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
-
 			}
 			break;
 		case eap_state_authentication_terminated_unsuccessfully:
@@ -2133,8 +2042,6 @@
 				increment_authentication_counter();
 				m_failed_authentications++;
 
-#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
 				EAP_TRACE_DEBUG(
 					m_am_tools,
 					TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
@@ -2151,8 +2058,6 @@
 					(EAPL("returns from partner: eapol_wlan_authentication_c::state_notification(): %s: m_partner->state_notification()\n"),
 					 (m_is_client == true) ? "client": "server"));
 
-#endif //#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
 				EAP_TRACE_DEBUG(
 					m_am_tools,
 					TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
@@ -2369,7 +2274,7 @@
 				(EAPL("EAPOL_WLAN_AUTHENTICATION_TIMER_FAILED_COMPLETELY_ID elapsed: ")
 				 EAPL("Indication sent to WLM: eap_status_failed_completely.\n")));
 
-			(void) disassociation_mutex_must_be_reserved(&receive_network_id);
+			(void) disassociation_mutex_must_be_reserved(false, &receive_network_id);
 
 			eap_status_e status = eapol_indication(
 				&receive_network_id,
@@ -2390,7 +2295,7 @@
 				(EAPL("EAPOL_WLAN_AUTHENTICATION_TIMER_THIS_AP_FAILED_ID elapsed: ")
 				 EAPL("Indication sent to WLM: eap_status_this_ap_failed.\n")));
 
-			(void) disassociation_mutex_must_be_reserved(&receive_network_id);
+			(void) disassociation_mutex_must_be_reserved(false, &receive_network_id);
 
 			eap_status_e status = eapol_indication(
 				&receive_network_id,
@@ -2411,7 +2316,7 @@
 				(EAPL("EAPOL_WLAN_AUTHENTICATION_TIMER_NO_RESPONSE_ID elapsed: ")
 				 EAPL("Indication sent to WLM: eap_status_no_response.\n")));
 
-			(void) disassociation_mutex_must_be_reserved(&receive_network_id);
+			(void) disassociation_mutex_must_be_reserved(false, &receive_network_id);
 
 			eap_status_e status = eapol_indication(
 				&receive_network_id,
@@ -2432,7 +2337,7 @@
 				(EAPL("EAPOL_WLAN_AUTHENTICATION_TIMER_AUTHENTICATION_CANCELLED_ID elapsed: ")
 				 EAPL("Indication sent to WLM: eapol_wlan_authentication_state_authentication_cancelled.\n")));
 
-			(void) disassociation_mutex_must_be_reserved(&receive_network_id);
+			(void) disassociation_mutex_must_be_reserved(false, &receive_network_id);
 		}
 		break;
 
@@ -2551,8 +2456,17 @@
 		(EAPL("calls: eapol_wlan_authentication_c::unload_module(): m_am_wauth->unload_module(): %s.\n"),
 		(m_is_client == true) ? "client": "server"));
 
+#if 0
+
 	status = m_am_wauth->unload_module(type);
 
+#else
+
+	status = eap_status_not_supported;
+
+#endif
+
+
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
@@ -2597,6 +2511,68 @@
 //--------------------------------------------------
 
 //
+EAP_FUNC_EXPORT eap_status_e eapol_wlan_authentication_c::set_eap_database_reference_values(
+	const eap_variable_data_c * const reference)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("partner calls: eapol_wlan_authentication_c::set_eap_database_reference_values()\n")));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns to partner: eapol_wlan_authentication_c::set_eap_database_reference_values()");
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("eapol_wlan_authentication_c::set_eap_database_reference_values(): reference"),
+		 reference->get_data(),
+		 reference->get_data_length()));
+
+	WAUTH_ENTER_MUTEX(m_am_tools);
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+		(EAPL("calls eapol: eapol_wlan_authentication_c::set_eap_database_reference_values(): m_ethernet_core->set_eap_database_reference_values(): %s.\n"),
+		(m_is_client == true) ? "client": "server"));
+	eap_status_e status = m_ethernet_core->set_eap_database_reference_values(reference);
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+		(EAPL("returns from eapol: eapol_wlan_authentication_c::set_eap_database_reference_values(): m_ethernet_core->set_eap_database_reference_values(): %s, status = %s.\n"),
+		 (m_is_client == true) ? "client": "server",
+		 eap_status_string_c::get_status_string(status)));
+	WAUTH_LEAVE_MUTEX(m_am_tools);
+
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	WAUTH_ENTER_MUTEX(m_am_tools);
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+		(EAPL("calls eapol: eapol_wlan_authentication_c::set_eap_database_reference_values(): m_am_wauth->set_eap_database_reference_values(): %s.\n"),
+		(m_is_client == true) ? "client": "server"));
+	status = m_am_wauth->set_eap_database_reference_values(reference);
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+		(EAPL("returns from eapol: eapol_wlan_authentication_c::set_eap_database_reference_values(): m_am_wauth->set_eap_database_reference_values(): %s, status = %s.\n"),
+		 (m_is_client == true) ? "client": "server",
+		 eap_status_string_c::get_status_string(status)));
+	WAUTH_LEAVE_MUTEX(m_am_tools);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
 EAP_FUNC_EXPORT eap_status_e eapol_wlan_authentication_c::load_module(
 		const eap_type_value_e type,
 		const eap_type_value_e tunneling_type,
@@ -2627,6 +2603,8 @@
 		(EAPL("calls: eapol_wlan_authentication_c::load_module(): m_am_wauth->load_module(): %s.\n"),
 		(m_is_client == true) ? "client": "server"));
 
+#if 0
+
 	eap_status_e status = m_am_wauth->load_module(
 		type,
 		tunneling_type,
@@ -2635,6 +2613,12 @@
 		is_client_when_true,
 		receive_network_id);
 
+#else
+
+	eap_status_e status = eap_status_not_supported;
+
+#endif
+
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
@@ -2643,6 +2627,7 @@
 
 //
 eap_status_e eapol_wlan_authentication_c::disassociation_mutex_must_be_reserved(
+	const bool complete_to_lower_layer,
 	const eap_am_network_id_c * const receive_network_id ///< source includes remote address, destination includes local address.
 	)
 {
@@ -2651,8 +2636,9 @@
 	EAP_TRACE_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
-		(EAPL("eapol calls: eapol_wlan_authentication_c::disassociation_mutex_must_be_reserved(): %s\n"),
-		(m_is_client == true) ? "client": "server"));
+		(EAPL("eapol calls: eapol_wlan_authentication_c::disassociation_mutex_must_be_reserved(): %s, complete_to_lower_layer=%s\n"),
+		 (m_is_client == true) ? "client": "server",
+		 (complete_to_lower_layer == true) ? "true": "false"));
 
 	EAP_TRACE_RETURN_STRING(m_am_tools, "returns to eapol: eapol_wlan_authentication_c::disassociation_mutex_must_be_reserved()");
 
@@ -2669,7 +2655,9 @@
 			(EAPL("calls eapol: eapol_wlan_authentication_c::disassociation_mutex_must_be_reserved(): m_ethernet_core->disassociation(): %s.\n"),
 			(m_is_client == true) ? "client": "server"));
 
-		status = m_ethernet_core->disassociation(receive_network_id);
+		status = m_ethernet_core->disassociation(
+			complete_to_lower_layer,
+			receive_network_id);
 
 		EAP_TRACE_DEBUG(
 			m_am_tools,
@@ -2719,6 +2707,37 @@
 //--------------------------------------------------
 
 //
+eap_status_e eapol_wlan_authentication_c::internal_disassociation(
+	const bool complete_to_lower_layer,
+	const eap_am_network_id_c * const receive_network_id ///< source includes remote address, destination includes local address.
+	)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eapol calls: eapol_wlan_authentication_c::internal_disassociation(): %s, complete_to_lower_layer=%s\n"),
+		 (m_is_client == true) ? "client": "server",
+		 (complete_to_lower_layer == true) ? "true": "false"));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns to eapol: : eapol_wlan_authentication_c::internal_disassociation()");
+
+	eap_status_e status(eap_status_ok);
+
+	WAUTH_ENTER_MUTEX(m_am_tools);
+	status = disassociation_mutex_must_be_reserved(
+		complete_to_lower_layer,
+		receive_network_id);
+	WAUTH_LEAVE_MUTEX(m_am_tools);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
 EAP_FUNC_EXPORT eap_status_e eapol_wlan_authentication_c::disassociation(
 	const eap_am_network_id_c * const receive_network_id ///< source includes remote address, destination includes local address.
 	)
@@ -2729,15 +2748,15 @@
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
 		(EAPL("partner calls: eapol_wlan_authentication_c::disassociation(): %s\n"),
-		(m_is_client == true) ? "client": "server"));
+		 (m_is_client == true) ? "client": "server"));
 
 	EAP_TRACE_RETURN_STRING(m_am_tools, "returns to partner: eapol_wlan_authentication_c::disassociation()");
 
 	eap_status_e status(eap_status_ok);
 
-	WAUTH_ENTER_MUTEX(m_am_tools);
-	status = disassociation_mutex_must_be_reserved(receive_network_id);
-	WAUTH_LEAVE_MUTEX(m_am_tools);
+	status = internal_disassociation(
+		true,
+		receive_network_id);
 
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 	return EAP_STATUS_RETURN(m_am_tools, status);
@@ -3316,8 +3335,17 @@
 		(EAPL("calls: eapol_wlan_authentication_c::check_is_valid_eap_type(): m_am_wauth->check_is_valid_eap_type(): %s.\n"),
 		(m_is_client == true) ? "client": "server"));
 
+#if 0
+
 	eap_status_e status = m_am_wauth->check_is_valid_eap_type(eap_type);
 	
+#else
+
+	eap_status_e status = eap_status_not_supported;
+
+#endif
+
+
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
@@ -3342,15 +3370,23 @@
 		(EAPL("calls: eapol_wlan_authentication_c::get_eap_type_list(): m_am_wauth->get_eap_type_list(): %s.\n"),
 		(m_is_client == true) ? "client": "server"));
 
+#if 0
+
 	eap_status_e status = m_am_wauth->get_eap_type_list(eap_type_list);
 
+#else
+
+	eap_status_e status = eap_status_not_supported;
+
+#endif
+
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
 
 //--------------------------------------------------
 
-EAP_FUNC_EXPORT eap_status_e eapol_wlan_authentication_c::eapol_indication(
+eap_status_e eapol_wlan_authentication_c::eapol_indication(
 	const eap_am_network_id_c * const receive_network_id, ///< source includes remote address, destination includes local address.
 	const eapol_wlan_authentication_state_e wlan_authentication_state)
 {
@@ -3382,6 +3418,27 @@
 			return EAP_STATUS_RETURN(m_am_tools, status);
 		}
 	}
+	else
+	{
+		const u8_t no_address[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00,};
+
+		eap_am_network_id_c tmp_network_id(
+			m_am_tools,
+			no_address,
+			sizeof(no_address),
+			no_address,
+			sizeof(no_address),
+			eapol_ethernet_type_pae,
+			false,
+			false);
+
+		status = send_network_id.set_copy_of_network_id(&tmp_network_id);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
 
 	eap_state_notification_c notification(
 		m_am_tools,
@@ -3436,7 +3493,7 @@
 
 //--------------------------------------------------
 
-EAP_FUNC_EXPORT eap_status_e eapol_wlan_authentication_c::create_upper_stack()
+eap_status_e eapol_wlan_authentication_c::create_upper_stack()
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 	
@@ -3893,12 +3950,15 @@
 		}
 	}
 
-	EAP_TRACE_DATA_DEBUG(
-		m_am_tools, 
-		TRACE_FLAGS_DEFAULT, 
-		(EAPL("SIMPLE_CONFIG: new_password"),
-		new_password->get_data(),
-		new_password->get_data_length()));
+	if (new_password != 0)
+	{
+		EAP_TRACE_DATA_DEBUG(
+			m_am_tools, 
+			TRACE_FLAGS_DEFAULT, 
+			(EAPL("SIMPLE_CONFIG: new_password"),
+			new_password->get_data(),
+			new_password->get_data_length()));
+	}
 
 	EAP_TRACE_DEBUG(
 		m_am_tools,
@@ -3932,6 +3992,146 @@
 
 #endif // #if defined(USE_EAP_SIMPLE_CONFIG)
 
-//--------------------------------------------------				
-
+//--------------------------------------------------
+
+eap_status_e eapol_wlan_authentication_c::complete_check_pmksa_cache(
+	EAP_TEMPLATE_CONST eap_array_c<eap_am_network_id_c> * const bssid_sta_receive_network_ids)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+		(EAPL("calls partner: eapol_wlan_authentication_c::complete_check_pmksa_cache(): %s: m_partner->complete_check_pmksa_cache().\n"),
+		(m_is_client == true) ? "client": "server"));
+
+	const eap_status_e status = m_partner->complete_check_pmksa_cache(
+		bssid_sta_receive_network_ids);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+		(EAPL("returns from partner: eapol_wlan_authentication_c::complete_check_pmksa_cache(): %s: m_partner->complete_check_pmksa_cache(): status = %s\n"),
+		 (m_is_client == true) ? "client": "server",
+		 eap_status_string_c::get_status_string(status)));
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eapol_wlan_authentication_c::complete_get_802_11_authentication_mode(
+		const eap_status_e completion_status,
+		const eap_am_network_id_c * const receive_network_id,
+		const eapol_key_802_11_authentication_mode_e mode)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eapol calls: eapol_wlan_authentication_c::complete_get_802_11_authentication_mode(): completion_status=%d=%s, mode=%d\n"),
+		completion_status,
+		eap_status_string_c::get_status_string(completion_status),
+		mode));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns to eapol: eapol_wlan_authentication_c::complete_get_802_11_authentication_mode()");
+
+	eap_status_e status(eap_status_ok);
+
+	if (completion_status != eap_status_ok
+		|| mode == eapol_key_802_11_authentication_mode_none)
+	{
+		EAP_TRACE_ALWAYS(
+			m_am_tools,
+			TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT,
+			(EAPL("No enabled EAP types.\n")));
+		EAP_TRACE_ALWAYS(
+			m_am_tools,
+			TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT,
+			(EAPL("Indication sent to WLM: eap_status_failed_completely.\n")));
+
+		(void) internal_disassociation(false, 0); // Note we have no addresses yet.
+
+		status = eapol_indication(
+			0, // Note we have no addresses yet.
+			eapol_wlan_authentication_state_failed_completely);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+	}
+
+	m_802_11_authentication_mode = mode;
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+		(EAPL("calls partner: eapol_wlan_authentication_c::complete_get_802_11_authentication_mode(): m_partner->associate(%d).\n"),
+		m_802_11_authentication_mode));
+
+	status = m_partner->associate(m_802_11_authentication_mode);
+	(void)EAP_STATUS_RETURN(m_am_tools, status);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+		(EAPL("returns from partner: eapol_wlan_authentication_c::complete_get_802_11_authentication_mode(): %s: m_partner->associate(): status = %s\n"),
+		 (m_is_client == true) ? "client": "server",
+		 eap_status_string_c::get_status_string(status)));
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eapol_wlan_authentication_c::complete_disassociation(
+	const bool complete_to_lower_layer,
+	const eap_am_network_id_c * const receive_network_id)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+		(EAPL("eapol calls: eapol_wlan_authentication_c::complete_disassociation(): %s: m_partner->complete_disassociation(), complete_to_lower_layer=%s.\n"),
+		 (m_is_client == true) ? "client": "server",
+		 (complete_to_lower_layer == true) ? "true": "false"));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns to eapol: eapol_wlan_authentication_c::complete_disassociation()");
+
+	eap_status_e status(eap_status_ok);
+
+	if (complete_to_lower_layer == true)
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+			(EAPL("calls partner: eapol_wlan_authentication_c::complete_disassociation(): %s: m_partner->complete_disassociation(), complete_to_lower_layer=%s.\n"),
+			 (m_is_client == true) ? "client": "server",
+			 (complete_to_lower_layer == true) ? "true": "false"));
+
+		status = m_partner->complete_disassociation(
+			receive_network_id);
+
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+			(EAPL("returns from partner: eapol_wlan_authentication_c::complete_disassociation(): %s: m_partner->complete_disassociation(): status = %s\n"),
+			 (m_is_client == true) ? "client": "server",
+			 eap_status_string_c::get_status_string(status)));
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
 // End of file
--- a/eapol/eapol_framework/eapol_common/core/eapol_wlan_database_reference.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/core/eapol_wlan_database_reference.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/core/eapol_wlan_state.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/core/eapol_wlan_state.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/core/ethernet_core.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/core/ethernet_core.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 28.1.2 %
+* %version: 46 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -111,7 +111,7 @@
 
 //
 EAP_FUNC_EXPORT eap_status_e ethernet_core_c::packet_process(
-	const eap_am_network_id_c * const /* receive_network_id */,
+	const eap_am_network_id_c * const receive_network_id,
 	eap_general_header_base_c * const packet_data,
 	const u32_t packet_length)
 {
@@ -126,6 +126,36 @@
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
 	}
 
+#if defined(EAPOL_SKIP_ETHERNET_HEADER)
+
+	{
+		eapol_header_wr_c eapol(
+			m_am_tools,
+			packet_data->get_header_buffer(packet_data->get_header_buffer_length()),
+			packet_data->get_header_buffer_length());
+		if (eapol.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_header_corrupted);
+		}
+
+		status = m_eapol_core->packet_process(
+			receive_network_id,
+			&eapol,
+			packet_length);
+
+		EAP_GENERAL_HEADER_COPY_ERROR_PARAMETERS(packet_data, &eapol);
+
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("####################################################################\n")));
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+#else
+
 	if (packet_length < eapol_ethernet_header_rd_c::get_header_length())
 	{
 		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("####################################################################\n")));
@@ -180,7 +210,7 @@
 	if (eth_header.get_type() == eapol_ethernet_type_pae
 		|| eth_header.get_type() == eapol_ethernet_type_preauthentication)
 	{
-		eap_am_network_id_c receive_network_id(
+		eap_am_network_id_c a_receive_network_id(
 			m_am_tools,
 			eth_header.get_source(),
 			eth_header.get_source_length(),
@@ -201,7 +231,7 @@
 		}
 
 		status = m_eapol_core->packet_process(
-			&receive_network_id,
+			&a_receive_network_id,
 			&eapol,
 			packet_length-eapol_ethernet_header_rd_c::get_header_length());
 
@@ -219,6 +249,9 @@
 		(EAPL("####################################################################\n")));
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 	return EAP_STATUS_RETURN(m_am_tools, status);
+
+#endif //#if defined(EAPOL_SKIP_ETHERNET_HEADER)
+
 }
 
 //--------------------------------------------------
@@ -243,6 +276,24 @@
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
 	}
 
+#if defined(EAPOL_SKIP_ETHERNET_HEADER)
+
+	{
+		sent_packet->set_is_client(m_is_client);
+
+		eap_status_e status = m_partner->packet_send(
+			send_network_id,
+			sent_packet,
+			header_offset,
+			data_length,
+			buffer_length);
+
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+#else
+
 	if (header_offset < eapol_ethernet_header_wr_c::get_header_length())
 	{
 		EAP_TRACE_DEBUG(
@@ -320,6 +371,9 @@
 
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 	return EAP_STATUS_RETURN(m_am_tools, status);
+
+#endif //#if defined(EAPOL_SKIP_ETHERNET_HEADER)
+
 }
 
 //--------------------------------------------------
@@ -331,11 +385,22 @@
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
+#if defined(EAPOL_SKIP_ETHERNET_HEADER)
+
+	const u32_t offset = m_partner->get_header_offset(MTU, trailer_length);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return offset;
+
+#else
+
 	const u32_t offset = m_partner->get_header_offset(MTU, trailer_length);
 	(*MTU) -= eapol_ethernet_header_wr_c::get_header_length();
 
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 	return offset+eapol_ethernet_header_wr_c::get_header_length();
+
+#endif //#if defined(EAPOL_SKIP_ETHERNET_HEADER)
 }
 
 //--------------------------------------------------
@@ -778,8 +843,6 @@
 
 //--------------------------------------------------
 
-#if defined(USE_EAPOL_KEY_STATE)
-
 //
 EAP_FUNC_EXPORT eap_status_e ethernet_core_c::check_pmksa_cache(
 	eap_array_c<eap_am_network_id_c> * const bssid_sta_receive_network_ids,
@@ -805,11 +868,8 @@
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
 
-#endif // #if defined(USE_EAPOL_KEY_STATE)
-
 //--------------------------------------------------
 
-#if defined(USE_EAPOL_KEY_STATE)
 /**
  * This function removes PMKSA from cache.
  * @param receive_network_id carries the MAC addresses.
@@ -833,11 +893,8 @@
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
 
-#endif // #if defined(USE_EAPOL_KEY_STATE)
-
 //--------------------------------------------------
 
-#if defined(USE_EAPOL_KEY_STATE) && defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
 /**
  * Function creates a state for later use. This is for optimazing 4-Way Handshake.
  * @param receive_network_id carries the MAC addresses.
@@ -861,11 +918,8 @@
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
 
-#endif //#if defined(USE_EAPOL_KEY_STATE) && defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
 //--------------------------------------------------
 
-#if defined(USE_EAPOL_KEY_STATE)
 /**
  * @param receive_network_id carries the MAC addresses.
  * MAC address of Authenticator should be in source address. MAC address of Supplicant should be in destination address.
@@ -900,16 +954,14 @@
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
 
-#endif // #if defined(USE_EAPOL_KEY_STATE)
-
 //--------------------------------------------------
 
-#if defined(USE_EAPOL_KEY_STATE)
 /**
  * @param receive_network_id carries the MAC addresses.
  * MAC address of Authenticator should be in source address. MAC address of Supplicant should be in destination address.
  */
 EAP_FUNC_EXPORT eap_status_e ethernet_core_c::disassociation(
+	const bool complete_to_lower_layer,
 	const eap_am_network_id_c * const receive_network_id
 	)
 {
@@ -918,13 +970,12 @@
 	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
 
 	status = m_eapol_core->disassociation(
+		complete_to_lower_layer,
 		receive_network_id);
 
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
 
-#endif //#if defined(USE_EAPOL_KEY_STATE)
-
 //--------------------------------------------------
 
 EAP_FUNC_EXPORT eap_status_e ethernet_core_c::add_rogue_ap(eap_array_c<eap_rogue_ap_entry_c> & rogue_ap_list)
@@ -957,4 +1008,158 @@
 
 //--------------------------------------------------
 
+EAP_FUNC_EXPORT eap_status_e ethernet_core_c::complete_check_pmksa_cache(
+	EAP_TEMPLATE_CONST eap_array_c<eap_am_network_id_c> * const bssid_sta_receive_network_ids)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	const eap_status_e status = m_partner->complete_check_pmksa_cache(
+		bssid_sta_receive_network_ids);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+#if defined(USE_EAP_SIMPLE_CONFIG)
+
+EAP_FUNC_EXPORT eap_status_e ethernet_core_c::save_simple_config_session(
+	const simple_config_state_e state,
+	EAP_TEMPLATE_CONST eap_array_c<simple_config_credential_c> * const credential_array,
+	const eap_variable_data_c * const new_password,
+	const simple_config_Device_Password_ID_e Device_Password_ID,
+	const simple_config_payloads_c * const other_configuration)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("%s: ethernet_core_c::save_simple_config_session().\n"),
+		 (m_is_client == true) ? "client": "server"));
+
+	const eap_status_e status = m_partner->save_simple_config_session(
+		state,
+		credential_array,
+		new_password,
+		Device_Password_ID,
+		other_configuration);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e ethernet_core_c::set_eap_database_reference_values(
+	const eap_variable_data_c * const reference)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("ethernet_core_c::set_eap_database_reference_values()\n")));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: ethernet_core_c::set_eap_database_reference_values()");
+
+	eap_status_e status = m_eapol_core->set_eap_database_reference_values(reference);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e ethernet_core_c::get_802_11_authentication_mode(
+	const eap_am_network_id_c * const receive_network_id,
+	const eapol_key_authentication_type_e authentication_type,
+	const eap_variable_data_c * const SSID,
+	const eap_variable_data_c * const preshared_key)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("ethernet_core_c::get_802_11_authentication_mode()\n")));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: ethernet_core_c::get_802_11_authentication_mode()");
+
+	eap_status_e status = m_eapol_core->get_802_11_authentication_mode(
+		receive_network_id,
+		authentication_type,
+		SSID,
+		preshared_key);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e ethernet_core_c::complete_get_802_11_authentication_mode(
+		const eap_status_e completion_status,
+		const eap_am_network_id_c * const receive_network_id,
+		const eapol_key_802_11_authentication_mode_e mode)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("ethernet_core_c::complete_get_802_11_authentication_mode()\n")));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: ethernet_core_c::complete_get_802_11_authentication_mode()");
+
+	eap_status_e status(eap_status_ok);
+
+	if (m_partner != 0)
+	{
+		status = m_partner->complete_get_802_11_authentication_mode(
+			completion_status,
+			receive_network_id,
+			mode);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e ethernet_core_c::complete_disassociation(
+	const bool complete_to_lower_layer,
+	const eap_am_network_id_c * const receive_network_id)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("ethernet_core_c::complete_disassociation()\n")));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: ethernet_core_c::complete_disassociation()");
+
+	eap_status_e status(eap_status_ok);
+
+	if (m_partner != 0)
+	{
+		status = m_partner->complete_disassociation(
+			complete_to_lower_layer,
+			receive_network_id);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
 // End.
--- a/eapol/eapol_framework/eapol_common/include/abs_eap_base_timer.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/abs_eap_base_timer.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 4 %
+* %version: %
 */
 
 #if !defined(_ABS_EAP_BASE_TIMER_H_)
--- a/eapol/eapol_framework/eapol_common/include/abs_eap_base_type.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/abs_eap_base_type.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 2.1.2 %
+* %version: %
 */
 
 #if !defined(_ABS_EAP_BASE_TYPE_H_)
@@ -258,17 +258,6 @@
 		const u32_t id) = 0;
 
 	/**
-	 * The cancel_all_timers() function cancels all timers.
-	 * User should use this in termination of the stack before
-	 * the adaptation module of tools is deleted.
-	 * Preferred mode is to cancel each timer directly
-	 * using cancel_timer() function.
-	 *
-	 * Adaptation module internally implements the timer.
-	 */
-	virtual eap_status_e cancel_all_timers() = 0;
-
-	/**
 	 * This is needed by PEAP type.
 	 * The load_module() function function indicates the lower level to
 	 * load new module of EAP-type.
--- a/eapol/eapol_framework/eapol_common/include/abs_eap_configuration_if.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/abs_eap_configuration_if.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7 %
+* %version: %
 */
 
 #if !defined(_ABS_EAPOL_WLAN_CONFIGURATION_REFERENCE_IF_H_)
@@ -48,6 +48,11 @@
 public:
 	//--------------------------------------------------
 
+	/* The destructor does nothing */
+	virtual ~abs_eap_configuration_if_c()
+	{
+	};
+	
 #if defined(USE_EAP_SIMPLE_CONFIG)
 	/**
 	 * This function tells AM to save SIMPLE_CONFIG configuration parameters.
--- a/eapol/eapol_framework/eapol_common/include/abs_eap_core.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/abs_eap_core.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 2.1.2 %
+* %version: %
 */
 
 #if !defined(_ABS_EAP_CORE_H_)
@@ -209,17 +209,6 @@
 		const u32_t id) = 0;
 
 	/**
-	 * The cancel_all_timers() function cancels all timers.
-	 * User should use this in termination of the stack before
-	 * the adaptation module of tools is deleted.
-	 * Preferred mode is to cancel each timer directly
-	 * using cancel_timer() function.
-	 *
-	 * Adaptation module internally implements the timer.
-	 */
-	virtual eap_status_e cancel_all_timers() = 0;
-
-	/**
 	 * This function queries the validity of EAP-type.
 	 * Lower layer should return eap_status_ok if this EAP-type is supported.
 	 * @param eap_type is the requested EAP-type.
--- a/eapol/eapol_framework/eapol_common/include/abs_eap_core_map.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/abs_eap_core_map.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 4 %
+* %version: %
 */
 
 #if !defined(_ABS_EAP_TYPE_MAP_H_)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/include/abs_eap_database_reference_if.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,63 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#if !defined(_ABS_EAPOL_WLAN_DATABASE_REFERENCE_IF_H_)
+#define _ABS_EAPOL_WLAN_DATABASE_REFERENCE_IF_H_
+
+//--------------------------------------------------
+
+#include "eap_am_export.h"
+#include "eap_am_types.h"
+#include "eap_status.h"
+
+
+/// This class is abstract interface to reference of WLAN database of the current connection.
+class EAP_EXPORT abs_eap_database_reference_if_c_deprecated
+{
+
+private:
+	//--------------------------------------------------
+
+	//--------------------------------------------------
+
+	//--------------------------------------------------
+public:
+	//--------------------------------------------------
+
+	virtual ~abs_eap_database_reference_if_c_deprecated()
+	{
+	}
+
+	/**
+	 * The constructor of the abs_eap_database_reference_if_c class does nothing special.
+	 */
+	virtual eap_status_e get_wlan_database_reference_values(
+		eap_variable_data_c * const reference) const = 0;
+
+}; // class abs_eap_database_reference_if_c
+
+
+#endif //#if !defined(_ABS_EAPOL_WLAN_DATABASE_REFERENCE_IF_H_)
+
+//--------------------------------------------------
+
+
+// End.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/include/abs_eap_general_settings_message.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,82 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  This class defines the callback interface from eap_general_settings_client_message_if_c to the user of EAP-general settings.
+*
+*/
+
+/*
+* %version: 7 %
+*/
+
+#if !defined(_ABS_EAP_GENERAL_SETTINGS_MESSAGE_H_)
+#define _ABS_EAP_GENERAL_SETTINGS_MESSAGE_H_
+
+#include "eap_tools.h"
+#include "eap_am_export.h"
+
+class eap_method_settings_c;
+
+/// This class defines the callback interface from eap_general_settings_client_message_if_c to the user of EAP-general settings.
+class EAP_EXPORT abs_eap_general_settings_message_c
+{
+private:
+	//--------------------------------------------------
+
+	//--------------------------------------------------
+protected:
+	//--------------------------------------------------
+
+	//--------------------------------------------------
+public:
+	//--------------------------------------------------
+
+	/**
+	 * The destructor of the abs_eap_core class does nothing special.
+	 */
+	virtual ~abs_eap_general_settings_message_c()
+	{
+	}
+
+	/**
+	 * The constructor of the abs_eap_core class does nothing special.
+	 */
+	abs_eap_general_settings_message_c()
+	{
+	}
+
+	virtual eap_status_e complete_get_eap_methods(
+		const eap_method_settings_c * const internal_settings) = 0;
+
+	virtual eap_status_e complete_set_eap_methods(
+		const eap_status_e completion_status) = 0;
+
+	virtual eap_status_e complete_get_certificate_lists(
+		const eap_method_settings_c * const internal_settings) = 0;
+
+	virtual eap_status_e complete_delete_all_eap_settings(
+		const eap_status_e completion_status) = 0;
+
+	virtual eap_status_e complete_copy_all_eap_settings(
+		const eap_status_e completion_status) = 0;
+
+	//--------------------------------------------------
+}; // class abs_eap_general_settings_message_c
+
+#endif //#if !defined(_ABS_EAP_GENERAL_SETTINGS_MESSAGE_H_)
+
+//--------------------------------------------------
+
+
+
+// End.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/include/abs_eap_pac_store_message.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,97 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#if !defined(_ABS_EAP_PAC_STORE_MESSAGE_H_)
+#define _ABS_EAP_PAC_STORE_MESSAGE_H_
+
+#include "eap_tools.h"
+#include "eap_am_export.h"
+
+class eap_method_settings_c;
+
+/// This class defines the interface the eap_core_c class
+/// will use with the partner class (lower layer).
+class EAP_EXPORT abs_eap_pac_store_message_c
+{
+private:
+	//--------------------------------------------------
+
+	//--------------------------------------------------
+protected:
+	//--------------------------------------------------
+
+	//--------------------------------------------------
+public:
+	//--------------------------------------------------
+
+	/**
+	 * The destructor of the abs_eap_core class does nothing special.
+	 */
+	virtual ~abs_eap_pac_store_message_c()
+	{
+	}
+
+	/**
+	 * The constructor of the abs_eap_core class does nothing special.
+	 */
+	abs_eap_pac_store_message_c()
+	{
+	}
+
+	virtual eap_status_e complete_open_pac_store(
+		const eap_status_e completion_status) = 0;
+
+	virtual eap_status_e complete_create_device_seed(
+		const eap_status_e completion_status) = 0;
+
+	virtual eap_status_e complete_is_master_key_present(
+	  bool is_present
+		,const eap_status_e completion_status) = 0;
+
+	virtual eap_status_e complete_is_master_key_and_password_matching(
+	  bool is_matching
+		,const eap_status_e completion_status) = 0;
+
+	virtual eap_status_e complete_create_and_save_master_key(
+		const eap_status_e completion_status) = 0;
+
+	virtual eap_status_e complete_compare_pac_store_password(
+		bool is_matching) = 0;
+
+	virtual eap_status_e complete_is_pacstore_password_present(
+		bool is_present) = 0;
+
+	virtual eap_status_e complete_set_pac_store_password(
+		const eap_status_e completion_status) = 0;
+
+	virtual eap_status_e complete_destroy_pac_store(
+		const eap_status_e completion_status) = 0;
+
+	//--------------------------------------------------
+}; // class abs_eap_pac_store_message_c
+
+#endif //#if !defined(_ABS_EAP_PAC_STORE_MESSAGE_H_)
+
+//--------------------------------------------------
+
+
+
+// End.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/include/abs_eap_plugin_message.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,89 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#if !defined(_ABS_EAP_PLUGIN_MESSAGE_H_)
+#define _ABS_EAP_PLUGIN_MESSAGE_H_
+
+#include "eap_tools.h"
+#include "eap_am_export.h"
+
+class eap_method_settings_c;
+
+/// This class defines the interface the eap_core_c class
+/// will use with the partner class (lower layer).
+class EAP_EXPORT abs_eap_plugin_message_c
+{
+private:
+	//--------------------------------------------------
+
+	//--------------------------------------------------
+protected:
+	//--------------------------------------------------
+
+	//--------------------------------------------------
+public:
+	//--------------------------------------------------
+
+	/**
+	 * The destructor of the abs_eap_core class does nothing special.
+	 */
+	virtual ~abs_eap_plugin_message_c()
+	{
+	}
+
+	/**
+	 * The constructor of the abs_eap_core class does nothing special.
+	 */
+	abs_eap_plugin_message_c()
+	{
+	}
+
+	virtual eap_status_e complete_get_configuration(
+		const eap_method_settings_c * const internal_settings) = 0;
+
+	virtual eap_status_e complete_set_configuration(
+		const eap_status_e completion_status) = 0;
+
+	virtual eap_status_e complete_delete_configuration(
+		const eap_status_e completion_status) = 0;
+
+	virtual eap_status_e complete_copy_configuration(
+		const eap_status_e completion_status) = 0;
+
+	virtual eap_status_e complete_set_index(
+		const eap_status_e completion_status) = 0;
+
+	virtual eap_status_e complete_get_type_info(
+		const eap_method_settings_c * const internal_settings) = 0;
+
+	virtual eap_status_e complete_invoke_ui(
+		const eap_method_settings_c * const internal_settings) = 0;
+
+	//--------------------------------------------------
+}; // class abs_eap_plugin_message_c
+
+#endif //#if !defined(_ABS_EAP_PLUGIN_MESSAGE_H_)
+
+//--------------------------------------------------
+
+
+
+// End.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/include/abs_eap_session_core.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,253 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 7 %
+*/
+
+#if !defined(_ABS_EAP_SESSION_CORE_H_)
+#define _ABS_EAP_SESSION_CORE_H_
+
+#include "eap_header.h"
+#include "eap_array.h"
+#if defined(USE_EAP_SIMPLE_CONFIG)
+	#include "abs_eap_configuration_if.h"
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+#include "eapol_key_types.h"
+
+class eap_am_network_id_c;
+class eap_buf_chain_wr_c;
+class eap_configuration_field_c;
+class eap_variable_data_c;
+class abs_eap_base_type_c;
+class abs_eap_state_notification_c;
+class eap_base_type_c;
+class eap_rogue_ap_entry_c;
+class eap_master_session_key_c;
+
+
+/// This class defines the interface the eap_core_c class
+/// will use with the partner class (lower layer).
+class EAP_EXPORT abs_eap_session_core_c
+#if defined(USE_EAP_SIMPLE_CONFIG)
+: public abs_eap_configuration_if_c
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+{
+private:
+	//--------------------------------------------------
+
+	//--------------------------------------------------
+protected:
+	//--------------------------------------------------
+
+	//--------------------------------------------------
+public:
+	//--------------------------------------------------
+
+	/**
+	 * The destructor of the abs_eap_core class does nothing special.
+	 */
+	virtual ~abs_eap_session_core_c()
+	{
+	}
+
+	/**
+	 * The constructor of the abs_eap_core class does nothing special.
+	 */
+	abs_eap_session_core_c()
+	{
+	}
+
+	/**
+	 * The derived class could send packets to partner class with this function.
+	 * @see abs_eap_base_type_c::packet_send().
+	 */
+	virtual eap_status_e packet_send(
+		const eap_am_network_id_c * const network_id,
+		eap_buf_chain_wr_c * const sent_packet,
+		const u32_t header_offset,
+		const u32_t data_length,
+		const u32_t buffer_length) = 0;
+
+	/**
+	 * The get_header_offset() function obtains the header offset of EAP-packet.
+	 * @see abs_eap_base_type_c::get_header_offset().
+	 */
+	virtual u32_t get_header_offset(
+		u32_t * const MTU,
+		u32_t * const trailer_length) = 0;
+
+	/**
+	 * The load_module() function function indicates the lower level to
+	 * load new module of EAP-type.
+	 * @param type is the requested EAP-type.
+	 * @param partner is pointer to the caller object.
+	 * The partner of the new created EAP-type object is the caller object.
+	 * @param eap_type is a pointer to a pointer of EAP-type object.
+	 * Adaptation module sets eap_type pointer to created EAP-type object.
+	 * @param is_client_when_true parameter indicates whether the network entity should
+	 * act as a client (true) or server (false), in terms of EAP-protocol whether
+	 * this network entity is EAP-supplicant (true) or EAP-authenticator (false).
+	 * @param receive_network_id includes the addresses (network identity) and packet type.
+	 */
+	virtual eap_status_e load_module(
+		const eap_type_value_e type,
+		const eap_type_value_e /* tunneling_type */,
+		abs_eap_base_type_c * const partner,
+		eap_base_type_c ** const eap_type,
+		const bool is_client_when_true,
+		const eap_am_network_id_c * const receive_network_id) = 0;
+
+	/**
+	 * The unload_module() function unloads the module of a EAP-type. 
+	 * @param eap_type is the requested EAP-type.
+	 */
+	virtual eap_status_e unload_module(const eap_type_value_e eap_type) = 0;
+
+	/**
+	 * The session calls the restart_authentication() function
+	 * when EAP-authentication is needed with another peer.
+	 * This is also used when session restarts authentication.
+	 * @param receive_network_id includes the addresses (network identity) and packet type.
+	 * @param is_client_when_true indicates whether the EAP-type should act as a client or server,
+	 * in terms of EAP-protocol whether this network entity is EAP-supplicant (true) or EAP-authenticator (false).
+	 * @param force_clean_restart this selects whether the server removes this session (true) or not (false).
+	 * @param from_timer tells whether the timer calls this function (true) or not (false).
+	 */
+	virtual eap_status_e restart_authentication(
+		const eap_am_network_id_c * const receive_network_id,
+		const bool is_client_when_true,
+		const bool force_clean_restart,
+		const bool from_timer = false) = 0;
+
+	/**
+	 * Note this function is just an example. Parameters will change later.
+	 * The packet_data_crypto_keys() function gives the generated keys to lower level.
+	 * After EAP-authentication has generated the keys it calls this function
+	 * to offer the keys to lower level.
+	 * @see abs_eap_base_type_c::packet_data_crypto_keys().
+	 */
+	virtual eap_status_e packet_data_crypto_keys(
+		const eap_am_network_id_c * const send_network_id,
+		const eap_master_session_key_c * const master_session_key
+		) = 0;
+
+	/**
+	 * The read_configure() function reads the configuration data identified
+	 * by the field string of field_length bytes length. Adaptation module must direct
+	 * the query to some persistent store.
+	 * @see abs_eap_base_type_c::read_configure().
+	 */
+	virtual eap_status_e read_configure(
+		const eap_configuration_field_c * const field,
+		eap_variable_data_c * const data) = 0;
+
+	/**
+	 * The write_configure() function writes the configuration data identified
+	 * by the field string of field_length bytes length. Adaptation module must direct
+	 * the action to some persistent store.
+	 * @see abs_eap_base_type_c::write_configure().
+	 */
+	virtual eap_status_e write_configure(
+		const eap_configuration_field_c * const field,
+		eap_variable_data_c * const data) = 0;
+
+	/**
+	 * This is notification of internal state transition.
+	 * This is used for notifications, debugging and protocol testing.
+	 * The primal notifications are eap_state_variable_e::eap_state_authentication_finished_successfully
+	 * and eap_state_variable_e::eap_state_authentication_terminated_unsuccessfully.
+	 * These two notifications are sent from EAP-protocol layer (eap_protocol_layer_e::eap_protocol_layer_eap).
+	 * These two notifications tells the end state of authentication session. These are the only
+	 * reliable indications of the final status of authentication session.
+	 * You MUST NOT make decision based on the return value of abs_eap_stack_interface_c::packet_process().
+	 */
+	virtual void state_notification(
+		const abs_eap_state_notification_c * const state) = 0;
+
+	/**
+	 * The set_timer() function initializes timer to be elapsed after time_ms milliseconds.
+	 * @param initializer is pointer to object which timer_expired() function will
+	 * be called after timer elapses.
+	 * @param id is identifier which will be returned in timer_expired() function.
+	 * The user selects and interprets the id for this timer.
+	 * @param data is pointer to any user selected data which will be returned in timer_expired() function.
+	 * @param time_ms is the time of timer in milli seconds.
+	 *
+	 * Adaptation module internally implements the timer.
+	 */
+	virtual eap_status_e set_timer(
+		abs_eap_base_timer_c * const initializer, 
+		const u32_t id, 
+		void * const data,
+		const u32_t time_ms) = 0;
+
+	/**
+	 * The cancel_timer() function cancels the timer id initiated by initializer.
+	 * @param initializer is pointer to object which set the cancelled timer.
+	 * @param id is identifier which will be returned in timer_expired() function.
+	 * The user selects and interprets the id for this timer.
+	 *
+	 * Adaptation module internally implements the timer.
+	 */
+	virtual eap_status_e cancel_timer(
+		abs_eap_base_timer_c * const initializer, 
+		const u32_t id) = 0;
+
+	/**
+	 * This function queries the validity of EAP-type.
+	 * Lower layer should return eap_status_ok if this EAP-type is supported.
+	 * @param eap_type is the requested EAP-type.
+	 */
+	virtual eap_status_e check_is_valid_eap_type(const eap_type_value_e eap_type) = 0;
+
+	/**
+	 * This function queries the list of supported EAP-types.
+	 * Lower layer should return eap_status_ok if this call succeeds.
+	 * @param eap_type_list will include the list of supported EAP-types. Each value in list
+	 * is type of u32_t and represent one supported EAP-type. List consists of subsequent u32_t type values.
+	 */
+	virtual eap_status_e get_eap_type_list(
+		eap_array_c<eap_type_value_e> * const eap_type_list) = 0;
+
+	virtual eap_status_e add_rogue_ap(eap_array_c<eap_rogue_ap_entry_c> & rogue_ap_list) = 0;
+
+	/**
+	 * The set_session_timeout() function changes the session timeout timer to be elapsed after session_timeout_ms milliseconds.
+	 */
+	virtual eap_status_e set_session_timeout(
+		const u32_t session_timeout_ms) = 0;
+
+	virtual eap_status_e complete_get_802_11_authentication_mode(
+		const eap_status_e completion_status,
+		const eap_am_network_id_c * const receive_network_id,
+		const eapol_key_802_11_authentication_mode_e mode) = 0;
+
+	virtual eap_status_e complete_remove_eap_session(
+		const bool complete_to_lower_layer,
+		const eap_am_network_id_c * const receive_network_id) = 0;
+
+	//--------------------------------------------------
+}; // class abs_eap_session_core_c
+
+#endif //#if !defined(_ABS_EAP_SESSION_CORE_H_)
+
+//--------------------------------------------------
+
+
+
+// End.
--- a/eapol/eapol_framework/eapol_common/include/abs_eap_stack_interface.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/abs_eap_stack_interface.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 2.1.2 %
+* %version: %
 */
 
 #if !defined(_ABS_EAP_STACK_INTERFACE_H_)
@@ -56,15 +56,15 @@
 	 * The destructor of the abs_eap_stack_interface_c class does nothing special.
 	 */
 	virtual ~abs_eap_stack_interface_c()
-		{
-		}
+	{
+	}
 
 	/**
 	 * The constructor of the abs_eap_stack_interface_c does nothing special.
 	 */
 	abs_eap_stack_interface_c()
-		{
-		}
+	{
+	}
 
 	/**
 	 * The configure() function is called after the constructor of the 
--- a/eapol/eapol_framework/eapol_common/include/abs_eap_state_notification.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/abs_eap_state_notification.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 4 %
+* %version: %
 */
 
 #if !defined(_ABS_EAP_STATE_NOTIFICATION_H_)
--- a/eapol/eapol_framework/eapol_common/include/abs_eap_wimax_authentication.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/abs_eap_wimax_authentication.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 4 %
+* %version: %
 */
 
 #if !defined(_ABS_EAP_WIMAX_AUTHENTICATION_H_)
--- a/eapol/eapol_framework/eapol_common/include/abs_eapol_core.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/abs_eapol_core.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7.1.2 %
+* %version: 13 %
 */
 
 #if !defined(_ABS_EAPOL_CORE_H_)
@@ -24,6 +24,9 @@
 
 #include "eap_am_types.h"
 #include "eapol_key_state.h"
+#if defined(USE_EAP_SIMPLE_CONFIG)
+	#include "abs_eap_configuration_if.h"
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
 
 class eap_am_network_id_c;
 class eapol_session_key_c;
@@ -36,6 +39,9 @@
 /// will use with the partner class.
 /// Later eapol and ethernet could be integrated. Now I am too lazy.
 class EAP_EXPORT abs_eapol_core_c
+#if defined(USE_EAP_SIMPLE_CONFIG)
+: public abs_eap_configuration_if_c
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
 {
 private:
 	//--------------------------------------------------
@@ -199,7 +205,19 @@
 
 	virtual eap_status_e add_rogue_ap(eap_array_c<eap_rogue_ap_entry_c> & rogue_ap_list) = 0;
 
-//--------------------------------------------------
+	virtual eap_status_e complete_check_pmksa_cache(
+		EAP_TEMPLATE_CONST eap_array_c<eap_am_network_id_c> * const bssid_sta_receive_network_ids) = 0;
+
+	virtual eap_status_e complete_get_802_11_authentication_mode(
+		const eap_status_e completion_status,
+		const eap_am_network_id_c * const receive_network_id,
+		const eapol_key_802_11_authentication_mode_e mode) = 0;
+
+	virtual eap_status_e complete_disassociation(
+		const bool complete_to_lower_layer,
+		const eap_am_network_id_c * const receive_network_id) = 0;
+
+	//--------------------------------------------------
 }; // class abs_eapol_core_c
 
 #endif //#if !defined(_ABS_EAPOL_CORE_H_)
--- a/eapol/eapol_framework/eapol_common/include/abs_eapol_key_state.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/abs_eapol_key_state.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7.1.2 %
+* %version: %
 */
 
 #if !defined(_ABS_EAPOL_KEY_STATE_H_)
@@ -128,17 +128,6 @@
 		const u32_t id) = 0;
 
 	/**
-	 * The cancel_all_timers() function cancels all timers.
-	 * User should use this in termination of the stack before
-	 * the adaptation module of tools is deleted.
-	 * Preferred mode is to cancel each timer directly
-	 * using cancel_timer() function.
-	 *
-	 * Adaptation module internally implements the timer.
-	 */
-	virtual eap_status_e cancel_all_timers() = 0;
-
-	/**
 	 * All STAs contain a global Key Counter which is 256 bits in size.
 	 * It should be initialized at system boot up time to a fresh cryptographic quality random number.
 	 * Refer to Annex I.9 on random number generation. It is recommended that the counter value is initialized to:
--- a/eapol/eapol_framework/eapol_common/include/abs_eapol_key_state_map.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/abs_eapol_key_state_map.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7 %
+* %version: %
 */
 
 #if !defined(_ABS_EAPOL_KEY_STATE_MAP_H_)
--- a/eapol/eapol_framework/eapol_common/include/abs_eapol_message_wlan_authentication.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/abs_eapol_message_wlan_authentication.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 14 %
+* %version: %
 */
 
 #if !defined(_ABS_EAPOL_MESSAGE_WLAN_AUTHENTICATION_H_)
--- a/eapol/eapol_framework/eapol_common/include/abs_eapol_wlan_authentication.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/abs_eapol_wlan_authentication.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 2.1.2 %
+* %version: 6 %
 */
 
 #if !defined(_ABS_WLAN_AUTHENTICATION_H_)
@@ -142,6 +142,11 @@
 		const simple_config_payloads_c * const other_configuration) = 0;
 #endif // #if defined(USE_EAP_SIMPLE_CONFIG)
 
+	virtual eap_status_e complete_check_pmksa_cache(
+		EAP_TEMPLATE_CONST eap_array_c<eap_am_network_id_c> * const bssid_sta_receive_network_ids) = 0;
+
+	virtual eap_status_e complete_disassociation(
+		const eap_am_network_id_c * const receive_network_id) = 0;
 
 	//--------------------------------------------------
 }; // class abs_eapol_wlan_authentication_c
--- a/eapol/eapol_framework/eapol_common/include/abs_eapol_wlan_database_reference_if.h	Thu May 13 22:51:27 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  EAP and WLAN authentication protocols.
-*
-*/
-
-/*
-* %version: 6 %
-*/
-
-#if !defined(_ABS_EAPOL_WLAN_DATABASE_REFERENCE_IF_H_)
-#define _ABS_EAPOL_WLAN_DATABASE_REFERENCE_IF_H_
-
-//--------------------------------------------------
-
-#include "eap_am_export.h"
-#include "eap_am_types.h"
-#include "eap_status.h"
-
-
-/// This class is abstract interface to reference of WLAN database of the current connection.
-class EAP_EXPORT abs_eapol_wlan_database_reference_if_c
-{
-
-private:
-	//--------------------------------------------------
-
-	//--------------------------------------------------
-
-	//--------------------------------------------------
-public:
-	//--------------------------------------------------
-
-	virtual ~abs_eapol_wlan_database_reference_if_c()
-	{
-	}
-
-	/**
-	 * The constructor of the abs_eapol_wlan_database_reference_if_c class does nothing special.
-	 */
-	virtual eap_status_e get_wlan_database_reference_values(
-		eap_variable_data_c * const reference) const = 0;
-
-}; // class abs_eapol_wlan_database_reference_if_c
-
-
-#endif //#if !defined(_ABS_EAPOL_WLAN_DATABASE_REFERENCE_IF_H_)
-
-//--------------------------------------------------
-
-
-// End.
--- a/eapol/eapol_framework/eapol_common/include/abs_ethernet_core.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/abs_ethernet_core.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 2.1.2 %
+* %version: 9 %
 */
 
 #if !defined(_ABS_ETHERNET_CORE_H_)
@@ -25,7 +25,9 @@
 #include "eap_header.h"
 #include "eap_array.h"
 #include "eapol_key_state.h"
-
+#if defined(USE_EAP_SIMPLE_CONFIG)
+	#include "abs_eap_configuration_if.h"
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
 
 class abs_eapol_core_c;
 class eap_am_network_id_c;
@@ -171,6 +173,32 @@
 
 	virtual eap_status_e add_rogue_ap(eap_array_c<eap_rogue_ap_entry_c> & rogue_ap_list) = 0;
 
+	virtual eap_status_e complete_check_pmksa_cache(
+		EAP_TEMPLATE_CONST eap_array_c<eap_am_network_id_c> * const bssid_sta_receive_network_ids) = 0;
+
+#if defined(USE_EAP_SIMPLE_CONFIG)
+	/**
+	 * This function tells AM to save SIMPLE_CONFIG configuration parameters.
+	 * This is always syncronous call.
+	 */
+	virtual eap_status_e save_simple_config_session(
+		const simple_config_state_e state,
+		EAP_TEMPLATE_CONST eap_array_c<simple_config_credential_c> * const credential_array,
+		const eap_variable_data_c * const new_password,
+		const simple_config_Device_Password_ID_e Device_Password_ID,
+		const simple_config_payloads_c * const other_configuration
+		) = 0;
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+
+	virtual eap_status_e complete_get_802_11_authentication_mode(
+		const eap_status_e completion_status,
+		const eap_am_network_id_c * const receive_network_id,
+		const eapol_key_802_11_authentication_mode_e mode) = 0;
+
+	virtual eap_status_e complete_disassociation(
+		const bool complete_to_lower_layer,
+		const eap_am_network_id_c * const receive_network_id) = 0;
+
 	//--------------------------------------------------
 }; // class abs_ethernet_core_c
 
--- a/eapol/eapol_framework/eapol_common/include/asn1_der_type.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/asn1_der_type.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 30 %
+* %version: %
 */
 
 #if !defined(_ASN1_TYPE_H_)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/include/dummy_eap_core.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,738 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+/**
+ *  @mainpage EAP Core documentation.
+ *  
+ *  @section intro Introduction
+ *  This is a EAP Core documentation generated by doxygen.
+ *  First read <a href="../S60_3_1_EAP_Core.doc">S60_3_1_EAP_Core.doc</a>
+ *  file from <a href="..">EAPOL/documentation</a> directory.
+ *  Release notes are in file <a href="../../../../../wlan_linux/wlaneapol_linux/release_notes.txt">release_notes.txt</a>
+ *  
+ *  @section install Installation
+ *  Installation instructions are in file <a href="../../../../../wlan_linux/wlaneapol_linux/readme.txt">EAPOL/readme.txt</a>.
+ *  
+ *  @section classes Most crucial classes
+ *  The most crucial classes are dummy_eap_core_c, abs_eap_core_c,
+ *  eap_base_type_c and abs_eap_base_type_c.
+ *
+ *  Header files are stored to a directory <a href="../../../include">EAPOL/include</a>.
+ *  Implementation of dummy_eap_core_c class is in a file <a href="../../../core/eap_core.cpp">
+ *  EAPOL/core/eap_core.cpp</a>. Implementation of eap_base_type_c class is in a file
+ *  <a href="../../../common/eap_base_type.cpp">EAPOL/common/eap_base_type.cpp</a>.
+ *  
+ *  @section eap_types Implemented EAP-types
+ *  
+ *  @subsection GSMSIM EAP/SIM
+ *  EAP/SIM implementation is in a directory
+ *  <a href="../../../type/gsmsim">EAPOL/type/gsmsim</a>.
+ *  EAP/SIM is specified in draft-haverinen-pppext-eap-sim-xx.txt.
+ *  The most current is
+ *  <a href="../../type/gsmsim/doc/rfc4186.txt">
+ *  RFC 4186</a>.
+ *  IETF drafts and RFC are stored to a directory <a href="../../type/gsmsim/doc">
+ *  EAPOL/type/gsmsim/documentation</a>.
+ *  The document
+ *  <a href="../../type/gsmsim/doc/GSMSIM.doc">GSMSIM.doc</a>
+ *  includes implementation notes of GSMSIM.
+ *  
+ *  @subsection EAP_AKA EAP/AKA
+ *  EAP/AKA implementation is in a directory
+ *  <a href="../../../type/aka">EAPOL/type/aka</a>.
+ *  EAP/AKA is specified in draft-arkko-pppext-eap-aka-xx.txt.
+ *  The most current is
+ *  <a href="../../type/aka/doc/rfc4187.txt">
+ *  RFC 4187</a>.
+ *  IETF drafts are stored to a directory <a href="../../type/aka/doc">
+ *  EAPOL/type/aka/documentation</a>.
+ *  
+ *  @subsection EAP_TLS_PEAP EAP/TLS, PEAP and TTLS
+ *  Implementation design and architecture of EAP/TLS, PEAP and TTLS is in
+ *  <a href="../../type/tls_peap/doc/EAP_TLS_PEAP.doc">EAP_TLS_PEAP.doc</a>
+ *  file in <a href="../../type/tls_peap/doc">EAPOL/type/tls_peap/documentation</a> directory.
+ *  EAP/TLS and PEAP implementation will be in a directory
+ *  <a href="../../../type/tls_peap">EAPOL/type/tls_peap</a>.
+ *  TLS is specified in <a href="../../type/tls_peap/doc/rfc2246.txt">rfc2246.txt</a>.
+ *  EAP/TLS is specified in <a href="../../type/tls_peap/doc/rfc2716.txt">rfc2716.txt</a>.
+ *  PEAPv2 is specified in <a href="../../type/tls_peap/doc/draft-josefsson-pppext-eap-tls-eap-08.txt">draft-josefsson-pppext-eap-tls-eap-08.txt</a>.
+ *  PEAPv1 is specified in <a href="../../type/tls_peap/doc/draft-josefsson-pppext-eap-tls-eap-05.txt">draft-josefsson-pppext-eap-tls-eap-05.txt</a>.
+ *  Windows XP- PEAPv0 is specified in <a href="../../type/tls_peap/doc/draft-kamath-pppext-peapv0-00.txt">draft-kamath-pppext-peapv0-00.txt</a>.
+ *  TTLS is specified in <a href="../../type/tls_peap/doc/draft-ietf-pppext-eap-ttls-04.txt">draft-ietf-pppext-eap-ttls-04.txt</a>.
+ *  
+ *  @subsection EAP_MsChapv2 EAP/MsChapv2
+ *  EAP/MsChapv2 implementation is in a directory
+ *  <a href="../../../type/mschapv2">EAPOL/type/mschapv2</a>.
+ *  EAP/MsChapv2 is specified in draft-kamath-pppext-eap-mschapv2-XX.txt, rfc2433.txt and rfc2759.txt.
+ *  The most current is
+ *  <a href="../../type/mschapv2/doc/draft-kamath-pppext-eap-mschapv2-01.txt">
+ *  EAP/MsChapv2 draft version 2</a>.
+ *  See also <a href="../../type/mschapv2/doc/rfc2433.txt">rfc2433.txt</a>
+ *  and <a href="../../type/mschapv2/doc/rfc2759.txt">rfc2759.txt</a>.
+ *  IETF drafts are stored to a directory <a href="../../type/mschapv2/doc">
+ *  EAPOL/type/mschapv2/doc</a>.
+ *  
+ *  @subsection EAP_SecurID_GTC EAP/SecurID and GTC
+ *  EAP/SecurID implementation is in a directory
+ *  <a href="../../../type/securid">EAPOL/type/securid</a>.
+ *  EAP/SecurID is specified in draft-josefsson-eap-securid-XX.txt.
+ *  The most current is
+ *  <a href="../../type/securid/doc/draft-josefsson-eap-securid-01.txt">
+ *  EAP/SecurID draft version 1</a>.
+ *  IETF drafts are stored to a directory <a href="../../type/securid/doc">
+ *  EAPOL/type/securid/documentation</a>.
+ *  
+ *  @subsection EAP_LEAP EAP/LEAP
+ *  EAP/LEAP implementation is in a directory
+ *  <a href="../../../type/leap">EAPOL/type/leap</a>.
+ *  EAP/LEAP documentation is not included here.
+ *  
+ *  @subsection SAE Experimental Security Association for EAPOL (not used)
+ *  SAE implementation is in a directory <a href="../../../../../wlan_testing/wlaneapol_testing/SAE">EAPOL/SAE</a>.
+ *  Document defining SAE is <a href="../../../../../wlan_testing/wlaneapol_testing/SAE/documentation/EAPOL_SA.doc">EAPOL_SA.doc</a>.
+ *  This is a very experimental test implementation.
+ *  Idea is to use Diffie-Hellman to create keys for a anonymous EAPOL tunnel.
+ *  Any EAP-type could then run inside the tunnel.
+ *  This fixes the problem of current EAPOL over WLAN.
+ *  EAP was designed for poin to point environment and EAPOL to non-shared environment.
+ *  
+ *  NOTE SAE is not used anywhere.
+ *
+ *  @section Symbian Symbian Plug-in
+ *  EAP Type Plug-in Architecture for Symbian is specified in
+ *  <a href="../../am/type/symbian/plugin/doc/eap_plugin_architecture.doc">
+ *  eap_plugin_architecture.doc</a>.
+ *  
+ */
+
+
+#if !defined(_DUMMY_EAP_CORE_H_)
+#define _DUMMY_EAP_CORE_H_
+
+#include "eap_am_export.h"
+#include "abs_eap_base_type.h"
+#include "eap_core_map.h"
+#include "eap_am_network_id.h"
+#include "abs_eap_stack_interface.h"
+#include "eap_configuration_field.h"
+#include "abs_eap_core_map.h"
+#include "eap_core.h"
+
+class abs_eap_core_c;
+class abs_eap_am_tools_c;
+class eap_core_retransmission_c;
+class eap_base_type_c;
+class eap_variable_data_c;
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ *  @defgroup EAP_Core_config_options Configuration options of EAP Core.
+ *  The following configuration options are read through abs_eap_base_type_c::read_configure() function.
+ *  @{
+ */
+
+
+
+//--------------------------------------------------------------------------------------------------
+
+
+
+/// A eap_core_c class implements the basic functionality of EAP-type.
+class EAP_EXPORT dummy_eap_core_c
+: public abs_eap_core_map_c
+, public abs_eap_base_type_c
+, public abs_eap_base_timer_c
+, public abs_eap_stack_interface_c
+{
+private:
+	//--------------------------------------------------
+
+	/// This is back pointer to object which created this object.
+	/// Packets are sent to the partner.
+	abs_eap_core_c *m_partner;
+
+	/// This is pointer to the tools class.
+	abs_eap_am_tools_c * const m_am_tools;
+
+	/// This stores eap_base_type objects using eap_variable_data selector.
+	eap_core_map_c<eap_base_type_c, abs_eap_core_map_c, eap_variable_data_c> m_type_map;
+
+	/// This stores the current EAP-type. When requested, we send our ID using 
+	/// our default EAP-type. This is our best quess of other peer's EAP-type.
+	/// Other peer will sent the real EAP-type later and we can NAK it then
+	/// and send our own EAP-type. This is due the limitations of EAP-protocol.
+	eap_type_value_e m_current_eap_type;
+
+	/// This is our default EAP-type.
+	eap_type_value_e m_default_eap_type;
+
+	/// This is the queried EAP-identity.
+	/// This is saved because other EAP-types may be load afterwards
+	/// and they may query EAP-identity.
+	eap_variable_data_c m_eap_identity;
+
+	/// This is offset in bytes of the EAP-type header.
+	u32_t m_eap_header_offset;
+
+	/// This is maximum transfer unit in bytes.
+	u32_t m_MTU;
+
+	/// This is length of the trailer in bytes.
+	u32_t m_trailer_length;
+
+	/// This is network identity of the received packet.
+	eap_am_network_id_c m_receive_network_id;
+
+	/// Re-transmission is used to test protocols.
+	/// This stores the information to resent a message. This is used for testing purposes.
+	eap_core_retransmission_c *m_retransmission;
+
+	/// Re-transmission is used to test protocols.
+	/// This is the time after resent a message. This is used for testing purposes.
+	u32_t m_retransmission_time;
+
+	/// Re-transmission is used to test protocols.
+	/// This is the maximum count of retransmission of one message. This is used for testing purposes.
+	u32_t m_retransmission_counter;
+
+	/// This is the maximum time authentication could succeed.
+	/// Authentication is terminated after this time elapses.
+	/// The EAP-type could change the timeout by calling set_session_timeout() function.
+	u32_t m_session_timeout;
+
+	u32_t m_eap_core_failure_received_timeout;
+
+	u32_t m_remove_session_timeout;
+
+#if defined(USE_EAP_CORE_WAIT_REQUEST_TYPE_TIMER)
+	u32_t m_wait_eap_request_type_timeout;
+	bool m_wait_eap_request_type_timeout_set;
+#endif //#if defined(USE_EAP_CORE_WAIT_REQUEST_TYPE_TIMER)
+
+	/// Latest received EAP-identifier. Used only for EAP-Request/Identity handling in client.
+	/// Ensures that the EAP-Response/Identity is sent with the latest EAP-identifier.
+	u8_t m_eap_identity_request_identifier_client;
+
+	/// This indicates whether this object is client (true) or server (false).
+	/// In terms of EAP-protocol whether this network entity is EAP-supplicant (true) or EAP-authenticator (false).
+	bool m_is_client;
+
+	/// This indicates whether the authentication role of this object is client (true) or server (false).
+	/// In terms of EAP-protocol whether this network entitys authentication role is EAP-supplicant (true) or EAP-authenticator (false).
+	/// NOTE the LEAP type changes authentication role during the authentication session.
+	bool m_is_client_role;
+
+	/// This indicates whether this object was generated successfully.
+	bool m_is_valid;
+
+	/// Client has initiated restart.
+	bool m_client_restart_authentication_initiated;
+
+	/// This flag indicates that this object is marked to removed asynchronously.
+	/// The very same object could be taken use before the removing timer elapses.
+	bool m_marked_removed;
+
+	/// This flag prevents server receiving of multiple EAP-Response/Identity message.
+	/// This is set true after the server accepts EAP-Response/Identity message.
+	bool m_eap_identity_response_accepted;
+
+	/// Function shutdown() is called already.
+	bool m_shutdown_was_called;
+
+	/// Server received EAP-Response from client. Server must not sent any other EAP-type. Server could send EAP-Failure or EAP-Success.
+	/// Client sent a response. Client must not accept any other EAP-type.
+	bool m_eap_type_response_sent;
+
+	/// Tells whether this is tunneled EAP-session. For example inside PEAP or TTLS tunnel.
+	/// This causes some changes to timeouts.
+	bool m_is_tunneled_eap;
+
+#if defined(USE_EAP_CORE_SERVER)
+	/// If this flag is true EAP-Response/Nak is processed immediately.
+	/// If this flag is false EAP-Response/Nak is processed after a timeout.
+	/// There might be received more suitable EAP-Response.
+	bool m_process_eap_nak_immediately;
+
+	/// EAP-Response/Nak is initiated.
+	bool m_nak_process_timer_active;
+
+	/// This flag prevents server sending of multiple EAP-Request/Identity message.
+	bool m_eap_identity_request_send;
+
+	/// This is set true after the server receives EAP-Response/Identity message.
+	bool m_eap_identity_response_received;
+
+	/// This flag is set true after a EAP-Failure is sent.
+	bool m_eap_failure_sent;
+
+	/// This flag selects whether EAP-Success is send after state notification is forwarded to lower layer (true)
+	/// or EAP-Success is send before state notification is forwarded to lower layer (false).
+	bool m_send_eap_success_after_notification;
+
+#if defined(USE_EAP_CORE_WAIT_REQUEST_TYPE_TIMER)
+	// This flag selects whether EAP-Request/Identity is send (true) or not (false).
+	bool m_skip_eap_request_identity;
+#endif //#if defined(USE_EAP_CORE_WAIT_REQUEST_TYPE_TIMER)
+#endif //#if defined(USE_EAP_CORE_SERVER)
+
+	bool m_use_eap_expanded_type;
+
+	/// Some of the protocols terminates with EAP-Failure. This flag tells to ignore EAP-Failure.
+	bool m_ignore_eap_failure;
+
+	bool m_ignore_notifications;
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	/**
+	 * Re-transmission is used to test protocols.
+	 * This function resends the packet.
+	 */
+	EAP_FUNC_IMPORT eap_status_e resend_packet(
+		const eap_am_network_id_c * const send_network_id,
+		eap_buf_chain_wr_c * const sent_packet,
+		const u32_t header_offset,
+		const u32_t data_length,
+		const u32_t buffer_free,
+		const u32_t retransmission_counter
+		);
+
+	/** 
+	 * Re-transmission is used to test protocols.
+	 * This function cancels retransmissions.
+	 */
+	EAP_FUNC_IMPORT eap_status_e cancel_retransmission();
+
+	/**
+	 * Re-transmission is used to test protocols.
+	 * This function inits retransmission of sent packet.
+	 */
+	EAP_FUNC_IMPORT eap_status_e init_retransmission(
+		const eap_am_network_id_c * const send_network_id,
+		eap_buf_chain_wr_c * const sent_packet,
+		const u32_t header_offset,
+		const u32_t data_length,
+		const eap_code_value_e eap_code,
+		const u8_t eap_identifier,
+		const eap_type_value_e eap_type
+		);
+
+	/**
+	 * This function cancels previous session timeout and initializes new timeout for the session.
+	 */
+	EAP_FUNC_IMPORT eap_status_e initialize_session_timeout(
+		const u32_t session_timeout_ms);
+
+	/**
+	 * This function cancels timeout for a session.
+	 */
+	EAP_FUNC_IMPORT eap_status_e cancel_session_timeout();
+
+	/**
+	 * This function calls shutdown() for one eap_base_type_c object.
+	 */
+	EAP_FUNC_IMPORT static eap_status_e shutdown_operation(
+		eap_base_type_c * const value,
+		abs_eap_am_tools_c * const m_am_tools);
+
+	/**
+	 * This function calls reset() for one eap_base_type_c object.
+	 */
+	EAP_FUNC_IMPORT static eap_status_e reset_operation(
+		eap_base_type_c * const handler,
+		abs_eap_am_tools_c * const m_am_tools);
+
+	EAP_FUNC_IMPORT eap_status_e client_proposes_eap_types(
+		const eap_am_network_id_c * const receive_network_id,
+		const u8_t eap_identifier);
+
+	/**
+	 * This function processes EAP-packet with known EAP-type.
+	 */
+	EAP_FUNC_IMPORT eap_status_e packet_process_type(
+		const eap_type_value_e used_eap_type,
+		const eap_am_network_id_c * const receive_network_id,
+		eap_general_header_base_c * const packet_data,
+		const u32_t packet_length);
+
+#if defined(USE_EAP_CORE_SERVER)
+	/**
+	 * This function re-starts authentication with new EAP-type.
+	 * Only server calls this function.
+	 */
+	EAP_FUNC_IMPORT eap_status_e restart_with_new_type(
+		const eap_type_value_e used_eap_type,
+		const eap_am_network_id_c * const receive_network_id,
+		const u8_t eap_identifier);
+#endif //#if defined(USE_EAP_CORE_SERVER)
+
+#if defined(USE_EAP_CORE_SERVER)
+	EAP_FUNC_IMPORT eap_status_e handle_eap_identity_response(
+		eap_base_type_c * const handler,
+		const eap_type_value_e used_eap_type,
+		const eap_am_network_id_c * const receive_network_id,
+		eap_header_wr_c * const eap,
+		const u32_t packet_length);
+#endif //#if defined(USE_EAP_CORE_SERVER)
+
+	/**
+	 * This function handles EAP-Request/Identity.
+	 */
+	EAP_FUNC_IMPORT eap_status_e handle_eap_identity_request(
+		const eap_type_value_e used_eap_type,
+		const u8_t eap_identifier,
+		const eap_am_network_id_c * const receive_network_id);
+
+	/**
+	 * This function creates EAP-Response/Identity.
+	 */
+	EAP_FUNC_IMPORT eap_status_e create_eap_identity_response(
+		eap_buf_chain_wr_c * const response_packet,
+		const eap_variable_data_c * const identity,
+		const u8_t eap_identifier
+		);
+
+	/**
+	 * This function sends EAP-Response/Identity.
+	 */
+	EAP_FUNC_IMPORT eap_status_e send_eap_identity_response(
+		const eap_am_network_id_c * const send_network_id,
+		const eap_variable_data_c * const identity,
+		const u8_t eap_identifier);
+
+	/**
+	 * This function sends EAP-Response/Notification.
+	 */
+	EAP_FUNC_IMPORT eap_status_e send_eap_notification_response(
+		const eap_am_network_id_c * const send_network_id,
+		const u8_t eap_identifier);
+
+	/**
+	 * This function initializes timeout for received EAP-Failure.
+	 */
+	EAP_FUNC_IMPORT eap_status_e set_eap_failure_timeout();
+
+	/**
+	 * This function cancels timeout for received EAP-Failure.
+	 */
+	EAP_FUNC_IMPORT eap_status_e cancel_eap_failure_timeout();
+
+#if defined(USE_EAP_CORE_WAIT_REQUEST_TYPE_TIMER)
+	eap_status_e set_wait_eap_request_type_timeout();
+
+	eap_status_e cancel_wait_eap_request_type_timeout();
+#endif //#if defined(USE_EAP_CORE_WAIT_REQUEST_TYPE_TIMER)
+
+	EAP_FUNC_IMPORT eap_status_e asynchronous_init_remove_eap_session();
+
+	EAP_FUNC_IMPORT eap_status_e initialize_asynchronous_init_remove_eap_session(
+		const u32_t remove_session_timeout);
+
+	EAP_FUNC_IMPORT eap_status_e cancel_asynchronous_init_remove_eap_session();
+
+	eap_status_e init_end_of_session(
+		const abs_eap_state_notification_c * const state);
+
+	eap_status_e set_eap_identity_routing_info_and_nai_decoration(
+		eap_variable_data_c * const identity);
+
+	//--------------------------------------------------
+protected:
+	//--------------------------------------------------
+
+	//--------------------------------------------------
+public:
+	//--------------------------------------------------
+
+	/**
+	 * The destructor of the eap_core class does nothing special.
+	 */
+	EAP_FUNC_IMPORT virtual ~dummy_eap_core_c();
+
+	/**
+	 * The constructor initializes member attributes using parameters passed to it.
+	 * @param tools is pointer to the tools class. @see abs_eap_am_tools_c.
+	 * @param partner is back pointer to object which created this object.
+	 * @param is_client_when_true indicates whether the network entity should act
+	 * @param is_tunneled_eap tells the EAP is run in tunnel (PEAP or other).
+	 * as a client (true) or server (false), in terms of EAP-protocol
+	 * whether this network entity is EAP-supplicant (true) or EAP-authenticator (false).
+	 */
+	EAP_FUNC_IMPORT dummy_eap_core_c(
+		abs_eap_am_tools_c * const tools,
+		abs_eap_core_c * const partner,
+		const bool is_client_when_true,
+		const eap_am_network_id_c * const receive_network_id,
+		const bool is_tunneled_eap);
+
+	/**
+	 * The load_type() function function indicates the lower level to load
+	 * new module including EAP-type. The type parameter is the requested EAP-type.
+	 * @param type is the identifier of the required EAP type.
+	 * @return Function returns pointer to the EAP type object.
+	 */
+	EAP_FUNC_IMPORT eap_base_type_c * load_type(
+		const eap_type_value_e type,
+		const eap_type_value_e tunneling_type,
+		const eap_am_network_id_c * const receive_network_id);
+
+	EAP_FUNC_IMPORT void trace_eap_packet(
+		eap_const_string prefix,
+		const eap_header_wr_c * const eap_header);
+
+	// This is documented in abs_eap_stack_interface_c::packet_process().
+	EAP_FUNC_IMPORT eap_status_e packet_process(
+		const eap_am_network_id_c * const receive_network_id,
+		eap_general_header_base_c * const packet_data,
+		const u32_t packet_length); 
+
+	// This is documented in abs_eap_base_type_c::packet_send().
+	EAP_FUNC_IMPORT eap_status_e packet_send(
+		const eap_am_network_id_c * const send_network_id,
+		eap_buf_chain_wr_c * const sent_packet,
+		const u32_t header_offset,
+		const u32_t data_length,
+		const u32_t buffer_length); 
+
+	/**
+	 * The get_partner() function returns pointer to partner class.
+	 */
+	EAP_FUNC_IMPORT abs_eap_core_c * get_partner();
+
+	/**
+	 * The set_partner() function sets pointer to partner class.
+	 */
+	EAP_FUNC_IMPORT void set_partner(abs_eap_core_c * const partner);
+
+	// This is documented in abs_eap_base_type_c::get_header_offset().
+	EAP_FUNC_IMPORT u32_t get_header_offset(
+		u32_t * const MTU,
+		u32_t * const trailer_length);
+
+	// This is documented in abs_eap_base_type_c::load_module().
+	EAP_FUNC_IMPORT eap_status_e load_module(
+		const eap_type_value_e type,
+		const eap_type_value_e /* tunneling_type */,
+		abs_eap_base_type_c * const partner,
+		eap_base_type_c ** const eap_type,
+		const bool is_client_when_true,
+		const eap_am_network_id_c * const receive_network_id);
+
+	// This is documented in abs_eap_base_type_c::unload_module().
+	EAP_FUNC_IMPORT eap_status_e unload_module(
+		const eap_type_value_e type); 
+
+	/**
+	 * The adaptation module calls the eap_acknowledge() function after
+	 * any Network Protocol packet is received. This is used as a success indication.
+	 * This is described in RFC 2284 "PPP Extensible Authentication Protocol (EAP)".
+	 * Mostly there is only one session in the client.
+	 * The server does not need eap_acknowledge() function because
+	 * server (EAP-authenticator) sends the EAP-success message.
+	 */
+	EAP_FUNC_IMPORT eap_status_e eap_acknowledge(
+		const eap_am_network_id_c * const receive_network_id); 
+
+	// This is documented in abs_eap_base_type_c::restart_authentication().
+	EAP_FUNC_IMPORT eap_status_e restart_authentication(
+		const eap_am_network_id_c * const send_network_id,
+		const bool is_client_when_true);
+
+	/**
+	 * The EAP Core calls the send_eap_nak_response() function
+	 * when EAP-authentication with requested EAP type is not possible.
+	 * @param receive_network_id includes the addresses (network identity) and packet type.
+	 * @param eap_identifier is the EAP-Identifier to be used with EAP-Nak message.
+	 * @param preferred_eap_type is the acceptable EAP-Type to be informed with an other peer.
+	 */
+	EAP_FUNC_IMPORT eap_status_e send_eap_nak_response(
+		const eap_am_network_id_c * const receive_network_id,
+		const u8_t eap_identifier,
+		const eap_array_c<eap_type_value_e> * const eap_type_list);
+
+
+#if defined(USE_EAP_CORE_SERVER)
+
+	/**
+	 * The EAP Core calls the send_eap_identity_request() function
+	 * when EAP-authentication is needed with another peer.
+	 * @param network_id includes the addresses (network identity) and packet type.
+	 */
+	EAP_FUNC_IMPORT eap_status_e send_eap_identity_request(
+		const eap_am_network_id_c * const network_id);
+
+	/**
+	 * This function sends EAP-Success.
+	 */
+	EAP_FUNC_IMPORT eap_status_e send_eap_success(
+		const eap_am_network_id_c * const send_network_id,
+		const u8_t eap_identifier);
+
+	/**
+	 * This function sends EAP-Failure.
+	 */
+	EAP_FUNC_IMPORT eap_status_e send_eap_failure(
+		const eap_am_network_id_c * const send_network_id,
+		const u8_t eap_identifier);
+
+#endif //#if defined(USE_EAP_CORE_SERVER)
+
+
+	// This is documented in abs_eap_base_type_c::packet_data_crypto_keys().
+	EAP_FUNC_IMPORT eap_status_e packet_data_crypto_keys(
+		const eap_am_network_id_c * const send_network_id,
+		const eap_master_session_key_c * const master_session_key
+		);
+
+	// This is documented in abs_eap_stack_interface_c::configure().
+	EAP_FUNC_IMPORT eap_status_e configure();
+
+	// This is documented in abs_eap_stack_interface_c::shutdown().
+	EAP_FUNC_IMPORT eap_status_e shutdown();
+
+	// This is documented in abs_eap_base_type_c::read_configure().
+	EAP_FUNC_IMPORT virtual eap_status_e read_configure(
+		const eap_configuration_field_c * const field,
+		eap_variable_data_c * const data);
+
+	// This is documented in abs_eap_base_type_c::write_configure().
+	EAP_FUNC_IMPORT virtual eap_status_e write_configure(
+		const eap_configuration_field_c * const field,
+		eap_variable_data_c * const data);
+
+	// This is documented in abs_eap_stack_interface_c::set_is_valid().
+	EAP_FUNC_IMPORT void set_is_valid();
+
+	// This is documented in abs_eap_stack_interface_c::get_is_valid().
+	EAP_FUNC_IMPORT bool get_is_valid();
+
+	// This is documented in abs_eap_base_type_c::state_notification().
+	EAP_FUNC_IMPORT void state_notification(
+		const abs_eap_state_notification_c * const state);
+
+	// See abs_eap_base_timer_c::timer_expired().
+	EAP_FUNC_IMPORT eap_status_e timer_expired(
+		const u32_t id, void *data);
+
+	// See abs_eap_base_timer_c::timer_delete_data().
+	EAP_FUNC_IMPORT eap_status_e timer_delete_data(
+		const u32_t id, void *data);
+
+	/**
+	 * eap_core_map_c class increases reference count each time reference to stored object is get.
+	 * Here is always just one state for one session so no references are used.
+	 */
+	EAP_FUNC_IMPORT void object_increase_reference_count();
+
+	/**
+	 * eap_core_map_c class increases reference count each time reference to stored object is get.
+	 *  Here is always just one state for one session so no references are used.
+	 */
+	EAP_FUNC_IMPORT u32_t object_decrease_reference_count();
+
+	/**
+	 * @{ Add configuration of accepted EAP-types. }
+	 */
+	// This is documented in abs_eap_base_type_c::check_is_valid_eap_type().
+	EAP_FUNC_IMPORT eap_status_e check_is_valid_eap_type(const eap_type_value_e eap_type);
+
+	// This is commented in abs_eap_base_type_c::get_eap_type_list().
+	EAP_FUNC_IMPORT eap_status_e get_eap_type_list(
+		eap_array_c<eap_type_value_e> * const eap_type_list);
+
+	/**
+	 * Gets flag whether this session is marked removed.
+	 * Session is removed later if it is not reused.
+	 */
+	EAP_FUNC_IMPORT bool get_marked_removed();
+
+	/**
+	 * Marks this session removed.
+	 * Session is removed later if it is not reused.
+	 */
+	EAP_FUNC_IMPORT void set_marked_removed();
+
+	/**
+	 * Marks this session not removed.
+	 * Session is not removed it is reused.
+	 */
+	EAP_FUNC_IMPORT void unset_marked_removed();
+
+	/**
+	 * Prevents all notifications.
+	 */
+	EAP_FUNC_IMPORT void ignore_notifications();
+
+	/**
+	 * This function must reset the state of object to same as 
+	 * state was after the configure() function call.
+	 * If object reset succeeds this function must return eap_status_ok.
+	 * If object reset fails this function must return corresponding error status.
+	 * @return This function returns the status of reset operation.
+	 */
+	EAP_FUNC_IMPORT eap_status_e reset();
+
+	// This is documented in abs_eap_base_type_c::complete_eap_identity_query().
+	EAP_FUNC_IMPORT eap_status_e complete_eap_identity_query(
+		const eap_am_network_id_c * const send_network_id,
+		const eap_variable_data_c * const identity,
+		const u8_t eap_identifier);
+
+	// This is documented in abs_eap_base_type_c::get_saved_eap_identity().
+	EAP_FUNC_IMPORT eap_status_e get_saved_eap_identity(eap_variable_data_c * const identity);
+
+	// This is documented in abs_eap_base_type_c::set_session_timeout().
+	EAP_FUNC_IMPORT eap_status_e set_session_timeout(
+		const u32_t session_timeout_ms);
+
+	// This is documented in abs_eap_base_type_c::set_timer().
+	EAP_FUNC_IMPORT eap_status_e set_timer(
+		abs_eap_base_timer_c * const p_initializer, 
+		const u32_t p_id, 
+		void * const p_data,
+		const u32_t p_time_ms);
+
+	// This is documented in abs_eap_base_type_c::cancel_timer().
+	EAP_FUNC_IMPORT eap_status_e cancel_timer(
+		abs_eap_base_timer_c * const p_initializer, 
+		const u32_t p_id);
+
+	// This is documented in abs_eap_base_type_c::set_authentication_role().
+	EAP_FUNC_IMPORT eap_status_e set_authentication_role(const bool when_true_set_client);
+
+	// This is documented in abs_eap_base_type_c::add_rogue_ap().
+	EAP_FUNC_IMPORT eap_status_e add_rogue_ap(eap_array_c<eap_rogue_ap_entry_c> & rogue_ap_list);
+
+	// This is documented in abs_eap_base_type_c::get_is_tunneled().
+	EAP_FUNC_IMPORT bool get_is_tunneled_eap() const;
+
+	//--------------------------------------------------
+}; // class dummy_eap_core_c
+
+
+#endif //#if !defined(_DUMMY_EAP_CORE_H_)
+
+//--------------------------------------------------
+
+
+
+// End.
--- a/eapol/eapol_framework/eapol_common/include/eap_array.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_array.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 4.1.5 %
+* %version: %
 */
 
 #if !defined(_EAP_ARRAY_H_)
--- a/eapol/eapol_framework/eapol_common/include/eap_array_algorithms.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_array_algorithms.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 19.1.4 %
+* %version: %
 */
 
 #if !defined(_EAP_ARRAY_ALGORITHMS_H_)
--- a/eapol/eapol_framework/eapol_common/include/eap_automatic_variable.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_automatic_variable.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 13.1.2 %
+* %version: %
 */
 
 #if !defined(_EAP_AUTOMATIC_VARIABLE_H_)
@@ -244,6 +244,8 @@
 	/// This is pointer to the string that will be traced on destructor.
 	eap_format_string m_string;
 
+	u32_t m_trace_flags;
+
 public:
 	
 	/**
@@ -257,7 +259,7 @@
 		{
 			EAP_TRACE_DEBUG(
 				m_am_tools, 
-				TRACE_FLAGS_DEFAULT, 
+				m_trace_flags, 
 				(EAPL("<<< %s <<<\n"), m_string));
 		}
 
@@ -271,7 +273,23 @@
 		abs_eap_am_tools_c * const tools,
 		eap_format_string string)
 		: m_am_tools(tools)
+		, m_string(string)
+		, m_trace_flags(TRACE_FLAGS_DEFAULT)
+	{
+		EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	}
+	
+	/**
+	 * The constructor sets the values for the member variables
+	 */	
+	eap_automatic_trace_string_c(
+		abs_eap_am_tools_c * const tools,
+		const u32_t flags,
+		eap_format_string string)
+		: m_am_tools(tools)
 		, m_string(string)	
+		, m_trace_flags(flags)
 	{
 		EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
--- a/eapol/eapol_framework/eapol_common/include/eap_base_type.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_base_type.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 4 %
+* %version: %
 */
 
 #if !defined(_EAP_BASE_TYPE_H_)
--- a/eapol/eapol_framework/eapol_common/include/eap_buffer.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_buffer.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7 %
+* %version: %
 */
 
 #if !defined(_EAP_BUFFER_H_)
--- a/eapol/eapol_framework/eapol_common/include/eap_config.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_config.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 4.1.2 %
+* %version: %
 */
 
 #if !defined(_EAP_CONFIG_H_)
@@ -497,6 +497,13 @@
 	false);
 
 
+EAP_CONFIGURATION_FIELD(
+	cf_str_EAPOL_TEST_use_pmkid_in_ie,
+	"EAPOL_TEST_use_pmkid_in_ie",
+	eap_configure_type_boolean,
+	false);
+
+
 /**
  *  This hex data configuration option value client MAC address for test use.
  */
@@ -690,6 +697,27 @@
 #endif //#if defined(USE_EAP_CONFIGURATION_TO_SKIP_USER_INTERACTIONS)
 
 
+/**
+ *  This special configuration option reads all defines configuration options.
+ *  Data is in message format. Please see eap_tlv_message_data_c.
+ */
+EAP_CONFIGURATION_FIELD(
+	cf_str_EAP_read_all_configurations,
+	"EAP_read_all_configurations",
+	eap_configure_type_all_configurations,
+	false);
+
+
+const u8_t EAP_WPS_CONFIGURATION_MEMORY_STORE_KEY[] = "eap_am_type_protected_setup shared key";
+
+enum eap_type_protected_setup_stored_e
+{
+	eap_type_protected_setup_stored_none,
+	eap_type_protected_setup_stored_preshared_key,
+	eap_type_protected_setup_stored_ssid,
+};
+
+
 /** @} */ // End of group Common_EAP_config_options.
 
 //--------------------------------------------------------------------------------------------------
--- a/eapol/eapol_framework/eapol_common/include/eap_configuration_field.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_configuration_field.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 4.1.2 %
+* %version: %
 */
 
 #if !defined(_EAP_CONFIGURATION_FIELD_H_)
@@ -43,6 +43,7 @@
 	eap_configure_type_u32array,
 	eap_configure_type_section,
 	eap_configure_type_subsection,
+	eap_configure_type_all_configurations, //< This is special type to read all configuration options. Data is in message format. Please see eap_tlv_message_data_c.
 };
 
 //--------------------------------------------------------------------------------------------------
@@ -177,6 +178,26 @@
 		return tmp;
 	}
 
+	static eap_const_string get_configure_type_string(const eap_configure_type_e type)
+	{
+		#if defined(USE_EAP_TRACE_STRINGS)
+		EAP_IF_RETURN_STRING(type, eap_configure_type_none)
+		else EAP_IF_RETURN_STRING(type, eap_configure_type_u32_t)
+		else EAP_IF_RETURN_STRING(type, eap_configure_type_boolean)
+		else EAP_IF_RETURN_STRING(type, eap_configure_type_string)
+		else EAP_IF_RETURN_STRING(type, eap_configure_type_hex_data)
+		else EAP_IF_RETURN_STRING(type, eap_configure_type_u32array)
+		else EAP_IF_RETURN_STRING(type, eap_configure_type_section)
+		else EAP_IF_RETURN_STRING(type, eap_configure_type_subsection)
+		else EAP_IF_RETURN_STRING(type, eap_configure_type_all_configurations)
+		else
+		#endif // #if defined(USE_EAP_TRACE_STRINGS)
+		{
+			EAP_UNREFERENCED_PARAMETER(type);
+			return EAPL("Unknown EAP-configure_type");
+		}
+	}
+
 private:
 	bool                 m_is_secret;
 	eap_configure_type_e m_type;
--- a/eapol/eapol_framework/eapol_common/include/eap_core.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_core.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 15 %
+* %version: %
 */
 
 /**
@@ -915,9 +915,6 @@
 		abs_eap_base_timer_c * const p_initializer, 
 		const u32_t p_id);
 
-	// This is documented in abs_eap_base_type_c::cancel_all_timers().
-	EAP_FUNC_IMPORT eap_status_e cancel_all_timers();
-
 	// This is documented in abs_eap_base_type_c::set_authentication_role().
 	EAP_FUNC_IMPORT eap_status_e set_authentication_role(const bool when_true_set_client);
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/include/eap_core_client_message_if.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,253 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 23 %
+*/
+
+#if !defined(_EAP_CORE_CLIENT_MESSAGE_IF_H_)
+#define _EAP_CORE_CLIENT_MESSAGE_IF_H_
+
+#include "eap_tools.h"
+#include "eap_am_export.h"
+#include "eap_session_core_base.h"
+#include "abs_eap_session_core.h"
+#include "eap_core_map.h"
+#include "abs_eap_stack_interface.h"
+#include "abs_eap_am_message_if.h"
+#include "eap_am_message_if.h"
+#include "eap_process_tlv_message_data.h"
+#include "eap_database_reference_if.h"
+
+class eap_tlv_header_c;
+
+
+/// A eap_core_client_message_if_c class implements mapping of EAP authentication sessions.
+/// Network identity separates parallel EAP authentication sessions.
+class EAP_EXPORT eap_core_client_message_if_c
+: public abs_eap_am_message_if_c
+, public eap_session_core_base_c
+, public abs_eap_base_timer_c
+, public abs_eap_stack_interface_c
+{
+private:
+	//--------------------------------------------------
+
+	/// This is pointer to the tools class.
+	abs_eap_am_tools_c * const m_am_tools;
+
+	/// eap_core_client_message_if_c deletes m_server_if in destructor.
+	eap_am_message_if_c * m_server_if;
+
+	/// This is back pointer to object which created this object.
+	/// Packets are sent to the partner.
+	abs_eap_session_core_c * const m_partner;
+
+	eap_status_e m_error_code;
+
+	eap_tlv_message_type_function_e m_error_function;
+
+	/// This is offset in bytes of the EAP header.
+	u32_t m_eap_header_offset;
+
+	/// This is maximum transfer unit in bytes.
+	u32_t m_MTU;
+
+	/// This is length of the trailer in bytes.
+	u32_t m_trailer_length;
+
+	/// This indicates whether this object is client (true) or server (false).
+	/// In terms of EAP-protocol whether this network entity is EAP-supplicant (true) or EAP-authenticator (false).
+	bool m_is_client;
+
+	/// This indicates whether this object was generated successfully.
+	bool m_is_valid;
+
+	bool m_shutdown_was_called;
+
+	// This is documented in abs_eap_stack_interface_c::set_is_valid().
+	void set_is_valid();
+
+	eap_status_e process_message(eap_process_tlv_message_data_c * const message);
+
+	eap_status_e process_error_message(
+		const eap_status_e error_code,
+		const eap_tlv_message_type_function_e function);
+
+	eap_status_e process_message_type_error(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e packet_send(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e state_notification(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e packet_data_crypto_keys(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e restart_authentication(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e new_protected_setup_credentials(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e complete_get_802_11_authentication_mode(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e complete_remove_eap_session(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e eap_mtu(
+		const u32_t MTU);
+
+	//--------------------------------------------------
+protected:
+	//--------------------------------------------------
+
+	//--------------------------------------------------
+public:
+	//--------------------------------------------------
+
+	/**
+	 * The destructor of the eap_core class does nothing special.
+	 */
+	EAP_FUNC_IMPORT EAP_FUNC_IMPORT virtual ~eap_core_client_message_if_c();
+
+	/**
+	 * The constructor initializes member attributes using parameters passed to it.
+	 * @param tools is pointer to the tools class. @see abs_eap_am_tools_c.
+	 * @param partner is back pointer to object which created this object.
+	 * @param is_client_when_true indicates whether the network entity should act
+	 * as a client (true) or server (false), in terms of EAP-protocol
+	 * whether this network entity is EAP-supplicant (true) or EAP-authenticator (false).
+	 */
+	EAP_FUNC_IMPORT eap_core_client_message_if_c(
+		abs_eap_am_tools_c * const tools,
+		eap_am_message_if_c * const server,
+		abs_eap_session_core_c * const partner,
+		const bool is_client_when_true);
+
+	void set_partner(abs_eap_am_message_if_c * const client);
+
+	/**
+	 * This function must reset the state of object to same as 
+	 * state was after the configure() function call.
+	 * If object reset succeeds this function must return eap_status_ok.
+	 * If object reset fails this function must return corresponding error status.
+	 * @return This function returns the status of reset operation.
+	 */
+	EAP_FUNC_IMPORT eap_status_e reset();
+
+	/**
+	 * This function cancels all EAP-sessions.
+	 * If this succeeds this function must return eap_status_ok.
+	 * If this fails this function must return corresponding error status.
+	 * @return This function returns the status of operation.
+	 */
+	EAP_FUNC_IMPORT eap_status_e cancel_all_eap_sessions();
+
+	// This is documented in abs_eap_stack_interface_c::packet_process().
+	EAP_FUNC_IMPORT eap_status_e packet_process(
+		const eap_am_network_id_c * const receive_network_id,
+		eap_general_header_base_c * const packet_data,
+		const u32_t packet_length); 
+
+	/**
+	 * The adaptation module calls the eap_acknowledge() function after
+	 * any Network Protocol packet is received. This is used as a success indication.
+	 * This is described in RFC 2284 "PPP Extensible Authentication Protocol (EAP)".
+	 * @param connection_handle separates the context of the acknowledged session.
+	 * Mostly there is only one session in the client.
+	 * The server does not need eap_acknowledge() function because
+	 * server (EAP-authenticator) sends the EAP-success message.
+	 */
+	EAP_FUNC_IMPORT eap_status_e eap_acknowledge(
+		const eap_am_network_id_c * const receive_network_id); 
+
+#if defined(USE_EAP_CORE_SERVER)
+	/**
+	 * The EAP Core calls the send_eap_identity_request() function
+	 * when EAP-authentication is needed with another peer.
+	 * @param network_id includes the addresses (network identity) and packet type.
+	 */
+	EAP_FUNC_IMPORT eap_status_e send_eap_identity_request(
+		const eap_am_network_id_c * const network_id);
+#endif //#if defined(USE_EAP_CORE_SERVER)
+
+	// This is documented in abs_eap_stack_interface_c::configure().
+	EAP_FUNC_IMPORT eap_status_e configure();
+
+	// This is documented in abs_eap_stack_interface_c::shutdown().
+	EAP_FUNC_IMPORT eap_status_e shutdown();
+
+	// This is documented in abs_eap_stack_interface_c::get_is_valid().
+	EAP_FUNC_IMPORT bool get_is_valid();
+
+	/**
+	 * This function creates EAP session object synchronously.
+	 * @param receive_network_id identifies the removed EAP session.
+	 */
+	EAP_FUNC_IMPORT eap_status_e create_eap_session(
+		const eap_am_network_id_c * const receive_network_id);
+
+	/**
+	 * This function removes EAP session object synchronously.
+	 * @param receive_network_id identifies the removed EAP session.
+	 */
+	EAP_FUNC_IMPORT eap_status_e remove_eap_session(
+		const bool complete_to_lower_layer,
+		const eap_am_network_id_c * const receive_network_id);
+
+	// See abs_eap_base_timer_c::timer_expired().
+	EAP_FUNC_IMPORT eap_status_e timer_expired(
+		const u32_t id, void *data);
+
+	// See abs_eap_base_timer_c::timer_delete_data().
+	EAP_FUNC_IMPORT eap_status_e timer_delete_data(
+		const u32_t id, void *data);
+
+	// See abs_eap_am_message_if_c::send_data().
+	EAP_FUNC_IMPORT eap_status_e send_data(const void * const data, const u32_t length);
+
+
+	EAP_FUNC_IMPORT eap_status_e set_eap_database_reference_values(
+		const eap_variable_data_c * const reference);
+
+	EAP_FUNC_IMPORT eap_status_e get_802_11_authentication_mode(
+		const eap_am_network_id_c * const receive_network_id,
+		const eapol_key_authentication_type_e authentication_type,
+		const eap_variable_data_c * const SSID,
+		const eap_variable_data_c * const preshared_key);
+
+	EAP_FUNC_IMPORT eap_status_e complete_get_802_11_authentication_mode(
+		const eap_status_e completion_status,
+		const eap_am_network_id_c * const receive_network_id,
+		const eapol_key_802_11_authentication_mode_e mode);
+
+	//--------------------------------------------------
+}; // class eap_core_client_message_if_c
+
+//--------------------------------------------------
+
+#endif //#if !defined(_EAP_CORE_CLIENT_MESSAGE_IF_H_)
+
+//--------------------------------------------------
+
+
+
+// End.
--- a/eapol/eapol_framework/eapol_common/include/eap_core_map.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_core_map.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 5.1.3 %
+* %version: %
 */
 
 #if !defined(_EAP_TYPE_MAP_H_)
--- a/eapol/eapol_framework/eapol_common/include/eap_core_nak_info.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_core_nak_info.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #if !defined(_EAP_CORE_NAK_INFO_H_)
--- a/eapol/eapol_framework/eapol_common/include/eap_core_retransmission.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_core_retransmission.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8.1.2 %
+* %version: %
 */
 
 #if !defined(_GSMSIM_RETRANSMISSION_H_)
@@ -32,7 +32,7 @@
  * This class stores the information of re-transmission of EAP-packet.
  * @{ Add more comments. }
  */
-class eap_core_retransmission_c
+class EAP_EXPORT eap_core_retransmission_c
 {
 private:
 	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/include/eap_core_server_message_if.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,345 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 17 %
+*/
+
+#if !defined(_EAP_CORE_SERVER_MESSAGE_IF_H_)
+#define _EAP_CORE_SERVER_MESSAGE_IF_H_
+
+#include "eap_tools.h"
+#include "eap_am_export.h"
+#include "abs_eap_session_core.h"
+#include "eap_variable_data.h"
+#include "abs_eap_am_mutex.h"
+#include "eap_session_core_base.h"
+#include "abs_eap_am_message_if.h"
+#include "eap_am_message_if.h"
+#include "eap_process_tlv_message_data.h"
+#include "abs_eap_am_stack.h"
+#include "eap_am_stack.h"
+
+#if defined(USE_EAP_SIMPLE_CONFIG)
+#include "simple_config_types.h"
+#include "simple_config_credential.h"
+#include "simple_config_payloads.h"
+#include "abs_eap_configuration_if.h"
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+
+
+/** @file */
+
+
+/// A eap_core_server_message_if_c class implements the basic functionality of EAPOL.
+class EAP_EXPORT eap_core_server_message_if_c
+: public abs_eap_session_core_c
+, public eap_am_message_if_c
+, public abs_eap_base_timer_c
+, public abs_eap_am_stack_c
+{
+
+private:
+	//--------------------------------------------------
+
+	/// This is back pointer to object which created this object.
+	abs_eap_am_message_if_c * m_partner;
+
+	/// This is pointer to the eap_core object. The eapol_core object gives
+	/// the received packets to the eap_core object. The eap_core object sends
+	/// packets through the eapol_core object.
+	eap_session_core_base_c * const m_eap_core;
+
+	eap_am_stack_c * const m_am_stack;
+
+	/// This is pointer to the tools class.
+	abs_eap_am_tools_c * const m_am_tools;
+
+	/// This is offset in bytes of the EAP header.
+	u32_t m_eap_header_offset;
+
+	/// This is maximum transfer unit in bytes.
+	u32_t m_MTU;
+
+	/// This is length of the trailer in bytes.
+	u32_t m_trailer_length;
+
+	eap_status_e m_error_code;
+
+	eap_tlv_message_type_function_e m_error_function;
+
+	/// This indicates whether this object is client (true) or server (false).
+	/// In terms of EAP-protocol whether this network entity is EAP-supplicant (true) or EAP-authenticator (false).
+	bool m_is_client;
+
+	/// This indicates whether this object was generated successfully.
+	bool m_is_valid;
+
+	bool m_shutdown_was_called;
+
+	eap_status_e send_error_message(
+		const eap_status_e error_code,
+		const eap_tlv_message_type_function_e function);
+
+	eap_status_e send_message(eap_process_tlv_message_data_c * const message);
+
+	eap_status_e process_message_type_error(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e process_message(eap_process_tlv_message_data_c * const message);
+
+	eap_status_e create_eap_session(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e remove_eap_session(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e send_eap_identity_request(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e packet_process(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e eap_acknowledge(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e set_eap_database_reference_values(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e eap_mtu(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e get_802_11_authentication_mode(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+
+	eap_status_e complete_remove_eap_session(
+		const bool complete_to_lower_layer,
+		const eap_am_network_id_c * const receive_network_id);
+
+
+	//--------------------------------------------------
+protected:
+	//--------------------------------------------------
+
+	//--------------------------------------------------
+public:
+	//--------------------------------------------------
+
+	/**
+	 * The destructor deletes the m_eap_core object.
+	 */
+	EAP_FUNC_IMPORT virtual ~eap_core_server_message_if_c();
+
+	/**
+	 * The constructor creates the eap_core object and initializes the m_eap_core
+	 * to point the eap_core object.
+	 * @param tools is pointer to the tools class. @see abs_eap_am_tools_c.
+	 * @param partner is back pointer to object which created this object.
+	 * @param is_client_when_true indicates whether the network entity should act
+	 * as a client (true) or server (false), in terms of EAP-protocol whether
+	 * this network entity is EAP-supplicant (true) or EAP-authenticator (false).
+	 */
+	EAP_FUNC_IMPORT eap_core_server_message_if_c(
+		abs_eap_am_tools_c * const tools,
+		const bool is_client_when_true,
+		const u32_t MTU);
+
+	EAP_FUNC_IMPORT void set_partner(abs_eap_am_message_if_c * const partner);
+
+	EAP_FUNC_IMPORT eap_status_e process_data(const void * const data, const u32_t length);
+
+	/**
+	 * The class could send packets to partner class with this function.
+	 * eap_core_server_message_if_c adds EAPOL header to the send packet.
+	 * @param send_network_id carries the addresses (network identity) and type of the packet.
+	 * @param sent_packet includes the buffer for the whole packet and initialized 
+	 * EAP-packet in correct offset.
+	 * @param header_offset is offset of the EAP-header within the sent_packet.
+	 * @param data_length is length in bytes of the EAP-packet.
+	 * @param buffer_length is length in bytes of the whole packet buffer.
+	 */
+	EAP_FUNC_IMPORT eap_status_e packet_send(
+		const eap_am_network_id_c * const send_network_id,
+		eap_buf_chain_wr_c * const sent_packet,
+		const u32_t header_offset,
+		const u32_t data_length,
+		const u32_t buffer_length); 
+
+	/**
+	 * The get_header_offset() function obtains the header offset of EAP-packet.
+	 * @param MTU_length is pointer to variable to store the maximum transfer unit (MTU).
+	 * MTU is the maximum EAP-packet length in bytes
+	 * @param trailer_length is pointer to the variable to store length
+	 * of trailer needed by lower levels.
+	 * @return Function returns the offset of EAP-header.
+	 * @see abs_eap_core_c::get_header_offset().
+	 */
+	EAP_FUNC_IMPORT u32_t get_header_offset(
+		u32_t * const MTU,
+		u32_t * const trailer_length);
+
+	/**
+	 * The load_module() function function indicates the lower level to
+	 * load new module of EAP-type.
+	 * @see abs_eap_core_c::load_module().
+	 */
+	EAP_FUNC_IMPORT eap_status_e load_module(
+		const eap_type_value_e type,
+		const eap_type_value_e /* tunneling_type */,
+		abs_eap_base_type_c * const partner,
+		eap_base_type_c ** const eap_type,
+		const bool is_client_when_true,
+		const eap_am_network_id_c * const receive_network_id);
+
+	/**
+	 * The unload_module() function unloads the module of a EAP-type. 
+	 * @see abs_eap_core_c::unload_module().
+	 */
+	EAP_FUNC_IMPORT eap_status_e unload_module(
+		const eap_type_value_e type); 
+
+	/**
+	 * Note this function is just an example. Parameters will change later.
+	 * The packet_data_crypto_keys() function gives the generated keys to lower level.
+	 * After EAP-authentication has generated the keys it calls this function
+	 * to offer the keys to lower level.
+	 * @see abs_eap_base_type_c::packet_data_crypto_keys().
+	 */
+	EAP_FUNC_IMPORT eap_status_e packet_data_crypto_keys(
+		const eap_am_network_id_c * const send_network_id,
+		const eap_master_session_key_c * const master_session_key
+		);
+
+	// This is documented in abs_eap_stack_interface_c::configure().
+	EAP_FUNC_IMPORT eap_status_e configure(
+		const eap_variable_data_c * const client_configuration);
+
+	// This is documented in abs_eap_stack_interface_c::shutdown().
+	EAP_FUNC_IMPORT eap_status_e shutdown();
+
+	/**
+	 * The read_configure() function reads the configuration data identified
+	 * by the field string of field_length bytes length. Adaptation module must direct
+	 * the query to some persistent store.
+	 * @see abs_eap_base_type_c::read_configure().
+	 */
+	EAP_FUNC_IMPORT eap_status_e read_configure(
+		const eap_configuration_field_c * const field,
+		eap_variable_data_c * const data);
+
+	/**
+	 * The write_configure() function writes the configuration data identified
+	 * by the field string of field_length bytes length. Adaptation module must direct
+	 * the action to some persistent store.
+	 * @see abs_eap_base_type_c::write_configure().
+	 */
+	EAP_FUNC_IMPORT eap_status_e write_configure(
+		const eap_configuration_field_c * const field,
+		eap_variable_data_c * const data);
+
+	// This is documented in abs_eap_stack_interface_c::set_is_valid().
+	EAP_FUNC_IMPORT void set_is_valid();
+
+	// This is documented in abs_eap_stack_interface_c::get_is_valid().
+	EAP_FUNC_IMPORT bool get_is_valid();
+
+	// See abs_eap_base_type_c::state_notification().
+	EAP_FUNC_IMPORT void state_notification(
+		const abs_eap_state_notification_c * const state);
+
+	// See abs_eap_base_timer_c::timer_expired().
+	EAP_FUNC_IMPORT eap_status_e timer_expired(
+		const u32_t id, void *data);
+
+	// See abs_eap_base_timer_c::timer_delete_data().
+	EAP_FUNC_IMPORT eap_status_e timer_delete_data(
+		const u32_t id, void *data);
+
+	/**
+	 * This function tells lower layer to remove EAP session object asyncronously.
+	 * @param send_network_id is pointer to network id that identifies the removed EAP session.
+	 */
+	EAP_FUNC_IMPORT eap_status_e asynchronous_init_remove_eap_session(
+		const eap_am_network_id_c * const send_network_id);
+
+	/**
+	 * The upper layer calls the asynchronous_start_authentication() function
+	 * when EAP-authentication is needed with another peer.
+	 * @see abs_eap_core_c::asynchronous_start_authentication().
+	 */
+	EAP_FUNC_IMPORT eap_status_e asynchronous_start_authentication(
+		const eap_am_network_id_c * const /* receive_network_id */,
+		const bool /* is_client_when_true */);
+
+	EAP_FUNC_IMPORT eap_status_e restart_authentication(
+		const eap_am_network_id_c * const send_network_id,
+		const bool is_client_when_true,
+		const bool force_clean_restart,
+		const bool from_timer = false);
+
+	//
+	EAP_FUNC_IMPORT eap_status_e set_timer(
+		abs_eap_base_timer_c * const p_initializer, 
+		const u32_t p_id, 
+		void * const p_data,
+		const u32_t p_time_ms);
+
+	EAP_FUNC_IMPORT eap_status_e cancel_timer(
+		abs_eap_base_timer_c * const p_initializer, 
+		const u32_t p_id);
+
+	//
+	EAP_FUNC_IMPORT eap_status_e check_is_valid_eap_type(const eap_type_value_e eap_type);
+
+	// See abs_eap_core_c::get_eap_type_list().
+	EAP_FUNC_IMPORT eap_status_e get_eap_type_list(
+		eap_array_c<eap_type_value_e> * const eap_type_list);
+
+	/// @see abs_eap_core_c::add_rogue_ap().
+	EAP_FUNC_IMPORT eap_status_e add_rogue_ap(eap_array_c<eap_rogue_ap_entry_c> & rogue_ap_list);
+
+	// This is documented in abs_eap_core_c::set_session_timeout().
+	EAP_FUNC_IMPORT eap_status_e set_session_timeout(
+		const u32_t session_timeout_ms);
+
+#if defined(USE_EAP_SIMPLE_CONFIG)
+
+	EAP_FUNC_IMPORT eap_status_e save_simple_config_session(
+		const simple_config_state_e state,
+		EAP_TEMPLATE_CONST eap_array_c<simple_config_credential_c> * const credential_array,
+		const eap_variable_data_c * const new_password,
+		const simple_config_Device_Password_ID_e Device_Password_ID,
+		const simple_config_payloads_c * const other_configuration);
+
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+
+	EAP_FUNC_IMPORT eap_status_e complete_get_802_11_authentication_mode(
+		const eap_status_e completion_status,
+		const eap_am_network_id_c * const receive_network_id,
+		const eapol_key_802_11_authentication_mode_e mode);
+
+	//--------------------------------------------------
+}; // class eap_core_server_message_if_c
+
+#endif //#if !defined(_EAP_CORE_SERVER_MESSAGE_IF_H_)
+
+//--------------------------------------------------
+
+
+
+// End.
--- a/eapol/eapol_framework/eapol_common/include/eap_crypto_api.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_crypto_api.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11 %
+* %version: %
 */
 
 #if !defined( _EAP_CRYPTO_API_H_ )
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/include/eap_database_reference_if.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,60 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#if !defined(_EAPOL_WLAN_DATABASE_REFERENCE_IF_H_)
+#define _EAPOL_WLAN_DATABASE_REFERENCE_IF_H_
+
+//--------------------------------------------------
+
+#include "eap_am_export.h"
+#include "eap_am_types.h"
+#include "eap_status.h"
+
+
+/// This class is abstract interface to reference of WLAN database of the current connection.
+class EAP_EXPORT eap_database_reference_if_c
+{
+
+private:
+	//--------------------------------------------------
+
+	//--------------------------------------------------
+
+	//--------------------------------------------------
+public:
+	//--------------------------------------------------
+
+	virtual ~eap_database_reference_if_c()
+	{
+	}
+
+	virtual eap_status_e set_eap_database_reference_values(
+		const eap_variable_data_c * const reference) = 0;
+
+}; // class eap_database_reference_if_c
+
+
+#endif //#if !defined(_EAPOL_WLAN_DATABASE_REFERENCE_IF_H_)
+
+//--------------------------------------------------
+
+
+// End.
--- a/eapol/eapol_framework/eapol_common/include/eap_expanded_type.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_expanded_type.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10.1.2 %
+* %version: 17 %
 */
 
 #if !defined(_EAP_EXPANDED_TYPE_H_)
@@ -43,13 +43,8 @@
 };
 
 
-#if defined(USE_EAP_EXPANDED_TYPES)
 /// Enumeration of the IETF defined EAP-Type values.
 enum eap_type_ietf_values_e
-#else
-/// This is the original enumeration of the EAP-Type values.
-enum eap_type_value_e
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
 {
 	eap_type_none               = 0,  ///< This is internal value for no type case.
 	eap_type_identity           = 1,  ///< This is Identity.
@@ -84,13 +79,6 @@
 	eap_type_experimental_type  = 255, ///< This is Experimental Type.
 };
 
-
-#if !defined(USE_EAP_EXPANDED_TYPES)
-	typedef eap_type_value_e eap_type_ietf_values_e;
-#endif //#if !defined(USE_EAP_EXPANDED_TYPES)
-
-
-
 enum eap_type_vendor_id_e
 {
 	eap_type_vendor_id_ietf = 0,
@@ -126,6 +114,7 @@
 		m_eap_expanded_type_size = m_ietf_type_size+m_vendor_id_size+m_vendor_type_size,
 	};
 
+	// This must not be virtual destructor.
 	EAP_FUNC_IMPORT ~eap_expanded_type_c();
 
 	EAP_FUNC_IMPORT eap_expanded_type_c();
@@ -137,30 +126,37 @@
 	EAP_FUNC_IMPORT eap_expanded_type_c(
 		const eap_type_ietf_values_e type);
 
+	EAP_FUNC_IMPORT bool get_is_valid() const;
+
+	EAP_FUNC_IMPORT bool get_is_valid_data() const;
+
+	EAP_FUNC_IMPORT eap_expanded_type_c * copy() const;
+
 	EAP_FUNC_IMPORT static bool is_expanded_type(const eap_type_ietf_values_e eap_type);
 
-#if defined(USE_EAP_EXPANDED_TYPES)
 	EAP_FUNC_IMPORT static bool is_ietf_type(const eap_expanded_type_c eap_type);
-#else
-	EAP_FUNC_IMPORT static bool is_ietf_type(const eap_type_ietf_values_e eap_type);
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
 
 	EAP_FUNC_IMPORT eap_status_e get_type_data(
 		abs_eap_am_tools_c * const am_tools,
-		eap_type_ietf_values_e * const type);
+		eap_type_ietf_values_e * const type) const;
 
 	EAP_FUNC_IMPORT eap_status_e get_type_data(
 		abs_eap_am_tools_c * const am_tools,
-		eap_expanded_type_c * const type);
+		eap_expanded_type_c * const type) const;
 
 	EAP_FUNC_IMPORT eap_status_e get_expanded_type_data(
 		abs_eap_am_tools_c * const am_tools,
-		eap_variable_data_c * const data);
+		eap_variable_data_c * const data) const;
 
 	EAP_FUNC_IMPORT eap_status_e set_expanded_type_data(
 		abs_eap_am_tools_c * const am_tools,
 		const eap_variable_data_c * const data);
 
+	EAP_FUNC_IMPORT eap_status_e set_expanded_type_data(
+		abs_eap_am_tools_c * const am_tools,
+		const void * const data,
+		const u32_t data_length);
+
 	EAP_FUNC_IMPORT void set_eap_type_values(
 		const eap_type_vendor_id_e vendor_id,
 		const u32_t vendor_type);
@@ -193,11 +189,7 @@
 		const u32_t index,
 		const void * const buffer,
 		const u32_t buffer_length,
-#if defined(USE_EAP_EXPANDED_TYPES)
 		eap_expanded_type_c * const type
-#else
-		eap_type_ietf_values_e * const type
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
 		);
 
 	/// This function writes EAP-type to offset.
@@ -207,16 +199,10 @@
 		void * const buffer,
 		const u32_t buffer_length,
 		const bool write_extented_type_when_true, ///< True value writes always Extented Type.
-#if defined(USE_EAP_EXPANDED_TYPES)
 		const eap_expanded_type_c p_type ///< The EAP type to be written.
-#else
-		const eap_type_ietf_values_e p_type ///< The EAP type to be written.
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
 		);
 
-#if defined(USE_EAP_EXPANDED_TYPES)
 	EAP_FUNC_IMPORT i32_t compare(const eap_expanded_type_c * const data) const;
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
 
 private:
 
@@ -277,21 +263,12 @@
 //-----------------------------------------------------------------------------------------
 
 
-#if defined(USE_EAP_EXPANDED_TYPES)
-
-	typedef eap_expanded_type_c eap_type_value_e;
+typedef eap_expanded_type_c eap_type_value_e;
 
-	EAP_C_FUNC_IMPORT u32_t convert_eap_type_to_u32_t(eap_type_value_e type);
-
-	EAP_C_FUNC_IMPORT u64_t convert_eap_type_to_u64_t(eap_type_value_e type);
 
-#else
-
-	EAP_C_FUNC_IMPORT u32_t convert_eap_type_to_u32_t(eap_type_value_e type);
+EAP_C_FUNC_IMPORT u32_t convert_eap_type_to_u32_t(eap_type_value_e type);
 
-	EAP_C_FUNC_IMPORT u64_t convert_eap_type_to_u64_t(eap_type_value_e type);
-
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
+EAP_C_FUNC_IMPORT u64_t convert_eap_type_to_u64_t(eap_type_value_e type);
 
 
 //-----------------------------------------------------------------------------------------
--- a/eapol/eapol_framework/eapol_common/include/eap_general_header_base.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_general_header_base.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 4 %
+* %version: %
 */
 
 #if !defined(_EAP_GENERAL_HEADER_BASE_H_)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/include/eap_general_settings_client_message_if.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,150 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Class creates and reads the messages used in EAP-general settings interface on the client side.
+*
+*/
+
+/*
+* %version: 8 %
+*/
+
+#if !defined(_EAP_GENERAL_SETTINGS_CLIENT_MESSAGE_IF_H_)
+#define _EAP_GENERAL_SETTINGS_CLIENT_MESSAGE_IF_H_
+
+#include "eap_tools.h"
+#include "eap_am_export.h"
+#include "eap_plugin_message_base.h"
+#include "abs_eap_am_message_if.h"
+#include "eap_array.h"
+#include "eap_process_tlv_message_data.h"
+#include "eap_general_settings_message.h"
+
+class eap_method_settings_c;
+class eap_am_message_if_c;
+class abs_eap_general_settings_message_c;
+class eap_tlv_header_c;
+
+/// Class creates and reads the messages used in EAP-general settings interface on the client side.
+class EAP_EXPORT eap_general_settings_client_message_if_c
+: public abs_eap_am_message_if_c
+, public eap_general_settings_message_c
+{
+private:
+	//--------------------------------------------------
+
+	/// This is pointer to the tools class.
+	abs_eap_am_tools_c * const m_am_tools;
+
+	/// eap_general_settings_client_message_if_c deletes m_client_if in destructor.
+	eap_am_message_if_c * m_client_if;
+
+	/// This is back pointer to object which created this object.
+	/// Packets are sent to the partner.
+	abs_eap_general_settings_message_c * const m_partner;
+
+	/// This indicates whether this object was generated successfully.
+	bool m_is_valid;
+
+	eap_status_e m_error_code;
+
+	eap_tlv_message_type_function_e m_error_function;
+
+
+	eap_status_e complete_set_eap_methods(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e complete_get_eap_methods(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e complete_get_certificate_lists(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e complete_delete_all_eap_settings(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e complete_copy_all_eap_settings(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+
+	eap_status_e process_message_type_error(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e process_message(eap_process_tlv_message_data_c * const message);
+
+	//--------------------------------------------------
+protected:
+	//--------------------------------------------------
+
+	//--------------------------------------------------
+public:
+	//--------------------------------------------------
+
+	/**
+	 * The destructor of the eap_core class does nothing special.
+	 */
+	EAP_FUNC_IMPORT virtual ~eap_general_settings_client_message_if_c();
+
+	/**
+	 * The constructor initializes member attributes using parameters passed to it.
+	 * @param tools is pointer to the tools class. @see abs_eap_am_tools_c.
+	 * @param client_if is pointer to object which forwards message to the server.
+	 * @param partner is back pointer to the user of EAP-general settings.
+	 */
+	EAP_FUNC_IMPORT eap_general_settings_client_message_if_c(
+		abs_eap_am_tools_c * const tools,
+		eap_am_message_if_c * const client_if,
+		abs_eap_general_settings_message_c * const partner);
+
+	/**
+	 * This function must reset the state of object to same as 
+	 * state was after the configure() function call.
+	 * If object reset succeeds this function must return eap_status_ok.
+	 * If object reset fails this function must return corresponding error status.
+	 * @return This function returns the status of reset operation.
+	 */
+	EAP_FUNC_IMPORT eap_status_e reset();
+
+	// This is documented in abs_eap_stack_interface_c::configure().
+	EAP_FUNC_IMPORT eap_status_e configure();
+
+	// This is documented in abs_eap_stack_interface_c::shutdown().
+	EAP_FUNC_IMPORT eap_status_e shutdown();
+
+	// This is documented in abs_eap_stack_interface_c::get_is_valid().
+	EAP_FUNC_IMPORT bool get_is_valid();
+
+	EAP_FUNC_IMPORT eap_status_e get_eap_methods(const eap_method_settings_c * const internal_settings);
+
+	EAP_FUNC_IMPORT eap_status_e set_eap_methods(const eap_method_settings_c * const internal_settings);
+
+	EAP_FUNC_IMPORT eap_status_e get_certificate_lists(const eap_method_settings_c * const internal_settings);
+
+	EAP_FUNC_IMPORT eap_status_e delete_all_eap_settings(const eap_method_settings_c * const internal_settings);
+
+	EAP_FUNC_IMPORT eap_status_e copy_all_eap_settings(const eap_method_settings_c * const internal_settings);
+
+	EAP_FUNC_IMPORT eap_status_e send_data(const void * const data, const u32_t length);
+
+	//--------------------------------------------------
+}; // class eap_general_settings_client_message_if_c
+
+//--------------------------------------------------
+
+#endif //#if !defined(_EAP_GENERAL_SETTINGS_CLIENT_MESSAGE_IF_H_)
+
+//--------------------------------------------------
+
+
+
+// End.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/include/eap_general_settings_message.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,100 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Class is interface from user of EAP-general settings to eap_general_settings_client_message_if_c.
+*
+*/
+
+/*
+* %version: 7 %
+*/
+
+#if !defined(_EAP_GENERAL_SETTINGS_MESSAGE_BASE_H_)
+#define _EAP_GENERAL_SETTINGS_MESSAGE_BASE_H_
+
+#include "eap_tools.h"
+#include "eap_am_export.h"
+
+class abs_eap_general_settings_message_c;
+class eap_method_settings_c;
+
+/// Class is interface from user of EAP-general settings to eap_general_settings_client_message_if_c.
+class EAP_EXPORT eap_general_settings_message_c
+{
+private:
+	//--------------------------------------------------
+
+
+	//--------------------------------------------------
+protected:
+	//--------------------------------------------------
+
+	//--------------------------------------------------
+public:
+	//--------------------------------------------------
+
+	/**
+	 * The destructor of the eap_core class does nothing special.
+	 */
+	EAP_FUNC_IMPORT virtual ~eap_general_settings_message_c();
+
+	/**
+	 * The constructor initializes member attributes.
+	 */
+	EAP_FUNC_IMPORT eap_general_settings_message_c();
+
+	/**
+	 * This function must reset the state of object to same as 
+	 * state was after the configure() function call.
+	 * If object reset succeeds this function must return eap_status_ok.
+	 * If object reset fails this function must return corresponding error status.
+	 * @return This function returns the status of reset operation.
+	 */
+	virtual eap_status_e reset() = 0;
+
+	// This is documented in abs_eap_stack_interface_c::configure().
+	virtual eap_status_e configure() = 0;
+
+	// This is documented in abs_eap_stack_interface_c::shutdown().
+	virtual eap_status_e shutdown() = 0;
+
+	// This is documented in abs_eap_stack_interface_c::get_is_valid().
+	virtual bool get_is_valid() = 0;
+
+	virtual eap_status_e get_eap_methods(const eap_method_settings_c * const internal_settings) = 0;
+
+	virtual eap_status_e set_eap_methods(const eap_method_settings_c * const internal_settings) = 0;
+
+	virtual eap_status_e get_certificate_lists(const eap_method_settings_c * const internal_settings) = 0;
+
+	virtual eap_status_e delete_all_eap_settings(const eap_method_settings_c * const internal_settings) = 0;
+
+	virtual eap_status_e copy_all_eap_settings(const eap_method_settings_c * const internal_settings) = 0;
+
+	//--------------------------------------------------
+}; // class eap_general_settings_message_c
+
+/// Function creates new eap_general_settings_message_c object.
+eap_general_settings_message_c * new_eap_general_settings_client_message_if_c(
+	abs_eap_am_tools_c * const tools,
+	abs_eap_general_settings_message_c * const partner);
+
+//--------------------------------------------------
+
+#endif //#if !defined(_EAP_GENERAL_SETTINGS_MESSAGE_BASE_H_)
+
+//--------------------------------------------------
+
+
+
+// End.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/include/eap_general_settings_server_message_if.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,164 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Class creates and reads the messages used in EAP-general settings interface on the server side.
+*
+*/
+
+/*
+* %version: 10 %
+*/
+
+#if !defined(_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H_)
+#define _EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H_
+
+#include "eap_tools.h"
+#include "eap_am_export.h"
+#include "abs_eap_session_core.h"
+#include "eap_variable_data.h"
+#include "abs_eap_am_mutex.h"
+#include "eap_session_core_base.h"
+#include "abs_eap_am_message_if.h"
+#include "eap_am_message_if.h"
+#include "eap_process_tlv_message_data.h"
+#include "abs_eap_am_general_settings.h"
+#include "eap_am_general_settings.h"
+
+
+/** @file */
+
+
+/// Class creates and reads the messages used in EAP-general settings interface on the server side.
+class EAP_EXPORT eap_general_settings_server_message_if_c
+: public abs_eap_am_general_settings_c
+, public eap_am_message_if_c
+, public abs_eap_base_timer_c
+{
+
+private:
+	//--------------------------------------------------
+
+	/// This is back pointer to object which created this object.
+	abs_eap_am_message_if_c * m_partner;
+
+	eap_am_general_settings_c * const m_am_settings;
+
+	/// This is pointer to the tools class.
+	abs_eap_am_tools_c * const m_am_tools;
+
+	eap_status_e m_error_code;
+
+	eap_tlv_message_type_function_e m_error_function;
+
+	/// This indicates whether this object is client (true) or server (false).
+	/// In terms of EAP-protocol whether this network entity is EAP-supplicant (true) or EAP-authenticator (false).
+	bool m_is_client;
+
+	/// This indicates whether this object was generated successfully.
+	bool m_is_valid;
+
+	bool m_shutdown_was_called;
+
+	eap_status_e send_error_message(
+		const eap_status_e error_code,
+		const eap_tlv_message_type_function_e function);
+
+	eap_status_e send_message(eap_process_tlv_message_data_c * const message);
+
+	eap_status_e process_message_type_error(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e process_message(eap_process_tlv_message_data_c * const message);
+
+	eap_status_e set_eap_methods(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e get_eap_methods(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e get_certificate_lists(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e delete_all_eap_settings(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e copy_all_eap_settings(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	//--------------------------------------------------
+protected:
+	//--------------------------------------------------
+
+	//--------------------------------------------------
+public:
+	//--------------------------------------------------
+
+	/**
+	 * The destructor deletes the m_eap_core object.
+	 */
+	EAP_FUNC_IMPORT virtual ~eap_general_settings_server_message_if_c();
+
+	/**
+	 * The constructor creates the eap_core object and initializes the m_eap_core
+	 * to point the eap_core object.
+	 * @param tools is pointer to the tools class. @see abs_eap_am_tools_c.
+	 */
+	EAP_FUNC_IMPORT eap_general_settings_server_message_if_c(
+		abs_eap_am_tools_c * const tools);
+
+	EAP_FUNC_IMPORT void set_partner(abs_eap_am_message_if_c * const partner);
+
+	EAP_FUNC_IMPORT eap_status_e process_data(const void * const data, const u32_t length);
+
+	// This is documented in abs_eap_stack_interface_c::configure().
+	EAP_FUNC_IMPORT eap_status_e configure(
+		const eap_variable_data_c * const client_configuration);
+
+	// This is documented in abs_eap_stack_interface_c::shutdown().
+	EAP_FUNC_IMPORT eap_status_e shutdown();
+
+	// This is documented in abs_eap_stack_interface_c::set_is_valid().
+	EAP_FUNC_IMPORT void set_is_valid();
+
+	// This is documented in abs_eap_stack_interface_c::get_is_valid().
+	EAP_FUNC_IMPORT bool get_is_valid();
+
+	// See abs_eap_base_timer_c::timer_expired().
+	EAP_FUNC_IMPORT eap_status_e timer_expired(
+		const u32_t id, void *data);
+
+	// See abs_eap_base_timer_c::timer_delete_data().
+	EAP_FUNC_IMPORT eap_status_e timer_delete_data(
+		const u32_t id, void *data);
+
+
+	EAP_FUNC_IMPORT eap_status_e complete_set_eap_methods(const eap_method_settings_c * const internal_settings);
+
+	EAP_FUNC_IMPORT eap_status_e complete_get_eap_methods(const eap_method_settings_c * const internal_settings);
+
+	EAP_FUNC_IMPORT eap_status_e complete_get_certificate_lists(const eap_method_settings_c * const internal_settings);
+
+	EAP_FUNC_IMPORT eap_status_e complete_delete_all_eap_settings(const eap_method_settings_c * const internal_settings);
+
+	EAP_FUNC_IMPORT eap_status_e complete_copy_all_eap_settings(const eap_method_settings_c * const internal_settings);
+
+	//--------------------------------------------------
+}; // class eap_general_settings_server_message_if_c
+
+#endif //#if !defined(_EAP_GENERAL_SETTINGS_SERVER_MESSAGE_IF_H_)
+
+//--------------------------------------------------
+
+
+
+// End.
--- a/eapol/eapol_framework/eapol_common/include/eap_handle.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_handle.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 #error Do not use this anymore.
--- a/eapol/eapol_framework/eapol_common/include/eap_header.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_header.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 6 %
+* %version: %
 */
 
 #if !defined(_EAP_HEADER_H_)
--- a/eapol/eapol_framework/eapol_common/include/eap_header_string.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_header_string.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 4 %
+* %version: %
 */
 
 #if !defined( _EAP_HEADER_STRING_H_ )
--- a/eapol/eapol_framework/eapol_common/include/eap_master_session_key.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_master_session_key.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 5 %
+* %version: %
 */
 
 #if !defined(_EAP_MASTER_SESSION_KEY_H_)
--- a/eapol/eapol_framework/eapol_common/include/eap_memory_store_variable_data.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_memory_store_variable_data.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 #ifndef EAP_MEMORY_STORE_VARIABLE_DATA_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/include/eap_method_settings.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,312 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP-settings class.
+*
+*/
+
+/*
+* %version: 23 %
+*/
+
+#ifndef _EAP_METHOD_SETTINGS_H_
+#define _EAP_METHOD_SETTINGS_H_
+
+#include "eap_am_tools.h"
+#include "eap_expanded_type.h"
+#include "eap_variable_data.h"
+#include "eap_array.h"
+
+//-------------------------------------------------------------------------------
+
+class eap_certificate_entry_c
+{
+
+private:
+
+	/// This is pointer to the tools class.
+	abs_eap_am_tools_c * const m_am_tools;
+
+public:
+
+	eap_certificate_entry_c(
+		abs_eap_am_tools_c * const tools);
+
+	virtual ~eap_certificate_entry_c();
+
+	enum eap_certificate_type_e
+	{
+		eap_certificate_type_none,
+		eap_certificate_type_user,
+		eap_certificate_type_CA,
+	};
+
+	bool get_is_valid();
+
+	bool get_is_valid_data();
+
+	eap_certificate_entry_c * copy();
+
+	void trace() const;
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	// Specifies whether this entry describes user or CA certificate (mandatory)
+	eap_certificate_type_e m_CertType;
+
+	// Subject name in distinguished name ASCII form. This is optional.
+	// For example "/C=US/O=Some organization/CN=Some common name".	
+	bool m_SubjectNamePresent;
+	eap_variable_data_c m_SubjectName;
+
+	// Issuer name in distinguished name ASCII form. This is optional.
+	// For example "/C=US/O=Some organization/CN=Some common name".
+	bool m_IssuerNamePresent;
+	eap_variable_data_c m_IssuerName;
+
+	// Serial number in ASCII form. This is optional.
+	bool m_SerialNumberPresent;
+	eap_variable_data_c m_SerialNumber;
+
+	// Subject key in binary form. This is mandatory.
+	bool m_SubjectKeyIDPresent;
+	eap_variable_data_c m_SubjectKeyID;
+
+	// Thumbprint in binary form. This is optional.
+	bool m_ThumbprintPresent;
+	eap_variable_data_c m_Thumbprint;
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	// This holds only the certificate label. This is the text UI will show.
+	bool m_LabelPresent;
+	eap_variable_data_c m_Label;
+
+	// Primary name of the certificate if any, UI uses this.
+	bool m_PrimaryNamePresent;
+	eap_variable_data_c m_PrimaryName;
+
+	// Secondary name of the certificate if any, UI uses this.
+	bool m_SecondaryNamePresent;
+	eap_variable_data_c m_SecondaryName;
+
+	// UI uses this to indicate enabled certificate.
+	bool m_iIsEnabledPresent;
+	bool m_iIsEnabled;
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+};
+
+//-------------------------------------------------------------------------------
+
+class eap_method_values_c
+{
+
+private:
+
+	/// This is pointer to the tools class.
+	abs_eap_am_tools_c * const m_am_tools;
+
+protected:
+
+	abs_eap_am_tools_c * get_am_tools() const;
+
+public:
+
+	eap_method_values_c(
+		abs_eap_am_tools_c * const tools);
+
+	virtual ~eap_method_values_c();
+
+	bool m_is_valid;
+
+	/// Status of the operation.
+	eap_status_e m_completion_status;
+
+	/// Specifies the EAP-method these settings are for. 
+	eap_type_value_e m_EAPType;
+
+	/// Specifies the index type (bearer protocol) these settings are for.
+	/// Values are ELan or EVpn.
+	u32_t m_IndexType;
+
+	/// Specifies unique index in the settings of the bearer protocol.
+	u32_t m_Index;
+
+	/// Use automatic Ca certificate.
+	bool m_UseAutomaticCACertificatePresent;
+	bool m_UseAutomaticCACertificate;
+
+	/// Use automatic username.
+	bool m_UseAutomaticUsernamePresent;
+	bool m_UseAutomaticUsername;
+
+	/// Use automatic realm.
+	bool m_UseAutomaticRealmPresent;
+	bool m_UseAutomaticRealm;
+
+	/// Username in ASCII format
+	bool m_UsernamePresent;
+	eap_variable_data_c m_Username_fix;
+
+	/// Get: Whether password is stored in database.
+	/// Set: Whether password must be cleared from database.
+	bool m_PasswordExistPresent;
+	bool m_PasswordExist;
+
+	/// Password in ASCII format
+	bool m_PasswordPresent;
+	eap_variable_data_c m_Password;
+
+	/// Realm in ASCII format
+	bool m_RealmPresent;
+	eap_variable_data_c m_Realm;
+
+	/// Use pseudonym identities in EAP-SIM/AKA
+	bool m_UsePseudonymsPresent;
+	bool m_UsePseudonyms;
+
+	/// Whether EAP-TLS/TTLS/PEAP should verify server realm
+	bool m_VerifyServerRealmPresent;
+	bool m_VerifyServerRealm;
+
+	/// Whether EAP-TLS/TTLS/PEAP should require client authentication
+	bool m_RequireClientAuthenticationPresent;
+	bool m_RequireClientAuthentication;
+
+	/// General session validity time (in minutes)
+	bool m_SessionValidityTimePresent;
+	u32_t m_SessionValidityTime;
+
+	/// An array of allowed cipher suites for EAP-TLS/TTLS/PEAP. 
+	/// Refer to RFC2246 chapter A.5 for the values.
+	bool m_CipherSuitesPresent;
+	eap_array_c<u16_t> m_CipherSuites;
+
+	/// Which EAP-PEAP versions are allowed
+	bool m_PEAPVersionsPresent;
+	bool m_PEAPv0Allowed;
+	bool m_PEAPv1Allowed;
+	bool m_PEAPv2Allowed;
+
+  	/// Array listing the allowed certificates for EAP-TLS/TTLS/PEAP.
+  	/// Subject key ID and Certificate type are the only mandatory certificate 
+  	/// details needed at the moment.
+  	bool m_CertificatesPresent;
+	eap_array_c<eap_certificate_entry_c> m_Certificates;
+
+	/// Array listing the allowed encapsulated EAP types (in priority order).
+	/// Use EAP type values from eap_type_value_e.
+	bool m_EnabledEncapsulatedEAPTypesPresent;
+	eap_array_c<eap_type_value_e> m_EnabledEncapsulatedEAPTypes;
+
+	/// Array listing the disabled encapsulated EAP types.
+	/// Use EAP type values from eap_type_value_e.
+	bool m_DisabledEncapsulatedEAPTypesPresent;
+	eap_array_c<eap_type_value_e> m_DisabledEncapsulatedEAPTypes;
+
+	/// Whether Authenticated provisioning mode allowed or not in EAP-FAST.
+	bool m_AuthProvModeAllowedPresent;
+	bool m_AuthProvModeAllowed;
+
+	/// Whether Unauthenticated provisioning mode allowed or not in EAP-FAST.
+	bool m_UnauthProvModeAllowedPresent;
+	bool m_UnauthProvModeAllowed;
+
+	/// PAC group reference in ASCII format for EAP-FAST.
+	bool m_PACGroupReferencePresent;
+	eap_variable_data_c m_PACGroupReference;
+
+	/// Whether to Warn (or Prompt) for ADHP (Authenticated Diffie-Hellman Protocol) 
+	/// auto-provisioning when there is no PAC at all. EAP-FAST specific.
+	bool m_WarnADHPNoPACPresent;
+	bool m_WarnADHPNoPAC;
+
+	/// Whether to Warn (or Prompt) for ADHP auto-provisioning when 
+	/// there is no PAC that matches the A-ID sent by server. EAP-FAST specific.
+	bool m_WarnADHPNoMatchingPACPresent;
+	bool m_WarnADHPNoMatchingPAC;
+
+	/// Whether to Warn (or Prompt) when client encouters a server that has provisioned 
+	/// the client with a PAC before but is not currently selected as the default server. 
+	/// EAP-FAST specific.
+	bool m_WarnNotDefaultServerPresent;
+	bool m_WarnNotDefaultServer;
+
+	// Array listing the active and disabled EAP types (in priority order).
+	// Use EAP type values from eap_type_value_e.
+	bool m_SelectedEAPTypesPresent;
+	eap_array_c<eap_type_value_e> m_active_eap_methods;
+	eap_array_c<eap_type_value_e> m_disabled_eap_methods;
+
+	bool m_TunnelingTypePresent;
+	eap_type_value_e m_TunnelingType;
+
+	bool m_DestinationIndexAndTypePresent;
+	u32_t m_DestinationIndexType;
+	u32_t m_DestinationIndex;
+
+	bool m_MethodInfoPresent;
+	eap_variable_data_c m_KReleaseDate;
+	eap_variable_data_c m_KEapTypeVersion;
+	eap_variable_data_c m_KManufacturer;
+
+	bool m_ButtonIdPresent; // JPH: remove this
+	i32_t m_ButtonId; // JPH: remove this
+
+	bool m_ShowPassWordPromptPresent;
+	bool m_ShowPassWordPrompt;
+
+	bool m_UseIdentityPrivacyPresent;
+	bool m_UseIdentityPrivacy;
+
+};
+
+//-------------------------------------------------------------------------------
+
+class eap_method_settings_c
+: public eap_method_values_c
+{
+public:
+
+	eap_method_settings_c(
+		abs_eap_am_tools_c * const tools);
+
+	eap_method_settings_c(
+		abs_eap_am_tools_c * const tools,
+		const eap_method_settings_c * const init);
+
+	virtual ~eap_method_settings_c();
+
+	void trace() const;
+
+};
+
+//-------------------------------------------------------------------------------
+
+#if defined(USE_EAP_TRACE)
+
+	#define EAP_TRACE_METHOD_SETTINGS(settings) { (settings)->trace(); }
+
+#else
+
+	#define EAP_TRACE_METHOD_SETTINGS(settings)
+
+#endif //#if defined(USE_EAP_TRACE)
+
+
+//-------------------------------------------------------------------------------
+
+#endif //#ifndef _EAP_METHOD_SETTINGS_H_
+
+// End of file
--- a/eapol/eapol_framework/eapol_common/include/eap_network_id_selector.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_network_id_selector.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 #if !defined(_EAP_NETWORK_ID_SELECTOR_H_)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/include/eap_pac_store_client_message_if.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,185 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#if !defined(_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H_)
+#define _EAP_PAC_STORE_CLIENT_MESSAGE_IF_H_
+
+#include "eap_tools.h"
+#include "eap_am_export.h"
+#include "eap_pac_store_message_base.h"
+#include "abs_eap_am_message_if.h"
+#include "eap_array.h"
+#include "eap_process_tlv_message_data.h"
+#include "eap_am_message_if.h"
+#include "abs_eap_pac_store_message.h"
+
+class eap_method_settings_c;
+class eap_am_message_if_c;
+class abs_eap_pac_store_message_c;
+class eap_tlv_header_c;
+
+/// A eap_pac_store_client_message_if_c class implements mapping of EAP authentication sessions.
+/// Network identity separates parallel EAP authentication sessions.
+class EAP_EXPORT eap_pac_store_client_message_if_c
+: public eap_pac_store_message_base_c
+, public abs_eap_am_message_if_c
+{
+private:
+	//--------------------------------------------------
+
+	/// This is pointer to the tools class.
+	abs_eap_am_tools_c * const m_am_tools;
+
+	/// eap_pac_store_client_message_if_c deletes m_client_if in destructor.
+	eap_am_message_if_c * m_client_if;
+
+	/// This is back pointer to object which created this object.
+	/// Packets are sent to the partner.
+	abs_eap_pac_store_message_c * const m_partner;
+
+	/// This indicates whether this object was generated successfully.
+	bool m_is_valid;
+
+	eap_status_e m_error_code;
+
+	eap_tlv_message_type_function_e m_error_function;
+
+	eap_status_e complete_open_pac_store(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e complete_create_device_seed(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e complete_is_master_key_present(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e complete_is_master_key_and_password_matching(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e complete_create_and_save_master_key(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e complete_compare_pac_store_password(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e complete_is_pacstore_password_present(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e complete_set_pac_store_password(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e complete_destroy_pac_store(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e process_message_type_error(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	//--------------------------------------------------
+protected:
+	//--------------------------------------------------
+
+	//--------------------------------------------------
+public:
+	//--------------------------------------------------
+
+	/**
+	 * The destructor of the eap_core class does nothing special.
+	 */
+	EAP_FUNC_IMPORT virtual ~eap_pac_store_client_message_if_c();
+
+	/**
+	 * The constructor initializes member attributes using parameters passed to it.
+	 * @param tools is pointer to the tools class. @see abs_eap_am_tools_c.
+	 * @param partner is back pointer to object which created this object.
+	 * @param is_client_when_true indicates whether the network entity should act
+	 * as a client (true) or server (false), in terms of EAP-protocol
+	 * whether this network entity is EAP-supplicant (true) or EAP-authenticator (false).
+	 */
+	EAP_FUNC_IMPORT eap_pac_store_client_message_if_c(
+		abs_eap_am_tools_c * const tools,
+		eap_am_message_if_c * const client_if,
+		abs_eap_pac_store_message_c * const partner);
+
+	/**
+	 * This function must reset the state of object to same as 
+	 * state was after the configure() function call.
+	 * If object reset succeeds this function must return eap_status_ok.
+	 * If object reset fails this function must return corresponding error status.
+	 * @return This function returns the status of reset operation.
+	 */
+	EAP_FUNC_IMPORT eap_status_e reset();
+
+	// This is documented in abs_eap_stack_interface_c::configure().
+	EAP_FUNC_IMPORT eap_status_e configure();
+
+	// This is documented in abs_eap_stack_interface_c::shutdown().
+	EAP_FUNC_IMPORT eap_status_e shutdown();
+
+	// This is documented in abs_eap_stack_interface_c::get_is_valid().
+	EAP_FUNC_IMPORT bool get_is_valid();
+
+	EAP_FUNC_IMPORT eap_status_e process_message(eap_process_tlv_message_data_c * const message);
+
+	EAP_FUNC_IMPORT eap_status_e send_data(const void * const data, const u32_t length);
+
+	EAP_FUNC_IMPORT eap_status_e open_pac_store(
+		const eap_status_e completion_status);
+
+	EAP_FUNC_IMPORT eap_status_e create_device_seed(
+		const eap_status_e completion_status);
+
+	EAP_FUNC_IMPORT eap_status_e is_master_key_present(
+		const eap_status_e completion_status);
+
+	EAP_FUNC_IMPORT eap_status_e is_master_key_and_password_matching(
+		const eap_variable_data_c * const pac_store_password
+		,const eap_status_e completion_status);
+
+	EAP_FUNC_IMPORT eap_status_e create_and_save_master_key(
+		const eap_variable_data_c * const pac_store_password
+		,const eap_status_e completion_status);
+
+	EAP_FUNC_IMPORT eap_status_e compare_pac_store_password(
+		eap_variable_data_c * const pac_store_password);
+
+	EAP_FUNC_IMPORT eap_status_e is_pacstore_password_present();
+
+	EAP_FUNC_IMPORT eap_status_e set_pac_store_password(
+		const eap_variable_data_c * const pac_store_password
+		,const eap_status_e completion_status);
+
+	EAP_FUNC_IMPORT eap_status_e destroy_pac_store(
+		const eap_status_e completion_status);
+
+
+
+	//--------------------------------------------------
+}; // class eap_pac_store_client_message_if_c
+
+//--------------------------------------------------
+
+#endif //#if !defined(_EAP_PAC_STORE_CLIENT_MESSAGE_IF_H_)
+
+//--------------------------------------------------
+
+
+
+// End.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/include/eap_pac_store_message_base.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,126 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#if !defined(_EAP_PAC_STORE_MESSAGE_BASE_H_)
+#define _EAP_PAC_STORE_MESSAGE_BASE_H_
+
+#include "eap_tools.h"
+#include "eap_am_export.h"
+
+class eap_method_settings_c;
+class abs_eap_pac_store_message_c;
+
+/// A eap_pac_store_message_base_c class implements mapping of EAP authentication sessions.
+/// Network identity separates parallel EAP authentication sessions.
+class EAP_EXPORT eap_pac_store_message_base_c
+{
+private:
+	//--------------------------------------------------
+
+
+	//--------------------------------------------------
+protected:
+	//--------------------------------------------------
+
+	//--------------------------------------------------
+public:
+	//--------------------------------------------------
+
+	/**
+	 * The destructor of the eap_core class does nothing special.
+	 */
+	EAP_FUNC_IMPORT virtual ~eap_pac_store_message_base_c();
+
+	/**
+	 * The constructor initializes member attributes using parameters passed to it.
+	 * @param tools is pointer to the tools class. @see abs_eap_am_tools_c.
+	 * @param partner is back pointer to object which created this object.
+	 * @param is_client_when_true indicates whether the network entity should act
+	 * as a client (true) or server (false), in terms of EAP-protocol
+	 * whether this network entity is EAP-supplicant (true) or EAP-authenticator (false).
+	 */
+	EAP_FUNC_IMPORT eap_pac_store_message_base_c();
+
+	/**
+	 * This function must reset the state of object to same as 
+	 * state was after the configure() function call.
+	 * If object reset succeeds this function must return eap_status_ok.
+	 * If object reset fails this function must return corresponding error status.
+	 * @return This function returns the status of reset operation.
+	 */
+	virtual eap_status_e reset() = 0;
+
+	// This is documented in abs_eap_stack_interface_c::configure().
+	virtual eap_status_e configure() = 0;
+
+	// This is documented in abs_eap_stack_interface_c::shutdown().
+	virtual eap_status_e shutdown() = 0;
+
+	// This is documented in abs_eap_stack_interface_c::get_is_valid().
+	virtual bool get_is_valid() = 0;
+
+	virtual eap_status_e open_pac_store(
+		const eap_status_e completion_status) = 0;
+
+	virtual eap_status_e create_device_seed(
+		const eap_status_e completion_status) = 0;
+
+	virtual eap_status_e is_master_key_present(
+		const eap_status_e completion_status) = 0;
+
+	virtual eap_status_e is_master_key_and_password_matching(
+		const eap_variable_data_c * const pac_store_password
+		,const eap_status_e completion_status) = 0;
+
+	virtual eap_status_e create_and_save_master_key(
+		const eap_variable_data_c * const pac_store_password
+		,const eap_status_e completion_status) = 0;
+
+	virtual eap_status_e compare_pac_store_password(
+		eap_variable_data_c * const pac_store_password) = 0;
+
+	virtual eap_status_e is_pacstore_password_present() = 0;
+
+	virtual eap_status_e set_pac_store_password(
+		const eap_variable_data_c * pac_store_password
+		,const eap_status_e completion_status) = 0;
+
+	virtual eap_status_e destroy_pac_store(
+		const eap_status_e completion_status) = 0;
+
+	//--------------------------------------------------
+
+	static eap_pac_store_message_base_c * new_eap_pac_store_client_message_if_c(
+		abs_eap_am_tools_c * const tools,
+		abs_eap_pac_store_message_c * const partner);
+
+	//--------------------------------------------------
+}; // class eap_pac_store_message_base_c
+
+//--------------------------------------------------
+
+#endif //#if !defined(_EAP_PAC_STORE_MESSAGE_BASE_H_)
+
+//--------------------------------------------------
+
+
+
+// End.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/include/eap_pac_store_server_message_if.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,188 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#if !defined(_EAP_PAC_STORE_SERVER_MESSAGE_IF_H_)
+#define _EAP_PAC_STORE_SERVER_MESSAGE_IF_H_
+
+#include "eap_tools.h"
+#include "eap_am_export.h"
+#include "abs_eap_session_core.h"
+#include "eap_variable_data.h"
+#include "abs_eap_am_mutex.h"
+#include "eap_session_core_base.h"
+#include "abs_eap_am_message_if.h"
+#include "eap_am_message_if.h"
+#include "eap_process_tlv_message_data.h"
+#include "abs_eap_am_pac_store.h"
+#include "eap_am_pac_store.h"
+
+
+/** @file */
+
+
+/// A eap_pac_store_server_message_if_c class implements the basic functionality of EAPOL.
+class EAP_EXPORT eap_pac_store_server_message_if_c
+: public abs_eap_am_pac_store_c
+, public eap_am_message_if_c
+, public abs_eap_base_timer_c
+{
+
+private:
+	//--------------------------------------------------
+
+	/// This is back pointer to object which created this object.
+	abs_eap_am_message_if_c * m_partner;
+
+	eap_am_pac_store_c * const m_am_client;
+
+	/// This is pointer to the tools class.
+	abs_eap_am_tools_c * const m_am_tools;
+
+	eap_status_e m_error_code;
+
+	eap_tlv_message_type_function_e m_error_function;
+
+	/// This indicates whether this object is client (true) or server (false).
+	/// In terms of EAP-protocol whether this network entity is EAP-supplicant (true) or EAP-authenticator (false).
+	bool m_is_client;
+
+	/// This indicates whether this object was generated successfully.
+	bool m_is_valid;
+
+	bool m_shutdown_was_called;
+
+	eap_status_e send_error_message(
+		const eap_status_e error_code,
+		const eap_tlv_message_type_function_e function);
+
+	eap_status_e send_message(eap_process_tlv_message_data_c * const message);
+
+	eap_status_e process_message_type_error(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e process_message(eap_process_tlv_message_data_c * const message);
+
+	eap_status_e open_pac_store(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+	eap_status_e create_device_seed(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+    eap_status_e is_master_key_present(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+    eap_status_e is_master_key_and_password_matching(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+    eap_status_e create_and_save_master_key(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+    eap_status_e compare_pac_store_password(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+    eap_status_e is_pacstore_password_present(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+    eap_status_e set_pac_store_password(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+    eap_status_e destroy_pac_store(EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+	
+    eap_status_e set_eap_methods(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e get_eap_methods(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e get_certificate_lists(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	//--------------------------------------------------
+protected:
+	//--------------------------------------------------
+
+	//--------------------------------------------------
+public:
+	//--------------------------------------------------
+
+	/**
+	 * The destructor deletes the m_eap_core object.
+	 */
+	EAP_FUNC_IMPORT virtual ~eap_pac_store_server_message_if_c();
+
+	/**
+	 * The constructor creates the eap_core object and initializes the m_eap_core
+	 * to point the eap_core object.
+	 * @param tools is pointer to the tools class. @see abs_eap_am_tools_c.
+	 */
+	EAP_FUNC_IMPORT eap_pac_store_server_message_if_c(
+		abs_eap_am_tools_c * const tools);
+
+	static eap_pac_store_server_message_if_c * new_eap_pac_store_server_message_if_c(
+	    abs_eap_am_tools_c * const tools);
+	
+	EAP_FUNC_IMPORT void set_partner(abs_eap_am_message_if_c * const partner);
+
+	EAP_FUNC_IMPORT eap_status_e process_data(const void * const data, const u32_t length);
+
+	// This is documented in abs_eap_stack_interface_c::configure().
+	EAP_FUNC_IMPORT eap_status_e configure(
+		const eap_variable_data_c * const client_configuration);
+
+	// This is documented in abs_eap_stack_interface_c::shutdown().
+	EAP_FUNC_IMPORT eap_status_e shutdown();
+
+	// This is documented in abs_eap_stack_interface_c::set_is_valid().
+	EAP_FUNC_IMPORT void set_is_valid();
+
+	// This is documented in abs_eap_stack_interface_c::get_is_valid().
+	EAP_FUNC_IMPORT bool get_is_valid();
+
+	// See abs_eap_base_timer_c::timer_expired().
+	EAP_FUNC_IMPORT eap_status_e timer_expired(
+		const u32_t id, void *data);
+
+	// See abs_eap_base_timer_c::timer_delete_data().
+	EAP_FUNC_IMPORT eap_status_e timer_delete_data(
+		const u32_t id, void *data);
+
+
+	EAP_FUNC_IMPORT eap_status_e complete_open_pac_store(
+        const eap_status_e completion_status);
+
+	EAP_FUNC_IMPORT eap_status_e complete_create_device_seed(
+        const eap_status_e completion_status);
+
+	EAP_FUNC_IMPORT eap_status_e complete_is_master_key_present(
+      const bool is_present);
+
+	EAP_FUNC_IMPORT eap_status_e complete_is_master_key_and_password_matching(
+      const bool is_matching);
+
+	EAP_FUNC_IMPORT eap_status_e complete_create_and_save_master_key(
+        const eap_status_e completion_status);
+
+	EAP_FUNC_IMPORT eap_status_e complete_is_pacstore_password_present(
+        const bool is_present);
+
+	EAP_FUNC_IMPORT eap_status_e complete_compare_pac_store_password(
+        const bool is_matching);
+
+	EAP_FUNC_IMPORT eap_status_e complete_set_pac_store_password(
+        const eap_status_e completion_status);
+
+	EAP_FUNC_IMPORT eap_status_e complete_destroy_pac_store(
+        const eap_status_e completion_status);
+
+	//--------------------------------------------------
+}; // class eap_pac_store_server_message_if_c
+
+#endif //#if !defined(_EAP_PAC_STORE_SERVER_MESSAGE_IF_H_)
+
+//--------------------------------------------------
+
+
+
+// End.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/include/eap_plugin_client_message_if.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,162 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP-plugin interface message class.
+*
+*/
+
+/*
+* %version: 6 %
+*/
+
+#if !defined(_EAP_PLUGIN_CLIENT_MESSAGE_IF_H_)
+#define _EAP_PLUGIN_CLIENT_MESSAGE_IF_H_
+
+#include "eap_tools.h"
+#include "eap_am_export.h"
+#include "eap_plugin_message_base.h"
+#include "abs_eap_am_message_if.h"
+#include "eap_array.h"
+#include "eap_process_tlv_message_data.h"
+
+class eap_method_settings_c;
+class eap_am_message_if_c;
+class abs_eap_plugin_message_c;
+class eap_tlv_header_c;
+
+/// A eap_plugin_client_message_if_c class implements mapping of EAP authentication sessions.
+/// Network identity separates parallel EAP authentication sessions.
+class EAP_EXPORT eap_plugin_client_message_if_c
+: public eap_plugin_message_base_c
+, public abs_eap_am_message_if_c
+{
+private:
+	//--------------------------------------------------
+
+	/// This is pointer to the tools class.
+	abs_eap_am_tools_c * const m_am_tools;
+
+	/// eap_plugin_client_message_if_c deletes m_client_if in destructor.
+	eap_am_message_if_c * m_client_if;
+
+	/// This is back pointer to object which created this object.
+	/// Packets are sent to the partner.
+	abs_eap_plugin_message_c * const m_partner;
+
+	/// This indicates whether this object was generated successfully.
+	bool m_is_valid;
+
+	eap_status_e m_error_code;
+
+	eap_tlv_message_type_function_e m_error_function;
+
+
+	eap_status_e complete_get_configuration(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e complete_set_configuration(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e complete_delete_configuration(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e complete_copy_configuration(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e complete_set_index(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e complete_get_type_info(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e complete_invoke_ui(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+
+	eap_status_e process_message_type_error(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	//--------------------------------------------------
+protected:
+	//--------------------------------------------------
+
+	//--------------------------------------------------
+public:
+	//--------------------------------------------------
+
+	/**
+	 * The destructor of the eap_core class does nothing special.
+	 */
+	EAP_FUNC_IMPORT virtual ~eap_plugin_client_message_if_c();
+
+	/**
+	 * The constructor initializes member attributes using parameters passed to it.
+	 * @param tools is pointer to the tools class. @see abs_eap_am_tools_c.
+	 * @param partner is back pointer to object which created this object.
+	 * @param is_client_when_true indicates whether the network entity should act
+	 * as a client (true) or server (false), in terms of EAP-protocol
+	 * whether this network entity is EAP-supplicant (true) or EAP-authenticator (false).
+	 */
+	EAP_FUNC_IMPORT eap_plugin_client_message_if_c(
+		abs_eap_am_tools_c * const tools,
+		eap_am_message_if_c * const client_if,
+		abs_eap_plugin_message_c * const partner);
+
+	/**
+	 * This function must reset the state of object to same as 
+	 * state was after the configure() function call.
+	 * If object reset succeeds this function must return eap_status_ok.
+	 * If object reset fails this function must return corresponding error status.
+	 * @return This function returns the status of reset operation.
+	 */
+	EAP_FUNC_IMPORT eap_status_e reset();
+
+	// This is documented in abs_eap_stack_interface_c::configure().
+	EAP_FUNC_IMPORT eap_status_e configure();
+
+	// This is documented in abs_eap_stack_interface_c::shutdown().
+	EAP_FUNC_IMPORT eap_status_e shutdown();
+
+	// This is documented in abs_eap_stack_interface_c::get_is_valid().
+	EAP_FUNC_IMPORT bool get_is_valid();
+
+	EAP_FUNC_IMPORT eap_status_e process_message(eap_process_tlv_message_data_c * const message);
+
+	EAP_FUNC_IMPORT eap_status_e get_configuration(const eap_method_settings_c * const internal_settings);
+
+	EAP_FUNC_IMPORT eap_status_e set_configuration(const eap_method_settings_c * const internal_settings);
+
+	EAP_FUNC_IMPORT eap_status_e copy_configuration(const eap_method_settings_c * const internal_settings);
+
+	EAP_FUNC_IMPORT eap_status_e delete_configuration(const eap_method_settings_c * const internal_settings);
+
+	EAP_FUNC_IMPORT eap_status_e set_index(const eap_method_settings_c * const internal_settings);
+
+	EAP_FUNC_IMPORT eap_status_e get_type_info(const eap_method_settings_c * const internal_settings);
+
+	EAP_FUNC_IMPORT eap_status_e invoke_ui(const eap_method_settings_c * const internal_settings);
+
+	EAP_FUNC_IMPORT eap_status_e send_data(const void * const data, const u32_t length);
+
+	//--------------------------------------------------
+}; // class eap_plugin_client_message_if_c
+
+//--------------------------------------------------
+
+#endif //#if !defined(_EAP_PLUGIN_CLIENT_MESSAGE_IF_H_)
+
+//--------------------------------------------------
+
+
+
+// End.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/include/eap_plugin_message_base.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,109 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  virtual functions of EAP-plugin interface.
+*
+*/
+
+/*
+* %version: 6 %
+*/
+
+#if !defined(_EAP_PLUGIN_MESSAGE_BASE_H_)
+#define _EAP_PLUGIN_MESSAGE_BASE_H_
+
+#include "eap_tools.h"
+#include "eap_am_export.h"
+
+class eap_method_settings_c;
+class abs_eap_plugin_message_c;
+
+class EAP_EXPORT eap_plugin_message_base_c
+{
+private:
+	//--------------------------------------------------
+
+
+	//--------------------------------------------------
+protected:
+	//--------------------------------------------------
+
+	//--------------------------------------------------
+public:
+	//--------------------------------------------------
+
+	/**
+	 * The destructor of the eap_core class does nothing special.
+	 */
+	EAP_FUNC_IMPORT virtual ~eap_plugin_message_base_c();
+
+	/**
+	 * The constructor initializes member attributes using parameters passed to it.
+	 * @param tools is pointer to the tools class. @see abs_eap_am_tools_c.
+	 * @param partner is back pointer to object which created this object.
+	 * @param is_client_when_true indicates whether the network entity should act
+	 * as a client (true) or server (false), in terms of EAP-protocol
+	 * whether this network entity is EAP-supplicant (true) or EAP-authenticator (false).
+	 */
+	EAP_FUNC_IMPORT eap_plugin_message_base_c();
+
+	/**
+	 * This function must reset the state of object to same as 
+	 * state was after the configure() function call.
+	 * If object reset succeeds this function must return eap_status_ok.
+	 * If object reset fails this function must return corresponding error status.
+	 * @return This function returns the status of reset operation.
+	 */
+	virtual eap_status_e reset() = 0;
+
+	// This is documented in abs_eap_stack_interface_c::configure().
+	virtual eap_status_e configure() = 0;
+
+	// This is documented in abs_eap_stack_interface_c::shutdown().
+	virtual eap_status_e shutdown() = 0;
+
+	// This is documented in abs_eap_stack_interface_c::get_is_valid().
+	virtual bool get_is_valid() = 0;
+
+	virtual eap_status_e get_configuration(const eap_method_settings_c * const internal_settings) = 0;
+
+	virtual eap_status_e set_configuration(const eap_method_settings_c * const internal_settings) = 0;
+
+	virtual eap_status_e copy_configuration(const eap_method_settings_c * const internal_settings) = 0;
+
+	virtual eap_status_e delete_configuration(const eap_method_settings_c * const internal_settings) = 0;
+
+	virtual eap_status_e set_index(const eap_method_settings_c * const internal_settings) = 0;
+
+	virtual eap_status_e get_type_info(const eap_method_settings_c * const internal_settings) = 0;
+
+	virtual eap_status_e invoke_ui(const eap_method_settings_c * const internal_settings) = 0;
+
+	//--------------------------------------------------
+
+	static eap_plugin_message_base_c * new_eap_plugin_client_message_if_c(
+		abs_eap_am_tools_c * const tools,
+		abs_eap_plugin_message_c * const partner);
+
+	//--------------------------------------------------
+}; // class eap_plugin_message_base_c
+
+//--------------------------------------------------
+
+#endif //#if !defined(_EAP_PLUGIN_MESSAGE_BASE_H_)
+
+//--------------------------------------------------
+
+
+
+// End.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/include/eap_plugin_server_message_if.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,174 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP-plugin message interface in the server.
+*
+*/
+
+/*
+* %version: 7 %
+*/
+
+#if !defined(_EAP_PLUGIN_SERVER_MESSAGE_IF_H_)
+#define _EAP_PLUGIN_SERVER_MESSAGE_IF_H_
+
+#include "eap_tools.h"
+#include "eap_am_export.h"
+#include "abs_eap_session_core.h"
+#include "eap_variable_data.h"
+#include "abs_eap_am_mutex.h"
+#include "eap_session_core_base.h"
+#include "abs_eap_am_message_if.h"
+#include "eap_am_message_if.h"
+#include "eap_process_tlv_message_data.h"
+#include "abs_eap_am_plugin.h"
+#include "eap_am_plugin.h"
+
+
+/** @file */
+
+
+class EAP_EXPORT eap_plugin_server_message_if_c
+: public abs_eap_am_plugin_c
+, public eap_am_message_if_c
+, public abs_eap_base_timer_c
+{
+
+private:
+	//--------------------------------------------------
+
+	/// This is back pointer to object which created this object.
+	abs_eap_am_message_if_c * m_partner;
+
+	eap_am_plugin_c * const m_am_plugin;
+
+	/// This is pointer to the tools class.
+	abs_eap_am_tools_c * const m_am_tools;
+
+	eap_status_e m_error_code;
+
+	eap_tlv_message_type_function_e m_error_function;
+
+	/// This indicates whether this object is client (true) or server (false).
+	/// In terms of EAP-protocol whether this network entity is EAP-supplicant (true) or EAP-authenticator (false).
+	bool m_is_client;
+
+	/// This indicates whether this object was generated successfully.
+	bool m_is_valid;
+
+	bool m_shutdown_was_called;
+
+	eap_status_e send_error_message(
+		const eap_status_e error_code,
+		const eap_tlv_message_type_function_e function);
+
+	eap_status_e send_message(eap_process_tlv_message_data_c * const message);
+
+	eap_status_e process_message_type_error(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e process_message(eap_process_tlv_message_data_c * const message);
+
+
+	eap_status_e get_configuration(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e set_configuration(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e copy_configuration(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e delete_configuration(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e set_index(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e get_type_info(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+	eap_status_e invoke_ui(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
+
+
+	//--------------------------------------------------
+protected:
+	//--------------------------------------------------
+
+	//--------------------------------------------------
+public:
+	//--------------------------------------------------
+
+	/**
+	 * The destructor deletes the m_eap_core object.
+	 */
+	EAP_FUNC_IMPORT virtual ~eap_plugin_server_message_if_c();
+
+	/**
+	 * The constructor creates the eap_core object and initializes the m_eap_core
+	 * to point the eap_core object.
+	 * @param tools is pointer to the tools class. @see abs_eap_am_tools_c.
+	 */
+	EAP_FUNC_IMPORT eap_plugin_server_message_if_c(
+		abs_eap_am_tools_c * const tools);
+
+	EAP_FUNC_IMPORT void set_partner(abs_eap_am_message_if_c * const partner);
+
+	EAP_FUNC_IMPORT eap_status_e process_data(const void * const data, const u32_t length);
+
+	// This is documented in abs_eap_stack_interface_c::configure().
+	EAP_FUNC_IMPORT eap_status_e configure(
+		const eap_variable_data_c * const client_configuration);
+
+	// This is documented in abs_eap_stack_interface_c::shutdown().
+	EAP_FUNC_IMPORT eap_status_e shutdown();
+
+	// This is documented in abs_eap_stack_interface_c::set_is_valid().
+	EAP_FUNC_IMPORT void set_is_valid();
+
+	// This is documented in abs_eap_stack_interface_c::get_is_valid().
+	EAP_FUNC_IMPORT bool get_is_valid();
+
+	// See abs_eap_base_timer_c::timer_expired().
+	EAP_FUNC_IMPORT eap_status_e timer_expired(
+		const u32_t id, void *data);
+
+	// See abs_eap_base_timer_c::timer_delete_data().
+	EAP_FUNC_IMPORT eap_status_e timer_delete_data(
+		const u32_t id, void *data);
+
+	EAP_FUNC_IMPORT eap_status_e complete_get_configuration(const eap_method_settings_c * const internal_settings);
+
+	EAP_FUNC_IMPORT eap_status_e complete_set_configuration(const eap_method_settings_c * const internal_settings);
+
+	EAP_FUNC_IMPORT eap_status_e complete_delete_configuration(const eap_method_settings_c * const internal_settings);
+
+	EAP_FUNC_IMPORT eap_status_e complete_copy_configuration(const eap_method_settings_c * const internal_settings);
+
+	EAP_FUNC_IMPORT eap_status_e complete_set_index(const eap_method_settings_c * const internal_settings);
+
+	EAP_FUNC_IMPORT eap_status_e complete_get_type_info(const eap_method_settings_c * const internal_settings);
+
+	EAP_FUNC_IMPORT eap_status_e complete_invoke_ui(const eap_method_settings_c * const internal_settings);
+
+	//--------------------------------------------------
+}; // class eap_plugin_server_message_if_c
+
+#endif //#if !defined(_EAP_PLUGIN_SERVER_MESSAGE_IF_H_)
+
+//--------------------------------------------------
+
+
+
+// End.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/include/eap_process_tlv_message_data.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,669 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 42 %
+*/
+
+#if !defined(_EAP_PROCESS_TLV_MESSAGE_DATA_H_)
+#define _EAP_PROCESS_TLV_MESSAGE_DATA_H_
+
+#include "eap_am_types.h"
+#include "eap_tools.h"
+#include "eap_array.h"
+#include "eap_tlv_message_data.h"
+#include "eap_expanded_type.h"
+#include "eapol_rsna_key_header.h"
+#include "eap_method_settings.h"
+#include "eap_file_config.h"
+
+#if defined(USE_EAP_SIMPLE_CONFIG)
+#include "simple_config_types.h"
+#include "simple_config_credential.h"
+#include "simple_config_payloads.h"
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+
+enum eap_tlv_message_type_e
+{
+	eap_tlv_message_type_none                                 = 0,
+	eap_tlv_message_type_array                                = 1,
+	eap_tlv_message_type_boolean                              = 2,
+	eap_tlv_message_type_eap_protocol_layer                   = 3,
+	eap_tlv_message_type_eap_state_notification               = 4,
+	eap_tlv_message_type_eap_status                           = 5,
+	eap_tlv_message_type_eap_type                             = 6,
+	eap_tlv_message_type_eapol_key_802_11_authentication_mode = 7,
+	eap_tlv_message_type_eapol_key_authentication_type        = 8,
+	eap_tlv_message_type_eapol_key_type                       = 9,
+	eap_tlv_message_type_eapol_tkip_mic_failure_type          = 10,
+	eap_tlv_message_type_eapol_wlan_authentication_state      = 11,
+	eap_tlv_message_type_error                                = 12,
+	eap_tlv_message_type_function                             = 13,
+	eap_tlv_message_type_network_id                           = 14,
+	eap_tlv_message_type_network_key                          = 15,
+	eap_tlv_message_type_protected_setup_credential           = 16,
+	eap_tlv_message_type_RSNA_cipher                          = 17,
+	eap_tlv_message_type_session_key                          = 18,
+	eap_tlv_message_type_u8_t                                 = 19,
+	eap_tlv_message_type_u16_t                                = 20,
+	eap_tlv_message_type_u32_t                                = 21,
+	eap_tlv_message_type_u64_t                                = 22,
+	eap_tlv_message_type_variable_data                        = 23,
+	eap_tlv_message_type_eap_method_settings                  = 24,
+	eap_tlv_message_type_eap_certificate_entry                = 25,
+	eap_tlv_message_type_i8_t                                 = 26,
+	eap_tlv_message_type_i16_t                                = 27,
+	eap_tlv_message_type_i32_t                                = 28,
+	eap_tlv_message_type_configuration_option                 = 29,
+};
+
+
+enum eap_tlv_message_type_function_e
+{
+	eap_tlv_message_type_function_none                                            = 0,
+	eap_tlv_message_type_function_check_pmksa_cache                               = 1,
+	eap_tlv_message_type_function_start_authentication                            = 2,
+	eap_tlv_message_type_function_complete_association                            = 3,
+	eap_tlv_message_type_function_disassociation                                  = 4,
+	eap_tlv_message_type_function_start_preauthentication                         = 5,
+	eap_tlv_message_type_function_start_reassociation                             = 6,
+	eap_tlv_message_type_function_complete_reassociation                          = 7,
+	eap_tlv_message_type_function_start_WPXM_reassociation                        = 8,
+	eap_tlv_message_type_function_complete_WPXM_reassociation                     = 9,
+	eap_tlv_message_type_function_packet_process                                  = 10,
+	eap_tlv_message_type_function_tkip_mic_failure                                = 11,
+	eap_tlv_message_type_function_eap_acknowledge                                 = 12,
+	eap_tlv_message_type_function_update_header_offset                            = 13,
+	eap_tlv_message_type_function_complete_check_pmksa_cache                      = 14,
+	eap_tlv_message_type_function_packet_send                                     = 15,
+	eap_tlv_message_type_function_associate                                       = 16,
+	eap_tlv_message_type_function_disassociate                                    = 17,
+	eap_tlv_message_type_function_packet_data_session_key                         = 18,
+	eap_tlv_message_type_function_state_notification                              = 19,
+	eap_tlv_message_type_function_reassociate                                     = 20,
+	eap_tlv_message_type_function_update_wlan_database_reference_values           = 21,
+	eap_tlv_message_type_function_complete_start_WPXM_reassociation               = 22,
+	eap_tlv_message_type_function_new_protected_setup_credentials                 = 23,
+	eap_tlv_message_type_function_create_eap_session                              = 24,
+	eap_tlv_message_type_function_remove_eap_session                              = 25,
+	eap_tlv_message_type_function_send_eap_identity_request                       = 26,
+	eap_tlv_message_type_function_packet_data_crypto_keys                         = 27, // EAP Master session Key.
+	eap_tlv_message_type_function_restart_authentication                          = 28,
+	eap_tlv_message_type_function_create_state                                    = 29,
+	eap_tlv_message_type_function_remove_bksa_from_cache                          = 30,
+	eap_tlv_message_type_function_association                                     = 31,
+	eap_tlv_message_type_function_set_eap_database_reference_values               = 32,
+	eap_tlv_message_type_function_eap_mtu                                         = 33,
+	eap_tlv_message_type_function_get_802_11_authentication_mode                  = 34,
+	eap_tlv_message_type_function_complete_get_802_11_authentication_mode         = 35,
+	eap_tlv_message_type_function_complete_remove_eap_session                     = 36,
+	eap_tlv_message_type_function_complete_disassociation                         = 37,
+	eap_tlv_message_type_function_last_function                                   = 38, // Keep this the last on this set.
+
+	eap_tlv_message_type_function_plugin_get_configuration                        = 1000,
+	eap_tlv_message_type_function_plugin_set_configuration                        = 1001,
+	eap_tlv_message_type_function_plugin_copy_configuration                       = 1002,
+	eap_tlv_message_type_function_plugin_delete_configuration                     = 1003,
+	eap_tlv_message_type_function_plugin_set_index                                = 1004,
+	eap_tlv_message_type_function_plugin_get_type_info                            = 1005,
+	eap_tlv_message_type_function_plugin_invoke_ui                                = 1006,
+	eap_tlv_message_type_function_plugin_complete_get_configuration               = 1007,
+	eap_tlv_message_type_function_plugin_complete_set_configuration               = 1008,
+	eap_tlv_message_type_function_plugin_complete_delete_configuration            = 1009,
+	eap_tlv_message_type_function_plugin_complete_copy_configuration              = 1010,
+	eap_tlv_message_type_function_plugin_complete_set_index                       = 1011,
+	eap_tlv_message_type_function_plugin_complete_get_type_info                   = 1012,
+	eap_tlv_message_type_function_plugin_complete_invoke_ui                       = 1013,
+	eap_tlv_message_type_function_plugin_last_function                            = 1014, // Keep this the last on this set.
+
+	eap_tlv_message_type_function_general_settings_set_eap_methods                  = 2000,
+	eap_tlv_message_type_function_general_settings_get_eap_methods                  = 2001,
+	eap_tlv_message_type_function_general_settings_get_certificate_lists            = 2002,
+	eap_tlv_message_type_function_general_settings_delete_all_eap_settings          = 2003,
+	eap_tlv_message_type_function_general_settings_copy_all_eap_settings            = 2004,
+	eap_tlv_message_type_function_general_settings_complete_set_eap_methods         = 2005,
+	eap_tlv_message_type_function_general_settings_complete_get_eap_methods         = 2006,
+	eap_tlv_message_type_function_general_settings_complete_get_certificate_lists   = 2007,
+	eap_tlv_message_type_function_general_settings_complete_delete_all_eap_settings = 2008,
+	eap_tlv_message_type_function_general_settings_complete_copy_all_eap_settings   = 2009,
+	eap_tlv_message_type_function_general_settings_last_function                    = 2010, // Keep this the last on this set.
+
+	eap_tlv_message_type_function_pac_store_open_pac_store            = 3000,
+	eap_tlv_message_type_function_pac_store_create_device_seed            = 3001,
+	eap_tlv_message_type_function_pac_store_is_master_key_present   = 3002,
+	eap_tlv_message_type_function_pac_store_is_master_key_and_password_matching   = 3003,
+	eap_tlv_message_type_function_pac_store_create_and_save_master_key   = 3004,
+	eap_tlv_message_type_function_pac_store_compare_pac_store_password   = 3005,
+	eap_tlv_message_type_function_pac_store_is_pacstore_password_present   = 3006,
+	eap_tlv_message_type_function_pac_store_set_pac_store_password   = 3007,
+	eap_tlv_message_type_function_pac_store_destroy_pac_store            = 3008,
+	eap_tlv_message_type_function_pac_store_complete_open_pac_store            = 3009,
+	eap_tlv_message_type_function_pac_store_complete_create_device_seed            = 3010,
+	eap_tlv_message_type_function_pac_store_complete_is_master_key_present   = 3011,
+	eap_tlv_message_type_function_pac_store_complete_is_master_key_and_password_matching   = 3012,
+	eap_tlv_message_type_function_pac_store_complete_create_and_save_master_key   = 3013,
+	eap_tlv_message_type_function_pac_store_complete_compare_pac_store_password   = 3014,
+	eap_tlv_message_type_function_pac_store_complete_is_pacstore_password_present   = 3015,
+	eap_tlv_message_type_function_pac_store_complete_set_pac_store_password   = 3016,
+	eap_tlv_message_type_function_pac_store_complete_destroy_pac_store            = 3017,
+	eap_tlv_message_type_function_pac_store_last_function              = 3018, // Keep this the last on this set.
+
+	eap_tlv_message_type_function_wapi_settings_get_all_certificate_labels              = 4000,
+	eap_tlv_message_type_function_wapi_settings_reset_certificate_store                 = 4001,
+    eap_tlv_message_type_function_wapi_settings_get_configuration                       = 4002,
+    eap_tlv_message_type_function_wapi_settings_set_configuration                       = 4003,
+    eap_tlv_message_type_function_wapi_settings_set_ca_cert                             = 4004,
+    eap_tlv_message_type_function_wapi_settings_set_user_cert                           = 4005,
+    eap_tlv_message_type_function_wapi_settings_delete_configuration                    = 4006,
+    eap_tlv_message_type_function_wapi_settings_complete_get_all_certificate_labels     = 4007,
+    eap_tlv_message_type_function_wapi_settings_complete_reset_certificate_store        = 4008,
+    eap_tlv_message_type_function_wapi_settings_complete_get_configuration              = 4009,
+    eap_tlv_message_type_function_wapi_settings_complete_set_configuration              = 4010,
+    eap_tlv_message_type_function_wapi_settings_complete_set_ca_cert                    = 4011,
+    eap_tlv_message_type_function_wapi_settings_complete_set_user_cert                  = 4012,
+    eap_tlv_message_type_function_wapi_settings_complete_delete_configuration           = 4013,
+    eap_tlv_message_type_function_wapi_settings_complete_last_function                  = 4014, // Keep this the last on this set.
+
+
+	eap_tlv_message_type_function_illegal_value, // Keep this the last value.
+};
+
+
+enum eap_message_payload_index_e
+{
+	eap_message_payload_index_function        = 0,
+	eap_message_payload_index_first_parameter = 1,
+};
+
+
+/** @file */
+
+class eap_variable_data_c;
+class eap_am_network_id_c;
+class eap_buf_chain_wr_c;
+class eapol_session_key_c;
+class abs_eap_state_notification_c;
+class eap_state_notification_c;
+class network_key_and_index_c;
+
+//----------------------------------------------------------------------------
+
+
+/// This class defines functions to add and parse message data composed
+/// of Attribute-Value Pairs (See eap_tlv_header_c) to/from eap_tlv_message_data_c object.
+class EAP_EXPORT eap_process_tlv_message_data_c
+: public eap_tlv_message_data_c
+{
+private:
+	//--------------------------------------------------
+
+	abs_eap_am_tools_c * const m_am_tools;
+
+	bool m_is_valid;
+
+	//--------------------------------------------------
+protected:
+	//--------------------------------------------------
+
+	//--------------------------------------------------
+public:
+	//--------------------------------------------------
+
+	/**
+	 * The destructor of the eap_process_tlv_message_data_c class does nothing.
+	 */
+	EAP_FUNC_IMPORT virtual ~eap_process_tlv_message_data_c();
+
+	/**
+	 * The constructor of the eap_process_tlv_message_data_c class simply initializes the attributes.
+	 */
+	EAP_FUNC_IMPORT eap_process_tlv_message_data_c(
+		abs_eap_am_tools_c * const tools);
+
+	/**
+	 * This function should increase reference count.
+	 */
+	EAP_FUNC_IMPORT void object_increase_reference_count();
+
+	/**
+	 * This function should first decrease reference count
+	 * and second return the remaining reference count.
+	 * Reference count must not be decreased when it is zero.
+	 */
+	EAP_FUNC_IMPORT u32_t object_decrease_reference_count();
+
+	/**
+	 * Object must indicate it's validity.
+	 * If object initialization fails this function must return false.
+	 * @return This function returns the validity of this object.
+	 */
+	EAP_FUNC_IMPORT bool get_is_valid();
+
+	//- - - - - - - - - - - - - - - - - - - - - - - - - 
+
+	EAP_FUNC_IMPORT u32_t get_payload_size(
+		const eap_variable_data_c * const data) const;
+
+	EAP_FUNC_IMPORT u32_t get_payload_size(
+		const eap_am_network_id_c * const network_id) const;
+
+	EAP_FUNC_IMPORT u32_t get_payload_size(
+		const abs_eap_state_notification_c * const state) const;
+
+	EAP_FUNC_IMPORT u32_t get_payload_size(
+		const eapol_session_key_c * const session_key) const;
+
+	EAP_FUNC_IMPORT u32_t get_payload_size(
+		EAP_TEMPLATE_CONST eap_array_c<u16_t> * const ushort_array) const;
+
+	EAP_FUNC_IMPORT u32_t get_payload_size(
+		const eap_certificate_entry_c * const cert) const;
+
+	EAP_FUNC_IMPORT u32_t get_payload_size(
+		EAP_TEMPLATE_CONST eap_array_c<eap_certificate_entry_c> * const cert_array) const;
+
+	EAP_FUNC_IMPORT u32_t get_payload_size(
+		const eap_method_settings_c * const internal_settings) const;
+
+	EAP_FUNC_IMPORT u32_t get_payload_size(
+		EAP_TEMPLATE_CONST eap_array_c<eap_type_value_e> * const eap_type_array) const;
+
+#if defined(USE_EAP_SIMPLE_CONFIG)
+
+	EAP_FUNC_IMPORT u32_t get_payload_size(
+		const network_key_and_index_c * const key) const;
+
+	EAP_FUNC_IMPORT u32_t get_payload_size(
+		const eap_array_c<network_key_and_index_c> * const network_keys) const;
+
+	EAP_FUNC_IMPORT u32_t get_payload_size(
+		const simple_config_credential_c * const credential) const;
+
+	EAP_FUNC_IMPORT u32_t get_payload_size(
+		EAP_TEMPLATE_CONST eap_array_c<simple_config_credential_c> * const credential_array) const;
+
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+
+	EAP_FUNC_IMPORT u32_t get_payload_size(
+		const eap_variable_data_c * const selector,
+		const eap_config_value_c * const configuration_option) const;
+
+	//- - - - - - - - - - - - - - - - - - - - - - - - - 
+
+	EAP_FUNC_IMPORT eap_status_e add_structured_parameter_header(
+		const eap_tlv_message_type_e type,
+		const u32_t length);
+
+
+	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
+		const eap_tlv_message_type_e type,
+		const u32_t integer);
+
+
+	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
+		const u64_t long_integer);
+
+	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
+		const u32_t integer);
+
+	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
+		const u16_t integer);
+
+	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
+		const u8_t byte_integer);
+
+
+	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
+		const i32_t integer);
+
+	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
+		const i16_t integer);
+
+	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
+		const i8_t byte_integer);
+
+
+	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
+		const bool boolean);
+
+	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
+		const eap_status_e status);
+
+	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
+		const eapol_key_authentication_type_e authentication_type);
+
+	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
+		const eapol_key_802_11_authentication_mode_e mode);
+
+	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
+		const eap_tlv_message_type_function_e function);
+
+	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
+		const eap_variable_data_c * const variable_data);
+
+	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
+		const eap_am_network_id_c * const network_id);
+
+	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
+		const eap_buf_chain_wr_c * const packet_buffer);
+
+	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
+		const eapol_session_key_c * const session_key);
+
+	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
+		const abs_eap_state_notification_c * const state);
+
+	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
+		const eap_type_value_e eap_type);
+
+	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
+		const eap_general_header_base_c * const packet_data);
+
+	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
+		const eap_method_settings_c * const internal_settings);
+
+	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
+		const eap_certificate_entry_c * const internal_settings);
+
+	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<u16_t> * const ushort_array);
+
+	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<eap_certificate_entry_c> * const cert_array);
+
+	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<eap_type_value_e> * const eap_type_array);
+
+#if defined(USE_EAP_SIMPLE_CONFIG)
+
+	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<simple_config_credential_c> * const credential_array);
+	
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+
+	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
+		const eap_variable_data_c * const selector,
+		const eap_config_value_c * const configuration_option);
+
+	//- - - - - - - - - - - - - - - - - - - - - - - - - 
+
+	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
+		const eap_tlv_header_c * const integer_header,
+		u64_t * const value);
+
+	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
+		const eap_tlv_header_c * const integer_header,
+		u32_t * const value);
+
+	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
+		const eap_tlv_header_c * const integer_header,
+		u16_t * const value);
+
+	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
+		const eap_tlv_header_c * const integer_header,
+		u8_t * const value);
+
+	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
+		const eap_tlv_header_c * const integer_header,
+		i32_t * const value);
+
+	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
+		const eap_tlv_header_c * const integer_header,
+		i16_t * const value);
+
+	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
+		const eap_tlv_header_c * const integer_header,
+		i8_t * const value);
+
+	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
+		const eap_tlv_header_c * const function_header,
+		eap_tlv_message_type_function_e * const function);
+
+	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
+		const eap_tlv_header_c * const network_id_header,
+		eap_am_network_id_c * const new_network_id);
+
+	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
+		const eap_tlv_header_c * const variable_data_header,
+		eap_variable_data_c * const variable_data);
+
+	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
+		const eap_tlv_header_c * const session_key_header,
+		eapol_session_key_c * const session_key);
+	
+	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
+		const eap_tlv_header_c * const state_header,
+		eap_state_notification_c * * const state);
+
+	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
+		const eap_tlv_header_c * const eap_type_header,
+		eap_type_value_e * const eap_type);
+
+	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
+		const eap_tlv_header_c * const settings_header,
+		eap_method_settings_c * const settings);
+
+	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
+		const eap_tlv_header_c * const settings_header,
+		eap_certificate_entry_c * const settings);
+
+	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
+		const eap_tlv_header_c * const settings_header,
+		eap_array_c<u16_t> * const settings);
+
+	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
+		const eap_tlv_header_c * const settings_header,
+		eap_array_c<eap_type_value_e> * const settings);
+
+	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
+		const eap_tlv_header_c * const settings_header,
+		eap_array_c<eap_certificate_entry_c> * const settings);
+
+#if defined(USE_EAP_SIMPLE_CONFIG)
+
+	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
+		const eap_tlv_header_c * const network_key_header,
+		network_key_and_index_c * const network_key);
+
+	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
+		const eap_tlv_header_c * const network_keys_array_header,
+		eap_array_c<network_key_and_index_c> * const network_keys_array);
+
+	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
+		const eap_tlv_header_c * const credential_array_header,
+		eap_array_c<simple_config_credential_c> * const credential_array);
+
+	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
+		const eap_tlv_header_c * const credential_header,
+		simple_config_credential_c * const credential);
+
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+
+	//- - - - - - - - - - - - - - - - - - - - - - - - - 
+
+	EAP_FUNC_IMPORT eap_status_e read_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+		const u32_t parameter_index,
+		eap_am_network_id_c * const network_id);
+
+	EAP_FUNC_IMPORT eap_status_e read_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+		const u32_t parameter_index,
+		eap_variable_data_c * const variable_data);
+
+	EAP_FUNC_IMPORT eap_status_e read_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+		const u32_t parameter_index,
+		const eap_tlv_message_type_e type,
+		eap_status_e * const out_data);
+
+	EAP_FUNC_IMPORT eap_status_e read_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+		const u32_t parameter_index,
+		eap_array_c<eap_am_network_id_c> * const out_data);
+
+	EAP_FUNC_IMPORT eap_status_e read_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+		const u32_t parameter_index,
+		eap_state_notification_c * * const out_data);
+
+	EAP_FUNC_IMPORT eap_status_e read_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+		const u32_t parameter_index,
+		eapol_RSNA_key_header_c::eapol_RSNA_cipher_e * const out_data);
+
+	EAP_FUNC_IMPORT eap_status_e read_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+		const u32_t parameter_index,
+		bool * const out_data);
+
+	EAP_FUNC_IMPORT eap_status_e read_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+		const u32_t parameter_index,
+		eap_type_value_e * const out_data);
+
+	EAP_FUNC_IMPORT eap_status_e read_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+		const u32_t parameter_index,
+		eapol_key_authentication_type_e * const out_data);
+
+	EAP_FUNC_IMPORT eap_status_e read_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+		const u32_t parameter_index,
+		eapol_session_key_c * const out_data);
+
+	EAP_FUNC_IMPORT eap_status_e read_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+		const u32_t parameter_index,
+		eap_tlv_message_type_function_e * const out_data);
+
+	EAP_FUNC_IMPORT eap_status_e read_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+		const u32_t parameter_index,
+		eapol_key_802_11_authentication_mode_e * const out_data);
+
+	EAP_FUNC_IMPORT eap_status_e read_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+		const u32_t parameter_index,
+		eapol_RSNA_key_header_c::eapol_tkip_mic_failure_type_e * const out_data);
+
+	EAP_FUNC_IMPORT eap_status_e read_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+		const u32_t parameter_index,
+		eapol_wlan_authentication_state_e * const out_data);
+
+	EAP_FUNC_IMPORT eap_status_e read_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+		const u32_t parameter_index,
+		u64_t * const out_data);
+
+	EAP_FUNC_IMPORT eap_status_e read_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+		const u32_t parameter_index,
+		u32_t * const out_data);
+
+	EAP_FUNC_IMPORT eap_status_e read_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+		const u32_t parameter_index,
+		u16_t * const out_data);
+
+	EAP_FUNC_IMPORT eap_status_e read_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+		const u32_t parameter_index,
+		u8_t * const out_data);
+
+	EAP_FUNC_IMPORT eap_status_e read_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+		const u32_t parameter_index,
+		i32_t * const out_data);
+
+	EAP_FUNC_IMPORT eap_status_e read_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+		const u32_t parameter_index,
+		i16_t * const out_data);
+
+	EAP_FUNC_IMPORT eap_status_e read_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+		const u32_t parameter_index,
+		i8_t * const out_data);
+
+	EAP_FUNC_IMPORT eap_status_e read_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+		const u32_t parameter_index,
+		eap_method_settings_c * const out_data);
+
+	EAP_FUNC_IMPORT eap_status_e read_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+		const u32_t parameter_index,
+		eap_array_c<u16_t> * const out_data);
+
+	EAP_FUNC_IMPORT eap_status_e read_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+		const u32_t parameter_index,
+		eap_array_c<eap_certificate_entry_c> * const out_data);
+
+	EAP_FUNC_IMPORT eap_status_e read_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+		const u32_t parameter_index,
+		eap_array_c<eap_type_value_e> * const out_data);
+
+	EAP_FUNC_IMPORT eap_status_e read_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+		const u32_t parameter_index,
+		eap_certificate_entry_c::eap_certificate_type_e * const out_data);
+
+#if defined(USE_EAP_SIMPLE_CONFIG)
+
+	EAP_FUNC_IMPORT eap_status_e read_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+		const u32_t parameter_index,
+		simple_config_Authentication_Type_e * const out_data);
+
+	EAP_FUNC_IMPORT eap_status_e read_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+		const u32_t parameter_index,
+		simple_config_Encryption_Type_e * const out_data);
+
+	EAP_FUNC_IMPORT eap_status_e read_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+		const u32_t parameter_index,
+		eap_array_c<simple_config_credential_c> * const out_data);
+
+	EAP_FUNC_IMPORT eap_status_e read_parameter_data(
+		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters,
+		const u32_t parameter_index,
+		eap_array_c<network_key_and_index_c> * const out_data);
+
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+
+	//- - - - - - - - - - - - - - - - - - - - - - - - - 
+
+	EAP_FUNC_IMPORT eap_const_string get_type_string(const eap_tlv_message_type_e type);
+
+	EAP_FUNC_IMPORT eap_const_string get_function_string(const eap_tlv_message_type_function_e function);
+
+	// 
+	//--------------------------------------------------
+}; // class eap_process_tlv_message_data_c
+
+
+//--------------------------------------------------
+
+#endif //#if !defined(_EAP_PROCESS_TLV_MESSAGE_DATA_H_)
+
+
+// End.
--- a/eapol/eapol_framework/eapol_common/include/eap_protocol_layer.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_protocol_layer.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 14 %
+* %version: %
 */
 
 #if !defined(_EAP_PROTOCOL_LAYER_H_)
--- a/eapol/eapol_framework/eapol_common/include/eap_rogue_ap_entry.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_rogue_ap_entry.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 4 %
+* %version: %
 */
 
 #ifndef EAP_ROGUE_AP_ENTRY_H
--- a/eapol/eapol_framework/eapol_common/include/eap_session_core.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_session_core.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9.1.2 %
+* %version: %
 */
 
 #if !defined(_EAP_SESSION_CORE_H_)
@@ -24,11 +24,13 @@
 
 #include "eap_tools.h"
 #include "eap_am_export.h"
-#include "abs_eap_core.h"
+#include "abs_eap_session_core.h"
 #include "eap_core_map.h"
 #include "abs_eap_stack_interface.h"
+#include "eap_session_core_base.h"
+#include "eap_base_type.h"
+#include "eap_core.h"
 
-class eap_core_c;
 class eap_network_id_selector_c;
 
 
@@ -53,13 +55,14 @@
 , public abs_eap_core_map_c
 , public abs_eap_base_timer_c
 , public abs_eap_stack_interface_c
+, public eap_session_core_base_c
 {
 private:
 	//--------------------------------------------------
 
 	/// This is back pointer to object which created this object.
 	/// Packets are sent to the partner.
-	abs_eap_core_c * const m_partner;
+	abs_eap_session_core_c * const m_partner;
 
 	/// This is pointer to the tools class.
 	abs_eap_am_tools_c * const m_am_tools;
@@ -120,7 +123,7 @@
 	 */
 	EAP_FUNC_IMPORT eap_session_core_c(
 		abs_eap_am_tools_c * const tools,
-		abs_eap_core_c * const partner,
+		abs_eap_session_core_c * const partner,
 		const bool is_client_when_true);
 
 	/**
@@ -138,7 +141,7 @@
 	 * If this fails this function must return corresponding error status.
 	 * @return This function returns the status of operation.
 	 */
-	EAP_FUNC_IMPORT eap_status_e synchronous_cancel_all_eap_sessions();
+	EAP_FUNC_IMPORT eap_status_e cancel_all_eap_sessions();
 
 	// This is documented in abs_eap_stack_interface_c::packet_process().
 	EAP_FUNC_IMPORT eap_status_e packet_process(
@@ -165,7 +168,7 @@
 	/**
 	 * The get_partner() function returns pointer to partner class.
 	 */
-	EAP_FUNC_IMPORT abs_eap_core_c * get_partner();
+	EAP_FUNC_IMPORT abs_eap_session_core_c * get_partner();
 
 	/**
 	 * The get_header_offset() function obtains the header offset of EAP-packet.
@@ -316,20 +319,19 @@
 		const bool force_clean_restart,
 		const bool from_timer = false);
 
-#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
 	/**
 	 * This function creates EAP session object synchronously.
 	 * @param receive_network_id identifies the removed EAP session.
 	 */
-	EAP_FUNC_IMPORT eap_status_e synchronous_create_eap_session(
+	EAP_FUNC_IMPORT eap_status_e create_eap_session(
 		const eap_am_network_id_c * const receive_network_id);
-#endif //#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
 
 	/**
 	 * This function removes EAP session object synchronously.
 	 * @param receive_network_id identifies the removed EAP session.
 	 */
-	EAP_FUNC_IMPORT eap_status_e synchronous_remove_eap_session(
+	EAP_FUNC_IMPORT eap_status_e remove_eap_session(
+		const bool complete_to_lower_layer,
 		const eap_am_network_id_c * const receive_network_id);
 
 	/**
@@ -358,9 +360,6 @@
 		const u32_t p_id);
 
 	//
-	EAP_FUNC_IMPORT eap_status_e cancel_all_timers();
-
-	//
 	EAP_FUNC_IMPORT eap_status_e check_is_valid_eap_type(const eap_type_value_e eap_type);
 
 	/// @see abs_eap_core_c::get_eap_type_list().
@@ -374,6 +373,20 @@
 	EAP_FUNC_IMPORT eap_status_e set_session_timeout(
 		const u32_t session_timeout_ms);
 
+	EAP_FUNC_IMPORT eap_status_e set_eap_database_reference_values(
+		const eap_variable_data_c * const reference);
+
+	EAP_FUNC_IMPORT eap_status_e get_802_11_authentication_mode(
+		const eap_am_network_id_c * const receive_network_id,
+		const eapol_key_authentication_type_e authentication_type,
+		const eap_variable_data_c * const SSID,
+		const eap_variable_data_c * const preshared_key);
+
+	EAP_FUNC_IMPORT eap_status_e complete_get_802_11_authentication_mode(
+		const eap_status_e completion_status,
+		const eap_am_network_id_c * const receive_network_id,
+		const eapol_key_802_11_authentication_mode_e mode);
+
 	//--------------------------------------------------
 }; // class eap_session_core_c
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_common/include/eap_session_core_base.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,166 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#if !defined(_EAP_SESSION_CORE_BASE_H_)
+#define _EAP_SESSION_CORE_BASE_H_
+
+#include "eap_tools.h"
+#include "eap_am_export.h"
+#include "abs_eap_core.h"
+#include "eap_core_map.h"
+#include "eap_database_reference_if.h"
+#include "eapol_key_types.h"
+
+class abs_eap_session_core_c;
+
+/// A eap_session_core_base_c class implements mapping of EAP authentication sessions.
+/// Network identity separates parallel EAP authentication sessions.
+class EAP_EXPORT eap_session_core_base_c
+: public eap_database_reference_if_c
+{
+private:
+	//--------------------------------------------------
+
+
+	//--------------------------------------------------
+protected:
+	//--------------------------------------------------
+
+	//--------------------------------------------------
+public:
+	//--------------------------------------------------
+
+	/**
+	 * The destructor of the eap_core class does nothing special.
+	 */
+	EAP_FUNC_IMPORT virtual ~eap_session_core_base_c();
+
+	/**
+	 * The constructor initializes member attributes using parameters passed to it.
+	 * @param tools is pointer to the tools class. @see abs_eap_am_tools_c.
+	 * @param partner is back pointer to object which created this object.
+	 * @param is_client_when_true indicates whether the network entity should act
+	 * as a client (true) or server (false), in terms of EAP-protocol
+	 * whether this network entity is EAP-supplicant (true) or EAP-authenticator (false).
+	 */
+	EAP_FUNC_IMPORT eap_session_core_base_c();
+
+	/**
+	 * This function must reset the state of object to same as 
+	 * state was after the configure() function call.
+	 * If object reset succeeds this function must return eap_status_ok.
+	 * If object reset fails this function must return corresponding error status.
+	 * @return This function returns the status of reset operation.
+	 */
+	virtual eap_status_e reset() = 0;
+
+	// This is documented in abs_eap_stack_interface_c::packet_process().
+	virtual eap_status_e packet_process(
+		const eap_am_network_id_c * const receive_network_id,
+		eap_general_header_base_c * const packet_data,
+		const u32_t packet_length) = 0; 
+
+	/**
+	 * The adaptation module calls the eap_acknowledge() function after
+	 * any Network Protocol packet is received. This is used as a success indication.
+	 * This is described in RFC 2284 "PPP Extensible Authentication Protocol (EAP)".
+	 * @param connection_handle separates the context of the acknowledged session.
+	 * Mostly there is only one session in the client.
+	 * The server does not need eap_acknowledge() function because
+	 * server (EAP-authenticator) sends the EAP-success message.
+	 */
+	virtual eap_status_e eap_acknowledge(
+		const eap_am_network_id_c * const receive_network_id) = 0; 
+
+#if defined(USE_EAP_CORE_SERVER)
+	/**
+	 * The EAP Core calls the send_eap_identity_request() function
+	 * when EAP-authentication is needed with another peer.
+	 * @param network_id includes the addresses (network identity) and packet type.
+	 */
+	virtual eap_status_e send_eap_identity_request(
+		const eap_am_network_id_c * const network_id) = 0;
+#endif //#if defined(USE_EAP_CORE_SERVER)
+
+	// This is documented in abs_eap_stack_interface_c::configure().
+	virtual eap_status_e configure() = 0;
+
+	// This is documented in abs_eap_stack_interface_c::shutdown().
+	virtual eap_status_e shutdown() = 0;
+
+	// This is documented in abs_eap_stack_interface_c::get_is_valid().
+	virtual bool get_is_valid() = 0;
+
+	/**
+	 * This function cancels all EAP-sessions.
+	 * If this succeeds this function must return eap_status_ok.
+	 * If this fails this function must return corresponding error status.
+	 * @return This function returns the status of operation.
+	 */
+	virtual eap_status_e cancel_all_eap_sessions() = 0;
+
+	/**
+	 * This function creates EAP session object synchronously.
+	 * @param receive_network_id identifies the removed EAP session.
+	 */
+	virtual eap_status_e create_eap_session(
+		const eap_am_network_id_c * const receive_network_id) = 0;
+
+	/**
+	 * This function removes EAP session object synchronously.
+	 * @param receive_network_id identifies the removed EAP session.
+	 */
+	virtual eap_status_e remove_eap_session(
+		const bool complete_to_lower_layer,
+		const eap_am_network_id_c * const receive_network_id) = 0;
+
+	virtual eap_status_e get_802_11_authentication_mode(
+		const eap_am_network_id_c * const receive_network_id,
+		const eapol_key_authentication_type_e authentication_type,
+		const eap_variable_data_c * const SSID,
+		const eap_variable_data_c * const preshared_key) = 0;
+
+	//--------------------------------------------------
+
+	EAP_FUNC_IMPORT static eap_session_core_base_c * new_eap_session_core_c(
+		abs_eap_am_tools_c * const tools,
+		abs_eap_session_core_c * const partner,
+		const bool is_client_when_true,
+		const u32_t MTU);
+
+	//--------------------------------------------------
+}; // class eap_session_core_base_c
+
+eap_session_core_base_c * new_eap_core_client_message_if_c(
+	abs_eap_am_tools_c * const tools,
+	abs_eap_session_core_c * const partner,
+	const bool is_client_when_true,
+	const u32_t MTU);
+
+//--------------------------------------------------
+
+#endif //#if !defined(_EAP_SESSION_CORE_BASE_H_)
+
+//--------------------------------------------------
+
+
+
+// End.
--- a/eapol/eapol_framework/eapol_common/include/eap_sort.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_sort.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: %
 */
 
 #if !defined(_EAP_SORT_H_)
--- a/eapol/eapol_framework/eapol_common/include/eap_state_notification.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_state_notification.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 4 %
+* %version: %
 */
 
 #if !defined(_EAP_STATE_NOTIFICATION_H_)
@@ -92,9 +92,6 @@
 		u8_t eap_identifier,
 		bool allow_send_eap_success);
 
-
-#if defined(USE_EAP_EXPANDED_TYPES)
-
 	EAP_FUNC_IMPORT eap_state_notification_c(
 		abs_eap_am_tools_c * const tools,
 		const eap_am_network_id_c * const send_network_id,
@@ -107,9 +104,6 @@
 		u8_t eap_identifier,
 		bool allow_send_eap_success);
 
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
-
-
 	EAP_FUNC_IMPORT eap_state_notification_c(
 		abs_eap_am_tools_c * const tools,
 		const eap_am_network_id_c * const send_network_id,
--- a/eapol/eapol_framework/eapol_common/include/eap_state_selector.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_state_selector.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11 %
+* %version: %
 */
 
 #if !defined(_EAP_STATE_SELECTOR_H_)
--- a/eapol/eapol_framework/eapol_common/include/eap_state_store.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_state_store.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #if !defined(_EAP_STATE_STORE_H_)
--- a/eapol/eapol_framework/eapol_common/include/eap_status.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_status.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 #if !defined(_EAP_STATUS_H_)
--- a/eapol/eapol_framework/eapol_common/include/eap_status_string.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_status_string.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 4 %
+* %version: %
 */
 
 #if !defined( _EAP_STATUS_STRING_H_ )
--- a/eapol/eapol_framework/eapol_common/include/eap_timer_queue.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_timer_queue.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 4 %
+* %version: %
 */
 
 #if !defined(_EAP_TIMER_QUEU_H_)
--- a/eapol/eapol_framework/eapol_common/include/eap_tlv_header.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_tlv_header.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 5 %
+* %version: %
 */
 
 #if !defined(_EAP_TLV_HEADER_H_)
--- a/eapol/eapol_framework/eapol_common/include/eap_tlv_message_data.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_tlv_message_data.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 6 %
+* %version: %
 */
 
 #if !defined(_EAP_TLV_MESSAGE_DATA_H_)
--- a/eapol/eapol_framework/eapol_common/include/eap_tools.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_tools.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8.1.2 %
+* %version: %
 */
 
 #if !defined( _EAP_TOOLS_H_ )
@@ -347,6 +347,8 @@
 
 	#define EAP_TRACE_RETURN_STRING(object_name, string) EAP_NULL_FUNCTION
 
+	#define EAP_TRACE_RETURN_STRING_FLAGS(object_name, flags, string) EAP_NULL_FUNCTION
+
 	#define EAP_TRACE_DATA_ERROR(object_name, flags, _parameter_list_) EAP_NULL_FUNCTION
 
 	#define EAP_TRACE_DATA_DEBUG(object_name, flags, _parameter_list_) EAP_NULL_FUNCTION
@@ -467,6 +469,9 @@
 		#define EAP_TRACE_RETURN_STRING(object_name, string) \
 			eap_automatic_trace_string_c __eap_trace_function_returns__(object_name, string);
 
+		#define EAP_TRACE_RETURN_STRING_FLAGS(object_name, flags, string) \
+			eap_automatic_trace_string_c __eap_trace_function_returns__(object_name, flags, string);
+
 		/**
 		 * This flag indicates that the debug traces are active.
 		 * Functions can use this flag to deduce whether debug related
@@ -484,6 +489,8 @@
 
 		#define EAP_TRACE_RETURN_STRING(object_name, string) EAP_NULL_FUNCTION
 
+		#define EAP_TRACE_RETURN_STRING_FLAGS(object_name, flags, string) EAP_NULL_FUNCTION
+
 	#endif
 
 
--- a/eapol/eapol_framework/eapol_common/include/eap_type_all.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_type_all.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8.1.2 %
+* %version: %
 */
 
 #if !defined(_EAP_TYPE_ALL_H_)
@@ -49,8 +49,11 @@
 	abs_eap_base_type_c * const partner,
 	const eap_type_value_e eap_type,
 	const bool is_client_when_true,
-	const eap_am_network_id_c * const receive_network_id,
-	abs_eap_configuration_if_c * const configuration_if);
+	const eap_am_network_id_c * const receive_network_id
+#if defined(USE_EAP_SIMPLE_CONFIG)
+	, abs_eap_configuration_if_c * const configuration_if
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+	);
 
 //--------------------------------------------------
 
--- a/eapol/eapol_framework/eapol_common/include/eap_type_all_types.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_type_all_types.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 4 %
+* %version: %
 */
 
 #if !defined(_EAP_TYPE_ALL_TYPES_H_)
--- a/eapol/eapol_framework/eapol_common/include/eap_type_selection.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_type_selection.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 4 %
+* %version: %
 */
 
 #if !defined(_EAP_TYPE_SELECTION_H_)
--- a/eapol/eapol_framework/eapol_common/include/eap_variable_data.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_variable_data.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #if !defined(_EAP_VARIABLE_DATA_H_)
--- a/eapol/eapol_framework/eapol_common/include/eap_wimax_authentication.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eap_wimax_authentication.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 5.1.2 %
+* %version: %
 */
 
 #if !defined(_EAP_WIMAX_AUTHENTICATION_H_)
@@ -31,7 +31,6 @@
 #include <abs_eap_am_tools.h>
 
 // FORWARD DECLARATIONS
-class abs_eapol_wlan_database_reference_if_c;
 class eap_session_core_c;
 class eap_am_tools_symbian_c;
 class eap_file_config_c;
@@ -63,8 +62,7 @@
 	EAP_FUNC_IMPORT static eap_wimax_authentication_c* new_eap_wimax_authentication_c(
 		abs_eap_am_tools_c* const tools,
 		abs_eap_wimax_authentication_c* const partner,
-		const bool is_client_when_true,
-		const abs_eapol_wlan_database_reference_if_c* const wimax_database_reference);
+		const bool is_client_when_true);
 
 	EAP_FUNC_IMPORT eap_status_e shutdown();
 
--- a/eapol/eapol_framework/eapol_common/include/eapol_core.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eapol_core.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 28.1.3 %
+* %version: 47 %
 */
 
 #if !defined(_EAPOL_CORE_H_)
@@ -24,22 +24,19 @@
 
 #include "eap_tools.h"
 #include "eap_am_export.h"
-#include "abs_eap_core.h"
+#include "abs_eap_session_core.h"
 #include "eap_core.h"
 #include "abs_eapol_core.h"
 #include "eap_base_type.h"
 #include "eap_variable_data.h"
 #include "abs_eap_am_mutex.h"
-#if !defined(NO_EAP_SESSION_CORE)
-	#include "eap_session_core.h"
-#endif
+#include "eap_session_core_base.h"
 #include "abs_eap_stack_interface.h"
 #include "abs_eapol_key_state.h"
 #include "eapol_rsna_key_header.h"
-#if defined(USE_EAPOL_KEY_STATE)
-	#include "eapol_key_state.h"
-	#include "abs_eapol_key_state_map.h"
-#endif //#if defined(USE_EAPOL_KEY_STATE)
+#include "eapol_key_state.h"
+#include "abs_eapol_key_state_map.h"
+#include "eap_database_reference_if.h"
 
 
 /** @file */
@@ -74,13 +71,12 @@
 
 /// A eapol_core_c class implements the basic functionality of EAPOL.
 class EAP_EXPORT eapol_core_c
-: public abs_eap_core_c
+: public abs_eap_session_core_c
 , public abs_eap_base_timer_c
 , public abs_eap_stack_interface_c
-#if defined(USE_EAPOL_KEY_STATE)
 , public abs_eapol_key_state_c
 , public abs_eapol_key_state_map_c
-#endif //#if defined(USE_EAPOL_KEY_STATE)
+, public eap_database_reference_if_c
 {
 
 private:
@@ -92,17 +88,11 @@
 	/// This is pointer to the eap_core object. The eapol_core object gives
 	/// the received packets to the eap_core object. The eap_core object sends
 	/// packets through the eapol_core object.
-#if !defined(NO_EAP_SESSION_CORE)
-	eap_session_core_c * const m_eap_core;
-#else
-	eap_core_c * const m_eap_core;
-#endif
+	eap_session_core_base_c * m_eap_core;
 
-#if defined(USE_EAPOL_KEY_STATE)
 	/// This stores eapol_key_state_c objects using eap_variable_data selector.
 	/// Selector data includes send addresses of the Ethernet packet.
 	eap_core_map_c<eapol_key_state_c, abs_eapol_key_state_map_c, eap_variable_data_c> m_eapol_key_state_map;
-#endif //#if defined(USE_EAPOL_KEY_STATE)
 
 	/// This is pointer to the tools class.
 	abs_eap_am_tools_c * const m_am_tools;
@@ -141,13 +131,10 @@
 
 	bool m_block_state_notifications;
 
-#if defined(USE_EAPOL_KEY_STATE)
 	/// This flag will skip start of 4-Way Handshake with true value.
 	bool m_skip_start_4_way_handshake;
-#endif //#if defined(USE_EAPOL_KEY_STATE)
 
 
-#if defined(USE_EAPOL_KEY_STATE)
 	EAP_FUNC_IMPORT eap_status_e indicate_eapol_key_state_started_eap_authentication(
 		const eap_am_network_id_c * const send_network_id);
 
@@ -155,7 +142,8 @@
 		const eap_am_network_id_c * const send_network_id);
 
 	EAP_FUNC_IMPORT eap_status_e remove_eapol_key_state(
-		const eap_am_network_id_c * const send_network_id);
+		const eap_am_network_id_c * const send_network_id,
+		const bool force_remove);
 
 	eap_status_e copy_eapol_key_state(
 		const eap_am_network_id_c * const old_receive_network_id, ///< source includes remote address, destination includes local address.
@@ -167,7 +155,6 @@
 		const eap_am_network_id_c * const old_receive_network_id, ///< source includes remote address, destination includes local address.
 		const eap_am_network_id_c * const new_receive_network_id ///< source includes remote address, destination includes local address.
 		);
-#endif //#if defined(USE_EAPOL_KEY_STATE)
 
 	//--------------------------------------------------
 protected:
@@ -456,24 +443,17 @@
 		const u32_t p_id);
 
 	//
-	EAP_FUNC_IMPORT eap_status_e cancel_all_timers();
-
-	//
 	EAP_FUNC_IMPORT eap_status_e check_is_valid_eap_type(const eap_type_value_e eap_type);
 
 	// See abs_eap_core_c::get_eap_type_list().
 	EAP_FUNC_IMPORT eap_status_e get_eap_type_list(
 		eap_array_c<eap_type_value_e> * const eap_type_list);
 
-#if defined(USE_EAPOL_KEY_STATE)
 	// See abs_eapol_key_state_c::get_and_increment_global_key_counter().
 	EAP_FUNC_IMPORT eap_status_e get_and_increment_global_key_counter(
 		eap_variable_data_c * const key_counter);
-#endif //#if defined(USE_EAPOL_KEY_STATE)
 
 
-#if defined(USE_EAPOL_KEY_STATE) && defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
 	/**
 	 * Function creates a state for later use. This is for optimazing 4-Way Handshake.
 	 * @param receive_network_id carries the MAC addresses.
@@ -486,11 +466,6 @@
 		const eapol_key_authentication_type_e authentication_type
 		);
 
-#endif //#if defined(USE_EAPOL_KEY_STATE) && defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
-
-#if defined(USE_EAPOL_KEY_STATE)
-
 	/**
 	 * This function need to be called when client STA (re)associates to AP.
 	 * @param receive_network_id carries the MAC addresses.
@@ -510,35 +485,25 @@
 		const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e eapol_group_cipher,
 		const eap_variable_data_c * const pre_shared_key);
 
-#endif //#if defined(USE_EAPOL_KEY_STATE)
-
-
-#if defined(USE_EAPOL_KEY_STATE)
 	/**
 	 * This function need to be called when client STA disassociates from AP.
 	 * @param receive_network_id carries the MAC addresses.
 	 * MAC address of Authenticator should be in source address. MAC address of Supplicant should be in destination address.
 	 */
 	EAP_FUNC_IMPORT eap_status_e disassociation(
+		const bool complete_to_lower_layer,
 		const eap_am_network_id_c * const receive_network_id);
-#endif //#if defined(USE_EAPOL_KEY_STATE)
 
-#if defined(USE_EAPOL_KEY_STATE)
 	EAP_FUNC_IMPORT eap_status_e asynchronous_init_remove_eapol_key_state(
 		const eap_am_network_id_c * const send_netword_id);
-#endif //#if defined(USE_EAPOL_KEY_STATE)
 
-#if defined(USE_EAPOL_KEY_STATE)
 	EAP_FUNC_IMPORT static eap_status_e shutdown_operation(
 		eapol_key_state_c * const handler,
 		abs_eap_am_tools_c * const m_am_tools);
-#endif //#if defined(USE_EAPOL_KEY_STATE)
 
-#if defined(USE_EAPOL_KEY_STATE)
 	EAP_FUNC_IMPORT static eap_status_e cancel_authentication_session(
 		eapol_key_state_c * const handler,
 		abs_eap_am_tools_c * const m_am_tools);
-#endif //#if defined(USE_EAPOL_KEY_STATE)
 
 	/// @see abs_eap_core_c::add_rogue_ap().
 	EAP_FUNC_IMPORT eap_status_e add_rogue_ap(eap_array_c<eap_rogue_ap_entry_c> & rogue_ap_list);
@@ -552,25 +517,37 @@
 	EAP_FUNC_IMPORT eap_status_e set_session_timeout(
 		const u32_t session_timeout_ms);
 
+#if defined(USE_EAP_SIMPLE_CONFIG)
+
+	EAP_FUNC_IMPORT eap_status_e save_simple_config_session(
+		const simple_config_state_e state,
+		EAP_TEMPLATE_CONST eap_array_c<simple_config_credential_c> * const credential_array,
+		const eap_variable_data_c * const new_password,
+		const simple_config_Device_Password_ID_e Device_Password_ID,
+		const simple_config_payloads_c * const other_configuration);
+
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+
+	EAP_FUNC_IMPORT eap_status_e set_eap_database_reference_values(
+		const eap_variable_data_c * const reference);
+
+	EAP_FUNC_IMPORT eap_status_e get_802_11_authentication_mode(
+		const eap_am_network_id_c * const receive_network_id,
+		const eapol_key_authentication_type_e authentication_type,
+		const eap_variable_data_c * const SSID,
+		const eap_variable_data_c * const preshared_key);
+
+	EAP_FUNC_IMPORT eap_status_e complete_get_802_11_authentication_mode(
+		const eap_status_e completion_status,
+		const eap_am_network_id_c * const receive_network_id,
+		const eapol_key_802_11_authentication_mode_e mode);
+
+	EAP_FUNC_IMPORT eap_status_e complete_remove_eap_session(
+		const bool complete_to_lower_layer,
+		const eap_am_network_id_c * const receive_network_id);
+
 private:
 
-
-#if !defined(USE_EAPOL_KEY_STATE)
-	/**
-	 * The handle_RC4_key_descriptor() function parses the EAPOL-Key frame 
-	 * that includes RC4 Key Descriptor.
-	 * This function retrieves the traffic encryption key from it. It forwards the key
-	 * to lower layers. The format of EAPOL-Key frame is described in
-	 * draft-congdon-radius-8021x-23.txt (RFC ????)
-	 * @param eapol is the received packet
-	 * @param packet_length is the length of the packet
-	 */
-	eap_status_e handle_RC4_key_descriptor(
-		const eap_am_network_id_c * const receive_network_id,
-		eapol_RC4_key_header_c * const eapol,
-		const u32_t packet_length);
-#endif //#if !defined(USE_EAPOL_KEY_STATE)
-	
 	//--------------------------------------------------
 }; // class eapol_core_c
 
--- a/eapol/eapol_framework/eapol_common/include/eapol_ethernet_address.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eapol_ethernet_address.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 4 %
+* %version: %
 */
 
 #if !defined(_EAPOL_ETHERNET_ADDRESS_H_)
--- a/eapol/eapol_framework/eapol_common/include/eapol_ethernet_header.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eapol_ethernet_header.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 6 %
+* %version: %
 */
 
 #if !defined(_EAP_ETHERNET_HEADER_H_)
--- a/eapol/eapol_framework/eapol_common/include/eapol_handle_tlv_message_data.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eapol_handle_tlv_message_data.h	Mon May 24 20:32:47 2010 +0300
@@ -16,85 +16,18 @@
 */
 
 /*
-* %version: 25.1.2 %
+* %version: %
 */
 
-#if !defined(_EAP_CREATE_TLV_MESSAGE_DATA_H_)
-#define _EAP_CREATE_TLV_MESSAGE_DATA_H_
+#if !defined(_EAPOL_HANDLE_TLV_MESSAGE_DATA_H_)
+#define _EAPOL_HANDLE_TLV_MESSAGE_DATA_H_
 
 #include "eap_am_types.h"
 #include "eap_tools.h"
 #include "eap_array.h"
-#include "eap_tlv_message_data.h"
+#include "eap_process_tlv_message_data.h"
 #include "eap_expanded_type.h"
 
-
-enum eapol_tlv_message_type_e
-{
-	eapol_tlv_message_type_none                                 = 0,
-	eapol_tlv_message_type_array                                = 1,
-	eapol_tlv_message_type_boolean                              = 2,
-	eapol_tlv_message_type_eap_protocol_layer                   = 3,
-	eapol_tlv_message_type_eap_state_notification               = 4,
-	eapol_tlv_message_type_eap_status                           = 5,
-	eapol_tlv_message_type_eap_type                             = 6,
-	eapol_tlv_message_type_eapol_key_802_11_authentication_mode = 7,
-	eapol_tlv_message_type_eapol_key_authentication_type        = 8,
-	eapol_tlv_message_type_eapol_key_type                       = 9,
-	eapol_tlv_message_type_eapol_tkip_mic_failure_type          = 10,
-	eapol_tlv_message_type_eapol_wlan_authentication_state      = 11,
-	eapol_tlv_message_type_error                                = 12,
-	eapol_tlv_message_type_function                             = 13,
-	eapol_tlv_message_type_network_id                           = 14,
-	eapol_tlv_message_type_network_key                          = 15,
-	eapol_tlv_message_type_protected_setup_credential           = 16,
-	eapol_tlv_message_type_RSNA_cipher                          = 17,
-	eapol_tlv_message_type_session_key                          = 18,
-	eapol_tlv_message_type_u8_t                                 = 19,
-	eapol_tlv_message_type_u16_t                                = 20,
-	eapol_tlv_message_type_u32_t                                = 21,
-	eapol_tlv_message_type_u64_t                                = 22,
-	eapol_tlv_message_type_variable_data                        = 23,
-};
-
-
-enum eapol_tlv_message_type_function_e
-{
-	eapol_tlv_message_type_function_none                                        = 0,
-	eapol_tlv_message_type_function_check_pmksa_cache                           = 1,
-	eapol_tlv_message_type_function_start_authentication                        = 2,
-	eapol_tlv_message_type_function_complete_association                        = 3,
-	eapol_tlv_message_type_function_disassociation                              = 4,
-	eapol_tlv_message_type_function_start_preauthentication                     = 5,
-	eapol_tlv_message_type_function_start_reassociation                         = 6,
-	eapol_tlv_message_type_function_complete_reassociation                      = 7,
-	eapol_tlv_message_type_function_start_WPXM_reassociation                    = 8,
-	eapol_tlv_message_type_function_complete_WPXM_reassociation                 = 9,
-	eapol_tlv_message_type_function_packet_process                              = 10,
-	eapol_tlv_message_type_function_tkip_mic_failure                            = 11,
-	eapol_tlv_message_type_function_eap_acknowledge                             = 12,
-	eapol_tlv_message_type_function_update_header_offset                        = 13,
-	eapol_tlv_message_type_function_complete_check_pmksa_cache                  = 14,
-	eapol_tlv_message_type_function_packet_send                                 = 15,
-	eapol_tlv_message_type_function_associate                                   = 16,
-	eapol_tlv_message_type_function_disassociate                                = 17,
-	eapol_tlv_message_type_function_packet_data_session_key                     = 18,
-	eapol_tlv_message_type_function_state_notification                          = 19,
-	eapol_tlv_message_type_function_reassociate                                 = 20,
-	eapol_tlv_message_type_function_update_wlan_database_reference_values       = 21,
-	eapol_tlv_message_type_function_complete_start_WPXM_reassociation           = 22,
-	eapol_tlv_message_type_function_new_protected_setup_credentials             = 23,
-	eapol_tlv_message_type_function_illegal_value, // Keep this the last value.
-};
-
-
-enum eapol_message_payload_index_e
-{
-	eapol_message_payload_index_function        = 0,
-	eapol_message_payload_index_first_parameter = 1,
-};
-
-
 /** @file */
 
 class eap_variable_data_c;
@@ -112,7 +45,7 @@
 /// This class defines functions to add and parse message data composed
 /// of Attribute-Value Pairs (See eap_tlv_header_c) to/from eap_tlv_message_data_c object.
 class EAP_EXPORT eapol_handle_tlv_message_data_c
-: public eap_tlv_message_data_c
+: public eap_process_tlv_message_data_c
 {
 private:
 	//--------------------------------------------------
@@ -141,179 +74,12 @@
 		abs_eap_am_tools_c * const tools);
 
 	/**
-	 * This function should increase reference count.
-	 */
-	EAP_FUNC_IMPORT void object_increase_reference_count();
-
-	/**
-	 * This function should first decrease reference count
-	 * and second return the remaining reference count.
-	 * Reference count must not be decreased when it is zero.
-	 */
-	EAP_FUNC_IMPORT u32_t object_decrease_reference_count();
-
-	/**
 	 * Object must indicate it's validity.
 	 * If object initialization fails this function must return false.
 	 * @return This function returns the validity of this object.
 	 */
 	EAP_FUNC_IMPORT bool get_is_valid();
 
-	//- - - - - - - - - - - - - - - - - - - - - - - - - 
-
-	EAP_FUNC_IMPORT u32_t get_payload_size(
-		const eap_am_network_id_c * const network_id) const;
-
-	EAP_FUNC_IMPORT u32_t get_payload_size(
-		const abs_eap_state_notification_c * const state) const;
-
-	EAP_FUNC_IMPORT u32_t get_payload_size(
-		const eapol_session_key_c * const session_key) const;
-
-#if defined(USE_EAP_SIMPLE_CONFIG)
-
-	EAP_FUNC_IMPORT u32_t get_payload_size(
-		network_key_and_index_c * key) const;
-
-	EAP_FUNC_IMPORT u32_t get_payload_size(
-		EAP_TEMPLATE_CONST eap_array_c<network_key_and_index_c> * network_keys) const;
-
-	EAP_FUNC_IMPORT u32_t get_payload_size(
-		simple_config_credential_c * const credential) const;
-
-	EAP_FUNC_IMPORT u32_t get_payload_size(
-		EAP_TEMPLATE_CONST eap_array_c<simple_config_credential_c> * const credential_array) const;
-
-#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
-
-	//- - - - - - - - - - - - - - - - - - - - - - - - - 
-
-	EAP_FUNC_IMPORT eap_status_e add_structured_parameter_header(
-		const eapol_tlv_message_type_e type,
-		const u32_t length);
-
-
-	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
-		const eapol_tlv_message_type_e type,
-		const u32_t integer);
-
-	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
-		const u64_t long_integer);
-
-	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
-		const u32_t integer);
-
-	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
-		const u16_t integer);
-
-	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
-		const u8_t byte_integer);
-
-	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
-		const bool boolean);
-
-	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
-		const eap_status_e status);
-
-	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
-		const eapol_tlv_message_type_function_e function);
-
-	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
-		const eap_variable_data_c * const variable_data);
-
-	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
-		const eap_am_network_id_c * const network_id);
-
-	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
-		const eap_buf_chain_wr_c * const packet_buffer);
-
-	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
-		const eapol_session_key_c * const session_key);
-
-	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
-		const abs_eap_state_notification_c * const state);
-
-	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
-		const eap_type_value_e eap_type);
-
-	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
-		const eap_general_header_base_c * const packet_data);
-	
-	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
-		const eap_tlv_header_c * const credential_header,
-		simple_config_credential_c * const credential);
-
-#if defined(USE_EAP_SIMPLE_CONFIG)
-
-	EAP_FUNC_IMPORT eap_status_e add_parameter_data(
-		EAP_TEMPLATE_CONST eap_array_c<simple_config_credential_c> * const credential_array);
-	
-#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
-
-	//- - - - - - - - - - - - - - - - - - - - - - - - - 
-
-	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
-		const eap_tlv_header_c * const integer_header,
-		u64_t * const value);
-
-	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
-		const eap_tlv_header_c * const integer_header,
-		u32_t * const value);
-
-	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
-		const eap_tlv_header_c * const integer_header,
-		u16_t * const value);
-
-	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
-		const eap_tlv_header_c * const integer_header,
-		u8_t * const value);
-
-	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
-		const eap_tlv_header_c * const function_header,
-		eapol_tlv_message_type_function_e * const function);
-
-	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
-		const eap_tlv_header_c * const network_id_header,
-		eap_am_network_id_c * const new_network_id);
-
-	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
-		const eap_tlv_header_c * const variable_data_header,
-		eap_variable_data_c * const variable_data);
-
-	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
-		const eap_tlv_header_c * const session_key_header,
-		eapol_session_key_c * const session_key);
-	
-	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
-		const eap_tlv_header_c * const state_header,
-		eap_state_notification_c * * const state);
-
-	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
-		const eap_tlv_header_c * const eap_type_header,
-		eap_type_value_e * const eap_type);
-
-#if defined(USE_EAP_SIMPLE_CONFIG)
-
-	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
-		const eap_tlv_header_c * const network_key_header,
-		network_key_and_index_c * const network_key);
-
-	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
-		const eap_tlv_header_c * const network_keys_array_header,
-		eap_array_c<network_key_and_index_c> * const network_keys_array);
-
-	EAP_FUNC_IMPORT eap_status_e get_parameter_data(
-		const eap_tlv_header_c * const credential_array_header,
-		eap_array_c<simple_config_credential_c> * const credential_array);
-
-#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
-
-	//- - - - - - - - - - - - - - - - - - - - - - - - - 
-
-	EAP_FUNC_IMPORT eap_const_string get_type_string(const eapol_tlv_message_type_e type);
-
-	EAP_FUNC_IMPORT eap_const_string get_function_string(const eapol_tlv_message_type_function_e function);
-
 	// 
 	//--------------------------------------------------
 }; // class eapol_handle_tlv_message_data_c
@@ -321,7 +87,7 @@
 
 //--------------------------------------------------
 
-#endif //#if !defined(_EAP_CREATE_TLV_MESSAGE_DATA_H_)
+#endif //#if !defined(_EAPOL_HANDLE_TLV_MESSAGE_DATA_H_)
 
 
 // End.
--- a/eapol/eapol_framework/eapol_common/include/eapol_header.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eapol_header.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 6 %
+* %version: %
 */
 
 #if !defined(_EAPOL_HEADER_H_)
--- a/eapol/eapol_framework/eapol_common/include/eapol_key_header.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eapol_key_header.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 5 %
+* %version: %
 */
 
 #if !defined(_EAPOL_KEY_HEADER_H_)
--- a/eapol/eapol_framework/eapol_common/include/eapol_key_state.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eapol_key_state.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 14.1.4 %
+* %version: %
 */
 
 #if !defined(_EAPOL_KEY_STATE_H_)
@@ -289,9 +289,7 @@
 	/// The configuration option is EAPOL_key_state_TEST_group_key_update.
 	bool m_server_TEST_group_key_update;
 
-#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
 	bool m_is_associated;
-#endif //#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
 
 	// - - - - - - - - - - - - - - - - - - - - - - - -
 
@@ -440,14 +438,18 @@
 EAP_KEY_TEST_PRIVATE_FUNCTION
 
 
-	EAP_FUNC_IMPORT eap_status_e derive_WPXM_WPXK1_WPXK2();
+	eap_status_e derive_WPXM_WPXK1_WPXK2();
 
-	EAP_FUNC_IMPORT eap_status_e derive_WPXM_PTK(const u32_t WPXM_WPXC);
+	eap_status_e derive_WPXM_PTK(const u32_t WPXM_WPXC);
 
 	EAP_FUNC_IMPORT eap_status_e verify_field_is_zero(
 		const u8_t * const field,
 		const u32_t field_length);
 
+	EAP_FUNC_IMPORT eap_status_e check_padding(
+		const u8_t * const field,
+		const u32_t field_length);
+
 	EAP_FUNC_IMPORT eap_status_e encrypt_key_data(
 		eapol_RSNA_key_header_c * const eapol_key_message);
 
@@ -815,27 +817,16 @@
 		const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e eapol_group_cipher,
 		const eap_variable_data_c * const pre_shared_key);
 
-#if defined(USE_EAPOL_KEY_STATE) && defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
 	EAP_FUNC_IMPORT eap_status_e initialize(
 		const eap_am_network_id_c * const receive_network_id,
 		const eapol_key_authentication_type_e authentication_type);
 
-#endif //#if defined(USE_EAPOL_KEY_STATE) && defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
 	EAP_FUNC_IMPORT eapol_key_state_c *copy(const eap_am_network_id_c * const receive_network_id);
 
 	EAP_FUNC_IMPORT bool get_is_encryption_on();
 
-
-#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
 	EAP_FUNC_IMPORT bool get_is_associated();
 
-#endif //#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-
-
-	//
 	EAP_FUNC_IMPORT eap_status_e started_eap_authentication();
 
 	/**
--- a/eapol/eapol_framework/eapol_common/include/eapol_key_state_string.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eapol_key_state_string.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 5 %
+* %version: %
 */
 
 #if !defined(_EAPOL_KEY_STATE_STRING_H_)
@@ -46,29 +46,29 @@
 	 * Function returns string of eapol_key_state_e.
 	 * @param state is the queried string.
 	 */
-	EAP_FUNC_IMPORT eap_const_string get_eapol_key_state_string(
-		const eapol_key_state_e state) const;
+	EAP_FUNC_IMPORT static eap_const_string get_eapol_key_state_string(
+		const eapol_key_state_e state);
 
 	/**
 	 * Function returns string of eapol_key_handshake_type_e.
 	 * @param state is the queried string.
 	 */
-	EAP_FUNC_IMPORT eap_const_string get_eapol_key_handshake_type_string(
-		const eapol_key_handshake_type_e handshake_type) const;
+	EAP_FUNC_IMPORT static eap_const_string get_eapol_key_handshake_type_string(
+		const eapol_key_handshake_type_e handshake_type);
 
 	/**
 	 * Function returns string of eapol_key_handshake_type_e.
 	 * @param state is the queried string.
 	 */
-	EAP_FUNC_IMPORT eap_const_string get_eapol_key_authentication_type_string(
-		const eapol_key_authentication_type_e authentication_type) const;
+	EAP_FUNC_IMPORT static eap_const_string get_eapol_key_authentication_type_string(
+		const eapol_key_authentication_type_e authentication_type);
 
 	/**
 	 * Function returns string of eapol_key_descriptor_type_e.
 	 * @param state is the queried string.
 	 */
-	eap_const_string get_eapol_key_descriptor_type_string(
-		const eapol_key_descriptor_type_e key_descriptor_type) const;
+	EAP_FUNC_IMPORT static eap_const_string get_eapol_key_descriptor_type_string(
+		const eapol_key_descriptor_type_e key_descriptor_type);
 
 };
 
--- a/eapol/eapol_framework/eapol_common/include/eapol_key_types.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eapol_key_types.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 19 %
+* %version: %
 */
 
 #if !defined(_EAPOL_KEY_TYPES_H_)
@@ -102,13 +102,14 @@
 	eapol_key_authentication_type_RSNA_PSK = 2,    ///< Authentication is RNSA 802.11i PSK (pre shared key), 4-Way and Group Key Handshakes.
 	eapol_key_authentication_type_WPA_EAP = 3,    ///< Authentication is WPA EAP-authentication, 4-Way and Group Key Handshakes.
 	eapol_key_authentication_type_WPA_PSK = 4,    ///< Authentication is WPA PSK (pre shared key), 4-Way and Group Key Handshakes.
-	eapol_key_authentication_type_802_1X = 5, ///< Authentication is dynamic WEP (802.1X). EAP-authentication with simple EAPOL RC4 key message.
+	eapol_key_authentication_type_dynamic_WEP = 5, ///< Authentication is dynamic WEP (802.1X). EAP-authentication with simple EAPOL RC4 key message.
 	eapol_key_authentication_type_WPXM = 6,    ///< Authentication is WPXM.
-	eapol_key_authentication_type_WFA_SC = 7,  ///< Authentication is Wi-Fi Alliance Simple Configure.
+	eapol_key_authentication_type_WPS = 7,  ///< Authentication is Wi-Fi Alliance Protected Setup (Simple Configure).
 #if defined(USE_WAPI_CORE)
 	eapol_key_authentication_type_WAI_PSK = 8,  ///< Authentication is WAI PSK.
 	eapol_key_authentication_type_WAI_certificate = 9,  ///< Authentication is WAI certificate.
 #endif //#if defined(USE_WAPI_CORE)
+	eapol_key_authentication_type_EAP_authentication_no_encryption = 10, ///< Authentication is EAP-authentication without EAPOL RC4 key message. WLAN data will be plain text.
 };
 
 /**
@@ -141,6 +142,8 @@
 #if defined(USE_WAPI_CORE)
 	eapol_key_handshake_type_wai_handshake = 7,
 #endif //#if defined(USE_WAPI_CORE)
+	eapol_key_handshake_type_EAP_authentication_no_encryption = 8,
+	eapol_key_handshake_type_authenticated = 9,
 };
 
 /**
@@ -305,6 +308,13 @@
 	eap_configure_type_string,
 	false);
 
+EAP_CONFIGURATION_FIELD(
+	cf_str_EAPOL_key_authentication_type_config_value_EAP_authentication_no_encryption,
+	"EAP_authentication_no_encryption",
+	eap_configure_type_string,
+	false);
+
+
 #if defined(EAP_USE_WPXM)
 EAP_CONFIGURATION_FIELD(
 	cf_str_EAPOL_key_authentication_type_config_value_WPXM,
@@ -322,8 +332,8 @@
 #endif //#if defined(EAP_USE_WPXM)
 
 EAP_CONFIGURATION_FIELD(
-	cf_str_EAPOL_key_authentication_type_config_value_WFA_SC,
-	"WFA_SC",
+	cf_str_EAPOL_key_authentication_type_config_value_WPS,
+	"WPS",
 	eap_configure_type_string,
 	false);
 
--- a/eapol/eapol_framework/eapol_common/include/eapol_message_wlan_authentication.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eapol_message_wlan_authentication.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 25.1.2 %
+* %version: 32 %
 */
 
 #if !defined(EAPOL_MESSAGE_WLAN_AUTHENTICATION_H)
@@ -27,7 +27,7 @@
 #include "eapol_ethernet_header.h"
 #include "eap_file_config.h"
 //#include <eap_am_file_input_stdio.h>
-#include "abs_eapol_wlan_database_reference_if.h"
+#include "abs_eap_database_reference_if.h"
 #include "abs_eapol_message_wlan_authentication.h"
 #include "eapol_handle_tlv_message_data.h"
 
@@ -40,7 +40,6 @@
 class eapol_message_wlan_authentication_c
 : public abs_eapol_wlan_authentication_c
 , public abs_eap_base_timer_c
-, public abs_eapol_wlan_database_reference_if_c
 {
 
 private:
@@ -62,7 +61,7 @@
 
 	wlan_eap_if_send_status_e m_error_code;
 
-	eapol_tlv_message_type_function_e m_error_function;
+	eap_tlv_message_type_function_e m_error_function;
 
 	bool m_use_asyncronous_test;
 
@@ -114,7 +113,7 @@
 
 	EAP_FUNC_IMPORT eap_status_e send_error_message(
 		const eap_status_e status,
-		const eapol_tlv_message_type_function_e function);
+		const eap_tlv_message_type_function_e function);
 
 	EAP_FUNC_IMPORT eap_status_e process_message_type_error(
 		EAP_TEMPLATE_CONST eap_array_c<eap_tlv_header_c> * const parameters);
@@ -127,7 +126,7 @@
 
 public:
 
-	EAP_FUNC_IMPORT ~eapol_message_wlan_authentication_c();
+	EAP_FUNC_IMPORT virtual ~eapol_message_wlan_authentication_c();
 
 	EAP_FUNC_IMPORT eapol_message_wlan_authentication_c(
 		abs_eap_am_tools_c * const tools,
@@ -215,17 +214,6 @@
 	// ----------------------------------------------------------------
 
 
-	// ----------------------------------------------------------------------
-	// The following function is from abs_eapol_wlan_database_reference_if_c.
-
-	// Look at abs_eapol_wlan_database_reference_if_c::get_wlan_database_reference_values().
-	EAP_FUNC_IMPORT eap_status_e get_wlan_database_reference_values(
-		eap_variable_data_c * const reference) const;
-
-	// The previous function is from abs_eapol_wlan_database_reference_if_c.
-	// ----------------------------------------------------------------------
-
-
 	/// Function receives the data message from lower layer.
 	/// Data is formatted to Attribute-Value Pairs.
 	/// Look at eap_tlv_header_c and eap_tlv_message_data_c.
@@ -244,6 +232,12 @@
 
 #endif // #if defined(USE_EAP_SIMPLE_CONFIG)
 
+	EAP_FUNC_IMPORT eap_status_e complete_check_pmksa_cache(
+		EAP_TEMPLATE_CONST eap_array_c<eap_am_network_id_c> * const bssid_sta_receive_network_ids);
+
+	EAP_FUNC_IMPORT eap_status_e complete_disassociation(
+		const eap_am_network_id_c * const receive_network_id);
+
 	// ----------------------------------------------------------------------
 };
 
--- a/eapol/eapol_framework/eapol_common/include/eapol_rc4_key_header.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eapol_rc4_key_header.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 13 %
+* %version: %
 */
 
 #if !defined(_EAPOL_RC4_KEY_HEADER_H_)
--- a/eapol/eapol_framework/eapol_common/include/eapol_rsna_key_data_gtk_header.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eapol_rsna_key_data_gtk_header.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 #if !defined(_EAPOL_RSNA_KEY_DATA_GTK_HEADER_H_)
--- a/eapol/eapol_framework/eapol_common/include/eapol_rsna_key_data_header.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eapol_rsna_key_data_header.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 5 %
+* %version: %
 */
 
 #if !defined(_EAPOL_RSNA_KEY_DATA_HEADER_H_)
--- a/eapol/eapol_framework/eapol_common/include/eapol_rsna_key_data_payloads.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eapol_rsna_key_data_payloads.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11 %
+* %version: %
 */
 
 #if !defined(_EAPOL_RSNA_KEY_DATA_PAYLOADS_H_)
--- a/eapol/eapol_framework/eapol_common/include/eapol_rsna_key_header.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eapol_rsna_key_header.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7 %
+* %version: %
 */
 
 #if !defined(_EAPOL_RSNA_KEY_HEADER_H_)
--- a/eapol/eapol_framework/eapol_common/include/eapol_session_key.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eapol_session_key.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 5 %
+* %version: %
 */
 
 #if !defined(_EAPOL_SESSION_KEY_H_)
--- a/eapol/eapol_framework/eapol_common/include/eapol_test_stack_if.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eapol_test_stack_if.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 5 %
+* %version: %
 */
 
 #if !defined(_EAPOL_TEST_STACK_IF_H_)
--- a/eapol/eapol_framework/eapol_common/include/eapol_wlan_authentication.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eapol_wlan_authentication.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 6.1.2 %
+* %version: 18 %
 */
 
 #if !defined(_EAPOL_WLAN_AUTHENTICATION_H_)
@@ -32,6 +32,8 @@
 #include "eap_array.h"
 #include "eapol_key_state.h"
 #include "eapol_test_stack_if.h"
+#include "eap_database_reference_if.h"
+#include "abs_eap_configuration_if.h"
 
 #if defined(USE_EAP_SIMPLE_CONFIG)
 #include "abs_eap_configuration_if.h"
@@ -51,6 +53,7 @@
 #if defined(USE_TEST_EAPOL_WLAN_AUTHENTICATION)
 , public eapol_test_stack_if_c
 #endif //#if defined(USE_TEST_EAPOL_WLAN_AUTHENTICATION)
+, public eap_database_reference_if_c
 #if defined(USE_EAP_SIMPLE_CONFIG)
 , public abs_eap_configuration_if_c
 #endif // #if defined(USE_EAP_SIMPLE_CONFIG)
@@ -60,8 +63,7 @@
 	EAP_FUNC_IMPORT static eapol_wlan_authentication_c * new_eapol_wlan_authentication(
 		abs_eap_am_tools_c * const tools,
 		abs_eapol_wlan_authentication_c * const partner,
-		const bool is_client_when_true,
-		const abs_eapol_wlan_database_reference_if_c * const wlan_database_reference);
+		const bool is_client_when_true);
 
 	EAP_FUNC_IMPORT eapol_wlan_authentication_c(
 		abs_eap_am_tools_c * const tools,
@@ -97,11 +99,8 @@
 		const eap_variable_data_c * const SSID,
 		const eapol_key_authentication_type_e selected_eapol_key_authentication_type,
 		const eap_variable_data_c * const wpa_preshared_key,
-		const bool WPA_override_enabled
-#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
-		,
+		const bool WPA_override_enabled,
 		const eap_am_network_id_c * const receive_network_id ///< source includes remote address, destination includes local address.
-#endif //#if defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
 		);
 
 	EAP_FUNC_IMPORT eap_status_e complete_association(
@@ -163,6 +162,9 @@
 		const eap_am_network_id_c * const receive_network_id ///< source includes remote address, destination includes local address.
 		); 
 
+	EAP_FUNC_IMPORT eap_status_e set_eap_database_reference_values(
+		const eap_variable_data_c * const reference);
+
 	/////////////////////////////////////////
 	/* These are called from ethernet_core */
 	
@@ -291,22 +293,37 @@
 		const simple_config_payloads_c * const other_configuration);
 #endif // #if defined(USE_EAP_SIMPLE_CONFIG)
 
+	EAP_FUNC_IMPORT eap_status_e complete_get_802_11_authentication_mode(
+		const eap_status_e completion_status,
+		const eap_am_network_id_c * const receive_network_id,
+		const eapol_key_802_11_authentication_mode_e mode);
+
+	EAP_FUNC_IMPORT eap_status_e complete_disassociation(
+		const bool complete_to_lower_layer,
+		const eap_am_network_id_c * const receive_network_id);
+
 private:
 
-	EAP_FUNC_IMPORT eap_status_e eapol_indication(
+	eap_status_e eapol_indication(
 		const eap_am_network_id_c * const receive_network_id, ///< source includes remote address, destination includes local address.
 		const eapol_wlan_authentication_state_e notification);
 
-	EAP_FUNC_IMPORT eap_status_e create_upper_stack();
+	eap_status_e create_upper_stack();
 
 	eap_status_e disassociation_mutex_must_be_reserved(
+		const bool complete_to_lower_layer,
+		const eap_am_network_id_c * const receive_network_id ///< source includes remote address, destination includes local address.
+		);
+
+	eap_status_e internal_disassociation(
+		const bool complete_to_lower_layer,
 		const eap_am_network_id_c * const receive_network_id ///< source includes remote address, destination includes local address.
 		);
 
 	eap_status_e cancel_all_authentication_sessions();
 
-private:
-
+	eap_status_e complete_check_pmksa_cache(
+		EAP_TEMPLATE_CONST eap_array_c<eap_am_network_id_c> * const bssid_sta_receive_network_ids);
 
 	eap_status_e cancel_timer_this_ap_failed();
 
@@ -316,7 +333,7 @@
 
 	eap_status_e cancel_timer_authentication_cancelled();
 
-
+private:
 
 	/// Pointer to the lower layer in the stack
 	abs_eapol_wlan_authentication_c * m_partner;
@@ -332,7 +349,7 @@
 
 	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
-	eap_array_c<eap_type_selection_c> m_selected_eap_types;
+	//eap_array_c<eap_type_selection_c> m_selected_eap_types;
 
 	eap_variable_data_c m_wpa_preshared_key_hash;
 
--- a/eapol/eapol_framework/eapol_common/include/eapol_wlan_database_reference.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eapol_wlan_database_reference.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 5 %
+* %version: %
 */
 
 #if !defined(_EAPOL_WLAN_DATABASE_REFERENCE_H_)
--- a/eapol/eapol_framework/eapol_common/include/eapol_wlan_state.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/eapol_wlan_state.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #if !defined(_EAPOL_WLAN_STATE_H_)
--- a/eapol/eapol_framework/eapol_common/include/ethernet_core.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/ethernet_core.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 19.1.2 %
+* %version: 33 %
 */
 
 #if !defined(_ETHERNET_CORE_H_)
@@ -32,12 +32,14 @@
 #include "eap_core_map.h"
 #include "abs_eap_stack_interface.h"
 #include "eapol_rsna_key_header.h"
+#include "eap_database_reference_if.h"
 
 
 /// This class defines the ethernet protocol layer.
 class EAP_EXPORT ethernet_core_c
 : public abs_eapol_core_c
 , public abs_eap_stack_interface_c
+, public eap_database_reference_if_c
 {
 private:
 	//--------------------------------------------------
@@ -247,7 +249,6 @@
 	EAP_FUNC_IMPORT eap_status_e get_eap_type_list(
 		eap_array_c<eap_type_value_e> * const eap_type_list);
 
-#if defined(USE_EAPOL_KEY_STATE) && defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
 	/**
 	 * Function creates a state for later use. This is for optimazing 4-Way Handshake.
 	 * @param receive_network_id carries the MAC addresses.
@@ -259,10 +260,8 @@
 		const eap_am_network_id_c * const receive_network_id,
 		const eapol_key_authentication_type_e authentication_type
 		);
-#endif //#if defined(USE_EAPOL_KEY_STATE) && defined(USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE)
 
 
-#if defined(USE_EAPOL_KEY_STATE)
 	/**
 	 * This function need to be called when client STA (re)associates to AP.
 	 * @param receive_network_id carries the MAC addresses.
@@ -280,18 +279,16 @@
 		const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e eapol_pairwise_cipher,
 		const eapol_RSNA_key_header_c::eapol_RSNA_cipher_e eapol_group_cipher,
 		const eap_variable_data_c * const pre_shared_key);
-#endif //#if defined(USE_EAPOL_KEY_STATE)
 
-#if defined(USE_EAPOL_KEY_STATE)
 	/**
 	 * This function need to be called when client STA disassociates from AP.
 	 * @param receive_network_id carries the MAC addresses.
 	 * MAC address of Authenticator should be in source address. MAC address of Supplicant should be in destination address.
 	 */
 	EAP_FUNC_IMPORT eap_status_e disassociation(
+		const bool complete_to_lower_layer,
 		const eap_am_network_id_c * const receive_network_id
 		);
-#endif //#if defined(USE_EAPOL_KEY_STATE)
 
 	/// @see abs_eap_core_c::add_rogue_ap().
 	EAP_FUNC_IMPORT eap_status_e add_rogue_ap(eap_array_c<eap_rogue_ap_entry_c> & rogue_ap_list);
@@ -301,6 +298,38 @@
 		const bool fatal_failure_when_true,
 		const eapol_RSNA_key_header_c::eapol_tkip_mic_failure_type_e tkip_mic_failure_type);
 
+	EAP_FUNC_IMPORT eap_status_e complete_check_pmksa_cache(
+		EAP_TEMPLATE_CONST eap_array_c<eap_am_network_id_c> * const bssid_sta_receive_network_ids);
+
+#if defined(USE_EAP_SIMPLE_CONFIG)
+
+	EAP_FUNC_IMPORT eap_status_e save_simple_config_session(
+		const simple_config_state_e state,
+		EAP_TEMPLATE_CONST eap_array_c<simple_config_credential_c> * const credential_array,
+		const eap_variable_data_c * const new_password,
+		const simple_config_Device_Password_ID_e Device_Password_ID,
+		const simple_config_payloads_c * const other_configuration);
+
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+
+	EAP_FUNC_IMPORT eap_status_e set_eap_database_reference_values(
+		const eap_variable_data_c * const reference);
+
+	EAP_FUNC_IMPORT eap_status_e get_802_11_authentication_mode(
+		const eap_am_network_id_c * const receive_network_id,
+		const eapol_key_authentication_type_e authentication_type,
+		const eap_variable_data_c * const SSID,
+		const eap_variable_data_c * const preshared_key);
+
+	EAP_FUNC_IMPORT eap_status_e complete_get_802_11_authentication_mode(
+		const eap_status_e completion_status,
+		const eap_am_network_id_c * const receive_network_id,
+		const eapol_key_802_11_authentication_mode_e mode);
+
+	EAP_FUNC_IMPORT eap_status_e complete_disassociation(
+		const bool complete_to_lower_layer,
+		const eap_am_network_id_c * const receive_network_id);
+
 	//--------------------------------------------------
 }; // class ethernet_core_c
 
--- a/eapol/eapol_framework/eapol_common/include/isakmp_header.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/isakmp_header.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11 %
+* %version: %
 */
 
 #if !defined(_ISAKMP_HEADER_H_)
--- a/eapol/eapol_framework/eapol_common/include/isakmp_payloads.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/isakmp_payloads.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 #if !defined(_ISAKMP_RESULT_H_)
--- a/eapol/eapol_framework/eapol_common/include/sae_cookie.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/sae_cookie.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #if !defined(_SAE_COOKIE_H_)
--- a/eapol/eapol_framework/eapol_common/include/wlan_eap_if_send_status.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/include/wlan_eap_if_send_status.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #if !defined(_WLAN_EAP_IF_SEND_STATUS_H_)
--- a/eapol/eapol_framework/eapol_common/type/aka/core/eap_type_aka.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/aka/core/eap_type_aka.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 31.1.4 %
+* %version: 39 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -950,7 +950,7 @@
 	// Add padding zero octets
 	if ((data_length % 4u) != 0)
 	{
-		padding_zero_count = 4u - (data_length % 4u);
+		padding_zero_count = static_cast<u16_t>(4u - (data_length % 4u));
 	}
 
 	if (RES->get_data_length()+padding_zero_count
@@ -977,7 +977,7 @@
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
 	}
 
-	gp_data.reset_header(data_length+padding_zero_count);
+	gp_data.reset_header(static_cast<u16_t>(data_length + padding_zero_count));
 
 	{
 		u8_t *payload_buffer = gp_data.get_data(data_length+padding_zero_count);
@@ -1006,7 +1006,7 @@
 	// It is always multiple of 8 bits.
 	gp_data.set_reserved(static_cast<u16_t>(data_length*8ul));
 
-	gp_data.set_data_length(data_length+padding_zero_count);
+	gp_data.set_data_length(static_cast<u16_t>(data_length + padding_zero_count));
 
 	status = eap_status_ok;
 
@@ -2036,7 +2036,7 @@
 			payload->get_payload_length(),
 			payload->get_reserved()));
 
-		status = p_aka_payloads->get_COUNTER_TOO_SMALL()->set_buffer(
+		status = p_aka_payloads->get_counter_too_small()->set_buffer(
 			payload, 0, 0u, false, false);
 
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -5648,7 +5648,6 @@
 
 	//----------------------------------------------------------
 
-#if defined(USE_EAP_EXPANDED_TYPES)
 	{
 		eap_variable_data_c use_eap_expanded_type(m_am_tools);
 
@@ -5682,7 +5681,6 @@
 			}
 		}
 	}
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
 
 	//----------------------------------------------------------
 
@@ -5958,22 +5956,6 @@
 
 //--------------------------------------------------
 
-//
-EAP_FUNC_EXPORT eap_status_e eap_type_aka_c::cancel_all_timers()
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
-
-	const eap_status_e status = get_type_partner()->cancel_all_timers();
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, status);
-}
-
-//--------------------------------------------------
-//--------------------------------------------------
-
 EAP_FUNC_EXPORT const eap_type_aka_state_variable_parameters_c * eap_type_aka_c::get_state_variable()
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
--- a/eapol/eapol_framework/eapol_common/type/aka/core/eap_type_aka_authentication_vector.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/aka/core/eap_type_aka_authentication_vector.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/aka/core/eap_type_aka_client.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/aka/core/eap_type_aka_client.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 32 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/aka/core/eap_type_aka_header.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/aka/core/eap_type_aka_header.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 13 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/aka/core/eap_type_aka_payloads.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/aka/core/eap_type_aka_payloads.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: 9.1.3 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -307,7 +307,7 @@
 		&& check_one_payload(NEXT_REAUTH_ID, get_NEXT_REAUTH_ID()) == true
 		&& check_one_payload(NOTIFICATION, get_NOTIFICATION()) == true
 		&& check_one_payload(COUNTER, get_COUNTER()) == true
-		&& check_one_payload(COUNTER_TOO_SMALL, get_COUNTER_TOO_SMALL()) == true
+		&& check_one_payload(COUNTER_TOO_SMALL, get_counter_too_small()) == true
 		&& check_one_payload(CLIENT_ERROR_CODE, get_CLIENT_ERROR_CODE()) == true
 		&& check_one_payload(RESULT_IND, get_RESULT_IND()) == true
 		&& check_one_payload(CHECKCODE, get_CHECKCODE()) == true
--- a/eapol/eapol_framework/eapol_common/type/aka/core/eap_type_aka_server.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/aka/core/eap_type_aka_server.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 23 %
+* %version: 20.1.4 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -2583,7 +2583,7 @@
 
 
 	if (m_authentication_type == AKA_AUTHENTICATION_TYPE_FULL_AUTH
-		&& (m_identity_type == AKA_IDENTITY_TYPE_IMSI_ID
+		&& ((m_identity_type == AKA_IDENTITY_TYPE_IMSI_ID
 			&& (get_saved_previous_state() == eap_type_aka_state_waiting_for_identity_response
 				|| get_saved_previous_state() == eap_type_aka_state_waiting_for_aka_identity_response_with_at_permanent_identity
 				|| get_saved_previous_state() == eap_type_aka_state_waiting_for_aka_identity_response_with_at_full_auth_identity
@@ -2593,7 +2593,7 @@
 			&& (get_saved_previous_state() == eap_type_aka_state_waiting_for_identity_response
 				|| get_saved_previous_state() == eap_type_aka_state_waiting_for_aka_identity_response_with_at_permanent_identity
 				|| get_saved_previous_state() == eap_type_aka_state_waiting_for_aka_identity_response_with_at_any_identity
-				|| get_saved_previous_state() == eap_type_aka_state_waiting_for_aka_identity_response))
+				|| get_saved_previous_state() == eap_type_aka_state_waiting_for_aka_identity_response)))
 		)
 	{
 		eap_type_aka_identity_type local_identity_type = m_identity_type;
@@ -4734,7 +4734,7 @@
 						return EAP_STATUS_RETURN(m_am_tools, status);
 					}
 
-					if (l_aka_payloads->get_COUNTER_TOO_SMALL()->get_payload_included() == true)
+					if (l_aka_payloads->get_counter_too_small()->get_payload_included() == true)
 					{
 						// When the client detects that the
 						// counter value is not fresh, it includes the AT_COUNTER_TOO_SMALL
--- a/eapol/eapol_framework/eapol_common/type/aka/core/eap_type_aka_state.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/aka/core/eap_type_aka_state.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -77,8 +77,8 @@
 
 EAP_FUNC_EXPORT bool eap_type_aka_state_variable_parameters_c::check_initiator(const bool is_initiator) const
 {
-	if (m_must_be_initiator == true && is_initiator == false
-		|| m_must_be_responder == true && is_initiator == true)
+	if ((m_must_be_initiator == true && is_initiator == false)
+		|| (m_must_be_responder == true && is_initiator == true))
 	{
 		return false;
 	}
--- a/eapol/eapol_framework/eapol_common/type/aka/core/eap_type_aka_state_notification.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/aka/core/eap_type_aka_state_notification.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -65,8 +65,6 @@
 }
 
 
-#if defined(USE_EAP_EXPANDED_TYPES)
-
 EAP_FUNC_EXPORT eap_type_aka_state_notification_c::eap_type_aka_state_notification_c(
 	abs_eap_am_tools_c * const tools,
 	const eap_am_network_id_c * const send_network_id,
@@ -92,8 +90,6 @@
 {
 }
 
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
-
 
 EAP_FUNC_EXPORT eap_type_aka_state_notification_c::eap_type_aka_state_notification_c(
 	abs_eap_am_tools_c * const tools,
--- a/eapol/eapol_framework/eapol_common/type/aka/include/abs_eap_type_aka_state.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/aka/include/abs_eap_type_aka_state.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #error Do not use anymore.
--- a/eapol/eapol_framework/eapol_common/type/aka/include/eap_type_aka.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/aka/include/eap_type_aka.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 20.1.2 %
+* %version: %
 */
 
 #if !defined(_AKA_CORE_H_)
@@ -1938,9 +1938,6 @@
 		abs_eap_base_timer_c * const p_initializer, 
 		const u32_t p_id);
 
-	//
-	EAP_FUNC_IMPORT eap_status_e cancel_all_timers();
-
 	EAP_FUNC_IMPORT static eap_const_string get_identity_string(const eap_type_aka_identity_type identity_type);
 
 	/**
--- a/eapol/eapol_framework/eapol_common/type/aka/include/eap_type_aka_authentication_vector.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/aka/include/eap_type_aka_authentication_vector.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #if !defined(_EAP_TYPE_AKA_AUTHENTICATION_VECTOR_H_)
--- a/eapol/eapol_framework/eapol_common/type/aka/include/eap_type_aka_header.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/aka/include/eap_type_aka_header.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 13 %
+* %version: %
 */
 
 #if !defined(_AKA_HEADER_H_)
--- a/eapol/eapol_framework/eapol_common/type/aka/include/eap_type_aka_initialized.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/aka/include/eap_type_aka_initialized.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 #if !defined(_AKA_INITIALIZED_H_)
--- a/eapol/eapol_framework/eapol_common/type/aka/include/eap_type_aka_payloads.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/aka/include/eap_type_aka_payloads.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: 10.1.2 %
 */
 
 #if !defined(_AKA_RESULT_H_)
@@ -337,7 +337,7 @@
 		return static_cast<aka_variable_data_c *>(&m_COUNTER);
 	}
 
-	aka_variable_data_c * const get_COUNTER_TOO_SMALL()
+	aka_variable_data_c * const get_counter_too_small()
 	{
 		return static_cast<aka_variable_data_c *>(&m_COUNTER_TOO_SMALL);
 	}
--- a/eapol/eapol_framework/eapol_common/type/aka/include/eap_type_aka_state.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/aka/include/eap_type_aka_state.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 #if !defined(_AKA_STATE_H_)
--- a/eapol/eapol_framework/eapol_common/type/aka/include/eap_type_aka_state_notification.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/aka/include/eap_type_aka_state_notification.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11 %
+* %version: %
 */
 
 #if !defined(_EAP_AKA_STATE_NOTIFICATION_H_)
@@ -64,8 +64,6 @@
 		u8_t eap_identifier,
 		bool allow_send_eap_success);
 
-#if defined(USE_EAP_EXPANDED_TYPES)
-
 	EAP_FUNC_IMPORT eap_type_aka_state_notification_c(
 		abs_eap_am_tools_c * const tools,
 		const eap_am_network_id_c * const send_network_id,
@@ -78,9 +76,6 @@
 		u8_t eap_identifier,
 		bool allow_send_eap_success);
 
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
-
-
 	EAP_FUNC_IMPORT eap_type_aka_state_notification_c(
 		abs_eap_am_tools_c * const tools,
 		const eap_am_network_id_c * const send_network_id,
--- a/eapol/eapol_framework/eapol_common/type/aka/include/eap_type_aka_types.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/aka/include/eap_type_aka_types.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 24 %
+* %version: %
 */
 
 #if !defined(_AKA_TYPES_H_)
--- a/eapol/eapol_framework/eapol_common/type/diameter/include/eap_diameter_avp_code.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/diameter/include/eap_diameter_avp_code.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 #if !defined(_EAP_DIAMETER_AVP_CODE_H_)
--- a/eapol/eapol_framework/eapol_common/type/diameter/include/eap_diameter_avp_header.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/diameter/include/eap_diameter_avp_header.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #if !defined(_EAP_DIAMETER_AVP_HEADER_H_)
--- a/eapol/eapol_framework/eapol_common/type/diameter/include/eap_diameter_payloads.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/diameter/include/eap_diameter_payloads.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 13 %
+* %version: %
 */
 
 #if !defined(_EAP_DIAMETER_RESULT_H_)
--- a/eapol/eapol_framework/eapol_common/type/diameter/src/eap_diameter_avp_code.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/diameter/src/eap_diameter_avp_code.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/diameter/src/eap_diameter_avp_header.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/diameter/src/eap_diameter_avp_header.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/diameter/src/eap_diameter_payloads.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/diameter/src/eap_diameter_payloads.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 18 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/eap_type_all.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/eap_type_all.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 18 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -88,8 +88,11 @@
 	abs_eap_base_type_c * const partner,
 	const eap_type_value_e eap_type,
 	const bool is_client_when_true,
-	const eap_am_network_id_c * const receive_network_id,
-	abs_eap_configuration_if_c * const configuration_if)
+	const eap_am_network_id_c * const receive_network_id
+#if defined(USE_EAP_SIMPLE_CONFIG)
+	, abs_eap_configuration_if_c * const configuration_if
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+	)
 {
 	EAP_TRACE_BEGIN(tools, TRACE_FLAGS_DEFAULT);
 	eap_base_type_c *type = 0;
@@ -531,7 +534,6 @@
 	}
 	else
 #endif
-#if defined(USE_EAP_EXPANDED_TYPES)
 #if defined(USE_EAP_SIMPLE_CONFIG)
 	if (eap_type == eap_expanded_type_simple_config.get_type())
 	{
@@ -585,7 +587,6 @@
 	}
 	else
 #endif //#if defined(USE_EAP_SIMPLE_CONFIG)
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
 #if defined(USE_FAST_EAP_TYPE)
 	if (eap_type == eap_type_fast)
 	{
@@ -683,8 +684,10 @@
 		EAP_TRACE_ERROR(
 			tools,
 			TRACE_FLAGS_DEFAULT,
-			(EAPL("ERROR: new_eap_type(): EAP-type=0x%08x not supported in this module.\n"),
-			convert_eap_type_to_u32_t(eap_type)));
+			(EAPL("ERROR: new_eap_type(): EAP-type=0xfe%06x%08x=%s not supported in this module.\n"),
+			eap_type.get_vendor_id(),
+			eap_type.get_vendor_type(),
+			eap_header_string_c::get_eap_type_string(eap_type)));
 	}
 	EAP_TRACE_END(tools, TRACE_FLAGS_DEFAULT);
 	return type;
--- a/eapol/eapol_framework/eapol_common/type/gsmsim/core/eap_type_gsmsim.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/gsmsim/core/eap_type_gsmsim.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 27.1.4 %
+* %version: 35 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -2719,7 +2719,7 @@
 			payload->get_payload_length(),
 			payload->get_reserved()));
 
-		status = p_gsmsim_payloads->get_COUNTER_TOO_SMALL()->set_buffer(
+		status = p_gsmsim_payloads->get_counter_too_small()->set_buffer(
 			payload, 0, 0u, false, false);
 
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -4656,8 +4656,8 @@
 		TRACE_FLAGS_DEFAULT, 
 		(EAPL("received: GSMSIM packet"),
 		 received_gsmsim->get_header_buffer(
-			 received_gsmsim->get_header_length()+received_gsmsim->get_data_length()),
-		 received_gsmsim->get_header_length()+received_gsmsim->get_data_length()));
+			 received_gsmsim->get_header_buffer_length()),
+		 received_gsmsim->get_header_buffer_length()));
 
 	if (received_gsmsim->get_type() == eap_type_identity)
 	{
@@ -6479,7 +6479,6 @@
 
 	//----------------------------------------------------------
 
-#if defined(USE_EAP_EXPANDED_TYPES)
 	{
 		eap_variable_data_c use_eap_expanded_type(m_am_tools);
 
@@ -6513,7 +6512,6 @@
 			}
 		}
 	}
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
 
 	//----------------------------------------------------------
 
@@ -6794,21 +6792,6 @@
 
 //--------------------------------------------------
 
-//
-EAP_FUNC_EXPORT eap_status_e eap_type_gsmsim_c::cancel_all_timers()
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
-
-	const eap_status_e status = get_type_partner()->cancel_all_timers();
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, status);
-}
-
-//--------------------------------------------------
-
 void eap_type_gsmsim_c::set_start_response_includes_identity(gsmsim_payload_AT_type_e type)
 {
 	EAP_TRACE_DEBUG(
--- a/eapol/eapol_framework/eapol_common/type/gsmsim/core/eap_type_gsmsim_client.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/gsmsim/core/eap_type_gsmsim_client.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 33 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/gsmsim/core/eap_type_gsmsim_header.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/gsmsim/core/eap_type_gsmsim_header.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/gsmsim/core/eap_type_gsmsim_initialized.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/gsmsim/core/eap_type_gsmsim_initialized.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/gsmsim/core/eap_type_gsmsim_mac_attributes.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/gsmsim/core/eap_type_gsmsim_mac_attributes.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/gsmsim/core/eap_type_gsmsim_payloads.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/gsmsim/core/eap_type_gsmsim_payloads.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: 7.1.3 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -269,7 +269,7 @@
 		&& check_one_payload(VERSION_LIST, get_VERSION_LIST()) == true
 		&& check_one_payload(SELECTED_VERSION, get_SELECTED_VERSION()) == true
 		&& check_one_payload(COUNTER, get_COUNTER()) == true
-		&& check_one_payload(COUNTER_TOO_SMALL, get_COUNTER_TOO_SMALL()) == true
+		&& check_one_payload(COUNTER_TOO_SMALL, get_counter_too_small()) == true
 		&& check_one_payload(CLIENT_ERROR_CODE, get_CLIENT_ERROR_CODE()) == true
 		&& check_one_payload(RESULT_IND, get_RESULT_IND()) == true
 		)
@@ -378,7 +378,7 @@
 	return static_cast<gsmsim_variable_data_c *>(&m_COUNTER);
 }
 
-EAP_FUNC_EXPORT gsmsim_variable_data_c * gsmsim_payloads_c::get_COUNTER_TOO_SMALL()
+EAP_FUNC_EXPORT gsmsim_variable_data_c * gsmsim_payloads_c::get_counter_too_small()
 {
 	return static_cast<gsmsim_variable_data_c *>(&m_COUNTER_TOO_SMALL);
 }
--- a/eapol/eapol_framework/eapol_common/type/gsmsim/core/eap_type_gsmsim_server.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/gsmsim/core/eap_type_gsmsim_server.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 20 %
+* %version: 18.1.2 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -4261,7 +4261,7 @@
 						return EAP_STATUS_RETURN(m_am_tools, status);
 					}
 
-					if (l_gsmsim_payloads->get_COUNTER_TOO_SMALL()->get_payload_included() == true)
+					if (l_gsmsim_payloads->get_counter_too_small()->get_payload_included() == true)
 					{
 						// When the client detects that the
 						// counter value is not fresh, it includes the AT_COUNTER_TOO_SMALL
--- a/eapol/eapol_framework/eapol_common/type/gsmsim/core/eap_type_gsmsim_state.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/gsmsim/core/eap_type_gsmsim_state.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -76,8 +76,8 @@
 
 EAP_FUNC_EXPORT bool eap_type_gsmsim_state_variable_parameters_c::check_initiator(const bool is_initiator) const
 {
-	if (m_must_be_initiator == true && is_initiator == false
-		|| m_must_be_responder == true && is_initiator == true)
+	if ((m_must_be_initiator == true && is_initiator == false)
+		|| (m_must_be_responder == true && is_initiator == true))
 	{
 		return false;
 	}
--- a/eapol/eapol_framework/eapol_common/type/gsmsim/core/eap_type_gsmsim_state_notification.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/gsmsim/core/eap_type_gsmsim_state_notification.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -65,8 +65,6 @@
 }
 
 
-#if defined(USE_EAP_EXPANDED_TYPES)
-
 EAP_FUNC_EXPORT eap_type_gsmsim_state_notification_c::eap_type_gsmsim_state_notification_c(
 	abs_eap_am_tools_c * const tools,
 	const eap_am_network_id_c * const send_network_id,
@@ -92,8 +90,6 @@
 {
 }
 
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
-
 
 EAP_FUNC_EXPORT eap_type_gsmsim_state_notification_c::eap_type_gsmsim_state_notification_c(
 	abs_eap_am_tools_c * const tools,
--- a/eapol/eapol_framework/eapol_common/type/gsmsim/include/abs_eap_type_gsmsim_state.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/gsmsim/include/abs_eap_type_gsmsim_state.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 2.1.2 %
+* %version: %
 */
 
 #if !defined(_ABS_GSMSIM_STATE_H_)
@@ -122,17 +122,6 @@
 		abs_eap_base_timer_c * const initializer, 
 		const u32_t id) = 0;
 
-	/**
-	 * The cancel_all_timers() function cancels all timers.
-	 * User should use this in termination of the stack before
-	 * the adaptation module of tools is deleted.
-	 * Preferred mode is to cancel each timer directly
-	 * using cancel_timer() function.
-	 *
-	 * Adaptation module internally implements the timer.
-	 */
-	virtual eap_status_e cancel_all_timers() = 0;
-
 	//--------------------------------------------------
 }; // class abs_eap_type_gsmsim_state_c
 
--- a/eapol/eapol_framework/eapol_common/type/gsmsim/include/eap_gsmsim_state_notification.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/gsmsim/include/eap_gsmsim_state_notification.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 #if !defined(_EAP_GSMSIM_STATE_NOTIFICATION_H_)
--- a/eapol/eapol_framework/eapol_common/type/gsmsim/include/eap_type_gsmsim.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/gsmsim/include/eap_type_gsmsim.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 5.1.2 %
+* %version: %
 */
 
 #if !defined(_GSMSIM_CORE_H_)
@@ -1859,9 +1859,6 @@
 		abs_eap_base_timer_c * const p_initializer, 
 		const u32_t p_id);
 
-	//
-	EAP_FUNC_IMPORT eap_status_e cancel_all_timers();
-
 	//--------------------------------------------------
 }; // class eap_type_gsmsim_c
 
--- a/eapol/eapol_framework/eapol_common/type/gsmsim/include/eap_type_gsmsim_header.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/gsmsim/include/eap_type_gsmsim_header.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 5 %
+* %version: %
 */
 
 #if !defined(_GSMSIM_HEADER_H_)
--- a/eapol/eapol_framework/eapol_common/type/gsmsim/include/eap_type_gsmsim_initialized.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/gsmsim/include/eap_type_gsmsim_initialized.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 5 %
+* %version: %
 */
 
 #if !defined(_GSMSIM_INITIALIZED_H_)
--- a/eapol/eapol_framework/eapol_common/type/gsmsim/include/eap_type_gsmsim_mac_attributes.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/gsmsim/include/eap_type_gsmsim_mac_attributes.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #if !defined(_EAP_TYPE_GSMSIM_MAC_ATTRIBUTES_H_)
--- a/eapol/eapol_framework/eapol_common/type/gsmsim/include/eap_type_gsmsim_payloads.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/gsmsim/include/eap_type_gsmsim_payloads.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 5 %
+* %version: 3.1.2 %
 */
 
 #if !defined(_GSMSIM_RESULT_H_)
@@ -263,7 +263,7 @@
 
 	EAP_FUNC_IMPORT gsmsim_variable_data_c * get_COUNTER();
 
-	EAP_FUNC_IMPORT gsmsim_variable_data_c * get_COUNTER_TOO_SMALL();
+	EAP_FUNC_IMPORT gsmsim_variable_data_c * get_counter_too_small();
 
 
 	EAP_FUNC_IMPORT void set_includes_unknown_attribute(const gsmsim_payload_AT_type_e unknown_payload);
--- a/eapol/eapol_framework/eapol_common/type/gsmsim/include/eap_type_gsmsim_state.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/gsmsim/include/eap_type_gsmsim_state.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 5 %
+* %version: %
 */
 
 #if !defined(_GSMSIM_STATE_H_)
--- a/eapol/eapol_framework/eapol_common/type/gsmsim/include/eap_type_gsmsim_state_notification.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/gsmsim/include/eap_type_gsmsim_state_notification.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 4 %
+* %version: %
 */
 
 #if !defined(_EAP_GSMSIM_STATE_NOTIFICATION_H_)
@@ -65,8 +65,6 @@
 		bool allow_send_eap_success);
 
 
-#if defined(USE_EAP_EXPANDED_TYPES)
-
 	EAP_FUNC_IMPORT eap_type_gsmsim_state_notification_c(
 		abs_eap_am_tools_c * const tools,
 		const eap_am_network_id_c * const send_network_id,
@@ -79,8 +77,6 @@
 		u8_t eap_identifier,
 		bool allow_send_eap_success);
 
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
-
 
 	EAP_FUNC_IMPORT eap_type_gsmsim_state_notification_c(
 		abs_eap_am_tools_c * const tools,
--- a/eapol/eapol_framework/eapol_common/type/gsmsim/include/eap_type_gsmsim_types.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/gsmsim/include/eap_type_gsmsim_types.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 5 %
+* %version: %
 */
 
 #if !defined(_GSMSIM_TYPES_H_)
--- a/eapol/eapol_framework/eapol_common/type/mschapv2/core/eap_type_mschapv2.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/mschapv2/core/eap_type_mschapv2.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 40.1.2 %
+* %version: 45 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -730,7 +730,6 @@
 
 	//----------------------------------------------------------
 
-#if defined(USE_EAP_EXPANDED_TYPES)
 	{
 		eap_variable_data_c use_eap_expanded_type(m_am_tools);
 
@@ -764,7 +763,6 @@
 			}
 		}
 	}
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
 
 	//----------------------------------------------------------
 
@@ -1012,7 +1010,7 @@
 
 	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_type_mschapv2_c::reset()");
 
-	m_session.set_state(eap_type_mschapv2_state_none);
+	m_session.reset();
 
 	m_username_utf8.reset();
 	eap_variable_data_c username_uc(m_am_tools);
@@ -1046,6 +1044,9 @@
 	m_is_notification_sent = false;
 	m_is_reauthentication = false;
 
+	m_is_pending = false;
+	m_identity_asked = false;
+
 	status = m_am_type_mschapv2->reset();
 	if (status != eap_status_ok)
 	{
@@ -1505,7 +1506,7 @@
 
 				if (key[key_byte] & (1 << key_bit_shifting)) // If bit is 1...
 				{
-					newkey[newkey_byte] |= (1 << newkey_bit_shifting); // ...set bit to 1
+					newkey[newkey_byte] = static_cast<u8_t>(newkey[newkey_byte] | (1 << newkey_bit_shifting)); // ...set bit to 1
 					bit_counter++;
 				}
 			}
@@ -1519,7 +1520,7 @@
 	}
 
 	// Copy key three times into triple size key because we are internally using 3des instead of des
-	// des: Ek == 3des: Ek3(Dk2(Ek1)) when k == k1 == k2 == k3
+	// des: Ek == 3des: Ek3(Dk2(Ek1)) when k == key1 == key2 == key3
 	m_am_tools->memmove(newkey + EAP_MSCHAPV2_DES_KEY_SIZE, newkey, EAP_MSCHAPV2_DES_KEY_SIZE);
 	m_am_tools->memmove(newkey + 2 * EAP_MSCHAPV2_DES_KEY_SIZE, newkey, EAP_MSCHAPV2_DES_KEY_SIZE);
 
--- a/eapol/eapol_framework/eapol_common/type/mschapv2/core/eap_type_mschapv2_client.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/mschapv2/core/eap_type_mschapv2_client.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 39.1.3 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/mschapv2/core/eap_type_mschapv2_credential_store.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/mschapv2/core/eap_type_mschapv2_credential_store.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/mschapv2/core/eap_type_mschapv2_header.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/mschapv2/core/eap_type_mschapv2_header.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 19 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/mschapv2/core/eap_type_mschapv2_payloads.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/mschapv2/core/eap_type_mschapv2_payloads.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/mschapv2/core/eap_type_mschapv2_server.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/mschapv2/core/eap_type_mschapv2_server.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 33 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/mschapv2/core/eap_type_mschapv2_state.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/mschapv2/core/eap_type_mschapv2_state.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10.1.3 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -38,6 +38,20 @@
 , m_next_state(eap_type_mschapv2_state_none)
 , m_failure_message_received(false)
 {
+	reset();
+}
+
+EAP_FUNC_EXPORT eap_type_mschapv2_state_c::~eap_type_mschapv2_state_c()
+{
+}
+
+eap_type_mschapv2_state_variable_e eap_type_mschapv2_state_c::get_state() const
+{
+	return m_state;
+}
+
+void eap_type_mschapv2_state_c::reset()
+{
 	if (m_is_client)
 	{
 		m_state = eap_type_mschapv2_state_none;
@@ -52,15 +66,6 @@
 	}
 }
 
-EAP_FUNC_EXPORT eap_type_mschapv2_state_c::~eap_type_mschapv2_state_c()
-{
-}
-
-eap_type_mschapv2_state_variable_e eap_type_mschapv2_state_c::get_state() const
-{
-	return m_state;
-}
-
 void eap_type_mschapv2_state_c::set_state(const eap_type_mschapv2_state_variable_e new_state)
 {
 	set_state(new_state, eap_type_mschapv2_state_none);
@@ -74,11 +79,14 @@
 	EAP_TRACE_DEBUG(
 		m_am_tools, 
 		TRACE_FLAGS_DEFAULT, 
-		(EAPL("eap_type_mschapv2_state_c::set_state(): this = 0x%08x, previous state %d, new state %d, new next state %d\n"),
-		this,
-		m_prev_state,
-		new_state,
-		new_next_state));
+		(EAPL("eap_type_mschapv2_state_c::set_state(): this = 0x%08x, previous state %d=%s, new state %d=%s, new next state %d=%s\n"),
+		 this,
+		 m_prev_state,
+		 get_state_string(m_prev_state),
+		 new_state,
+		 get_state_string(new_state),
+		 new_next_state,
+		 get_state_string(m_next_state)));
 
 	m_prev_state = m_state;
 	m_state = new_state;
@@ -90,12 +98,16 @@
 	EAP_TRACE_DEBUG(
 		m_am_tools, 
 		TRACE_FLAGS_DEFAULT, 
-		(EAPL("eap_type_mschapv2_state_c::is_valid_state(): this = 0x%08x, previous state %d, state %d, new state %d, new next state %d\n"),
-		this,
-		m_prev_state,
-		m_state,
-		new_state,
-		m_next_state));
+		(EAPL("eap_type_mschapv2_state_c::is_valid_state(): this = 0x%08x, previous state %d=%s, state %d=%s, new state %d=%s, new next state %d\n"),
+		 this,
+		 m_prev_state,
+		 get_state_string(m_prev_state),
+		 m_state,
+		 get_state_string(m_state),
+		 new_state,
+		 get_state_string(new_state),
+		 m_next_state,
+		 get_state_string(m_next_state)));
 
 	if (m_is_client) // Client
 	{
@@ -162,12 +174,16 @@
 			EAP_TRACE_DEBUG(
 				m_am_tools, 
 				TRACE_FLAGS_DEFAULT, 
-				(EAPL("WARNING: eap_type_mschapv2_state_c::is_valid_state(): returns false: this = 0x%08x, previous state %d, state %d, new state %d, new next state %d\n"),
-				this,
-				m_prev_state,
-				m_state,
-				new_state,
-				m_next_state));
+				(EAPL("WARNING: eap_type_mschapv2_state_c::is_valid_state(): returns false: this = 0x%08x, previous state %d=%s, state %d=%s, new state %d=%s, new next state %d=%s\n"),
+				 this,
+				 m_prev_state,
+				 get_state_string(m_prev_state),
+				 m_state,
+				 get_state_string(m_state),
+				 new_state,
+				 get_state_string(new_state),
+				 m_next_state,
+				 get_state_string(m_next_state)));
 
 			return false;
 
@@ -215,12 +231,16 @@
 			EAP_TRACE_DEBUG(
 				m_am_tools, 
 				TRACE_FLAGS_DEFAULT, 
-				(EAPL("WARNING: eap_type_mschapv2_state_c::is_valid_state(): returns false: this = 0x%08x, previous state %d, state %d, new state %d, new next state %d\n"),
-				this,
-				m_prev_state,
-				m_state,
-				new_state,
-				m_next_state));
+				(EAPL("WARNING: eap_type_mschapv2_state_c::is_valid_state(): returns false: this = 0x%08x, previous state %d=%s, state %d=%s, new state %d=%s, new next state %d=%s\n"),
+				 this,
+				 m_prev_state,
+				 get_state_string(m_prev_state),
+				 m_state,
+				 get_state_string(m_state),
+				 new_state,
+				 get_state_string(new_state),
+				 m_next_state,
+				 get_state_string(m_next_state)));
 
 			return false;
 
@@ -236,11 +256,14 @@
 	EAP_TRACE_DEBUG(
 		m_am_tools, 
 		TRACE_FLAGS_DEFAULT, 
-		(EAPL("eap_type_mschapv2_state_c::set_failure_message_received(): this = 0x%08x, previous state %d, state %d, new next state %d\n"),
-		this,
-		m_prev_state,
-		m_state,
-		m_next_state));
+		(EAPL("eap_type_mschapv2_state_c::set_failure_message_received(): this = 0x%08x, previous state %d=%s, state %d=%s, new next state %d=%s\n"),
+		 this,
+		 m_prev_state,
+		 get_state_string(m_prev_state),
+		 m_state,
+		 get_state_string(m_state),
+		 m_next_state,
+		 get_state_string(m_next_state)));
 
 	m_failure_message_received = true;
 }
@@ -250,11 +273,14 @@
 	EAP_TRACE_DEBUG(
 		m_am_tools, 
 		TRACE_FLAGS_DEFAULT, 
-		(EAPL("eap_type_mschapv2_state_c::unset_failure_message_received(): this = 0x%08x, previous state %d, state %d, new next state %d\n"),
-		this,
-		m_prev_state,
-		m_state,
-		m_next_state));
+		(EAPL("eap_type_mschapv2_state_c::unset_failure_message_received(): this = 0x%08x, previous state %d=%s, state %d=%s, new next state %d=%s\n"),
+		 this,
+		 m_prev_state,
+		 get_state_string(m_prev_state),
+		 m_state,
+		 get_state_string(m_state),
+		 m_next_state,
+		 get_state_string(m_next_state)));
 
 	m_failure_message_received = false;
 }
@@ -262,3 +288,30 @@
 void eap_type_mschapv2_state_c::cancel_eap_failure_timer()
 {
 }
+
+eap_const_string eap_type_mschapv2_state_c::get_state_string(const eap_type_mschapv2_state_variable_e state)
+{
+#if defined(USE_EAP_TRACE_STRINGS)
+	EAP_IF_RETURN_STRING(state, eap_type_mschapv2_state_none)
+	else EAP_IF_RETURN_STRING(state, eap_type_mschapv2_state_success)
+	else EAP_IF_RETURN_STRING(state, eap_type_mschapv2_state_failure)
+	else EAP_IF_RETURN_STRING(state, eap_type_mschapv2_state_identity_request)
+	else EAP_IF_RETURN_STRING(state, eap_type_mschapv2_state_challenge_request)
+	else EAP_IF_RETURN_STRING(state, eap_type_mschapv2_state_success_request)
+	else EAP_IF_RETURN_STRING(state, eap_type_mschapv2_state_failure_request)
+	else EAP_IF_RETURN_STRING(state, eap_type_mschapv2_state_change_password_request)
+	else EAP_IF_RETURN_STRING(state, eap_type_mschapv2_state_identity_response)
+	else EAP_IF_RETURN_STRING(state, eap_type_mschapv2_state_challenge_response)
+	else EAP_IF_RETURN_STRING(state, eap_type_mschapv2_state_success_response)
+	else EAP_IF_RETURN_STRING(state, eap_type_mschapv2_state_failure_response)
+	else EAP_IF_RETURN_STRING(state, eap_type_mschapv2_state_change_password_response)
+	else
+#endif // #if defined(USE_EAP_TRACE_STRINGS)
+	{
+		EAP_UNREFERENCED_PARAMETER(state);
+		return EAPL("Unknown EAP-MsChapv2-state");
+	}
+}
+
+
+// End
--- a/eapol/eapol_framework/eapol_common/type/mschapv2/include/abs_eap_type_mschapv2_state.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/mschapv2/include/abs_eap_type_mschapv2_state.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11 %
+* %version: %
 */
 
 #ifndef _ABS_MSCHAPV2_STATE_H_
--- a/eapol/eapol_framework/eapol_common/type/mschapv2/include/eap_type_mschapv2.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/mschapv2/include/eap_type_mschapv2.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 22.1.2 %
+* %version: %
 */
 
 #ifndef _MSCHAPV2_CORE_H_
@@ -138,7 +138,7 @@
 #endif //#if defined(USE_FAST_EAP_TYPE)
 
 	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-	
+
 	void send_error_notification(const eap_status_e error);
 
 	eap_status_e finish_successful_authentication();
--- a/eapol/eapol_framework/eapol_common/type/mschapv2/include/eap_type_mschapv2_credential_store.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/mschapv2/include/eap_type_mschapv2_credential_store.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11 %
+* %version: %
 */
 
 #ifndef EAP_TYPE_MSCHAPV2_CREDENTIAL_STORE_H
--- a/eapol/eapol_framework/eapol_common/type/mschapv2/include/eap_type_mschapv2_header.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/mschapv2/include/eap_type_mschapv2_header.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 14 %
+* %version: %
 */
 
 #ifndef _MSCHAPV2_HEADER_H_
--- a/eapol/eapol_framework/eapol_common/type/mschapv2/include/eap_type_mschapv2_payloads.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/mschapv2/include/eap_type_mschapv2_payloads.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: %
 */
 
 #ifndef _MSCHAPV2_PAYLOADS_H_
--- a/eapol/eapol_framework/eapol_common/type/mschapv2/include/eap_type_mschapv2_state.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/mschapv2/include/eap_type_mschapv2_state.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10.1.2 %
+* %version: %
 */
 
 #ifndef _MSCHAPV2_STATE_H_
@@ -71,6 +71,8 @@
 
 	EAP_FUNC_IMPORT virtual ~eap_type_mschapv2_state_c();
 
+	void reset();
+
 	eap_type_mschapv2_state_variable_e get_state() const;
 
 	void set_state(const eap_type_mschapv2_state_variable_e new_state);
@@ -84,6 +86,8 @@
 	void unset_failure_message_received();
 
 	void cancel_eap_failure_timer();
+
+	static eap_const_string get_state_string(const eap_type_mschapv2_state_variable_e state);
 };
 
 
--- a/eapol/eapol_framework/eapol_common/type/mschapv2/include/eap_type_mschapv2_types.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/mschapv2/include/eap_type_mschapv2_types.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 27 %
+* %version: %
 */
 
 #ifndef _MSCHAPV2_TYPES_H_
--- a/eapol/eapol_framework/eapol_common/type/radius/core/eap_radius.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/radius/core/eap_radius.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 14 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/radius/core/eap_radius_attribute_header.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/radius/core/eap_radius_attribute_header.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/radius/core/eap_radius_client.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/radius/core/eap_radius_client.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/radius/core/eap_radius_header.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/radius/core/eap_radius_header.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/radius/core/eap_radius_header_string.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/radius/core/eap_radius_header_string.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/radius/core/eap_radius_initialized.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/radius/core/eap_radius_initialized.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/radius/core/eap_radius_mac_attributes.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/radius/core/eap_radius_mac_attributes.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/radius/core/eap_radius_payloads.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/radius/core/eap_radius_payloads.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 17 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/radius/core/eap_radius_server.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/radius/core/eap_radius_server.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/radius/core/eap_radius_session.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/radius/core/eap_radius_session.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11.1.2 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -947,7 +947,8 @@
 
 //--------------------------------------------------
 
-EAP_FUNC_EXPORT eap_status_e eap_radius_session_c::synchronous_remove_eap_session(
+EAP_FUNC_EXPORT eap_status_e eap_radius_session_c::remove_eap_session(
+	const bool complete_to_lower_layer,
 	const eap_am_network_id_c * const receive_network_id)
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -1018,7 +1019,7 @@
 		(EAPL("eap_radius_session_c::asynchronous_init_remove_eap_session(): %s.\n"),
 		 (m_is_client == true) ? "client": "server"));
 
-	// NOTE: we cannot call directly synchronous_remove_eap_session(), because we will
+	// NOTE: we cannot call directly remove_eap_session(), because we will
 	// return from here to removed object.
 
 	eap_status_e status = eap_status_process_general_error;
--- a/eapol/eapol_framework/eapol_common/type/radius/core/eap_radius_state.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/radius/core/eap_radius_state.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/radius/core/eap_radius_state_notification.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/radius/core/eap_radius_state_notification.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -66,8 +66,6 @@
 }
 
 
-#if defined(USE_EAP_EXPANDED_TYPES)
-
 EAP_FUNC_EXPORT eap_radius_state_notification_c::eap_radius_state_notification_c(
 	abs_eap_am_tools_c * const tools,
 	const eap_am_network_id_c * const send_network_id,
@@ -94,8 +92,6 @@
 {
 }
 
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
-
 
 EAP_FUNC_EXPORT eap_radius_state_notification_c::eap_radius_state_notification_c(
 	abs_eap_am_tools_c * const tools,
--- a/eapol/eapol_framework/eapol_common/type/radius/include/abs_eap_radius.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/radius/include/abs_eap_radius.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #if !defined(_ABS_EAP_RADIUS_H_)
--- a/eapol/eapol_framework/eapol_common/type/radius/include/abs_eap_radius_session.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/radius/include/abs_eap_radius_session.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #if !defined(_ABS_EAP_RADIUS_SESSION_H_)
--- a/eapol/eapol_framework/eapol_common/type/radius/include/abs_eap_radius_state.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/radius/include/abs_eap_radius_state.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 #if !defined(_ABS_RADIUS_STATE_H_)
--- a/eapol/eapol_framework/eapol_common/type/radius/include/eap_radius.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/radius/include/eap_radius.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11 %
+* %version: %
 */
 
 #if !defined(_RADIUS_CORE_H_)
--- a/eapol/eapol_framework/eapol_common/type/radius/include/eap_radius_attribute_header.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/radius/include/eap_radius_attribute_header.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 #if !defined(_EAP_RADIUS_PAYLOAD_HEADER_H_)
--- a/eapol/eapol_framework/eapol_common/type/radius/include/eap_radius_header.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/radius/include/eap_radius_header.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #if !defined(_EAP_RADIUS_HEADER_H_)
--- a/eapol/eapol_framework/eapol_common/type/radius/include/eap_radius_header_string.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/radius/include/eap_radius_header_string.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #if !defined( _EAP_RADIUS_HEADER_STRING_H_ )
--- a/eapol/eapol_framework/eapol_common/type/radius/include/eap_radius_initialized.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/radius/include/eap_radius_initialized.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 #if !defined(_RADIUS_INITIALIZED_H_)
--- a/eapol/eapol_framework/eapol_common/type/radius/include/eap_radius_mac_attributes.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/radius/include/eap_radius_mac_attributes.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #if !defined(_EAP_TYPE_RADIUS_MAC_ATTRIBUTES_H_)
--- a/eapol/eapol_framework/eapol_common/type/radius/include/eap_radius_payloads.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/radius/include/eap_radius_payloads.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: %
 */
 
 #if !defined(_EAP_RADIUS_RESULT_H_)
--- a/eapol/eapol_framework/eapol_common/type/radius/include/eap_radius_session.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/radius/include/eap_radius_session.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11.1.2 %
+* %version: %
 */
 
 #if !defined(_EAP_RADIUS_SESSION_H_)
@@ -342,7 +342,8 @@
 	 * This function removes EAP session object synchronously.
 	 * @param receive_network_id identifies the removed EAP session.
 	 */
-	EAP_FUNC_IMPORT eap_status_e synchronous_remove_eap_session(
+	EAP_FUNC_IMPORT eap_status_e remove_eap_session(
+		const bool complete_to_lower_layer,
 		const eap_am_network_id_c * const receive_network_id);
 
 	/**
--- a/eapol/eapol_framework/eapol_common/type/radius/include/eap_radius_state.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/radius/include/eap_radius_state.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 #if !defined(_RADIUS_STATE_H_)
--- a/eapol/eapol_framework/eapol_common/type/radius/include/eap_radius_state_notification.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/radius/include/eap_radius_state_notification.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 #if !defined(_EAP_RADIUS_STATE_NOTIFICATION_H_)
@@ -91,8 +91,6 @@
 		bool allow_send_eap_success);
 
 
-#if defined(USE_EAP_EXPANDED_TYPES)
-
 	EAP_FUNC_IMPORT eap_radius_state_notification_c(
 		abs_eap_am_tools_c * const tools,
 		const eap_am_network_id_c * const send_network_id,
@@ -105,8 +103,6 @@
 		u8_t eap_identifier,
 		bool allow_send_eap_success);
 
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
-
 
 	EAP_FUNC_IMPORT eap_radius_state_notification_c(
 		abs_eap_am_tools_c * const tools,
--- a/eapol/eapol_framework/eapol_common/type/radius/include/eap_radius_types.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/radius/include/eap_radius_types.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #if !defined(_RADIUS_TYPES_H_)
--- a/eapol/eapol_framework/eapol_common/type/securid/core/eap_type_securid.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/securid/core/eap_type_securid.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 25 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -636,7 +636,6 @@
 
 	//----------------------------------------------------------
 
-#if defined(USE_EAP_EXPANDED_TYPES)
 	{
 		eap_variable_data_c use_eap_expanded_type(m_am_tools);
 		eap_status_e status(eap_status_process_general_error);
@@ -680,7 +679,6 @@
 			}
 		}
 	}
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
 
 
 	//----------------------------------------------------------
--- a/eapol/eapol_framework/eapol_common/type/securid/core/eap_type_securid_client.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/securid/core/eap_type_securid_client.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 16 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/securid/core/eap_type_securid_server.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/securid/core/eap_type_securid_server.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 14 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/securid/core/eap_type_securid_state.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/securid/core/eap_type_securid_state.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/securid/include/abs_eap_type_securid_state.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/securid/include/abs_eap_type_securid_state.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11 %
+* %version: %
 */
 
 #ifndef _ABS_MSCHAPV2_STATE_H_
--- a/eapol/eapol_framework/eapol_common/type/securid/include/eap_type_securid.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/securid/include/eap_type_securid.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: %
 */
 
 #ifndef EAP_TYPE_SECURID_H
--- a/eapol/eapol_framework/eapol_common/type/securid/include/eap_type_securid_state.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/securid/include/eap_type_securid_state.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #ifndef EAP_TYPE_SECURID_STATE_H
--- a/eapol/eapol_framework/eapol_common/type/securid/include/eap_type_securid_types.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/securid/include/eap_type_securid_types.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 13 %
+* %version: %
 */
 
 #ifndef SECURID_TYPES_H
@@ -47,7 +47,6 @@
 	eap_configure_type_hex_data,
 	true);
 
-
 EAP_CONFIGURATION_FIELD(
 	cf_str_EAP_GTC_identity,
 	"EAP_GTC_identity",
@@ -61,6 +60,11 @@
 	eap_configure_type_hex_data,
 	false);
 
+EAP_CONFIGURATION_FIELD(
+	cf_str_EAP_GTC_passcode_prompt,
+	"EAP_SECURID_passcode_prompt",
+	eap_configure_type_boolean,
+	false);
 
 EAP_CONFIGURATION_FIELD(
 	cf_str_EAP_SECURID_use_eap_expanded_type,
--- a/eapol/eapol_framework/eapol_common/type/simple_config/eap/include/eap_type_simple_config.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/simple_config/eap/include/eap_type_simple_config.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 21.1.2 %
+* %version: %
 */
 
 #if !defined(_EAP_TYPE_SIMPLE_CONFIG_H_)
@@ -614,9 +614,6 @@
 		abs_eap_base_timer_c * const p_initializer, 
 		const u32_t p_id);
 
-	/// @see abs_simple_config_base_record_c::cancel_all_timers().
-	EAP_FUNC_IMPORT eap_status_e cancel_all_timers();
-
 	/// @see abs_simple_config_base_record_c::load_module().
 	EAP_FUNC_IMPORT eap_status_e load_module(
 		const eap_type_value_e type,
--- a/eapol/eapol_framework/eapol_common/type/simple_config/eap/include/eap_type_simple_config_header.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/simple_config/eap/include/eap_type_simple_config_header.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11 %
+* %version: %
 */
 
 #if !defined(_EAP_SIMPLE_CONFIG_HEADER_H_)
@@ -32,9 +32,6 @@
 
 const u8_t SIMPLE_CONFIG_NAI_AT_BYTE = '@';
 
-#if !defined(USE_EAP_EXPANDED_TYPES)
-	#error You MUST define USE_EAP_EXPANDED_TYPES compiler flag. WFA Simple Config uses that.
-#endif //#if !defined(USE_EAP_EXPANDED_TYPES)
 
 //----------------------------------------------------------------------------
 
--- a/eapol/eapol_framework/eapol_common/type/simple_config/eap/include/eap_type_simple_config_state_notification.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/simple_config/eap/include/eap_type_simple_config_state_notification.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 #if !defined(_EAP_SIMPLE_CONFIG_STATE_NOTIFICATION_H_)
@@ -65,8 +65,6 @@
 		bool allow_send_eap_success);
 
 
-#if defined(USE_EAP_EXPANDED_TYPES)
-
 	EAP_FUNC_IMPORT eap_type_simple_config_state_notification_c(
 		abs_eap_am_tools_c * const tools,
 		const eap_am_network_id_c * const send_network_id,
@@ -79,8 +77,6 @@
 		u8_t eap_identifier,
 		bool allow_send_eap_success);
 
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
-
 
 	EAP_FUNC_IMPORT eap_type_simple_config_state_notification_c(
 		abs_eap_am_tools_c * const tools,
--- a/eapol/eapol_framework/eapol_common/type/simple_config/eap/include/eap_type_simple_config_types.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/simple_config/eap/include/eap_type_simple_config_types.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 21 %
+* %version: %
 */
 
 #if !defined(_EAP_TYPE_SIMPLE_CONFIG_TYPES_H_)
--- a/eapol/eapol_framework/eapol_common/type/simple_config/eap/src/eap_type_simple_config.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/simple_config/eap/src/eap_type_simple_config.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 26.1.2 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -3627,19 +3627,6 @@
 
 //--------------------------------------------------
 
-//
-EAP_FUNC_EXPORT eap_status_e eap_type_simple_config_c::cancel_all_timers()
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	eap_status_e status = get_type_partner()->cancel_all_timers();
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, status);
-}
-
-//--------------------------------------------------
-
 // This is commented in abs_simple_config_base_application_c.
 EAP_FUNC_EXPORT eap_status_e eap_type_simple_config_c::load_module(
 	const eap_type_value_e type,
--- a/eapol/eapol_framework/eapol_common/type/simple_config/eap/src/eap_type_simple_config_header.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/simple_config/eap/src/eap_type_simple_config_header.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 20 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/simple_config/eap/src/eap_type_simple_config_state_notification.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/simple_config/eap/src/eap_type_simple_config_state_notification.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -64,8 +64,6 @@
 }
 
 
-#if defined(USE_EAP_EXPANDED_TYPES)
-
 EAP_FUNC_EXPORT eap_type_simple_config_state_notification_c::eap_type_simple_config_state_notification_c(
 	abs_eap_am_tools_c * const tools,
 	const eap_am_network_id_c * const send_network_id,
@@ -91,8 +89,6 @@
 {
 }
 
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
-
 
 EAP_FUNC_EXPORT eap_type_simple_config_state_notification_c::eap_type_simple_config_state_notification_c(
 	abs_eap_am_tools_c * const tools,
--- a/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/abs_simple_config_apply_cipher_spec.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/abs_simple_config_apply_cipher_spec.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7 %
+* %version: %
 */
 
 #if !defined(_ABS_SIMPLE_CONFIG_MESSAGE_RECORD_PROCESS_H_)
--- a/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/abs_simple_config_base_record.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/abs_simple_config_base_record.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8.1.2 %
+* %version: %
 */
 
 #if !defined(_ABS_SIMPLE_CONFIG_BASE_RECORD_H_)
@@ -202,17 +202,6 @@
 		const u32_t id) = 0;
 
 	/**
-	 * The cancel_all_timers() function cancels all timers.
-	 * User should use this in termination of the stack before
-	 * the adaptation module of tools is deleted.
-	 * Preferred mode is to cancel each timer directly
-	 * using cancel_timer() function.
-	 *
-	 * Adaptation module internally implements the timer.
-	 */
-	virtual eap_status_e cancel_all_timers() = 0;
-
-	/**
 	 * This is needed by PEAP type.
 	 * The load_module() function function indicates the lower level to
 	 * load new module of EAP-type.
--- a/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/abs_simple_config_message_hash.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/abs_simple_config_message_hash.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #if !defined(_ABS_SIMPLE_CONFIG_MESSAGE_HASH_H_)
--- a/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/simple_config_attribute_type.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/simple_config_attribute_type.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7 %
+* %version: %
 */
 
 #if !defined(_SIMPLE_CONFIG_ATTRIBUTE_TYPE_H_)
--- a/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/simple_config_base_record.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/simple_config_base_record.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 #if !defined(_SIMPLE_CONFIG_BASE_RECORD_H_)
--- a/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/simple_config_completion.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/simple_config_completion.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: %
 */
 
 #if !defined(_SIMPLE_CONFIG_COMPLETION_H_)
--- a/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/simple_config_credential.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/simple_config_credential.h	Mon May 24 20:32:47 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -11,12 +11,12 @@
 *
 * Contributors:
 *
-* Description:  EAP and WLAN authentication protocols.
+* Description:  This class defines Credential attributes for protected setup (previously known as simple config).
 *
 */
 
 /*
-* %version: 4.1.2 %
+* %version: 9 %
 */
 
 #if !defined(_SIMPLE_CONFIG_CREDENTIAL_H_)
@@ -33,7 +33,7 @@
 //----------------------------------------------------------------------------
 
 
-/// This class defines Credential attributes.
+/// This class defines Credential attributes for protected setup (previously known as simple config).
 class EAP_EXPORT simple_config_credential_c
 {
 private:
@@ -73,10 +73,12 @@
 
 	EAP_FUNC_IMPORT void set_network_index(const u8_t index);
 
-	EAP_FUNC_IMPORT u8_t get_network_index();
+	EAP_FUNC_IMPORT u8_t get_network_index() const;
 
 	EAP_FUNC_IMPORT eap_variable_data_c * get_SSID();
 
+	EAP_FUNC_IMPORT const eap_variable_data_c * get_SSID_const() const;
+
 	EAP_FUNC_IMPORT simple_config_Authentication_Type_e get_Authentication_Type();
 
 	EAP_FUNC_IMPORT void set_Authentication_Type(const simple_config_Authentication_Type_e Authentication_Type);
@@ -87,8 +89,12 @@
 
 	EAP_FUNC_IMPORT eap_array_c<network_key_and_index_c> * get_network_keys();
 
+	EAP_FUNC_IMPORT const eap_array_c<network_key_and_index_c> * get_network_keys_const() const;
+
 	EAP_FUNC_IMPORT eap_variable_data_c * get_MAC_address();
 
+	EAP_FUNC_IMPORT const eap_variable_data_c * get_MAC_address_const() const;
+
 	EAP_FUNC_IMPORT bool get_is_valid();
 
 	// 
--- a/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/simple_config_message.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/simple_config_message.h	Mon May 24 20:32:47 2010 +0300
@@ -11,12 +11,12 @@
 *
 * Contributors:
 *
-* Description:  EAP and WLAN authentication protocols.
+* Description:  This class defines one SIMPLE_CONFIG-message.
 *
 */
 
 /*
-* %version: 14 %
+* %version: 12.1.2 %
 */
 
 #if !defined(_SIMPLE_CONFIG_MESSAGE_H_)
@@ -32,16 +32,10 @@
 //----------------------------------------------------------------------------
 
 
-/// This class defines one SIMPLE_CONFIG-message. One SIMPLE_CONFIG message could include many SIMPLE_CONFIG-records.
+/// This class defines one SIMPLE_CONFIG-message.
 /**
  * This class defined one SIMPLE_CONFIG-message.
  * Parse and analyse of SIMPLE_CONFIG-message is asyncronous.
- * m_analyse_index tells the index of message where asyncronous
- * analyse of SIMPLE_CONFIG-message must continue.
- * Analysed messages are skipped during the asyncronous
- * analyse of messages. Asyncronous analyse is needed
- * because of the PKI functions are asyncronous in
- * Symbian.
  */
 class EAP_EXPORT simple_config_message_c
 {
@@ -54,10 +48,9 @@
 	/// This buffer includes copy of the whole received SIMPLE_CONFIG-message data.
 	eap_variable_data_c m_simple_config_message_data;
 
-	/// This is EAP-identifier of the EAP-packet that includes SIMPLE_CONFIG-message. This is needed in XP-PEAP.
+	/// This is EAP-identifier of the EAP-packet that includes SIMPLE_CONFIG-message.
 	u8_t m_received_eap_identifier;
 
-
 	/// This indicates whether this object is client (true) or server (false). This is mostly for traces.
 	const bool m_is_client;
 
@@ -88,7 +81,7 @@
 
 	/**
 	 * This function copies the received SIMPLE_CONFIG-message data and EAP-identifier.
-	 * EAP-identifier is needed in XP PEAPv0. That stupid version uses
+	 * EAP-identifier is needed in PEAPv0. That PEAP version uses
 	 * same EAP-identifier with PEAP header and tunneled EAP-header.
 	 */
 	EAP_FUNC_IMPORT eap_status_e set_simple_config_message_data(
--- a/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/simple_config_payloads.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/simple_config_payloads.h	Mon May 24 20:32:47 2010 +0300
@@ -11,12 +11,12 @@
 *
 * Contributors:
 *
-* Description:  EAP and WLAN authentication protocols.
+* Description:  Defines payloads of protected setup message.
 *
 */
 
 /*
-* %version: 26 %
+* %version: 24.1.2 %
 */
 
 #if !defined(_SIMPLE_CONFIG_PAYLOADS_H_)
--- a/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/simple_config_record.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/simple_config_record.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 41 %
+* %version: %
 */
 
 #if !defined(_SIMPLE_CONFIG_RECORD_H_)
--- a/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/simple_config_tlv_header.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/simple_config_tlv_header.h	Mon May 24 20:32:47 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -11,12 +11,12 @@
 *
 * Contributors:
 *
-* Description:  EAP and WLAN authentication protocols.
+* Description:  defines header of Attribute-Value Pairs used in protected setup.
 *
 */
 
 /*
-* %version: 11 %
+* %version: 9.1.2 %
 */
 
 #if !defined(_SIMPLE_CONFIG_TLV_HEADER_H_)
@@ -69,9 +69,9 @@
 	/// This is enumeration of offsets to data fields.
 	enum offsets
 	{
-		m_tlv_type_offset = 0ul,                                     ///< This is offset to fags and tlv type 16-bit field.
+		m_tlv_type_offset = 0ul,                           ///< This is offset to tlv type 16-bit field.
 		m_length_offset = m_tlv_type_offset+sizeof(u16_t), ///< This is offset to length 16-bit field.
-		m_data_offset = m_length_offset+sizeof(u16_t),               ///< This is offset to data field.
+		m_data_offset = m_length_offset+sizeof(u16_t),     ///< This is offset to data field.
 	};
 
 	//--------------------------------------------------
--- a/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/simple_config_types.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/include/simple_config_types.h	Mon May 24 20:32:47 2010 +0300
@@ -11,12 +11,12 @@
 *
 * Contributors:
 *
-* Description:  EAP and WLAN authentication protocols.
+* Description:  This file defines the constants of the protected setup protocol.
 *
 */
 
 /*
-* %version: 32.1.2 %
+* %version: 35 %
 */
 
 #if !defined(_SIMPLE_CONFIG_TYPES_H_)
@@ -30,7 +30,7 @@
 #include "simple_config_attribute_type.h"
 
 /** @file simple_config_types.h 
- *  @brief This file defines the constants of the SIMPLE_CONFIG.
+ *  @brief This file defines the constants of the protected setup protocol.
  */
 
 //--------------------------------------------------
@@ -325,12 +325,14 @@
 	EAP_FUNC_IMPORT network_key_and_index_c(
 		abs_eap_am_tools_c * const m_am_tools);
 
-	EAP_FUNC_IMPORT u8_t get_network_key_index();
+	EAP_FUNC_IMPORT u8_t get_network_key_index() const;
 
 	EAP_FUNC_IMPORT void set_network_key_index(u8_t index);
 
 	EAP_FUNC_IMPORT eap_variable_data_c * get_network_key();
 
+	EAP_FUNC_IMPORT const eap_variable_data_c * get_network_key_const() const;
+
 	EAP_FUNC_IMPORT network_key_and_index_c * copy();
 
 	EAP_FUNC_IMPORT bool get_is_valid();
@@ -434,7 +436,4 @@
 #endif //#if !defined(_SIMPLE_CONFIG_TYPES_H_)
 
 //--------------------------------------------------
-
-
-
 // End.
--- a/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/src/simple_config_base_record.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/src/simple_config_base_record.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/src/simple_config_completion.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/src/simple_config_completion.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/src/simple_config_credential.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/src/simple_config_credential.cpp	Mon May 24 20:32:47 2010 +0300
@@ -11,12 +11,12 @@
 *
 * Contributors:
 *
-* Description:  EAP and WLAN authentication protocols.
+* Description:  This class defines Credential attributes for protected setup (previously known as simple config).
 *
 */
 
 /*
-* %version: 5.1.2 %
+* %version: 8 %
 */
 
 #include "eap_tools.h"
@@ -66,7 +66,7 @@
 
 //----------------------------------------------------------------------------
 
-EAP_FUNC_EXPORT u8_t simple_config_credential_c::get_network_index()
+EAP_FUNC_EXPORT u8_t simple_config_credential_c::get_network_index() const
 {
 	return m_network_index;
 }
@@ -80,6 +80,13 @@
 
 //----------------------------------------------------------------------------
 
+EAP_FUNC_EXPORT const eap_variable_data_c * simple_config_credential_c::get_SSID_const() const
+{
+	return &m_SSID;
+}
+
+//----------------------------------------------------------------------------
+
 EAP_FUNC_EXPORT simple_config_Authentication_Type_e simple_config_credential_c::get_Authentication_Type()
 {
 	return m_Authentication_Type;
@@ -115,6 +122,13 @@
 
 //----------------------------------------------------------------------------
 
+EAP_FUNC_EXPORT const eap_array_c<network_key_and_index_c> * simple_config_credential_c::get_network_keys_const() const
+{
+	return &m_network_keys;
+}
+
+//----------------------------------------------------------------------------
+
 EAP_FUNC_EXPORT eap_variable_data_c * simple_config_credential_c::get_MAC_address()
 {
 	return &m_MAC_address;
@@ -122,6 +136,13 @@
 
 //----------------------------------------------------------------------------
 
+EAP_FUNC_EXPORT const eap_variable_data_c * simple_config_credential_c::get_MAC_address_const() const
+{
+	return &m_MAC_address;
+}
+
+//----------------------------------------------------------------------------
+
 EAP_FUNC_EXPORT bool simple_config_credential_c::get_is_valid()
 {
 	return m_is_valid;
--- a/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/src/simple_config_message.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/src/simple_config_message.cpp	Mon May 24 20:32:47 2010 +0300
@@ -11,12 +11,12 @@
 *
 * Contributors:
 *
-* Description:  EAP and WLAN authentication protocols.
+* Description:  This class defines one SIMPLE_CONFIG-message.
 *
 */
 
 /*
-* %version: 20 %
+* %version: 18.1.2 %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/src/simple_config_payloads.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/src/simple_config_payloads.cpp	Mon May 24 20:32:47 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2001-2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -11,12 +11,12 @@
 *
 * Contributors:
 *
-* Description:  EAP and WLAN authentication protocols.
+* Description:  Defines payloads of protected setup message.
 *
 */
 
 /*
-* %version: 35 %
+* %version: 33.1.2 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -474,7 +474,7 @@
 				used_payloads,
 				&attribute_type,
 				m_am_tools);
-			if (index < 0ul)
+			if (index < 0)
 			{
 				// ERROR: not used mandatory TLV.
 				EAP_TRACE_ERROR(
@@ -515,11 +515,6 @@
 
 	eap_status_e status = add_attribute(
 		payload->copy());
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
 
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 	return EAP_STATUS_RETURN(m_am_tools, status);
@@ -1299,14 +1294,9 @@
 	}
 
 	status = m_read_payloads.reset();
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
 
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+	return EAP_STATUS_RETURN(m_am_tools, status);
 }
 
 //--------------------------------------------------
--- a/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/src/simple_config_record.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/src/simple_config_record.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 73 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -47,6 +47,9 @@
 #include "abs_eap_am_mutex.h"
 #include "simple_config_credential.h"
 #include "eapol_key_types.h"
+#include "eap_config.h"
+#include "eap_network_id_selector.h"
+#include "eap_tlv_message_data.h"
 
 //--------------------------------------------------
 
@@ -414,6 +417,7 @@
 
 	//----------------------------------------------------------
 
+#if 0
 	{
 		status = get_type_partner()->read_configure(
 			cf_str_EAP_SIMPLE_CONFIG_device_password.get_field(),
@@ -431,9 +435,26 @@
 			return EAP_STATUS_RETURN(m_am_tools, eap_status_wrong_password);
 		}
 	}
+#endif
 
 	if (m_is_client == false)
 	{
+		status = get_type_partner()->read_configure(
+			cf_str_EAP_SIMPLE_CONFIG_device_password.get_field(),
+			&m_device_password);
+		if (status != eap_status_ok
+			|| m_device_password.get_is_valid_data() == false)
+		{
+			// This is mandatory value.
+			EAP_TRACE_ERROR(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("ERROR: SIMPLE_CONFIG: %s: simple_config_record_c::configure(): Missing device password.\n"),
+				 (m_is_client == true ? "client": "server")));
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_wrong_password);
+		}
+
 		(void) get_type_partner()->read_configure(
 			cf_str_EAP_SIMPLE_CONFIG_server_device_password.get_field(),
 			&m_device_password);
@@ -4461,6 +4482,18 @@
 		// Compare RHash1.
 		if (local_RHash1.compare(&m_RHash1) != 0)
 		{
+			EAP_TRACE_DATA_DEBUG(
+				m_am_tools, 
+				TRACE_FLAGS_DEFAULT, 
+				(EAPL("local_RHash1"),
+				 local_RHash1.get_data(),
+				 local_RHash1.get_data_length()));
+			EAP_TRACE_DATA_DEBUG(
+				m_am_tools, 
+				TRACE_FLAGS_DEFAULT, 
+				(EAPL("m_RHash1"),
+				 m_RHash1.get_data(),
+				 m_RHash1.get_data_length()));
 			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 			return EAP_STATUS_RETURN(m_am_tools, eap_status_device_password_authentication_failure);
 		}
@@ -6486,6 +6519,12 @@
 	eap_variable_data_c * const ER_S2,
 	eap_variable_data_c * const ER_Hash2)
 {
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("SIMPLE_CONFIG: generate_er_hashs(): device_password"),
+		device_password->get_data(),
+		device_password->get_data_length()));
 
 	eap_variable_data_c first_half_of_device_password(m_am_tools);
 
@@ -8160,6 +8199,118 @@
 			return EAP_STATUS_RETURN(m_am_tools, status);
 		}
 	}
+	else if (m_local_Device_Password_ID == simple_config_Device_Password_ID_Default_PIN
+		&& m_is_client == true)
+	{
+		// Read PIN from memory store.
+
+		eap_variable_data_c memory_store_key(m_am_tools);
+
+		eap_status_e status = memory_store_key.set_copy_of_buffer(
+			EAP_WPS_CONFIGURATION_MEMORY_STORE_KEY,
+			sizeof(EAP_WPS_CONFIGURATION_MEMORY_STORE_KEY));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		status = memory_store_key.add_data(
+			&m_is_client,
+			sizeof(m_is_client));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		eap_am_network_id_c receive_network_id(m_am_tools,
+			m_send_network_id.get_destination_id(),
+			m_send_network_id.get_source_id(),
+			m_send_network_id.get_type());
+
+		eap_network_id_selector_c state_selector(
+			m_am_tools,
+			&receive_network_id);
+
+		status = memory_store_key.add_data(
+			&state_selector);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+		eap_tlv_message_data_c tlv_data(m_am_tools);
+
+		status = m_am_tools->memory_store_get_data(
+			&memory_store_key,
+			&tlv_data);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("simple_config_record_c::complete_query_network_and_device_parameters(): cannot get WPS credentials\n")));
+		}
+		else
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("simple_config_record_c::complete_query_network_and_device_parameters(): WPS credentials found\n")));
+
+			// Parse read data.
+			eap_array_c<eap_tlv_header_c> tlv_blocks(m_am_tools);
+				
+			status = tlv_data.parse_message_data(&tlv_blocks);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+			for (u32_t ind = 0ul; ind < tlv_blocks.get_object_count(); ind++)
+			{
+				eap_tlv_header_c * const tlv = tlv_blocks.get_object(ind);
+				if (tlv != 0)
+				{
+					if (tlv->get_type() == eap_type_protected_setup_stored_preshared_key)
+					{
+						status = m_device_password.set_copy_of_buffer(
+							tlv->get_value(tlv->get_value_length()),
+							tlv->get_value_length());
+						if (status != eap_status_ok)
+						{
+							EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+							return EAP_STATUS_RETURN(m_am_tools, status);
+						}
+					}
+					else if (tlv->get_type() == eap_type_protected_setup_stored_ssid)
+					{
+						status = m_SSID.set_copy_of_buffer(
+							tlv->get_value(tlv->get_value_length()),
+							tlv->get_value_length());
+						if (status != eap_status_ok)
+						{
+							EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+							return EAP_STATUS_RETURN(m_am_tools, status);
+						}
+					}
+				}
+			} // for()
+
+			if (m_device_password.get_is_valid_data() == false)
+			{
+				EAP_TRACE_ERROR(
+					m_am_tools,
+					TRACE_FLAGS_ERROR,
+					(EAPL("simple_config_record_c::complete_query_network_and_device_parameters(): cannot get WPS PIN\n")));
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+			}
+		}
+	}
 
 
 	if (local_completion_status == eap_status_ok)
--- a/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/src/simple_config_tlv_header.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/src/simple_config_tlv_header.cpp	Mon May 24 20:32:47 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -11,12 +11,12 @@
 *
 * Contributors:
 *
-* Description:  EAP and WLAN authentication protocols.
+* Description:  defines header of Attribute-Value Pairs used in protected setup.
 *
 */
 
 /*
-* %version: 13 %
+* %version: 11.1.2 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -125,7 +125,7 @@
 {
 	EAP_UNREFERENCED_PARAMETER(m_am_tools);
 
-	u32_t data_length = get_data_length(); // Here is removed optional SIMPLE_CONFIG message length.
+	u32_t data_length = get_data_length();
 
 	if (data_length >= offset+contignuous_bytes)
 	{
@@ -153,7 +153,7 @@
  */
 u8_t * simple_config_tlv_header_c::get_data(const u32_t contignuous_bytes) const
 {
-	return get_data_offset(0u, contignuous_bytes);
+	return get_data_offset(0ul, contignuous_bytes);
 }
 
 
--- a/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/src/simple_config_types.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/simple_config/simple_config/src/simple_config_types.cpp	Mon May 24 20:32:47 2010 +0300
@@ -11,12 +11,12 @@
 *
 * Contributors:
 *
-* Description:  EAP and WLAN authentication protocols.
+* Description:  This file defines the constants and types of the protected setup protocol.
 *
 */
 
 /*
-* %version: 22.1.3 %
+* %version: 26 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -61,7 +61,7 @@
 
 //--------------------------------------------------
 
-EAP_FUNC_EXPORT u8_t network_key_and_index_c::get_network_key_index()
+EAP_FUNC_EXPORT u8_t network_key_and_index_c::get_network_key_index() const
 {
 	return m_network_key_index;
 }
@@ -82,6 +82,13 @@
 
 //--------------------------------------------------
 
+EAP_FUNC_EXPORT const eap_variable_data_c * network_key_and_index_c::get_network_key_const() const
+{
+	return &m_network_key;
+}
+
+//--------------------------------------------------
+
 EAP_FUNC_EXPORT network_key_and_index_c * network_key_and_index_c::copy()
 {
 	network_key_and_index_c * const copy_object = new network_key_and_index_c(m_am_tools);
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/eap/include/eap_tls_peap_state_notification.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/eap/include/eap_tls_peap_state_notification.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #if !defined(_EAP_TLS_PEAP_STATE_NOTIFICATION_H_)
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/eap/include/eap_type_tls_peap.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/eap/include/eap_type_tls_peap.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 23.1.2 %
+* %version: %
 */
 
 #if !defined(_EAP_TYPE_TLS_PEAP_H_)
@@ -773,9 +773,6 @@
 		abs_eap_base_timer_c * const p_initializer, 
 		const u32_t p_id);
 
-	/// @see abs_tls_base_record_c::cancel_all_timers().
-	EAP_FUNC_IMPORT eap_status_e cancel_all_timers();
-
 	/// @see abs_tls_base_record_c::load_module().
 	EAP_FUNC_IMPORT eap_status_e load_module(
 		const eap_type_value_e type,
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/eap/include/eap_type_tls_peap_header.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/eap/include/eap_type_tls_peap_header.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 #if !defined(_EAP_TLS_PEAP_HEADER_H_)
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/eap/include/eap_type_tls_peap_state_notification.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/eap/include/eap_type_tls_peap_state_notification.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11 %
+* %version: %
 */
 
 #if !defined(_EAP_TLS_PEAP_STATE_NOTIFICATION_H_)
@@ -65,8 +65,6 @@
 		bool allow_send_eap_success);
 
 
-#if defined(USE_EAP_EXPANDED_TYPES)
-
 	EAP_FUNC_IMPORT eap_type_tls_peap_state_notification_c(
 		abs_eap_am_tools_c * const tools,
 		const eap_am_network_id_c * const send_network_id,
@@ -79,8 +77,6 @@
 		u8_t eap_identifier,
 		bool allow_send_eap_success);
 
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
-
 
 	EAP_FUNC_IMPORT eap_type_tls_peap_state_notification_c(
 		abs_eap_am_tools_c * const tools,
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/eap/include/eap_type_tls_peap_types.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/eap/include/eap_type_tls_peap_types.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 62 %
+* %version: %
 */
 
 #if !defined(_EAP_TYPE_TLS_PEAP_TYPES_H_)
@@ -132,6 +132,12 @@
  */
 
 EAP_CONFIGURATION_FIELD(
+	cf_str_EAP_TLS_PEAP_use_automatic_ca_certificate,
+	"EAP_TLS_PEAP_use_automatic_ca_certificate",
+	eap_configure_type_boolean,
+	false);
+
+EAP_CONFIGURATION_FIELD(
 	cf_str_EAP_TLS_PEAP_use_manual_username,
 	"EAP_TLS_PEAP_use_manual_username",
 	eap_configure_type_boolean,
@@ -806,26 +812,6 @@
 	false);
 
 /**
- *  This boolean data configuration option activate prompt to warn for ADHP auto-provisioning when 
- *  there is no PAC that matches the A-ID sent by server. EAP-FAST specific.
- */
-EAP_CONFIGURATION_FIELD(
-	cf_str_EAP_FAST_warn_ADHP_no_matching_PAC,
-	"EAP_FAST_warn_ADHP_no_matching_PAC",
-	eap_configure_type_boolean,
-	false);
-
-/**
- *  This boolean data configuration option activate prompt to warn for ADHP (Authenticated Diffie-Hellman Protocol) 
- *  auto-provisioning when there is no PAC at all. EAP-FAST specific.
- */
-EAP_CONFIGURATION_FIELD(
-	cf_str_EAP_FAST_warn_ADHP_no_PAC,
-	"EAP_FAST_warn_ADHP_no_PAC",
-	eap_configure_type_boolean,
-	false);
-
-/**
  *  This boolean data configuration option activate prompt to warn when client encouters a server that has provisioned 
  *  the client with a PAC before but is not currently selected as the default server. EAP-FAST specific.
  */
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/eap/src/eap_tls_peap_state_notification.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/eap/src/eap_tls_peap_state_notification.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/eap/src/eap_type_tls_peap.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/eap/src/eap_type_tls_peap.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 82.1.3 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -1629,7 +1629,7 @@
 		}
 
 		if (user_certificate_identity != 0
-			&& user_certificate_identity->get_is_valid() == true)
+			&& user_certificate_identity->get_is_valid_data() == true)
 		{
 			eap_variable_data_c username(m_am_tools);
 			eap_variable_data_c realm(m_am_tools);
@@ -1710,7 +1710,7 @@
 		else
 #endif //#if defined(USE_EAP_TLS_IDENTITY_PRIVACY)
 		if (user_certificate_identity != 0
-			&& user_certificate_identity->get_is_valid() == true)
+			&& user_certificate_identity->get_is_valid_data() == true)
 		{
 			EAP_TRACE_DEBUG(
 				m_am_tools,
@@ -1795,7 +1795,7 @@
 		}
 	}
 	else if (user_certificate_identity != 0
-		&& user_certificate_identity->get_is_valid() == true)
+		&& user_certificate_identity->get_is_valid_data() == true)
 	{
 		EAP_TRACE_DEBUG(
 			m_am_tools,
@@ -1813,14 +1813,19 @@
 	}
 	else
 	{
-		EAP_TRACE_ERROR(
+		EAP_TRACE_DEBUG(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
-			(EAPL("EAP_type_TLS_PEAP: %s: eap_type_tls_peap_c::handle_eap_identity_query(): no identity.\n"),
+			(EAPL("WARNING: EAP_type_TLS_PEAP: %s: eap_type_tls_peap_c::handle_eap_identity_query(): no identity configured, creates random identity.\n"),
 			(m_is_client == true ? "client": "server")));
 
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_eap_identity);
+		// Last possibility is random username.
+		status = create_random_eap_identity(&local_identity);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
 	}
 
 	status = m_current_identity.set_copy_of_buffer(&local_identity);
@@ -1942,11 +1947,13 @@
 				m_am_tools,
 				TRACE_FLAGS_TLS_PEAP_ERROR,
 				(EAPL("ERROR: eap_type_tls_peap_c::check_received_eap_identifier() failed,")
-				 EAPL("status %d=%s, received EAP-type 0x%08x, received EAP-code %d, ")
+				 EAPL("status %d=%s, received EAP-type 0xfe%06x%08x=%s, received EAP-code %d, ")
 				 EAPL("received EAP-identifier %d, current EAP-identifier %d, state %s\n"),
 				 status,
 				 status_string.get_status_string(status),
-				 convert_eap_type_to_u32_t(eap_header->get_type()),
+				 eap_header->get_type().get_vendor_id(),
+				 eap_header->get_type().get_vendor_type(),
+				 eap_header_string_c::get_eap_type_string(eap_header->get_type()),
 				 eap_header->get_code(),
 				 eap_header->get_identifier(),
 				 get_last_eap_identifier(),
@@ -1970,11 +1977,13 @@
 				m_am_tools,
 				TRACE_FLAGS_TLS_PEAP_ERROR,
 				(EAPL("ERROR: eap_type_tls_peap_c::check_received_eap_identifier() failed,")
-				 EAPL("status %d=%s, received EAP-type 0x%08x, received EAP-code %d, ")
+				 EAPL("status %d=%s, received EAP-type 0xfe%06x%08x=%s, received EAP-code %d, ")
 				 EAPL("received EAP-identifier %d, current EAP-identifier %d, state %s\n"),
 				 status,
 				 status_string.get_status_string(status),
-				 convert_eap_type_to_u32_t(eap_header->get_type()),
+				 eap_header->get_type().get_vendor_id(),
+				 eap_header->get_type().get_vendor_type(),
+				 eap_header_string_c::get_eap_type_string(eap_header->get_type()),
 				 eap_header->get_code(),
 				 eap_header->get_identifier(),
 				 get_last_eap_identifier(),
@@ -2133,11 +2142,13 @@
 					m_am_tools,
 					TRACE_FLAGS_TLS_PEAP_ERROR,
 					(EAPL("ERROR: eap_type_tls_peap_c::packet_process() failed,")
-					 EAPL("status %d=%s, received EAP-type 0x%08x, received EAP-code %d, ")
+					 EAPL("status %d=%s, received EAP-type 0xfe%06x%08x=%s, received EAP-code %d, ")
 					 EAPL("received EAP-identifier %d, current EAP-identifier %d, state %s\n"),
 					 status,
 					 status_string.get_status_string(status),
-					 convert_eap_type_to_u32_t(eap_header->get_type()),
+					 eap_header->get_type().get_vendor_id(),
+					 eap_header->get_type().get_vendor_type(),
+					 eap_header_string_c::get_eap_type_string(eap_header->get_type()),
 					 eap_header->get_code(),
 					 eap_header->get_identifier(),
 					 get_last_eap_identifier(),
@@ -3992,9 +4003,11 @@
 							EAP_TRACE_ERROR(
 								m_am_tools,
 								TRACE_FLAGS_DEFAULT|TRACE_TEST_VECTORS,
-								(EAPL("ERROR: EAP_type_TLS_PEAP: %s, unknown EAP-type 0x%08x\n"),
+								(EAPL("ERROR: EAP_type_TLS_PEAP: %s, unknown EAP-type 0xfe%06x%08x=%s\n"),
 								 (m_is_client == true) ? "client": "server",
-								 convert_eap_type_to_u32_t(m_current_eap_type)));
+								 m_current_eap_type.get_vendor_id(),
+								 m_current_eap_type.get_vendor_type(),
+								 eap_header_string_c::get_eap_type_string(m_current_eap_type)));
 
 							restore_saved_reassembly_state();
 							EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -4832,7 +4845,6 @@
 
 	//----------------------------------------------------------
 
-#if defined(USE_EAP_EXPANDED_TYPES)
 	{
 		eap_variable_data_c use_eap_expanded_type(m_am_tools);
 
@@ -4866,7 +4878,6 @@
 			}
 		}
 	}
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
 
 	//----------------------------------------------------------
 
@@ -5142,9 +5153,11 @@
 				m_am_tools,
 				TRACE_FLAGS_DEFAULT,
 				(EAPL("ERROR: %s: eap_type_tls_peap_c::state_notification(): ")
-				 EAPL("authentication failed: EAP-type 0x%08x\n"),
+				 EAPL("authentication failed: EAP-type 0xfe%06x%08x=%s\n"),
 				 (m_is_client == true ? "client": "server"),
-				 convert_eap_type_to_u32_t(m_current_eap_type)));
+				 m_current_eap_type.get_vendor_id(),
+				 m_current_eap_type.get_vendor_type(),
+				 eap_header_string_c::get_eap_type_string(m_current_eap_type)));
 
 			m_tunneled_eap_type_authentication_state
 				= eap_state_authentication_terminated_unsuccessfully;
@@ -5185,9 +5198,11 @@
 				m_am_tools,
 				TRACE_FLAGS_DEFAULT,
 				(EAPL("%s: eap_type_tls_peap_c::state_notification(): ")
-				 EAPL("PEAPv1 authentication tunneled EAP-SUCCESS: EAP-type 0x%08x\n"),
+				 EAPL("PEAPv1 authentication tunneled EAP-SUCCESS: EAP-type 0xfe%06x%08x=%s\n"),
 				 (m_is_client == true ? "client": "server"),
-				 convert_eap_type_to_u32_t(m_current_eap_type)));
+				 m_current_eap_type.get_vendor_id(),
+				 m_current_eap_type.get_vendor_type(),
+				 eap_header_string_c::get_eap_type_string(m_current_eap_type)));
 
 			m_tunneled_eap_type_authentication_state
 				= static_cast<eap_state_variable_e>(state->get_current_state());
@@ -5205,9 +5220,11 @@
 				m_am_tools,
 				TRACE_FLAGS_DEFAULT,
 				(EAPL("%s: eap_type_tls_peap_c::state_notification(): ")
-				 EAPL("authentication EAP-SUCCESS: EAP-type 0x%08x\n"),
+				 EAPL("authentication EAP-SUCCESS: EAP-type 0xfe%06x%08x=%s\n"),
 				 (m_is_client == true ? "client": "server"),
-				 convert_eap_type_to_u32_t(m_current_eap_type)));
+				 m_current_eap_type.get_vendor_id(),
+				 m_current_eap_type.get_vendor_type(),
+				 eap_header_string_c::get_eap_type_string(m_current_eap_type)));
 
 			m_tunneled_eap_type_authentication_state
 				= eap_state_authentication_finished_successfully;
@@ -5389,9 +5406,11 @@
 				m_am_tools,
 				TRACE_FLAGS_DEFAULT,
 				(EAPL("%s: eap_type_tls_peap_c::state_notification(): TLS tunneled ")
-				 EAPL("authentication failed: EAP-type 0x%08x, tunnel type %s\n"),
+				 EAPL("authentication failed: EAP-type 0xfe%06x%08x=%s, tunnel type %s\n"),
 				 (m_is_client == true ? "client": "server"),
-				 convert_eap_type_to_u32_t(m_current_eap_type),
+				 m_current_eap_type.get_vendor_id(),
+				 m_current_eap_type.get_vendor_type(),
+				 eap_header_string_c::get_eap_type_string(m_current_eap_type),
 				 tls_trace.get_peap_version_string(m_current_peap_version)));
 
 			set_state(eap_type_tls_peap_state_failure);
@@ -5411,9 +5430,11 @@
 						TRACE_FLAGS_DEFAULT,
 						(EAPL("%s: eap_type_tls_peap_c::state_notification(): ")
 						 EAPL("TLS tunneled authentication ")
-						 EAPL("EAP-SUCCESS: EAP-type 0x%08x, tunnel type %s, style %d\n"),
+						 EAPL("EAP-SUCCESS: EAP-type 0xfe%06x%08x=%s, tunnel type %s, style %d\n"),
 						 (m_is_client == true ? "client": "server"),
-						 convert_eap_type_to_u32_t(m_current_eap_type),
+						 m_current_eap_type.get_vendor_id(),
+						 m_current_eap_type.get_vendor_type(),
+						 eap_header_string_c::get_eap_type_string(m_current_eap_type),
 						 tls_trace.get_peap_version_string(m_current_peap_version),
 						 m_use_tppd_tls_peap));
 					
@@ -5456,9 +5477,11 @@
 						TRACE_FLAGS_DEFAULT,
 						(EAPL("%s: eap_type_tls_peap_c::state_notification(): ")
 						 EAPL("TLS resumed session authentication ")
-						 EAPL("EAP-SUCCESS: EAP-type 0x%08x, m_tls_session_type=%d=%s, tunnel type %s\n"),
+						 EAPL("EAP-SUCCESS: EAP-type 0xfe%06x%08x=%s, m_tls_session_type=%d=%s, tunnel type %s\n"),
 						 (m_is_client == true ? "client": "server"),
-						 convert_eap_type_to_u32_t(m_current_eap_type),
+						 m_current_eap_type.get_vendor_id(),
+						 m_current_eap_type.get_vendor_type(),
+						 eap_header_string_c::get_eap_type_string(m_current_eap_type),
 						 get_tls_session_type(),
 						 eap_tls_trace_string_c::get_tls_session_type_string(get_tls_session_type()),
 						 tls_trace.get_peap_version_string(m_current_peap_version)));
@@ -5490,9 +5513,11 @@
 						m_am_tools,
 						TRACE_FLAGS_DEFAULT,
 						(EAPL("%s: eap_type_tls_peap_c::state_notification(): ")
-						 EAPL("plain TLS authentication EAP-SUCCESS: EAP-type 0x%08x, tunnel type %s\n"),
+						 EAPL("plain TLS authentication EAP-SUCCESS: EAP-type 0xfe%06x%08x=%s, tunnel type %s\n"),
 						 (m_is_client == true ? "client": "server"),
-						 convert_eap_type_to_u32_t(m_current_eap_type),
+						 m_current_eap_type.get_vendor_id(),
+						 m_current_eap_type.get_vendor_type(),
+						 eap_header_string_c::get_eap_type_string(m_current_eap_type),
 						 tls_trace.get_peap_version_string(m_current_peap_version)));
 
 					// Plain TLS.
@@ -5535,9 +5560,11 @@
 							EAP_TRACE_ERROR(
 								m_am_tools,
 								TRACE_FLAGS_DEFAULT|TRACE_TEST_VECTORS,
-								(EAPL("ERROR: EAP_type_TLS_PEAP: %s, unknown EAP-type 0x%08x\n"),
+								(EAPL("ERROR: EAP_type_TLS_PEAP: %s, unknown EAP-type 0xfe%06x%08x=%s\n"),
 								 (m_is_client == true) ? "client": "server",
-								 convert_eap_type_to_u32_t(m_current_eap_type)));
+								 m_current_eap_type.get_vendor_id(),
+								 m_current_eap_type.get_vendor_type(),
+								 eap_header_string_c::get_eap_type_string(m_current_eap_type)));
 							
 							EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 							set_state(eap_type_tls_peap_state_failure);
@@ -5572,9 +5599,11 @@
 				m_am_tools,
 				TRACE_FLAGS_DEFAULT,
 				(EAPL("%s: eap_type_tls_peap_c::state_notification(): ")
-				 EAPL("full TLS authentication: EAP-type 0x%08x\n"),
+				 EAPL("full TLS authentication: EAP-type 0xfe%06x%08x=%s\n"),
 				 (m_is_client == true ? "client": "server"),
-				 convert_eap_type_to_u32_t(m_current_eap_type)));
+				 m_current_eap_type.get_vendor_id(),
+				 m_current_eap_type.get_vendor_type(),
+				 eap_header_string_c::get_eap_type_string(m_current_eap_type)));
 		}
 		else if (state->get_current_state() == tls_peap_state_original_session_resumption)
 		{
@@ -5582,9 +5611,11 @@
 				m_am_tools,
 				TRACE_FLAGS_DEFAULT,
 				(EAPL("%s: eap_type_tls_peap_c::state_notification(): ")
-				 EAPL("TLS session resumption: EAP-type 0x%08x\n"),
+				 EAPL("TLS session resumption: EAP-type 0xfe%06x%08x=%s\n"),
 				 (m_is_client == true ? "client": "server"),
-				 convert_eap_type_to_u32_t(m_current_eap_type)));
+				 m_current_eap_type.get_vendor_id(),
+				 m_current_eap_type.get_vendor_type(),
+				 eap_header_string_c::get_eap_type_string(m_current_eap_type)));
 		}
 #if defined(USE_EAP_TLS_SESSION_TICKET)
 		else if (state->get_current_state() == tls_peap_state_stateless_session_resumption)
@@ -5593,9 +5624,11 @@
 				m_am_tools,
 				TRACE_FLAGS_DEFAULT,
 				(EAPL("%s: eap_type_tls_peap_c::state_notification(): ")
-				 EAPL("TLS stateless session resumption: EAP-type 0x%08x\n"),
+				 EAPL("TLS stateless session resumption: EAP-type 0xfe%06x%08x=%s\n"),
 				 (m_is_client == true ? "client": "server"),
-				 convert_eap_type_to_u32_t(m_current_eap_type)));
+				 m_current_eap_type.get_vendor_id(),
+				 m_current_eap_type.get_vendor_type(),
+				 eap_header_string_c::get_eap_type_string(m_current_eap_type)));
 		}
 #endif // #if defined(USE_EAP_TLS_SESSION_TICKET)
 #if defined(USE_EAP_TLS_PEAP_TPPD_PEAP_V1_NEW_FIXES)
@@ -5606,9 +5639,11 @@
 				m_am_tools,
 				TRACE_FLAGS_DEFAULT,
 				(EAPL("%s: eap_type_tls_peap_c::state_notification(): ")
-				 EAPL("PEAPv1 waits EAP-Success or tunneled packet: EAP-type 0x%08x\n"),
+				 EAPL("PEAPv1 waits EAP-Success or tunneled packet: EAP-type 0xfe%06x%08x=%s\n"),
 				 (m_is_client == true ? "client": "server"),
-				 convert_eap_type_to_u32_t(m_current_eap_type)));
+				 m_current_eap_type.get_vendor_id(),
+				 m_current_eap_type.get_vendor_type(),
+				 eap_header_string_c::get_eap_type_string(m_current_eap_type)));
 
 			set_state(eap_type_tls_peap_state_tppd_peapv1_waits_eap_success_or_tunneled_packet);
 		}
@@ -5620,9 +5655,11 @@
 				m_am_tools,
 				TRACE_FLAGS_DEFAULT,
 				(EAPL("%s: eap_type_tls_peap_c::state_notification(): ")
-				 EAPL("sends TTLS/plain MsChapv2 empty Ack: EAP-type 0x%08x\n"),
+				 EAPL("sends TTLS/plain MsChapv2 empty Ack: EAP-type 0xfe%06x%08x=%s\n"),
 				 (m_is_client == true ? "client": "server"),
-				 convert_eap_type_to_u32_t(m_current_eap_type)));
+				 m_current_eap_type.get_vendor_id(),
+				 m_current_eap_type.get_vendor_type(),
+				 eap_header_string_c::get_eap_type_string(m_current_eap_type)));
 
 			// Send empty acknowledge message.
 			eap_status_e status = send_empty_eap_ack();
@@ -5642,9 +5679,11 @@
 				m_am_tools,
 				TRACE_FLAGS_DEFAULT,
 				(EAPL("%s: eap_type_tls_peap_c::state_notification(): ")
-				 EAPL("waits TTLS/plain MsChapv2 empty Ack: EAP-type 0x%08x\n"),
+				 EAPL("waits TTLS/plain MsChapv2 empty Ack: EAP-type 0xfe%06x%08x=%s\n"),
 				 (m_is_client == true ? "client": "server"),
-				 convert_eap_type_to_u32_t(m_current_eap_type)));
+				 m_current_eap_type.get_vendor_id(),
+				 m_current_eap_type.get_vendor_type(),
+				 eap_header_string_c::get_eap_type_string(m_current_eap_type)));
 
 			set_state(eap_type_tls_peap_state_server_waits_ttls_plain_ms_chap_v2_empty_ack);
 		}
@@ -5655,9 +5694,11 @@
 				m_am_tools,
 				TRACE_FLAGS_DEFAULT,
 				(EAPL("%s: eap_type_tls_peap_c::state_notification(): ")
-				 EAPL("TLS tunnel ready: EAP-type 0x%08x\n"),
+				 EAPL("TLS tunnel ready: EAP-type 0xfe%06x%08x=%s\n"),
 				 (m_is_client == true ? "client": "server"),
-				 convert_eap_type_to_u32_t(m_current_eap_type)));
+				 m_current_eap_type.get_vendor_id(),
+				 m_current_eap_type.get_vendor_type(),
+				 eap_header_string_c::get_eap_type_string(m_current_eap_type)));
 
 			if (m_is_client == true)
 			{
@@ -5769,9 +5810,11 @@
 					EAP_TRACE_ERROR(
 						m_am_tools,
 						TRACE_FLAGS_DEFAULT|TRACE_TEST_VECTORS,
-						(EAPL("ERROR: EAP_type_TLS_PEAP: %s, unknown EAP-type 0x%08x\n"),
+						(EAPL("ERROR: EAP_type_TLS_PEAP: %s, unknown EAP-type 0xfe%06x%08x=%s\n"),
 						 (m_is_client == true) ? "client": "server",
-						 convert_eap_type_to_u32_t(m_current_eap_type)));
+						 m_current_eap_type.get_vendor_id(),
+						 m_current_eap_type.get_vendor_type(),
+						 eap_header_string_c::get_eap_type_string(m_current_eap_type)));
 					
 					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 					set_state(eap_type_tls_peap_state_failure);
@@ -5808,9 +5851,11 @@
 				m_am_tools,
 				TRACE_FLAGS_DEFAULT,
 				(EAPL("%s: eap_type_tls_peap_c::state_notification(): ")
-				 EAPL("TLS tunnel ready: EAP-type 0x%08x\n"),
+				 EAPL("TLS tunnel ready: EAP-type 0xfe%06x%08x=%s\n"),
 				 (m_is_client == true ? "client": "server"),
-				 convert_eap_type_to_u32_t(m_current_eap_type)));
+				 m_current_eap_type.get_vendor_id(),
+				 m_current_eap_type.get_vendor_type(),
+				 eap_header_string_c::get_eap_type_string(m_current_eap_type)));
 
 			if (m_is_client == true)
 			{
@@ -6201,19 +6246,6 @@
 
 //--------------------------------------------------
 
-//
-EAP_FUNC_EXPORT eap_status_e eap_type_tls_peap_c::cancel_all_timers()
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	eap_status_e status = get_type_partner()->cancel_all_timers();
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, status);
-}
-
-//--------------------------------------------------
-
 // This is commented in abs_tls_base_application_c.
 EAP_FUNC_EXPORT eap_status_e eap_type_tls_peap_c::load_module(
 	const eap_type_value_e type,
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/eap/src/eap_type_tls_peap_header.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/eap/src/eap_type_tls_peap_header.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 14 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/eap/src/eap_type_tls_peap_state_notification.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/eap/src/eap_type_tls_peap_state_notification.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -64,8 +64,6 @@
 }
 
 
-#if defined(USE_EAP_EXPANDED_TYPES)
-
 EAP_FUNC_EXPORT eap_type_tls_peap_state_notification_c::eap_type_tls_peap_state_notification_c(
 	abs_eap_am_tools_c * const tools,
 	const eap_am_network_id_c * const send_network_id,
@@ -91,8 +89,6 @@
 {
 }
 
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
-
 
 EAP_FUNC_EXPORT eap_type_tls_peap_state_notification_c::eap_type_tls_peap_state_notification_c(
 	abs_eap_am_tools_c * const tools,
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/abs_tls_apply_cipher_spec.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/abs_tls_apply_cipher_spec.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 #if !defined(_ABS_TLS_MESSAGE_RECORD_PROCESS_H_)
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/abs_tls_base_application.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/abs_tls_base_application.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 19.1.2 %
+* %version: %
 */
 
 #if !defined(_ABS_TLS_BASE_APPLICATION_H_)
@@ -210,17 +210,6 @@
 		const u32_t id) = 0;
 
 	/**
-	 * The cancel_all_timers() function cancels all timers.
-	 * User should use this in termination of the stack before
-	 * the adaptation module of tools is deleted.
-	 * Preferred mode is to cancel each timer directly
-	 * using cancel_timer() function.
-	 *
-	 * Adaptation module internally implements the timer.
-	 */
-	virtual eap_status_e cancel_all_timers() = 0;
-
-	/**
 	 * This is needed by PEAP type.
 	 * The load_module() function function indicates the lower level to
 	 * load new module of EAP-type.
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/abs_tls_base_record.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/abs_tls_base_record.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8.1.2 %
+* %version: %
 */
 
 #if !defined(_ABS_TLS_BASE_RECORD_H_)
@@ -215,17 +215,6 @@
 		const u32_t id) = 0;
 
 	/**
-	 * The cancel_all_timers() function cancels all timers.
-	 * User should use this in termination of the stack before
-	 * the adaptation module of tools is deleted.
-	 * Preferred mode is to cancel each timer directly
-	 * using cancel_timer() function.
-	 *
-	 * Adaptation module internally implements the timer.
-	 */
-	virtual eap_status_e cancel_all_timers() = 0;
-
-	/**
 	 * This is needed by PEAP type.
 	 * The load_module() function function indicates the lower level to
 	 * load new module of EAP-type.
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/abs_tls_change_cipher_spec.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/abs_tls_change_cipher_spec.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 #if !defined(_ABS_TLS_CHANGE_CIPHER_SPEC_H_)
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/abs_tls_message_hash.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/abs_tls_message_hash.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 #if !defined(_ABS_TLS_MESSAGE_HASH_H_)
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_alert_message.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_alert_message.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 #if !defined(_TLS_ALERT_MESSAGE_H_)
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_application_data_message.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_application_data_message.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 #if !defined(_TLS_APPLICATION_DATA_MESSAGE_H_)
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_application_eap_core.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_application_eap_core.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 36.1.2 %
+* %version: %
 */
 
 #if !defined(_TLS_APPLICATION_EAP_CORE_H_)
@@ -599,9 +599,6 @@
 		abs_eap_base_timer_c * const initializer, 
 		const u32_t id);
 
-	/// @see abs_eap_core_c::cancel_all_timers().
-	EAP_FUNC_IMPORT eap_status_e cancel_all_timers();
-
 	/// @see abs_eap_core_c::check_is_valid_eap_type().
 	EAP_FUNC_IMPORT eap_status_e check_is_valid_eap_type(const eap_type_value_e eap_type);
 
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_base_application.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_base_application.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 25 %
+* %version: %
 */
 
 #if !defined(_TLS_BASE_APPLICATION_H_)
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_base_record.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_base_record.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 18 %
+* %version: %
 */
 
 #if !defined(_TLS_BASE_RECORD_H_)
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_change_cipher_spec_message.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_change_cipher_spec_message.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 #if !defined(_TLS_CHANGE_CIPHER_SPEC_MESSAGE_H_)
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_completion.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_completion.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 14 %
+* %version: %
 */
 
 #if !defined(_TLS_COMPLETION_H_)
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_extension.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_extension.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11 %
+* %version: %
 */
 
 #if !defined(_TLS_EXTENSION_H_)
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_handshake_header.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_handshake_header.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 #if !defined(_TLS_HANDSHAKE_HEADER_H_)
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_handshake_message.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_handshake_message.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: %
 */
 
 #if !defined(_TLS_HANDSHAKE_MESSAGE_H_)
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_message.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_message.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 #if !defined(_TLS_MESSAGE_H_)
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_peap_tlv_header.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_peap_tlv_header.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: %
 */
 
 #if !defined(_TLS_PEAP_TLV_HEADER_H_)
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_peap_tlv_payloads.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_peap_tlv_payloads.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #if !defined(_PEAP_TLV_PAYLOADS_H_)
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_peap_types.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_peap_types.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 47 %
+* %version: 45.1.2 %
 */
 
 #if !defined(_TLS_PEAP_TYPES_H_)
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_record.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_record.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 66.1.2 %
+* %version: %
 */
 
 #if !defined(_TLS_RECORD_H_)
@@ -1431,9 +1431,6 @@
 		const u32_t id);
 
 	// This is commented in abs_tls_base_application_c.
-	EAP_FUNC_IMPORT eap_status_e cancel_all_timers();
-
-	// This is commented in abs_tls_base_application_c.
 	EAP_FUNC_IMPORT eap_status_e load_module(
 		const eap_type_value_e type,
 		const eap_type_value_e /* tunneling_type */,
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_record_header.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_record_header.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 #if !defined(_TLS_RECORD_HEADER_H_)
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_record_message.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/include/tls_record_message.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 #if !defined(_TLS_RECORD_MESSAGE_H_)
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_alert_message.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_alert_message.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_application_data_message.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_application_data_message.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_application_eap_core.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_application_eap_core.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 92.1.4 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -329,7 +329,6 @@
 				return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_configure_field);
 			}
 		}
-//#if defined(USE_EAP_EXPANDED_TYPES)
 		else if (tunneled_eap_type.get_data_length()
 				 == eap_expanded_type_c::get_eap_expanded_type_size()
 			&& tunneled_eap_type.get_data(tunneled_eap_type.get_data_length()) != 0)
@@ -354,7 +353,6 @@
 				return EAP_STATUS_RETURN(m_am_tools, status);
 			}
 		}
-//#endif //#if defined(USE_EAP_EXPANDED_TYPES)
 		else
 		{
 			EAP_TRACE_DEBUG(
@@ -370,13 +368,7 @@
 
 
 #if defined(EAP_USE_TTLS_PLAIN_MS_CHAP_V2_HACK)
-		if (
-#if defined(USE_EAP_EXPANDED_TYPES)
-			m_peap_tunneled_eap_type == eap_expanded_type_ttls_plain_mschapv2.get_type()
-#else
-			m_peap_tunneled_eap_type == eap_type_plain_mschapv2
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
-			)
+		if (m_peap_tunneled_eap_type == eap_expanded_type_ttls_plain_mschapv2.get_type())
 		{
 			// This is special case.
 			// We must tell to inner EAP-stack to use EAP-MsChapv2.
@@ -683,44 +675,6 @@
 
 	//----------------------------------------------------------
 
-#if defined(USE_EAP_EXPANDED_TYPES) && 0
-	{
-		eap_variable_data_c use_eap_expanded_type(m_am_tools);
-
-		eap_status_e status = read_configure(
-			cf_str_EAP_TLS_PEAP_use_eap_expanded_type.get_field(),
-			&use_eap_expanded_type);
-
-		if (status != eap_status_ok)
-		{
-			status = read_configure(
-				cf_str_EAP_CORE_use_eap_expanded_type.get_field(),
-				&use_eap_expanded_type);
-		}
-
-		if (status == eap_status_ok
-			&& use_eap_expanded_type.get_data_length() == sizeof(u32_t)
-			&& use_eap_expanded_type.get_data() != 0)
-		{
-			u32_t *flag = reinterpret_cast<u32_t *>(use_eap_expanded_type.get_data(use_eap_expanded_type.get_data_length()));
-
-			if (flag != 0)
-			{
-				if ((*flag) != 0ul)
-				{
-					m_use_eap_expanded_type = true;
-				}
-				else
-				{
-					m_use_eap_expanded_type = false;
-				}
-			}
-		}
-	}
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
-
-	//----------------------------------------------------------
-
 	status = m_eap_core->configure();
 
 	if (m_peap_tunneled_eap_type == eap_type_ttls_plain_pap)
@@ -1359,13 +1313,7 @@
 
 	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
-	if (
-#if defined(USE_EAP_EXPANDED_TYPES)
-		m_peap_tunneled_eap_type == eap_expanded_type_ttls_plain_pap.get_type()
-#else
-		m_peap_tunneled_eap_type == eap_type_ttls_plain_pap
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
-		)
+	if (m_peap_tunneled_eap_type == eap_expanded_type_ttls_plain_pap.get_type())
 	{
 		// Query PAP username and password.
 		status = m_application_partner->query_ttls_pap_username_and_password(0);
@@ -1468,12 +1416,7 @@
 
 #if defined(EAP_USE_TTLS_PLAIN_MS_CHAP_V2_HACK)
 		if (m_eap_type == eap_type_ttls
-#if defined(USE_EAP_EXPANDED_TYPES)
-			&& m_peap_tunneled_eap_type == eap_expanded_type_ttls_plain_mschapv2.get_type()
-#else
-			&& m_peap_tunneled_eap_type == eap_type_plain_mschapv2
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
-			)
+			&& m_peap_tunneled_eap_type == eap_expanded_type_ttls_plain_mschapv2.get_type())
 		{
 			eap_header_wr_c sent_eap_packet(
 				m_am_tools,
@@ -1507,12 +1450,7 @@
 
 #if defined(EAP_USE_TTLS_PLAIN_MS_CHAP_V2_HACK)
 		if (m_eap_type == eap_type_ttls
-#if defined(USE_EAP_EXPANDED_TYPES)
-			&& m_peap_tunneled_eap_type == eap_expanded_type_ttls_plain_mschapv2.get_type()
-#else
-			&& m_peap_tunneled_eap_type == eap_type_plain_mschapv2
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
-			)
+			&& m_peap_tunneled_eap_type == eap_expanded_type_ttls_plain_mschapv2.get_type())
 		{
 			eap_header_wr_c sent_eap_packet(
 				m_am_tools,
@@ -6428,13 +6366,7 @@
 
 #if defined(EAP_USE_TTLS_PLAIN_MS_CHAP_V2_HACK)
 		if (m_tunneled_eap_in_ttls == false
-			&& (
-#if defined(USE_EAP_EXPANDED_TYPES)
-				m_peap_tunneled_eap_type == eap_expanded_type_ttls_plain_mschapv2.get_type()
-#else
-				m_peap_tunneled_eap_type == eap_type_plain_mschapv2
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
-			))
+			&& m_peap_tunneled_eap_type == eap_expanded_type_ttls_plain_mschapv2.get_type())
 		{
 			tunneled_type = eap_type_mschapv2;
 		}
@@ -6940,35 +6872,18 @@
 
 //--------------------------------------------------
 
-EAP_FUNC_EXPORT eap_status_e tls_application_eap_core_c::cancel_all_timers()
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-	eap_status_e status = eap_status_process_general_error;
-	abs_tls_base_application_c * partner = get_application_partner();
-	if (partner != 0)
-	{
-		status = partner->cancel_all_timers();
-	}
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, status);
-}
-
-//--------------------------------------------------
-
 EAP_FUNC_EXPORT eap_status_e tls_application_eap_core_c::check_is_valid_eap_type(
 	const eap_type_value_e eap_type)
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
-	eap_header_string_c eap_string;
-	EAP_UNREFERENCED_PARAMETER(eap_string);
-
 	EAP_TRACE_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
-		(EAPL("tls_application_eap_core_c::check_is_valid_eap_type(): EAP-type=0x%08x=%s\n"),
-		convert_eap_type_to_u32_t(eap_type),
-		eap_string.get_eap_type_string(eap_type)));
+		(EAPL("tls_application_eap_core_c::check_is_valid_eap_type(): EAP-type=0xfe%06x%08x=%s\n"),
+		eap_type.get_vendor_id(),
+		eap_type.get_vendor_type(),
+		eap_header_string_c::get_eap_type_string(eap_type)));
 
 	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: tls_application_eap_core_c::check_is_valid_eap_type()");
 
@@ -7006,9 +6921,10 @@
 			EAP_TRACE_DEBUG(
 				m_am_tools,
 				TRACE_FLAGS_DEFAULT,
-				(EAPL("ERROR: tls_application_eap_core_c::check_is_valid_eap_type(): No allowed EAP-type=0x%08x=%s\n"),
-				convert_eap_type_to_u32_t(eap_type),
-				eap_string.get_eap_type_string(eap_type)));
+				(EAPL("ERROR: tls_application_eap_core_c::check_is_valid_eap_type(): No allowed EAP-type=0xfe%06x%08x=%s\n"),
+				eap_type.get_vendor_id(),
+				eap_type.get_vendor_type(),
+				eap_header_string_c::get_eap_type_string(eap_type)));
 
 			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_eap_type);
 		}
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_application_ttls_plain_mschapv2.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_application_ttls_plain_mschapv2.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_base_application.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_base_application.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_base_record.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_base_record.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_change_cipher_spec_message.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_change_cipher_spec_message.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_completion.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_completion.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_extension.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_extension.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 13 %
+* %version: %
 */
 
 #if defined(USE_EAP_TLS_SESSION_TICKET)
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_handshake_header.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_handshake_header.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_handshake_message.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_handshake_message.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 23 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_message.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_message.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_peap_tlv_header.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_peap_tlv_header.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -239,8 +239,9 @@
 	EAP_ASSERT(flag_tlv_type_data != 0);
 	
 	flag_tlv_type_data[0] = static_cast<u8_t>(
-		flag_tlv_type_data[0] & (m_flag_mask_mandatory_tlv|m_flag_mask_reserved)
-		| ((type & 0xff00) >> 8) & ~(m_flag_mask_mandatory_tlv|m_flag_mask_reserved));
+		(flag_tlv_type_data[0] & (m_flag_mask_mandatory_tlv|m_flag_mask_reserved))
+		| (((type & 0xff00) >> 8) & ~(m_flag_mask_mandatory_tlv|m_flag_mask_reserved)));
+
 	flag_tlv_type_data[1] = static_cast<u8_t>(type & 0x00ff);
 }
 
@@ -254,11 +255,11 @@
 	
 	if (reserved == true)
 	{
-		flag_tlv_type_data[0] |= m_flag_mask_reserved;
+		flag_tlv_type_data[0] = static_cast<u8_t>(flag_tlv_type_data[0] | m_flag_mask_reserved);
 	}
 	else
 	{
-		flag_tlv_type_data[0] &= ~m_flag_mask_reserved;
+		flag_tlv_type_data[0] = static_cast<u8_t>(flag_tlv_type_data[0] & ~m_flag_mask_reserved);
 	}
 }
 
@@ -272,11 +273,11 @@
 	
 	if (mandatory_when_true == true)
 	{
-		flag_tlv_type_data[0] |= m_flag_mask_mandatory_tlv;
+		flag_tlv_type_data[0] = static_cast<u8_t>(flag_tlv_type_data[0] | m_flag_mask_mandatory_tlv);
 	}
 	else
 	{
-		flag_tlv_type_data[0] &= ~m_flag_mask_mandatory_tlv;
+		flag_tlv_type_data[0] = static_cast<u8_t>(flag_tlv_type_data[0] & ~m_flag_mask_mandatory_tlv);
 	}
 }
 
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_peap_tlv_payloads.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_peap_tlv_payloads.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_peap_types.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_peap_types.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 24 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_record.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_record.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 177.1.9 %
+* %version: 195 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -1932,8 +1932,8 @@
 		}
 		case tls_completion_action_complete_create_handshake_type_client_key_exchange:
 		{
-			if (cipher_suite_is_TLS_RSA() == true
-					&& m_own_encrypted_premaster_secret.get_is_valid_data() == true
+			if ((cipher_suite_is_TLS_RSA() == true
+				 && m_own_encrypted_premaster_secret.get_is_valid_data() == true)
 				|| ((cipher_suite_is_TLS_DHE_DSS() == true
 						|| cipher_suite_is_TLS_DHE_RSA() == true
 #if defined(USE_FAST_EAP_TYPE)
@@ -3418,10 +3418,12 @@
 	EAP_TRACE_ALWAYS(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
-		(EAPL("this = 0x%08x, %s: starts: tls_record_c::state_notification(): EAP-type 0x%08x: m_tls_session_type=%d=%s, tls_state=%d=%s, notification state=%s\n"),
+		(EAPL("this = 0x%08x, %s: starts: tls_record_c::state_notification(): EAP-type 0xfe%06x%08x=%s: m_tls_session_type=%d=%s, tls_state=%d=%s, notification state=%s\n"),
 		 this,
 		 (m_is_client == true ? "client": "server"),
-		 convert_eap_type_to_u32_t(m_eap_type),
+		 m_eap_type.get_vendor_id(),
+		 m_eap_type.get_vendor_type(),
+		 eap_header_string_c::get_eap_type_string(m_eap_type),
 		 m_tls_session_type,
 		 eap_tls_trace_string_c::get_tls_session_type_string(m_tls_session_type),
 		 m_tls_peap_state,
@@ -3566,9 +3568,11 @@
 				m_am_tools,
 				TRACE_FLAGS_DEFAULT,
 				(EAPL("%s: tls_record_c::state_notification(): ")
-				 EAPL("waits TTLS/plain MsChapv2 empty Ack: EAP-type 0x%08x\n"),
+				 EAPL("waits TTLS/plain MsChapv2 empty Ack: EAP-type 0xfe%06x%08x=%s\n"),
 				 (m_is_client == true ? "client": "server"),
-				 convert_eap_type_to_u32_t(m_eap_type)));
+				 m_eap_type.get_vendor_id(),
+				 m_eap_type.get_vendor_type(),
+				 eap_header_string_c::get_eap_type_string(m_eap_type)));
 		}
 #endif //#if defined(EAP_USE_TTLS_PLAIN_MS_CHAP_V2_HACK)
 
@@ -3627,23 +3631,6 @@
 //--------------------------------------------------
 
 // This is commented in abs_tls_base_application_c.
-EAP_FUNC_EXPORT eap_status_e tls_record_c::cancel_all_timers()
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	if (get_type_partner() == 0)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-	}
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return get_type_partner()->cancel_all_timers();
-}
-
-//--------------------------------------------------
-
-// This is commented in abs_tls_base_application_c.
 EAP_FUNC_EXPORT eap_status_e tls_record_c::load_module(
 	const eap_type_value_e type,
 	const eap_type_value_e tunneling_type,
@@ -8864,6 +8851,22 @@
 			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
 		}
+
+		{
+			for (u32_t ind = 0ul; ind < m_peer_certificate_types.get_object_count(); ++ind)
+			{
+				const u8_t * const certificate_type = m_peer_certificate_types.get_object(ind);
+				if (certificate_type != 0)
+				{
+					EAP_TRACE_DEBUG(
+						m_am_tools,
+						TRACE_FLAGS_DEFAULT,
+						(EAPL("peer certificate type %d=0x%02x\n"),
+						*certificate_type,
+						*certificate_type));
+				}
+			}
+		}
 	}
 
 	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -8889,6 +8892,22 @@
 			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_payload);
 		}
+
+		{
+			for (u32_t ind = 0ul; ind < m_peer_certificate_authorities.get_object_count(); ++ind)
+			{
+				const eap_variable_data_c * const ca_authority = m_peer_certificate_authorities.get_object(ind);
+				if (ca_authority != 0)
+				{
+					EAP_TRACE_DATA_DEBUG(
+						m_am_tools,
+						EAP_TRACE_FLAGS_MESSAGE_DATA,
+						(EAPL("peer CA-authority"),
+						 ca_authority->get_data(),
+						 ca_authority->get_data_length()));
+				}
+			}
+		}
 	}
 
 	m_tls_peap_server_requested_client_certificate = true;
@@ -12318,6 +12337,9 @@
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
 	}
 
+	// After this point *member_cbc_crypto_block_algorithm will delete crypto_block_algorithm.
+	block_algorithm_remove.do_not_free_variable();
+
 	*member_cbc_crypto_block_algorithm = new crypto_cbc_c(
 		m_am_tools,
 		crypto_block_algorithm,
@@ -12330,15 +12352,6 @@
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
 	}
 
-	// After this point *member_cbc_crypto_block_algorithm will delete crypto_block_algorithm.
-	block_algorithm_remove.do_not_free_variable();
-
-	if ((*member_cbc_crypto_block_algorithm)->get_is_valid() == false)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-	}
-
 	eap_status_e status = eap_status_process_general_error;
 
 
@@ -16647,6 +16660,12 @@
 		&& m_eap_type == eap_type_fast
 		&& m_tls_session_type == tls_session_type_eap_fast_pac_session_resumption)
 	{
+		if (m_application == 0)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_process_general_error);
+		}
+
 		// This is server.
 		// EAP-FAST is using Tunnel PAC.
 		// Here we cannot start tunneled authentication immediately
@@ -16738,7 +16757,10 @@
 		}
 	}
 	else if (tmp_identity_privacy_handshake_state == tls_identity_privacy_handshake_state_none
-		|| tmp_identity_privacy_handshake_state == tls_identity_privacy_handshake_state_runs)
+#if defined(USE_EAP_TLS_IDENTITY_PRIVACY)
+		|| tmp_identity_privacy_handshake_state == tls_identity_privacy_handshake_state_runs
+#endif
+		)
 	{
 		if ((m_eap_type == eap_type_peap
 				&& m_peap_version >= peap_version_0_xp
@@ -19040,7 +19062,12 @@
 		{
 			if (completion_status != eap_status_ok)
 			{
-				(void)EAP_STATUS_RETURN(m_am_tools, completion_status);
+				EAP_TRACE_DEBUG(
+					m_am_tools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("WARNING: TLS: this = 0x%08x, %s: message_function: starts: tls_record_c::complete_query_certificate_chain(): No certificate chain configured.\n"),
+					 this,
+					 (m_is_client == true ? "client": "server")));
 			}
 
 			if (m_is_client == false)
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_record_header.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_record_header.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -131,6 +131,7 @@
 /// This function returns debug strings of the TLS-protocol values.
 eap_const_string tls_record_header_c::get_tls_protocol_string(const tls_record_protocol_e protocol)
 {
+
 #if defined(USE_EAP_TRACE_STRINGS)
 	EAP_IF_RETURN_STRING(protocol, tls_record_protocol_none)
 	else EAP_IF_RETURN_STRING(protocol, tls_record_protocol_change_cipher_spec)
--- a/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_record_message.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/type/tls_peap/tls/src/tls_record_message.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/wpxstub/eapol_core_wpxm_stub.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/wpxstub/eapol_core_wpxm_stub.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 6.1.4 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_common/wpxstub/eapol_key_state_common_wpxm_stub.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/wpxstub/eapol_key_state_common_wpxm_stub.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -86,7 +86,7 @@
 //--------------------------------------------------
 
 //
-EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::derive_WPXM_WPXK1_WPXK2()
+eap_status_e eapol_key_state_c::derive_WPXM_WPXK1_WPXK2()
 {
 	return EAP_STATUS_RETURN(m_am_tools, eap_status_not_supported);
 }
@@ -106,7 +106,7 @@
 //--------------------------------------------------
 
 //
-EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::derive_WPXM_PTK(const u32_t /* WPXM_WPXC */)
+eap_status_e eapol_key_state_c::derive_WPXM_PTK(const u32_t /* WPXM_WPXC */)
 {
 	return EAP_STATUS_RETURN(m_am_tools, eap_status_not_supported);
 }
--- a/eapol/eapol_framework/eapol_common/wpxstub/ethernet_core_wpxm_stub.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/wpxstub/ethernet_core_wpxm_stub.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 6.1.3 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -42,15 +42,10 @@
 
 //
 EAP_FUNC_EXPORT eap_status_e ethernet_core_c::start_WPXM_reassociation(
-	const eap_am_network_id_c * const receive_network_id,
-	const eapol_key_authentication_type_e authentication_type,
-	eap_variable_data_c * const send_reassociation_request_ie)
+	const eap_am_network_id_c * const /* receive_network_id */,
+	const eapol_key_authentication_type_e /* authentication_type */,
+	eap_variable_data_c * const /* send_reassociation_request_ie */)
 {
-	eap_status_e status = m_eapol_core->start_WPXM_reassociation(
-		receive_network_id,
-		authentication_type,
-		send_reassociation_request_ie);
-
 	return EAP_STATUS_RETURN(m_am_tools, eap_status_not_supported);
 }
 
@@ -58,17 +53,11 @@
 
 //
 EAP_FUNC_EXPORT eap_status_e ethernet_core_c::complete_WPXM_reassociation(
-	const eapol_wlan_authentication_state_e reassociation_result,
-	const eap_am_network_id_c * const receive_network_id,
-	const eapol_key_authentication_type_e authentication_type,
-	const eap_variable_data_c * const received_reassociation_ie)
+	const eapol_wlan_authentication_state_e /* reassociation_result */,
+	const eap_am_network_id_c * const /* receive_network_id */,
+	const eapol_key_authentication_type_e /* authentication_type */,
+	const eap_variable_data_c * const /* received_reassociation_ie */)
 {
-	eap_status_e status = m_eapol_core->complete_WPXM_reassociation(
-		reassociation_result,
-		receive_network_id,
-		authentication_type,
-		received_reassociation_ie);
-
 	return EAP_STATUS_RETURN(m_am_tools, eap_status_not_supported);
 }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/BWINS/eap_notifieru.def	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,5 @@
+EXPORTS
+	?Cancel@CEapAuthNotifier@@QAEXXZ @ 1 NONAME ; void CEapAuthNotifier::Cancel(void)
+	?NewL@CEapAuthNotifier@@SAPAV1@AAVMNotificationCallback@@@Z @ 2 NONAME ; class CEapAuthNotifier * CEapAuthNotifier::NewL(class MNotificationCallback &)
+	?StartL@CEapAuthNotifier@@QAEXW4EEapNotifierType@1@PAUTEapDialogInfo@1@AAVTEapExpandedType@@@Z @ 3 NONAME ; void CEapAuthNotifier::StartL(enum CEapAuthNotifier::EEapNotifierType, struct CEapAuthNotifier::TEapDialogInfo *, class TEapExpandedType &)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/EABI/EapAuthServeru.def	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,222 @@
+EXPORTS
+	_Z18new_eap_am_stack_cP18abs_eap_am_tools_cb @ 1 NONAME
+	_ZN11EapClientIf19GetServerNameAndExeEP4TBufILi24EES2_ @ 2 NONAME
+	_ZN11EapClientIfC1Ev @ 3 NONAME
+	_ZN11EapClientIfC2Ev @ 4 NONAME
+	_ZN11EapClientIfD0Ev @ 5 NONAME
+	_ZN11EapClientIfD1Ev @ 6 NONAME
+	_ZN11EapClientIfD2Ev @ 7 NONAME
+	_ZN13CEapScheduler11ThreadStartERNS_12TServerStartE @ 8 NONAME
+	_ZN13CEapScheduler16LaunchFromClientE4TBufILi24EE @ 9 NONAME
+	_ZN13CEapScheduler4NewLEv @ 10 NONAME
+	_ZN22eap_am_stack_symbian_c11load_moduleE19eap_expanded_type_cS0_P19abs_eap_base_type_cPP15eap_base_type_cbPK19eap_am_network_id_c @ 11 NONAME
+	_ZN22eap_am_stack_symbian_c11set_partnerEP18abs_eap_am_stack_cP26abs_eap_configuration_if_c @ 12 NONAME
+	_ZN22eap_am_stack_symbian_c12cancel_timerEP20abs_eap_base_timer_cm @ 13 NONAME
+	_ZN22eap_am_stack_symbian_c12get_is_validEv @ 14 NONAME
+	_ZN22eap_am_stack_symbian_c14read_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 15 NONAME
+	_ZN22eap_am_stack_symbian_c17get_eap_type_listEP11eap_array_cI19eap_expanded_type_cE @ 16 NONAME
+	_ZN22eap_am_stack_symbian_c23check_is_valid_eap_typeE19eap_expanded_type_c @ 17 NONAME
+	_ZN22eap_am_stack_symbian_c26save_simple_config_sessionE21simple_config_state_ePK11eap_array_cI26simple_config_credential_cEPK19eap_variable_data_c34simple_config_Device_Password_ID_ePK24simple_config_payloads_c @ 18 NONAME
+	_ZN22eap_am_stack_symbian_c30get_802_11_authentication_modeEPK19eap_am_network_id_c31eapol_key_authentication_type_e @ 19 NONAME
+	_ZN22eap_am_stack_symbian_c33set_eap_database_reference_valuesEPK19eap_variable_data_c @ 20 NONAME
+	_ZN22eap_am_stack_symbian_c8shutdownEv @ 21 NONAME
+	_ZN22eap_am_stack_symbian_c9configureEPK19eap_variable_data_c @ 22 NONAME
+	_ZN22eap_am_stack_symbian_c9set_timerEP20abs_eap_base_timer_cmPvm @ 23 NONAME
+	_ZN22eap_am_stack_symbian_cC1EP18abs_eap_am_tools_cb @ 24 NONAME
+	_ZN22eap_am_stack_symbian_cC2EP18abs_eap_am_tools_cb @ 25 NONAME
+	_ZN22eap_am_stack_symbian_cD0Ev @ 26 NONAME
+	_ZN22eap_am_stack_symbian_cD1Ev @ 27 NONAME
+	_ZN22eap_am_stack_symbian_cD2Ev @ 28 NONAME
+	_ZN24eapol_key_state_string_c26get_eapol_key_state_stringE17eapol_key_state_e @ 29 NONAME
+	_ZN24eapol_key_state_string_c35get_eapol_key_handshake_type_stringE26eapol_key_handshake_type_e @ 30 NONAME
+	_ZN24eapol_key_state_string_c36get_eapol_key_descriptor_type_stringE27eapol_key_descriptor_type_e @ 31 NONAME
+	_ZN24eapol_key_state_string_c40get_eapol_key_authentication_type_stringE31eapol_key_authentication_type_e @ 32 NONAME
+	_ZN24eapol_key_state_string_cC1Ev @ 33 NONAME
+	_ZN24eapol_key_state_string_cC2Ev @ 34 NONAME
+	_ZN24eapol_key_state_string_cD0Ev @ 35 NONAME
+	_ZN24eapol_key_state_string_cD1Ev @ 36 NONAME
+	_ZN24eapol_key_state_string_cD2Ev @ 37 NONAME
+	_ZN28eap_core_server_message_if_c11load_moduleE19eap_expanded_type_cS0_P19abs_eap_base_type_cPP15eap_base_type_cbPK19eap_am_network_id_c @ 38 NONAME
+	_ZN28eap_core_server_message_if_c11packet_sendEPK19eap_am_network_id_cP18eap_buf_chain_wr_cmmm @ 39 NONAME
+	_ZN28eap_core_server_message_if_c11set_partnerEP23abs_eap_am_message_if_c @ 40 NONAME
+	_ZN28eap_core_server_message_if_c12add_rogue_apER11eap_array_cI20eap_rogue_ap_entry_cE @ 41 NONAME
+	_ZN28eap_core_server_message_if_c12cancel_timerEP20abs_eap_base_timer_cm @ 42 NONAME
+	_ZN28eap_core_server_message_if_c12get_is_validEv @ 43 NONAME
+	_ZN28eap_core_server_message_if_c12process_dataEPKvm @ 44 NONAME
+	_ZN28eap_core_server_message_if_c12send_messageEP30eap_process_tlv_message_data_c @ 45 NONAME
+	_ZN28eap_core_server_message_if_c12set_is_validEv @ 46 NONAME
+	_ZN28eap_core_server_message_if_c13timer_expiredEmPv @ 47 NONAME
+	_ZN28eap_core_server_message_if_c13unload_moduleE19eap_expanded_type_c @ 48 NONAME
+	_ZN28eap_core_server_message_if_c14read_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 49 NONAME
+	_ZN28eap_core_server_message_if_c15eap_acknowledgeEPK11eap_array_cI16eap_tlv_header_cE @ 50 NONAME
+	_ZN28eap_core_server_message_if_c15process_messageEP30eap_process_tlv_message_data_c @ 51 NONAME
+	_ZN28eap_core_server_message_if_c15write_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 52 NONAME
+	_ZN28eap_core_server_message_if_c17get_eap_type_listEP11eap_array_cI19eap_expanded_type_cE @ 53 NONAME
+	_ZN28eap_core_server_message_if_c17get_header_offsetEPmS0_ @ 54 NONAME
+	_ZN28eap_core_server_message_if_c17timer_delete_dataEmPv @ 55 NONAME
+	_ZN28eap_core_server_message_if_c18send_error_messageE12eap_status_e31eap_tlv_message_type_function_e @ 56 NONAME
+	_ZN28eap_core_server_message_if_c18state_notificationEPK28abs_eap_state_notification_c @ 57 NONAME
+	_ZN28eap_core_server_message_if_c19set_session_timeoutEm @ 58 NONAME
+	_ZN28eap_core_server_message_if_c22restart_authenticationEPK19eap_am_network_id_cbbb @ 59 NONAME
+	_ZN28eap_core_server_message_if_c23check_is_valid_eap_typeE19eap_expanded_type_c @ 60 NONAME
+	_ZN28eap_core_server_message_if_c23packet_data_crypto_keysEPK19eap_am_network_id_cPK24eap_master_session_key_c @ 61 NONAME
+	_ZN28eap_core_server_message_if_c26process_message_type_errorEPK11eap_array_cI16eap_tlv_header_cE @ 62 NONAME
+	_ZN28eap_core_server_message_if_c26save_simple_config_sessionE21simple_config_state_ePK11eap_array_cI26simple_config_credential_cEPK19eap_variable_data_c34simple_config_Device_Password_ID_ePK24simple_config_payloads_c @ 63 NONAME
+	_ZN28eap_core_server_message_if_c30get_802_11_authentication_modeEPK11eap_array_cI16eap_tlv_header_cE @ 64 NONAME
+	_ZN28eap_core_server_message_if_c33asynchronous_start_authenticationEPK19eap_am_network_id_cb @ 65 NONAME
+	_ZN28eap_core_server_message_if_c36asynchronous_init_remove_eap_sessionEPK19eap_am_network_id_c @ 66 NONAME
+	_ZN28eap_core_server_message_if_c39complete_get_802_11_authentication_modeE12eap_status_ePK19eap_am_network_id_c38eapol_key_802_11_authentication_mode_e @ 67 NONAME
+	_ZN28eap_core_server_message_if_c7eap_mtuEPK11eap_array_cI16eap_tlv_header_cE @ 68 NONAME
+	_ZN28eap_core_server_message_if_c8shutdownEv @ 69 NONAME
+	_ZN28eap_core_server_message_if_c9configureEPK19eap_variable_data_c @ 70 NONAME
+	_ZN28eap_core_server_message_if_c9set_timerEP20abs_eap_base_timer_cmPvm @ 71 NONAME
+	_ZN28eap_core_server_message_if_cC1EP18abs_eap_am_tools_cbm @ 72 NONAME
+	_ZN28eap_core_server_message_if_cC2EP18abs_eap_am_tools_cbm @ 73 NONAME
+	_ZN28eap_core_server_message_if_cD0Ev @ 74 NONAME
+	_ZN28eap_core_server_message_if_cD1Ev @ 75 NONAME
+	_ZN28eap_core_server_message_if_cD2Ev @ 76 NONAME
+	_ZN30eap_plugin_server_message_if_c11set_partnerEP23abs_eap_am_message_if_c @ 77 NONAME
+	_ZN30eap_plugin_server_message_if_c12get_is_validEv @ 78 NONAME
+	_ZN30eap_plugin_server_message_if_c12process_dataEPKvm @ 79 NONAME
+	_ZN30eap_plugin_server_message_if_c12send_messageEP30eap_process_tlv_message_data_c @ 80 NONAME
+	_ZN30eap_plugin_server_message_if_c12set_is_validEv @ 81 NONAME
+	_ZN30eap_plugin_server_message_if_c13timer_expiredEmPv @ 82 NONAME
+	_ZN30eap_plugin_server_message_if_c15process_messageEP30eap_process_tlv_message_data_c @ 83 NONAME
+	_ZN30eap_plugin_server_message_if_c17timer_delete_dataEmPv @ 84 NONAME
+	_ZN30eap_plugin_server_message_if_c18complete_invoke_uiEPK21eap_method_settings_c @ 85 NONAME
+	_ZN30eap_plugin_server_message_if_c18complete_set_indexEPK21eap_method_settings_c @ 86 NONAME
+	_ZN30eap_plugin_server_message_if_c18send_error_messageE12eap_status_e31eap_tlv_message_type_function_e @ 87 NONAME
+	_ZN30eap_plugin_server_message_if_c22complete_get_type_infoEPK21eap_method_settings_c @ 88 NONAME
+	_ZN30eap_plugin_server_message_if_c26complete_get_configurationEPK21eap_method_settings_c @ 89 NONAME
+	_ZN30eap_plugin_server_message_if_c26complete_set_configurationEPK21eap_method_settings_c @ 90 NONAME
+	_ZN30eap_plugin_server_message_if_c26process_message_type_errorEPK11eap_array_cI16eap_tlv_header_cE @ 91 NONAME
+	_ZN30eap_plugin_server_message_if_c27complete_copy_configurationEPK21eap_method_settings_c @ 92 NONAME
+	_ZN30eap_plugin_server_message_if_c29complete_delete_configurationEPK21eap_method_settings_c @ 93 NONAME
+	_ZN30eap_plugin_server_message_if_c8shutdownEv @ 94 NONAME
+	_ZN30eap_plugin_server_message_if_c9configureEPK19eap_variable_data_c @ 95 NONAME
+	_ZN30eap_plugin_server_message_if_cC1EP18abs_eap_am_tools_c @ 96 NONAME
+	_ZN30eap_plugin_server_message_if_cC2EP18abs_eap_am_tools_c @ 97 NONAME
+	_ZN30eap_plugin_server_message_if_cD0Ev @ 98 NONAME
+	_ZN30eap_plugin_server_message_if_cD1Ev @ 99 NONAME
+	_ZN30eap_plugin_server_message_if_cD2Ev @ 100 NONAME
+	_ZN40eap_general_settings_server_message_if_c11set_partnerEP23abs_eap_am_message_if_c @ 101 NONAME
+	_ZN40eap_general_settings_server_message_if_c12get_is_validEv @ 102 NONAME
+	_ZN40eap_general_settings_server_message_if_c12process_dataEPKvm @ 103 NONAME
+	_ZN40eap_general_settings_server_message_if_c12send_messageEP30eap_process_tlv_message_data_c @ 104 NONAME
+	_ZN40eap_general_settings_server_message_if_c12set_is_validEv @ 105 NONAME
+	_ZN40eap_general_settings_server_message_if_c13timer_expiredEmPv @ 106 NONAME
+	_ZN40eap_general_settings_server_message_if_c15process_messageEP30eap_process_tlv_message_data_c @ 107 NONAME
+	_ZN40eap_general_settings_server_message_if_c17timer_delete_dataEmPv @ 108 NONAME
+	_ZN40eap_general_settings_server_message_if_c18send_error_messageE12eap_status_e31eap_tlv_message_type_function_e @ 109 NONAME
+	_ZN40eap_general_settings_server_message_if_c24complete_get_eap_methodsEPK21eap_method_settings_c @ 110 NONAME
+	_ZN40eap_general_settings_server_message_if_c24complete_set_eap_methodsEPK21eap_method_settings_c @ 111 NONAME
+	_ZN40eap_general_settings_server_message_if_c26process_message_type_errorEPK11eap_array_cI16eap_tlv_header_cE @ 112 NONAME
+	_ZN40eap_general_settings_server_message_if_c30complete_get_certificate_listsEPK21eap_method_settings_c @ 113 NONAME
+	_ZN40eap_general_settings_server_message_if_c32complete_delete_all_eap_settingsEPK21eap_method_settings_c @ 114 NONAME
+	_ZN40eap_general_settings_server_message_if_c8shutdownEv @ 115 NONAME
+	_ZN40eap_general_settings_server_message_if_c9configureEPK19eap_variable_data_c @ 116 NONAME
+	_ZN40eap_general_settings_server_message_if_cC1EP18abs_eap_am_tools_c @ 117 NONAME
+	_ZN40eap_general_settings_server_message_if_cC2EP18abs_eap_am_tools_c @ 118 NONAME
+	_ZN40eap_general_settings_server_message_if_cD0Ev @ 119 NONAME
+	_ZN40eap_general_settings_server_message_if_cD1Ev @ 120 NONAME
+	_ZN40eap_general_settings_server_message_if_cD2Ev @ 121 NONAME
+	_ZTI10CEapCoreIf @ 122 NONAME
+	_ZTI10CEapServer @ 123 NONAME
+	_ZTI11CEapSession @ 124 NONAME
+	_ZTI11EapClientIf @ 125 NONAME
+	_ZTI12CEapPluginIf @ 126 NONAME
+	_ZTI13CEapScheduler @ 127 NONAME
+	_ZTI14CEapSettingsIf @ 128 NONAME
+	_ZTI17eap_loaded_type_c @ 129 NONAME
+	_ZTI19CEapDelayedShutdown @ 130 NONAME
+	_ZTI19eap_method_values_c @ 131 NONAME
+	_ZTI21eap_method_settings_c @ 132 NONAME
+	_ZTI22CEapTlsPeapCertFetcher @ 133 NONAME
+	_ZTI22eap_am_stack_symbian_c @ 134 NONAME
+	_ZTI23eap_am_plugin_symbian_c @ 135 NONAME
+	_ZTI23eap_certificate_entry_c @ 136 NONAME
+	_ZTI24CEapServerProcessHandler @ 137 NONAME
+	_ZTI24eapol_key_state_string_c @ 138 NONAME
+	_ZTI28eap_core_server_message_if_c @ 139 NONAME
+	_ZTI30eap_plugin_server_message_if_c @ 140 NONAME
+	_ZTI33eap_am_general_settings_symbian_c @ 141 NONAME
+	_ZTI40eap_general_settings_server_message_if_c @ 142 NONAME
+	_ZTV10CEapCoreIf @ 143 NONAME
+	_ZTV10CEapServer @ 144 NONAME
+	_ZTV11CEapSession @ 145 NONAME
+	_ZTV11EapClientIf @ 146 NONAME
+	_ZTV12CEapPluginIf @ 147 NONAME
+	_ZTV13CEapScheduler @ 148 NONAME
+	_ZTV14CEapSettingsIf @ 149 NONAME
+	_ZTV17eap_loaded_type_c @ 150 NONAME
+	_ZTV19CEapDelayedShutdown @ 151 NONAME
+	_ZTV19eap_method_values_c @ 152 NONAME
+	_ZTV21eap_method_settings_c @ 153 NONAME
+	_ZTV22CEapTlsPeapCertFetcher @ 154 NONAME
+	_ZTV22eap_am_stack_symbian_c @ 155 NONAME
+	_ZTV23eap_am_plugin_symbian_c @ 156 NONAME
+	_ZTV23eap_certificate_entry_c @ 157 NONAME
+	_ZTV24CEapServerProcessHandler @ 158 NONAME
+	_ZTV24eapol_key_state_string_c @ 159 NONAME
+	_ZTV28eap_core_server_message_if_c @ 160 NONAME
+	_ZTV30eap_plugin_server_message_if_c @ 161 NONAME
+	_ZTV33eap_am_general_settings_symbian_c @ 162 NONAME
+	_ZTV40eap_general_settings_server_message_if_c @ 163 NONAME
+	_ZThn12_N28eap_core_server_message_if_c39complete_get_802_11_authentication_modeE12eap_status_ePK19eap_am_network_id_c38eapol_key_802_11_authentication_mode_e @ 164 NONAME
+	_ZThn12_N28eap_core_server_message_if_cD0Ev @ 165 NONAME
+	_ZThn12_N28eap_core_server_message_if_cD1Ev @ 166 NONAME
+	_ZThn28_N22eap_am_stack_symbian_c11load_moduleE19eap_expanded_type_cS0_P19abs_eap_base_type_cPP15eap_base_type_cbPK19eap_am_network_id_c @ 167 NONAME
+	_ZThn28_N22eap_am_stack_symbian_c11set_partnerEP18abs_eap_am_stack_cP26abs_eap_configuration_if_c @ 168 NONAME
+	_ZThn28_N22eap_am_stack_symbian_c12cancel_timerEP20abs_eap_base_timer_cm @ 169 NONAME
+	_ZThn28_N22eap_am_stack_symbian_c12get_is_validEv @ 170 NONAME
+	_ZThn28_N22eap_am_stack_symbian_c14read_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 171 NONAME
+	_ZThn28_N22eap_am_stack_symbian_c17get_eap_type_listEP11eap_array_cI19eap_expanded_type_cE @ 172 NONAME
+	_ZThn28_N22eap_am_stack_symbian_c23check_is_valid_eap_typeE19eap_expanded_type_c @ 173 NONAME
+	_ZThn28_N22eap_am_stack_symbian_c30get_802_11_authentication_modeEPK19eap_am_network_id_c31eapol_key_authentication_type_e @ 174 NONAME
+	_ZThn28_N22eap_am_stack_symbian_c33set_eap_database_reference_valuesEPK19eap_variable_data_c @ 175 NONAME
+	_ZThn28_N22eap_am_stack_symbian_c8shutdownEv @ 176 NONAME
+	_ZThn28_N22eap_am_stack_symbian_c9configureEPK19eap_variable_data_c @ 177 NONAME
+	_ZThn28_N22eap_am_stack_symbian_c9set_timerEP20abs_eap_base_timer_cmPvm @ 178 NONAME
+	_ZThn28_N22eap_am_stack_symbian_cD0Ev @ 179 NONAME
+	_ZThn28_N22eap_am_stack_symbian_cD1Ev @ 180 NONAME
+	_ZThn32_N22eap_am_stack_symbian_c26save_simple_config_sessionE21simple_config_state_ePK11eap_array_cI26simple_config_credential_cEPK19eap_variable_data_c34simple_config_Device_Password_ID_ePK24simple_config_payloads_c @ 181 NONAME
+	_ZThn32_N22eap_am_stack_symbian_cD0Ev @ 182 NONAME
+	_ZThn32_N22eap_am_stack_symbian_cD1Ev @ 183 NONAME
+	_ZThn4_N28eap_core_server_message_if_c11set_partnerEP23abs_eap_am_message_if_c @ 184 NONAME
+	_ZThn4_N28eap_core_server_message_if_c12get_is_validEv @ 185 NONAME
+	_ZThn4_N28eap_core_server_message_if_c12process_dataEPKvm @ 186 NONAME
+	_ZThn4_N28eap_core_server_message_if_c8shutdownEv @ 187 NONAME
+	_ZThn4_N28eap_core_server_message_if_c9configureEPK19eap_variable_data_c @ 188 NONAME
+	_ZThn4_N28eap_core_server_message_if_cD0Ev @ 189 NONAME
+	_ZThn4_N28eap_core_server_message_if_cD1Ev @ 190 NONAME
+	_ZThn4_N30eap_plugin_server_message_if_c11set_partnerEP23abs_eap_am_message_if_c @ 191 NONAME
+	_ZThn4_N30eap_plugin_server_message_if_c12get_is_validEv @ 192 NONAME
+	_ZThn4_N30eap_plugin_server_message_if_c12process_dataEPKvm @ 193 NONAME
+	_ZThn4_N30eap_plugin_server_message_if_c8shutdownEv @ 194 NONAME
+	_ZThn4_N30eap_plugin_server_message_if_c9configureEPK19eap_variable_data_c @ 195 NONAME
+	_ZThn4_N30eap_plugin_server_message_if_cD0Ev @ 196 NONAME
+	_ZThn4_N30eap_plugin_server_message_if_cD1Ev @ 197 NONAME
+	_ZThn4_N40eap_general_settings_server_message_if_c11set_partnerEP23abs_eap_am_message_if_c @ 198 NONAME
+	_ZThn4_N40eap_general_settings_server_message_if_c12get_is_validEv @ 199 NONAME
+	_ZThn4_N40eap_general_settings_server_message_if_c12process_dataEPKvm @ 200 NONAME
+	_ZThn4_N40eap_general_settings_server_message_if_c8shutdownEv @ 201 NONAME
+	_ZThn4_N40eap_general_settings_server_message_if_c9configureEPK19eap_variable_data_c @ 202 NONAME
+	_ZThn4_N40eap_general_settings_server_message_if_cD0Ev @ 203 NONAME
+	_ZThn4_N40eap_general_settings_server_message_if_cD1Ev @ 204 NONAME
+	_ZThn8_N28eap_core_server_message_if_c13timer_expiredEmPv @ 205 NONAME
+	_ZThn8_N28eap_core_server_message_if_c17timer_delete_dataEmPv @ 206 NONAME
+	_ZThn8_N28eap_core_server_message_if_cD0Ev @ 207 NONAME
+	_ZThn8_N28eap_core_server_message_if_cD1Ev @ 208 NONAME
+	_ZThn8_N30eap_plugin_server_message_if_c13timer_expiredEmPv @ 209 NONAME
+	_ZThn8_N30eap_plugin_server_message_if_c17timer_delete_dataEmPv @ 210 NONAME
+	_ZThn8_N30eap_plugin_server_message_if_cD0Ev @ 211 NONAME
+	_ZThn8_N30eap_plugin_server_message_if_cD1Ev @ 212 NONAME
+	_ZThn8_N40eap_general_settings_server_message_if_c13timer_expiredEmPv @ 213 NONAME
+	_ZThn8_N40eap_general_settings_server_message_if_c17timer_delete_dataEmPv @ 214 NONAME
+	_ZThn8_N40eap_general_settings_server_message_if_cD0Ev @ 215 NONAME
+	_ZThn8_N40eap_general_settings_server_message_if_cD1Ev @ 216 NONAME
+	_ZTI16CEapserverBackup @ 217 NONAME
+	_ZTV16CEapserverBackup @ 218 NONAME
+	_ZN40eap_general_settings_server_message_if_c30complete_copy_all_eap_settingsEPK21eap_method_settings_c @ 219 NONAME
+	_ZN28eap_core_server_message_if_c27complete_remove_eap_sessionEbPK19eap_am_network_id_c @ 220 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/EABI/eap_notifieru.def	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,5 @@
+EXPORTS
+	_ZN16CEapAuthNotifier4NewLER21MNotificationCallback @ 1 NONAME
+	_ZN16CEapAuthNotifier6CancelEv @ 2 NONAME
+	_ZN16CEapAuthNotifier6StartLENS_16EEapNotifierTypeEPNS_14TEapDialogInfoER16TEapExpandedType @ 3 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/EABI/eapclientifu.def	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,25 @@
+EXPORTS
+	_ZN11EapClientIf19GetServerNameAndExeEP4TBufILi24EES2_ @ 1 NONAME
+	_ZN11EapClientIfC1Ev @ 2 NONAME
+	_ZN11EapClientIfC2Ev @ 3 NONAME
+	_ZN11EapClientIfD0Ev @ 4 NONAME
+	_ZN11EapClientIfD1Ev @ 5 NONAME
+	_ZN11EapClientIfD2Ev @ 6 NONAME
+	_ZN11REapSession12get_is_validEv @ 7 NONAME
+	_ZN11REapSession12process_dataE12TEapRequestsPKvm @ 8 NONAME
+	_ZN11REapSession5CloseEv @ 9 NONAME
+	_ZN11REapSession8ConnectLEP18abs_eap_am_tools_cP18MSendPacketHandler4TBufILi24EES5_PKvi12TEapRequests @ 10 NONAME
+	_ZN11REapSessionD0Ev @ 11 NONAME
+	_ZN11REapSessionD1Ev @ 12 NONAME
+	_ZN11REapSessionD2Ev @ 13 NONAME
+	_ZTI11EapClientIf @ 14 NONAME
+	_ZTI11REapSession @ 15 NONAME
+	_ZTI12CSendHandler @ 16 NONAME
+	_ZTI19CEapolPacketHandler @ 17 NONAME
+	_ZTI24CEapClientProcessHandler @ 18 NONAME
+	_ZTV11EapClientIf @ 19 NONAME
+	_ZTV11REapSession @ 20 NONAME
+	_ZTV12CSendHandler @ 21 NONAME
+	_ZTV19CEapolPacketHandler @ 22 NONAME
+	_ZTV24CEapClientProcessHandler @ 23 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/EABI/eapcoreinterfaceu.def	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,18 @@
+EXPORTS
+	_Z30new_eap_am_client_message_if_cP18abs_eap_am_tools_cbm @ 1 NONAME
+	_ZN17CEapCoreInterface11set_partnerEP23abs_eap_am_message_if_c @ 2 NONAME
+	_ZN17CEapCoreInterface12get_is_validEv @ 3 NONAME
+	_ZN17CEapCoreInterface12process_dataEPKvm @ 4 NONAME
+	_ZN17CEapCoreInterface8SendDataEPKvi @ 5 NONAME
+	_ZN17CEapCoreInterface8shutdownEv @ 6 NONAME
+	_ZN17CEapCoreInterface9ConstrucLEP18abs_eap_am_tools_c @ 7 NONAME
+	_ZN17CEapCoreInterface9configureEPK19eap_variable_data_c @ 8 NONAME
+	_ZTI17CEapCoreInterface @ 9 NONAME
+	_ZTV17CEapCoreInterface @ 10 NONAME
+	_ZThn4_N17CEapCoreInterface8SendDataEPKvi @ 11 NONAME
+	_ZThn8_N17CEapCoreInterface11set_partnerEP23abs_eap_am_message_if_c @ 12 NONAME
+	_ZThn8_N17CEapCoreInterface12get_is_validEv @ 13 NONAME
+	_ZThn8_N17CEapCoreInterface12process_dataEPKvm @ 14 NONAME
+	_ZThn8_N17CEapCoreInterface8shutdownEv @ 15 NONAME
+	_ZThn8_N17CEapCoreInterface9configureEPK19eap_variable_data_c @ 16 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/EABI/eapolprotected.def	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,564 @@
+EXPORTS
+	_ZN12eapol_core_c11associationEPK19eap_am_network_id_c31eapol_key_authentication_type_ePK19eap_variable_data_cS6_N23eapol_RSNA_key_header_c19eapol_RSNA_cipher_eES8_S6_ @ 1 NONAME
+	_ZN12eapol_core_c11load_moduleE19eap_expanded_type_cS0_P19abs_eap_base_type_cPP15eap_base_type_cbPK19eap_am_network_id_c @ 2 NONAME
+	_ZN12eapol_core_c11packet_sendEPK19eap_am_network_id_cP18eap_buf_chain_wr_cmmm @ 3 NONAME
+	_ZN12eapol_core_c11send_logoffEPK19eap_am_network_id_c @ 4 NONAME
+	_ZN12eapol_core_c12add_rogue_apER11eap_array_cI20eap_rogue_ap_entry_cE @ 5 NONAME
+	_ZN12eapol_core_c12cancel_timerEP20abs_eap_base_timer_cm @ 6 NONAME
+	_ZN12eapol_core_c12create_stateEPK19eap_am_network_id_c31eapol_key_authentication_type_e @ 7 NONAME
+	_ZN12eapol_core_c12get_is_validEv @ 8 NONAME
+	_ZN12eapol_core_c12set_is_validEv @ 9 NONAME
+	_ZN12eapol_core_c13timer_expiredEmPv @ 10 NONAME
+	_ZN12eapol_core_c13unload_moduleE19eap_expanded_type_c @ 11 NONAME
+	_ZN12eapol_core_c14disassociationEPK19eap_am_network_id_c @ 12 NONAME
+	_ZN12eapol_core_c14packet_processEPK19eap_am_network_id_cP25eap_general_header_base_cm @ 13 NONAME
+	_ZN12eapol_core_c14read_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 14 NONAME
+	_ZN12eapol_core_c15eap_acknowledgeEPK19eap_am_network_id_c @ 15 NONAME
+	_ZN12eapol_core_c15write_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 16 NONAME
+	_ZN12eapol_core_c16tkip_mic_failureEPK19eap_am_network_id_cbN23eapol_RSNA_key_header_c29eapol_tkip_mic_failure_type_eE @ 17 NONAME
+	_ZN12eapol_core_c17check_pmksa_cacheEP11eap_array_cI19eap_am_network_id_cE31eapol_key_authentication_type_eN23eapol_RSNA_key_header_c19eapol_RSNA_cipher_eES6_ @ 18 NONAME
+	_ZN12eapol_core_c17get_eap_type_listEP11eap_array_cI19eap_expanded_type_cE @ 19 NONAME
+	_ZN12eapol_core_c17get_header_offsetEPmS0_ @ 20 NONAME
+	_ZN12eapol_core_c17timer_delete_dataEmPv @ 21 NONAME
+	_ZN12eapol_core_c18shutdown_operationEP17eapol_key_state_cP18abs_eap_am_tools_c @ 22 NONAME
+	_ZN12eapol_core_c18state_notificationEPK28abs_eap_state_notification_c @ 23 NONAME
+	_ZN12eapol_core_c19set_session_timeoutEm @ 24 NONAME
+	_ZN12eapol_core_c19start_reassociationEPK19eap_am_network_id_c31eapol_key_authentication_type_ePK19eap_variable_data_c @ 25 NONAME
+	_ZN12eapol_core_c22remove_eapol_key_stateEPK19eap_am_network_id_c @ 26 NONAME
+	_ZN12eapol_core_c22restart_authenticationEPK19eap_am_network_id_cbbb @ 27 NONAME
+	_ZN12eapol_core_c23check_is_valid_eap_typeE19eap_expanded_type_c @ 28 NONAME
+	_ZN12eapol_core_c23packet_data_crypto_keysEPK19eap_am_network_id_cPK24eap_master_session_key_c @ 29 NONAME
+	_ZN12eapol_core_c23packet_data_session_keyEPK19eap_am_network_id_cPK19eapol_session_key_c @ 30 NONAME
+	_ZN12eapol_core_c23remove_pmksa_from_cacheEPK19eap_am_network_id_c @ 31 NONAME
+	_ZN12eapol_core_c23start_preauthenticationEPK19eap_am_network_id_c31eapol_key_authentication_type_e @ 32 NONAME
+	_ZN12eapol_core_c24start_WPXM_reassociationEPK19eap_am_network_id_c31eapol_key_authentication_type_eP19eap_variable_data_c @ 33 NONAME
+	_ZN12eapol_core_c26save_simple_config_sessionE21simple_config_state_ePK11eap_array_cI26simple_config_credential_cEPK19eap_variable_data_c34simple_config_Device_Password_ID_ePK24simple_config_payloads_c @ 34 NONAME
+	_ZN12eapol_core_c27complete_WPXM_reassociationE33eapol_wlan_authentication_state_ePK19eap_am_network_id_c31eapol_key_authentication_type_ePK19eap_variable_data_c @ 35 NONAME
+	_ZN12eapol_core_c29cancel_authentication_sessionEP17eapol_key_state_cP18abs_eap_am_tools_c @ 36 NONAME
+	_ZN12eapol_core_c30get_802_11_authentication_modeEPK19eap_am_network_id_c31eapol_key_authentication_type_e @ 37 NONAME
+	_ZN12eapol_core_c33asynchronous_start_authenticationEPK19eap_am_network_id_cb @ 38 NONAME
+	_ZN12eapol_core_c33set_eap_database_reference_valuesEPK19eap_variable_data_c @ 39 NONAME
+	_ZN12eapol_core_c34cancel_all_authentication_sessionsEv @ 40 NONAME
+	_ZN12eapol_core_c36asynchronous_init_remove_eap_sessionEPK19eap_am_network_id_c @ 41 NONAME
+	_ZN12eapol_core_c36get_and_increment_global_key_counterEP19eap_variable_data_c @ 42 NONAME
+	_ZN12eapol_core_c36init_eapol_key_pmksa_caching_timeoutEPK19eap_am_network_id_c @ 43 NONAME
+	_ZN12eapol_core_c39complete_get_802_11_authentication_modeE12eap_status_ePK19eap_am_network_id_c38eapol_key_802_11_authentication_mode_e @ 44 NONAME
+	_ZN12eapol_core_c51indicate_eapol_key_state_started_eap_authenticationEPK19eap_am_network_id_c @ 45 NONAME
+	_ZN12eapol_core_c8shutdownEv @ 46 NONAME
+	_ZN12eapol_core_c9configureEv @ 47 NONAME
+	_ZN12eapol_core_c9set_timerEP20abs_eap_base_timer_cmPvm @ 48 NONAME
+	_ZN12eapol_core_cC1EP18abs_eap_am_tools_cP16abs_eapol_core_cb @ 49 NONAME
+	_ZN12eapol_core_cC2EP18abs_eap_am_tools_cP16abs_eapol_core_cb @ 50 NONAME
+	_ZN12eapol_core_cD0Ev @ 51 NONAME
+	_ZN12eapol_core_cD1Ev @ 52 NONAME
+	_ZN12eapol_core_cD2Ev @ 53 NONAME
+	_ZN15ethernet_core_c11associationEPK19eap_am_network_id_c31eapol_key_authentication_type_ePK19eap_variable_data_cS6_N23eapol_RSNA_key_header_c19eapol_RSNA_cipher_eES8_S6_ @ 54 NONAME
+	_ZN15ethernet_core_c11load_moduleE19eap_expanded_type_cS0_P19abs_eap_base_type_cPP15eap_base_type_cbPK19eap_am_network_id_c @ 55 NONAME
+	_ZN15ethernet_core_c11packet_sendEPK19eap_am_network_id_cP18eap_buf_chain_wr_cmmm @ 56 NONAME
+	_ZN15ethernet_core_c11send_logoffEPK19eap_am_network_id_c @ 57 NONAME
+	_ZN15ethernet_core_c12add_rogue_apER11eap_array_cI20eap_rogue_ap_entry_cE @ 58 NONAME
+	_ZN15ethernet_core_c12cancel_timerEP20abs_eap_base_timer_cm @ 59 NONAME
+	_ZN15ethernet_core_c12create_stateEPK19eap_am_network_id_c31eapol_key_authentication_type_e @ 60 NONAME
+	_ZN15ethernet_core_c12get_is_validEv @ 61 NONAME
+	_ZN15ethernet_core_c12set_is_validEv @ 62 NONAME
+	_ZN15ethernet_core_c13unload_moduleE19eap_expanded_type_c @ 63 NONAME
+	_ZN15ethernet_core_c14disassociationEPK19eap_am_network_id_c @ 64 NONAME
+	_ZN15ethernet_core_c14packet_processEPK19eap_am_network_id_cP25eap_general_header_base_cm @ 65 NONAME
+	_ZN15ethernet_core_c14read_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 66 NONAME
+	_ZN15ethernet_core_c15eap_acknowledgeEPK19eap_am_network_id_c @ 67 NONAME
+	_ZN15ethernet_core_c15write_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 68 NONAME
+	_ZN15ethernet_core_c16tkip_mic_failureEPK19eap_am_network_id_cbN23eapol_RSNA_key_header_c29eapol_tkip_mic_failure_type_eE @ 69 NONAME
+	_ZN15ethernet_core_c17cancel_all_timersEv @ 70 NONAME
+	_ZN15ethernet_core_c17check_pmksa_cacheEP11eap_array_cI19eap_am_network_id_cE31eapol_key_authentication_type_eN23eapol_RSNA_key_header_c19eapol_RSNA_cipher_eES6_ @ 71 NONAME
+	_ZN15ethernet_core_c17get_eap_type_listEP11eap_array_cI19eap_expanded_type_cE @ 72 NONAME
+	_ZN15ethernet_core_c17get_header_offsetEPmS0_ @ 73 NONAME
+	_ZN15ethernet_core_c18state_notificationEPK28abs_eap_state_notification_c @ 74 NONAME
+	_ZN15ethernet_core_c19start_reassociationEPK19eap_am_network_id_c31eapol_key_authentication_type_ePK19eap_variable_data_c @ 75 NONAME
+	_ZN15ethernet_core_c20start_authenticationEPK19eap_am_network_id_cb @ 76 NONAME
+	_ZN15ethernet_core_c23check_is_valid_eap_typeE19eap_expanded_type_c @ 77 NONAME
+	_ZN15ethernet_core_c23packet_data_session_keyEPK19eap_am_network_id_cPK19eapol_session_key_c @ 78 NONAME
+	_ZN15ethernet_core_c23remove_pmksa_from_cacheEPK19eap_am_network_id_c @ 79 NONAME
+	_ZN15ethernet_core_c23start_preauthenticationEPK19eap_am_network_id_c31eapol_key_authentication_type_e @ 80 NONAME
+	_ZN15ethernet_core_c24start_WPXM_reassociationEPK19eap_am_network_id_c31eapol_key_authentication_type_eP19eap_variable_data_c @ 81 NONAME
+	_ZN15ethernet_core_c26complete_check_pmksa_cacheEPK11eap_array_cI19eap_am_network_id_cE @ 82 NONAME
+	_ZN15ethernet_core_c26save_simple_config_sessionE21simple_config_state_ePK11eap_array_cI26simple_config_credential_cEPK19eap_variable_data_c34simple_config_Device_Password_ID_ePK24simple_config_payloads_c @ 83 NONAME
+	_ZN15ethernet_core_c27complete_WPXM_reassociationE33eapol_wlan_authentication_state_ePK19eap_am_network_id_c31eapol_key_authentication_type_ePK19eap_variable_data_c @ 84 NONAME
+	_ZN15ethernet_core_c30get_802_11_authentication_modeEPK19eap_am_network_id_c31eapol_key_authentication_type_e @ 85 NONAME
+	_ZN15ethernet_core_c33set_eap_database_reference_valuesEPK19eap_variable_data_c @ 86 NONAME
+	_ZN15ethernet_core_c34cancel_all_authentication_sessionsEv @ 87 NONAME
+	_ZN15ethernet_core_c39complete_get_802_11_authentication_modeE12eap_status_ePK19eap_am_network_id_c38eapol_key_802_11_authentication_mode_e @ 88 NONAME
+	_ZN15ethernet_core_c8shutdownEv @ 89 NONAME
+	_ZN15ethernet_core_c9configureEv @ 90 NONAME
+	_ZN15ethernet_core_c9load_typeE19eap_expanded_type_c @ 91 NONAME
+	_ZN15ethernet_core_c9set_timerEP20abs_eap_base_timer_cmPvm @ 92 NONAME
+	_ZN15ethernet_core_cC1EP18abs_eap_am_tools_cP19abs_ethernet_core_cb @ 93 NONAME
+	_ZN15ethernet_core_cC2EP18abs_eap_am_tools_cP19abs_ethernet_core_cb @ 94 NONAME
+	_ZN15ethernet_core_cD0Ev @ 95 NONAME
+	_ZN15ethernet_core_cD1Ev @ 96 NONAME
+	_ZN15ethernet_core_cD2Ev @ 97 NONAME
+	_ZN17eapol_key_state_c10get_ANonceEv @ 98 NONAME
+	_ZN17eapol_key_state_c10get_SNonceEv @ 99 NONAME
+	_ZN17eapol_key_state_c10get_is_WPAEv @ 100 NONAME
+	_ZN17eapol_key_state_c10initializeEPK19eap_am_network_id_c31eapol_key_authentication_type_e @ 101 NONAME
+	_ZN17eapol_key_state_c10initializeEPK19eap_am_network_id_c31eapol_key_authentication_type_ePK19eap_variable_data_cS6_N23eapol_RSNA_key_header_c19eapol_RSNA_cipher_eES8_S6_ @ 102 NONAME
+	_ZN17eapol_key_state_c11get_is_RSNAEv @ 103 NONAME
+	_ZN17eapol_key_state_c11get_is_WPXMEv @ 104 NONAME
+	_ZN17eapol_key_state_c11packet_sendEPK19eap_am_network_id_cP18eap_buf_chain_wr_cmmm @ 105 NONAME
+	_ZN17eapol_key_state_c11set_s_nonceEPK19eap_variable_data_c @ 106 NONAME
+	_ZN17eapol_key_state_c12get_is_validEv @ 107 NONAME
+	_ZN17eapol_key_state_c12set_is_validEv @ 108 NONAME
+	_ZN17eapol_key_state_c13resend_packetEPK19eap_am_network_id_cP18eap_buf_chain_wr_cmmm @ 109 NONAME
+	_ZN17eapol_key_state_c13timer_expiredEmPv @ 110 NONAME
+	_ZN17eapol_key_state_c15save_parametersE31eapol_key_authentication_type_ePK19eap_variable_data_cS3_N23eapol_RSNA_key_header_c19eapol_RSNA_cipher_eES5_ @ 111 NONAME
+	_ZN17eapol_key_state_c16set_pairwise_PMKEPK19eap_variable_data_cPK19eap_am_network_id_c @ 112 NONAME
+	_ZN17eapol_key_state_c16tkip_mic_failureEbN23eapol_RSNA_key_header_c29eapol_tkip_mic_failure_type_eE @ 113 NONAME
+	_ZN17eapol_key_state_c17check_pmksa_cacheE31eapol_key_authentication_type_eN23eapol_RSNA_key_header_c19eapol_RSNA_cipher_eES2_ @ 114 NONAME
+	_ZN17eapol_key_state_c17get_is_associatedEv @ 115 NONAME
+	_ZN17eapol_key_state_c17timer_delete_dataEmPv @ 116 NONAME
+	_ZN17eapol_key_state_c18add_RSN_IE_payloadEPK23eapol_RSNA_key_header_cP19eap_variable_data_cPm @ 117 NONAME
+	_ZN17eapol_key_state_c18get_encryption_KEKEv @ 118 NONAME
+	_ZN17eapol_key_state_c18get_marked_removedEv @ 119 NONAME
+	_ZN17eapol_key_state_c18get_received_PMKIDEv @ 120 NONAME
+	_ZN17eapol_key_state_c18reset_cached_pmksaEv @ 121 NONAME
+	_ZN17eapol_key_state_c18set_marked_removedEv @ 122 NONAME
+	_ZN17eapol_key_state_c19add_RSN_GTK_payloadEPK23eapol_RSNA_key_header_cP19eap_variable_data_cPm @ 123 NONAME
+	_ZN17eapol_key_state_c19init_retransmissionEPK19eap_am_network_id_cP18eap_buf_chain_wr_cmm16eap_code_value_eh19eap_expanded_type_c @ 124 NONAME
+	_ZN17eapol_key_state_c19set_WPXM_parametersEPK19eap_am_network_id_c @ 125 NONAME
+	_ZN17eapol_key_state_c19set_eapol_key_stateE17eapol_key_state_e @ 126 NONAME
+	_ZN17eapol_key_state_c20get_confirmation_KCKEv @ 127 NONAME
+	_ZN17eapol_key_state_c20get_is_encryption_onEv @ 128 NONAME
+	_ZN17eapol_key_state_c20unset_marked_removedEv @ 129 NONAME
+	_ZN17eapol_key_state_c20verify_field_is_zeroEPKhm @ 130 NONAME
+	_ZN17eapol_key_state_c21cancel_retransmissionEv @ 131 NONAME
+	_ZN17eapol_key_state_c21get_key_reply_counterEv @ 132 NONAME
+	_ZN17eapol_key_state_c21set_key_reply_counterEy @ 133 NONAME
+	_ZN17eapol_key_state_c22get_supplicant_RSNA_IEEv @ 134 NONAME
+	_ZN17eapol_key_state_c22init_handshake_timeoutEm @ 135 NONAME
+	_ZN17eapol_key_state_c23process_eapol_key_frameEPK19eap_am_network_id_cP25eap_general_header_base_cm @ 136 NONAME
+	_ZN17eapol_key_state_c23trace_eapol_key_messageEPKcP23eapol_RSNA_key_header_c @ 137 NONAME
+	_ZN17eapol_key_state_c24cancel_handshake_timeoutEv @ 138 NONAME
+	_ZN17eapol_key_state_c24start_WPXM_reassociationEPK19eap_am_network_id_c31eapol_key_authentication_type_eP19eap_variable_data_c @ 139 NONAME
+	_ZN17eapol_key_state_c25get_authenticator_RSNA_IEEv @ 140 NONAME
+	_ZN17eapol_key_state_c26get_supplicant_MAC_addressEv @ 141 NONAME
+	_ZN17eapol_key_state_c26increase_key_reply_counterEv @ 142 NONAME
+	_ZN17eapol_key_state_c26init_pmksa_caching_timeoutEv @ 143 NONAME
+	_ZN17eapol_key_state_c26started_eap_authenticationEv @ 144 NONAME
+	_ZN17eapol_key_state_c27complete_WPXM_reassociationE33eapol_wlan_authentication_state_ePK19eap_am_network_id_c31eapol_key_authentication_type_ePK19eap_variable_data_c @ 145 NONAME
+	_ZN17eapol_key_state_c28cancel_pmksa_caching_timeoutEv @ 146 NONAME
+	_ZN17eapol_key_state_c28initialize_preauthenticationEPK19eap_am_network_id_c31eapol_key_authentication_type_e @ 147 NONAME
+	_ZN17eapol_key_state_c29cancel_authentication_sessionEv @ 148 NONAME
+	_ZN17eapol_key_state_c29get_authenticator_MAC_addressEv @ 149 NONAME
+	_ZN17eapol_key_state_c29init_group_key_update_timeoutEm @ 150 NONAME
+	_ZN17eapol_key_state_c29read_reassociation_parametersEPK19eap_am_network_id_c31eapol_key_authentication_type_eP19eap_variable_data_cPKS4_S7_ @ 151 NONAME
+	_ZN17eapol_key_state_c31cancel_group_key_update_timeoutEv @ 152 NONAME
+	_ZN17eapol_key_state_c31object_decrease_reference_countEv @ 153 NONAME
+	_ZN17eapol_key_state_c31object_increase_reference_countEv @ 154 NONAME
+	_ZN17eapol_key_state_c32get_unicast_cipher_suite_RSNA_IEEv @ 155 NONAME
+	_ZN17eapol_key_state_c33get_client_send_key_reply_counterEv @ 156 NONAME
+	_ZN17eapol_key_state_c33set_client_send_key_reply_counterEy @ 157 NONAME
+	_ZN17eapol_key_state_c38increase_client_send_key_reply_counterEv @ 158 NONAME
+	_ZN17eapol_key_state_c40asynchronous_init_remove_eapol_key_stateEv @ 159 NONAME
+	_ZN17eapol_key_state_c4copyEPK19eap_am_network_id_c @ 160 NONAME
+	_ZN17eapol_key_state_c5resetEv @ 161 NONAME
+	_ZN17eapol_key_state_c8shutdownEv @ 162 NONAME
+	_ZN17eapol_key_state_c9configureEv @ 163 NONAME
+	_ZN17eapol_key_state_cC1EP18abs_eap_am_tools_cP21abs_eapol_key_state_cP16abs_eapol_core_cbPK19eap_am_network_id_c31eapol_key_authentication_type_e @ 164 NONAME
+	_ZN17eapol_key_state_cC1EP18abs_eap_am_tools_cP21abs_eapol_key_state_cP16abs_eapol_core_cbPK19eap_am_network_id_c31eapol_key_authentication_type_ePK19eap_variable_data_cSC_N23eapol_RSNA_key_header_c19eapol_RSNA_cipher_eESE_SC_ @ 165 NONAME
+	_ZN17eapol_key_state_cC2EP18abs_eap_am_tools_cP21abs_eapol_key_state_cP16abs_eapol_core_cbPK19eap_am_network_id_c31eapol_key_authentication_type_e @ 166 NONAME
+	_ZN17eapol_key_state_cC2EP18abs_eap_am_tools_cP21abs_eapol_key_state_cP16abs_eapol_core_cbPK19eap_am_network_id_c31eapol_key_authentication_type_ePK19eap_variable_data_cSC_N23eapol_RSNA_key_header_c19eapol_RSNA_cipher_eESE_SC_ @ 167 NONAME
+	_ZN17eapol_key_state_cD0Ev @ 168 NONAME
+	_ZN17eapol_key_state_cD1Ev @ 169 NONAME
+	_ZN17eapol_key_state_cD2Ev @ 170 NONAME
+	_ZN22eapol_RC4_key_header_c10get_key_IVEv @ 171 NONAME
+	_ZN22eapol_RC4_key_header_c12set_key_flagE21eapol_RC4_key_flags_e @ 172 NONAME
+	_ZN22eapol_RC4_key_header_c13set_key_indexEh @ 173 NONAME
+	_ZN22eapol_RC4_key_header_c14set_key_lengthEt @ 174 NONAME
+	_ZN22eapol_RC4_key_header_c17get_header_lengthEv @ 175 NONAME
+	_ZN22eapol_RC4_key_header_c18get_replay_counterEv @ 176 NONAME
+	_ZN22eapol_RC4_key_header_c18zero_key_signatureEP18abs_eap_am_tools_c @ 177 NONAME
+	_ZN22eapol_RC4_key_header_c21set_eapol_packet_typeE19eapol_packet_type_e @ 178 NONAME
+	_ZN22eapol_RC4_key_header_c23set_key_descriptor_typeE27eapol_key_descriptor_type_e @ 179 NONAME
+	_ZN22eapol_RC4_key_header_c26set_eapol_protocol_versionE24eapol_protocol_version_e @ 180 NONAME
+	_ZN22eapol_RC4_key_header_c28set_eapol_packet_body_lengthEt @ 181 NONAME
+	_ZN22eapol_RC4_key_header_cC1EP18abs_eap_am_tools_cPvm @ 182 NONAME
+	_ZN22eapol_RC4_key_header_cC2EP18abs_eap_am_tools_cPvm @ 183 NONAME
+	_ZN22eapol_RC4_key_header_cD0Ev @ 184 NONAME
+	_ZN22eapol_RC4_key_header_cD1Ev @ 185 NONAME
+	_ZN22eapol_RC4_key_header_cD2Ev @ 186 NONAME
+	_ZN23eapol_RSNA_key_header_c11set_bits_onEttmm @ 187 NONAME
+	_ZN23eapol_RSNA_key_header_c12reset_headerEh31eapol_key_authentication_type_eNS_19eapol_RSNA_cipher_eEybbbbbbbbb24eapol_protocol_version_e27eapol_key_descriptor_type_e @ 188 NONAME
+	_ZN23eapol_RSNA_key_header_c12zero_key_MICEP18abs_eap_am_tools_c @ 189 NONAME
+	_ZN23eapol_RSNA_key_header_c12zero_key_RSCEP18abs_eap_am_tools_c @ 190 NONAME
+	_ZN23eapol_RSNA_key_header_c14set_key_lengthEt @ 191 NONAME
+	_ZN23eapol_RSNA_key_header_c14zero_key_NONCEEP18abs_eap_am_tools_c @ 192 NONAME
+	_ZN23eapol_RSNA_key_header_c17get_header_lengthEv @ 193 NONAME
+	_ZN23eapol_RSNA_key_header_c17zero_EAPOL_key_IVEP18abs_eap_am_tools_c @ 194 NONAME
+	_ZN23eapol_RSNA_key_header_c17zero_key_reservedEP18abs_eap_am_tools_c @ 195 NONAME
+	_ZN23eapol_RSNA_key_header_c19set_key_data_lengthEt @ 196 NONAME
+	_ZN23eapol_RSNA_key_header_c19set_key_informationEt @ 197 NONAME
+	_ZN23eapol_RSNA_key_header_c21set_eapol_packet_typeE19eapol_packet_type_e @ 198 NONAME
+	_ZN23eapol_RSNA_key_header_c22set_key_replay_counterEy @ 199 NONAME
+	_ZN23eapol_RSNA_key_header_c23set_key_descriptor_typeE27eapol_key_descriptor_type_e @ 200 NONAME
+	_ZN23eapol_RSNA_key_header_c24zero_key_STA_MAC_addressEP18abs_eap_am_tools_c @ 201 NONAME
+	_ZN23eapol_RSNA_key_header_c25set_key_information_errorEb @ 202 NONAME
+	_ZN23eapol_RSNA_key_header_c26set_eapol_protocol_versionE24eapol_protocol_version_e @ 203 NONAME
+	_ZN23eapol_RSNA_key_header_c26set_key_information_secureEb @ 204 NONAME
+	_ZN23eapol_RSNA_key_header_c27set_key_information_installEb @ 205 NONAME
+	_ZN23eapol_RSNA_key_header_c27set_key_information_key_MICEb @ 206 NONAME
+	_ZN23eapol_RSNA_key_header_c27set_key_information_key_ackEb @ 207 NONAME
+	_ZN23eapol_RSNA_key_header_c27set_key_information_requestEb @ 208 NONAME
+	_ZN23eapol_RSNA_key_header_c28set_eapol_packet_body_lengthEm @ 209 NONAME
+	_ZN23eapol_RSNA_key_header_c28set_key_information_key_typeEb @ 210 NONAME
+	_ZN23eapol_RSNA_key_header_c29set_key_information_key_indexEh @ 211 NONAME
+	_ZN23eapol_RSNA_key_header_c36zero_EAPOL_header_and_Key_descriptorEP18abs_eap_am_tools_c @ 212 NONAME
+	_ZN23eapol_RSNA_key_header_c38set_key_information_encrypted_key_dataEb @ 213 NONAME
+	_ZN23eapol_RSNA_key_header_c42set_key_information_key_descriptor_versionEh @ 214 NONAME
+	_ZN23eapol_RSNA_key_header_cC1EP18abs_eap_am_tools_cbbPvm @ 215 NONAME
+	_ZN23eapol_RSNA_key_header_cC2EP18abs_eap_am_tools_cbbPvm @ 216 NONAME
+	_ZN23eapol_RSNA_key_header_cD0Ev @ 217 NONAME
+	_ZN23eapol_RSNA_key_header_cD1Ev @ 218 NONAME
+	_ZN23eapol_RSNA_key_header_cD2Ev @ 219 NONAME
+	_ZN24eapol_key_state_string_cC1Ev @ 220 NONAME
+	_ZN24eapol_key_state_string_cC2Ev @ 221 NONAME
+	_ZN24eapol_key_state_string_cD0Ev @ 222 NONAME
+	_ZN24eapol_key_state_string_cD1Ev @ 223 NONAME
+	_ZN24eapol_key_state_string_cD2Ev @ 224 NONAME
+	_ZN26eapol_rsna_variable_data_c10set_bufferEPK28eapol_rsna_key_data_header_cPhmbb @ 225 NONAME
+	_ZN26eapol_rsna_variable_data_cC1EP18abs_eap_am_tools_cbb @ 226 NONAME
+	_ZN26eapol_rsna_variable_data_cC2EP18abs_eap_am_tools_cbb @ 227 NONAME
+	_ZN26eapol_rsna_variable_data_cD0Ev @ 228 NONAME
+	_ZN26eapol_rsna_variable_data_cD1Ev @ 229 NONAME
+	_ZN26eapol_rsna_variable_data_cD2Ev @ 230 NONAME
+	_ZN27eapol_wlan_authentication_c11load_moduleE19eap_expanded_type_cS0_P19abs_eap_base_type_cPP15eap_base_type_cbPK19eap_am_network_id_c @ 231 NONAME
+	_ZN27eapol_wlan_authentication_c11packet_sendEPK19eap_am_network_id_cP18eap_buf_chain_wr_cmmm @ 232 NONAME
+	_ZN27eapol_wlan_authentication_c12add_rogue_apER11eap_array_cI20eap_rogue_ap_entry_cE @ 233 NONAME
+	_ZN27eapol_wlan_authentication_c12cancel_timerEP20abs_eap_base_timer_cm @ 234 NONAME
+	_ZN27eapol_wlan_authentication_c12get_is_validEv @ 235 NONAME
+	_ZN27eapol_wlan_authentication_c12set_is_validEv @ 236 NONAME
+	_ZN27eapol_wlan_authentication_c13get_is_clientEv @ 237 NONAME
+	_ZN27eapol_wlan_authentication_c13timer_expiredEmPv @ 238 NONAME
+	_ZN27eapol_wlan_authentication_c13unload_moduleE19eap_expanded_type_c @ 239 NONAME
+	_ZN27eapol_wlan_authentication_c14disassociationEPK19eap_am_network_id_c @ 240 NONAME
+	_ZN27eapol_wlan_authentication_c14packet_processEPK19eap_am_network_id_cP25eap_general_header_base_cm @ 241 NONAME
+	_ZN27eapol_wlan_authentication_c14read_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 242 NONAME
+	_ZN27eapol_wlan_authentication_c15eap_acknowledgeEPK19eap_am_network_id_c @ 243 NONAME
+	_ZN27eapol_wlan_authentication_c15write_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 244 NONAME
+	_ZN27eapol_wlan_authentication_c16eapol_indicationEPK19eap_am_network_id_c33eapol_wlan_authentication_state_e @ 245 NONAME
+	_ZN27eapol_wlan_authentication_c16tkip_mic_failureEPK19eap_am_network_id_cbN23eapol_RSNA_key_header_c29eapol_tkip_mic_failure_type_eE @ 246 NONAME
+	_ZN27eapol_wlan_authentication_c17cancel_all_timersEv @ 247 NONAME
+	_ZN27eapol_wlan_authentication_c17check_pmksa_cacheEP11eap_array_cI19eap_am_network_id_cE31eapol_key_authentication_type_eN23eapol_RSNA_key_header_c19eapol_RSNA_cipher_eES6_ @ 248 NONAME
+	_ZN27eapol_wlan_authentication_c17get_eap_type_listEP11eap_array_cI19eap_expanded_type_cE @ 249 NONAME
+	_ZN27eapol_wlan_authentication_c17get_header_offsetEPmS0_ @ 250 NONAME
+	_ZN27eapol_wlan_authentication_c17timer_delete_dataEmPv @ 251 NONAME
+	_ZN27eapol_wlan_authentication_c18create_upper_stackEv @ 252 NONAME
+	_ZN27eapol_wlan_authentication_c18state_notificationEPK28abs_eap_state_notification_c @ 253 NONAME
+	_ZN27eapol_wlan_authentication_c19start_reassociationEPK19eap_am_network_id_cS2_31eapol_key_authentication_type_e @ 254 NONAME
+	_ZN27eapol_wlan_authentication_c20complete_associationE33eapol_wlan_authentication_state_ePK19eap_am_network_id_cPK19eap_variable_data_cS6_N23eapol_RSNA_key_header_c19eapol_RSNA_cipher_eES8_ @ 255 NONAME
+	_ZN27eapol_wlan_authentication_c20start_authenticationEPK19eap_variable_data_c31eapol_key_authentication_type_eS2_bPK19eap_am_network_id_c @ 256 NONAME
+	_ZN27eapol_wlan_authentication_c21get_current_eap_indexEv @ 257 NONAME
+	_ZN27eapol_wlan_authentication_c21set_current_eap_indexEm @ 258 NONAME
+	_ZN27eapol_wlan_authentication_c22complete_reassociationE33eapol_wlan_authentication_state_ePK19eap_am_network_id_cPK19eap_variable_data_cS6_N23eapol_RSNA_key_header_c19eapol_RSNA_cipher_eES8_ @ 259 NONAME
+	_ZN27eapol_wlan_authentication_c23check_is_valid_eap_typeE19eap_expanded_type_c @ 260 NONAME
+	_ZN27eapol_wlan_authentication_c23packet_data_session_keyEPK19eap_am_network_id_cPK19eapol_session_key_c @ 261 NONAME
+	_ZN27eapol_wlan_authentication_c23start_preauthenticationEPK19eap_am_network_id_c @ 262 NONAME
+	_ZN27eapol_wlan_authentication_c24start_WPXM_reassociationEPK19eap_am_network_id_cS2_P19eap_variable_data_cPKS3_S6_ @ 263 NONAME
+	_ZN27eapol_wlan_authentication_c26complete_check_pmksa_cacheEPK11eap_array_cI19eap_am_network_id_cE @ 264 NONAME
+	_ZN27eapol_wlan_authentication_c26get_authentication_counterEv @ 265 NONAME
+	_ZN27eapol_wlan_authentication_c26save_simple_config_sessionE21simple_config_state_ePK11eap_array_cI26simple_config_credential_cEPK19eap_variable_data_c34simple_config_Device_Password_ID_ePK24simple_config_payloads_c @ 266 NONAME
+	_ZN27eapol_wlan_authentication_c27complete_WPXM_reassociationE33eapol_wlan_authentication_state_ePK19eap_am_network_id_cPK19eap_variable_data_c @ 267 NONAME
+	_ZN27eapol_wlan_authentication_c29new_eapol_wlan_authenticationEP18abs_eap_am_tools_cP31abs_eapol_wlan_authentication_cb @ 268 NONAME
+	_ZN27eapol_wlan_authentication_c32increment_authentication_counterEv @ 269 NONAME
+	_ZN27eapol_wlan_authentication_c33set_eap_database_reference_valuesEPK19eap_variable_data_c @ 270 NONAME
+	_ZN27eapol_wlan_authentication_c39complete_get_802_11_authentication_modeE12eap_status_ePK19eap_am_network_id_c38eapol_key_802_11_authentication_mode_e @ 271 NONAME
+	_ZN27eapol_wlan_authentication_c8shutdownEv @ 272 NONAME
+	_ZN27eapol_wlan_authentication_c9configureEv @ 273 NONAME
+	_ZN27eapol_wlan_authentication_c9set_timerEP20abs_eap_base_timer_cmPvm @ 274 NONAME
+	_ZN27eapol_wlan_authentication_cC1EP18abs_eap_am_tools_cP31abs_eapol_wlan_authentication_cP30eapol_am_wlan_authentication_cb @ 275 NONAME
+	_ZN27eapol_wlan_authentication_cC2EP18abs_eap_am_tools_cP31abs_eapol_wlan_authentication_cP30eapol_am_wlan_authentication_cb @ 276 NONAME
+	_ZN27eapol_wlan_authentication_cD0Ev @ 277 NONAME
+	_ZN27eapol_wlan_authentication_cD1Ev @ 278 NONAME
+	_ZN27eapol_wlan_authentication_cD2Ev @ 279 NONAME
+	_ZN28eap_core_client_message_if_c12get_is_validEv @ 280 NONAME
+	_ZN28eap_core_client_message_if_c12set_is_validEv @ 281 NONAME
+	_ZN28eap_core_client_message_if_c13timer_expiredEmPv @ 282 NONAME
+	_ZN28eap_core_client_message_if_c14packet_processEPK19eap_am_network_id_cP25eap_general_header_base_cm @ 283 NONAME
+	_ZN28eap_core_client_message_if_c15eap_acknowledgeEPK19eap_am_network_id_c @ 284 NONAME
+	_ZN28eap_core_client_message_if_c15process_messageEP30eap_process_tlv_message_data_c @ 285 NONAME
+	_ZN28eap_core_client_message_if_c17timer_delete_dataEmPv @ 286 NONAME
+	_ZN28eap_core_client_message_if_c18create_eap_sessionEPK19eap_am_network_id_c @ 287 NONAME
+	_ZN28eap_core_client_message_if_c18remove_eap_sessionEPK19eap_am_network_id_c @ 288 NONAME
+	_ZN28eap_core_client_message_if_c23cancel_all_eap_sessionsEv @ 289 NONAME
+	_ZN28eap_core_client_message_if_c25send_eap_identity_requestEPK19eap_am_network_id_c @ 290 NONAME
+	_ZN28eap_core_client_message_if_c33set_eap_database_reference_valuesEPK19eap_variable_data_c @ 291 NONAME
+	_ZN28eap_core_client_message_if_c5resetEv @ 292 NONAME
+	_ZN28eap_core_client_message_if_c8shutdownEv @ 293 NONAME
+	_ZN28eap_core_client_message_if_c9configureEv @ 294 NONAME
+	_ZN28eap_core_client_message_if_c9send_dataEPKvm @ 295 NONAME
+	_ZN28eap_core_client_message_if_cC1EP18abs_eap_am_tools_cP19eap_am_message_if_cP22abs_eap_session_core_cb @ 296 NONAME
+	_ZN28eap_core_client_message_if_cC2EP18abs_eap_am_tools_cP19eap_am_message_if_cP22abs_eap_session_core_cb @ 297 NONAME
+	_ZN28eap_core_client_message_if_cD0Ev @ 298 NONAME
+	_ZN28eap_core_client_message_if_cD1Ev @ 299 NONAME
+	_ZN28eap_core_client_message_if_cD2Ev @ 300 NONAME
+	_ZN30eapol_am_wlan_authentication_c32new_eapol_am_wlan_authenticationEP18abs_eap_am_tools_cb @ 301 NONAME
+	_ZN30eapol_rsna_key_data_payloads_c14check_payloadsENS_36eapol_rsna_key_data_payload_status_eES0_S0_S0_ @ 302 NONAME
+	_ZN30eapol_rsna_key_data_payloads_c17check_one_payloadENS_36eapol_rsna_key_data_payload_status_eEPK11eap_array_cI19eap_variable_data_cE @ 303 NONAME
+	_ZN30eapol_rsna_key_data_payloads_c17check_one_payloadENS_36eapol_rsna_key_data_payload_status_eEPK26eapol_rsna_variable_data_c @ 304 NONAME
+	_ZN30eapol_rsna_key_data_payloads_cC1EP18abs_eap_am_tools_cbb @ 305 NONAME
+	_ZN30eapol_rsna_key_data_payloads_cC2EP18abs_eap_am_tools_cbb @ 306 NONAME
+	_ZN30eapol_rsna_key_data_payloads_cD0Ev @ 307 NONAME
+	_ZN30eapol_rsna_key_data_payloads_cD1Ev @ 308 NONAME
+	_ZN30eapol_rsna_key_data_payloads_cD2Ev @ 309 NONAME
+	_ZN31eapol_handle_tlv_message_data_c12get_is_validEv @ 310 NONAME
+	_ZN31eapol_handle_tlv_message_data_cC1EP18abs_eap_am_tools_c @ 311 NONAME
+	_ZN31eapol_handle_tlv_message_data_cC2EP18abs_eap_am_tools_c @ 312 NONAME
+	_ZN31eapol_handle_tlv_message_data_cD0Ev @ 313 NONAME
+	_ZN31eapol_handle_tlv_message_data_cD1Ev @ 314 NONAME
+	_ZN31eapol_handle_tlv_message_data_cD2Ev @ 315 NONAME
+	_ZN35eapol_message_wlan_authentication_c11packet_sendEPK19eap_am_network_id_cP18eap_buf_chain_wr_cmmm @ 316 NONAME
+	_ZN35eapol_message_wlan_authentication_c11reassociateEPK19eap_am_network_id_c31eapol_key_authentication_type_ePK19eap_variable_data_c @ 317 NONAME
+	_ZN35eapol_message_wlan_authentication_c12add_rogue_apER11eap_array_cI20eap_rogue_ap_entry_cE @ 318 NONAME
+	_ZN35eapol_message_wlan_authentication_c12disassociateEPK19eap_am_network_id_cb @ 319 NONAME
+	_ZN35eapol_message_wlan_authentication_c12get_is_validEv @ 320 NONAME
+	_ZN35eapol_message_wlan_authentication_c12process_dataEPKvm @ 321 NONAME
+	_ZN35eapol_message_wlan_authentication_c12send_messageEP31eapol_handle_tlv_message_data_c @ 322 NONAME
+	_ZN35eapol_message_wlan_authentication_c13timer_expiredEmPv @ 323 NONAME
+	_ZN35eapol_message_wlan_authentication_c14disassociationEPK11eap_array_cI16eap_tlv_header_cE @ 324 NONAME
+	_ZN35eapol_message_wlan_authentication_c14packet_processEPK11eap_array_cI16eap_tlv_header_cE @ 325 NONAME
+	_ZN35eapol_message_wlan_authentication_c15eap_acknowledgeEPK11eap_array_cI16eap_tlv_header_cE @ 326 NONAME
+	_ZN35eapol_message_wlan_authentication_c15process_messageEP31eapol_handle_tlv_message_data_c @ 327 NONAME
+	_ZN35eapol_message_wlan_authentication_c16tkip_mic_failureEPK11eap_array_cI16eap_tlv_header_cE @ 328 NONAME
+	_ZN35eapol_message_wlan_authentication_c17check_pmksa_cacheEPK11eap_array_cI16eap_tlv_header_cE @ 329 NONAME
+	_ZN35eapol_message_wlan_authentication_c17get_header_offsetEPmS0_ @ 330 NONAME
+	_ZN35eapol_message_wlan_authentication_c17timer_delete_dataEmPv @ 331 NONAME
+	_ZN35eapol_message_wlan_authentication_c18send_error_messageE12eap_status_e31eap_tlv_message_type_function_e @ 332 NONAME
+	_ZN35eapol_message_wlan_authentication_c18state_notificationEPK28abs_eap_state_notification_c @ 333 NONAME
+	_ZN35eapol_message_wlan_authentication_c19start_reassociationEPK11eap_array_cI16eap_tlv_header_cE @ 334 NONAME
+	_ZN35eapol_message_wlan_authentication_c20complete_associationEPK11eap_array_cI16eap_tlv_header_cE @ 335 NONAME
+	_ZN35eapol_message_wlan_authentication_c20start_authenticationEPK11eap_array_cI16eap_tlv_header_cE @ 336 NONAME
+	_ZN35eapol_message_wlan_authentication_c20update_header_offsetEPK11eap_array_cI16eap_tlv_header_cE @ 337 NONAME
+	_ZN35eapol_message_wlan_authentication_c22complete_reassociationEPK11eap_array_cI16eap_tlv_header_cE @ 338 NONAME
+	_ZN35eapol_message_wlan_authentication_c23packet_data_session_keyEPK19eap_am_network_id_cPK19eapol_session_key_c @ 339 NONAME
+	_ZN35eapol_message_wlan_authentication_c23start_preauthenticationEPK11eap_array_cI16eap_tlv_header_cE @ 340 NONAME
+	_ZN35eapol_message_wlan_authentication_c24start_WPXM_reassociationEPK11eap_array_cI16eap_tlv_header_cE @ 341 NONAME
+	_ZN35eapol_message_wlan_authentication_c26complete_check_pmksa_cacheEPK11eap_array_cI19eap_am_network_id_cE @ 342 NONAME
+	_ZN35eapol_message_wlan_authentication_c26process_message_type_errorEPK11eap_array_cI16eap_tlv_header_cE @ 343 NONAME
+	_ZN35eapol_message_wlan_authentication_c26save_simple_config_sessionE21simple_config_state_ePK11eap_array_cI26simple_config_credential_cEPK19eap_variable_data_c34simple_config_Device_Password_ID_ePK24simple_config_payloads_c @ 344 NONAME
+	_ZN35eapol_message_wlan_authentication_c27complete_WPXM_reassociationEPK11eap_array_cI16eap_tlv_header_cE @ 345 NONAME
+	_ZN35eapol_message_wlan_authentication_c37update_wlan_database_reference_valuesEPK11eap_array_cI16eap_tlv_header_cE @ 346 NONAME
+	_ZN35eapol_message_wlan_authentication_c8shutdownEv @ 347 NONAME
+	_ZN35eapol_message_wlan_authentication_c9associateE38eapol_key_802_11_authentication_mode_e @ 348 NONAME
+	_ZN35eapol_message_wlan_authentication_c9configureEmmm @ 349 NONAME
+	_ZN35eapol_message_wlan_authentication_cC1EP18abs_eap_am_tools_cP39abs_eapol_message_wlan_authentication_c @ 350 NONAME
+	_ZN35eapol_message_wlan_authentication_cC2EP18abs_eap_am_tools_cP39abs_eapol_message_wlan_authentication_c @ 351 NONAME
+	_ZN35eapol_message_wlan_authentication_cD0Ev @ 352 NONAME
+	_ZN35eapol_message_wlan_authentication_cD1Ev @ 353 NONAME
+	_ZN35eapol_message_wlan_authentication_cD2Ev @ 354 NONAME
+	_ZN36wlan_eap_if_send_status_conversion_c7convertE12eap_status_e @ 355 NONAME
+	_ZN36wlan_eap_if_send_status_conversion_c7convertE25wlan_eap_if_send_status_e @ 356 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c11associationEPK19eap_am_network_id_c @ 357 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c12cancel_timerEP20abs_eap_base_timer_cm @ 358 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c12get_is_validEv @ 359 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c14disassociationEPK19eap_am_network_id_c @ 360 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c14read_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 361 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c14set_am_partnerEP34abs_eapol_am_wlan_authentication_cP26abs_eap_configuration_if_c @ 362 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c15write_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 363 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c17cancel_all_timersEv @ 364 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c19set_wlan_parametersEPK19eap_variable_data_cbS2_31eapol_key_authentication_type_e @ 365 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c22get_wlan_configurationEP19eap_variable_data_c @ 366 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c23authentication_finishedEb19eap_expanded_type_c31eapol_key_authentication_type_e @ 367 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c23reset_eap_configurationEv @ 368 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c26save_simple_config_sessionE21simple_config_state_ePK11eap_array_cI26simple_config_credential_cEPK19eap_variable_data_c34simple_config_Device_Password_ID_ePK24simple_config_payloads_c @ 369 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c33set_eap_database_reference_valuesEPK19eap_variable_data_c @ 370 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c8shutdownEv @ 371 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c9configureEv @ 372 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c9set_timerEP20abs_eap_base_timer_cmPvm @ 373 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_cC1EP18abs_eap_am_tools_cb @ 374 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_cC2EP18abs_eap_am_tools_cb @ 375 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_cD0Ev @ 376 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_cD1Ev @ 377 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_cD2Ev @ 378 NONAME
+	_ZNK17eapol_key_state_c19get_eapol_key_stateEv @ 379 NONAME
+	_ZNK22eapol_RC4_key_header_c12check_headerEv @ 380 NONAME
+	_ZNK22eapol_RC4_key_header_c12get_key_flagEv @ 381 NONAME
+	_ZNK22eapol_RC4_key_header_c13get_key_indexEv @ 382 NONAME
+	_ZNK22eapol_RC4_key_header_c14get_key_lengthEv @ 383 NONAME
+	_ZNK22eapol_RC4_key_header_c17get_key_signatureEv @ 384 NONAME
+	_ZNK22eapol_RC4_key_header_c21get_eapol_packet_typeEv @ 385 NONAME
+	_ZNK22eapol_RC4_key_header_c23get_key_descriptor_typeEv @ 386 NONAME
+	_ZNK22eapol_RC4_key_header_c26get_eapol_protocol_versionEv @ 387 NONAME
+	_ZNK22eapol_RC4_key_header_c28get_eapol_packet_body_lengthEv @ 388 NONAME
+	_ZNK22eapol_RC4_key_header_c7get_keyEv @ 389 NONAME
+	_ZNK23eapol_RSNA_key_header_c11get_key_MICEv @ 390 NONAME
+	_ZNK23eapol_RSNA_key_header_c11get_key_RSCEv @ 391 NONAME
+	_ZNK23eapol_RSNA_key_header_c12check_headerEv @ 392 NONAME
+	_ZNK23eapol_RSNA_key_header_c12get_key_dataEm @ 393 NONAME
+	_ZNK23eapol_RSNA_key_header_c13get_key_NONCEEv @ 394 NONAME
+	_ZNK23eapol_RSNA_key_header_c14get_key_lengthEv @ 395 NONAME
+	_ZNK23eapol_RSNA_key_header_c16get_EAPOL_key_IVEv @ 396 NONAME
+	_ZNK23eapol_RSNA_key_header_c16get_key_reservedEv @ 397 NONAME
+	_ZNK23eapol_RSNA_key_header_c19get_key_data_lengthEv @ 398 NONAME
+	_ZNK23eapol_RSNA_key_header_c19get_key_data_offsetEmm @ 399 NONAME
+	_ZNK23eapol_RSNA_key_header_c19get_key_informationEv @ 400 NONAME
+	_ZNK23eapol_RSNA_key_header_c21get_eapol_packet_typeEv @ 401 NONAME
+	_ZNK23eapol_RSNA_key_header_c22get_key_replay_counterEv @ 402 NONAME
+	_ZNK23eapol_RSNA_key_header_c23get_eapol_packet_lengthEv @ 403 NONAME
+	_ZNK23eapol_RSNA_key_header_c23get_key_STA_MAC_addressEv @ 404 NONAME
+	_ZNK23eapol_RSNA_key_header_c23get_key_descriptor_typeEv @ 405 NONAME
+	_ZNK23eapol_RSNA_key_header_c25get_key_information_errorEv @ 406 NONAME
+	_ZNK23eapol_RSNA_key_header_c26get_eapol_protocol_versionEv @ 407 NONAME
+	_ZNK23eapol_RSNA_key_header_c26get_key_information_secureEv @ 408 NONAME
+	_ZNK23eapol_RSNA_key_header_c27get_key_information_installEv @ 409 NONAME
+	_ZNK23eapol_RSNA_key_header_c27get_key_information_key_MICEv @ 410 NONAME
+	_ZNK23eapol_RSNA_key_header_c27get_key_information_key_ackEv @ 411 NONAME
+	_ZNK23eapol_RSNA_key_header_c27get_key_information_requestEv @ 412 NONAME
+	_ZNK23eapol_RSNA_key_header_c28get_eapol_packet_body_lengthEv @ 413 NONAME
+	_ZNK23eapol_RSNA_key_header_c28get_key_information_key_typeEv @ 414 NONAME
+	_ZNK23eapol_RSNA_key_header_c29get_key_information_key_indexEv @ 415 NONAME
+	_ZNK23eapol_RSNA_key_header_c30get_key_information_reserved_aEv @ 416 NONAME
+	_ZNK23eapol_RSNA_key_header_c30get_key_information_reserved_bEv @ 417 NONAME
+	_ZNK23eapol_RSNA_key_header_c38get_key_information_encrypted_key_dataEv @ 418 NONAME
+	_ZNK23eapol_RSNA_key_header_c42get_key_information_key_descriptor_versionEv @ 419 NONAME
+	_ZNK24eapol_key_state_string_c26get_eapol_key_state_stringE17eapol_key_state_e @ 420 NONAME
+	_ZNK24eapol_key_state_string_c35get_eapol_key_handshake_type_stringE26eapol_key_handshake_type_e @ 421 NONAME
+	_ZNK24eapol_key_state_string_c40get_eapol_key_authentication_type_stringE31eapol_key_authentication_type_e @ 422 NONAME
+	_ZNK26eapol_rsna_variable_data_c19get_original_headerEv @ 423 NONAME
+	_ZTI12eapol_core_c @ 424 NONAME
+	_ZTI15ethernet_core_c @ 425 NONAME
+	_ZTI17eapol_key_state_c @ 426 NONAME
+	_ZTI22eapol_RC4_key_header_c @ 427 NONAME
+	_ZTI23eapol_RSNA_key_header_c @ 428 NONAME
+	_ZTI24eapol_key_state_string_c @ 429 NONAME
+	_ZTI26eapol_rsna_variable_data_c @ 430 NONAME
+	_ZTI27eapol_wlan_authentication_c @ 431 NONAME
+	_ZTI28eap_core_client_message_if_c @ 432 NONAME
+	_ZTI28eapol_rsna_key_data_header_c @ 433 NONAME
+	_ZTI30eapol_am_wlan_authentication_c @ 434 NONAME
+	_ZTI30eapol_rsna_key_data_payloads_c @ 435 NONAME
+	_ZTI31eapol_handle_tlv_message_data_c @ 436 NONAME
+	_ZTI32eapol_rsna_key_data_gtk_header_c @ 437 NONAME
+	_ZTI35eapol_message_wlan_authentication_c @ 438 NONAME
+	_ZTI38eapol_am_wlan_authentication_symbian_c @ 439 NONAME
+	_ZTV12eapol_core_c @ 440 NONAME
+	_ZTV15ethernet_core_c @ 441 NONAME
+	_ZTV17eapol_key_state_c @ 442 NONAME
+	_ZTV22eapol_RC4_key_header_c @ 443 NONAME
+	_ZTV23eapol_RSNA_key_header_c @ 444 NONAME
+	_ZTV24eapol_key_state_string_c @ 445 NONAME
+	_ZTV26eapol_rsna_variable_data_c @ 446 NONAME
+	_ZTV27eapol_wlan_authentication_c @ 447 NONAME
+	_ZTV28eap_core_client_message_if_c @ 448 NONAME
+	_ZTV28eapol_rsna_key_data_header_c @ 449 NONAME
+	_ZTV30eapol_am_wlan_authentication_c @ 450 NONAME
+	_ZTV30eapol_rsna_key_data_payloads_c @ 451 NONAME
+	_ZTV31eapol_handle_tlv_message_data_c @ 452 NONAME
+	_ZTV32eapol_rsna_key_data_gtk_header_c @ 453 NONAME
+	_ZTV35eapol_message_wlan_authentication_c @ 454 NONAME
+	_ZTV38eapol_am_wlan_authentication_symbian_c @ 455 NONAME
+	_ZThn12_N12eapol_core_c12cancel_timerEP20abs_eap_base_timer_cm @ 456 NONAME
+	_ZThn12_N12eapol_core_c14read_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 457 NONAME
+	_ZThn12_N12eapol_core_c15write_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 458 NONAME
+	_ZThn12_N12eapol_core_c18state_notificationEPK28abs_eap_state_notification_c @ 459 NONAME
+	_ZThn12_N12eapol_core_c23packet_data_session_keyEPK19eap_am_network_id_cPK19eapol_session_key_c @ 460 NONAME
+	_ZThn12_N12eapol_core_c36get_and_increment_global_key_counterEP19eap_variable_data_c @ 461 NONAME
+	_ZThn12_N12eapol_core_c9set_timerEP20abs_eap_base_timer_cmPvm @ 462 NONAME
+	_ZThn12_N12eapol_core_cD0Ev @ 463 NONAME
+	_ZThn12_N12eapol_core_cD1Ev @ 464 NONAME
+	_ZThn12_N27eapol_wlan_authentication_c33set_eap_database_reference_valuesEPK19eap_variable_data_c @ 465 NONAME
+	_ZThn12_N27eapol_wlan_authentication_cD1Ev @ 466 NONAME
+	_ZThn12_N28eap_core_client_message_if_c12get_is_validEv @ 467 NONAME
+	_ZThn12_N28eap_core_client_message_if_c12set_is_validEv @ 468 NONAME
+	_ZThn12_N28eap_core_client_message_if_c14packet_processEPK19eap_am_network_id_cP25eap_general_header_base_cm @ 469 NONAME
+	_ZThn12_N28eap_core_client_message_if_c8shutdownEv @ 470 NONAME
+	_ZThn12_N28eap_core_client_message_if_c9configureEv @ 471 NONAME
+	_ZThn12_N28eap_core_client_message_if_cD0Ev @ 472 NONAME
+	_ZThn12_N28eap_core_client_message_if_cD1Ev @ 473 NONAME
+	_ZThn16_N12eapol_core_cD0Ev @ 474 NONAME
+	_ZThn16_N12eapol_core_cD1Ev @ 475 NONAME
+	_ZThn16_N27eapol_wlan_authentication_c26save_simple_config_sessionE21simple_config_state_ePK11eap_array_cI26simple_config_credential_cEPK19eap_variable_data_c34simple_config_Device_Password_ID_ePK24simple_config_payloads_c @ 476 NONAME
+	_ZThn20_N12eapol_core_c33set_eap_database_reference_valuesEPK19eap_variable_data_c @ 477 NONAME
+	_ZThn20_N12eapol_core_cD0Ev @ 478 NONAME
+	_ZThn20_N12eapol_core_cD1Ev @ 479 NONAME
+	_ZThn28_N38eapol_am_wlan_authentication_symbian_c11associationEPK19eap_am_network_id_c @ 480 NONAME
+	_ZThn28_N38eapol_am_wlan_authentication_symbian_c12cancel_timerEP20abs_eap_base_timer_cm @ 481 NONAME
+	_ZThn28_N38eapol_am_wlan_authentication_symbian_c12get_is_validEv @ 482 NONAME
+	_ZThn28_N38eapol_am_wlan_authentication_symbian_c14disassociationEPK19eap_am_network_id_c @ 483 NONAME
+	_ZThn28_N38eapol_am_wlan_authentication_symbian_c14read_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 484 NONAME
+	_ZThn28_N38eapol_am_wlan_authentication_symbian_c14set_am_partnerEP34abs_eapol_am_wlan_authentication_cP26abs_eap_configuration_if_c @ 485 NONAME
+	_ZThn28_N38eapol_am_wlan_authentication_symbian_c15write_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 486 NONAME
+	_ZThn28_N38eapol_am_wlan_authentication_symbian_c17cancel_all_timersEv @ 487 NONAME
+	_ZThn28_N38eapol_am_wlan_authentication_symbian_c19set_wlan_parametersEPK19eap_variable_data_cbS2_31eapol_key_authentication_type_e @ 488 NONAME
+	_ZThn28_N38eapol_am_wlan_authentication_symbian_c22get_wlan_configurationEP19eap_variable_data_c @ 489 NONAME
+	_ZThn28_N38eapol_am_wlan_authentication_symbian_c23authentication_finishedEb19eap_expanded_type_c31eapol_key_authentication_type_e @ 490 NONAME
+	_ZThn28_N38eapol_am_wlan_authentication_symbian_c23reset_eap_configurationEv @ 491 NONAME
+	_ZThn28_N38eapol_am_wlan_authentication_symbian_c33set_eap_database_reference_valuesEPK19eap_variable_data_c @ 492 NONAME
+	_ZThn28_N38eapol_am_wlan_authentication_symbian_c8shutdownEv @ 493 NONAME
+	_ZThn28_N38eapol_am_wlan_authentication_symbian_c9configureEv @ 494 NONAME
+	_ZThn28_N38eapol_am_wlan_authentication_symbian_c9set_timerEP20abs_eap_base_timer_cmPvm @ 495 NONAME
+	_ZThn28_N38eapol_am_wlan_authentication_symbian_cD0Ev @ 496 NONAME
+	_ZThn28_N38eapol_am_wlan_authentication_symbian_cD1Ev @ 497 NONAME
+	_ZThn32_N38eapol_am_wlan_authentication_symbian_c26save_simple_config_sessionE21simple_config_state_ePK11eap_array_cI26simple_config_credential_cEPK19eap_variable_data_c34simple_config_Device_Password_ID_ePK24simple_config_payloads_c @ 498 NONAME
+	_ZThn4_N12eapol_core_c13timer_expiredEmPv @ 499 NONAME
+	_ZThn4_N12eapol_core_c17timer_delete_dataEmPv @ 500 NONAME
+	_ZThn4_N12eapol_core_cD0Ev @ 501 NONAME
+	_ZThn4_N12eapol_core_cD1Ev @ 502 NONAME
+	_ZThn4_N15ethernet_core_c12get_is_validEv @ 503 NONAME
+	_ZThn4_N15ethernet_core_c12set_is_validEv @ 504 NONAME
+	_ZThn4_N15ethernet_core_c14packet_processEPK19eap_am_network_id_cP25eap_general_header_base_cm @ 505 NONAME
+	_ZThn4_N15ethernet_core_c8shutdownEv @ 506 NONAME
+	_ZThn4_N15ethernet_core_c9configureEv @ 507 NONAME
+	_ZThn4_N15ethernet_core_cD0Ev @ 508 NONAME
+	_ZThn4_N15ethernet_core_cD1Ev @ 509 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c11load_moduleE19eap_expanded_type_cS0_P19abs_eap_base_type_cPP15eap_base_type_cbPK19eap_am_network_id_c @ 510 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c11packet_sendEPK19eap_am_network_id_cP18eap_buf_chain_wr_cmmm @ 511 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c12add_rogue_apER11eap_array_cI20eap_rogue_ap_entry_cE @ 512 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c12cancel_timerEP20abs_eap_base_timer_cm @ 513 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c13get_is_clientEv @ 514 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c13unload_moduleE19eap_expanded_type_c @ 515 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c14read_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 516 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c15write_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 517 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c17cancel_all_timersEv @ 518 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c17get_eap_type_listEP11eap_array_cI19eap_expanded_type_cE @ 519 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c17get_header_offsetEPmS0_ @ 520 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c18state_notificationEPK28abs_eap_state_notification_c @ 521 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c23check_is_valid_eap_typeE19eap_expanded_type_c @ 522 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c23packet_data_session_keyEPK19eap_am_network_id_cPK19eapol_session_key_c @ 523 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c26complete_check_pmksa_cacheEPK11eap_array_cI19eap_am_network_id_cE @ 524 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c26save_simple_config_sessionE21simple_config_state_ePK11eap_array_cI26simple_config_credential_cEPK19eap_variable_data_c34simple_config_Device_Password_ID_ePK24simple_config_payloads_c @ 525 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c39complete_get_802_11_authentication_modeE12eap_status_ePK19eap_am_network_id_c38eapol_key_802_11_authentication_mode_e @ 526 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c9set_timerEP20abs_eap_base_timer_cmPvm @ 527 NONAME
+	_ZThn4_N27eapol_wlan_authentication_cD1Ev @ 528 NONAME
+	_ZThn4_N28eap_core_client_message_if_c12get_is_validEv @ 529 NONAME
+	_ZThn4_N28eap_core_client_message_if_c14packet_processEPK19eap_am_network_id_cP25eap_general_header_base_cm @ 530 NONAME
+	_ZThn4_N28eap_core_client_message_if_c15eap_acknowledgeEPK19eap_am_network_id_c @ 531 NONAME
+	_ZThn4_N28eap_core_client_message_if_c18create_eap_sessionEPK19eap_am_network_id_c @ 532 NONAME
+	_ZThn4_N28eap_core_client_message_if_c18remove_eap_sessionEPK19eap_am_network_id_c @ 533 NONAME
+	_ZThn4_N28eap_core_client_message_if_c23cancel_all_eap_sessionsEv @ 534 NONAME
+	_ZThn4_N28eap_core_client_message_if_c25send_eap_identity_requestEPK19eap_am_network_id_c @ 535 NONAME
+	_ZThn4_N28eap_core_client_message_if_c33set_eap_database_reference_valuesEPK19eap_variable_data_c @ 536 NONAME
+	_ZThn4_N28eap_core_client_message_if_c5resetEv @ 537 NONAME
+	_ZThn4_N28eap_core_client_message_if_c8shutdownEv @ 538 NONAME
+	_ZThn4_N28eap_core_client_message_if_c9configureEv @ 539 NONAME
+	_ZThn4_N28eap_core_client_message_if_cD0Ev @ 540 NONAME
+	_ZThn4_N28eap_core_client_message_if_cD1Ev @ 541 NONAME
+	_ZThn4_N35eapol_message_wlan_authentication_c13timer_expiredEmPv @ 542 NONAME
+	_ZThn4_N35eapol_message_wlan_authentication_c17timer_delete_dataEmPv @ 543 NONAME
+	_ZThn4_N35eapol_message_wlan_authentication_cD0Ev @ 544 NONAME
+	_ZThn4_N35eapol_message_wlan_authentication_cD1Ev @ 545 NONAME
+	_ZThn8_N12eapol_core_c12get_is_validEv @ 546 NONAME
+	_ZThn8_N12eapol_core_c12set_is_validEv @ 547 NONAME
+	_ZThn8_N12eapol_core_c14packet_processEPK19eap_am_network_id_cP25eap_general_header_base_cm @ 548 NONAME
+	_ZThn8_N12eapol_core_c8shutdownEv @ 549 NONAME
+	_ZThn8_N12eapol_core_c9configureEv @ 550 NONAME
+	_ZThn8_N12eapol_core_cD0Ev @ 551 NONAME
+	_ZThn8_N12eapol_core_cD1Ev @ 552 NONAME
+	_ZThn8_N15ethernet_core_c33set_eap_database_reference_valuesEPK19eap_variable_data_c @ 553 NONAME
+	_ZThn8_N15ethernet_core_cD0Ev @ 554 NONAME
+	_ZThn8_N15ethernet_core_cD1Ev @ 555 NONAME
+	_ZThn8_N27eapol_wlan_authentication_c13timer_expiredEmPv @ 556 NONAME
+	_ZThn8_N27eapol_wlan_authentication_c17timer_delete_dataEmPv @ 557 NONAME
+	_ZThn8_N27eapol_wlan_authentication_cD1Ev @ 558 NONAME
+	_ZThn8_N28eap_core_client_message_if_c13timer_expiredEmPv @ 559 NONAME
+	_ZThn8_N28eap_core_client_message_if_c17timer_delete_dataEmPv @ 560 NONAME
+	_ZThn8_N28eap_core_client_message_if_cD0Ev @ 561 NONAME
+	_ZThn8_N28eap_core_client_message_if_cD1Ev @ 562 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/EABI/eapolprotectedu.def	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,550 @@
+EXPORTS
+	_ZN12eapol_core_c11associationEPK19eap_am_network_id_c31eapol_key_authentication_type_ePK19eap_variable_data_cS6_N23eapol_RSNA_key_header_c19eapol_RSNA_cipher_eES8_S6_ @ 1 NONAME
+	_ZN12eapol_core_c11load_moduleE19eap_expanded_type_cS0_P19abs_eap_base_type_cPP15eap_base_type_cbPK19eap_am_network_id_c @ 2 NONAME
+	_ZN12eapol_core_c11packet_sendEPK19eap_am_network_id_cP18eap_buf_chain_wr_cmmm @ 3 NONAME
+	_ZN12eapol_core_c11send_logoffEPK19eap_am_network_id_c @ 4 NONAME
+	_ZN12eapol_core_c12add_rogue_apER11eap_array_cI20eap_rogue_ap_entry_cE @ 5 NONAME
+	_ZN12eapol_core_c12cancel_timerEP20abs_eap_base_timer_cm @ 6 NONAME
+	_ZN12eapol_core_c12create_stateEPK19eap_am_network_id_c31eapol_key_authentication_type_e @ 7 NONAME
+	_ZN12eapol_core_c12get_is_validEv @ 8 NONAME
+	_ZN12eapol_core_c12set_is_validEv @ 9 NONAME
+	_ZN12eapol_core_c13timer_expiredEmPv @ 10 NONAME
+	_ZN12eapol_core_c13unload_moduleE19eap_expanded_type_c @ 11 NONAME
+	_ZN12eapol_core_c14disassociationEbPK19eap_am_network_id_c @ 12 NONAME
+	_ZN12eapol_core_c14packet_processEPK19eap_am_network_id_cP25eap_general_header_base_cm @ 13 NONAME
+	_ZN12eapol_core_c14read_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 14 NONAME
+	_ZN12eapol_core_c15eap_acknowledgeEPK19eap_am_network_id_c @ 15 NONAME
+	_ZN12eapol_core_c15write_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 16 NONAME
+	_ZN12eapol_core_c16tkip_mic_failureEPK19eap_am_network_id_cbN23eapol_RSNA_key_header_c29eapol_tkip_mic_failure_type_eE @ 17 NONAME
+	_ZN12eapol_core_c17check_pmksa_cacheEP11eap_array_cI19eap_am_network_id_cE31eapol_key_authentication_type_eN23eapol_RSNA_key_header_c19eapol_RSNA_cipher_eES6_ @ 18 NONAME
+	_ZN12eapol_core_c17get_eap_type_listEP11eap_array_cI19eap_expanded_type_cE @ 19 NONAME
+	_ZN12eapol_core_c17get_header_offsetEPmS0_ @ 20 NONAME
+	_ZN12eapol_core_c17timer_delete_dataEmPv @ 21 NONAME
+	_ZN12eapol_core_c18shutdown_operationEP17eapol_key_state_cP18abs_eap_am_tools_c @ 22 NONAME
+	_ZN12eapol_core_c18state_notificationEPK28abs_eap_state_notification_c @ 23 NONAME
+	_ZN12eapol_core_c19set_session_timeoutEm @ 24 NONAME
+	_ZN12eapol_core_c19start_reassociationEPK19eap_am_network_id_c31eapol_key_authentication_type_ePK19eap_variable_data_c @ 25 NONAME
+	_ZN12eapol_core_c22remove_eapol_key_stateEPK19eap_am_network_id_cb @ 26 NONAME
+	_ZN12eapol_core_c22restart_authenticationEPK19eap_am_network_id_cbbb @ 27 NONAME
+	_ZN12eapol_core_c23check_is_valid_eap_typeE19eap_expanded_type_c @ 28 NONAME
+	_ZN12eapol_core_c23packet_data_crypto_keysEPK19eap_am_network_id_cPK24eap_master_session_key_c @ 29 NONAME
+	_ZN12eapol_core_c23packet_data_session_keyEPK19eap_am_network_id_cPK19eapol_session_key_c @ 30 NONAME
+	_ZN12eapol_core_c23remove_pmksa_from_cacheEPK19eap_am_network_id_c @ 31 NONAME
+	_ZN12eapol_core_c23start_preauthenticationEPK19eap_am_network_id_c31eapol_key_authentication_type_e @ 32 NONAME
+	_ZN12eapol_core_c26save_simple_config_sessionE21simple_config_state_ePK11eap_array_cI26simple_config_credential_cEPK19eap_variable_data_c34simple_config_Device_Password_ID_ePK24simple_config_payloads_c @ 33 NONAME
+	_ZN12eapol_core_c27complete_remove_eap_sessionEbPK19eap_am_network_id_c @ 34 NONAME
+	_ZN12eapol_core_c29cancel_authentication_sessionEP17eapol_key_state_cP18abs_eap_am_tools_c @ 35 NONAME
+	_ZN12eapol_core_c30get_802_11_authentication_modeEPK19eap_am_network_id_c31eapol_key_authentication_type_ePK19eap_variable_data_cS6_ @ 36 NONAME
+	_ZN12eapol_core_c33asynchronous_start_authenticationEPK19eap_am_network_id_cb @ 37 NONAME
+	_ZN12eapol_core_c33set_eap_database_reference_valuesEPK19eap_variable_data_c @ 38 NONAME
+	_ZN12eapol_core_c34cancel_all_authentication_sessionsEv @ 39 NONAME
+	_ZN12eapol_core_c36asynchronous_init_remove_eap_sessionEPK19eap_am_network_id_c @ 40 NONAME
+	_ZN12eapol_core_c36get_and_increment_global_key_counterEP19eap_variable_data_c @ 41 NONAME
+	_ZN12eapol_core_c36init_eapol_key_pmksa_caching_timeoutEPK19eap_am_network_id_c @ 42 NONAME
+	_ZN12eapol_core_c39complete_get_802_11_authentication_modeE12eap_status_ePK19eap_am_network_id_c38eapol_key_802_11_authentication_mode_e @ 43 NONAME
+	_ZN12eapol_core_c51indicate_eapol_key_state_started_eap_authenticationEPK19eap_am_network_id_c @ 44 NONAME
+	_ZN12eapol_core_c8shutdownEv @ 45 NONAME
+	_ZN12eapol_core_c9configureEv @ 46 NONAME
+	_ZN12eapol_core_c9set_timerEP20abs_eap_base_timer_cmPvm @ 47 NONAME
+	_ZN12eapol_core_cC1EP18abs_eap_am_tools_cP16abs_eapol_core_cb @ 48 NONAME
+	_ZN12eapol_core_cC2EP18abs_eap_am_tools_cP16abs_eapol_core_cb @ 49 NONAME
+	_ZN12eapol_core_cD0Ev @ 50 NONAME
+	_ZN12eapol_core_cD1Ev @ 51 NONAME
+	_ZN12eapol_core_cD2Ev @ 52 NONAME
+	_ZN15ethernet_core_c11associationEPK19eap_am_network_id_c31eapol_key_authentication_type_ePK19eap_variable_data_cS6_N23eapol_RSNA_key_header_c19eapol_RSNA_cipher_eES8_S6_ @ 53 NONAME
+	_ZN15ethernet_core_c11load_moduleE19eap_expanded_type_cS0_P19abs_eap_base_type_cPP15eap_base_type_cbPK19eap_am_network_id_c @ 54 NONAME
+	_ZN15ethernet_core_c11packet_sendEPK19eap_am_network_id_cP18eap_buf_chain_wr_cmmm @ 55 NONAME
+	_ZN15ethernet_core_c11send_logoffEPK19eap_am_network_id_c @ 56 NONAME
+	_ZN15ethernet_core_c12add_rogue_apER11eap_array_cI20eap_rogue_ap_entry_cE @ 57 NONAME
+	_ZN15ethernet_core_c12cancel_timerEP20abs_eap_base_timer_cm @ 58 NONAME
+	_ZN15ethernet_core_c12create_stateEPK19eap_am_network_id_c31eapol_key_authentication_type_e @ 59 NONAME
+	_ZN15ethernet_core_c12get_is_validEv @ 60 NONAME
+	_ZN15ethernet_core_c12set_is_validEv @ 61 NONAME
+	_ZN15ethernet_core_c13unload_moduleE19eap_expanded_type_c @ 62 NONAME
+	_ZN15ethernet_core_c14disassociationEbPK19eap_am_network_id_c @ 63 NONAME
+	_ZN15ethernet_core_c14packet_processEPK19eap_am_network_id_cP25eap_general_header_base_cm @ 64 NONAME
+	_ZN15ethernet_core_c14read_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 65 NONAME
+	_ZN15ethernet_core_c15eap_acknowledgeEPK19eap_am_network_id_c @ 66 NONAME
+	_ZN15ethernet_core_c15write_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 67 NONAME
+	_ZN15ethernet_core_c16tkip_mic_failureEPK19eap_am_network_id_cbN23eapol_RSNA_key_header_c29eapol_tkip_mic_failure_type_eE @ 68 NONAME
+	_ZN15ethernet_core_c17cancel_all_timersEv @ 69 NONAME
+	_ZN15ethernet_core_c17check_pmksa_cacheEP11eap_array_cI19eap_am_network_id_cE31eapol_key_authentication_type_eN23eapol_RSNA_key_header_c19eapol_RSNA_cipher_eES6_ @ 70 NONAME
+	_ZN15ethernet_core_c17get_eap_type_listEP11eap_array_cI19eap_expanded_type_cE @ 71 NONAME
+	_ZN15ethernet_core_c17get_header_offsetEPmS0_ @ 72 NONAME
+	_ZN15ethernet_core_c18state_notificationEPK28abs_eap_state_notification_c @ 73 NONAME
+	_ZN15ethernet_core_c19start_reassociationEPK19eap_am_network_id_c31eapol_key_authentication_type_ePK19eap_variable_data_c @ 74 NONAME
+	_ZN15ethernet_core_c20start_authenticationEPK19eap_am_network_id_cb @ 75 NONAME
+	_ZN15ethernet_core_c23check_is_valid_eap_typeE19eap_expanded_type_c @ 76 NONAME
+	_ZN15ethernet_core_c23complete_disassociationEbPK19eap_am_network_id_c @ 77 NONAME
+	_ZN15ethernet_core_c23packet_data_session_keyEPK19eap_am_network_id_cPK19eapol_session_key_c @ 78 NONAME
+	_ZN15ethernet_core_c23remove_pmksa_from_cacheEPK19eap_am_network_id_c @ 79 NONAME
+	_ZN15ethernet_core_c23start_preauthenticationEPK19eap_am_network_id_c31eapol_key_authentication_type_e @ 80 NONAME
+	_ZN15ethernet_core_c24start_WPXM_reassociationEPK19eap_am_network_id_c31eapol_key_authentication_type_eP19eap_variable_data_c @ 81 NONAME
+	_ZN15ethernet_core_c26complete_check_pmksa_cacheEPK11eap_array_cI19eap_am_network_id_cE @ 82 NONAME
+	_ZN15ethernet_core_c26save_simple_config_sessionE21simple_config_state_ePK11eap_array_cI26simple_config_credential_cEPK19eap_variable_data_c34simple_config_Device_Password_ID_ePK24simple_config_payloads_c @ 83 NONAME
+	_ZN15ethernet_core_c27complete_WPXM_reassociationE33eapol_wlan_authentication_state_ePK19eap_am_network_id_c31eapol_key_authentication_type_ePK19eap_variable_data_c @ 84 NONAME
+	_ZN15ethernet_core_c30get_802_11_authentication_modeEPK19eap_am_network_id_c31eapol_key_authentication_type_ePK19eap_variable_data_cS6_ @ 85 NONAME
+	_ZN15ethernet_core_c33set_eap_database_reference_valuesEPK19eap_variable_data_c @ 86 NONAME
+	_ZN15ethernet_core_c34cancel_all_authentication_sessionsEv @ 87 NONAME
+	_ZN15ethernet_core_c39complete_get_802_11_authentication_modeE12eap_status_ePK19eap_am_network_id_c38eapol_key_802_11_authentication_mode_e @ 88 NONAME
+	_ZN15ethernet_core_c8shutdownEv @ 89 NONAME
+	_ZN15ethernet_core_c9configureEv @ 90 NONAME
+	_ZN15ethernet_core_c9load_typeE19eap_expanded_type_c @ 91 NONAME
+	_ZN15ethernet_core_c9set_timerEP20abs_eap_base_timer_cmPvm @ 92 NONAME
+	_ZN15ethernet_core_cC1EP18abs_eap_am_tools_cP19abs_ethernet_core_cb @ 93 NONAME
+	_ZN15ethernet_core_cC2EP18abs_eap_am_tools_cP19abs_ethernet_core_cb @ 94 NONAME
+	_ZN15ethernet_core_cD0Ev @ 95 NONAME
+	_ZN15ethernet_core_cD1Ev @ 96 NONAME
+	_ZN15ethernet_core_cD2Ev @ 97 NONAME
+	_ZN17eapol_key_state_c10get_ANonceEv @ 98 NONAME
+	_ZN17eapol_key_state_c10get_SNonceEv @ 99 NONAME
+	_ZN17eapol_key_state_c10get_is_WPAEv @ 100 NONAME
+	_ZN17eapol_key_state_c10initializeEPK19eap_am_network_id_c31eapol_key_authentication_type_e @ 101 NONAME
+	_ZN17eapol_key_state_c10initializeEPK19eap_am_network_id_c31eapol_key_authentication_type_ePK19eap_variable_data_cS6_N23eapol_RSNA_key_header_c19eapol_RSNA_cipher_eES8_S6_ @ 102 NONAME
+	_ZN17eapol_key_state_c11get_is_RSNAEv @ 103 NONAME
+	_ZN17eapol_key_state_c11get_is_WPXMEv @ 104 NONAME
+	_ZN17eapol_key_state_c11packet_sendEPK19eap_am_network_id_cP18eap_buf_chain_wr_cmmm @ 105 NONAME
+	_ZN17eapol_key_state_c11set_s_nonceEPK19eap_variable_data_c @ 106 NONAME
+	_ZN17eapol_key_state_c12get_is_validEv @ 107 NONAME
+	_ZN17eapol_key_state_c12set_is_validEv @ 108 NONAME
+	_ZN17eapol_key_state_c13check_paddingEPKhm @ 109 NONAME
+	_ZN17eapol_key_state_c13resend_packetEPK19eap_am_network_id_cP18eap_buf_chain_wr_cmmm @ 110 NONAME
+	_ZN17eapol_key_state_c13timer_expiredEmPv @ 111 NONAME
+	_ZN17eapol_key_state_c15save_parametersE31eapol_key_authentication_type_ePK19eap_variable_data_cS3_N23eapol_RSNA_key_header_c19eapol_RSNA_cipher_eES5_ @ 112 NONAME
+	_ZN17eapol_key_state_c16set_pairwise_PMKEPK19eap_variable_data_cPK19eap_am_network_id_c @ 113 NONAME
+	_ZN17eapol_key_state_c16tkip_mic_failureEbN23eapol_RSNA_key_header_c29eapol_tkip_mic_failure_type_eE @ 114 NONAME
+	_ZN17eapol_key_state_c17check_pmksa_cacheE31eapol_key_authentication_type_eN23eapol_RSNA_key_header_c19eapol_RSNA_cipher_eES2_ @ 115 NONAME
+	_ZN17eapol_key_state_c17get_is_associatedEv @ 116 NONAME
+	_ZN17eapol_key_state_c17timer_delete_dataEmPv @ 117 NONAME
+	_ZN17eapol_key_state_c18add_RSN_IE_payloadEPK23eapol_RSNA_key_header_cP19eap_variable_data_cPm @ 118 NONAME
+	_ZN17eapol_key_state_c18get_encryption_KEKEv @ 119 NONAME
+	_ZN17eapol_key_state_c18get_marked_removedEv @ 120 NONAME
+	_ZN17eapol_key_state_c18get_received_PMKIDEv @ 121 NONAME
+	_ZN17eapol_key_state_c18reset_cached_pmksaEv @ 122 NONAME
+	_ZN17eapol_key_state_c18set_marked_removedEv @ 123 NONAME
+	_ZN17eapol_key_state_c19add_RSN_GTK_payloadEPK23eapol_RSNA_key_header_cP19eap_variable_data_cPm @ 124 NONAME
+	_ZN17eapol_key_state_c19init_retransmissionEPK19eap_am_network_id_cP18eap_buf_chain_wr_cmm16eap_code_value_eh19eap_expanded_type_c @ 125 NONAME
+	_ZN17eapol_key_state_c19set_WPXM_parametersEPK19eap_am_network_id_c @ 126 NONAME
+	_ZN17eapol_key_state_c19set_eapol_key_stateE17eapol_key_state_e @ 127 NONAME
+	_ZN17eapol_key_state_c20get_confirmation_KCKEv @ 128 NONAME
+	_ZN17eapol_key_state_c20get_is_encryption_onEv @ 129 NONAME
+	_ZN17eapol_key_state_c20unset_marked_removedEv @ 130 NONAME
+	_ZN17eapol_key_state_c20verify_field_is_zeroEPKhm @ 131 NONAME
+	_ZN17eapol_key_state_c21cancel_retransmissionEv @ 132 NONAME
+	_ZN17eapol_key_state_c21get_key_reply_counterEv @ 133 NONAME
+	_ZN17eapol_key_state_c21set_key_reply_counterEy @ 134 NONAME
+	_ZN17eapol_key_state_c22get_supplicant_RSNA_IEEv @ 135 NONAME
+	_ZN17eapol_key_state_c22init_handshake_timeoutEm @ 136 NONAME
+	_ZN17eapol_key_state_c23process_eapol_key_frameEPK19eap_am_network_id_cP25eap_general_header_base_cm @ 137 NONAME
+	_ZN17eapol_key_state_c23trace_eapol_key_messageEPKcP23eapol_RSNA_key_header_c @ 138 NONAME
+	_ZN17eapol_key_state_c24cancel_handshake_timeoutEv @ 139 NONAME
+	_ZN17eapol_key_state_c24start_WPXM_reassociationEPK19eap_am_network_id_c31eapol_key_authentication_type_eP19eap_variable_data_c @ 140 NONAME
+	_ZN17eapol_key_state_c25get_authenticator_RSNA_IEEv @ 141 NONAME
+	_ZN17eapol_key_state_c26get_supplicant_MAC_addressEv @ 142 NONAME
+	_ZN17eapol_key_state_c26increase_key_reply_counterEv @ 143 NONAME
+	_ZN17eapol_key_state_c26init_pmksa_caching_timeoutEv @ 144 NONAME
+	_ZN17eapol_key_state_c26started_eap_authenticationEv @ 145 NONAME
+	_ZN17eapol_key_state_c27complete_WPXM_reassociationE33eapol_wlan_authentication_state_ePK19eap_am_network_id_c31eapol_key_authentication_type_ePK19eap_variable_data_c @ 146 NONAME
+	_ZN17eapol_key_state_c28cancel_pmksa_caching_timeoutEv @ 147 NONAME
+	_ZN17eapol_key_state_c28initialize_preauthenticationEPK19eap_am_network_id_c31eapol_key_authentication_type_e @ 148 NONAME
+	_ZN17eapol_key_state_c29cancel_authentication_sessionEv @ 149 NONAME
+	_ZN17eapol_key_state_c29get_authenticator_MAC_addressEv @ 150 NONAME
+	_ZN17eapol_key_state_c29init_group_key_update_timeoutEm @ 151 NONAME
+	_ZN17eapol_key_state_c29read_reassociation_parametersEPK19eap_am_network_id_c31eapol_key_authentication_type_eP19eap_variable_data_cPKS4_S7_ @ 152 NONAME
+	_ZN17eapol_key_state_c31cancel_group_key_update_timeoutEv @ 153 NONAME
+	_ZN17eapol_key_state_c31object_decrease_reference_countEv @ 154 NONAME
+	_ZN17eapol_key_state_c31object_increase_reference_countEv @ 155 NONAME
+	_ZN17eapol_key_state_c32get_unicast_cipher_suite_RSNA_IEEv @ 156 NONAME
+	_ZN17eapol_key_state_c33get_client_send_key_reply_counterEv @ 157 NONAME
+	_ZN17eapol_key_state_c33set_client_send_key_reply_counterEy @ 158 NONAME
+	_ZN17eapol_key_state_c38increase_client_send_key_reply_counterEv @ 159 NONAME
+	_ZN17eapol_key_state_c40asynchronous_init_remove_eapol_key_stateEv @ 160 NONAME
+	_ZN17eapol_key_state_c4copyEPK19eap_am_network_id_c @ 161 NONAME
+	_ZN17eapol_key_state_c5resetEv @ 162 NONAME
+	_ZN17eapol_key_state_c8shutdownEv @ 163 NONAME
+	_ZN17eapol_key_state_c9configureEv @ 164 NONAME
+	_ZN17eapol_key_state_cC1EP18abs_eap_am_tools_cP21abs_eapol_key_state_cP16abs_eapol_core_cbPK19eap_am_network_id_c31eapol_key_authentication_type_e @ 165 NONAME
+	_ZN17eapol_key_state_cC1EP18abs_eap_am_tools_cP21abs_eapol_key_state_cP16abs_eapol_core_cbPK19eap_am_network_id_c31eapol_key_authentication_type_ePK19eap_variable_data_cSC_N23eapol_RSNA_key_header_c19eapol_RSNA_cipher_eESE_SC_ @ 166 NONAME
+	_ZN17eapol_key_state_cC2EP18abs_eap_am_tools_cP21abs_eapol_key_state_cP16abs_eapol_core_cbPK19eap_am_network_id_c31eapol_key_authentication_type_e @ 167 NONAME
+	_ZN17eapol_key_state_cC2EP18abs_eap_am_tools_cP21abs_eapol_key_state_cP16abs_eapol_core_cbPK19eap_am_network_id_c31eapol_key_authentication_type_ePK19eap_variable_data_cSC_N23eapol_RSNA_key_header_c19eapol_RSNA_cipher_eESE_SC_ @ 168 NONAME
+	_ZN17eapol_key_state_cD0Ev @ 169 NONAME
+	_ZN17eapol_key_state_cD1Ev @ 170 NONAME
+	_ZN17eapol_key_state_cD2Ev @ 171 NONAME
+	_ZN22eapol_RC4_key_header_c10get_key_IVEv @ 172 NONAME
+	_ZN22eapol_RC4_key_header_c12set_key_flagE21eapol_RC4_key_flags_e @ 173 NONAME
+	_ZN22eapol_RC4_key_header_c13set_key_indexEh @ 174 NONAME
+	_ZN22eapol_RC4_key_header_c14set_key_lengthEt @ 175 NONAME
+	_ZN22eapol_RC4_key_header_c17get_header_lengthEv @ 176 NONAME
+	_ZN22eapol_RC4_key_header_c18get_replay_counterEv @ 177 NONAME
+	_ZN22eapol_RC4_key_header_c18zero_key_signatureEP18abs_eap_am_tools_c @ 178 NONAME
+	_ZN22eapol_RC4_key_header_c21set_eapol_packet_typeE19eapol_packet_type_e @ 179 NONAME
+	_ZN22eapol_RC4_key_header_c23set_key_descriptor_typeE27eapol_key_descriptor_type_e @ 180 NONAME
+	_ZN22eapol_RC4_key_header_c26set_eapol_protocol_versionE24eapol_protocol_version_e @ 181 NONAME
+	_ZN22eapol_RC4_key_header_c28set_eapol_packet_body_lengthEt @ 182 NONAME
+	_ZN22eapol_RC4_key_header_cC1EP18abs_eap_am_tools_cPvm @ 183 NONAME
+	_ZN22eapol_RC4_key_header_cC2EP18abs_eap_am_tools_cPvm @ 184 NONAME
+	_ZN22eapol_RC4_key_header_cD0Ev @ 185 NONAME
+	_ZN22eapol_RC4_key_header_cD1Ev @ 186 NONAME
+	_ZN22eapol_RC4_key_header_cD2Ev @ 187 NONAME
+	_ZN23eapol_RSNA_key_header_c11set_bits_onEttmm @ 188 NONAME
+	_ZN23eapol_RSNA_key_header_c12reset_headerEh31eapol_key_authentication_type_eNS_19eapol_RSNA_cipher_eEybbbbbbbbb24eapol_protocol_version_e27eapol_key_descriptor_type_e @ 189 NONAME
+	_ZN23eapol_RSNA_key_header_c12zero_key_MICEP18abs_eap_am_tools_c @ 190 NONAME
+	_ZN23eapol_RSNA_key_header_c12zero_key_RSCEP18abs_eap_am_tools_c @ 191 NONAME
+	_ZN23eapol_RSNA_key_header_c14set_key_lengthEt @ 192 NONAME
+	_ZN23eapol_RSNA_key_header_c14zero_key_NONCEEP18abs_eap_am_tools_c @ 193 NONAME
+	_ZN23eapol_RSNA_key_header_c17get_header_lengthEv @ 194 NONAME
+	_ZN23eapol_RSNA_key_header_c17zero_EAPOL_key_IVEP18abs_eap_am_tools_c @ 195 NONAME
+	_ZN23eapol_RSNA_key_header_c17zero_key_reservedEP18abs_eap_am_tools_c @ 196 NONAME
+	_ZN23eapol_RSNA_key_header_c19set_key_data_lengthEt @ 197 NONAME
+	_ZN23eapol_RSNA_key_header_c19set_key_informationEt @ 198 NONAME
+	_ZN23eapol_RSNA_key_header_c21set_eapol_packet_typeE19eapol_packet_type_e @ 199 NONAME
+	_ZN23eapol_RSNA_key_header_c22set_key_replay_counterEy @ 200 NONAME
+	_ZN23eapol_RSNA_key_header_c23set_key_descriptor_typeE27eapol_key_descriptor_type_e @ 201 NONAME
+	_ZN23eapol_RSNA_key_header_c24zero_key_STA_MAC_addressEP18abs_eap_am_tools_c @ 202 NONAME
+	_ZN23eapol_RSNA_key_header_c25set_key_information_errorEb @ 203 NONAME
+	_ZN23eapol_RSNA_key_header_c26set_eapol_protocol_versionE24eapol_protocol_version_e @ 204 NONAME
+	_ZN23eapol_RSNA_key_header_c26set_key_information_secureEb @ 205 NONAME
+	_ZN23eapol_RSNA_key_header_c27set_key_information_installEb @ 206 NONAME
+	_ZN23eapol_RSNA_key_header_c27set_key_information_key_MICEb @ 207 NONAME
+	_ZN23eapol_RSNA_key_header_c27set_key_information_key_ackEb @ 208 NONAME
+	_ZN23eapol_RSNA_key_header_c27set_key_information_requestEb @ 209 NONAME
+	_ZN23eapol_RSNA_key_header_c28set_eapol_packet_body_lengthEm @ 210 NONAME
+	_ZN23eapol_RSNA_key_header_c28set_key_information_key_typeEb @ 211 NONAME
+	_ZN23eapol_RSNA_key_header_c29set_key_information_key_indexEh @ 212 NONAME
+	_ZN23eapol_RSNA_key_header_c36zero_EAPOL_header_and_Key_descriptorEP18abs_eap_am_tools_c @ 213 NONAME
+	_ZN23eapol_RSNA_key_header_c38set_key_information_encrypted_key_dataEb @ 214 NONAME
+	_ZN23eapol_RSNA_key_header_c42set_key_information_key_descriptor_versionEh @ 215 NONAME
+	_ZN23eapol_RSNA_key_header_cC1EP18abs_eap_am_tools_cbbPvm @ 216 NONAME
+	_ZN23eapol_RSNA_key_header_cC2EP18abs_eap_am_tools_cbbPvm @ 217 NONAME
+	_ZN23eapol_RSNA_key_header_cD0Ev @ 218 NONAME
+	_ZN23eapol_RSNA_key_header_cD1Ev @ 219 NONAME
+	_ZN23eapol_RSNA_key_header_cD2Ev @ 220 NONAME
+	_ZN24eapol_key_state_string_c26get_eapol_key_state_stringE17eapol_key_state_e @ 221 NONAME
+	_ZN24eapol_key_state_string_c35get_eapol_key_handshake_type_stringE26eapol_key_handshake_type_e @ 222 NONAME
+	_ZN24eapol_key_state_string_c36get_eapol_key_descriptor_type_stringE27eapol_key_descriptor_type_e @ 223 NONAME
+	_ZN24eapol_key_state_string_c40get_eapol_key_authentication_type_stringE31eapol_key_authentication_type_e @ 224 NONAME
+	_ZN24eapol_key_state_string_cC1Ev @ 225 NONAME
+	_ZN24eapol_key_state_string_cC2Ev @ 226 NONAME
+	_ZN24eapol_key_state_string_cD0Ev @ 227 NONAME
+	_ZN24eapol_key_state_string_cD1Ev @ 228 NONAME
+	_ZN24eapol_key_state_string_cD2Ev @ 229 NONAME
+	_ZN26eapol_rsna_variable_data_c10set_bufferEPK28eapol_rsna_key_data_header_cPhmbb @ 230 NONAME
+	_ZN26eapol_rsna_variable_data_cC1EP18abs_eap_am_tools_cbb @ 231 NONAME
+	_ZN26eapol_rsna_variable_data_cC2EP18abs_eap_am_tools_cbb @ 232 NONAME
+	_ZN26eapol_rsna_variable_data_cD0Ev @ 233 NONAME
+	_ZN26eapol_rsna_variable_data_cD1Ev @ 234 NONAME
+	_ZN26eapol_rsna_variable_data_cD2Ev @ 235 NONAME
+	_ZN27eapol_wlan_authentication_c11load_moduleE19eap_expanded_type_cS0_P19abs_eap_base_type_cPP15eap_base_type_cbPK19eap_am_network_id_c @ 236 NONAME
+	_ZN27eapol_wlan_authentication_c11packet_sendEPK19eap_am_network_id_cP18eap_buf_chain_wr_cmmm @ 237 NONAME
+	_ZN27eapol_wlan_authentication_c12add_rogue_apER11eap_array_cI20eap_rogue_ap_entry_cE @ 238 NONAME
+	_ZN27eapol_wlan_authentication_c12cancel_timerEP20abs_eap_base_timer_cm @ 239 NONAME
+	_ZN27eapol_wlan_authentication_c12get_is_validEv @ 240 NONAME
+	_ZN27eapol_wlan_authentication_c12set_is_validEv @ 241 NONAME
+	_ZN27eapol_wlan_authentication_c13get_is_clientEv @ 242 NONAME
+	_ZN27eapol_wlan_authentication_c13timer_expiredEmPv @ 243 NONAME
+	_ZN27eapol_wlan_authentication_c13unload_moduleE19eap_expanded_type_c @ 244 NONAME
+	_ZN27eapol_wlan_authentication_c14disassociationEPK19eap_am_network_id_c @ 245 NONAME
+	_ZN27eapol_wlan_authentication_c14packet_processEPK19eap_am_network_id_cP25eap_general_header_base_cm @ 246 NONAME
+	_ZN27eapol_wlan_authentication_c14read_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 247 NONAME
+	_ZN27eapol_wlan_authentication_c15eap_acknowledgeEPK19eap_am_network_id_c @ 248 NONAME
+	_ZN27eapol_wlan_authentication_c15write_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 249 NONAME
+	_ZN27eapol_wlan_authentication_c16tkip_mic_failureEPK19eap_am_network_id_cbN23eapol_RSNA_key_header_c29eapol_tkip_mic_failure_type_eE @ 250 NONAME
+	_ZN27eapol_wlan_authentication_c17cancel_all_timersEv @ 251 NONAME
+	_ZN27eapol_wlan_authentication_c17check_pmksa_cacheEP11eap_array_cI19eap_am_network_id_cE31eapol_key_authentication_type_eN23eapol_RSNA_key_header_c19eapol_RSNA_cipher_eES6_ @ 252 NONAME
+	_ZN27eapol_wlan_authentication_c17get_eap_type_listEP11eap_array_cI19eap_expanded_type_cE @ 253 NONAME
+	_ZN27eapol_wlan_authentication_c17get_header_offsetEPmS0_ @ 254 NONAME
+	_ZN27eapol_wlan_authentication_c17timer_delete_dataEmPv @ 255 NONAME
+	_ZN27eapol_wlan_authentication_c18state_notificationEPK28abs_eap_state_notification_c @ 256 NONAME
+	_ZN27eapol_wlan_authentication_c19start_reassociationEPK19eap_am_network_id_cS2_31eapol_key_authentication_type_e @ 257 NONAME
+	_ZN27eapol_wlan_authentication_c20complete_associationE33eapol_wlan_authentication_state_ePK19eap_am_network_id_cPK19eap_variable_data_cS6_N23eapol_RSNA_key_header_c19eapol_RSNA_cipher_eES8_ @ 258 NONAME
+	_ZN27eapol_wlan_authentication_c20start_authenticationEPK19eap_variable_data_c31eapol_key_authentication_type_eS2_bPK19eap_am_network_id_c @ 259 NONAME
+	_ZN27eapol_wlan_authentication_c21get_current_eap_indexEv @ 260 NONAME
+	_ZN27eapol_wlan_authentication_c21set_current_eap_indexEm @ 261 NONAME
+	_ZN27eapol_wlan_authentication_c22complete_reassociationE33eapol_wlan_authentication_state_ePK19eap_am_network_id_cPK19eap_variable_data_cS6_N23eapol_RSNA_key_header_c19eapol_RSNA_cipher_eES8_ @ 262 NONAME
+	_ZN27eapol_wlan_authentication_c23check_is_valid_eap_typeE19eap_expanded_type_c @ 263 NONAME
+	_ZN27eapol_wlan_authentication_c23complete_disassociationEbPK19eap_am_network_id_c @ 264 NONAME
+	_ZN27eapol_wlan_authentication_c23packet_data_session_keyEPK19eap_am_network_id_cPK19eapol_session_key_c @ 265 NONAME
+	_ZN27eapol_wlan_authentication_c23start_preauthenticationEPK19eap_am_network_id_c @ 266 NONAME
+	_ZN27eapol_wlan_authentication_c24start_WPXM_reassociationEPK19eap_am_network_id_cS2_P19eap_variable_data_cPKS3_S6_ @ 267 NONAME
+	_ZN27eapol_wlan_authentication_c26get_authentication_counterEv @ 268 NONAME
+	_ZN27eapol_wlan_authentication_c26save_simple_config_sessionE21simple_config_state_ePK11eap_array_cI26simple_config_credential_cEPK19eap_variable_data_c34simple_config_Device_Password_ID_ePK24simple_config_payloads_c @ 269 NONAME
+	_ZN27eapol_wlan_authentication_c27complete_WPXM_reassociationE33eapol_wlan_authentication_state_ePK19eap_am_network_id_cPK19eap_variable_data_c @ 270 NONAME
+	_ZN27eapol_wlan_authentication_c29new_eapol_wlan_authenticationEP18abs_eap_am_tools_cP31abs_eapol_wlan_authentication_cb @ 271 NONAME
+	_ZN27eapol_wlan_authentication_c32increment_authentication_counterEv @ 272 NONAME
+	_ZN27eapol_wlan_authentication_c33set_eap_database_reference_valuesEPK19eap_variable_data_c @ 273 NONAME
+	_ZN27eapol_wlan_authentication_c39complete_get_802_11_authentication_modeE12eap_status_ePK19eap_am_network_id_c38eapol_key_802_11_authentication_mode_e @ 274 NONAME
+	_ZN27eapol_wlan_authentication_c8shutdownEv @ 275 NONAME
+	_ZN27eapol_wlan_authentication_c9configureEv @ 276 NONAME
+	_ZN27eapol_wlan_authentication_c9set_timerEP20abs_eap_base_timer_cmPvm @ 277 NONAME
+	_ZN27eapol_wlan_authentication_cC1EP18abs_eap_am_tools_cP31abs_eapol_wlan_authentication_cP30eapol_am_wlan_authentication_cb @ 278 NONAME
+	_ZN27eapol_wlan_authentication_cC2EP18abs_eap_am_tools_cP31abs_eapol_wlan_authentication_cP30eapol_am_wlan_authentication_cb @ 279 NONAME
+	_ZN27eapol_wlan_authentication_cD0Ev @ 280 NONAME
+	_ZN27eapol_wlan_authentication_cD1Ev @ 281 NONAME
+	_ZN27eapol_wlan_authentication_cD2Ev @ 282 NONAME
+	_ZN28eap_core_client_message_if_c12get_is_validEv @ 283 NONAME
+	_ZN28eap_core_client_message_if_c12set_is_validEv @ 284 NONAME
+	_ZN28eap_core_client_message_if_c13timer_expiredEmPv @ 285 NONAME
+	_ZN28eap_core_client_message_if_c14packet_processEPK19eap_am_network_id_cP25eap_general_header_base_cm @ 286 NONAME
+	_ZN28eap_core_client_message_if_c15eap_acknowledgeEPK19eap_am_network_id_c @ 287 NONAME
+	_ZN28eap_core_client_message_if_c15process_messageEP30eap_process_tlv_message_data_c @ 288 NONAME
+	_ZN28eap_core_client_message_if_c17timer_delete_dataEmPv @ 289 NONAME
+	_ZN28eap_core_client_message_if_c18create_eap_sessionEPK19eap_am_network_id_c @ 290 NONAME
+	_ZN28eap_core_client_message_if_c18remove_eap_sessionEbPK19eap_am_network_id_c @ 291 NONAME
+	_ZN28eap_core_client_message_if_c23cancel_all_eap_sessionsEv @ 292 NONAME
+	_ZN28eap_core_client_message_if_c25send_eap_identity_requestEPK19eap_am_network_id_c @ 293 NONAME
+	_ZN28eap_core_client_message_if_c33set_eap_database_reference_valuesEPK19eap_variable_data_c @ 294 NONAME
+	_ZN28eap_core_client_message_if_c5resetEv @ 295 NONAME
+	_ZN28eap_core_client_message_if_c8shutdownEv @ 296 NONAME
+	_ZN28eap_core_client_message_if_c9configureEv @ 297 NONAME
+	_ZN28eap_core_client_message_if_c9send_dataEPKvm @ 298 NONAME
+	_ZN28eap_core_client_message_if_cC1EP18abs_eap_am_tools_cP19eap_am_message_if_cP22abs_eap_session_core_cb @ 299 NONAME
+	_ZN28eap_core_client_message_if_cC2EP18abs_eap_am_tools_cP19eap_am_message_if_cP22abs_eap_session_core_cb @ 300 NONAME
+	_ZN28eap_core_client_message_if_cD0Ev @ 301 NONAME
+	_ZN28eap_core_client_message_if_cD1Ev @ 302 NONAME
+	_ZN28eap_core_client_message_if_cD2Ev @ 303 NONAME
+	_ZN30eapol_am_wlan_authentication_c32new_eapol_am_wlan_authenticationEP18abs_eap_am_tools_cb @ 304 NONAME
+	_ZN30eapol_rsna_key_data_payloads_c14check_payloadsENS_36eapol_rsna_key_data_payload_status_eES0_S0_S0_ @ 305 NONAME
+	_ZN30eapol_rsna_key_data_payloads_c17check_one_payloadENS_36eapol_rsna_key_data_payload_status_eEPK11eap_array_cI19eap_variable_data_cE @ 306 NONAME
+	_ZN30eapol_rsna_key_data_payloads_c17check_one_payloadENS_36eapol_rsna_key_data_payload_status_eEPK26eapol_rsna_variable_data_c @ 307 NONAME
+	_ZN30eapol_rsna_key_data_payloads_cC1EP18abs_eap_am_tools_cbb @ 308 NONAME
+	_ZN30eapol_rsna_key_data_payloads_cC2EP18abs_eap_am_tools_cbb @ 309 NONAME
+	_ZN30eapol_rsna_key_data_payloads_cD0Ev @ 310 NONAME
+	_ZN30eapol_rsna_key_data_payloads_cD1Ev @ 311 NONAME
+	_ZN30eapol_rsna_key_data_payloads_cD2Ev @ 312 NONAME
+	_ZN31eapol_handle_tlv_message_data_c12get_is_validEv @ 313 NONAME
+	_ZN31eapol_handle_tlv_message_data_cC1EP18abs_eap_am_tools_c @ 314 NONAME
+	_ZN31eapol_handle_tlv_message_data_cC2EP18abs_eap_am_tools_c @ 315 NONAME
+	_ZN31eapol_handle_tlv_message_data_cD0Ev @ 316 NONAME
+	_ZN31eapol_handle_tlv_message_data_cD1Ev @ 317 NONAME
+	_ZN31eapol_handle_tlv_message_data_cD2Ev @ 318 NONAME
+	_ZN35eapol_message_wlan_authentication_c11packet_sendEPK19eap_am_network_id_cP18eap_buf_chain_wr_cmmm @ 319 NONAME
+	_ZN35eapol_message_wlan_authentication_c11reassociateEPK19eap_am_network_id_c31eapol_key_authentication_type_ePK19eap_variable_data_c @ 320 NONAME
+	_ZN35eapol_message_wlan_authentication_c12add_rogue_apER11eap_array_cI20eap_rogue_ap_entry_cE @ 321 NONAME
+	_ZN35eapol_message_wlan_authentication_c12disassociateEPK19eap_am_network_id_cb @ 322 NONAME
+	_ZN35eapol_message_wlan_authentication_c12get_is_validEv @ 323 NONAME
+	_ZN35eapol_message_wlan_authentication_c12process_dataEPKvm @ 324 NONAME
+	_ZN35eapol_message_wlan_authentication_c12send_messageEP31eapol_handle_tlv_message_data_c @ 325 NONAME
+	_ZN35eapol_message_wlan_authentication_c13timer_expiredEmPv @ 326 NONAME
+	_ZN35eapol_message_wlan_authentication_c14disassociationEPK11eap_array_cI16eap_tlv_header_cE @ 327 NONAME
+	_ZN35eapol_message_wlan_authentication_c14packet_processEPK11eap_array_cI16eap_tlv_header_cE @ 328 NONAME
+	_ZN35eapol_message_wlan_authentication_c15eap_acknowledgeEPK11eap_array_cI16eap_tlv_header_cE @ 329 NONAME
+	_ZN35eapol_message_wlan_authentication_c15process_messageEP31eapol_handle_tlv_message_data_c @ 330 NONAME
+	_ZN35eapol_message_wlan_authentication_c16tkip_mic_failureEPK11eap_array_cI16eap_tlv_header_cE @ 331 NONAME
+	_ZN35eapol_message_wlan_authentication_c17check_pmksa_cacheEPK11eap_array_cI16eap_tlv_header_cE @ 332 NONAME
+	_ZN35eapol_message_wlan_authentication_c17get_header_offsetEPmS0_ @ 333 NONAME
+	_ZN35eapol_message_wlan_authentication_c17timer_delete_dataEmPv @ 334 NONAME
+	_ZN35eapol_message_wlan_authentication_c18send_error_messageE12eap_status_e31eap_tlv_message_type_function_e @ 335 NONAME
+	_ZN35eapol_message_wlan_authentication_c18state_notificationEPK28abs_eap_state_notification_c @ 336 NONAME
+	_ZN35eapol_message_wlan_authentication_c19start_reassociationEPK11eap_array_cI16eap_tlv_header_cE @ 337 NONAME
+	_ZN35eapol_message_wlan_authentication_c20complete_associationEPK11eap_array_cI16eap_tlv_header_cE @ 338 NONAME
+	_ZN35eapol_message_wlan_authentication_c20start_authenticationEPK11eap_array_cI16eap_tlv_header_cE @ 339 NONAME
+	_ZN35eapol_message_wlan_authentication_c20update_header_offsetEPK11eap_array_cI16eap_tlv_header_cE @ 340 NONAME
+	_ZN35eapol_message_wlan_authentication_c22complete_reassociationEPK11eap_array_cI16eap_tlv_header_cE @ 341 NONAME
+	_ZN35eapol_message_wlan_authentication_c23complete_disassociationEPK19eap_am_network_id_c @ 342 NONAME
+	_ZN35eapol_message_wlan_authentication_c23packet_data_session_keyEPK19eap_am_network_id_cPK19eapol_session_key_c @ 343 NONAME
+	_ZN35eapol_message_wlan_authentication_c23start_preauthenticationEPK11eap_array_cI16eap_tlv_header_cE @ 344 NONAME
+	_ZN35eapol_message_wlan_authentication_c24start_WPXM_reassociationEPK11eap_array_cI16eap_tlv_header_cE @ 345 NONAME
+	_ZN35eapol_message_wlan_authentication_c26complete_check_pmksa_cacheEPK11eap_array_cI19eap_am_network_id_cE @ 346 NONAME
+	_ZN35eapol_message_wlan_authentication_c26process_message_type_errorEPK11eap_array_cI16eap_tlv_header_cE @ 347 NONAME
+	_ZN35eapol_message_wlan_authentication_c26save_simple_config_sessionE21simple_config_state_ePK11eap_array_cI26simple_config_credential_cEPK19eap_variable_data_c34simple_config_Device_Password_ID_ePK24simple_config_payloads_c @ 348 NONAME
+	_ZN35eapol_message_wlan_authentication_c27complete_WPXM_reassociationEPK11eap_array_cI16eap_tlv_header_cE @ 349 NONAME
+	_ZN35eapol_message_wlan_authentication_c37update_wlan_database_reference_valuesEPK11eap_array_cI16eap_tlv_header_cE @ 350 NONAME
+	_ZN35eapol_message_wlan_authentication_c8shutdownEv @ 351 NONAME
+	_ZN35eapol_message_wlan_authentication_c9associateE38eapol_key_802_11_authentication_mode_e @ 352 NONAME
+	_ZN35eapol_message_wlan_authentication_c9configureEmmm @ 353 NONAME
+	_ZN35eapol_message_wlan_authentication_cC1EP18abs_eap_am_tools_cP39abs_eapol_message_wlan_authentication_c @ 354 NONAME
+	_ZN35eapol_message_wlan_authentication_cC2EP18abs_eap_am_tools_cP39abs_eapol_message_wlan_authentication_c @ 355 NONAME
+	_ZN35eapol_message_wlan_authentication_cD0Ev @ 356 NONAME
+	_ZN35eapol_message_wlan_authentication_cD1Ev @ 357 NONAME
+	_ZN35eapol_message_wlan_authentication_cD2Ev @ 358 NONAME
+	_ZN36wlan_eap_if_send_status_conversion_c7convertE12eap_status_e @ 359 NONAME
+	_ZN36wlan_eap_if_send_status_conversion_c7convertE25wlan_eap_if_send_status_e @ 360 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c11associationEPK19eap_am_network_id_c @ 361 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c12cancel_timerEP20abs_eap_base_timer_cm @ 362 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c12get_is_validEv @ 363 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c14disassociationEPK19eap_am_network_id_c @ 364 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c14read_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 365 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c14set_am_partnerEP34abs_eapol_am_wlan_authentication_cP26abs_eap_configuration_if_c @ 366 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c15write_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 367 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c17cancel_all_timersEv @ 368 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c19set_wlan_parametersEPK19eap_variable_data_cbS2_31eapol_key_authentication_type_e @ 369 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c22get_wlan_configurationEP19eap_variable_data_c @ 370 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c23authentication_finishedEb19eap_expanded_type_c31eapol_key_authentication_type_e @ 371 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c23reset_wpa_configurationEv @ 372 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c26save_simple_config_sessionE21simple_config_state_ePK11eap_array_cI26simple_config_credential_cEPK19eap_variable_data_c34simple_config_Device_Password_ID_ePK24simple_config_payloads_c @ 373 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c33set_eap_database_reference_valuesEPK19eap_variable_data_c @ 374 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c8shutdownEv @ 375 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c9configureEv @ 376 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_c9set_timerEP20abs_eap_base_timer_cmPvm @ 377 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_cC1EP18abs_eap_am_tools_cb @ 378 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_cC2EP18abs_eap_am_tools_cb @ 379 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_cD0Ev @ 380 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_cD1Ev @ 381 NONAME
+	_ZN38eapol_am_wlan_authentication_symbian_cD2Ev @ 382 NONAME
+	_ZNK17eapol_key_state_c19get_eapol_key_stateEv @ 383 NONAME
+	_ZNK22eapol_RC4_key_header_c12check_headerEv @ 384 NONAME
+	_ZNK22eapol_RC4_key_header_c12get_key_flagEv @ 385 NONAME
+	_ZNK22eapol_RC4_key_header_c13get_key_indexEv @ 386 NONAME
+	_ZNK22eapol_RC4_key_header_c14get_key_lengthEv @ 387 NONAME
+	_ZNK22eapol_RC4_key_header_c17get_key_signatureEv @ 388 NONAME
+	_ZNK22eapol_RC4_key_header_c21get_eapol_packet_typeEv @ 389 NONAME
+	_ZNK22eapol_RC4_key_header_c23get_key_descriptor_typeEv @ 390 NONAME
+	_ZNK22eapol_RC4_key_header_c26get_eapol_protocol_versionEv @ 391 NONAME
+	_ZNK22eapol_RC4_key_header_c28get_eapol_packet_body_lengthEv @ 392 NONAME
+	_ZNK22eapol_RC4_key_header_c7get_keyEv @ 393 NONAME
+	_ZNK23eapol_RSNA_key_header_c11get_key_MICEv @ 394 NONAME
+	_ZNK23eapol_RSNA_key_header_c11get_key_RSCEv @ 395 NONAME
+	_ZNK23eapol_RSNA_key_header_c12check_headerEv @ 396 NONAME
+	_ZNK23eapol_RSNA_key_header_c12get_key_dataEm @ 397 NONAME
+	_ZNK23eapol_RSNA_key_header_c13get_key_NONCEEv @ 398 NONAME
+	_ZNK23eapol_RSNA_key_header_c14get_key_lengthEv @ 399 NONAME
+	_ZNK23eapol_RSNA_key_header_c16get_EAPOL_key_IVEv @ 400 NONAME
+	_ZNK23eapol_RSNA_key_header_c16get_key_reservedEv @ 401 NONAME
+	_ZNK23eapol_RSNA_key_header_c19get_key_data_lengthEv @ 402 NONAME
+	_ZNK23eapol_RSNA_key_header_c19get_key_data_offsetEmm @ 403 NONAME
+	_ZNK23eapol_RSNA_key_header_c19get_key_informationEv @ 404 NONAME
+	_ZNK23eapol_RSNA_key_header_c21get_eapol_packet_typeEv @ 405 NONAME
+	_ZNK23eapol_RSNA_key_header_c22get_key_replay_counterEv @ 406 NONAME
+	_ZNK23eapol_RSNA_key_header_c23get_eapol_packet_lengthEv @ 407 NONAME
+	_ZNK23eapol_RSNA_key_header_c23get_key_STA_MAC_addressEv @ 408 NONAME
+	_ZNK23eapol_RSNA_key_header_c23get_key_descriptor_typeEv @ 409 NONAME
+	_ZNK23eapol_RSNA_key_header_c25get_key_information_errorEv @ 410 NONAME
+	_ZNK23eapol_RSNA_key_header_c26get_eapol_protocol_versionEv @ 411 NONAME
+	_ZNK23eapol_RSNA_key_header_c26get_key_information_secureEv @ 412 NONAME
+	_ZNK23eapol_RSNA_key_header_c27get_key_information_installEv @ 413 NONAME
+	_ZNK23eapol_RSNA_key_header_c27get_key_information_key_MICEv @ 414 NONAME
+	_ZNK23eapol_RSNA_key_header_c27get_key_information_key_ackEv @ 415 NONAME
+	_ZNK23eapol_RSNA_key_header_c27get_key_information_requestEv @ 416 NONAME
+	_ZNK23eapol_RSNA_key_header_c28get_eapol_packet_body_lengthEv @ 417 NONAME
+	_ZNK23eapol_RSNA_key_header_c28get_key_information_key_typeEv @ 418 NONAME
+	_ZNK23eapol_RSNA_key_header_c29get_key_information_key_indexEv @ 419 NONAME
+	_ZNK23eapol_RSNA_key_header_c30get_key_information_reserved_aEv @ 420 NONAME
+	_ZNK23eapol_RSNA_key_header_c30get_key_information_reserved_bEv @ 421 NONAME
+	_ZNK23eapol_RSNA_key_header_c38get_key_information_encrypted_key_dataEv @ 422 NONAME
+	_ZNK23eapol_RSNA_key_header_c42get_key_information_key_descriptor_versionEv @ 423 NONAME
+	_ZNK26eapol_rsna_variable_data_c19get_original_headerEv @ 424 NONAME
+	_ZTI12eapol_core_c @ 425 NONAME
+	_ZTI15ethernet_core_c @ 426 NONAME
+	_ZTI17eapol_key_state_c @ 427 NONAME
+	_ZTI22eapol_RC4_key_header_c @ 428 NONAME
+	_ZTI23eapol_RSNA_key_header_c @ 429 NONAME
+	_ZTI24eapol_key_state_string_c @ 430 NONAME
+	_ZTI26eapol_rsna_variable_data_c @ 431 NONAME
+	_ZTI27eapol_wlan_authentication_c @ 432 NONAME
+	_ZTI28eap_core_client_message_if_c @ 433 NONAME
+	_ZTI28eapol_rsna_key_data_header_c @ 434 NONAME
+	_ZTI30eapol_am_wlan_authentication_c @ 435 NONAME
+	_ZTI30eapol_rsna_key_data_payloads_c @ 436 NONAME
+	_ZTI31eapol_handle_tlv_message_data_c @ 437 NONAME
+	_ZTI32eapol_rsna_key_data_gtk_header_c @ 438 NONAME
+	_ZTI35eapol_message_wlan_authentication_c @ 439 NONAME
+	_ZTI38eapol_am_wlan_authentication_symbian_c @ 440 NONAME
+	_ZTV12eapol_core_c @ 441 NONAME
+	_ZTV15ethernet_core_c @ 442 NONAME
+	_ZTV17eapol_key_state_c @ 443 NONAME
+	_ZTV22eapol_RC4_key_header_c @ 444 NONAME
+	_ZTV23eapol_RSNA_key_header_c @ 445 NONAME
+	_ZTV24eapol_key_state_string_c @ 446 NONAME
+	_ZTV26eapol_rsna_variable_data_c @ 447 NONAME
+	_ZTV27eapol_wlan_authentication_c @ 448 NONAME
+	_ZTV28eap_core_client_message_if_c @ 449 NONAME
+	_ZTV28eapol_rsna_key_data_header_c @ 450 NONAME
+	_ZTV30eapol_am_wlan_authentication_c @ 451 NONAME
+	_ZTV30eapol_rsna_key_data_payloads_c @ 452 NONAME
+	_ZTV31eapol_handle_tlv_message_data_c @ 453 NONAME
+	_ZTV32eapol_rsna_key_data_gtk_header_c @ 454 NONAME
+	_ZTV35eapol_message_wlan_authentication_c @ 455 NONAME
+	_ZTV38eapol_am_wlan_authentication_symbian_c @ 456 NONAME
+	_ZThn12_N12eapol_core_c12cancel_timerEP20abs_eap_base_timer_cm @ 457 NONAME
+	_ZThn12_N12eapol_core_c14read_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 458 NONAME
+	_ZThn12_N12eapol_core_c15write_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 459 NONAME
+	_ZThn12_N12eapol_core_c18state_notificationEPK28abs_eap_state_notification_c @ 460 NONAME
+	_ZThn12_N12eapol_core_c23packet_data_session_keyEPK19eap_am_network_id_cPK19eapol_session_key_c @ 461 NONAME
+	_ZThn12_N12eapol_core_c36get_and_increment_global_key_counterEP19eap_variable_data_c @ 462 NONAME
+	_ZThn12_N12eapol_core_c9set_timerEP20abs_eap_base_timer_cmPvm @ 463 NONAME
+	_ZThn12_N12eapol_core_cD0Ev @ 464 NONAME
+	_ZThn12_N12eapol_core_cD1Ev @ 465 NONAME
+	_ZThn12_N27eapol_wlan_authentication_c33set_eap_database_reference_valuesEPK19eap_variable_data_c @ 466 NONAME
+	_ZThn12_N27eapol_wlan_authentication_cD1Ev @ 467 NONAME
+	_ZThn12_N28eap_core_client_message_if_c12get_is_validEv @ 468 NONAME
+	_ZThn12_N28eap_core_client_message_if_c12set_is_validEv @ 469 NONAME
+	_ZThn12_N28eap_core_client_message_if_c14packet_processEPK19eap_am_network_id_cP25eap_general_header_base_cm @ 470 NONAME
+	_ZThn12_N28eap_core_client_message_if_c8shutdownEv @ 471 NONAME
+	_ZThn12_N28eap_core_client_message_if_c9configureEv @ 472 NONAME
+	_ZThn12_N28eap_core_client_message_if_cD0Ev @ 473 NONAME
+	_ZThn12_N28eap_core_client_message_if_cD1Ev @ 474 NONAME
+	_ZThn16_N12eapol_core_cD0Ev @ 475 NONAME
+	_ZThn16_N12eapol_core_cD1Ev @ 476 NONAME
+	_ZThn16_N27eapol_wlan_authentication_c26save_simple_config_sessionE21simple_config_state_ePK11eap_array_cI26simple_config_credential_cEPK19eap_variable_data_c34simple_config_Device_Password_ID_ePK24simple_config_payloads_c @ 477 NONAME
+	_ZThn16_N27eapol_wlan_authentication_cD1Ev @ 478 NONAME
+	_ZThn20_N12eapol_core_c33set_eap_database_reference_valuesEPK19eap_variable_data_c @ 479 NONAME
+	_ZThn20_N12eapol_core_cD0Ev @ 480 NONAME
+	_ZThn20_N12eapol_core_cD1Ev @ 481 NONAME
+	_ZThn4_N12eapol_core_c13timer_expiredEmPv @ 482 NONAME
+	_ZThn4_N12eapol_core_c17timer_delete_dataEmPv @ 483 NONAME
+	_ZThn4_N12eapol_core_cD0Ev @ 484 NONAME
+	_ZThn4_N12eapol_core_cD1Ev @ 485 NONAME
+	_ZThn4_N15ethernet_core_c12get_is_validEv @ 486 NONAME
+	_ZThn4_N15ethernet_core_c12set_is_validEv @ 487 NONAME
+	_ZThn4_N15ethernet_core_c14packet_processEPK19eap_am_network_id_cP25eap_general_header_base_cm @ 488 NONAME
+	_ZThn4_N15ethernet_core_c8shutdownEv @ 489 NONAME
+	_ZThn4_N15ethernet_core_c9configureEv @ 490 NONAME
+	_ZThn4_N15ethernet_core_cD0Ev @ 491 NONAME
+	_ZThn4_N15ethernet_core_cD1Ev @ 492 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c11load_moduleE19eap_expanded_type_cS0_P19abs_eap_base_type_cPP15eap_base_type_cbPK19eap_am_network_id_c @ 493 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c11packet_sendEPK19eap_am_network_id_cP18eap_buf_chain_wr_cmmm @ 494 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c12add_rogue_apER11eap_array_cI20eap_rogue_ap_entry_cE @ 495 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c12cancel_timerEP20abs_eap_base_timer_cm @ 496 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c13get_is_clientEv @ 497 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c13unload_moduleE19eap_expanded_type_c @ 498 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c14read_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 499 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c15write_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 500 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c17cancel_all_timersEv @ 501 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c17get_eap_type_listEP11eap_array_cI19eap_expanded_type_cE @ 502 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c17get_header_offsetEPmS0_ @ 503 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c18state_notificationEPK28abs_eap_state_notification_c @ 504 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c23check_is_valid_eap_typeE19eap_expanded_type_c @ 505 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c23complete_disassociationEbPK19eap_am_network_id_c @ 506 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c23packet_data_session_keyEPK19eap_am_network_id_cPK19eapol_session_key_c @ 507 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c26save_simple_config_sessionE21simple_config_state_ePK11eap_array_cI26simple_config_credential_cEPK19eap_variable_data_c34simple_config_Device_Password_ID_ePK24simple_config_payloads_c @ 508 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c39complete_get_802_11_authentication_modeE12eap_status_ePK19eap_am_network_id_c38eapol_key_802_11_authentication_mode_e @ 509 NONAME
+	_ZThn4_N27eapol_wlan_authentication_c9set_timerEP20abs_eap_base_timer_cmPvm @ 510 NONAME
+	_ZThn4_N27eapol_wlan_authentication_cD1Ev @ 511 NONAME
+	_ZThn4_N28eap_core_client_message_if_c12get_is_validEv @ 512 NONAME
+	_ZThn4_N28eap_core_client_message_if_c14packet_processEPK19eap_am_network_id_cP25eap_general_header_base_cm @ 513 NONAME
+	_ZThn4_N28eap_core_client_message_if_c15eap_acknowledgeEPK19eap_am_network_id_c @ 514 NONAME
+	_ZThn4_N28eap_core_client_message_if_c18create_eap_sessionEPK19eap_am_network_id_c @ 515 NONAME
+	_ZThn4_N28eap_core_client_message_if_c18remove_eap_sessionEbPK19eap_am_network_id_c @ 516 NONAME
+	_ZThn4_N28eap_core_client_message_if_c23cancel_all_eap_sessionsEv @ 517 NONAME
+	_ZThn4_N28eap_core_client_message_if_c25send_eap_identity_requestEPK19eap_am_network_id_c @ 518 NONAME
+	_ZThn4_N28eap_core_client_message_if_c33set_eap_database_reference_valuesEPK19eap_variable_data_c @ 519 NONAME
+	_ZThn4_N28eap_core_client_message_if_c5resetEv @ 520 NONAME
+	_ZThn4_N28eap_core_client_message_if_c8shutdownEv @ 521 NONAME
+	_ZThn4_N28eap_core_client_message_if_c9configureEv @ 522 NONAME
+	_ZThn4_N28eap_core_client_message_if_cD0Ev @ 523 NONAME
+	_ZThn4_N28eap_core_client_message_if_cD1Ev @ 524 NONAME
+	_ZThn4_N35eapol_message_wlan_authentication_c13timer_expiredEmPv @ 525 NONAME
+	_ZThn4_N35eapol_message_wlan_authentication_c17timer_delete_dataEmPv @ 526 NONAME
+	_ZThn4_N35eapol_message_wlan_authentication_cD0Ev @ 527 NONAME
+	_ZThn4_N35eapol_message_wlan_authentication_cD1Ev @ 528 NONAME
+	_ZThn4_N38eapol_am_wlan_authentication_symbian_c26save_simple_config_sessionE21simple_config_state_ePK11eap_array_cI26simple_config_credential_cEPK19eap_variable_data_c34simple_config_Device_Password_ID_ePK24simple_config_payloads_c @ 529 NONAME
+	_ZThn4_N38eapol_am_wlan_authentication_symbian_cD0Ev @ 530 NONAME
+	_ZThn4_N38eapol_am_wlan_authentication_symbian_cD1Ev @ 531 NONAME
+	_ZThn8_N12eapol_core_c12get_is_validEv @ 532 NONAME
+	_ZThn8_N12eapol_core_c12set_is_validEv @ 533 NONAME
+	_ZThn8_N12eapol_core_c14packet_processEPK19eap_am_network_id_cP25eap_general_header_base_cm @ 534 NONAME
+	_ZThn8_N12eapol_core_c8shutdownEv @ 535 NONAME
+	_ZThn8_N12eapol_core_c9configureEv @ 536 NONAME
+	_ZThn8_N12eapol_core_cD0Ev @ 537 NONAME
+	_ZThn8_N12eapol_core_cD1Ev @ 538 NONAME
+	_ZThn8_N15ethernet_core_c33set_eap_database_reference_valuesEPK19eap_variable_data_c @ 539 NONAME
+	_ZThn8_N15ethernet_core_cD0Ev @ 540 NONAME
+	_ZThn8_N15ethernet_core_cD1Ev @ 541 NONAME
+	_ZThn8_N27eapol_wlan_authentication_c13timer_expiredEmPv @ 542 NONAME
+	_ZThn8_N27eapol_wlan_authentication_c17timer_delete_dataEmPv @ 543 NONAME
+	_ZThn8_N27eapol_wlan_authentication_cD1Ev @ 544 NONAME
+	_ZThn8_N28eap_core_client_message_if_c13timer_expiredEmPv @ 545 NONAME
+	_ZThn8_N28eap_core_client_message_if_c17timer_delete_dataEmPv @ 546 NONAME
+	_ZThn8_N28eap_core_client_message_if_cD0Ev @ 547 NONAME
+	_ZThn8_N28eap_core_client_message_if_cD1Ev @ 548 NONAME
+
--- a/eapol/eapol_framework/eapol_symbian/am/common/DSS_random/dss_random_symbian.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/common/DSS_random/dss_random_symbian.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_symbian/am/common/file_io/symbian/eap_am_file_input_symbian.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/common/file_io/symbian/eap_am_file_input_symbian.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 14 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/common/symbian/EapConfigToolsSymbian.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,281 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 2 %
+*/
+
+// This is enumeration of EAPOL source code.
+#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
+	#undef EAP_FILE_NUMBER_ENUM
+	#define EAP_FILE_NUMBER_ENUM 151 
+	#undef EAP_FILE_NUMBER_DATE 
+	#define EAP_FILE_NUMBER_DATE 1127594498 
+#endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
+
+#include "eap_config.h"
+#include "eap_file_config.h"
+#include "eap_am_file_input_symbian.h"
+#include "eap_automatic_variable.h"
+#include "EapConfigToolsSymbian.h"
+
+#include "EapConversion.h"
+
+#include <EapPluginTools.h>
+
+//--------------------------------------------------
+
+eap_status_e EapConfigToolsSymbian::EapReadDefaultConfigFileSymbian(
+	abs_eap_am_tools_c * const aAmTools,
+	eap_file_config_c ** const aFileconfig)
+{
+	EAP_TRACE_BEGIN(aAmTools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		aAmTools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("eapol_read_default_config_file_symbian()\n")));
+	EAP_TRACE_RETURN_STRING(aAmTools, "returns: eapol_read_default_config_file_symbian()");
+
+	TInt error(KErrNone);
+	eap_status_e status(eap_status_ok);
+
+	(*aFileconfig) = 0;
+
+#if defined(USE_EAP_FILECONFIG)
+	{
+		eap_am_file_input_symbian_c * const fileio = new eap_am_file_input_symbian_c(aAmTools);
+
+		eap_automatic_variable_c<eap_am_file_input_symbian_c> automatic_fileio(aAmTools, fileio);
+
+		if (fileio != 0
+			&& fileio->get_is_valid() == true)
+		{
+			EAP_TRACE_DEBUG(
+				aAmTools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("Initialize file configuration.\n")));
+
+			eap_variable_data_c config_file_name(aAmTools);
+
+			{
+				TFileName aPrivateDatabasePathName;
+
+				TRAP(error, EapPluginTools::GetPrivatePathL(
+					aPrivateDatabasePathName));
+				if (error != KErrNone)
+				{
+					eap_status_e status(aAmTools->convert_am_error_to_eapol_error(error));
+
+					EAP_TRACE_DEBUG(
+						aAmTools,
+						TRACE_FLAGS_DEFAULT,
+						(EAPL("ERROR: EapPluginTools::GetPrivatePathL(): failed %d=%s.\n"),
+						status,
+						eap_status_string_c::get_status_string(status)));
+					EAP_TRACE_END(aAmTools, TRACE_FLAGS_DEFAULT);
+					return EAP_STATUS_RETURN(aAmTools, status);
+				}
+
+				_LIT(FILECONFIG_FILENAME, "eap.conf");
+
+				aPrivateDatabasePathName.Append(FILECONFIG_FILENAME);
+
+				error = CEapConversion::ConvertFromTDesCToInternal(
+					aAmTools,
+					aPrivateDatabasePathName,
+					&config_file_name);
+				if (error != KErrNone)
+				{
+					eap_status_e status(aAmTools->convert_am_error_to_eapol_error(error));
+
+					EAP_TRACE_DEBUG(
+						aAmTools,
+						TRACE_FLAGS_DEFAULT,
+						(EAPL("ERROR: CEapConversion::ConvertFromTDesCToInternal(): failed %d=%s.\n"),
+						status,
+						eap_status_string_c::get_status_string(status)));
+					EAP_TRACE_END(aAmTools, TRACE_FLAGS_DEFAULT);
+					return EAP_STATUS_RETURN(aAmTools, status);
+				}
+			}
+
+			eap_variable_data_c file_name_c_data(aAmTools);
+
+			{
+				eap_const_string const FILECONFIG_DRIVE_C = "c:";
+
+				status = file_name_c_data.set_copy_of_buffer(
+					FILECONFIG_DRIVE_C,
+					aAmTools->strlen(FILECONFIG_DRIVE_C));
+				if (status != eap_status_ok)
+				{
+					EAP_TRACE_END(aAmTools, TRACE_FLAGS_DEFAULT);
+					return EAP_STATUS_RETURN(aAmTools, status);
+				}
+
+				status = file_name_c_data.add_data(&config_file_name);
+				if (status != eap_status_ok)
+				{
+					EAP_TRACE_END(aAmTools, TRACE_FLAGS_DEFAULT);
+					return EAP_STATUS_RETURN(aAmTools, status);
+				}
+
+				status = file_name_c_data.add_end_null();
+				if (status != eap_status_ok)
+				{
+					EAP_TRACE_END(aAmTools, TRACE_FLAGS_DEFAULT);
+					return EAP_STATUS_RETURN(aAmTools, status);
+				}
+			}
+
+			eap_variable_data_c file_name_z_data(aAmTools);
+
+			{
+				eap_const_string const FILECONFIG_DRIVE_Z = "z:";
+
+				status = file_name_z_data.set_copy_of_buffer(
+					FILECONFIG_DRIVE_Z,
+					aAmTools->strlen(FILECONFIG_DRIVE_Z));
+				if (status != eap_status_ok)
+				{
+					EAP_TRACE_END(aAmTools, TRACE_FLAGS_DEFAULT);
+					return EAP_STATUS_RETURN(aAmTools, status);
+				}
+
+				status = file_name_z_data.add_data(&config_file_name);
+				if (status != eap_status_ok)
+				{
+					EAP_TRACE_END(aAmTools, TRACE_FLAGS_DEFAULT);
+					return EAP_STATUS_RETURN(aAmTools, status);
+				}
+
+				status = file_name_z_data.add_end_null();
+				if (status != eap_status_ok)
+				{
+					EAP_TRACE_END(aAmTools, TRACE_FLAGS_DEFAULT);
+					return EAP_STATUS_RETURN(aAmTools, status);
+				}
+			}
+
+
+
+			if (status == eap_status_ok)
+			{
+				// Disable traces because this could fail. In most cases there are no configuration file on C: disk,
+				u32_t saved_trace_mask =  aAmTools->get_trace_mask();
+				aAmTools->set_trace_mask(eap_am_tools_c::eap_trace_mask_none);
+
+				// First try open from C: disk.
+				status = fileio->file_open(
+					&file_name_c_data,
+					eap_file_io_direction_read);
+
+				// Enable traces because the next should not fail. Always there are configuration file on Z: disk,
+				aAmTools->set_trace_mask(saved_trace_mask);
+
+				if (status == eap_status_ok)
+				{
+					EAP_TRACE_DEBUG(
+						aAmTools,
+						TRACE_FLAGS_DEFAULT,
+						(EAPL("Opens configure file %s\n"),
+						file_name_c_data.get_data(file_name_c_data.get_data_length())));
+				}
+				else if (status != eap_status_ok)
+				{
+					// Second try open from Z: disk.
+					status = fileio->file_open(
+						&file_name_z_data,
+						eap_file_io_direction_read);
+					if (status == eap_status_ok)
+					{
+						EAP_TRACE_DEBUG(
+							aAmTools,
+							TRACE_FLAGS_DEFAULT,
+							(EAPL("Opens configure file %s\n"),
+							 file_name_z_data.get_data(file_name_z_data.get_data_length())));
+					}
+				}
+
+				if (status == eap_status_ok)
+				{
+					// Some of the files were opened.
+
+					(*aFileconfig) = new eap_file_config_c(aAmTools);
+					if ((*aFileconfig) != 0
+						&& (*aFileconfig)->get_is_valid() == true)
+					{
+						status = (*aFileconfig)->configure(fileio);
+						if (status != eap_status_ok)
+						{
+							EAP_TRACE_DEBUG(
+								aAmTools,
+								TRACE_FLAGS_DEFAULT,
+								(EAPL("ERROR: Configure read from %s failed.\n"),
+								file_name_c_data.get_data(file_name_c_data.get_data_length())));
+						}
+						else
+						{
+							EAP_TRACE_DEBUG(
+								aAmTools,
+								TRACE_FLAGS_DEFAULT,
+								(EAPL("Configure read from %s\n"),
+								file_name_c_data.get_data(file_name_c_data.get_data_length())));
+						}
+					}
+					else
+					{
+						// No file configuration.
+						delete (*aFileconfig);
+						(*aFileconfig) = 0;
+
+						EAP_TRACE_DEBUG(
+							aAmTools,
+							TRACE_FLAGS_DEFAULT,
+							(EAPL("ERROR: Cannot create configure object for file %s\n"),
+							file_name_c_data.get_data(file_name_c_data.get_data_length())));
+					}
+				}
+				else
+				{
+					EAP_TRACE_DEBUG(
+						aAmTools,
+						TRACE_FLAGS_DEFAULT,
+						(EAPL("ERROR: Cannot open configure file neither %s nor %s\n"),
+						file_name_c_data.get_data(file_name_c_data.get_data_length()),
+						file_name_z_data.get_data(file_name_z_data.get_data_length())));
+				}
+			}
+		}
+		else
+		{
+			EAP_TRACE_DEBUG(
+				aAmTools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("Skips file configuration.\n")));
+		}
+	}
+#endif //#if defined(USE_EAP_FILECONFIG)
+
+
+	EAP_TRACE_END(aAmTools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(aAmTools, status);
+}
+
+//--------------------------------------------------
+// End.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/common/symbian/EapConversion.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,1780 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 41 %
+*/
+
+// This is enumeration of EAPOL source code.
+#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
+	#undef EAP_FILE_NUMBER_ENUM
+	#define EAP_FILE_NUMBER_ENUM 605 
+	#undef EAP_FILE_NUMBER_DATE 
+	#define EAP_FILE_NUMBER_DATE 1127594498 
+#endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
+
+
+// INCLUDE FILES
+
+#include "EapConversion.h"
+#include "eap_am_assert.h"
+#include <EapTypeInfo.h>
+#include "abs_eap_am_tools.h"
+#include "eap_automatic_variable.h"
+#include <utf.h>                           // for CnvUtfConverter
+#include "abs_eap_plugin_message.h"
+#include "eap_plugin_message_base.h"
+#include "abs_eap_am_message_if.h"
+#include "eap_am_message_if.h"
+#include "eap_automatic_variable.h"
+#include "eap_plugin_client_message_if.h"
+#include "eap_am_message_if_symbian.h"
+#include "EapTraceSymbian.h"
+
+// LOCAL CONSTANTS
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+EAP_FUNC_EXPORT TInt CEapConversion::ConvertFromTDesCToInternal(
+	abs_eap_am_tools_c * const tools,
+	const TDesC & input16,
+	eap_variable_data_c * const target8)
+{
+	HBufC16* buf16 = HBufC16::New(input16.Length());
+	if (buf16 == 0)
+	{
+		return KErrNoMemory;
+	}
+
+	buf16->Des().Copy(input16);
+
+	TPtr16 inBufPtr16 = buf16->Des();
+
+	TInt error = ConvertFromBuf16ToInternal(
+		tools,
+		&inBufPtr16,
+		target8);
+
+	delete buf16;
+
+	return error;
+}
+
+// ----------------------------------------------------------
+
+EAP_FUNC_EXPORT TInt CEapConversion::ConvertCipherSuitesToInternalType(
+	abs_eap_am_tools_c * const tools,
+	const RArray<TUint> * const aCipherSuites,
+	eap_array_c<u16_t> * const internal_cipher_suites)
+{
+	EAP_TRACE_DEBUG(
+		tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapConversion::ConvertCipherSuitesToInternalType()\n")));
+
+	EAP_TRACE_RETURN_STRING(tools, "returns: CEapConversion::ConvertCipherSuitesToInternalType()");
+
+	eap_status_e status(eap_status_ok);
+
+	if (aCipherSuites == 0
+		|| internal_cipher_suites == 0)
+	{
+		return (tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(tools, eap_status_illegal_parameter)));
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	for (TInt ind = 0; ind < aCipherSuites->Count(); ind++)
+	{
+		u16_t * const tmp_object = new u16_t;
+		if (tmp_object == 0)
+		{
+			EAP_TRACE_END(tools, TRACE_FLAGS_DEFAULT);
+			return (tools->convert_eapol_error_to_am_error(
+				EAP_STATUS_RETURN(tools, eap_status_allocation_error)));
+		}
+		*tmp_object = static_cast<u16_t>((*aCipherSuites)[ind]);
+		status = internal_cipher_suites->add_object(tmp_object, true);
+		if (status != eap_status_ok)
+		{
+			return (tools->convert_eapol_error_to_am_error(
+				EAP_STATUS_RETURN(tools, status)));
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	return KErrNone;
+}
+
+// ----------------------------------------------------------
+
+EAP_FUNC_EXPORT TInt CEapConversion::ConvertInternalTypeToCipherSuites(
+	abs_eap_am_tools_c * const tools,
+	const eap_array_c<u16_t> * const internal_cipher_suites,
+	RArray<TUint> * const aCipherSuites)
+{
+	EAP_TRACE_DEBUG(
+		tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapConversion::ConvertInternalTypeToCipherSuites()\n")));
+
+	EAP_TRACE_RETURN_STRING(tools, "returns: CEapConversion::ConvertInternalTypeToCipherSuites()");
+
+	if (aCipherSuites == 0
+		|| internal_cipher_suites == 0)
+	{
+		return (tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(tools, eap_status_illegal_parameter)));
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	for (TInt ind = 0; ind < internal_cipher_suites->get_object_count(); ind++)
+	{
+		const u16_t * const tmp_object = internal_cipher_suites->get_object(ind);
+		if (tmp_object == 0)
+		{
+			EAP_TRACE_END(tools, TRACE_FLAGS_DEFAULT);
+			return (tools->convert_eapol_error_to_am_error(
+				EAP_STATUS_RETURN(tools, eap_status_allocation_error)));
+		}
+
+		TInt error = aCipherSuites->Append(static_cast<TUint>(*tmp_object));
+		if (error != KErrNone)
+		{
+			return (error);
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	return KErrNone;
+}
+
+// ----------------------------------------------------------
+
+EAP_FUNC_EXPORT TInt CEapConversion::ConvertFromInternalToBuf16(
+	abs_eap_am_tools_c * const tools,
+	const eap_variable_data_c * const input8,
+	TDes * const target16)
+{
+	EAP_TRACE_DATA_DEBUG(
+		tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapConversion::ConvertFromInternalToBuf16(): input8"),
+        input8->get_data(),
+		input8->get_data_length()));
+
+	EAP_TRACE_RETURN_STRING(tools, "returns: CEapConversion::ConvertFromInternalToBuf16()");
+
+	TPtrC8 inBufPtrC8(input8->get_data(), input8->get_data_length());
+
+	// convert utf8 -> unicode,
+	// aInBuf8 is UTF8 string, unicode max length is
+	// then the length of UTF8 string.
+	// NOTE, HBufC16 length means count of 16-bit objects.
+	HBufC16 * aOutBuf16 = HBufC16::New(inBufPtrC8.Size());
+	if (aOutBuf16 == 0)
+	{
+		EAP_UNREFERENCED_PARAMETER(tools);
+		return KErrNoMemory;
+	}
+
+	TPtr16 outBufPtr16 = aOutBuf16->Des();
+
+	CnvUtfConverter::ConvertToUnicodeFromUtf8(outBufPtr16, inBufPtrC8);
+
+	target16->Copy(outBufPtr16);
+
+    EAP_TRACE_DATA_DEBUG(
+		tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapConversion::ConvertFromInternalToBuf16(): outBufPtr16"),
+	    outBufPtr16.Ptr(),
+		outBufPtr16.Size()));
+
+    delete aOutBuf16;
+    aOutBuf16 = NULL;
+
+    return KErrNone;
+}
+
+// ----------------------------------------------------------
+
+EAP_FUNC_EXPORT TInt CEapConversion::ConvertFromBuf16ToInternal(
+	abs_eap_am_tools_c * const tools,
+	const TDes * const input16,
+	eap_variable_data_c * const target8)
+{
+	EAP_TRACE_DATA_DEBUG(
+		tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapConversion::ConvertFromBuf16ToInternal(): input16"),
+        input16->Ptr(),
+		input16->Size()));
+
+	EAP_TRACE_RETURN_STRING(tools, "returns: CEapConversion::ConvertFromBuf16ToInternal()");
+
+    // "In UTF-8, characters are encoded using sequences of 1 to 6 octets."
+    // RFC2279 - UTF-8
+    const TUint KMaxNumberOfOctetsPerUtf8Char = 6;
+	// Convert unicode -> utf8.
+	// Note, HBufC16 length means the number of 16-bit values or
+    // data items represented by the descriptor.
+    // Multiply number of charachters by max number of octets for char.
+	HBufC8 * aOutBuf8 = HBufC8::New(input16->Length() * KMaxNumberOfOctetsPerUtf8Char);
+	if (aOutBuf8 == 0)
+	{
+		return KErrNoMemory;
+	}
+
+	TPtr8 outBufPtr8(aOutBuf8->Des());
+
+	CnvUtfConverter::ConvertFromUnicodeToUtf8(outBufPtr8, *input16);
+
+	eap_status_e status = target8->set_copy_of_buffer(aOutBuf8->Ptr(), aOutBuf8->Length());
+	
+    delete aOutBuf8;
+    aOutBuf8 = NULL;
+    
+	if (status != eap_status_ok)
+	{
+		return (tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(tools, status)));
+	}
+
+    EAP_TRACE_DATA_DEBUG(
+		tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapConversion::ConvertFromBuf16ToInternal(): target8"),
+	    target8->get_data(),
+		target8->get_data_length()));
+
+	return KErrNone;
+}
+
+// ----------------------------------------------------------
+
+EAP_FUNC_EXPORT TInt CEapConversion::ConvertEAPTypesToInternalTypes(
+	abs_eap_am_tools_c * const tools,
+	const RArray<TUint> * const EncapsulatedEAPTypes,
+	eap_array_c<eap_type_value_e> * const target)
+{
+	EAP_TRACE_DEBUG(
+		tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapConversion::ConvertEAPTypesToInternalTypes()\n")));
+
+	EAP_TRACE_RETURN_STRING(tools, "returns: CEapConversion::ConvertEAPTypesToInternalTypes()");
+
+	eap_status_e status(eap_status_ok);
+
+	if (EncapsulatedEAPTypes == 0
+		|| target == 0)
+	{
+		return (tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(tools, eap_status_illegal_parameter)));
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	for (TInt ind = 0; ind < EncapsulatedEAPTypes->Count(); ind++)
+	{
+		eap_type_value_e * const tmp_object = new eap_type_value_e(
+			static_cast<eap_type_ietf_values_e>((*EncapsulatedEAPTypes)[ind]));
+		if (tmp_object == 0)
+		{
+			EAP_TRACE_END(tools, TRACE_FLAGS_DEFAULT);
+			return (tools->convert_eapol_error_to_am_error(
+				EAP_STATUS_RETURN(tools, eap_status_allocation_error)));
+		}
+		status = target->add_object(tmp_object, true);
+		if (status != eap_status_ok)
+		{
+			return (tools->convert_eapol_error_to_am_error(
+				EAP_STATUS_RETURN(tools, status)));
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	return KErrNone;
+}
+
+// ----------------------------------------------------------
+
+EAP_FUNC_EXPORT TInt CEapConversion::ConvertInternalTypesToEAPTypes(
+	abs_eap_am_tools_c * const tools,
+	const eap_array_c<eap_type_value_e> * const internal_eap_types,
+	RArray<TUint> * const target)
+{
+	EAP_TRACE_DEBUG(
+		tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapConversion::ConvertInternalTypesToEAPTypes()\n")));
+
+	EAP_TRACE_RETURN_STRING(tools, "returns: CEapConversion::ConvertInternalTypesToEAPTypes()");
+
+	if (internal_eap_types == 0
+		|| target == 0)
+	{
+		return (tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(tools, eap_status_illegal_parameter)));
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	for (TInt ind = 0; ind < internal_eap_types->get_object_count(); ind++)
+	{
+		const eap_type_value_e * const tmp_object = internal_eap_types->get_object(ind);
+		if (tmp_object == 0)
+		{
+			EAP_TRACE_END(tools, TRACE_FLAGS_DEFAULT);
+			return (tools->convert_eapol_error_to_am_error(
+				EAP_STATUS_RETURN(tools, eap_status_allocation_error)));
+		}
+
+		TInt error = target->Append(static_cast<TUint>(tmp_object->get_vendor_type()));
+		if (error != KErrNone)
+		{
+			return (error);
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	return KErrNone;
+}
+
+// ----------------------------------------------------------
+
+EAP_FUNC_EXPORT TInt CEapConversion::ConvertExpandedEAPTypeToInternalType(
+	const TEapExpandedType * const EncapsulatedExpandedEAPType,
+	eap_type_value_e * const target)
+{
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapConversion::ConvertExpandedEAPTypeToInternalType()\n")));
+
+	EAP_TRACE_RETURN_STRING_SYMBIAN((_L("returns: CEapConversion::ConvertExpandedEAPTypeToInternalType()\n")));
+
+	eap_status_e status = target->set_expanded_type_data(
+		0, // NOTE, we do not have abs_eap_am_tools_c object here.
+		EncapsulatedExpandedEAPType->GetValue().Ptr(),
+		EncapsulatedExpandedEAPType->GetValue().Length());
+	if (status != eap_status_ok)
+	{
+		return KErrGeneral;
+	}
+
+	return KErrNone;
+}
+
+// ----------------------------------------------------------
+
+EAP_FUNC_EXPORT TInt CEapConversion::ConvertInternalTypeToExpandedEAPType(
+	const eap_type_value_e * const source,
+	TEapExpandedType * const EncapsulatedExpandedEAPType)
+{
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapConversion::ConvertInternalTypeToExpandedEAPType()\n")));
+
+	EAP_TRACE_RETURN_STRING_SYMBIAN((_L("returns: CEapConversion::ConvertInternalTypeToExpandedEAPType()\n")));
+
+	TInt error = EncapsulatedExpandedEAPType->SetValue(
+		source->get_vendor_id(),
+		source->get_vendor_type());
+	if (error != KErrNone)
+	{
+		return error;
+	}
+
+	return KErrNone;
+}
+
+// ----------------------------------------------------------
+
+EAP_FUNC_EXPORT TInt CEapConversion::ConvertExpandedEAPTypesToInternalTypes(
+	abs_eap_am_tools_c * const tools,
+	const RArray<TEapExpandedType> * const EncapsulatedExpandedEAPTypes,
+	eap_array_c<eap_type_value_e> * const target)
+{
+	EAP_TRACE_DEBUG(
+		tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapConversion::ConvertExpandedEAPTypesToInternalTypes()\n")));
+
+	EAP_TRACE_RETURN_STRING(tools, "returns: CEapConversion::ConvertExpandedEAPTypesToInternalTypes()");
+
+	eap_status_e status(eap_status_ok);
+
+	if (EncapsulatedExpandedEAPTypes == 0
+		|| target == 0)
+	{
+		return (tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(tools, eap_status_illegal_parameter)));
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	for (TInt ind = 0; ind < EncapsulatedExpandedEAPTypes->Count(); ind++)
+	{
+		TEapExpandedType ExpandedEAPType = (*EncapsulatedExpandedEAPTypes)[ind];
+
+		eap_type_value_e * const new_object = new eap_type_value_e();
+		if (new_object == 0)
+		{
+			EAP_TRACE_END(tools, TRACE_FLAGS_DEFAULT);
+			return (tools->convert_eapol_error_to_am_error(
+				EAP_STATUS_RETURN(tools, eap_status_allocation_error)));
+		}
+
+		TInt error = ConvertExpandedEAPTypeToInternalType(
+			&ExpandedEAPType,
+			new_object);
+		if (error != KErrNone)
+		{
+			delete new_object;
+			(void) EAP_STATUS_RETURN(tools, tools->convert_am_error_to_eapol_error(error));
+			return error;
+		}
+
+		status = target->add_object(new_object, true);
+		if (status != eap_status_ok)
+		{
+			return (tools->convert_eapol_error_to_am_error(
+				EAP_STATUS_RETURN(tools, status)));
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	return KErrNone;
+}
+
+// ----------------------------------------------------------
+
+EAP_FUNC_EXPORT TInt CEapConversion::ConvertInternalTypesToExpandedEAPTypes(
+	abs_eap_am_tools_c * const tools,
+	const eap_array_c<eap_type_value_e> * const source,
+	RArray<TEapExpandedType> * const EncapsulatedExpandedEAPTypes)
+{
+	EAP_TRACE_DEBUG(
+		tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapConversion::ConvertInternalTypesToExpandedEAPTypes()\n")));
+
+	EAP_TRACE_RETURN_STRING(tools, "returns: CEapConversion::ConvertInternalTypesToExpandedEAPTypes()");
+
+	if (source == 0
+		|| EncapsulatedExpandedEAPTypes == 0)
+	{
+		return (tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(tools, eap_status_illegal_parameter)));
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	TEapExpandedType EapType;
+
+	for (TInt ind = 0; ind < source->get_object_count(); ind++)
+	{
+		const eap_type_value_e * const tmp_object = source->get_object(ind);
+		if (tmp_object == 0)
+		{
+			EAP_TRACE_END(tools, TRACE_FLAGS_DEFAULT);
+			return (tools->convert_eapol_error_to_am_error(
+				EAP_STATUS_RETURN(tools, eap_status_allocation_error)));
+		}
+
+		TInt error = ConvertInternalTypeToExpandedEAPType(
+			tmp_object,
+			&EapType);
+		if (error != KErrNone)
+		{
+			(void) EAP_STATUS_RETURN(tools, tools->convert_am_error_to_eapol_error(error));
+			return (error);
+		}
+
+		error = EncapsulatedExpandedEAPTypes->Append(EapType);
+		if (error != KErrNone)
+		{
+			(void) EAP_STATUS_RETURN(tools, tools->convert_am_error_to_eapol_error(error));
+			return (error);
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	return KErrNone;
+}
+
+// ----------------------------------------------------------
+
+EAP_FUNC_EXPORT TInt CEapConversion::ConvertInternalTypesToHBufC8(
+	abs_eap_am_tools_c * const tools,
+	const eap_array_c<eap_type_value_e> * const source,
+	HBufC8 ** const EncapsulatedExpandedEAPTypesData)
+{
+	EAP_TRACE_DEBUG(
+		tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapConversion::ConvertInternalTypesToHBufC8(): EncapsulatedExpandedEAPTypesData=0x%08x, source=0x%08x\n"),
+		EncapsulatedExpandedEAPTypesData,
+		source));
+
+	EAP_TRACE_RETURN_STRING(tools, "returns: CEapConversion::ConvertInternalTypesToHBufC8()");
+
+	if (EncapsulatedExpandedEAPTypesData == 0
+		|| source == 0)
+	{
+		return (tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(tools, eap_status_illegal_parameter)));
+	}
+
+	*EncapsulatedExpandedEAPTypesData = HBufC8::New(source->get_object_count()*KEapExpandedTypeLength);
+	TPtr8 aDbBinaryColumnValuePtr = (*EncapsulatedExpandedEAPTypesData)->Des();			
+
+	TEapExpandedType EapType;
+
+	for (u32_t ind = 0; ind < source->get_object_count(); ind++)
+	{
+		const eap_type_value_e * const tmp_object = source->get_object(ind);
+		if (tmp_object == 0)
+		{
+			EAP_TRACE_END(tools, TRACE_FLAGS_DEFAULT);
+			return (tools->convert_eapol_error_to_am_error(
+				EAP_STATUS_RETURN(tools, eap_status_allocation_error)));
+		}
+
+		TInt error = ConvertInternalTypeToExpandedEAPType(
+			tmp_object,
+			&EapType);
+		if (error != KErrNone)
+		{
+			(void) EAP_STATUS_RETURN(tools, tools->convert_am_error_to_eapol_error(error));
+			return (error);
+		}
+
+		aDbBinaryColumnValuePtr.Append(EapType.GetValue());
+	}
+
+	return KErrNone;
+}
+
+// ----------------------------------------------------------
+
+EAP_FUNC_EXPORT TInt CEapConversion::ConvertHBufC8ToInternalTypes(
+	abs_eap_am_tools_c * const tools,
+	const HBufC8 * const EncapsulatedExpandedEAPTypesData,
+	eap_array_c<eap_type_value_e> * const target)
+{
+	EAP_TRACE_DEBUG(
+		tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapConversion::ConvertHBufC8ToInternalTypes(): EncapsulatedExpandedEAPTypesData=0x%08x, target=0x%08x\n"),
+		EncapsulatedExpandedEAPTypesData,
+		target));
+
+	EAP_TRACE_RETURN_STRING(tools, "returns: CEapConversion::ConvertHBufC8ToInternalTypes()");
+
+	if (EncapsulatedExpandedEAPTypesData == 0
+		|| target == 0)
+	{
+		return (tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(tools, eap_status_illegal_parameter)));
+	}
+
+	u32_t eap_type_count = EncapsulatedExpandedEAPTypesData->Length() / KEapExpandedTypeLength;
+
+	target->reset();
+
+	const TUint8 * const data = EncapsulatedExpandedEAPTypesData->Ptr();
+	u32_t offset = 0ul;
+
+	for (u32_t ind = 0; ind < eap_type_count; ind++)
+	{
+		eap_type_value_e * const new_object = new eap_type_value_e();
+
+		eap_automatic_variable_c<eap_type_value_e> automatic_new_object(
+			tools,
+			new_object);
+
+		if (new_object == 0)
+		{
+			EAP_TRACE_END(tools, TRACE_FLAGS_DEFAULT);
+			return (tools->convert_eapol_error_to_am_error(
+				EAP_STATUS_RETURN(tools, eap_status_allocation_error)));
+		}
+
+		eap_status_e status = new_object->set_expanded_type_data(
+			tools,
+			&(data[offset]),
+			KEapExpandedTypeLength);
+		if (status != eap_status_ok)
+		{
+			return (tools->convert_eapol_error_to_am_error(
+				EAP_STATUS_RETURN(tools, status)));
+		}
+
+		offset += KEapExpandedTypeLength;
+
+		automatic_new_object.do_not_free_variable();
+
+		status = target->add_object(new_object, true);
+		if (status != eap_status_ok)
+		{
+			return (tools->convert_eapol_error_to_am_error(
+				EAP_STATUS_RETURN(tools, status)));
+		}
+	}
+
+	return KErrNone;
+}
+
+// ----------------------------------------------------------
+
+EAP_FUNC_EXPORT TInt CEapConversion::ConvertCertificatesToInternalType(
+	abs_eap_am_tools_c * const tools,
+	const RPointerArray<EapCertificateEntry> * const aCertificates,
+	eap_array_c<eap_certificate_entry_c> * const internal_certificates)
+{
+	EAP_TRACE_DEBUG(
+		tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapConversion::ConvertCertificatesToInternalType()\n")));
+
+	EAP_TRACE_RETURN_STRING(tools, "returns: CEapConversion::ConvertCertificatesToInternalType()");
+
+	eap_status_e status(eap_status_ok);
+
+	if (aCertificates == 0
+		|| internal_certificates == 0)
+	{
+		EAP_STATIC_ASSERT(eap_certificate_entry_c::eap_certificate_type_CA == static_cast<eap_certificate_entry_c::eap_certificate_type_e>(EapCertificateEntry::ECA));
+		EAP_STATIC_ASSERT(eap_certificate_entry_c::eap_certificate_type_user == static_cast<eap_certificate_entry_c::eap_certificate_type_e>(EapCertificateEntry::EUser));
+		return (tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(tools, eap_status_illegal_parameter)));
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+  	for( TInt count=0; count < aCertificates->Count(); count++ )
+  	{
+		const EapCertificateEntry * const cert = (*aCertificates)[count];
+		if (cert == 0)
+		{
+			return (tools->convert_eapol_error_to_am_error(
+				EAP_STATUS_RETURN(tools, eap_status_allocation_error)));
+		}
+
+		eap_certificate_entry_c * const int_entry = new eap_certificate_entry_c(tools);
+
+		eap_automatic_variable_c<eap_certificate_entry_c> automatic_certificate_entry(
+			tools,
+			int_entry);
+
+		if (int_entry == 0)
+		{
+			return (tools->convert_eapol_error_to_am_error(
+				EAP_STATUS_RETURN(tools, eap_status_illegal_parameter)));
+		}
+
+		// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+		if (cert->GetCertType() != EapCertificateEntry::EUser
+			&& cert->GetCertType() != EapCertificateEntry::ECA)
+		{
+			return (tools->convert_eapol_error_to_am_error(
+				EAP_STATUS_RETURN(tools, eap_status_illegal_parameter)));
+		}
+
+		int_entry->m_CertType = static_cast<eap_certificate_entry_c::eap_certificate_type_e>(cert->GetCertType());
+
+		// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+		if (cert->GetSubjectNamePresent())
+		{
+			ConvertFromBuf16ToInternal(tools, cert->GetSubjectName(), &(int_entry->m_SubjectName));
+
+			int_entry->m_SubjectNamePresent = true;
+		}
+
+		// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+		if (cert->GetIssuerNamePresent())
+		{
+			ConvertFromBuf16ToInternal(tools, cert->GetIssuerName(), &(int_entry->m_IssuerName));
+
+			int_entry->m_IssuerNamePresent = true;
+		}
+
+		// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+		if (cert->GetSerialNumberPresent())
+		{
+			ConvertFromBuf16ToInternal(tools, cert->GetSerialNumber(), &(int_entry->m_SerialNumber));
+
+			int_entry->m_SerialNumberPresent = true;
+		}
+
+		// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+		if (cert->GetSubjectKeyIdPresent())
+		{
+			status = int_entry->m_SubjectKeyID.set_copy_of_buffer(cert->GetSubjectKeyId().Ptr(), cert->GetSubjectKeyId().Length());
+			if (status != eap_status_ok)
+			{
+				return (tools->convert_eapol_error_to_am_error(
+					EAP_STATUS_RETURN(tools, status)));
+			}
+
+			int_entry->m_SubjectKeyIDPresent = true;
+		}
+
+		// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+		if (cert->GetThumbprintPresent())
+		{
+			ConvertFromBuf16ToInternal(tools, cert->GetThumbprint(), &(int_entry->m_Thumbprint));
+
+			int_entry->m_ThumbprintPresent = true;
+		}
+
+		// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+		if (cert->GetLabelPresent())
+		{
+			ConvertFromBuf16ToInternal(tools, cert->GetLabel(), &(int_entry->m_Label));
+
+			int_entry->m_LabelPresent = true;
+		}
+
+		// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+		if (cert->GetPrimaryNamePresent())
+		{
+			ConvertFromBuf16ToInternal(tools, cert->GetPrimaryName(), &(int_entry->m_PrimaryName));
+
+			int_entry->m_PrimaryNamePresent = true;
+		}
+
+		// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+		if (cert->GetSecondaryNamePresent())
+		{
+			ConvertFromBuf16ToInternal(tools, cert->GetSecondaryName(), &(int_entry->m_SecondaryName));
+
+			int_entry->m_SecondaryNamePresent = true;
+		}
+
+		// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+		if (cert->GetIsEnabledPresent())
+		{
+			if (cert->GetIsEnabled())
+			{
+				int_entry->m_iIsEnabled = true;
+			}
+			else
+			{
+				int_entry->m_iIsEnabled = false;
+			}
+
+			int_entry->m_iIsEnabledPresent = true;
+		}
+
+		// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+		automatic_certificate_entry.do_not_free_variable();
+
+		status = internal_certificates->add_object(int_entry, true);
+		if (status != eap_status_ok)
+		{
+			return (tools->convert_eapol_error_to_am_error(
+				EAP_STATUS_RETURN(tools, status)));
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	return KErrNone;
+}
+
+// ----------------------------------------------------------
+
+EAP_FUNC_EXPORT TInt CEapConversion::ConvertInternalTypeToCertificates(
+	abs_eap_am_tools_c * const tools,
+	const eap_certificate_entry_c::eap_certificate_type_e select_certificate_type,
+	const eap_array_c<eap_certificate_entry_c> * const internal_certificates,
+	RPointerArray<EapCertificateEntry> * const aCertificates)
+{
+	EAP_TRACE_DEBUG(
+		tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapConversion::ConvertInternalTypeToCertificates()\n")));
+
+	EAP_TRACE_RETURN_STRING(tools, "returns: CEapConversion::ConvertInternalTypeToCertificates()");
+
+	if (aCertificates == 0
+		|| internal_certificates == 0)
+	{
+		EAP_STATIC_ASSERT(eap_certificate_entry_c::eap_certificate_type_CA == static_cast<eap_certificate_entry_c::eap_certificate_type_e>(EapCertificateEntry::ECA));
+		EAP_STATIC_ASSERT(eap_certificate_entry_c::eap_certificate_type_user == static_cast<eap_certificate_entry_c::eap_certificate_type_e>(EapCertificateEntry::EUser));
+		return (tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(tools, eap_status_illegal_parameter)));
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+  	for( u32_t count=0; count < internal_certificates->get_object_count(); count++ )
+  	{
+		const eap_certificate_entry_c * const int_entry = internal_certificates->get_object(count);
+		if (int_entry == 0)
+		{
+			return (tools->convert_eapol_error_to_am_error(
+				EAP_STATUS_RETURN(tools, eap_status_illegal_parameter)));
+		}
+
+		if (int_entry->m_CertType == select_certificate_type)
+		{
+			EapCertificateEntry * cert = new EapCertificateEntry;
+
+			eap_automatic_variable_c<EapCertificateEntry> automatic_cert(
+				tools,
+				cert);
+
+			if (cert == 0)
+			{
+				return (tools->convert_eapol_error_to_am_error(
+					EAP_STATUS_RETURN(tools, eap_status_allocation_error)));
+			}
+
+			// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+			cert->SetCertType(static_cast<EapCertificateEntry::TCertType>(int_entry->m_CertType));
+
+			// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+			if (int_entry->m_SubjectNamePresent == true)
+			{
+				ConvertFromInternalToBuf16(tools, &(int_entry->m_SubjectName), cert->GetSubjectNameWritable());
+
+				cert->SetSubjectNamePresent();
+			}
+
+			// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+			if (int_entry->m_IssuerNamePresent == true)
+			{
+				ConvertFromInternalToBuf16(tools, &(int_entry->m_IssuerName), cert->GetIssuerNameWritable());
+
+				cert->SetIssuerNamePresent();
+			}
+
+			// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+			if (int_entry->m_SerialNumberPresent == true)
+			{
+				ConvertFromInternalToBuf16(tools, &(int_entry->m_SerialNumber), cert->GetSerialNumberWritable());
+
+				cert->SetSerialNumberPresent();
+			}
+
+			// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+			if (int_entry->m_SubjectKeyIDPresent == true)
+			{
+				cert->GetSubjectKeyIdWritable()->Copy(int_entry->m_SubjectKeyID.get_data(), int_entry->m_SubjectKeyID.get_data_length());
+
+				cert->SetSubjectKeyIdPresent();
+			}
+
+			// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+			if (int_entry->m_ThumbprintPresent == true)
+			{
+				ConvertFromInternalToBuf16(tools, &(int_entry->m_Thumbprint), cert->GetThumbprintWritable());
+
+				cert->SetThumbprintPresent();
+			}
+
+			// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+			if (int_entry->m_LabelPresent == true)
+			{
+				ConvertFromInternalToBuf16(tools, &(int_entry->m_Label), cert->GetLabelWritable());
+
+				cert->SetLabelPresent();
+			}
+
+			// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+			if (int_entry->m_PrimaryNamePresent == true)
+			{
+				ConvertFromInternalToBuf16(tools, &(int_entry->m_PrimaryName), cert->GetPrimaryNameWritable());
+
+				cert->SetPrimaryNamePresent();
+			}
+
+			// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+			if (int_entry->m_SecondaryNamePresent == true)
+			{
+				ConvertFromInternalToBuf16(tools, &(int_entry->m_SecondaryName), cert->GetSecondaryNameWritable());
+
+				cert->SetSecondaryNamePresent();
+			}
+
+			// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+			if (int_entry->m_iIsEnabledPresent == true)
+			{
+				if (int_entry->m_iIsEnabled == true)
+				{
+					cert->SetIsEnabled(ETrue);
+				}
+
+				cert->SetIsEnabledPresent();
+			}
+
+			EAP_TRACE_SETTINGS(cert);
+
+			TInt error = aCertificates->Append(cert);
+			if (error != KErrNone)
+			{
+				aCertificates->ResetAndDestroy(); // ResetAndDestroy() function must be called because the objects represented by the array need to be deleted before the array object is destroyed.
+				aCertificates->Close(); // The Close() function must be called before RPointerArray object is destroyed.
+
+				(void) EAP_STATUS_RETURN(tools, tools->convert_am_error_to_eapol_error(error));
+				return (error);
+			}
+
+			automatic_cert.do_not_free_variable();
+		}
+	} // for()
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	return KErrNone;
+}
+
+// ----------------------------------------------------------
+
+EAP_FUNC_EXPORT TInt CEapConversion::ConvertEAPSettingsToInternalType(
+	abs_eap_am_tools_c * const tools,
+	const EAPSettings * const aSettings,
+	eap_method_settings_c * const internal_settings)
+{
+	EAP_TRACE_DEBUG(
+		tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapConversion::ConvertEAPSettingsToInternalType()\n")));
+
+	EAP_TRACE_RETURN_STRING(tools, "returns: CEapConversion::ConvertEAPSettingsToInternalType()");
+
+	if (aSettings == 0
+		|| internal_settings == 0)
+	{
+		return (tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(tools, eap_status_illegal_parameter)));
+	}
+
+	EAP_TRACE_SETTINGS(aSettings);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (aSettings->iEAPExpandedType != (*EapExpandedTypeNone.GetType()))
+	{
+		eap_status_e status = internal_settings->m_EAPType.set_expanded_type_data(
+			tools,
+			aSettings->iEAPExpandedType.GetValue().Ptr(),
+			aSettings->iEAPExpandedType.GetValue().Length());
+		if (status != eap_status_ok)
+		{
+			return (tools->convert_eapol_error_to_am_error(
+				EAP_STATUS_RETURN(tools, status)));
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (aSettings->iUseAutomaticCACertificatePresent)
+	{
+		internal_settings->m_UseAutomaticCACertificatePresent = true;
+
+		if (aSettings->iUseAutomaticCACertificate)
+		{
+			internal_settings->m_UseAutomaticCACertificate = true;
+		}
+		else
+		{
+			internal_settings->m_UseAutomaticCACertificate = false;
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (aSettings->iUseAutomaticUsernamePresent)
+	{
+		internal_settings->m_UseAutomaticUsernamePresent = true;
+
+		if (aSettings->iUseAutomaticUsername)
+		{
+			internal_settings->m_UseAutomaticUsername = true;
+		}
+		else
+		{
+			internal_settings->m_UseAutomaticUsername = false;
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (aSettings->iUseAutomaticRealmPresent)
+	{
+		internal_settings->m_UseAutomaticRealmPresent = true;
+
+		if (aSettings->iUseAutomaticRealm)
+		{
+			internal_settings->m_UseAutomaticRealm = true;
+		}
+		else
+		{
+			internal_settings->m_UseAutomaticRealm = false;
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (aSettings->iUsernamePresent)
+	{
+		internal_settings->m_UsernamePresent = true;
+
+		ConvertFromBuf16ToInternal(tools, &(aSettings->iUsername), &(internal_settings->m_Username_fix));
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (aSettings->iPasswordExistPresent)
+	{
+		internal_settings->m_PasswordExistPresent = true;
+
+		if (aSettings->iPasswordExist)
+		{
+			internal_settings->m_PasswordExist = true;
+		}
+		else
+		{
+			internal_settings->m_PasswordExist = false;
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (aSettings->iPasswordPresent)
+	{
+		internal_settings->m_PasswordPresent = true;
+
+		ConvertFromBuf16ToInternal(tools, &(aSettings->iPassword), &(internal_settings->m_Password));
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (aSettings->iRealmPresent)
+	{
+		internal_settings->m_RealmPresent = true;
+
+		ConvertFromBuf16ToInternal(tools, &(aSettings->iRealm), &(internal_settings->m_Realm));
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (aSettings->iUsePseudonymsPresent)
+	{
+		internal_settings->m_UsePseudonymsPresent = true;
+
+		if (aSettings->iUsePseudonyms)
+		{
+			internal_settings->m_UsePseudonyms = true;
+		}
+		else
+		{
+			internal_settings->m_UsePseudonyms = false;
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (aSettings->iVerifyServerRealmPresent)
+	{
+		internal_settings->m_VerifyServerRealmPresent = true;
+
+		if (aSettings->iVerifyServerRealm)
+		{
+			internal_settings->m_VerifyServerRealm = true;
+		}
+		else
+		{
+			internal_settings->m_VerifyServerRealm = false;
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (aSettings->iRequireClientAuthenticationPresent)
+	{
+		internal_settings->m_RequireClientAuthenticationPresent = true;
+
+		if (aSettings->iRequireClientAuthentication)
+		{
+			internal_settings->m_RequireClientAuthentication = true;
+		}
+		else
+		{
+			internal_settings->m_RequireClientAuthentication = false;
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (aSettings->iSessionValidityTimePresent)
+	{
+		internal_settings->m_SessionValidityTimePresent = true;
+
+		internal_settings->m_SessionValidityTime = static_cast<u32_t>(aSettings->iSessionValidityTime);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (aSettings->iCipherSuitesPresent)
+	{
+		ConvertCipherSuitesToInternalType(
+			tools,
+			&(aSettings->iCipherSuites),
+			&(internal_settings->m_CipherSuites));
+
+		internal_settings->m_CipherSuitesPresent = true;
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (aSettings->iPEAPVersionsPresent)
+	{
+		internal_settings->m_PEAPVersionsPresent = true;
+
+		if (aSettings->iPEAPv0Allowed)
+		{
+			internal_settings->m_PEAPv0Allowed = true;
+		}
+		else
+		{
+			internal_settings->m_PEAPv0Allowed = false;
+		}
+
+		if (aSettings->iPEAPv1Allowed)
+		{
+			internal_settings->m_PEAPv1Allowed = true;
+		}
+		else
+		{
+			internal_settings->m_PEAPv1Allowed = false;
+		}
+
+		if (aSettings->iPEAPv2Allowed)
+		{
+			internal_settings->m_PEAPv2Allowed = true;
+		}
+		else
+		{
+			internal_settings->m_PEAPv2Allowed = false;
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (aSettings->iCertificatesPresent)
+	{
+		ConvertCertificatesToInternalType(
+			tools,
+			&(aSettings->iCertificates),
+			&(internal_settings->m_Certificates));
+
+		internal_settings->m_CertificatesPresent = true;
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (aSettings->iEnabledEncapsulatedEAPExpandedTypesPresent)
+	{
+		ConvertExpandedEAPTypesToInternalTypes(
+			tools,
+			&(aSettings->iEnabledEncapsulatedEAPExpandedTypes),
+			&(internal_settings->m_EnabledEncapsulatedEAPTypes));
+
+		internal_settings->m_EnabledEncapsulatedEAPTypesPresent = true;
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (aSettings->iDisabledEncapsulatedEAPExpandedTypesPresent)
+	{
+		ConvertExpandedEAPTypesToInternalTypes(
+			tools,
+			&(aSettings->iDisabledEncapsulatedEAPExpandedTypes),
+			&(internal_settings->m_DisabledEncapsulatedEAPTypes));
+
+		internal_settings->m_DisabledEncapsulatedEAPTypesPresent = true;
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (aSettings->iAuthProvModeAllowedPresent)
+	{
+		internal_settings->m_AuthProvModeAllowedPresent = true;
+
+		if (aSettings->iAuthProvModeAllowed)
+		{
+			internal_settings->m_AuthProvModeAllowed = true;
+		}
+		else
+		{
+			internal_settings->m_AuthProvModeAllowed = false;
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (aSettings->iUnauthProvModeAllowedPresent)
+	{
+		internal_settings->m_UnauthProvModeAllowedPresent = true;
+
+		if (aSettings->iUnauthProvModeAllowed)
+		{
+			internal_settings->m_UnauthProvModeAllowed = true;
+		}
+		else
+		{
+			internal_settings->m_UnauthProvModeAllowed = false;
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (aSettings->iPACGroupReferencePresent)
+	{
+		internal_settings->m_RealmPresent = true;
+
+		ConvertFromBuf16ToInternal(tools, &(aSettings->iPACGroupReference), &(internal_settings->m_PACGroupReference));
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (aSettings->iWarnADHPNoPACPresent)
+	{
+		internal_settings->m_WarnADHPNoPACPresent = true;
+
+		if (aSettings->iWarnADHPNoPAC)
+		{
+			internal_settings->m_WarnADHPNoPAC = true;
+		}
+		else
+		{
+			internal_settings->m_WarnADHPNoPAC = false;
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (aSettings->iWarnADHPNoMatchingPACPresent)
+	{
+		internal_settings->m_WarnADHPNoMatchingPACPresent = true;
+
+		if (aSettings->iWarnADHPNoMatchingPAC)
+		{
+			internal_settings->m_WarnADHPNoMatchingPAC = true;
+		}
+		else
+		{
+			internal_settings->m_WarnADHPNoMatchingPAC = false;
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (aSettings->iWarnNotDefaultServerPresent)
+	{
+		internal_settings->m_WarnNotDefaultServerPresent = true;
+
+		if (aSettings->iWarnNotDefaultServer)
+		{
+			internal_settings->m_WarnNotDefaultServer = true;
+		}
+		else
+		{
+			internal_settings->m_WarnNotDefaultServer = false;
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (aSettings->iShowPassWordPromptPresent)
+	{
+		internal_settings->m_ShowPassWordPromptPresent = true;
+
+		if (aSettings->iShowPassWordPrompt)
+		{
+			internal_settings->m_ShowPassWordPrompt = true;
+		}
+		else
+		{
+			internal_settings->m_ShowPassWordPrompt = false;
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (aSettings->iUseIdentityPrivacyPresent)
+	{
+		internal_settings->m_UseIdentityPrivacyPresent = true;
+
+		if (aSettings->iUseIdentityPrivacy)
+		{
+			internal_settings->m_UseIdentityPrivacy = true;
+		}
+		else
+		{
+			internal_settings->m_UseIdentityPrivacy = false;
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+	
+	EAP_TRACE_METHOD_SETTINGS(internal_settings);
+
+	return KErrNone;
+}
+
+// ----------------------------------------------------------
+
+EAP_FUNC_EXPORT TInt CEapConversion::ConvertInternalTypeToEAPSettings(
+	abs_eap_am_tools_c * const tools,
+	const eap_method_settings_c * const internal_settings,
+	EAPSettings * const aSettings)
+{
+	EAP_TRACE_DEBUG(
+		tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapConversion::ConvertInternalTypeToEAPSettings()\n")));
+
+	EAP_TRACE_RETURN_STRING(tools, "returns: CEapConversion::ConvertInternalTypeToEAPSettings()");
+
+	if (aSettings == 0
+		|| internal_settings == 0)
+	{
+		return (tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(tools, eap_status_illegal_parameter)));
+	}
+
+	EAP_TRACE_METHOD_SETTINGS(internal_settings);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	{
+		eap_variable_data_c eap_data(tools);
+
+		eap_status_e status = internal_settings->m_EAPType.get_expanded_type_data(
+			tools,
+			&eap_data);
+		if (status != eap_status_ok)
+		{
+			return (tools->convert_eapol_error_to_am_error(
+				EAP_STATUS_RETURN(tools, status)));
+		}
+
+		TInt error = aSettings->iEAPExpandedType.SetValue(
+			eap_data.get_data(),
+			eap_data.get_data_length());
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (internal_settings->m_UseAutomaticCACertificatePresent == true)
+	{
+		aSettings->iUseAutomaticCACertificatePresent = ETrue;
+
+		if (internal_settings->m_UseAutomaticCACertificate == true)
+		{
+			aSettings->iUseAutomaticCACertificate = ETrue;
+		}
+		else
+		{
+			aSettings->iUseAutomaticCACertificate = EFalse;
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (internal_settings->m_UseAutomaticUsernamePresent == true)
+	{
+		aSettings->iUseAutomaticUsernamePresent = ETrue;
+
+		if (internal_settings->m_UseAutomaticUsername == true)
+		{
+			aSettings->iUseAutomaticUsername = ETrue;
+		}
+		else
+		{
+			aSettings->iUseAutomaticUsername = EFalse;
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (internal_settings->m_UseAutomaticRealmPresent == true)
+	{
+		aSettings->iUseAutomaticRealmPresent = ETrue;
+
+		if (internal_settings->m_UseAutomaticRealm == true)
+		{
+			aSettings->iUseAutomaticRealm = ETrue;
+		}
+		else
+		{
+			aSettings->iUseAutomaticRealm = EFalse;
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (internal_settings->m_UsernamePresent == true)
+	{
+		aSettings->iUsernamePresent = ETrue;
+
+		ConvertFromInternalToBuf16(tools, &(internal_settings->m_Username_fix), &(aSettings->iUsername));
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (internal_settings->m_PasswordExistPresent == true)
+	{
+		aSettings->iPasswordExistPresent = ETrue;
+
+		if (internal_settings->m_PasswordExist == true)
+		{
+			aSettings->iPasswordExist = ETrue;
+		}
+		else
+		{
+			aSettings->iPasswordExist = EFalse;
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (internal_settings->m_PasswordPresent == true)
+	{
+		aSettings->iPasswordPresent = ETrue;
+
+		ConvertFromInternalToBuf16(tools, &(internal_settings->m_Password), &(aSettings->iPassword));
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (internal_settings->m_RealmPresent == true)
+	{
+		aSettings->iRealmPresent = ETrue;
+
+		ConvertFromInternalToBuf16(tools, &(internal_settings->m_Realm), &(aSettings->iRealm));
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (internal_settings->m_UsePseudonymsPresent == true)
+	{
+		aSettings->iUsePseudonymsPresent = ETrue;
+
+		if (internal_settings->m_UsePseudonyms == true)
+		{
+			aSettings->iUsePseudonyms = ETrue;
+		}
+		else
+		{
+			aSettings->iUsePseudonyms = EFalse;
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (internal_settings->m_VerifyServerRealmPresent == true)
+	{
+		aSettings->iVerifyServerRealmPresent = ETrue;
+
+		if (internal_settings->m_VerifyServerRealm == true)
+		{
+			aSettings->iVerifyServerRealm = ETrue;
+		}
+		else
+		{
+			aSettings->iVerifyServerRealm = EFalse;
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (internal_settings->m_RequireClientAuthenticationPresent == true)
+	{
+		aSettings->iRequireClientAuthenticationPresent = ETrue;
+
+		if (internal_settings->m_RequireClientAuthentication == true)
+		{
+			aSettings->iRequireClientAuthentication = ETrue;
+		}
+		else
+		{
+			aSettings->iRequireClientAuthentication = EFalse;
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (internal_settings->m_SessionValidityTimePresent == true)
+	{
+		aSettings->iSessionValidityTimePresent = ETrue;
+
+		aSettings->iSessionValidityTime = static_cast<TUint>(internal_settings->m_SessionValidityTime);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (internal_settings->m_CipherSuitesPresent == true)
+	{
+		ConvertInternalTypeToCipherSuites(
+			tools,
+			&(internal_settings->m_CipherSuites),
+			&(aSettings->iCipherSuites));
+
+		aSettings->iCipherSuitesPresent = ETrue;
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (internal_settings->m_PEAPVersionsPresent == true)
+	{
+		aSettings->iPEAPVersionsPresent = ETrue;
+
+		if (internal_settings->m_PEAPv0Allowed == true)
+		{
+			aSettings->iPEAPv0Allowed = ETrue;
+		}
+		else
+		{
+			aSettings->iPEAPv0Allowed = EFalse;
+		}
+
+		if (internal_settings->m_PEAPv1Allowed == true)
+		{
+			aSettings->iPEAPv1Allowed = ETrue;
+		}
+		else
+		{
+			aSettings->iPEAPv1Allowed = EFalse;
+		}
+
+		if (internal_settings->m_PEAPv2Allowed == true)
+		{
+			aSettings->iPEAPv2Allowed = ETrue;
+		}
+		else
+		{
+			aSettings->iPEAPv2Allowed = EFalse;
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (internal_settings->m_CertificatesPresent == true)
+	{
+		ConvertInternalTypeToCertificates(
+			tools,
+			eap_certificate_entry_c::eap_certificate_type_user,
+			&(internal_settings->m_Certificates),
+			&(aSettings->iCertificates));
+
+		ConvertInternalTypeToCertificates(
+			tools,
+			eap_certificate_entry_c::eap_certificate_type_CA,
+			&(internal_settings->m_Certificates),
+			&(aSettings->iCertificates));
+
+		aSettings->iCertificatesPresent = ETrue;
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (internal_settings->m_EnabledEncapsulatedEAPTypesPresent == true)
+	{
+		ConvertInternalTypesToExpandedEAPTypes(
+			tools,
+			&(internal_settings->m_EnabledEncapsulatedEAPTypes),
+			&(aSettings->iEnabledEncapsulatedEAPExpandedTypes));
+
+		aSettings->iEnabledEncapsulatedEAPExpandedTypesPresent = ETrue;
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (internal_settings->m_DisabledEncapsulatedEAPTypesPresent == true)
+	{
+		ConvertInternalTypesToExpandedEAPTypes(
+			tools,
+			&(internal_settings->m_DisabledEncapsulatedEAPTypes),
+			&(aSettings->iDisabledEncapsulatedEAPExpandedTypes));
+
+		aSettings->iDisabledEncapsulatedEAPExpandedTypesPresent = ETrue;
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (internal_settings->m_AuthProvModeAllowedPresent == true)
+	{
+		aSettings->iAuthProvModeAllowedPresent = ETrue;
+
+		if (internal_settings->m_AuthProvModeAllowed == true)
+		{
+			aSettings->iAuthProvModeAllowed = ETrue;
+		}
+		else
+		{
+			aSettings->iAuthProvModeAllowed = EFalse;
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (internal_settings->m_UnauthProvModeAllowedPresent == true)
+	{
+		aSettings->iUnauthProvModeAllowedPresent = ETrue;
+
+		if (internal_settings->m_UnauthProvModeAllowed == true)
+		{
+			aSettings->iUnauthProvModeAllowed = ETrue;
+		}
+		else
+		{
+			aSettings->iUnauthProvModeAllowed = EFalse;
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (internal_settings->m_PACGroupReferencePresent == true)
+	{
+		aSettings->iPACGroupReferencePresent = ETrue;
+
+		ConvertFromInternalToBuf16(tools, &(internal_settings->m_PACGroupReference), &(aSettings->iPACGroupReference));
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (internal_settings->m_WarnADHPNoPACPresent == true)
+	{
+		aSettings->iWarnADHPNoPACPresent = ETrue;
+
+		if (internal_settings->m_WarnADHPNoPAC == true)
+		{
+			aSettings->iWarnADHPNoPAC = ETrue;
+		}
+		else
+		{
+			aSettings->iWarnADHPNoPAC = EFalse;
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (internal_settings->m_WarnADHPNoMatchingPACPresent == true)
+	{
+		aSettings->iWarnADHPNoMatchingPACPresent = ETrue;
+
+		if (internal_settings->m_WarnADHPNoMatchingPAC == true)
+		{
+			aSettings->iWarnADHPNoMatchingPAC = ETrue;
+		}
+		else
+		{
+			aSettings->iWarnADHPNoMatchingPAC = EFalse;
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (internal_settings->m_WarnNotDefaultServerPresent == true)
+	{
+		aSettings->iWarnNotDefaultServerPresent = ETrue;
+
+		if (internal_settings->m_WarnNotDefaultServer == true)
+		{
+			aSettings->iWarnNotDefaultServer = ETrue;
+		}
+		else
+		{
+			aSettings->iWarnNotDefaultServer = EFalse;
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (internal_settings->m_ShowPassWordPromptPresent == true)
+	{
+		aSettings->iShowPassWordPromptPresent = ETrue;
+
+		if (internal_settings->m_ShowPassWordPrompt == true)
+		{
+			aSettings->iShowPassWordPrompt = ETrue;
+		}
+		else
+		{
+			aSettings->iShowPassWordPrompt = EFalse;
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (internal_settings->m_UseIdentityPrivacyPresent == true)
+	{
+		aSettings->iUseIdentityPrivacyPresent = ETrue;
+
+		if (internal_settings->m_UseIdentityPrivacy == true)
+		{
+			aSettings->iUseIdentityPrivacy = ETrue;
+		}
+		else
+		{
+			aSettings->iUseIdentityPrivacy = EFalse;
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	EAP_TRACE_SETTINGS(aSettings);
+
+	return KErrNone;
+}
+
+// ----------------------------------------------------------
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/common/symbian/EapExpandedType.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,305 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#include "EapExpandedType.h"
+#include "EapTraceSymbian.h"
+#include "eap_expanded_type.h"
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT TEapExpandedType::TEapExpandedType()
+{
+	EAP_TRACE_DATA_DEBUG_SYMBIAN(
+		(EAPL("TEapExpandedType::TEapExpandedType(): EapExpandedTypeNone"),
+		&EapExpandedTypeNone,
+		sizeof(EapExpandedTypeNone)));
+
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: TEapExpandedType::TEapExpandedType()\n"));
+
+	EAP_TRACE_DATA_DEBUG_SYMBIAN(
+		(EAPL("TEapExpandedType::TEapExpandedType(): EapExpandedTypeNone.GetType()"),
+		EapExpandedTypeNone.GetType(),
+		sizeof(*(EapExpandedTypeNone.GetType()))));
+
+	iValue.Copy(*(EapExpandedTypeNone.GetType()));
+
+	EAP_TRACE_DATA_DEBUG_SYMBIAN(
+		(EAPL("TEapExpandedType::TEapExpandedType()"),
+		iValue.Ptr(),
+		iValue.Length()));
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT TEapExpandedType::~TEapExpandedType()
+{
+	EAP_STATIC_ASSERT(sizeof(TConstEapExpandedTypeTemplate<KEapExpandedTypeLength>) == sizeof(TBufC8<KEapExpandedTypeLength>));
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT TEapExpandedType::TEapExpandedType(const TEapExpandedType * const init)
+{
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: TEapExpandedType::TEapExpandedType(const TEapExpandedType * const init)\n"));
+
+	iValue.Copy(init->GetValue());
+
+	EAP_TRACE_DATA_DEBUG_SYMBIAN(
+		(EAPL("TEapExpandedType::TEapExpandedType()"),
+		iValue.Ptr(),
+		iValue.Length()));
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT TEapExpandedType::TEapExpandedType(const TEapExpandedType & init)
+{
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: TEapExpandedType::TEapExpandedType(const TEapExpandedType & init)\n"));
+
+	iValue.Copy(init.GetValue());
+
+	EAP_TRACE_DATA_DEBUG_SYMBIAN(
+		(EAPL("TEapExpandedType::TEapExpandedType()"),
+		iValue.Ptr(),
+		iValue.Length()));
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT TEapExpandedType::TEapExpandedType(const TBufC8<KEapExpandedTypeLength> & init)
+{
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: TEapExpandedType::TEapExpandedType(const TBufC8<KEapExpandedTypeLength> & init)\n"));
+
+	iValue.Copy(init);
+
+	EAP_TRACE_DATA_DEBUG_SYMBIAN(
+		(EAPL("TEapExpandedType::TEapExpandedType()"),
+		iValue.Ptr(),
+		iValue.Length()));
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT TEapExpandedType::TEapExpandedType(const TDesC8 & init)
+{
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: TEapExpandedType::TEapExpandedType(const TDesC8 & init)\n"));
+
+	iValue.Copy(init);
+
+	EAP_TRACE_DATA_DEBUG_SYMBIAN(
+		(EAPL("TEapExpandedType::TEapExpandedType()"),
+		iValue.Ptr(),
+		iValue.Length()));
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT const TBuf8<KEapExpandedTypeLength> & TEapExpandedType::GetValue() const
+{
+	//EAP_TRACE_DEBUG_SYMBIAN((_L("TEapExpandedType::GetValue()\n")));
+
+	//EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: TEapExpandedType::GetValue()\n"));
+
+	return iValue;
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT TInt TEapExpandedType::SetValue(
+	const void * const data,
+	const TUint data_length)
+{
+	EAP_TRACE_DATA_DEBUG_SYMBIAN(
+		(EAPL("TEapExpandedType::SetValue(const void * const data, const TUint data_length)"),
+		data,
+		data_length));
+
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: TEapExpandedType::SetValue()\n"));
+
+	iValue.Copy(reinterpret_cast<const TUint8 *> (data), static_cast<TInt>(data_length));
+
+	EAP_TRACE_DATA_DEBUG_SYMBIAN(
+		(EAPL("TEapExpandedType::SetValue(const void * const data, const TUint data_length)"),
+		iValue.Ptr(),
+		iValue.Length()));
+
+	return KErrNone;
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT TInt TEapExpandedType::SetValue(
+	const TUint vendor_id,
+	const TUint vendor_type)
+{
+	const u32_t expanded_vendor = (0xfe000000 | static_cast<u32_t>(vendor_id));
+	const TUint net_ord_vendor = eap_htonl(expanded_vendor);
+	const TUint net_ord_type = eap_htonl(vendor_type);
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("TEapExpandedType::SetValue(): vendor_id=0x%08x, vendor_type=0x%08x, expanded_vendor=0x%08x, net_ord_vendor=0x%08x, net_ord_type=0x%08x\n"),
+		vendor_id,
+		vendor_type,
+		expanded_vendor,
+		net_ord_vendor,
+		net_ord_type));
+
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: TEapExpandedType::SetValue()\n"));
+
+	iValue.Copy(reinterpret_cast<const TUint8 *>(&net_ord_vendor), sizeof(net_ord_vendor));
+	iValue.Append(reinterpret_cast<const TUint8 *>(&net_ord_type), sizeof(net_ord_type));
+
+	EAP_TRACE_DATA_DEBUG_SYMBIAN(
+		(EAPL("TEapExpandedType::SetValue()"),
+		iValue.Ptr(),
+		iValue.Length()));
+
+	return KErrNone;
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT TUint TEapExpandedType::GetVendorId() const
+{
+	//EAP_TRACE_DEBUG_SYMBIAN((_L("TEapExpandedType::GetVendorId()\n")));
+
+	//EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: TEapExpandedType::GetVendorId()\n"));
+
+	const TUint * const aHostOrderVendorId = reinterpret_cast<const TUint *>(iValue.Ptr());
+
+	// Masks off the leading octet 0xfe.
+	return eap_ntohl(*aHostOrderVendorId) & 0x00ffffff;
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT TUint TEapExpandedType::GetVendorType() const
+{
+	//EAP_TRACE_DEBUG_SYMBIAN((_L("TEapExpandedType::GetVendorType()\n")));
+
+	//EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: TEapExpandedType::GetVendorType()\n"));
+
+	const TUint * const aHostOrderVendorType = reinterpret_cast<const TUint *>(iValue.Ptr() + sizeof(TUint));
+
+	return eap_ntohl(*aHostOrderVendorType);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT TEapExpandedType &TEapExpandedType::operator = (const TEapExpandedType &right_type_value)
+{
+	//EAP_TRACE_DEBUG_SYMBIAN((_L("TEapExpandedType::operator =(const TEapExpandedType &right_type_value)\n")));
+
+	//EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: TEapExpandedType::operator =(const TEapExpandedType &right_type_value)\n"));
+
+	iValue.Copy(right_type_value.GetValue());
+
+	EAP_TRACE_DATA_DEBUG_SYMBIAN(
+		(EAPL("TEapExpandedType::operator ="),
+		iValue.Ptr(),
+		iValue.Length()));
+
+	return *this;
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT TEapExpandedType &TEapExpandedType::operator = (const TBufC8<KEapExpandedTypeLength> &right_type_value)
+{
+	//EAP_TRACE_DEBUG_SYMBIAN((_L("TEapExpandedType::operator =(const TBufC8<KEapExpandedTypeLength> &right_type_value)\n")));
+
+	//EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: TEapExpandedType::operator =(const TBufC8<KEapExpandedTypeLength> &right_type_value)\n"));
+
+	iValue.Copy(right_type_value);
+
+	EAP_TRACE_DATA_DEBUG_SYMBIAN(
+		(EAPL("TEapExpandedType::operator ="),
+		iValue.Ptr(),
+		iValue.Length()));
+
+	return *this;
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT TEapExpandedType &TEapExpandedType::operator = (const TDesC8 &right_type_value)
+{
+	//EAP_TRACE_DEBUG_SYMBIAN((_L("TEapExpandedType::operator =(const TDesC8 &right_type_value)\n")));
+
+	//EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: TEapExpandedType::operator =(const TDesC8 &right_type_value)\n"));
+
+	ASSERT(right_type_value.Length() == KEapExpandedTypeLength);
+
+	iValue.Copy(right_type_value);
+
+	EAP_TRACE_DATA_DEBUG_SYMBIAN(
+		(EAPL("TEapExpandedType::operator ="),
+		iValue.Ptr(),
+		iValue.Length()));
+
+	return *this;
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT TInt TEapExpandedType::Compare(const TEapExpandedType &right_type_value) const
+{
+	//EAP_TRACE_DEBUG_SYMBIAN((_L("TEapExpandedType::Compare()\n")));
+
+	//EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: TEapExpandedType::Compare()\n"));
+
+	for (TUint ind = 0ul; ind < KEapExpandedTypeLength; ++ind)
+	{
+		const TUint8 left = iValue[ind];
+		const TUint8 right = right_type_value.GetValue()[ind];
+
+		if (left != right)
+		{
+			return iValue[ind] - right_type_value.GetValue()[ind];
+		}
+	}
+
+	return 0;
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT bool TEapExpandedType::operator == (const TEapExpandedType &right_type_value) const
+{
+	//EAP_TRACE_DEBUG_SYMBIAN((_L("TEapExpandedType::operator ==()\n")));
+
+	//EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: TEapExpandedType::operator ==()\n"));
+
+	return Compare(right_type_value) == 0;
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT bool TEapExpandedType::operator != (const TEapExpandedType &right_type_value) const
+{
+	//EAP_TRACE_DEBUG_SYMBIAN((_L("TEapExpandedType::operator !=()\n")));
+
+	//EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: TEapExpandedType::operator !=()\n"));
+
+	return Compare(right_type_value) != 0;
+}
+
+//--------------------------------------------------
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/common/symbian/EapMessageQueue.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,272 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 11 %
+*/
+
+
+#include "EapMessageQueue.h"
+#include "eap_am_tools.h"
+#include "EapServerStrings.h"
+#include "eap_automatic_variable.h"
+
+//----------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT EapMessageBuffer::EapMessageBuffer(abs_eap_am_tools_c * const tools)
+	: iTools(tools)
+	, iRequestType(EEapNone)
+	, iData(0)
+{
+}
+
+//----------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT EapMessageBuffer::~EapMessageBuffer()
+{
+	iRequestType = EEapNone;
+	delete iData;
+	iData = 0;
+}
+
+//----------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TInt EapMessageBuffer::CopyData(TEapRequests message, const void * const data, const TUint length)
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("EapMessageBuffer::CopyData(): message=%d, data=0x%08x, length=%d\n"),
+		message,
+		data,
+		length));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: EapMessageBuffer::CopyData()");
+
+	iRequestType = message;
+
+	TUint buffer_size = length;
+	if (buffer_size == 0)
+	{
+		buffer_size = 1;
+	}
+
+	iData = HBufC8::New(buffer_size);
+
+	if (iData == 0)
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("ERROR: EapMessageBuffer::CopyData(): iData == 0\n")));
+
+		return KErrNoMemory;
+	}
+	else
+	{
+		if (data != 0
+		&& length > 0ul)
+		{
+			EAP_TRACE_DEBUG(
+				iTools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("EapMessageBuffer::CopyData(): copies data\n")));
+
+			TPtr8 aDataPtr = iData->Des();
+			aDataPtr.Copy(reinterpret_cast<const unsigned char*>(data), length);
+		}
+		else
+		{
+			EAP_TRACE_DEBUG(
+				iTools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("EapMessageBuffer::CopyData(): set length zero\n")));
+
+			iData->Des().SetLength(0ul);
+		}
+	}
+
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("EapMessageBuffer::CopyData(): ends\n")));
+
+	return KErrNone;
+}
+
+//----------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT HBufC8 * EapMessageBuffer::GetData() const
+{
+	return iData;
+}
+
+//----------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TEapRequests EapMessageBuffer::GetRequestType() const
+{
+	return iRequestType;
+}
+
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT EapMessageQueue::EapMessageQueue(abs_eap_am_tools_c * const tools)
+	: iTools(tools)
+{
+}
+
+//----------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT EapMessageQueue::~EapMessageQueue()
+{
+    DeleteFirstMessage();
+	iEapMessageQueue.Close();
+}
+
+//----------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TInt EapMessageQueue::AddMessage(TEapRequests message, const void * const data, const TUint length)
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("EapMessageQueue::AddMessage(): message=%d, data=0x%08x, length=%d, iEapMessageQueue.Count()=%d\n"),
+		message,
+		data,
+		length,
+		iEapMessageQueue.Count()));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: EapMessageQueue::AddMessage()");
+
+	EapMessageBuffer * const buffer = new EapMessageBuffer(iTools);
+
+	if (buffer == 0)
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("ERROR: EapMessageQueue::AddMessage(): buffer == 0\n")));
+
+		return KErrNoMemory;
+	}
+
+	TInt error = buffer->CopyData(message, data, length);
+	if (error != KErrNone)
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("ERROR: EapMessageQueue::AddMessage(): buffer->CopyData() failed = %d\n"),
+			error));
+
+		delete buffer;
+
+		return error;
+	}
+
+	error = iEapMessageQueue.Append(buffer);
+	if (error != KErrNone)
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("ERROR: EapMessageQueue::AddMessage(): iEapMessageQueue.Append() failed = %d\n"),
+			error));
+
+		delete buffer;
+
+		return error;
+	}
+
+	return error;
+}
+
+//----------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT EapMessageBuffer * EapMessageQueue::GetFirstMessage()
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("EapMessageQueue::GetFirstMessage()\n")));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: EapMessageQueue::GetFirstMessage()");
+
+	TInt aCount = iEapMessageQueue.Count();
+	if (aCount > 0)
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("EapMessageQueue::GetFirstMessage(): iEapMessageQueue[0].iRequestType=%d=%s, iEapMessageQueue.Count()=%d\n"),
+			iEapMessageQueue[0]->GetRequestType(),
+			EapServerStrings::GetEapRequestsString(iEapMessageQueue[0]->GetRequestType()),
+			iEapMessageQueue.Count()));
+
+		return iEapMessageQueue[0];
+	}
+	else
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("EapMessageQueue::GetFirstMessage(): Empty array\n")));
+		return 0;
+	}
+}
+
+//----------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TInt EapMessageQueue::DeleteFirstMessage()
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("EapMessageQueue::DeleteFirstMessage()\n")));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: EapMessageQueue::DeleteFirstMessage()");
+
+	TInt aCount = iEapMessageQueue.Count();
+	if (aCount > 0)
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("EapMessageQueue::DeleteFirstMessage(): iEapMessageQueue[0].iRequestType=%d=%s, iEapMessageQueue.Count()=%d\n"),
+			iEapMessageQueue[0]->GetRequestType(),
+			EapServerStrings::GetEapRequestsString(iEapMessageQueue[0]->GetRequestType()),
+			iEapMessageQueue.Count()));
+
+		delete iEapMessageQueue[0];
+		iEapMessageQueue.Remove(0);
+	}
+	else
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("EapMessageQueue::DeleteFirstMessage(): Empty array\n")));
+	}
+
+	return KErrNone;
+}
+
+//----------------------------------------------------------------------------
+// end
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/common/symbian/EapPluginTools.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,256 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 11 %
+*/
+
+#include <EapTraceSymbian.h>
+#include <EapAutomatic.h>
+#include <EapPluginTools.h>
+#include <EapTypePlugin.h>
+#include <ecom.h>
+
+/** @file */
+
+// ----------------------------------------------------------------------
+
+EXPORT_C EapPluginTools::EapPluginTools()
+{
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapPluginTools::EapPluginTools(): this=0x%08x.\n"),
+		this));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapPluginTools::EapPluginTools()"));
+}
+
+// ----------------------------------------------------------------------
+
+EXPORT_C EapPluginTools::~EapPluginTools()
+{
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapPluginTools::~EapPluginTools(): this=0x%08x.\n"),
+		this));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapPluginTools::~EapPluginTools()"));
+}
+
+// ----------------------------------------------------------------------
+
+EXPORT_C void EapPluginTools::CleanupImplArray( TAny* aAny )
+{
+	RImplInfoPtrArray* implArray = 
+		reinterpret_cast<RImplInfoPtrArray*>( aAny );
+
+	implArray->ResetAndDestroy();
+	implArray->Close();
+}
+
+// ----------------------------------------------------------------------
+
+EXPORT_C void EapPluginTools::ListAllEapPluginsL(const TEapExpandedType & aTunnelingEapType, RPointerArray<TEapExpandedType> & aPlugins)
+{
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapPluginTools::ListAllEapPluginsL(): this=0x%08x, aTunnelingEapType=0xfe%06x%08x.\n"),
+		this,
+		aTunnelingEapType.GetVendorId(),
+		aTunnelingEapType.GetVendorType()));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapPluginTools::ListAllEapPluginsL()"));
+
+	aPlugins.Reset();   // Reset this first
+
+	RImplInfoPtrArray aEapArray;
+
+	CleanupStack::PushL( TCleanupItem( CleanupImplArray, &aEapArray ) );
+
+	REComSession::ListImplementationsL( KEapTypeInterfaceUid, aEapArray );
+
+	// EAP plugin interface dialog should show only the EAP types that allowed
+	// outside EAP-PEAP, EAP-TTLS and EAP-FAST.
+
+	for( TInt counter = 0; counter < aEapArray.Count(); counter++ )
+	{
+		TEapExpandedType plugin_type(aEapArray[counter]->DataType());
+
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapPluginTools::ListAllEapPluginsL(): aEapArray[%d] EAP-type=0xfe%06x%08x\n"),
+			counter,
+			plugin_type.GetVendorId(),
+			plugin_type.GetVendorType()));
+
+		TBool aNotAllowed(EFalse);
+
+		if (aTunnelingEapType == (*EapExpandedTypeNone.GetType()))
+		{
+			// Filter out the EAP types which are NOT allowed outside PEAP, TTLS or FAST.
+			if( CEapTypePlugin::IsDisallowedOutsidePEAP( *aEapArray[counter] ) )
+			{
+				EAP_TRACE_DEBUG_SYMBIAN((_L("EapPluginTools::ListAllEapPluginsL(): aEapArray[%d] EAP-type=0xfe%06x%08x, IsDisallowedOutsidePEAP()\n"),
+					counter,
+					plugin_type.GetVendorId(),
+					plugin_type.GetVendorType()));
+
+				aNotAllowed = ETrue;
+			}
+		}
+		else if (aTunnelingEapType == (*EapExpandedTypePeap.GetType())
+			|| aTunnelingEapType == (*EapExpandedTypeFast.GetType()))
+		{
+			// Filter out the EAP types which are NOT allowed inside PEAP or FAST.
+			if( CEapTypePlugin::IsDisallowedInsidePEAP( *aEapArray[counter] ) )
+			{
+				EAP_TRACE_DEBUG_SYMBIAN((_L("EapPluginTools::ListAllEapPluginsL(): aEapArray[%d] EAP-type=0xfe%06x%08x, IsDisallowedInsidePEAP()\n"),
+					counter,
+					plugin_type.GetVendorId(),
+					plugin_type.GetVendorType()));
+
+				aNotAllowed = ETrue;
+			}
+		}
+		else if (aTunnelingEapType == (*EapExpandedTypeTtls.GetType()))
+		{
+			// Filter out the EAP types which are NOT allowed inside TTLS.
+			if( CEapTypePlugin::IsDisallowedInsideTTLS( *aEapArray[counter] ) )
+			{
+				EAP_TRACE_DEBUG_SYMBIAN((_L("EapPluginTools::ListAllEapPluginsL(): aEapArray[%d] EAP-type=0xfe%06x%08x, IsDisallowedInsideTTLS()\n"),
+					counter,
+					plugin_type.GetVendorId(),
+					plugin_type.GetVendorType()));
+
+				aNotAllowed = ETrue;
+			}
+		}
+
+		if (aNotAllowed)
+		{
+			EAP_TRACE_DEBUG_SYMBIAN((_L("EapPluginTools::ListAllEapPluginsL(): Removes EAP-plugin aEapArray[%d] EAP-type=0xfe%06x%08x\n"),
+				counter,
+				plugin_type.GetVendorId(),
+				plugin_type.GetVendorType()));
+
+			// Delete the EAP type, which isn't allowed here from the array.
+			delete aEapArray[counter];
+			aEapArray.Remove( counter );
+
+			// One item removed from the array. So reduce the item counter.
+			counter--;
+		}
+	}
+
+	for (TInt ind = 0; ind < aEapArray.Count(); ind++ )
+	{
+		TEapExpandedType * eap_type = new TEapExpandedType;
+		if (eap_type != 0)
+		{
+			*eap_type = aEapArray[ind]->DataType();
+
+			EAP_TRACE_DEBUG_SYMBIAN((_L("EapPluginTools::ListAllEapPluginsL(): aEapArray[%d] EAP-type=0xfe%06x%08x\n"),
+				ind,
+				eap_type->GetVendorId(),
+				eap_type->GetVendorType()));
+
+			User::LeaveIfError( aPlugins.Append( eap_type ) );
+		}
+	}
+
+	CleanupStack::PopAndDestroy(&aEapArray);
+}
+
+// ----------------------------------------------------------------------
+
+EXPORT_C void EapPluginTools::GetPrivatePathL(
+	RFs& aFileServerSession,
+	TFileName& aPrivateDatabasePathName)
+{
+	// Reads the private folder.
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapPluginTools::GetPrivatePathL(): - calls aFileServerSession.Connect()\n")));
+
+	TInt error = aFileServerSession.Connect();
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapPluginTools::GetPrivatePathL(): - aFileServerSession.Connect(), error=%d\n"), error));
+
+	User::LeaveIfError(error);
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapPluginTools::GetPrivatePathL(): - calls aFileServerSession.PrivatePath()\n")));
+
+	aPrivateDatabasePathName.SetLength(0);
+
+	error = aFileServerSession.PrivatePath(aPrivateDatabasePathName);
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapPluginTools::GetPrivatePathL(): - aFileServerSession.PrivatePath(), error=%d\n"), error));
+
+	User::LeaveIfError(error);
+
+	EAP_TRACE_DATA_DEBUG_SYMBIAN(("aPrivateDatabasePathName",
+		aPrivateDatabasePathName.Ptr(),
+		aPrivateDatabasePathName.Size()));
+}
+
+// ----------------------------------------------------------------------
+
+EXPORT_C void EapPluginTools::GetPrivatePathL(
+	TFileName& aPrivateDatabasePathName)
+{
+	// Reads the private folder.
+
+	RFs aFileServerSession;
+
+	EapPluginTools::GetPrivatePathL(
+		aFileServerSession,
+		aPrivateDatabasePathName);
+}
+
+// ----------------------------------------------------------------------
+
+EXPORT_C void EapPluginTools::CreateDatabaseLC(
+	RDbNamedDatabase& aDatabase,
+	RFs& aFileServerSession,
+	TInt& error,
+	const TDesC& aDatabaseName,
+	TFileName& aPrivateDatabasePathName)
+{
+	CleanupClosePushL(aFileServerSession);
+	CleanupClosePushL(aDatabase);
+
+	// aDatabase is pushed to the cleanup stack even though they may be member
+	// variables of the calling class and would be closed in the destructor anyway. This ensures
+	// that if they are not member variables they will be closed. Closing the handle twice
+	// does no harm.	
+
+	// Create the private database in the private folder of EAP-server.
+
+	EapPluginTools::GetPrivatePathL(
+		aFileServerSession,
+		aPrivateDatabasePathName);
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapPluginTools::CreateDatabaseLC(): - calls aPrivateDatabasePathName.Append()\n")));
+
+	aPrivateDatabasePathName.Append(aDatabaseName);
+
+	EAP_TRACE_DATA_DEBUG_SYMBIAN(("aPrivateDatabasePathName",
+		aPrivateDatabasePathName.Ptr(),
+		aPrivateDatabasePathName.Size()));
+
+	User::LeaveIfError(error);
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapPluginTools::CreateDatabaseLC(): - calls aDatabase.Create()\n")));
+
+	error = aDatabase.Create(aFileServerSession, aPrivateDatabasePathName);
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapPluginTools::CreateDatabaseLC(): - Created private DB for %S. error=%d, (%d is KErrAlreadyExists)\n"),
+		&aDatabaseName,
+		error,
+		KErrAlreadyExists));
+}
+
+// ----------------------------------------------------------------------
+// End
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/common/symbian/EapSettings.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,992 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 41 %
+*/
+
+#include <e32debug.h>
+#include "EapSettings.h"
+#include "EapTraceSymbian.h"
+#include "eap_am_export.h"
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT EapCertificateEntry::EapCertificateEntry()
+: iCertType(ENone)
+, iSubjectNamePresent(EFalse)
+, iIssuerNamePresent(EFalse)
+, iSerialNumberPresent(EFalse)
+, iThumbprintPresent(EFalse)
+, iLabelPresent(EFalse)
+, iPrimaryNamePresent(EFalse)
+, iSecondaryNamePresent(EFalse)
+, iIsEnabledPresent(EFalse)
+, iSubjectKeyIdPresent(EFalse)
+, iIsValid(EFalse)
+{
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapCertificateEntry::EapCertificateEntry()")));
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT EapCertificateEntry::~EapCertificateEntry()
+{
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapCertificateEntry::~EapCertificateEntry()")));
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT void EapCertificateEntry::trace() const
+{
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapCertificateEntry::trace(): iCertType=%d"),
+		iCertType));
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapCertificateEntry::trace(): iSubjectNamePresent=%d"),
+		iSubjectNamePresent));
+	if (iSubjectNamePresent)
+	{
+		EAP_TRACE_DATA_DEBUG_SYMBIAN(("EapCertificateEntry::trace(): iSubjectName",
+			iSubjectName.Ptr(),
+			iSubjectName.Size()));
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapCertificateEntry::trace(): iIssuerNamePresent=%d"),
+		iIssuerNamePresent));
+	if (iIssuerNamePresent)
+	{
+		EAP_TRACE_DATA_DEBUG_SYMBIAN(("EapCertificateEntry::trace(): iIssuerName",
+			iIssuerName.Ptr(),
+			iIssuerName.Size()));
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapCertificateEntry::trace(): iSerialNumberPresent=%d"),
+		iSerialNumberPresent));
+	if (iSerialNumberPresent)
+	{
+		EAP_TRACE_DATA_DEBUG_SYMBIAN(("EapCertificateEntry::trace(): iSerialNumber",
+			iSerialNumber.Ptr(),
+			iSerialNumber.Size()));
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapCertificateEntry::trace(): iThumbprintPresent=%d"),
+		iThumbprintPresent));
+	if (iThumbprintPresent)
+	{
+		EAP_TRACE_DATA_DEBUG_SYMBIAN(("EapCertificateEntry::trace(): iThumbprint",
+			iThumbprint.Ptr(),
+			iThumbprint.Size()));
+	}
+
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapCertificateEntry::trace(): iLabelPresent=%d"),
+		iLabelPresent));
+	if (iLabelPresent)
+	{
+		EAP_TRACE_DATA_DEBUG_SYMBIAN(("EapCertificateEntry::trace(): iLabel",
+			iLabel.Ptr(),
+			iLabel.Size()));
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapCertificateEntry::trace(): iPrimaryNamePresent=%d"),
+		iPrimaryNamePresent));
+	if (iPrimaryNamePresent)
+	{
+		EAP_TRACE_DATA_DEBUG_SYMBIAN(("EapCertificateEntry::trace(): iPrimaryName",
+			iPrimaryName.Ptr(),
+			iPrimaryName.Size()));
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapCertificateEntry::trace(): iSecondaryNamePresent=%d"),
+		iSecondaryNamePresent));
+	if (iSecondaryNamePresent)
+	{
+		EAP_TRACE_DATA_DEBUG_SYMBIAN(("EapCertificateEntry::trace(): iSecondaryName",
+			iSecondaryName.Ptr(),
+			iSecondaryName.Size()));
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapCertificateEntry::trace(): iIsEnabledPresent=%d"),
+		iIsEnabledPresent));
+	if (iIsEnabledPresent)
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapCertificateEntry::trace(): iIsEnabled=%d"),
+			iIsEnabled));
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapCertificateEntry::trace(): iSubjectKeyIdPresent=%d"),
+		iSubjectKeyIdPresent));
+	if (iSubjectKeyIdPresent)
+	{
+		EAP_TRACE_DATA_DEBUG_SYMBIAN(("EapCertificateEntry::trace(): iSubjectKeyId",
+			iSubjectKeyId.Ptr(),
+			iSubjectKeyId.Size()));
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapCertificateEntry::trace(): iIsValid=%d"),
+		iIsValid));
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT EapCertificateEntry * EapCertificateEntry::Copy()
+{
+	EapCertificateEntry * const entry = new EapCertificateEntry;
+	if (entry == 0)
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapCertificateEntry::Copy(): No memory.\n")));
+		return 0;
+	}
+
+	*entry = *this;
+
+	if (entry->iIsValid == EFalse)
+	{
+		delete entry;
+
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapCertificateEntry::Copy(): No memory.\n")));
+		return 0;
+	}
+
+	return entry;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT EapCertificateEntry &EapCertificateEntry::operator = (const EapCertificateEntry &right_type_value)
+{
+	if (this == &right_type_value)
+	{
+		return *this;
+	}
+
+	iIsValid = EFalse;
+
+
+	SetCertType(right_type_value.GetCertType());
+
+	if (right_type_value.GetSubjectNamePresent())
+	{
+		if (SetSubjectName(*right_type_value.GetSubjectName()) != KErrNone)
+		{
+			EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapCertificateEntry::operator = (): SetSubjectName(): No memory.\n")));
+			return *this;
+		}
+	}
+
+	if (right_type_value.GetIssuerNamePresent())
+	{
+		if (SetIssuerName(*right_type_value.GetIssuerName()) != KErrNone)
+		{
+			EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapCertificateEntry::operator = (): SetIssuerName(): No memory.\n")));
+			return *this;
+		}
+	}
+
+	if (right_type_value.GetSerialNumberPresent())
+	{
+		if (SetSerialNumber(*right_type_value.GetSerialNumber()) != KErrNone)
+		{
+			EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapCertificateEntry::operator = (): SetSerialNumber(): No memory.\n")));
+			return *this;
+		}
+	}
+
+	if (right_type_value.GetThumbprintPresent())
+	{
+		if (SetThumbprint(*right_type_value.GetThumbprint()) != KErrNone)
+		{
+			EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapCertificateEntry::operator = (): SetThumbprint(): No memory.\n")));
+			return *this;
+		}
+	}
+
+
+	if (right_type_value.GetLabelPresent())
+	{
+		if (SetLabel(*right_type_value.GetLabel()) != KErrNone)
+		{
+			EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapCertificateEntry::operator = (): SetLabel(): No memory.\n")));
+			return *this;
+		}
+	}
+
+	if (right_type_value.GetPrimaryNamePresent())
+	{
+		if (SetPrimaryName(*right_type_value.GetPrimaryName()) != KErrNone)
+		{
+			EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapCertificateEntry::operator = (): SetPrimaryName(): No memory.\n")));
+			return *this;
+		}
+	}
+
+	if (right_type_value.GetSecondaryNamePresent())
+	{
+		if (SetSecondaryName(*right_type_value.GetSecondaryName()) != KErrNone)
+		{
+			EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapCertificateEntry::operator = (): SetSecondaryName(): No memory.\n")));
+			return *this;
+		}
+	}
+
+	if (right_type_value.GetIsEnabledPresent())
+	{
+		if (SetIsEnabled(right_type_value.GetIsEnabled()) != KErrNone)
+		{
+			EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapCertificateEntry::operator = (): SetIsEnabled(): No memory.\n")));
+			return *this;
+		}
+	}
+
+	if (right_type_value.GetSubjectKeyIdPresent())
+	{
+		if (SetSubjectKeyId(right_type_value.GetSubjectKeyId()) != KErrNone)
+		{
+			EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapCertificateEntry::operator = (): SetSubjectKeyId(): No memory.\n")));
+			return *this;
+		}
+	}
+
+	iIsValid = ETrue;
+
+	return *this;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TBool EapCertificateEntry::GetSubjectNamePresent() const
+{
+	return iSubjectNamePresent;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TBool EapCertificateEntry::GetIssuerNamePresent() const
+{
+	return iIssuerNamePresent;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TBool EapCertificateEntry::GetSerialNumberPresent() const
+{
+	return iSerialNumberPresent;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TBool EapCertificateEntry::GetThumbprintPresent() const
+{
+	return iThumbprintPresent;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TBool EapCertificateEntry::GetLabelPresent() const
+{
+	return iLabelPresent;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TBool EapCertificateEntry::GetPrimaryNamePresent() const
+{
+	return iPrimaryNamePresent;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TBool EapCertificateEntry::GetSecondaryNamePresent() const
+{
+	return iSecondaryNamePresent;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TBool EapCertificateEntry::GetIsEnabledPresent() const
+{
+	return iIsEnabledPresent;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TBool EapCertificateEntry::GetSubjectKeyIdPresent() const
+{
+	return iSubjectKeyIdPresent;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT void EapCertificateEntry::SetSubjectNamePresent()
+{
+	iSubjectNamePresent = ETrue;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT void EapCertificateEntry::SetIssuerNamePresent()
+{
+	iIssuerNamePresent = ETrue;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT void EapCertificateEntry::SetSerialNumberPresent()
+{
+	iSerialNumberPresent = ETrue;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT void EapCertificateEntry::SetThumbprintPresent()
+{
+	iThumbprintPresent = ETrue;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT void EapCertificateEntry::SetLabelPresent()
+{
+	iLabelPresent = ETrue;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT void EapCertificateEntry::SetPrimaryNamePresent()
+{
+	iPrimaryNamePresent = ETrue;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT void EapCertificateEntry::SetSecondaryNamePresent()
+{
+	iSecondaryNamePresent = ETrue;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT void EapCertificateEntry::SetIsEnabledPresent()
+{
+	iIsEnabledPresent = ETrue;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT void EapCertificateEntry::SetSubjectKeyIdPresent()
+{
+	iSubjectKeyIdPresent = ETrue;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT EapCertificateEntry::TCertType EapCertificateEntry::GetCertType() const
+{
+	return iCertType;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT const TDes * EapCertificateEntry::GetSubjectName() const
+{
+	return &iSubjectName;
+}
+	
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT const TDes * EapCertificateEntry::GetIssuerName() const
+{
+	return &iIssuerName;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT const TDes * EapCertificateEntry::GetSerialNumber() const
+{
+	return &iSerialNumber;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT const TDes * EapCertificateEntry::GetThumbprint() const
+{
+	return &iThumbprint;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TInt EapCertificateEntry::SetCertType(const TCertType & aType)
+{
+	iCertType = aType;
+
+	return KErrNone;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TInt EapCertificateEntry::SetSubjectName(const TBuf<KGeneralStringMaxLength> & aSubjectName)
+{
+	iSubjectName.Copy(aSubjectName);
+	if (iSubjectName.Length() != aSubjectName.Length())
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapCertificateEntry::SetLabel(): iSubjectName.Copy(): No memory.\n")));
+		return KErrNoMemory;
+	}
+
+	iSubjectNamePresent = ETrue;
+
+	return KErrNone;
+}
+	
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TInt EapCertificateEntry::SetIssuerName(const TBuf<KGeneralStringMaxLength> & aIssuerName)
+{
+	iIssuerName.Copy(aIssuerName);
+	if (iIssuerName.Length() != aIssuerName.Length())
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapCertificateEntry::SetLabel(): iIssuerName.Copy(): No memory.\n")));
+		return KErrNoMemory;
+	}
+
+	iIssuerNamePresent = ETrue;
+
+	return KErrNone;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TInt EapCertificateEntry::SetSerialNumber(const TBuf<KGeneralStringMaxLength> & aSerialNumber)
+{
+	iSerialNumber.Copy(aSerialNumber);
+	if (iSerialNumber.Length() != aSerialNumber.Length())
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapCertificateEntry::SetLabel(): iSerialNumber.Copy(): No memory.\n")));
+		return KErrNoMemory;
+	}
+
+	iSerialNumberPresent = ETrue;
+
+	return KErrNone;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TInt EapCertificateEntry::SetThumbprint(const TBuf<KThumbprintMaxLength> & aThumbprint)
+{
+	iThumbprint.Copy(aThumbprint);
+	if (iThumbprint.Length() != aThumbprint.Length())
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapCertificateEntry::SetLabel(): iThumbprint.Copy(): No memory.\n")));
+		return KErrNoMemory;
+	}
+
+	iThumbprintPresent = ETrue;
+
+	return KErrNone;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT const TDes * EapCertificateEntry::GetLabel() const
+{
+	return &iLabel;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT const TKeyIdentifier & EapCertificateEntry::GetSubjectKeyId() const
+{
+	return iSubjectKeyId;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT const TDes * EapCertificateEntry::GetPrimaryName() const
+{
+	return &iPrimaryName;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT const TDes * EapCertificateEntry::GetSecondaryName() const
+{
+	return &iSecondaryName;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TDes * EapCertificateEntry::GetLabelWritable()
+{
+	return &iLabel;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TKeyIdentifier * EapCertificateEntry::GetSubjectKeyIdWritable()
+{
+	return &iSubjectKeyId;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TDes * EapCertificateEntry::GetPrimaryNameWritable()
+{
+	return &iPrimaryName;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TDes * EapCertificateEntry::GetSecondaryNameWritable()
+{
+	return &iSecondaryName;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TDes * EapCertificateEntry::GetSubjectNameWritable()
+{
+	return &iSubjectName;
+}
+	
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TDes * EapCertificateEntry::GetIssuerNameWritable()
+{
+	return &iIssuerName;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TDes * EapCertificateEntry::GetSerialNumberWritable()
+{
+	return &iSerialNumber;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TDes * EapCertificateEntry::GetThumbprintWritable()
+{
+	return &iThumbprint;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TBool EapCertificateEntry::GetIsEnabled() const
+{
+	return iIsEnabled;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TBool EapCertificateEntry::GetIsValid() const
+{
+	return iIsValid;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TInt EapCertificateEntry::SetLabel(const TCertLabel & aLabel)
+{
+	iLabel.Copy(aLabel);
+	if (iLabel.Length() != aLabel.Length())
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapCertificateEntry::SetLabel(): iLabel.Copy(): No memory.\n")));
+		return KErrNoMemory;
+	}
+
+	iLabelPresent = ETrue;
+
+	return KErrNone;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TInt EapCertificateEntry::SetPrimaryName(const TBuf<KMaxCertNameLength> & aPrimaryName)
+{
+	iPrimaryName.Copy(aPrimaryName);
+	if (iPrimaryName.Length() != aPrimaryName.Length())
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapCertificateEntry::operator = (): iPrimaryName.Copy(): No memory.\n")));
+		return KErrNoMemory;
+	}
+
+	iPrimaryNamePresent = ETrue;
+
+	return KErrNone;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TInt EapCertificateEntry::SetSecondaryName(const TBuf<KMaxCertNameLength> & aSecondaryName)
+{
+	iSecondaryName.Copy(aSecondaryName);
+	if (iSecondaryName.Length() != aSecondaryName.Length())
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapCertificateEntry::operator = (): iSecondaryName.Copy(): No memory.\n")));
+		return KErrNoMemory;
+	}
+
+	iSecondaryNamePresent = ETrue;
+
+	return KErrNone;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TInt EapCertificateEntry::SetSubjectKeyId(const TKeyIdentifier & aSubjectKeyId)
+{
+	iSubjectKeyId.Copy(aSubjectKeyId);
+	if (iSubjectKeyId.Length() != aSubjectKeyId.Length())
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapCertificateEntry::operator = (): iSubjectKeyId.Copy(): No memory.\n")));
+		return KErrNoMemory;
+	}
+
+	iSubjectKeyIdPresent = ETrue;
+
+	return KErrNone;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TInt EapCertificateEntry::SetIsEnabled(const TBool aIsEnabled)
+{
+	iIsEnabled = aIsEnabled;
+	iIsEnabledPresent = ETrue;
+
+	return KErrNone;
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT TInt EapCertificateEntry::SetIsValid(const TBool aIsValid)
+{
+	iIsValid = aIsValid;
+
+	return KErrNone;
+}
+
+//-------------------------------------------------------------------------------------
+//-------------------------------------------------------------------------------------
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT EAPSettings::EAPSettings()
+: iEAPExpandedType(*(EapExpandedTypeNone.GetType()))
+, iUseAutomaticCACertificatePresent(EFalse)
+, iUseAutomaticCACertificate(EFalse)
+, iUseAutomaticUsernamePresent(EFalse)
+, iUseAutomaticUsername(EFalse)
+, iUseAutomaticRealmPresent(EFalse)
+, iUsernamePresent(EFalse)
+, iPasswordExistPresent(EFalse)
+, iPasswordExist(EFalse)
+, iPasswordPresent(EFalse)
+, iRealmPresent(EFalse)
+, iUsePseudonymsPresent(EFalse)
+, iUsePseudonyms(EFalse)
+, iVerifyServerRealmPresent(EFalse)
+, iVerifyServerRealm(EFalse)
+, iRequireClientAuthenticationPresent(EFalse)
+, iRequireClientAuthentication(EFalse)
+, iSessionValidityTimePresent(EFalse)
+, iSessionValidityTime(0ul)
+, iCipherSuitesPresent(EFalse)
+, iCipherSuites(1)
+, iPEAPVersionsPresent(EFalse)
+, iPEAPv0Allowed(EFalse)
+, iPEAPv1Allowed(EFalse)
+, iPEAPv2Allowed(EFalse)
+, iCertificatesPresent(EFalse)
+, iCertificates(1)
+, iEnabledEncapsulatedEAPExpandedTypesPresent(EFalse)
+, iEnabledEncapsulatedEAPExpandedTypes(1)
+, iDisabledEncapsulatedEAPExpandedTypesPresent(EFalse)
+, iDisabledEncapsulatedEAPExpandedTypes(1)
+, iAuthProvModeAllowedPresent(EFalse)
+, iAuthProvModeAllowed(EFalse)
+, iUnauthProvModeAllowedPresent(EFalse)
+, iUnauthProvModeAllowed(EFalse)
+, iPACGroupReferencePresent(EFalse)
+, iWarnADHPNoPACPresent(EFalse)
+, iWarnADHPNoPAC(EFalse)
+, iWarnADHPNoMatchingPACPresent(EFalse)
+, iWarnADHPNoMatchingPAC(EFalse)
+, iWarnNotDefaultServerPresent(EFalse)
+, iWarnNotDefaultServer(EFalse)
+, iShowPassWordPromptPresent(EFalse)
+, iShowPassWordPrompt(EFalse)
+, iUseIdentityPrivacyPresent(EFalse)
+, iUseIdentityPrivacy(EFalse)
+{
+    EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::EAPSettings()")));
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT EAPSettings::~EAPSettings()
+{
+    EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::~EAPSettings(): starts")));
+
+    EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::~EAPSettings(): calls iCipherSuites.Close()")));
+	iCipherSuites.Close(); // The Close() function must be called before RArray object is destroyed.
+
+    EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::~EAPSettings(): calls iCertificates.ResetAndDestroy()")));
+	iCertificates.ResetAndDestroy(); // ResetAndDestroy() function must be called because the objects represented by the array need to be deleted before the array object is destroyed.
+    EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::~EAPSettings(): calls iCertificates.Close()")));
+	iCertificates.Close(); // The Close() function must be called before RPointerArray object is destroyed.
+
+    EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::~EAPSettings(): calls iEnabledEncapsulatedEAPExpandedTypes.Close()")));
+	iEnabledEncapsulatedEAPExpandedTypes.Close(); // The Close() function must be called before RArray object is destroyed.
+
+    EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::~EAPSettings(): calls iDisabledEncapsulatedEAPExpandedTypes.Close()")));
+	iDisabledEncapsulatedEAPExpandedTypes.Close(); // The Close() function must be called before RArray object is destroyed.
+
+    EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::~EAPSettings(): ends")));
+}
+
+//-------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT void EAPSettings::trace() const
+{
+	TUint ind = 0ul;
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace(): iEAPExpandedType=0xfe%06x%08x"),
+		iEAPExpandedType.GetVendorId(),
+		iEAPExpandedType.GetVendorType()));
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace(): iUseAutomaticCACertificatePresent=%d"),
+		iUseAutomaticCACertificatePresent));
+	if (iUseAutomaticCACertificatePresent)
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace():     iUseAutomaticCACertificate=%d"),
+			iUseAutomaticCACertificate) );
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace(): iUseAutomaticUsernamePresent=%d"),
+		iUseAutomaticUsernamePresent));
+	if (iUseAutomaticUsernamePresent)
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace():     iUseAutomaticUsername=%d"),
+			iUseAutomaticUsername) );
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace(): iUseAutomaticRealmPresent=%d"),
+		iUseAutomaticRealmPresent));
+	if (iUseAutomaticRealmPresent)
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace():     iUseAutomaticRealm=%d"),
+			iUseAutomaticRealm) );
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace(): iUsernamePresent=%d"),
+		iUsernamePresent));
+	if (iUsernamePresent)
+	{
+		EAP_TRACE_DATA_DEBUG_SYMBIAN(("EAPSettings::trace():     iUsername",
+			iUsername.Ptr(),
+			iUsername.Size()));
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace(): iPasswordExistPresent=%d"),
+		iPasswordExistPresent));
+	if (iPasswordExistPresent)
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace():     iPasswordExist=%d"),
+			iPasswordExist) );
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace(): iPasswordPresent=%d"),
+		iPasswordPresent));
+	if (iPasswordPresent)
+	{
+		EAP_TRACE_DATA_DEBUG_SYMBIAN(("EAPSettings::trace():     iPassword",
+			iPassword.Ptr(),
+			iPassword.Size()));
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace(): iRealmPresent=%d"),
+		iRealmPresent));
+	if (iRealmPresent)
+	{
+		EAP_TRACE_DATA_DEBUG_SYMBIAN(("EAPSettings::trace():     iRealm",
+			iRealm.Ptr(),
+			iRealm.Size()));
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace(): iUsePseudonymsPresent=%d"),
+		iUsePseudonymsPresent));
+	if (iUsePseudonymsPresent)
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace():     iUsePseudonyms=%d"),
+			iUsePseudonyms) );
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace(): iVerifyServerRealmPresent=%d"),
+		iVerifyServerRealmPresent));
+	if (iVerifyServerRealmPresent)
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace():     iVerifyServerRealm=%d"),
+			iVerifyServerRealm));
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace(): iRequireClientAuthenticationPresent=%d"),
+		iRequireClientAuthenticationPresent));
+	if (iRequireClientAuthenticationPresent)
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace():     iRequireClientAuthentication=%d"),
+			iRequireClientAuthentication));
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace(): iSessionValidityTimePresent=%d"),
+		iSessionValidityTimePresent));
+	if (iSessionValidityTimePresent)
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace():     iSessionValidityTime=%d"),
+			iSessionValidityTime));
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace(): iCipherSuitesPresent=%d"),
+		iCipherSuitesPresent));
+	if (iCipherSuitesPresent)
+	{
+		for (ind = 0ul; ind < iCipherSuites.Count(); ++ind)
+		{
+			EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace():     iCipherSuites[%d]=%d"),
+				ind,
+				iCipherSuites[ind]));
+		}
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace(): iPEAPVersionsPresent=%d"),
+		iPEAPVersionsPresent));
+	if (iPEAPVersionsPresent)
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace():     iPEAPv0Allowed=%d"),
+			iPEAPv0Allowed));
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace():     iPEAPv1Allowed=%d"),
+			iPEAPv1Allowed));
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace():     iPEAPv2Allowed=%d"),
+			iPEAPv2Allowed));
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace(): iCertificatesPresent=%d"),
+		iCertificatesPresent));
+	if (iCertificatesPresent)
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace():     iCertificates=%d"),
+			iCertificates.Count()));
+		for (ind = 0ul; ind < iCertificates.Count(); ++ind)
+		{
+			iCertificates[ind]->trace();
+		}
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace(): iEnabledEncapsulatedEAPExpandedTypesPresent=%d"),
+		iEnabledEncapsulatedEAPExpandedTypesPresent));
+	if (iEnabledEncapsulatedEAPExpandedTypesPresent)
+	{
+		for (ind = 0ul; ind < iEnabledEncapsulatedEAPExpandedTypes.Count(); ++ind)
+		{
+			EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace():     iEnabledEncapsulatedEAPExpandedTypes[%d]=0xfe%06x%08x"),
+				ind,
+				iEnabledEncapsulatedEAPExpandedTypes[ind].GetVendorId(),
+				iEnabledEncapsulatedEAPExpandedTypes[ind].GetVendorType()));
+		}
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace(): iDisabledEncapsulatedEAPExpandedTypesPresent=%d"),
+		iDisabledEncapsulatedEAPExpandedTypesPresent));
+	if (iDisabledEncapsulatedEAPExpandedTypesPresent)
+	{
+		for (ind = 0ul; ind < iDisabledEncapsulatedEAPExpandedTypes.Count(); ++ind)
+		{
+			EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace():     iDisabledEncapsulatedEAPExpandedTypes[%d]=0xfe%06x%08x"),
+				ind,
+				iDisabledEncapsulatedEAPExpandedTypes[ind].GetVendorId(),
+				iDisabledEncapsulatedEAPExpandedTypes[ind].GetVendorType()));
+		}
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace(): iAuthProvModeAllowedPresent=%d"),
+		iAuthProvModeAllowedPresent));
+	if (iAuthProvModeAllowedPresent)
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace():     iAuthProvModeAllowed=%d"),
+			iAuthProvModeAllowed));
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace(): iUnauthProvModeAllowedPresent=%d"),
+		iUnauthProvModeAllowedPresent));
+	if (iUnauthProvModeAllowedPresent)
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace():     iUnauthProvModeAllowed=%d"),
+			iUnauthProvModeAllowed));
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace(): iPACGroupReferencePresent=%d"),
+		iPACGroupReferencePresent));
+	if (iPACGroupReferencePresent)
+	{
+		EAP_TRACE_DATA_DEBUG_SYMBIAN(("EAPSettings::trace():     iPACGroupReference",
+			iPACGroupReference.Ptr(),
+			iPACGroupReference.Size()));
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace(): iWarnADHPNoPACPresent=%d"),
+		iWarnADHPNoPACPresent));
+	if (iWarnADHPNoPACPresent)
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace():     iWarnADHPNoPAC=%d"),
+			iWarnADHPNoPAC));
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace(): iWarnADHPNoMatchingPACPresent=%d"),
+		iWarnADHPNoMatchingPACPresent));
+	if (iWarnADHPNoMatchingPACPresent)
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace():     iWarnADHPNoMatchingPAC=%d"),
+			iWarnADHPNoMatchingPAC));
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace(): iWarnNotDefaultServerPresent=%d"),
+		iWarnNotDefaultServerPresent));
+	if (iWarnNotDefaultServerPresent)
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace():     iWarnNotDefaultServer=%d"),
+			iWarnNotDefaultServer));
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace(): iShowPassWordPromptPresent=%d"),
+		iShowPassWordPromptPresent));
+	if (iShowPassWordPromptPresent)
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace():     iShowPassWordPrompt=%d"),
+			iShowPassWordPrompt));
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace(): iUseIdentityPrivacyPresent=%d"),
+		iUseIdentityPrivacyPresent));
+	if (iUseIdentityPrivacyPresent)
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EAPSettings::trace():     iUseIdentityPrivacy=%d"),
+			iUseIdentityPrivacy));
+	}
+}
+
+//-------------------------------------------------------------------------------------
+// end of file
--- a/eapol/eapol_framework/eapol_symbian/am/common/symbian/dll_entry.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/common/symbian/dll_entry.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_symbian/am/common/symbian/eap_am_async_wait_symbian.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/common/symbian/eap_am_async_wait_symbian.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 4 %
+* %version: %
 */
 
 // INCLUDE FILES
--- a/eapol/eapol_framework/eapol_symbian/am/common/symbian/eap_am_crypto_symbian.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/common/symbian/eap_am_crypto_symbian.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 20 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_symbian/am/common/symbian/eap_am_mutex_symbian.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/common/symbian/eap_am_mutex_symbian.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_symbian/am/common/symbian/eap_am_semaphore_symbian.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/common/symbian/eap_am_semaphore_symbian.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 4.1.2 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -31,7 +31,7 @@
 
 // INCLUDES
 #include "eap_am_memory.h"
-#include "eap_am_trace_symbian.h"
+#include "EapTraceSymbian.h"
 
 #include "eap_am_semaphore_symbian.h"
 
--- a/eapol/eapol_framework/eapol_symbian/am/common/symbian/eap_am_tools_symbian.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/common/symbian/eap_am_tools_symbian.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 22.1.3 %
+* %version: 32 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -28,11 +28,12 @@
 #endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
 
 
+#include <e32math.h>
+#include <utf.h>
 
 #include "eap_am_tools_symbian.h"
 #include "eap_am_types.h"
-#include <e32math.h>
-#include <utf.h>
+#include "eap_automatic_variable.h"
 
 const TUint MAX_DB_TRANSACTION_RETRY_COUNT = 10;
 const u32_t EAP_TIMER_MAX_AFTER_TIME_MILLISECONDS_SYMBIAN = 2100000ul;
@@ -63,6 +64,7 @@
 EAP_FUNC_EXPORT eap_am_tools_symbian_c::eap_am_tools_symbian_c(eap_const_string /*pfilename*/)
 	: eap_am_tools_c()
 	, CTimer(CTimer::EPriorityStandard)
+	, m_prefix_string(this)
 	, m_start_ticks(0)
 	, m_directory_exists(false)
 	, m_crypto(this)
@@ -79,17 +81,39 @@
 
 #if defined(USE_EAP_HARDWARE_TRACE)
 	set_trace_mask(
-		eap_am_tools_c::eap_trace_mask_always
-		| eap_am_tools_c::eap_trace_mask_error
+		TRACE_FLAGS_ALWAYS
+		| TRACE_FLAGS_ERROR
 		| eap_am_tools_c::eap_trace_mask_debug
-		| eap_am_tools_c::eap_trace_mask_message_data);
+		| EAP_TRACE_FLAGS_MESSAGE_DATA
+		| TRACE_FLAGS_TIMER
+		| TRACE_FLAGS_TIMER_QUEUE);
 #endif //#if defined(USE_EAP_HARDWARE_TRACE)
 
+	const u8_t DEFAULT_PREFIX[] = "EAPOL";
+
+	eap_status_e status = m_prefix_string.set_copy_of_buffer(DEFAULT_PREFIX, sizeof(DEFAULT_PREFIX)-1ul);;
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(this, TRACE_FLAGS_DEFAULT);
+		(void)EAP_STATUS_RETURN(this, status);
+		return;
+	}
+
+	status = m_prefix_string.add_end_null();
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(this, TRACE_FLAGS_DEFAULT);
+		(void)EAP_STATUS_RETURN(this, status);
+		return;
+	}
+
 	EAP_TRACE_DEBUG(
 		this,
 		TRACE_FLAGS_DEFAULT,
 		(EAPL("eap_am_tools_symbian_c::eap_am_tools_symbian_c()\n")));
 
+	EAP_TRACE_RETURN_STRING(this, "returns: eap_am_tools_symbian_c::eap_am_tools_symbian_c()");
+
 	if (m_crypto.get_is_valid() == false)
 	{
 		EAP_TRACE_ERROR(
@@ -160,6 +184,8 @@
 		TRACE_FLAGS_DEFAULT,
 		(EAPL("eap_am_tools_symbian_c::configure()\n")));
 
+	EAP_TRACE_RETURN_STRING(this, "returns: eap_am_tools_symbian_c::configure()");
+
 	if (m_configure_called == true)
 	{
 		return EAP_STATUS_RETURN(this, eap_status_ok);
@@ -167,10 +193,12 @@
 
 #if defined(USE_EAP_HARDWARE_TRACE)
 	set_trace_mask(
-		eap_am_tools_c::eap_trace_mask_always
-		| eap_am_tools_c::eap_trace_mask_error
+		TRACE_FLAGS_ALWAYS
+		| TRACE_FLAGS_ERROR
 		| eap_am_tools_c::eap_trace_mask_debug
-		| eap_am_tools_c::eap_trace_mask_message_data);
+		| EAP_TRACE_FLAGS_MESSAGE_DATA
+		| TRACE_FLAGS_TIMER
+		| TRACE_FLAGS_TIMER_QUEUE);
 #endif //#if defined(USE_EAP_HARDWARE_TRACE)
 
 	m_start_ticks = get_clock_ticks();
@@ -379,23 +407,28 @@
 			TInt64 _hours = _minutes / _div_60;
 			_minutes = _minutes - _hours* _div_60;
 
-			_LIT8(KFormat1, "%02d:%02d:%02d.%06d:EAPOL:");
+			_LIT8(KFormat1, "%02d:%02d:%02d.%06d:%s:");
 
 			m_trace_buf.Format(
 				KFormat1,
 				static_cast<TInt32>(_hours),
 				static_cast<TInt32>(_minutes),
 				static_cast<TInt32>(_seconds),
-				static_cast<TInt32>(_micro_seconds));				
+				static_cast<TInt32>(_micro_seconds),
+				m_prefix_string.get_data());
 		}
 
 	}
 	else
 	{
-		_LIT8(KFormat2, "%08x%08x:EAPOL:");
+		_LIT8(KFormat2, "%08x%08x:%s:");
 
 		u32_t *time_stamp_u32_t = reinterpret_cast<u32_t *>(&time_stamp);
-		m_trace_buf.Format(KFormat2, time_stamp_u32_t[1], time_stamp_u32_t[0]);		
+		m_trace_buf.Format(
+			KFormat2,
+			time_stamp_u32_t[1],
+			time_stamp_u32_t[0],
+			m_prefix_string.get_data());
 	}
 
 	VA_LIST args = {0,};
@@ -517,6 +550,35 @@
 	return m_run_thread;
 }
 
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e eap_am_tools_symbian_c::set_trace_prefix(
+	const eap_variable_data_c * const prefix8bit)
+{
+	EAP_TRACE_BEGIN(this, TRACE_FLAGS_DEFAULT);
+
+	enter_trace_mutex();
+
+	eap_status_e status = m_prefix_string.set_copy_of_buffer(prefix8bit);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(this, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(this, status);
+	}
+
+	status = m_prefix_string.add_end_null();
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(this, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(this, status);
+	}
+
+	leave_trace_mutex();
+
+	EAP_TRACE_END(this, TRACE_FLAGS_DEFAULT);
+	return eap_status_ok;
+}
 
 //--------------------------------------------------
 
@@ -524,14 +586,23 @@
 EAP_FUNC_EXPORT eap_status_e eap_am_tools_symbian_c::set_trace_file_name(
 	const eap_variable_data_c * const trace_output_file)
 {
+	EAP_TRACE_DEBUG(
+		this,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_tools_symbian_c::set_trace_file_name()")));
+
+	EAP_TRACE_RETURN_STRING(this, "returns: eap_am_tools_symbian_c::set_trace_file_name()");
+
 	EAP_TRACE_BEGIN(this, TRACE_FLAGS_DEFAULT);
 
 	EAP_UNREFERENCED_PARAMETER(trace_output_file);
 	
 #if defined(USE_EAP_FILE_TRACE)
 #if defined(USE_EAP_TRACE) || defined(USE_EAP_TRACE_ALWAYS)
+
 	TBuf8<64> tmpFilename((TUint8 *)trace_output_file->get_data(trace_output_file->get_data_length()));
 	tmpFilename.SetLength(trace_output_file->get_data_length());
+
 	enter_trace_mutex();
 
 	m_filename.Copy(tmpFilename);
@@ -921,7 +992,7 @@
 
 EAP_FUNC_EXPORT void eap_am_tools_symbian_c::sleep(u32_t milli_seconds)
 {
-	User::After(limit_microsecond_timeout(milli_seconds));
+	After(limit_microsecond_timeout(milli_seconds));
 }
 
 //--------------------------------------------------
@@ -1058,6 +1129,7 @@
 		status = KErrCompletion;
 		break;
 
+	case eap_status_not_found:
 	case eap_status_illegal_configure_field:
 		status = KErrNotFound;
 		break;
@@ -1157,7 +1229,7 @@
 		
 		// Wait 0 - 524287 microseconds
 		randomWait = randomWait & 0x7ffff;
-		User::After(randomWait);
+		After(randomWait);
 	}
 	return EAP_STATUS_RETURN(this, status);
 }
@@ -1192,7 +1264,7 @@
 		
 		// Wait 0 - 524287 microseconds
 		randomWait = randomWait & 0x7ffff;
-		User::After(randomWait);
+		After(randomWait);
 	}
 	return EAP_STATUS_RETURN(this, status);
 }
@@ -1227,7 +1299,7 @@
 		
 		// Wait 0 - 524287 microseconds
 		randomWait = randomWait & 0x7ffff;
-		User::After(randomWait);
+		After(randomWait);
 	}
 	return EAP_STATUS_RETURN(this, status);
 }
@@ -1509,7 +1581,7 @@
 			EAP_TRACE_DEBUG(
 				am_tools,
 				TRACE_FLAGS_TIMER,
-				(EAPL("abs_eap_am_tools_c::new_abs_eap_am_tools_c() => 0x%08x success\n"),
+				(EAPL("abs_eap_am_tools_c::new_abs_eap_am_tools_c(0x%08x): success\n"),
 				am_tools));
 		}
 	}
@@ -1521,15 +1593,18 @@
 
 EAP_FUNC_EXPORT_INTERFACE void abs_eap_am_tools_c::delete_abs_eap_am_tools_c(abs_eap_am_tools_c * const am_tools)
 {
-	EAP_TRACE_DEBUG(
-		am_tools,
-		TRACE_FLAGS_TIMER,
-		(EAPL("abs_eap_am_tools_c::delete_abs_eap_am_tools_c(0x%08x)\n"),
-		am_tools));
-
-	(void)am_tools->shutdown();
-
-	delete am_tools;
+	if (am_tools != 0)
+		{
+		EAP_TRACE_DEBUG(
+			am_tools,
+			TRACE_FLAGS_TIMER,
+			(EAPL("abs_eap_am_tools_c::delete_abs_eap_am_tools_c(0x%08x)\n"),
+			am_tools));
+	
+		(void)am_tools->shutdown();
+	
+		delete am_tools;
+		}
 }
 
 //--------------------------------------------------
--- a/eapol/eapol_framework/eapol_symbian/am/common/symbian/eap_am_trace_symbian.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/common/symbian/eap_am_trace_symbian.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,24 +16,23 @@
 */
 
 /*
-* %version: 7.1.3 %
+* %version: 15 %
 */
 
-#if defined(_DEBUG) || defined(DEBUG)
-
-#include "eap_am_trace_symbian.h"
+#include "EapTraceSymbian.h"
+#include "eap_tools.h"
 
-const TInt KMaxBufferSize = 256;
+const TInt KMaxBufferSize = 512;
 
-u8_t octet_to_ascii(i32_t octet)
+TUint8 octet_to_ascii(i32_t octet)
 {
 	if (0 <= octet && octet <= 9)
 	{
-		return static_cast<u8_t>('0' + octet);
+		return static_cast<TUint8>('0' + octet);
 	}
 	else if (10 <= octet && octet <= 16)
 	{
-		return static_cast<u8_t>('a' + (octet-10u));
+		return static_cast<TUint8>('a' + (octet-10u));
 	}
 	else
 	{
@@ -41,7 +40,7 @@
 	}
 }
 
-void formatted_print(eap_format_string format, ...)
+void formatted_print(const char * const format, ...)
 {
 	EAP_UNREFERENCED_PARAMETER(format);
 
@@ -76,7 +75,7 @@
 	TPtr8 m_trace_buf = trace_buf->Des();
 	TPtr16 m_trace_buf_16 = trace_buf_16->Des();
 
-	VA_LIST args;
+	VA_LIST args = {0, };
 	VA_START(args, format);
 	m_format_buf.Copy((const TUint8 *)format);
 	
@@ -111,7 +110,7 @@
 		#if defined(USE_EAP_HARDWARE_TRACE_RAW_PRINT)
 			RDebug::RawPrint(m_trace_buf_16);
 		#else
-			formatted_print(_L("%S"), &m_trace_buf_16);
+			RDebug::Print(_L("%S"), &m_trace_buf_16);
 		#endif //#if defined(USE_EAP_HARDWARE_TRACE_RAW_PRINT)
 	}
 
@@ -127,17 +126,17 @@
 }
 
 
-void trace_data(
-	eap_const_string prefix,
+EXPORT_C void eap_trace_data_symbian(
+	const char * const prefix,
 	const void * const p_data,
-	const u32_t data_length)
+	const TUint data_length)
 {
 
-	u8_t* m_tmp_buffer = NULL;	
-	u8_t* m_tmp_ascii_buffer = NULL;
+	TUint8* m_tmp_buffer = NULL;	
+	TUint8* m_tmp_ascii_buffer = NULL;
 		
-	m_tmp_buffer = new u8_t[KMaxBufferSize];	
-	m_tmp_ascii_buffer = new u8_t[KMaxBufferSize];
+	m_tmp_buffer = new TUint8[KMaxBufferSize];	
+	m_tmp_ascii_buffer = new TUint8[KMaxBufferSize];
 		
 	if( m_tmp_buffer == NULL || m_tmp_ascii_buffer == NULL)
 	{
@@ -150,16 +149,16 @@
 		return;
 	}
 
-	u8_t *cursor = m_tmp_buffer;
-	u8_t *cursor_ascii = m_tmp_ascii_buffer;
+	TUint8 *cursor = m_tmp_buffer;
+	TUint8 *cursor_ascii = m_tmp_ascii_buffer;
 	
-	const u8_t *data = reinterpret_cast<const u8_t *>(p_data);
-	u32_t ind;
+	const TUint8 *data = reinterpret_cast<const TUint8 *>(p_data);
+	TUint ind;
 	bool must_print = false;
-	u32_t data_start = 0u;
+	TUint data_start = 0u;
 
-	const u32_t EAP_DATA_TRACE_BYTE_GROUP_SIZE = 1;
-	u32_t byte_group_size = EAP_DATA_TRACE_BYTE_GROUP_SIZE;
+	const TUint EAP_DATA_TRACE_BYTE_GROUP_SIZE = 1;
+	TUint byte_group_size = EAP_DATA_TRACE_BYTE_GROUP_SIZE;
 
 #if !defined(USE_EAP_DEBUG_TRACE)
 	// This does not trace the pointer of the data.
@@ -246,8 +245,22 @@
 	
 	delete [] m_tmp_buffer;
 	delete [] m_tmp_ascii_buffer;
+
+#if !defined(USE_EAP_DEBUG_TRACE)
+	// This does not trace the pointer of the data.
+	formatted_print(
+		"%s: data ends: %d (0x%x) bytes\n",
+		prefix,
+		data_length,
+		data_length);
+#else
+	formatted_print(
+		"%s: data ends 0x%08x: %d (0x%x) bytes\n",
+		prefix,
+		p_data,
+		data_length,
+		data_length);
+#endif
 }
 
-#endif
-
 // End of file
--- a/eapol/eapol_framework/eapol_symbian/am/core/symbian/Eapol.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/core/symbian/Eapol.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_symbian/am/core/symbian/EapolTimer.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/core/symbian/EapolTimer.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_symbian/am/core/symbian/eapol_am_core_symbian.cpp	Thu May 13 22:51:27 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3981 +0,0 @@
-/*
-* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  EAP and WLAN authentication protocols.
-*
-*/
-
-/*
-* %version: 17.1.2 %
-*/
-
-// This is enumeration of EAPOL source code.
-#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
-	#undef EAP_FILE_NUMBER_ENUM
-	#define EAP_FILE_NUMBER_ENUM 148 
-	#undef EAP_FILE_NUMBER_DATE 
-	#define EAP_FILE_NUMBER_DATE 1127594498 
-#endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
-
-
-// INCLUDE FILES
-
-#include "eap_am_memory.h"
-
-#include "eap_variable_data.h"
-#include "eap_tools.h"
-#include "eap_type_all.h"
-
-#include "eapol_am_core_symbian.h"
-#include "eapol_ethernet_header.h"
-#include "ethernet_core.h"
-#include "eap_am_tools_symbian.h"
-#include <EapolToWlmIf.h>
-#include "EapolDbDefaults.h"
-#include "EapolDbParameterNames.h"
-#include "eap_crypto_api.h"
-#include "eap_header_string.h"
-#include "eap_am_file_input_symbian.h"
-#include "eap_rogue_ap_entry.h"
-#include "abs_eap_state_notification.h"
-#include "eapol_session_key.h"
-#include "eap_buffer.h"
-#include "eap_config.h"
-
-#if defined(USE_EAP_FILECONFIG)
-	#include "eap_file_config.h"
-#endif //#if defined(USE_EAP_FILECONFIG)
-
-#if defined (USE_EAPOL_KEY_STATE) 
-	#include "eapol_key_state.h"	
-#endif
-
-// LOCAL CONSTANTS
-const TUint KMaxSqlQueryLength = 2048;
-const TUint KMaxConfigStringLength = 256;
-const u32_t KMTU = 1500u;
-const u32_t KTrailerLength = 0;
-const u32_t KHeaderOffset = 0;
-const TUint KMaxEapCueLength = 3;
-
-enum eapol_am_core_timer_id_e
-{
-	EAPOL_AM_CORE_TIMER_RESTART_AUTHENTICATION_ID,
-	EAPOL_AM_CORE_TIMER_DELETE_STACK_ID,
-	EAPOL_AM_CORE_TIMER_FAILED_COMPLETELY_ID,
-};
-
-
-const TUint8 TEST_RSN_IE[] =
-{
-	0xdd, // information element id, 221 expressed as Hex value
-	0x14, // length in octets, 20 expressed as Hex value
-	0x01, 0x00, // Version 1
-	0x00, 0x0f, 0xac, 0x04, // CCMP as group key cipher suite
-	0x01, 0x00, // pairwise key cipher suite count
-	0x00, 0x0f, 0xac, 0x04, // CCMP as pairwise key cipher suite
-	0x01, 0x00, // authentication count
-	0x00, 0x0f, 0xac, 0x01, // 802.1X authentication
-	0x01, 0x00, // Pre-authentication capabilities
-};
-
-// ================= MEMBER FUNCTIONS =======================
-
-eapol_am_core_symbian_c::eapol_am_core_symbian_c(MEapolToWlmIf * const aPartner,
-												 const bool is_client_when_true,
-												 const TUint aServerIndex)
-: CActive(CActive::EPriorityStandard)
-, m_partner(aPartner)
-, m_ethernet_core(0)
-, m_am_tools(0)
-, m_enable_random_errors(false)
-, m_error_probability(0u)
-, m_generate_multiple_error_packets(0u)
-, m_authentication_counter(0u)
-, m_successful_authentications(0u)
-, m_failed_authentications(0u)
-, m_is_valid(false)
-, m_is_client(is_client_when_true)
-, m_eap_index(0u)
-, m_index_type(ELan)
-, m_index(aServerIndex)
-//, m_timer(0)
-, m_packet_index(0)
-, m_manipulate_ethernet_header(false)
-, m_send_original_packet_first(false)
-, m_authentication_indication_sent(false)
-, m_unicast_wep_key_received(false)
-, m_broadcast_wep_key_received(false)
-, m_block_packet_sends_and_notifications(false)
-, m_success_indication_sent(false)
-, m_first_authentication(true)
-, m_self_disassociated(false)
-, m_802_11_authentication_mode(EAuthModeOpen)
-, m_receive_network_id(0)
-, m_wpa_override_enabled(false)
-, m_wpa_psk_mode_allowed(false)
-, m_wpa_psk_mode_active(false)
-, m_stack_marked_to_be_deleted(false)
-, m_active_type_is_leap(false)
-, m_fileconfig(0)
-{
-}	
-
-//--------------------------------------------------
-
-void eapol_am_core_symbian_c::ConstructL()
-{
-	if (m_partner == 0)
-	{
-		User::Leave(KErrGeneral);
-	}
-
-	// Create tools class
-	m_am_tools = new(ELeave) eap_am_tools_symbian_c(EAP_DEFAULT_TRACE_FILE);
-	if (m_am_tools->get_is_valid() != true)
-	{
-		// The real reason most likely is KErrNoMemory but since that is not sure we'll use KErrGeneral
-		User::Leave(KErrGeneral);
-	}
-	if (m_am_tools->configure() != eap_status_ok)
-	{
-		User::Leave(KErrGeneral);
-	}
-
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("EAPOL INITIALISATION\n")));	
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("====================\n")));	
-
-	m_wpa_preshared_key = new (ELeave) eap_variable_data_c(m_am_tools);
-
-	m_ssid = new (ELeave) eap_variable_data_c(m_am_tools);
-
-	m_wpa_psk_password_override = new (ELeave) eap_variable_data_c(m_am_tools);
-
-	// Create/initialise the database
-	OpenDatabaseL(m_database, m_session);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("Database initialized...\n")));
-	
-#if defined(USE_EAP_FILECONFIG)
-
-	{
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("Initialize file configuration.\n")));
-			eap_am_file_input_symbian_c fileio(m_am_tools);
-
-		eap_variable_data_c file_name_c_data(m_am_tools);
-
-		eap_status_e status(eap_status_process_general_error);
-
-		{
-			eap_const_string const FILECONFIG_FILENAME_C
-				= "c:\\system\\data\\eap.conf";
-
-			status = file_name_c_data.set_copy_of_buffer(
-				FILECONFIG_FILENAME_C,
-				m_am_tools->strlen(FILECONFIG_FILENAME_C));
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				User::Leave(m_am_tools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(m_am_tools, status)));
-			}
-
-			status = file_name_c_data.add_end_null();
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				User::Leave(m_am_tools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(m_am_tools, status)));
-			}
-		}
-
-		eap_variable_data_c file_name_z_data(m_am_tools);
-
-		{
-			eap_const_string const FILECONFIG_FILENAME_Z
-				= "z:\\private\\101F8EC5\\eap.conf";
-
-			status = file_name_z_data.set_copy_of_buffer(
-				FILECONFIG_FILENAME_Z,
-				m_am_tools->strlen(FILECONFIG_FILENAME_Z));
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				User::Leave(m_am_tools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(m_am_tools, status)));
-			}
-
-			status = file_name_z_data.add_end_null();
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				User::Leave(m_am_tools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(m_am_tools, status)));
-			}
-		}
-
-		if (status == eap_status_ok)
-		{
-			// First try open from C: disk.
-			status = fileio.file_open(
-				&file_name_c_data,
-				eap_file_io_direction_read);
-			if (status == eap_status_ok)
-			{
-				EAP_TRACE_DEBUG(
-					m_am_tools,
-					TRACE_FLAGS_DEFAULT,
-					(EAPL("Opens configure file %s\n"),
-					file_name_c_data.get_data(file_name_c_data.get_data_length())));
-			}
-			else if (status != eap_status_ok)
-			{
-				// Second try open from Z: disk.
-				status = fileio.file_open(
-					&file_name_z_data,
-					eap_file_io_direction_read);
-				if (status == eap_status_ok)
-				{
-					EAP_TRACE_DEBUG(
-						m_am_tools,
-						TRACE_FLAGS_DEFAULT,
-						(EAPL("Opens configure file %s\n"),
-						 file_name_z_data.get_data(file_name_z_data.get_data_length())));
-				}
-			}
-
-			if (status == eap_status_ok)
-			{
-				// Some of the files were opened.
-
-				m_fileconfig = new eap_file_config_c(m_am_tools);
-				if (m_fileconfig != 0
-					&& m_fileconfig->get_is_valid() == true)
-				{
-					status = m_fileconfig->configure(&fileio);
-					if (status != eap_status_ok)
-					{
-						EAP_TRACE_DEBUG(
-							m_am_tools,
-							TRACE_FLAGS_DEFAULT,
-							(EAPL("ERROR: Configure read from %s failed.\n"),
-							file_name_c_data.get_data(file_name_c_data.get_data_length())));
-					}
-					else
-					{
-						EAP_TRACE_DEBUG(
-							m_am_tools,
-							TRACE_FLAGS_DEFAULT,
-							(EAPL("Configure read from %s\n"),
-							file_name_c_data.get_data(file_name_c_data.get_data_length())));
-					}
-				}
-				else
-				{
-					// No file configuration.
-					delete m_fileconfig;
-					m_fileconfig = 0;
-
-					EAP_TRACE_DEBUG(
-						m_am_tools,
-						TRACE_FLAGS_DEFAULT,
-						(EAPL("ERROR: Cannot create configure object for file %s\n"),
-						file_name_c_data.get_data(file_name_c_data.get_data_length())));
-				}
-			}
-			else
-			{
-				EAP_TRACE_DEBUG(
-					m_am_tools,
-					TRACE_FLAGS_DEFAULT,
-					(EAPL("ERROR: Cannot open configure file neither %s nor %s\n"),
-					file_name_c_data.get_data(file_name_c_data.get_data_length()),
-					file_name_z_data.get_data(file_name_z_data.get_data_length())));
-			}
-		}
-	}
-
-#endif //#if defined(USE_EAP_FILECONFIG)
-
-#if !defined(USE_EAP_HARDWARE_TRACE)
-	{
-		// Disable traces.
-		m_am_tools->set_trace_mask(eap_am_tools_c::eap_trace_mask_none);
-
-		eap_variable_data_c trace_output_file(m_am_tools);
-
-		eap_status_e status = read_configure(
-			cf_str_EAP_TRACE_output_file_name.get_field(),
-			&trace_output_file);
-		if (status == eap_status_ok
-			&& trace_output_file.get_is_valid_data() == true)
-		{
-			status = m_am_tools->set_trace_file_name(&trace_output_file);
-			if (status == eap_status_ok)
-			{
-				// OK, set the default trace mask.
-				m_am_tools->set_trace_mask(
-					eap_am_tools_c::eap_trace_mask_debug
-					| eap_am_tools_c::eap_trace_mask_always
-					| eap_am_tools_c::eap_trace_mask_error);
-			}
-		}
-	}
-#endif //#if defined(USE_EAP_HARDWARE_TRACE)
-
-
-	{
-		eap_status_e status = configure();
-		if (status != eap_status_ok)
-		{
-			User::Leave(KErrGeneral);
-			User::Leave(m_am_tools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(m_am_tools, status)));
-		}
-	}
-	
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("Configured EAPOL AM...\n")));
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("Created timer...\n")));
-
-	// SERVER TEST CODE
-	if (m_is_client == false)
-	{
-		TRAPD(err, ReadEAPSettingsL());
-		if (err != KErrNone)
-		{
-			// Setting reading from CommDB failed. Use default values instead (only EAP-SIM).
-			
-			// SIM
-			_LIT(KSIM, "18");
-			TEap* sim = new(ELeave) TEap;
-			CleanupStack::PushL(sim);
-			sim->Enabled = ETrue;
-			sim->UID.Copy(KSIM);		
-			User::LeaveIfError(m_iap_eap_array.Append(sim));
-			CleanupStack::Pop(sim);
-		}
-
-	}
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("========================\n")));
-
-	set_is_valid();
-
-}
-
-
-//--------------------------------------------------
-
-eapol_am_core_symbian_c* eapol_am_core_symbian_c::NewL(MEapolToWlmIf * const aPartner,
-												  const bool aIsClient,
-												  const TUint aServerIndex)
-{
-	eapol_am_core_symbian_c* self = new(ELeave) eapol_am_core_symbian_c(aPartner, aIsClient, aServerIndex);
-	CleanupStack::PushL(self);
-	self->ConstructL();
-
-	if (self->get_is_valid() != true)
-	{
-		User::Leave(KErrGeneral);
-	}
-
-	CleanupStack::Pop();
-	return self;
-}
-
-//--------------------------------------------------
-
-eapol_am_core_symbian_c::~eapol_am_core_symbian_c()
-{
-
-#if defined(USE_EAP_FILECONFIG)
-	delete m_fileconfig;
-	m_fileconfig = 0;
-#endif //#if defined(USE_EAP_FILECONFIG)
-
-	shutdown();
-}
-
-//--------------------------------------------------
-
-//
-eap_status_e eapol_am_core_symbian_c::shutdown()
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-	
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("eapol_am_core_symbian_c::shutdown()\n")));
-
-	// Cancel timer	
-	cancel_all_timers();
-
-	// Delete upper stack if it still exists
-	if (m_ethernet_core != 0)
-	{
-		m_ethernet_core->shutdown();
-		delete m_ethernet_core;
-	}
-	
-	delete m_wpa_preshared_key;
-	
-	delete m_ssid;
-
-	delete m_wpa_psk_password_override;
-
-	delete m_receive_network_id;
-
-	m_database.Close();
-	m_session.Close();
-
-	// Print some statistics
-	if (m_is_client)
-	{
-		EAP_TRACE_ALWAYS(
-			m_am_tools,
-			TRACE_FLAGS_ALWAYS|TRACE_TEST_VECTORS,
-			(EAPL("client authentication SUCCESS %d, FAILED %d, count %d\n"),
-			m_successful_authentications,
-			m_failed_authentications,
-			m_authentication_counter));	
-	}
-	else
-	{
-		EAP_TRACE_ALWAYS(
-			m_am_tools,
-			TRACE_FLAGS_ALWAYS|TRACE_TEST_VECTORS,
-			(EAPL("server authentication SUCCESS %d, FAILED %d, count %d\n"),
-			m_successful_authentications,
-			m_failed_authentications,
-			m_authentication_counter));
-	}	
-	
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("EAPOL EXITING.\n")));
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-
-	// Finally delete tools. No logging is allowed after this.
-	if (m_am_tools != 0)
-	{
-		m_am_tools->shutdown();
-		delete m_am_tools;
-	}
-
-
-	// Unload all loaded plugins
-	// NOTE this must be after the m_am_tools->shutdown() call.
-	// m_am_tools->shutdown() will run virtual functions of some plugins.
-	for(int i = 0; i < m_plugin_if_array.Count(); i++)
-	{
-		delete m_plugin_if_array[i];
-	}
-
-	m_plugin_if_array.Close();
-	m_eap_type_array.Close();
-
-	// Delete the IAP EAP type info array
-	m_iap_eap_array.ResetAndDestroy();
-	
-
-	return eap_status_ok;
-}
-
-//--------------------------------------------------
-
-//
-void eapol_am_core_symbian_c::RunL()
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);	
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("eapol_am_core_symbian_c::RunL(): iStatus.Int() = %d\n"),
-		iStatus.Int()));
-
-	if (iStatus.Int() != KErrNone)
-	{
-		return;
-	}
-
-	// Authentication cancelled.
-	EAP_TRACE_ALWAYS(
-		m_am_tools,
-		TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT,
-		(EAPL("Authentication cancelled.\n")));
-
-	// Set block on.
-	m_block_packet_sends_and_notifications = true;
-
-	// Reset flags
-	m_success_indication_sent = false;
-	m_unicast_wep_key_received = false;
-	m_broadcast_wep_key_received = false;
-	m_authentication_indication_sent = false;
-
-	m_stack_marked_to_be_deleted = true;
-	set_timer(this, EAPOL_AM_CORE_TIMER_DELETE_STACK_ID, 0, 0);
-	
-	// reset index
-	m_eap_index = 0;
-
-	EAP_TRACE_ALWAYS(
-		m_am_tools,
-		TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT,
-		(EAPL("Indication sent to WLM: EFailedCompletely.\n")));
-
-	m_partner->EapIndication(EFailedCompletely);
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-}
-
-//--------------------------------------------------
-
-//
-void eapol_am_core_symbian_c::DoCancel()
-{	
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("eapol_am_core_symbian_c::DoCancel()\n")));
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-}
-
-//--------------------------------------------------
-
-//
-TInt eapol_am_core_symbian_c::Start(const TIndexType aIndexType, 
-									const TUint aIndex, 
-									const TSSID& aSSID, 
-									const TBool aWPAOverrideEnabled,
-									const TUint8* aWPAPSK,
-									const TUint aWPAPSKLength)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);	
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("eapol_am_core_symbian_c::Start()\n")));
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("STARTING AUTHENTICATION.\n")));
-
-	eap_status_e status(eap_status_ok);
-
-	if (m_ethernet_core != 0)
-	{
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("Deleting previously used stack.\n")));
-
-		// It is an error to call start without calling disassociated
-		if (m_stack_marked_to_be_deleted == false)
-		{	
-			EAP_TRACE_ERROR(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("eapol_am_core_symbian_c::Start called twice!\n")));
-			return KErrAlreadyExists;
-		}
-
-		// The previously used stack is perhaps still waiting for deletion.
-		cancel_timer(this, EAPOL_AM_CORE_TIMER_DELETE_STACK_ID);
-	
-		// Delete stack
-		m_ethernet_core->shutdown();
-		delete m_ethernet_core;
-		m_ethernet_core = 0;				
-		
-		m_stack_marked_to_be_deleted = false;
-	}
-
-	// Clear packet send and notification blocking.
-	m_block_packet_sends_and_notifications = false;
-
-	// Store SSID. This is needed for WPA PSK calculation.
-	if (aSSID.ssidLength > 0)
-	{		
-		status = m_ssid->set_copy_of_buffer(aSSID.ssid, aSSID.ssidLength);
-		if (status != eap_status_ok)
-		{
-			return m_am_tools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(m_am_tools, status));
-		}
-	}
-	
-	// Store WPAPSK. This is needed for WPA PSK mode in Easy WLAN.
-	if (aWPAPSKLength > 0
-		&& aWPAPSK != 0)
-	{		
-		status = m_wpa_psk_password_override->set_copy_of_buffer(aWPAPSK, aWPAPSKLength);
-		if (status != eap_status_ok)
-		{
-			return m_am_tools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(m_am_tools, status));
-		}
-	}		
-
-	if (aWPAOverrideEnabled)
-	{
-		m_wpa_override_enabled = true;
-	}
-	else
-	{
-		m_wpa_override_enabled = false;
-	}
-	
-	///////////////////////////////////
-	// Get EAP parameters from CommDbIf
-	///////////////////////////////////
-	m_index_type = aIndexType;
-	m_index = aIndex;
-
-	TRAPD(err, ReadEAPSettingsL());
-	if (err != KErrNone)
-	{
-		EAP_TRACE_ERROR(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("EAP settings reading from CommDb failed or cancelled(err %d).\n"), err));
-		m_partner->EapIndication(EFailedCompletely);
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-		return err;
-	}
-
-	// Start new authentication from scratch.
-	m_unicast_wep_key_received = false;
-	m_broadcast_wep_key_received = false;
-	m_wpa_psk_mode_active = false;
-	
-	if (m_wpa_psk_mode_allowed == false
-		|| m_wpa_preshared_key->get_data_length() == 0)
-	{
-		// Check the first enabled type
-		TEap* eapType = 0;
-		TInt i(0);
-		for (i = 0; i < m_iap_eap_array.Count(); i++)
-		{
-			// Check if type is enabled
-			eapType = m_iap_eap_array[i];
-			if (eapType->Enabled == 1)
-			{	
-				break;
-			}
-		}
-		if (i >= m_iap_eap_array.Count())
-		{
-			// No enabled EAP types.
-			EAP_TRACE_ALWAYS(
-				m_am_tools,
-				TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT,
-				(EAPL("No enabled EAP types.\n")));
-			EAP_TRACE_ALWAYS(
-				m_am_tools,
-				TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT,
-				(EAPL("Indication sent to WLM: EFailedCompletely.\n")));
-
-			m_partner->EapIndication(EFailedCompletely);
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-			return KErrNone; 
-		}	
-
-		// reset index (start from the first enabled EAP type)
-		m_eap_index = i;
-
-		// Check if the first enabled type is LEAP.
-		TLex8 tmp(eapType->UID);
-		TInt type(0);
-		tmp.Val(type);
-		
-		switch (type)
-		{
-		case eap_type_leap:
-			if (m_security_mode != Wpa
-				&& m_security_mode != Wpa2Only)
-			{
-				m_802_11_authentication_mode = EAuthModeLeap;
-
-				EAP_TRACE_ALWAYS(
-					m_am_tools,
-					TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
-					(EAPL("Start: Trying auth mode LEAP.\n")));
-			}
-			else
-			{
-				// If security mode is WPA or WPA2 then even LEAP uses open authentication!
-				m_802_11_authentication_mode = EAuthModeOpen;
-
-				EAP_TRACE_ALWAYS(
-					m_am_tools,
-					TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
-					(EAPL("Start: Trying auth mode OPEN (LEAP in WPA mode).\n")));
-			}
-
-			m_active_type_is_leap = true;
-			break;
-		default:
-			m_802_11_authentication_mode = EAuthModeOpen;
-
-			EAP_TRACE_ALWAYS(
-				m_am_tools,
-				TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
-				(EAPL("Start: Trying auth mode OPEN.\n")));
-
-			m_active_type_is_leap = false;
-			break;
-		}
-	}
-	else
-	{
-		// WPA Pre-shared key mode
-		m_active_type_is_leap = false;
-		m_wpa_psk_mode_active = true;
-		m_802_11_authentication_mode = EAuthModeOpen;
-
-		EAP_TRACE_ALWAYS(
-			m_am_tools,
-			TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
-			(EAPL("Start: Trying auth mode OPEN.\n")));
-	}
-		
-	// Ignore return value. Result comes with CompleteAssociation call.
-	m_partner->Associate(m_802_11_authentication_mode);
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-	return m_am_tools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(m_am_tools, status));
-}
-
-//--------------------------------------------------
-
-//
-TInt eapol_am_core_symbian_c::CompleteAssociation(
-		const TInt aResult,
-		const TMacAddress& aLocalAddress, 
-		const TMacAddress& aRemoteAddress,
-		const TUint8* const aReceivedWPAIE, // WLM must give only the WPA IE to EAPOL									        
-		const TUint aReceivedWPAIELength,
-		const TUint8* const aSentWPAIE,
-		const TUint aSentWPAIELength,
-		const TWPACipherSuite aGroupKeyCipherSuite,
-		const TWPACipherSuite aPairwiseKeyCipherSuite
-		)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);	
-
-	EAP_TRACE_ALWAYS(
-		m_am_tools,
-		TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT,
-		(EAPL("eapol_am_core_symbian_c::CompleteAssociation(): aResult %d\n"),
-		aResult));
-
-	eap_status_e status(eap_status_ok);
-
-	// ASSOCIATION UNSUCCESSFUL
-	if (aResult != KErrNone)
-	{
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("CompleteAssociation: Unsuccessful.\n")));
-
-		EAP_TRACE_DATA_DEBUG(
-			m_am_tools, 
-			TRACE_FLAGS_DEFAULT, 
-			(EAPL("Got AP MAC address"),
-			aRemoteAddress.iMacAddress,
-			KMacAddressLength));
-
-		// Report rogue AP if we tried LEAP and it failed
-		if (m_802_11_authentication_mode == EAuthModeLeap)
-		{
-			// Only add rogue AP if the error code is correct
-			if (aResult == E802Dot11StatusAuthAlgorithmNotSupported)
-			{
-				eap_rogue_ap_entry_c rogue_entry(m_am_tools);
-			
-				rogue_entry.set_mac_address(static_cast<const u8_t *>(aRemoteAddress.iMacAddress));
-				rogue_entry.set_rogue_reason(rogue_ap_association_failed);
-
-				eap_array_c<eap_rogue_ap_entry_c> rogue_list(m_am_tools);
-				status = rogue_list.add_object(&rogue_entry, false);
-				if (status == eap_status_ok)
-				{	
-					status = add_rogue_ap(rogue_list);
-					// Ignore return value on purpose - it's not fatal if this fails
-				}
-			}			
-		}
-
-		if (m_wpa_psk_mode_active == false)
-		{
-			if (aResult == E802Dot11StatusAuthAlgorithmNotSupported
-				&& m_security_mode != Wpa
-				&& m_security_mode != Wpa2Only) // If security mode is WPA or WPA2 then only OPEN auth should be used
-			{
-				// Association failed because we had wrong authentication type. 
-				// Try to find next allowed type that uses different authentication type
-				m_eap_index++;
-
-				TEap* eapType;
-				TBool found(EFalse);
-				TInt i(0);
-				for (i = m_eap_index; i < m_iap_eap_array.Count(); i++)
-				{
-					// Check if type is enabled
-					eapType = m_iap_eap_array[i];
-					if (eapType->Enabled == 1)
-					{	
-						TLex8 tmp(eapType->UID);
-						TInt type(0);
-						tmp.Val(type);
-						
-						switch (type)
-						{
-						case eap_type_leap:
-							if (m_802_11_authentication_mode != EAuthModeLeap)
-							{
-								// This type will do; it uses different authentication mode.
-								EAP_TRACE_ALWAYS(
-									m_am_tools,
-									TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
-									(EAPL("CompleteAssociation: Changed auth mode to LEAP.\n")));
-
-								m_802_11_authentication_mode = EAuthModeLeap;
-								m_active_type_is_leap = true;
-								found = ETrue;
-							}					
-							break;
-						default:
-							if (m_802_11_authentication_mode != EAuthModeOpen)
-							{
-								// This type will do; it uses different authentication mode.
-								EAP_TRACE_ALWAYS(
-									m_am_tools,
-									TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
-									(EAPL("CompleteAssociation: Changed auth mode to OPEN.\n")));
-
-								m_802_11_authentication_mode = EAuthModeOpen;	
-								m_active_type_is_leap = false;
-								found = ETrue;
-							}
-							break;
-						}				
-						if (found)
-						{
-							break;
-						}
-					}
-				}
-
-				m_eap_index = i;
-
-				if (i >= m_iap_eap_array.Count())
-				{
-					// All the remaining allowed types had the same authentication mode.
-					// Give up this AP.
-					EAP_TRACE_ALWAYS(
-						m_am_tools,
-						TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
-						(EAPL("Could not associate to the AP. Tried all types.\n")));
-
-					EAP_TRACE_ALWAYS(
-						m_am_tools,
-						TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT,
-						(EAPL("Indication sent to WLM: EThisAPFailed.\n")));
-
-					m_partner->EapIndication(EThisAPFailed);
-					return KErrNone;
-
-				}
-
-				// We found a type with different authentication mode. Try it.			
-			
-				// Ignore return value. Result comes with CompleteAssociation call.
-				m_partner->Associate(m_802_11_authentication_mode);
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-				return KErrNone;
-			}
-			else
-			{
-				EAP_TRACE_ALWAYS(
-					m_am_tools,
-					TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
-					(EAPL("Could not associate to the AP (error %d).\n"), aResult));
-
-				EAP_TRACE_ALWAYS(
-					m_am_tools,
-					TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT,
-					(EAPL("Indication sent to WLM: EThisAPFailed.\n")));
-
-				m_partner->EapIndication(EThisAPFailed);
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-				return KErrNone;
-			}
-		}
-		else
-		{
-			EAP_TRACE_ALWAYS(
-				m_am_tools,
-				TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
-				(EAPL("Could not associate to the AP with WPA pre-shared-key.\n")));
-
-			EAP_TRACE_ALWAYS(
-				m_am_tools,
-				TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT,
-				(EAPL("Indication sent to WLM: EThisAPFailed.\n")));
-
-			m_partner->EapIndication(EThisAPFailed);
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-			return KErrNone;
-		}					
-	}
-	
-	// ASSOCIATION SUCCESSFUL
-	EAP_TRACE_ALWAYS(
-		m_am_tools,
-		TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT,
-		(EAPL("CompleteAssociation: Successful.\n")));
-
-	// Store parameters
-	m_local_address = aLocalAddress;
-
-	m_remote_address = aRemoteAddress;
-
-	m_received_wpa_ie = aReceivedWPAIE;
-
-	m_received_wpa_ie_length = aReceivedWPAIELength;
-
-	m_sent_wpa_ie = aSentWPAIE;
-
-	m_sent_wpa_ie_length = aSentWPAIELength;
-
-	m_group_key_cipher_suite = aGroupKeyCipherSuite;
-
-	m_pairwise_key_cipher_suite = aPairwiseKeyCipherSuite;
-
-	// Create stack if it does not already exist. 
-	status = create_upper_stack();
-	if (status != eap_status_ok
-		&& status != eap_status_already_exists)
-	{
-		EAP_TRACE_ALWAYS(
-			m_am_tools,
-			TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT,
-			(EAPL("Indication sent to WLM: EFailedCompletely.\n")));
-
-		m_partner->EapIndication(EFailedCompletely);
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-		return KErrNone; 
-	}
-
-	// First create stack object and then copy it to heap object. This is because 
-	// eap_am_network_id_c does not have a constructor that copies the buffers.
-	eap_am_network_id_c receive_network_id(
-			m_am_tools,
-			&aRemoteAddress,
-			sizeof(TMacAddress),
-			&aLocalAddress,
-			sizeof(TMacAddress),
-			eapol_ethernet_type_pae,
-			false,
-			false);
-	
-	delete m_receive_network_id;
-	m_receive_network_id = new eap_am_network_id_c(
-		m_am_tools);
-
-	if (m_receive_network_id == 0)
-	{
-		EAP_TRACE_ALWAYS(
-			m_am_tools,
-			TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT,
-			(EAPL("Indication sent to WLM: EFailedCompletely.\n")));
-
-		m_partner->EapIndication(EFailedCompletely);
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-		return KErrNone; 
-	}
-	
-	status = m_receive_network_id->set_copy_of_network_id(&receive_network_id);
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_ALWAYS(
-			m_am_tools,
-			TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT,
-			(EAPL("Indication sent to WLM: EFailedCompletely.\n")));
-
-		m_partner->EapIndication(EFailedCompletely);
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-		return KErrNone; 
-	}
-
-	
-#if defined (USE_EAPOL_KEY_STATE) 
-
-	// Initialise EAPOL key state
-
-	eapol_key_authentication_type_e authentication_type(eapol_key_authentication_type_802_1X);
-	
-	if (aReceivedWPAIE !=0 
-		&& aSentWPAIE != 0)
-	{
-		// WPA (in wpa or 802.1x security mode)
-		if (m_wpa_psk_mode_allowed == false)
-		{
-			authentication_type = eapol_key_authentication_type_WPA_EAP;
-		}
-		else
-		{
-			m_wpa_psk_mode_active = true;
-			authentication_type = eapol_key_authentication_type_WPA_PSK;
-		}
-
-	}
-	else
-	{
-		// Non-wpa mode
-		authentication_type = eapol_key_authentication_type_802_1X;
-	}	
-
-	eap_variable_data_c	authenticator_RSNA_IE(m_am_tools);
-	eap_variable_data_c	supplicant_RSNA_IE(m_am_tools);
-
-	// Note: the default values here are only for 802.1x mode. In that mode
-	// we don't know the WEP key length beforehand so we will have to guess.
-	// It does not matter in this case if we guess wrong - only thing that matters
-	// is that it is WEP.
-	eapol_RSNA_key_header_c::eapol_RSNA_cipher_e 
-		eapol_pairwise_cipher(eapol_RSNA_key_header_c::eapol_RSNA_cipher_WEP_40);
-	eapol_RSNA_key_header_c::eapol_RSNA_cipher_e 
-		eapol_group_cipher(eapol_RSNA_key_header_c::eapol_RSNA_cipher_WEP_40);	
-	
-	// WPA mode is active if information elements are valid
-	if (aReceivedWPAIE != 0
-		&& aSentWPAIE != 0)
-	{
-		status = authenticator_RSNA_IE.set_copy_of_buffer(aReceivedWPAIE, aReceivedWPAIELength);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_ALWAYS(
-				m_am_tools,
-				TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT,
-				(EAPL("Indication sent to WLM: EFailedCompletely.\n")));
-
-			m_partner->EapIndication(EFailedCompletely);
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-			return KErrNoMemory;
-		}
-		status = supplicant_RSNA_IE.set_copy_of_buffer(aSentWPAIE, aSentWPAIELength);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_ALWAYS(
-				m_am_tools,
-				TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT,
-				(EAPL("Indication sent to WLM: EFailedCompletely.\n")));
-
-			m_partner->EapIndication(EFailedCompletely);
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-			return KErrNoMemory;
-		}
-		
-		switch (aGroupKeyCipherSuite)
-		{
-		case ENoCipherSuite:
-			eapol_group_cipher = eapol_RSNA_key_header_c::eapol_RSNA_cipher_none;
-			break;
-		case EWEP40:
-			eapol_group_cipher = eapol_RSNA_key_header_c::eapol_RSNA_cipher_WEP_40;							 
-			break;
-		case EWEP104:
-			eapol_group_cipher = eapol_RSNA_key_header_c::eapol_RSNA_cipher_WEP_104;
-			break;
-		case ETKIP:
-			eapol_group_cipher = eapol_RSNA_key_header_c::eapol_RSNA_cipher_TKIP;
-			break;
-		case ECCMP:
-			eapol_group_cipher = eapol_RSNA_key_header_c::eapol_RSNA_cipher_CCMP;
-			break;
-		case EWRAP:
-		default:
-			User::Panic(_L("EAPOL"), KErrNotSupported);							
-		}
-
-		switch (aPairwiseKeyCipherSuite)
-		{
-		case ENoCipherSuite:
-			eapol_pairwise_cipher = eapol_RSNA_key_header_c::eapol_RSNA_cipher_none;
-			break;
-		case EWEP40:
-			eapol_pairwise_cipher = eapol_RSNA_key_header_c::eapol_RSNA_cipher_WEP_40;							 
-			break;
-		case EWEP104:
-			eapol_pairwise_cipher = eapol_RSNA_key_header_c::eapol_RSNA_cipher_WEP_104;
-			break;
-		case ETKIP:
-			eapol_pairwise_cipher = eapol_RSNA_key_header_c::eapol_RSNA_cipher_TKIP;
-			break;
-		case ECCMP:
-			eapol_pairwise_cipher = eapol_RSNA_key_header_c::eapol_RSNA_cipher_CCMP;
-			break;
-		case EWRAP:
-		default:
-			User::Panic(_L("EAPOL"), KErrNotSupported);							
-		}
-	} 
-
-	if (authentication_type == eapol_key_authentication_type_WPA_PSK)
-	{
-		status = m_ethernet_core->association(
-			m_receive_network_id,
-			authentication_type,
-			&authenticator_RSNA_IE,
-			&supplicant_RSNA_IE,
-			eapol_pairwise_cipher,
-			eapol_group_cipher,
-			m_wpa_preshared_key);
-	}
-	else
-	{
-		status = m_ethernet_core->association(
-			m_receive_network_id,
-			authentication_type,
-			&authenticator_RSNA_IE,
-			&supplicant_RSNA_IE,
-			eapol_pairwise_cipher,
-			eapol_group_cipher,
-			0);
-	}
-	if (status != eap_status_ok)
-	{
-
-		EAP_TRACE_ALWAYS(
-			m_am_tools,
-			TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT,
-			(EAPL("m_ethernet_core->association call failed.\n")));
-
-		EAP_TRACE_ALWAYS(
-			m_am_tools,
-			TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT,
-			(EAPL("Indication sent to WLM: EFailedCompletely.\n")));
-
-		m_partner->EapIndication(EFailedCompletely);
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-		return KErrGeneral;
-	}
-
-#endif // USE_EAPOL_KEY_STATE
-
-	if (m_wpa_psk_mode_active == false)
-	{
-		// Start authentication if mode is not pre-shared key. If mode is pre-shared key then
-		// just wait for EAPOL-Key frames.
-		status = m_ethernet_core->start_authentication(m_receive_network_id, m_is_client);		
-	}
-	
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-	return m_am_tools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(m_am_tools, status));
-}
-
-//--------------------------------------------------
-
-//
-TInt eapol_am_core_symbian_c::ReceivePacket(const TUint aLength, const TUint8* const aPacket)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);	
-		
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("eapol_am_core_symbian_c::ReceivePacket()\n")));
-
-	if (aLength < eapol_ethernet_header_wr_c::get_header_length())
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return m_am_tools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(m_am_tools, eap_status_too_short_message));
-	}
-
-	eapol_ethernet_header_wr_c eth_header(m_am_tools, aPacket, aLength);
-	eap_am_network_id_c receive_network_id(
-			m_am_tools,
-			eth_header.get_source(),
-			eth_header.get_source_length(),
-			eth_header.get_destination(),
-			eth_header.get_destination_length(),
-			eth_header.get_type(),
-			false,
-			false);
-	eap_status_e status(eap_status_process_general_error);
-	if (eth_header.get_type() == eapol_ethernet_type_pae)
-	{
-		status = create_upper_stack();
-		if (status != eap_status_ok 
-			&& status != eap_status_already_exists)
-		{
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("Indication sent to WLM: EFailedCompletely.\n")));
-			m_partner->EapIndication(EFailedCompletely);
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-			return KErrNone; 
-		} 
-
-#if defined (USE_EAPOL_KEY_STATE) 
-		if (m_is_client == false
-			&& status != eap_status_already_exists)
-		{
-			// If we are server we need to do associate here.
-			eapol_key_authentication_type_e authentication_type(
-				eapol_key_authentication_type_WPA_EAP);
-
-			eap_variable_data_c authenticator_RSNA_IE(m_am_tools);
-			eap_variable_data_c supplicant_RSNA_IE(m_am_tools);
-
-			status = authenticator_RSNA_IE.set_buffer(TEST_RSN_IE, sizeof(TEST_RSN_IE), false, false);
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				User::Leave(m_am_tools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(m_am_tools, status)));
-			}
-
-			status = supplicant_RSNA_IE.set_buffer(TEST_RSN_IE, sizeof(TEST_RSN_IE), false, false);
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				User::Leave(m_am_tools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(m_am_tools, status)));
-			}
-						
-			eapol_RSNA_key_header_c::eapol_RSNA_cipher_e 
-				eapol_pairwise_cipher(eapol_RSNA_key_header_c::eapol_RSNA_cipher_TKIP);	
-			eapol_RSNA_key_header_c::eapol_RSNA_cipher_e 
-				eapol_group_cipher(eapol_RSNA_key_header_c::eapol_RSNA_cipher_TKIP);	
-			
-				
-			if (authentication_type == eapol_key_authentication_type_WPA_PSK)
-			{
-				status = m_ethernet_core->association(
-					&receive_network_id,
-					authentication_type,
-					&authenticator_RSNA_IE,
-					&supplicant_RSNA_IE,
-					eapol_pairwise_cipher,
-					eapol_group_cipher,
-					m_wpa_preshared_key);
-			}
-			else
-			{
-				status = m_ethernet_core->association(
-					&receive_network_id,
-					authentication_type,
-					&authenticator_RSNA_IE,
-					&supplicant_RSNA_IE,
-					eapol_pairwise_cipher,
-					eapol_group_cipher,
-					0);
-			}
-
-		}
-#endif // USE_EAPOL_KEY_STATE
-
-		// Forward the packet to the Ethernet layer of the EAPOL stack. Ignore return value. Failure is signalled using state_notification.
-		status = m_ethernet_core->packet_process(
-			&receive_network_id,
-			&eth_header,
-			aLength);
-		
-	} 
-	else
-	{
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("Not supported ethernet type 0x%04x\n"), eth_header.get_type()));
-		status = eap_status_ethernet_type_not_supported;
-	}
-	
-	status = eap_status_ok;
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return m_am_tools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(m_am_tools, status));
-}
-
-//--------------------------------------------------
-
-void eapol_am_core_symbian_c::set_is_valid()
-{
-	m_is_valid = true;
-}
-
-bool eapol_am_core_symbian_c::get_is_valid()
-{
-	return m_is_valid;
-}
-
-void eapol_am_core_symbian_c::increment_authentication_counter()
-{
-	++m_authentication_counter;
-}
-
-u32_t eapol_am_core_symbian_c::get_authentication_counter()
-{
-	return m_authentication_counter;
-}
-
-bool eapol_am_core_symbian_c::get_is_client()
-{
-	return m_is_client;
-}
-	
-
-//--------------------------------------------------
-
-//
-eap_status_e eapol_am_core_symbian_c::packet_data_crypto_keys(
-	const eap_am_network_id_c * const /*send_network_id*/,
-	const eap_variable_data_c * const /*master_session_key*/)
-{
-	// Not needed in Symbian version
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return eap_status_ok;
-}
-
-//--------------------------------------------------
-
-eap_status_e eapol_am_core_symbian_c::packet_data_session_key(
-	const eap_am_network_id_c * const /*send_network_id*/,
-	const eapol_session_key_c * const key)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-	TInt status(KErrNone);
-
-	const eap_variable_data_c * const key_data = key->get_key();
-	if (key_data == 0)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return eap_status_key_error;
-	}
-
-	EAP_TRACE_DEBUG(m_am_tools,
-		TRACE_FLAGS_DEFAULT, 
-		(EAPL("packet_data_session_key: index: %d, type %d\n"),
-		key->get_key_index(),
-		key->get_key_type()));
-	
-	EAP_TRACE_DATA_DEBUG(m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("packet_data_session_key:"),
-		key_data->get_data(key_data->get_data_length()),
-		key_data->get_data_length()));
-	
-	switch (key->get_key_type())
-	{
-	case eapol_key_type_broadcast:
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT, 
-			(EAPL("eapol_am_core_symbian_c::packet_data_session_key: Got rc4_broadcast key.\n")));
-
-		status = m_partner->SetCipherKey(
-			ERC4Broadcast,
-			static_cast<TUint8> (key->get_key_index()),
-			key_data->get_data(key_data->get_data_length()),
-			key_data->get_data_length());
-		m_broadcast_wep_key_received = true;
-		break;
-	case eapol_key_type_unicast:
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT, 
-			(EAPL("eapol_am_core_symbian_c::packet_data_session_key: Got rc4_unicast key.\n")));
-
-		status = m_partner->SetCipherKey(
-			ERC4Unicast,
-			static_cast<TUint8> (key->get_key_index()),
-			key_data->get_data(key_data->get_data_length()),
-			key_data->get_data_length());
-		m_unicast_wep_key_received = true;
-		break;
-	default:
-		EAP_TRACE_ERROR(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT, 
-			(EAPL("eapol_am_core_symbian_c::packet_data_session_key: Got unsupported key, type %d.\n"),
-			key->get_key_type()));
-		status = KErrNotSupported;
-		break;
-	}
-
-	if (m_unicast_wep_key_received == true 
-		&& m_broadcast_wep_key_received == true
-		&& m_success_indication_sent == false)
-	{
-		// Signal success because we have received one unicast (pairwise) key and one broadcast (group) key.
-		// If there are more keys coming later they are saved also.
-		if (m_active_type_is_leap == true)
-		{
-			// Leap was successful
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("Indication sent to WLM: ELeapSuccess.\n")));
-			m_partner->EapIndication(ELeapSuccess);
-		}
-		else
-		{
-			// some other type was successful
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("Indication sent to WLM: ESuccess.\n")));
-			m_partner->EapIndication(ESuccess);
-		}
-		
-		m_success_indication_sent = true;
-		m_first_authentication = false;
-	}
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(status));
-}
-
-//--------------------------------------------------
-
-//
-
-eap_status_e eapol_am_core_symbian_c::packet_send(
-	const eap_am_network_id_c * const /*send_network_id*/,
-	eap_buf_chain_wr_c * const sent_packet,
-	const u32_t header_offset,
-	const u32_t data_length,
-	const u32_t /*buffer_length*/)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("eapol_am_core_symbian_c::packet_send(data_length=%d).\n"),
-		data_length));
-
-	if (header_offset != 0u)
-	{
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("packet_send: packet buffer corrupted.\n")));
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return eap_status_process_general_error;
-	}
-	else if (header_offset+data_length != sent_packet->get_data_length())
-	{
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("ERROR: packet_send: packet buffer corrupted (data_length != sent_packet->get_data_length()).\n")));
-		EAP_ASSERT(data_length == sent_packet->get_buffer_length());
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return eap_status_process_general_error;
-	}	
-
-	if (m_block_packet_sends_and_notifications == true)
-	{
-		// Packet sending block is active. This happens when disassociated has been called.  
-		// start_authentication clears the block.
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("packet_send: packet ignored because Disassociated() was called.\n")));
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return eap_status_ok;
-	}
-
-	TInt status(KErrNone);
-	if (m_send_original_packet_first == true)
-	{
-		if (m_enable_random_errors == true)
-		{
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("TEST: random_error(): packet_index 0x%08x:%lu, Send original packet\n"),
-				this,
-				m_packet_index));
-		}
-
-		u8_t * const packet_data = sent_packet->get_data_offset(header_offset, data_length);
-		if (packet_data == 0)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return eap_status_buffer_too_short;
-		}
-
-		// Here we send the original packet.
-		status = m_partner->EapPacketSend(
-			data_length, 
-			static_cast<TUint8*>(packet_data));
-		++m_packet_index;
-	}
-
-	if (m_enable_random_errors == true
-		&& status == KErrNone)
-	{
-		if (m_generate_multiple_error_packets > 0ul)
-		{
-			// First create a copy of sent packet. Original correct packet will will be sent last.
-			for (u32_t ind = 0ul; ind < m_generate_multiple_error_packets; ind++)
-			{
-				eap_buf_chain_wr_c *copy_packet = sent_packet->copy();
-
-				if (copy_packet != 0
-					&& copy_packet->get_is_valid_data() == true)
-				{
-					// Make a random error to the copy message.
-					random_error(copy_packet, true, m_packet_index);
-
-					EAP_TRACE_DEBUG(
-						m_am_tools,
-						TRACE_FLAGS_DEFAULT,
-						(EAPL("TEST: random_error(): packet_index 0x%08x:%lu, Send error packet\n"),
-						this,
-						m_packet_index));
-					
-					u8_t * const packet_data = copy_packet->get_data_offset(header_offset, data_length);
-					if (packet_data == 0)
-					{
-						EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-						return eap_status_buffer_too_short;
-					}
-
-					// Here we send the copied and manipulated packet.
-					status = m_partner->EapPacketSend(
-						data_length, 
-						static_cast<TUint8*>(packet_data));
-					
-					++m_packet_index;
-				}
-				delete copy_packet;
-			}
-		}
-		else
-		{
-			// Make a random error to the original message.
-			random_error(sent_packet, false, m_packet_index);
-
-			if (sent_packet->get_is_manipulated() == true)
-			{
-				EAP_TRACE_DEBUG(
-					m_am_tools,
-					TRACE_FLAGS_DEFAULT,
-					(EAPL("TEST: random_error(): packet_index 0x%08x:%lu, Send error packet\n"),
-					this,
-					m_packet_index));
-			}
-		}
-	}
-
-
-	if (m_send_original_packet_first == false
-		&& status == KErrNone)
-	{
-		if (m_enable_random_errors == true)
-		{
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("TEST: random_error(): packet_index 0x%08x:%lu, Send original packet\n"),
-				this,
-				m_packet_index));
-		}
-
-		u8_t * const packet_data = sent_packet->get_data_offset(header_offset, data_length);
-		if (packet_data == 0)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return eap_status_buffer_too_short;
-		}
-
-		// Here we send the original packet.
-		status = m_partner->EapPacketSend(
-			data_length,
-			static_cast<TUint8*>(packet_data));
-		++m_packet_index;
-	}
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	return EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(status));
-}
-
-//--------------------------------------------------
-
-//
-eap_status_e eapol_am_core_symbian_c::reassociate(
-		const eap_am_network_id_c * const /* send_network_id */,
-		const eapol_key_authentication_type_e /* authentication_type */,
-		const eap_variable_data_c * const /* PMKID */,
-		const eap_variable_data_c * const /* WPXM_WPXK1 */,
-		const eap_variable_data_c * const /* WPXM_WPXK2 */)
-{
-	return EAP_STATUS_RETURN(m_am_tools, eap_status_not_supported);
-}
-
-//--------------------------------------------------
-
-//
-void eapol_am_core_symbian_c::state_notification(const abs_eap_state_notification_c * const state)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	if(state->get_protocol_layer() == eap_protocol_layer_general)
-	{
-		if (state->get_current_state() == eap_general_state_authentication_cancelled)
-		{
-			// Authentication was cancelled. Cannot continue.
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("Authentication was cancelled. Sets timer EAPOL_AM_CORE_TIMER_FAILED_COMPLETELY_ID.\n")));
-
-			set_timer(this, EAPOL_AM_CORE_TIMER_FAILED_COMPLETELY_ID, 0, 0);
-		}
-		else if (state->get_current_state() == eap_general_state_configuration_error)
-		{
-			// Configuration error. Cannot continue.
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("Configuration error. Sets timer EAPOL_AM_CORE_TIMER_FAILED_COMPLETELY_ID.\n")));
-
-			set_timer(this, EAPOL_AM_CORE_TIMER_FAILED_COMPLETELY_ID, 0, 0);
-		}
-	}
-
-
-	if (m_block_packet_sends_and_notifications == true)
-	{
-		// Notification block is active.		
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("state_notification: notification ignored because Disassociated() was called.\n")));
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return;
-	}
-
-
-	// Check if this is EAP layer notification
-	if(state->get_protocol_layer() == eap_protocol_layer_eap)
-	{
-		switch (state->get_current_state())
-		{
-		case eap_state_none:
-			break;
-		case eap_state_identity_request_sent:
-			// This is for server only so no need to notify WLM.
-			break;
-		case eap_state_identity_request_received:
-			if (m_authentication_indication_sent == false) 
-			{
-				EAP_TRACE_DEBUG(
-					m_am_tools,
-					TRACE_FLAGS_DEFAULT,
-					(EAPL("Indication sent to WLM: EAuthenticating.\n")));
-				m_partner->EapIndication(EAuthenticating);
-				m_authentication_indication_sent = true;
-			}
-			break;
-		case eap_state_identity_response_received:
-			// This is for server only so no need to notify WLM.
-			break;
-		case eap_state_authentication_finished_successfully:
-			{
-
-			increment_authentication_counter();
-			m_successful_authentications++;	
-			
-			if (m_wpa_psk_mode_active == false)
-			{				
-				TEap eap;
-				eap.Enabled = ETrue;
-				eap.UID.Num(static_cast<TInt>(state->get_eap_type()));
-				
-				// This moves the successful type to be the top priority type in IAP settings.
-				TRAPD(err, SetToTopPriorityL(&eap));
-				if (err != KErrNone)
-				{
-					// Just log the error. 
-					EAP_TRACE_DEBUG(
-						m_am_tools,
-						TRACE_FLAGS_DEFAULT, 
-						(EAPL("state_notification: SetToTopPriorityL leaved!\n")));
-				}
-
-				// Move the active eap type index to the first type
-				m_eap_index = 0; 
-			}
-						
-
-			}
-			break;
-		case eap_state_authentication_terminated_unsuccessfully:
-			{
-				if (m_wpa_psk_mode_active == false)
-				{
-					// Set index to next type.
-					m_eap_index++;
-				}
-		
-				increment_authentication_counter();
-				m_failed_authentications++;
-
-				// Restart authentication
-				eap_am_network_id_c* send_network_id = new eap_am_network_id_c(m_am_tools, state->get_send_network_id());
-				if (send_network_id == 0 
-					|| send_network_id->get_is_valid_data() == false)
-				{
-					delete send_network_id;
-					EAP_TRACE_DEBUG(
-						m_am_tools,
-						TRACE_FLAGS_DEFAULT,
-						(EAPL("Indication sent to WLM: EFailedCompletely.\n")));
-					m_partner->EapIndication(EFailedCompletely);
-					break;
-				}
-				set_timer(this, EAPOL_AM_CORE_TIMER_RESTART_AUTHENTICATION_ID, send_network_id, 0);
-
-			}
-			break;
-		default:
-			break;
-		}
-	}
-	else 
-	{
-		if(state->get_protocol_layer() == eap_protocol_layer_eapol)
-		{
-			switch (state->get_current_state())
-			{
-			case eapol_state_no_start_response:
-				EAP_TRACE_DEBUG(
-					m_am_tools,
-					TRACE_FLAGS_DEFAULT,
-					(EAPL("Indication sent to WLM: ENoResponse.\n")));
-				m_partner->EapIndication(ENoResponse);
-				break;
-			default:
-				break;
-			}
-		}
-		else if(state->get_protocol_layer() == eap_protocol_layer_eapol_key)
-		{
-			switch (state->get_current_state())
-			{
-			case eapol_key_state_802_11i_authentication_terminated_unsuccessfull:
-				{					
-					increment_authentication_counter();
-					m_failed_authentications++;
-
-					// Consider EAPOL layer failures fatal.
-					EAP_TRACE_ERROR(
-						m_am_tools,
-						TRACE_FLAGS_DEFAULT,
-						(EAPL("ERROR: Unsuccessful authentication on EAPOL level.\n")));
-					EAP_TRACE_DEBUG(
-						m_am_tools,
-						TRACE_FLAGS_DEFAULT,
-						(EAPL("Indication sent to WLM: EThisAPFailed.\n")));
-					m_partner->EapIndication(EThisAPFailed);
-				}
-				break;
-			case eapol_key_state_802_11i_authentication_finished_successfull:
-				{					
-					EAP_TRACE_ALWAYS(
-						m_am_tools,
-						TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT,
-						(EAPL("EAPOL_KEY: %s: Authentication SUCCESS\n"),
-						(m_is_client == true ? "client": "server")));
-				}
-				break;
-			default:
-				break;
-			}
-		}	
-	}
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-}
-
-//--------------------------------------------------
-
-//
-
-eap_status_e eapol_am_core_symbian_c::timer_expired(
-	const u32_t id, void * /* data */)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("eapol_am_core_symbian_c::TimerExpired id = %d.\n"),
-		id));
-
-	switch (id)
-	{
-	case EAPOL_AM_CORE_TIMER_RESTART_AUTHENTICATION_ID:
-		{			
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("EAPOL_AM_CORE_TIMER_RESTART_AUTHENTICATION_ID elapsed: Stopping stack.\n")));
-			
-			// Stop stack. Do this only if Ethernet core still exists.
-			if (m_ethernet_core != 0)
-			{
-				m_ethernet_core->shutdown();
-				delete m_ethernet_core;
-				m_ethernet_core = 0;
-			}
-			if (m_wpa_psk_mode_active == true)
-			{
-				// PSK mode active - cannot restart. Just fail.
-				EAP_TRACE_DEBUG(
-					m_am_tools,
-					TRACE_FLAGS_DEFAULT,
-					(EAPL("WPA PSK mode failed.\n")));
-				EAP_TRACE_DEBUG(
-					m_am_tools,
-					TRACE_FLAGS_DEFAULT,
-					(EAPL("Indication sent to WLM: EThisAPFailed.\n")));
-				m_partner->EapIndication(EThisAPFailed);			
-				break;
-
-			}
-
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("Checking if more types.\n")));
-
-			TInt i;
-			TEap *eapType = 0;  
-			// Search for more EAP types to try
-			for (i = m_eap_index; i < m_iap_eap_array.Count(); i++)
-			{
-				// Find the next enabled EAP type (highest priority)
-				eapType = m_iap_eap_array[i];			
-				if (eapType->Enabled == 1)
-				{
-					break;
-				}
-			}
-			// Update index to point to next type to be tried
-			m_eap_index = i;
-
-			if (i >= m_iap_eap_array.Count())
-			{
-				EAP_TRACE_DEBUG(
-					m_am_tools,
-					TRACE_FLAGS_DEFAULT,
-					(EAPL("No more configured EAP types to try.\n")));
-
-				// No point in trying to restart authentication because there isn't any more
-				// EAP types left to try...
-				EAP_TRACE_DEBUG(
-					m_am_tools,
-					TRACE_FLAGS_DEFAULT,
-					(EAPL("Indication sent to WLM: EThisAPFailed.\n")));
-				m_partner->EapIndication(EThisAPFailed);			
-				break;
-			}
-
-			// Check if authentication mode must be changed
-			TLex8 tmp(eapType->UID);
-			TInt type(0);
-			tmp.Val(type);
-
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("Found new type to try: %d.\n"), type));
-
-			switch (type)
-			{
-			case eap_type_leap:
-				m_active_type_is_leap = true;
-				if (m_802_11_authentication_mode != EAuthModeLeap
-					&& m_security_mode != Wpa
-					&& m_security_mode != Wpa2Only) // In WPA or WPA2 even LEAP uses open authentication
-				{
-					// New type is LEAP and the old was something else:
-					// must reassociate with correct authentication mode.					
-					m_self_disassociated = true;
-					TInt result = m_partner->Disassociate();
-					if (result != KErrNone)
-					{
-						// Probably unrecoverable error
-						EAP_TRACE_DEBUG(
-							m_am_tools,
-							TRACE_FLAGS_DEFAULT,
-							(EAPL("Indication sent to WLM: EFailedCompletely.\n")));				
-						m_partner->EapIndication(EFailedCompletely);
-						EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-						return eap_status_ok;
-					}
-					
-					EAP_TRACE_DEBUG(
-						m_am_tools,
-						TRACE_FLAGS_DEFAULT,
-						(EAPL("TimerExpired: Changing auth type to LEAP.\n")));
-
-					m_802_11_authentication_mode = EAuthModeLeap;
-					
-					m_partner->Associate(EAuthModeLeap);
-					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-					return eap_status_ok;
-				}
-				break;
-			default:
-				m_active_type_is_leap = false;
-				if (m_802_11_authentication_mode != EAuthModeOpen
-					&& m_security_mode != Wpa
-					&& m_security_mode != Wpa2Only) // In WPA or WPA2 even LEAP uses open authentication)
-				{
-					// New type is non-LEAP and the old was LEAP:
-					// must reassociate with correct authentication mode
-					m_self_disassociated = true;
-					TInt result = m_partner->Disassociate();
-					if (result != KErrNone)
-					{
-						// Probably unrecoverable error	
-						EAP_TRACE_DEBUG(
-							m_am_tools,
-							TRACE_FLAGS_DEFAULT,
-							(EAPL("Indication sent to WLM: EFailedCompletely.\n")));
-
-						m_partner->EapIndication(EFailedCompletely);
-						EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-						return eap_status_ok;
-					}
-
-					EAP_TRACE_DEBUG(
-						m_am_tools,
-						TRACE_FLAGS_DEFAULT,
-						(EAPL("TimerExpired: Changing auth type to OPEN.\n")));				
-
-					m_802_11_authentication_mode = EAuthModeOpen;
-					
-					m_partner->Associate(EAuthModeOpen);
-					
-					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-					return eap_status_ok;
-				}
-				break;
-			}
-
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("TimerExpired: No need to change auth type.\n")));				
-
-			if (CompleteAssociation(
-					KErrNone,
-					m_local_address, 
-					m_remote_address,
-					m_received_wpa_ie, 
-					m_received_wpa_ie_length,
-					m_sent_wpa_ie,
-					m_sent_wpa_ie_length,
-					m_group_key_cipher_suite,
-					m_pairwise_key_cipher_suite) != KErrNone)
-			{
-				// Probably unrecoverable error	
-				EAP_TRACE_DEBUG(
-					m_am_tools,
-					TRACE_FLAGS_DEFAULT,
-					(EAPL("Indication sent to WLM: EFailedCompletely.\n")));				
-				m_partner->EapIndication(EFailedCompletely);
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-				return eap_status_ok;
-			}			
-		}
-		break;
-				
-	case EAPOL_AM_CORE_TIMER_DELETE_STACK_ID:
-		{
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("EAPOL_AM_CORE_TIMER_DELETE_STACK_ID elapsed: Delete stack.\n")));
-
-			cancel_all_timers();
-
-			// Delete stack
-			if (m_ethernet_core != 0)
-			{
-				m_ethernet_core->shutdown();
-				delete m_ethernet_core;
-				m_ethernet_core = 0;				
-			}
-			m_stack_marked_to_be_deleted = false;
-
-			// Re-activates timer queue.
-			eap_status_e status = m_am_tools->re_activate_timer_queue();
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_DEBUG(
-					m_am_tools,
-					TRACE_FLAGS_DEFAULT,
-					(EAPL("ERROR: re_activate_timer_queue() failed, status = %d\n")));
-			}
-		}
-		break;
-	
-	case EAPOL_AM_CORE_TIMER_FAILED_COMPLETELY_ID:
-		{
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("EAPOL_AM_CORE_TIMER_FAILED_COMPLETELY_ID elapsed: Indication sent to WLM: EFailedCompletely.\n")));
-
-			m_partner->EapIndication(EFailedCompletely);
-		}
-		break;
-	
-	default:
-		break;
-	}
-	return eap_status_ok;
-}
-
-eap_status_e eapol_am_core_symbian_c::timer_delete_data(
-	const u32_t id, void *data)
-{
-	switch (id)
-	{
-	case EAPOL_AM_CORE_TIMER_RESTART_AUTHENTICATION_ID:
-		{
-			eap_am_network_id_c* tmp = static_cast<eap_am_network_id_c*>(data);
-			delete tmp;
-		}
-		break;
-	case EAPOL_AM_CORE_TIMER_DELETE_STACK_ID:
-		break;
-	case EAPOL_AM_CORE_TIMER_FAILED_COMPLETELY_ID:
-		break;
-
-	default:
-		{
-			EAP_TRACE_ERROR(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("eapol_am_core_symbian_c::timer_delete_data: deleted unknown timer.\n")));
-			(void)EAP_STATUS_RETURN(m_am_tools, eap_status_not_supported);
-		}
-	}	
-	return eap_status_ok;
-}
-//--------------------------------------------------
-
-//
-u32_t eapol_am_core_symbian_c::get_header_offset(
-	u32_t * const MTU,
-	u32_t * const trailer_length)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-	*MTU = KMTU;
-	*trailer_length = KTrailerLength;
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return KHeaderOffset;
-}
-
-//--------------------------------------------------
-
-//
-eap_status_e eapol_am_core_symbian_c::unload_module(const eap_type_value_e type)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-	eap_status_e status(eap_status_type_does_not_exists_error);
-	TInt index = m_eap_type_array.Find(type);
-	if (index != KErrNotFound)
-	{
-		delete m_plugin_if_array[index];
-		m_plugin_if_array.Remove(index);
-		m_eap_type_array.Remove(index);
-		status = eap_status_ok;			
-	}
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, status);
-}
-
-//--------------------------------------------------
-
-//
-eap_status_e eapol_am_core_symbian_c::eap_acknowledge(const eap_am_network_id_c * const receive_network_id)
-{
-	// Any Network Protocol packet is accepted as a success indication.
-	// This is described in RFC 2284 "PPP Extensible Authentication Protocol (EAP)".
-
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	eap_status_e status = m_ethernet_core->eap_acknowledge(receive_network_id);
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, status);
-}
-
-//--------------------------------------------------
-
-//
-eap_status_e eapol_am_core_symbian_c::load_module(
-		const eap_type_value_e type,
-		const eap_type_value_e tunneling_type,
-		abs_eap_base_type_c * const partner,
-		eap_base_type_c ** const eap_type_if,
-		const bool is_client_when_true,
-		const eap_am_network_id_c * const receive_network_id)
-{	
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("eapol_am_core_symbian_c::load_module(type %d=%s, tunneling_type %d=%s)\n"),
-		static_cast<TInt>(type),
-		eap_header_string_c::get_eap_type_string(type),
-		static_cast<TInt>(tunneling_type),
-		eap_header_string_c::get_eap_type_string(tunneling_type)));
-
-	eap_status_e status = eap_status_process_general_error;
-	TBuf8<KMaxEapCueLength> cue;
-	cue.Num(static_cast<TInt>(convert_eap_type_to_u32_t(type)));
-	CEapType* eapType = 0;
-	TInt error(KErrNone);
-
-	// Check if this EAP type has already been loaded
-	TInt eapArrayIndex = m_eap_type_array.Find(type);
-	if (eapArrayIndex != KErrNotFound)
-	{
-		// Yep. It was loaded already.
-		eapType = m_plugin_if_array[eapArrayIndex];		
-	}
-	else 
-	{
-		// We must have a trap here since the EAPOL core knows nothing about Symbian.
-		TRAP(error, (eapType = CEapType::NewL(cue, m_index_type, m_index)));	
-		if (error != KErrNone
-			|| eapType == 0)
-		{
-			// Interface not found or implementation creation function failed
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("ECom could not find/initiate implementation.\n")));
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-	}
-	// Set the tunneling type
-	eapType->SetTunnelingType(convert_eap_type_to_u32_t(tunneling_type));
-
-	// Create the EAP protocol interface implementation.
-	TRAP(error, (*eap_type_if = eapType->GetStackInterfaceL(m_am_tools, partner, is_client_when_true, receive_network_id)));
-		
-	if (error != KErrNone 
-		|| *eap_type_if == 0 
-		|| (*eap_type_if)->get_is_valid() == false)
-	{
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("Could not create EAP type interface instance. Error: %d\n"), error));
-
-		status = eap_status_allocation_error;
-		// Unload DLL (two ways, depending whether this type was already loaded...)
-		if  (eapArrayIndex == KErrNotFound)
-		{
-			// No need to call shutdown here because GetStackInterfaceL has done it.
-			delete eapType;
-		}
-		else
-		{
-			unload_module(type);
-		}
-		// Note: even in error cases eap_core_c deletes eap_type_if
-	}
-	else
-	{
-		status = eap_status_ok;
-		if (eapArrayIndex  == KErrNotFound)
-		{
-			// Add plugin information to the member arrays. There is no need to store eap_type pointer because
-			// the stack takes care of its deletion.
-			if (m_plugin_if_array.Append(eapType) != KErrNone)
-			{
-				delete eapType;
-				status = eap_status_allocation_error;
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);				
-			}
-			if (m_eap_type_array.Append(type) != KErrNone)
-			{
-				// Remove the eap type added just previously
-				m_plugin_if_array.Remove(m_plugin_if_array.Count() - 1);
-				delete eapType;
-				status = eap_status_allocation_error;
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);				
-			}
-		} 
-	}
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, status);
-}
-
-//--------------------------------------------------
-
-//
-TInt eapol_am_core_symbian_c::Disassociated()
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("eapol_am_core_symbian_c::Disassociated()\n")));
-
-	if (m_self_disassociated == true)
-	{
-		// We were expecting this. No need to reset state.
-		m_self_disassociated = false;
-		return KErrNone;
-	}
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("eapol_am_core_symbian_c::Disassociated.\n")));
-
-	eap_status_e status(eap_status_ok);
-
-	// Set block on.
-	m_block_packet_sends_and_notifications = true;
-
-	// Reset flags
-	m_success_indication_sent = false;
-	m_unicast_wep_key_received = false;
-	m_broadcast_wep_key_received = false;
-	m_authentication_indication_sent = false;
-
-	if (m_ethernet_core != 0)
-	{
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("Stack exists. Set EAPOL_AM_CORE_TIMER_DELETE_STACK_ID timer.\n")));
-
-		m_stack_marked_to_be_deleted = true;
-		set_timer(this, EAPOL_AM_CORE_TIMER_DELETE_STACK_ID, 0, 0);
-	} 
-	else
-	{
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("Stack did not exists. EAPOL_AM_CORE_TIMER_DELETE_STACK_ID timer not set.\n")));
-	}
-
-	// reset index
-	m_eap_index = 0;
-
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return m_am_tools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(m_am_tools, status));	
-}
-
-//--------------------------------------------------
-
-//
-TInt eapol_am_core_symbian_c::SendWPAMICFailureReport(
-		TBool aFatalMICFailure,
-		const TMICFailureType aMICFailureType)
-{
-	EAP_TRACE_ALWAYS(
-		m_am_tools,
-		TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT,
-		(EAPL("eapol_am_core_symbian_c::SendWPAMICFailureReport(%d, %d).\n"),
-		aFatalMICFailure,
-		aMICFailureType));
-
-	bool fatal_failure_when_true = true;
-
-	if (!aFatalMICFailure)
-	{
-		fatal_failure_when_true = false;
-	}
-
-	eapol_RSNA_key_header_c::eapol_tkip_mic_failure_type_e tkip_mic_failure_type
-		= eapol_RSNA_key_header_c::eapol_tkip_mic_failure_type_pairwise_key;
-
-	if (aMICFailureType == EGroupKey)
-	{
-		tkip_mic_failure_type
-			= eapol_RSNA_key_header_c::eapol_tkip_mic_failure_type_group_key;
-	}
-
-	const eap_status_e status = m_ethernet_core->tkip_mic_failure(
-		m_receive_network_id,
-		fatal_failure_when_true,
-		tkip_mic_failure_type);
-
-	return m_am_tools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(m_am_tools, status));	
-}
-
-
-//--------------------------------------------------
-
-//
-void eapol_am_core_symbian_c::ReadEAPSettingsL()
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("eapol_am_core_symbian_c::ReadEAPSettingsL()\n")));
-
-	eap_status_e status(eap_status_ok);
-
-	// Delete old IAP settings
-	m_iap_eap_array.ResetAndDestroy();
-	if (m_index_type == ELan)
-	{
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("Beginning to read IAP settings - Type: %d, Index: %d.\n"), m_index_type, m_index));
-
-		CWLanSettings* wlan = new(ELeave) CWLanSettings;
-		CleanupStack::PushL(wlan);
-		SWLANSettings wlanSettings;
-		if (wlan->Connect() != KErrNone)
-		{
-			// Could not connect to CommDB			
-			User::Leave(KErrCouldNotConnect);
-		}
-
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT, (EAPL("Connected to CommDbIf.\n")));
-
-		if (wlan->GetWlanSettingsForService(m_index, wlanSettings) != KErrNone)
-		{
-			wlan->Disconnect();
-			User::Leave(KErrUnknown);
-		}
-
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("Got WLAN settings.\n")));
-		
-		wlan->GetEapDataL(m_iap_eap_array);
-		
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("Got EAP data:\n")));
-
-		for (TInt i = 0; i < m_iap_eap_array.Count(); i++)
-		{
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("EAP type %d\n"),
-				i));
-
-			TLex8 tmp(m_iap_eap_array[i]->UID);
-			TInt val(0);
-			tmp.Val(val);
-		
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("  UID: %d\n"), val));
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("  Enabled: %d\n"),
-				m_iap_eap_array[i]->Enabled));
-		}
-
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("End EAP data:\n")));
-
-		if (m_iap_eap_array.Count() == 0)
-		{
-			// The EAP field was empty. Allow all types.
-
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("Empty EAP field -> enable all types.\n")));
-
-			RImplInfoPtrArray eapArray;
-			
-			REComSession::ListImplementationsL(KEapTypeInterfaceUid, eapArray);
-		
-			TEap *eap;
-			for (TInt i = 0; i < eapArray.Count(); i++)
-			{
-				eap = new(ELeave) TEap;
-				eap->UID.Copy(eapArray[i]->DataType());
-				eap->Enabled = ETrue;
-				m_iap_eap_array.Append(eap);
-			}
-
-			eapArray.ResetAndDestroy();
-		}
-
-		// Get security mode
-		if (m_wpa_override_enabled == false)
-		{
-			m_security_mode = static_cast<EWlanSecurityMode>(wlanSettings.SecurityMode);		
-	
-			if (wlanSettings.EnableWpaPsk)
-			{
-				m_wpa_psk_mode_allowed = true;
-			}
-			else
-			{
-				m_wpa_psk_mode_allowed = false;
-			}
-		}
-		else
-		{
-			// WPA override is enabled
-			m_security_mode = Wpa;
-			if (m_wpa_psk_password_override->get_is_valid_data() == true
-				&& m_wpa_psk_password_override->get_data_length() > 0)
-			{
-				m_wpa_psk_mode_allowed = true;
-			}			
-			else
-			{
-				m_wpa_psk_mode_allowed = false;
-			}
-		}
-		
-		
-		// Get WPA or WPA2 pre shared key & SSID
-		if ((m_security_mode == Wlan8021x
-			|| m_security_mode == Wpa
-			|| m_security_mode == Wpa2Only)
-			&& m_wpa_psk_mode_allowed == true
-			&& m_is_client == true)
-		{
-			eap_variable_data_c * password = new eap_variable_data_c(m_am_tools);
-			if (password == 0)
-			{
-				wlan->Disconnect();
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				User::Leave(KErrNoMemory);
-			}
-			eap_variable_data_c * ssid = new eap_variable_data_c(m_am_tools);
-			if (ssid == 0)
-			{
-				delete password;
-				wlan->Disconnect();
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				User::Leave(KErrNoMemory);
-			}
-
-			// When using easy WLAN there might be WPA PSK override
-			if (m_wpa_psk_password_override->get_is_valid_data() == true
-				&& m_wpa_psk_password_override->get_data_length() > 0)
-			{
-				// Use WPA PSK override
-				status = password->set_copy_of_buffer(
-					m_wpa_psk_password_override->get_data(m_wpa_psk_password_override->get_data_length()), 
-					m_wpa_psk_password_override->get_data_length());
-				if (status != eap_status_ok)
-				{
-					delete password;
-					delete ssid;
-					wlan->Disconnect();
-					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-					User::Leave(m_am_tools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(m_am_tools, status)));
-				}
-			}
-			else
-			{
-				status = password->set_copy_of_buffer(wlanSettings.WPAPreSharedKey.Ptr(), wlanSettings.WPAPreSharedKey.Size());
-				if (status != eap_status_ok)
-				{
-					delete password;
-					delete ssid;
-					wlan->Disconnect();
-					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-					User::Leave(m_am_tools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(m_am_tools, status)));
-				}
-			}
-
-			TBuf8<KMaxSSIDLength> tmp;
-			tmp.Copy(wlanSettings.SSID);
-			status = ssid->set_copy_of_buffer(tmp.Ptr(), tmp.Size());
-			if (status != eap_status_ok)
-			{
-				delete password;
-				delete ssid;
-				wlan->Disconnect();
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				User::Leave(m_am_tools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(m_am_tools, status)));
-			}
-
-			crypto_wpa_psk_password_hash_c password_hash(m_am_tools);
-
-			if (ssid->get_data_length() == 0)
-			{
-				status = ssid->set_copy_of_buffer(m_ssid);
-				if (status != eap_status_ok)
-				{
-					delete password;
-					delete ssid;
-					wlan->Disconnect();
-					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-					User::Leave(m_am_tools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(m_am_tools, status)));
-				}
-			}	
-
-			TPSKEntry pskEntry;
-
-			pskEntry.indexType = m_index_type;
-			pskEntry.index = m_index;
-
-			TPtr8 ssidPtr(
-					ssid->get_data(ssid->get_data_length()),
-					ssid->get_data_length(),
-					ssid->get_data_length()
-				);			
-
-            TInt err(KErrNone);
-
-			if (m_wpa_psk_password_override->get_is_valid_data() == false
-				|| m_wpa_psk_password_override->get_data_length() == 0)
-			{
-				// Retrieve saved PSK only when override is not in effect
-				TRAP(err, RetrievePSKL(pskEntry));
-			} 
-			
-			if (err != KErrNone
-				|| pskEntry.ssid.Compare(ssidPtr) != 0
-				|| pskEntry.password.Compare(wlanSettings.WPAPreSharedKey) != 0)
-			{
-				EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("No previous PSK found...\n")));
-				// No previous PSK or parameters were changed. We need to calculate
-				// PSK again
-
-				status = password_hash.password_hash(
-					password,
-					ssid,	
-					m_wpa_preshared_key,
-					0,
-					0);
-
-				if (status != eap_status_ok)
-				{			
-					delete password;
-					delete ssid;
-					wlan->Disconnect();							
-					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-					User::Leave(m_am_tools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(m_am_tools, status)));
-				//	return;
-				}
-				
-				if (m_wpa_psk_password_override->get_is_valid_data() == false
-					|| m_wpa_psk_password_override->get_data_length() == 0)
-				{
-					// Save new PSK (only if psk override is not in effect)
-					pskEntry.ssid.Copy(ssidPtr);
-				
-					pskEntry.password.Copy(wlanSettings.WPAPreSharedKey);
-					
-					pskEntry.psk.Copy(
-						m_wpa_preshared_key->get_data(m_wpa_preshared_key->get_data_length()),
-						m_wpa_preshared_key->get_data_length()
-						);
-
-					EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("Saving PSK.\n")));
-					SavePSKL(pskEntry);																
-				}
-			}			
-			else
-			{
-				// Copy retrieved psk to member variable
-				status = m_wpa_preshared_key->set_copy_of_buffer(pskEntry.psk.Ptr(), pskEntry.psk.Size());
-				if (status != eap_status_ok)
-				{
-					delete password;
-					delete ssid;
-					wlan->Disconnect();
-					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-					User::Leave(m_am_tools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(m_am_tools, status)));
-				}
-			}
-			delete password;
-			delete ssid;
-		}
-		
-		wlan->Disconnect();
-		CleanupStack::PopAndDestroy(wlan);		
-		if (m_security_mode != Wlan8021x
-			&& m_security_mode != Wpa
-			&& m_security_mode != Wpa2Only)
-		{
-			// Unsupported mode
-			User::Leave(KErrNotSupported);
-		}
-	} 
-	else
-	{
-		// At the moment only LAN bearer is supported.
-		User::Leave(KErrNotSupported);
-	}
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-}
-
-//--------------------------------------------------
-
-void eapol_am_core_symbian_c::SetToTopPriorityL(const TEap* const aEapType)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("eapol_am_core_symbian_c::SetToTopPriorityL()\n")));
-
-	if (m_index_type == ELan)
-	{
-		TInt i(0);
-		TBuf8<3> uid;
-		for (i = 0; i < m_iap_eap_array.Count(); i++)
-		{
-			TEap* eap = m_iap_eap_array[i];
-			if (eap->UID[0] == '0')
-			{
-				// Cut the leading zero
-				uid.Copy(eap->UID.Right(eap->UID.Length()-1));				
-			}
-			else
-			{
-				uid.Copy(eap->UID);
-			}
-			if (eap->Enabled == aEapType->Enabled
-				&& uid.Compare(aEapType->UID) == 0)
-			{
-				// Found
-				break;
-			}
-		}
-		if (i >= m_iap_eap_array.Count())
-		{
-			// This should never happen
-			User::Leave(KErrNotFound);					
-		}
-	
-		TLex8 tmp(aEapType->UID);
-		TInt val(0);
-		tmp.Val(val);
-
-		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("Setting to top priority:\n")));
-		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("Old index: %d\n"), i));
-		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("  UID: %d\n"), val));
-		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("  Enabled: %d\n"), aEapType->Enabled));
-	
-		if (i == 0)
-		{
-			// Already at the highest priority
-			return;
-		}
-
-		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("Beginning to write IAP EAP settings - Type: %d, Index: %d.\n"), m_index_type, m_index));
-		
-		CWLanSettings* wlan = new(ELeave) CWLanSettings;
-		CleanupStack::PushL(wlan);
-		SWLANSettings wlanSettings;
-		if (wlan->Connect() != KErrNone)
-		{
-			// Could not connect to CommDB			
-			User::Leave(KErrCouldNotConnect);
-		}
-		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("Connected to CommDbIf.\n")));		
-		if (wlan->GetWlanSettingsForService(m_index, wlanSettings) != KErrNone)
-		{
-			wlan->Disconnect();
-			User::Leave(KErrUnknown);
-		}
-		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("Got WLAN settings.\n")));
-		
-		// Change the order
-		TEap* eap = m_iap_eap_array[i];
-
-		m_iap_eap_array.Remove(i); // This does not delete the object	
-				
-		m_iap_eap_array.Insert(eap, 0);
-
-		wlan->SetEapDataL(m_iap_eap_array);
-		
-		wlan->Disconnect();
-
-		CleanupStack::PopAndDestroy(wlan);		
-	} 
-	else
-	{
-		// At the moment only LAN bearer is supported.
-		User::Leave(KErrNotSupported);
-	}
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-}
-
-//--------------------------------------------------
-
-eap_status_e eapol_am_core_symbian_c::configure()
-{	
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("eapol_am_core_symbian_c::configure()\n")));
-
-
-	//----------------------------------------------------------
-
-#if defined(USE_EAP_ERROR_TESTS)
-
-	{
-		eap_variable_data_c EAP_ERROR_TEST_enable_random_errors(m_am_tools);
-
-		eap_status_e status = read_configure(
-			cf_str_EAP_ERROR_TEST_enable_random_errors.get_field(),
-			&EAP_ERROR_TEST_enable_random_errors);
-		if (status == eap_status_ok
-			&& EAP_ERROR_TEST_enable_random_errors.get_is_valid_data() == true)
-		{
-			u32_t *enable_random_errors = reinterpret_cast<u32_t *>(
-				EAP_ERROR_TEST_enable_random_errors.get_data(sizeof(u32_t));
-			if (enable_random_errors != 0
-				&& *enable_random_errors != 0)
-			{
-				m_enable_random_errors = true;
-			}
-		}
-	}
-
-	{
-		eap_variable_data_c EAP_ERROR_TEST_send_original_packet_first(m_am_tools);
-
-		eap_status_e status = read_configure(
-			cf_str_EAP_ERROR_TEST_send_original_packet_first.get_field(),
-			&EAP_ERROR_TEST_send_original_packet_first);
-		if (status == eap_status_ok
-			&& EAP_ERROR_TEST_send_original_packet_first.get_is_valid_data() == true)
-		{
-			u32_t *send_original_packet_first = reinterpret_cast<u32_t *>(
-				EAP_ERROR_TEST_send_original_packet_first.get_data(sizeof(u32_t));
-			if (send_original_packet_first != 0
-				&& *send_original_packet_first != 0)
-			{
-				m_send_original_packet_first = true;
-			}
-		}
-	}
-
-	{
-		eap_variable_data_c EAP_ERROR_TEST_generate_multiple_error_packets(m_am_tools);
-
-		eap_status_e status = read_configure(
-			cf_str_EAP_ERROR_TEST_generate_multiple_error_packets.get_field(),
-			&EAP_ERROR_TEST_generate_multiple_error_packets);
-		if (status == eap_status_ok
-			&& EAP_ERROR_TEST_generate_multiple_error_packets.get_is_valid_data() == true)
-		{
-			u32_t *generate_multiple_error_packets = reinterpret_cast<u32_t *>(
-				EAP_ERROR_TEST_generate_multiple_error_packets.get_data(sizeof(u32_t));
-			if (generate_multiple_error_packets != 0
-				&& *generate_multiple_error_packets != 0)
-			{
-				m_generate_multiple_error_packets = *generate_multiple_error_packets;
-			}
-		}
-	}
-
-
-	{
-		eap_variable_data_c EAP_ERROR_TEST_manipulate_ethernet_header(m_am_tools);
-
-		eap_status_e status = read_configure(
-			cf_str_EAP_ERROR_TEST_manipulate_ethernet_header.get_field(),
-			&EAP_ERROR_TEST_manipulate_ethernet_header);
-		if (status == eap_status_ok
-			&& EAP_ERROR_TEST_manipulate_ethernet_header.get_is_valid_data() == true)
-		{
-			u32_t *manipulate_ethernet_header = reinterpret_cast<u32_t *>(
-				EAP_ERROR_TEST_manipulate_ethernet_header.get_data(sizeof(u32_t));
-			if (manipulate_ethernet_header != 0
-				&& *manipulate_ethernet_header != 0)
-			{
-				m_manipulate_ethernet_header = true;
-			}
-		}
-	}
-
-	{
-		eap_variable_data_c EAP_ERROR_TEST_error_probability(m_am_tools);
-
-		eap_status_e status = read_configure(
-			cf_str_EAP_ERROR_TEST_error_probability.get_field(),
-			&EAP_ERROR_TEST_error_probability);
-		if (status == eap_status_ok
-			&& EAP_ERROR_TEST_error_probability.get_is_valid_data() == true)
-		{
-			u32_t *error_probability = reinterpret_cast<u32_t *>(
-				EAP_ERROR_TEST_error_probability.get_data(sizeof(u32_t));
-			if (error_probability != 0)
-			{
-				m_error_probability = *error_probability;
-			}
-		}
-	}	
-
-	{
-		eap_variable_data_c EAP_disable_function_traces(m_am_tools);
-
-		eap_status_e status = read_configure(
-			cf_str_EAP_TRACE_enable_function_traces.get_field(),
-			&EAP_disable_function_traces);
-		if (status == eap_status_ok
-			&& EAP_disable_function_traces.get_is_valid_data() == true)
-		{
-			u32_t *disable_function_traces = reinterpret_cast<u32_t *>(
-				EAP_disable_function_traces.get_data(sizeof(u32_t));
-			if (disable_function_traces != 0
-				&& *disable_function_traces != 0)
-			{
-				m_am_tools->set_trace_mask(
-					m_am_tools->get_trace_mask()
-					| eap_am_tools_c::eap_trace_mask_functions
-					);
-			}
-		}
-	}
-
-#endif //#if defined(USE_EAP_ERROR_TESTS)
-
-
-	//----------------------------------------------------------
-
-	{		
-		eap_variable_data_c EAP_TRACE_disable_traces(m_am_tools);
-
-		eap_status_e status = read_configure(
-			cf_str_EAP_TRACE_disable_traces.get_field(),
-			&EAP_TRACE_disable_traces);
-		if (status == eap_status_ok
-			&& EAP_TRACE_disable_traces.get_is_valid_data() == true)
-		{
-			u32_t *disable_traces = reinterpret_cast<u32_t *>(
-				EAP_TRACE_disable_traces.get_data(sizeof(u32_t)));
-			if (disable_traces != 0
-				&& *disable_traces != 0)
-			{
-				m_am_tools->set_trace_mask(eap_am_tools_c::eap_trace_mask_none);
-			}
-			else
-			{
-				// OK, set the default trace mask.
-				m_am_tools->set_trace_mask(
-					eap_am_tools_c::eap_trace_mask_debug
-					| eap_am_tools_c::eap_trace_mask_always
-					| eap_am_tools_c::eap_trace_mask_error);
-			}
-		}
-	}
-
-	//----------------------------------------------------------
-
-	{		
-		eap_variable_data_c EAP_TRACE_activate_only_trace_masks_always_and_error(m_am_tools);
-
-		eap_status_e status = read_configure(
-			cf_str_EAP_TRACE_activate_only_trace_masks_always_and_error.get_field(),
-			&EAP_TRACE_activate_only_trace_masks_always_and_error);
-		if (status == eap_status_ok
-			&& EAP_TRACE_activate_only_trace_masks_always_and_error.get_is_valid_data() == true)
-		{
-			u32_t *activate_trace_mask_always
-				= reinterpret_cast<u32_t *>(
-					EAP_TRACE_activate_only_trace_masks_always_and_error.get_data(
-						sizeof(u32_t)));
-			if (activate_trace_mask_always != 0
-				&& *activate_trace_mask_always != 0)
-			{
-				m_am_tools->set_trace_mask(
-					eap_am_tools_c::eap_trace_mask_always
-					| eap_am_tools_c::eap_trace_mask_error
-					);
-			}
-		}
-	}
-
-	//----------------------------------------------------------
-
-	{		
-		eap_variable_data_c EAP_TRACE_activate_trace_on_error(m_am_tools);
-
-		eap_status_e status = read_configure(
-			cf_str_EAP_TRACE_activate_trace_on_error.get_field(),
-			&EAP_TRACE_activate_trace_on_error);
-		if (status == eap_status_ok
-			&& EAP_TRACE_activate_trace_on_error.get_is_valid_data() == true)
-		{
-			u32_t *activate_trace_on_error = reinterpret_cast<u32_t *>(
-				EAP_TRACE_activate_trace_on_error.get_data(sizeof(u32_t)));
-			if (activate_trace_on_error != 0
-				&& *activate_trace_on_error != 0)
-			{
-				m_am_tools->set_activate_trace_on_error();
-			}
-		}
-	}
-
-	//----------------------------------------------------------
-
-	// All of the configuration options are optional.
-	// So we return OK.
-	return eap_status_ok;
-}
-
-//--------------------------------------------------
-
-eap_status_e eapol_am_core_symbian_c::read_configure(
-	const eap_configuration_field_c * const field,
-	eap_variable_data_c * const data)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-	EAP_ASSERT_ALWAYS(data != NULL);
-	
-	// To remove compilation warning in UREL due to KMaxConfigStringLength.
-	if(field->get_field_length() > KMaxConfigStringLength)
-	{
-		return eap_status_process_general_error;
-	}
-	
-	// Trap must be set here because the OS independent portion of EAPOL
-	// that calls this function does not know anything about Symbian.	
-	eap_status_e status(eap_status_ok);
-	
-	// Check if the wanted parameter is default type
-
-	eap_variable_data_c wanted_field(m_am_tools);
-	eap_variable_data_c type_field(m_am_tools);
-	eap_variable_data_c type_field_server(m_am_tools);
-	
-	status = wanted_field.set_buffer(
-		field->get_field(),
-		field->get_field_length(),
-		false,
-		false);
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return status;
-	}
-	
-	status = type_field.set_buffer(
-		cf_str_EAP_default_type_u32_t.get_field()->get_field(),
-		cf_str_EAP_default_type_u32_t.get_field()->get_field_length(),
-		false,
-		false);
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return status;
-	}
-	
-	status = type_field_server.set_buffer(
-		cf_str_EAP_server_default_type_u32_t.get_field()->get_field(),
-		cf_str_EAP_server_default_type_u32_t.get_field()->get_field_length(),
-		false,
-		false);
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return status;
-	}
-
-	if (!wanted_field.compare(&type_field)
-		|| !wanted_field.compare(&type_field_server))
-	{
-		TInt i; 
-		// We need to return here the next EAP type we should try		
-		for (i = m_eap_index; i < m_iap_eap_array.Count(); i++)
-		{
-			// Find the first enabled EAP type (highest priority)
-			TEap *eapType = m_iap_eap_array[i];			
-			if (eapType->Enabled == 1)
-			{
-				// Convert the string to integer
-				TLex8 tmp(eapType->UID);
-				TInt val(0);
-				tmp.Val(val);
-				status = data->set_copy_of_buffer(reinterpret_cast<u8_t *>(&val), sizeof(TUint));
-				if (status != eap_status_ok)
-				{
-					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-					return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);			
-				}
-
-				EAP_TRACE_DEBUG(
-					m_am_tools,
-					TRACE_FLAGS_DEFAULT,
-					(EAPL("EAPOL: Trying EAP type: %d.\n"), val));
-				break;
-			}
-		}	
-		m_eap_index = i;
-		if (i >= m_iap_eap_array.Count())
-		{
-			// Not found
-			// Send WLM notification because there is no way that the authentication
-			// can be successful if we don't have any EAP types to use...
-			if (m_is_client)
-			{
-				EAP_TRACE_ERROR(
-					m_am_tools,
-					TRACE_FLAGS_DEFAULT,
-					(EAPL("ERROR: No configured EAP types or all tried unsuccessfully.\n")));
-			}
-
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_configure_field);
-		}
-	
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);		
-	}
-
-	// It was something else than EAP type. Read it from DB.
-	TRAPD(err, read_configureL(
-		field->get_field(),
-		field->get_field_length(),
-		data));
-	if (err != KErrNone) 
-	{
-		status = m_am_tools->convert_am_error_to_eapol_error(err);
-
-#if defined(USE_EAP_FILECONFIG)
-		if (m_fileconfig != 0
-			&& m_fileconfig->get_is_valid() == true)
-		{
-			// Here we could try the final configuration option.
-			status = m_fileconfig->read_configure(
-				field,
-				data);
-		}
-#endif //#if defined(USE_EAP_FILECONFIG)
-	}
-
-	m_am_tools->trace_configuration(
-		status,
-		field,
-		data);
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, status);
-}
-
-//--------------------------------------------------
-
-void eapol_am_core_symbian_c::read_configureL(
-	eap_config_string field,
-	const u32_t /*field_length*/,
-	eap_variable_data_c * const data)
-{	
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	// Create a buffer for the ascii strings - initialised with the argument
-	HBufC8* asciibuf = HBufC8::NewLC(128);
-	TPtr8 asciiString = asciibuf->Des();
-	asciiString.Copy(reinterpret_cast<const unsigned char *>(field));
-		
-	// Buffer for unicode parameter
-	HBufC* unicodebuf = HBufC::NewLC(128);
-	TPtr unicodeString = unicodebuf->Des();
-	
-	// Convert to unicode 
-	unicodeString.Copy(asciiString);
-
-	// Now do the database query
-	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
-	TPtr sqlStatement = buf->Des();
-	_LIT(KSQLQueryRow, "SELECT %S FROM eapol");
-	sqlStatement.Format(KSQLQueryRow, &unicodeString);
-	
-	RDbView view;
-	User::LeaveIfError(view.Prepare(m_database, TDbQuery(sqlStatement), TDbWindow::EUnlimited));
-	CleanupClosePushL(view);
-	User::LeaveIfError(view.EvaluateAll());	
-	if (view.FirstL())
-	{
-		eap_status_e status(eap_status_process_general_error);
-		view.GetL();		
-		switch (view.ColType(1))
-		{
-		case EDbColText:				
-			{
-				unicodeString = view.ColDes(1);
-				// Convert to 8-bit
-				asciiString.Copy(unicodeString);
-				if (asciiString.Size() > 0)
-				{
-					status = data->set_copy_of_buffer(asciiString.Ptr(), asciiString.Size());
-					if (status != eap_status_ok)
-					{
-						User::Leave(KErrNoMemory);
-					}
-				} 
-				else 
-				{
-					// Empty field. Do nothing...data remains invalid
-					// and the stack knows what to do hopefully.
-					break;
-				}
-			}
-			break;
-		case EDbColUint32:
-			{
-				TUint value;
-				value = view.ColUint32(1);
-				status = data->set_copy_of_buffer((const unsigned char *) &value, sizeof(value));
-				if (status != eap_status_ok)
-				{
-					User::Leave(KErrNoMemory);
-				}
-			}
-			break;
-		default:
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("read_configureL: Unexpected column type.\n")));
-			User::Panic(_L("EAPOL"), 1);			
-		}
-	} 
-	else 
-	{
-		// Could not find parameter
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("read_configureL: Could not find configuration parameter.\n")));
-		User::Leave(KErrNotFound);
-	}		
-	
-	// Close database
-	CleanupStack::PopAndDestroy(4); // session & 3 buffers
-
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-}
-
-//--------------------------------------------------
-
-eap_status_e eapol_am_core_symbian_c::write_configure(
-	const eap_configuration_field_c * const /*field*/,
-	eap_variable_data_c * const /*data*/)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return eap_status_not_supported;
-}
-
-//--------------------------------------------------
-
-//
-eap_status_e eapol_am_core_symbian_c::set_timer(
-	abs_eap_base_timer_c * const p_initializer, 
-	const u32_t p_id, 
-	void * const p_data,
-	const u32_t p_time_ms)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	const eap_status_e status = m_am_tools->am_set_timer(
-		p_initializer, 
-		p_id, 
-		p_data,
-		p_time_ms);
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return status;
-}
-
-//--------------------------------------------------
-
-//
-eap_status_e eapol_am_core_symbian_c::cancel_timer(
-	abs_eap_base_timer_c * const p_initializer, 
-	const u32_t p_id)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-	
-	const eap_status_e status = m_am_tools->am_cancel_timer(
-		p_initializer, 
-		p_id);
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return status;
-}
-
-//--------------------------------------------------
-
-//
-eap_status_e eapol_am_core_symbian_c::cancel_all_timers()
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	const eap_status_e status = m_am_tools->am_cancel_all_timers();
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return status;
-}
-
-//--------------------------------------------------
-
-eap_status_e eapol_am_core_symbian_c::check_is_valid_eap_type(const eap_type_value_e eap_type)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-	
-	TEap *eapType = 0; 
-	
-	eap_status_e status(eap_status_illegal_eap_type);
-	
-	for (int i = 0; i < m_iap_eap_array.Count(); i++)
-	{
-		// Try next EAP type
-		eapType = m_iap_eap_array[i];
-		if (eapType->Enabled == 1)
-		{	
-			// Convert the string to integer
-			TLex8 tmp(eapType->UID);
-			TInt val(0);
-			tmp.Val(val);
-			if (eap_type == static_cast<eap_type_ietf_values_e>(val))
-			{
-				// Allowed
-				status = eap_status_ok;
-				break;
-			}	
-		}
-	}
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	return EAP_STATUS_RETURN(m_am_tools, status);
-}
-
-//--------------------------------------------------
-
-eap_status_e eapol_am_core_symbian_c::get_eap_type_list(
-	eap_array_c<eap_type_value_e> * const eap_type_list)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	TEap *eapType = 0; 
-
-	eap_status_e status(eap_status_illegal_eap_type);
-
-	status = eap_type_list->reset();
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	for (TInt i = 0; i < m_iap_eap_array.Count(); i++)
-	{
-		// Check if type is enabled
-		eapType = m_iap_eap_array[i];
-		if (eapType->Enabled == 1)
-		{	
-			TLex8 tmp(eapType->UID);
-			TInt val(0);
-			tmp.Val(val);
-
-			eap_type_value_e * const eap_type = new eap_type_value_e(
-				static_cast<eap_type_ietf_values_e>(val));
-			if (eap_type == 0)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-			}
-
-			status = eap_type_list->add_object(eap_type, true);
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);
-			}
-		}
-	}
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return eap_status_ok;
-}
-
-//--------------------------------------------------
-
-void eapol_am_core_symbian_c::TryOpenDatabaseL(RDbNamedDatabase& aDatabase, RDbs& aSession)
-{
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("eapol_am_core_symbian_c::TryOpenDatabaseL()\n")));
-
-	// 1. Open/create a database	
-	
-	// Connect to the DBMS server.
-	User::LeaveIfError(aSession.Connect());		
-	CleanupClosePushL(aSession);	
-	// aSession and aDatabase are pushed to the cleanup stack even though they may be member
-	// variables of the calling class and would be closed in the destructor anyway. This ensures
-	// that if they are not member variables they will be closed. Closing the handle twice
-	// does no harm.	
-	
-#ifdef SYMBIAN_SECURE_DBMS
-	
-	// Create the secure shared database (if necessary) with the specified secure policy.
-	// Database will be created in the data caging path for DBMS (C:\private\100012a5).
-	
-	TInt err = aDatabase.Create(aSession, KDatabaseName, KSecureUIDFormat);
-	
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("TryOpenDatabaseL() - Created Secure DB for eapol.dat. err=%d\n"), err ));	
-		
-	if(err == KErrNone)
-	{	
-		aDatabase.Close();
-		
-	} else if (err != KErrAlreadyExists) 
-	{
-		User::LeaveIfError(err);
-	}
-	
-	User::LeaveIfError(aDatabase.Open(aSession, KDatabaseName, KSecureUIDFormat));
-	CleanupClosePushL(aDatabase);		
-		
-#else
-	// For non-secured database. The database will be created in the old location (c:\system\data).
-	
-	RFs fsSession;		
-	User::LeaveIfError(fsSession.Connect());
-	CleanupClosePushL(fsSession);
-	
-	// Create the database (if necessary)		
-	TInt err = aDatabase.Create(fsSession, KDatabaseName);
-	
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("TryOpenDatabaseL() - Created Non-Secure DB for eapol.dat. err=%d\n"), err ));	
-	
-	if(err == KErrNone)
-	{
-		aDatabase.Close();
-		
-	} else if (err != KErrAlreadyExists) 
-	{
-		User::LeaveIfError(err);
-	}
-	CleanupStack::PopAndDestroy(); // close fsSession
-	
-	User::LeaveIfError(aDatabase.Open(aSession, KDatabaseName));
-	CleanupClosePushL(aDatabase);		
-	    
-#endif // #ifdef SYMBIAN_SECURE_DBMS
-
-	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
-	TPtr sqlStatement = buf->Des();
-
-	// 2. Create the table for pre-shared keys in database (ignore error if exists)
-	
-//// NAME /////////////////////////////////////////////////// TYPE ////////////// Constant ///////
-//| ServiceType											  | UNSIGNED INTEGER | KServiceType    |//
-//| ServiceIndex										  | UNSIGNED INTEGER | KServiceIndex   |//
-//| SSID												  | VARBINARY(255)	 | KSSID		   |//	
-//| Password											  | VARBINARY(255)	 | KPassword	   |//	
-//| PSK												      | VARBINARY(255)   | KPSK			   |//	
-//////////////////////////////////////////////////////////////////////////////////////////////////	
-
-	_LIT(KSQLCreateTable2, "CREATE TABLE %S (%S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S VARBINARY(255), \
-											 %S VARBINARY(255), \
-											 %S VARBINARY(255))");
-											 
-	sqlStatement.Format(KSQLCreateTable2, &KEapolPSKTableName, 
-		&KServiceType, &KServiceIndex, &KSSID, &KPassword, &KPSK);
-		
-	err = aDatabase.Execute(sqlStatement);
-	if (err != KErrNone && err != KErrAlreadyExists)
-	{
-		User::Leave(err);
-	}
-	
-	CleanupStack::PopAndDestroy(); // buf
-	CleanupStack::Pop(2); // database, session
-	
-	// If compacting is not done the database will start growing
-	aDatabase.Compact();
-}
-
-//--------------------------------------------------
-
-void eapol_am_core_symbian_c::OpenDatabaseL(RDbNamedDatabase& aDatabase, RDbs& aSession)
-{
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("eapol_am_core_symbian_c::OpenDatabaseL()\n")));
-
-	// Create the database (if necessary)
-	TRAPD(err, TryOpenDatabaseL(aDatabase, aSession));
-	if (err != KErrNone)
-	{
-		// Because of error remove the database file.
-		RFs fsDataBaseFile;
-		User::LeaveIfError(fsDataBaseFile.Connect());
-		CleanupClosePushL(fsDataBaseFile);
-		err = fsDataBaseFile.Delete(KDatabaseName);
-		if(err != KErrNone)
-		{
-			User::Leave(KErrCorrupt);
-		}
-		CleanupStack::PopAndDestroy(); // close fsDataBaseFile
-
-		// Try open database again. This will leave if fails second time.
-		TryOpenDatabaseL(aDatabase, aSession);
-	}
-}
-
-//--------------------------------------------------
-
-eap_status_e eapol_am_core_symbian_c::random_error(
-	eap_buf_chain_wr_c * const sent_packet,
-	const bool forse_error,
-	const u32_t packet_index)
-{	
-	EAP_UNREFERENCED_PARAMETER(packet_index);
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("eapol_am_core_symbian_c::random_error()\n")));
-
-	eap_status_e status(eap_status_ok);
-	u8_t *data = sent_packet->get_data(sent_packet->get_data_length());
-
-	crypto_random_c rand(m_am_tools);
-	u32_t random_guard(0);
-	bool error_generated(false);
-	u32_t minimum_index(0);
-
-	if (m_manipulate_ethernet_header == false)
-	{
-		minimum_index = eapol_ethernet_header_wr_c::get_header_length();
-	}
-
-	for (u32_t ind = minimum_index; ind < sent_packet->get_data_length(); ind++)
-	{
-		status = rand.get_rand_bytes(
-			reinterpret_cast<u8_t *>(&random_guard),
-			sizeof(random_guard));
-		if (status != eap_status_ok)
-		{
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		// This is simple limiter to the probability of an error.
-		// probability = m_error_probability / (2^32)
-		if (random_guard < m_error_probability)
-		{
-			u8_t rnd(0);
-			u8_t previous_data(0);
-			// Create an error.
-			status = rand.get_rand_bytes(
-				&rnd,
-				sizeof(rnd));
-			if (status != eap_status_ok)
-			{
-				return EAP_STATUS_RETURN(m_am_tools, status);
-			}
-
-			previous_data = data[ind];
-			data[ind] ^= rnd;
-
-			if (previous_data != data[ind])
-			{
-				error_generated = true;
-				sent_packet->set_random_error_type(eap_random_error_type_manipulate_byte);
-
-				EAP_TRACE_DEBUG(
-					m_am_tools,
-					TRACE_FLAGS_DEFAULT,
-					(EAPL("TEST: random_error(): packet_index 0x%08x:%lu, data[0x%04x] changed from 0x%02x to 0x%02x.\n"),
-					this,
-					packet_index,
-					ind,
-					previous_data,
-					data[ind]));
-			}
-		}
-	}
-
-	if (error_generated == false
-		&& forse_error == true
-		&& sent_packet->get_data_length() > 0ul)
-	{
-		// Generate one error.
-
-		// Random error type.
-		eap_random_error_type error_type = eap_random_error_type_none_keep_this_last_case;
-		status = rand.get_rand_bytes(
-			reinterpret_cast<u8_t *>(&error_type),
-			sizeof(error_type));
-		if (status != eap_status_ok)
-		{
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		error_type = static_cast<eap_random_error_type>(
-			static_cast<u32_t>(error_type % static_cast<u32_t>(
-								   eap_random_error_type_none_keep_this_last_case)));
-
-		sent_packet->set_random_error_type(error_type);
-
-		switch(error_type)
-		{
-		case eap_random_error_type_manipulate_byte:
-			{
-				u32_t rnd_index(0);
-				u8_t previous_data(0);
-				u32_t index(0);
-
-				do
-				{
-					do
-					{
-						// Create an error index.
-						status = rand.get_rand_bytes(
-							reinterpret_cast<u8_t *>(&rnd_index),
-							sizeof(rnd_index));
-						if (status != eap_status_ok)
-						{
-							return EAP_STATUS_RETURN(m_am_tools, status);
-						}
-
-						index = (rnd_index % (sent_packet->get_data_length() - minimum_index))
-							+ minimum_index;
-					}
-					while(index < minimum_index
-						|| index > sent_packet->get_buffer_length());
-
-					u8_t rnd(0);
-					// Create an error.
-					status = rand.get_rand_bytes(
-						&rnd,
-						sizeof(rnd));
-					if (status != eap_status_ok)
-					{
-						return EAP_STATUS_RETURN(m_am_tools, status);
-					}
-
-					previous_data = data[index];
-					data[index] ^= rnd;
-				}
-				while(previous_data == data[index]);
-
-				EAP_TRACE_DEBUG(
-					m_am_tools,
-					TRACE_FLAGS_DEFAULT,
-					(EAPL("TEST: random_error(): packet_index 0x%08x:%lu, data[0x%04x] changed from 0x%02x to 0x%02x.\n"),
-					this,
-					packet_index,
-					index,
-					previous_data,
-					data[index]));
-
-				error_generated = true;
-			}
-			break;
-		case eap_random_error_type_change_packet_length_longer:
-			{
-				u8_t delta_length(0);
-				i32_t new_length(0);
-
-				do
-				{
-					status = rand.get_rand_bytes(
-						reinterpret_cast<u8_t *>(&delta_length),
-						sizeof(delta_length));
-					if (status != eap_status_ok)
-					{
-						return EAP_STATUS_RETURN(m_am_tools, status);
-					}
-
-					new_length = static_cast<i32_t>(sent_packet->get_data_length()
-													+ static_cast<i32_t>(delta_length));
-				}
-				while (new_length < static_cast<i32_t>(
-						   eapol_ethernet_header_wr_c::get_header_length())
-					|| new_length > static_cast<i32_t>(sent_packet->get_buffer_length()));
-
-				EAP_TRACE_DEBUG(
-					m_am_tools,
-					TRACE_FLAGS_DEFAULT,
-					(EAPL("TEST: random_error(): packet_index 0x%08x:%lu, packet length changed from %lu to %lu.\n"),
-					this,
-					packet_index,
-					sent_packet->get_data_length(),
-					new_length));
-
-				sent_packet->set_data_length(new_length);
-
-				error_generated = true;
-			}
-			break;
-		case eap_random_error_type_change_packet_length_shorter:
-			{
-				u8_t delta_length(0);
-				i32_t new_length(0);
-
-				do
-				{
-					status = rand.get_rand_bytes(
-						reinterpret_cast<u8_t *>(&delta_length),
-						sizeof(delta_length));
-					if (status != eap_status_ok)
-					{
-						return EAP_STATUS_RETURN(m_am_tools, status);
-					}
-
-					delta_length %= static_cast<i32_t>(
-						sent_packet->get_data_length()
-						- static_cast<i32_t>(eapol_ethernet_header_wr_c::get_header_length()));
-
-					if (delta_length == 0)
-					{
-						continue;
-					}
-
-					new_length = static_cast<i32_t>(
-						sent_packet->get_data_length() - static_cast<i32_t>(delta_length));
-				}
-				while (new_length < static_cast<i32_t>(
-						   eapol_ethernet_header_wr_c::get_header_length())
-					|| new_length > static_cast<i32_t>(sent_packet->get_buffer_length()));
-
-				EAP_TRACE_DEBUG(
-					m_am_tools,
-					TRACE_FLAGS_DEFAULT,
-					(EAPL("TEST: random_error(): packet_index 0x%08x:%lu, packet length changed from %lu to %lu.\n"),
-					this,
-					packet_index,
-					sent_packet->get_data_length(),
-					new_length));
-
-				sent_packet->set_data_length(new_length);
-
-				error_generated = true;
-			}
-			break;
-		default:
-			User::Panic(_L("EAPOL"), 1);
-			break;
-		}
-	}
-
-	if (error_generated == true)
-	{
-		sent_packet->set_is_manipulated();
-	}
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return status;
-}
-
-//--------------------------------------------------
-
-eap_status_e eapol_am_core_symbian_c::create_upper_stack()
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-	
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("eapol_am_core_symbian_c::create_upper_stack()\n")));
-
-	eap_status_e status(eap_status_ok);
-
-	if (m_ethernet_core == 0)
-	{        
-		m_ethernet_core = new ethernet_core_c(m_am_tools, this, m_is_client);
-		if (m_ethernet_core == 0
-			|| m_ethernet_core->get_is_valid() != true)
-		{
-			if (m_ethernet_core != 0)
-			{
-				m_ethernet_core->shutdown();
-				delete m_ethernet_core;
-				m_ethernet_core = 0;							
-			}			
-			EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("Stack creation failed.\n")));			
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_process_general_error);	
-		}
-
-		// Initialise upper stack
-		status = m_ethernet_core->configure();
-		
-		if (status != eap_status_ok)
-		{
-			m_ethernet_core->shutdown();
-			delete m_ethernet_core;
-			m_ethernet_core = 0;							
-
-			EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("Stack creation failed.\n")));			
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_process_general_error);	
-		}
-	}
-	else
-	{			
-		status = eap_status_already_exists;
-	}
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return status;	
-}
-
-//--------------------------------------------------
-
-eap_status_e eapol_am_core_symbian_c::add_rogue_ap(
-	eap_array_c<eap_rogue_ap_entry_c> & rogue_ap_list)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-	
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("eapol_am_core_symbian_c::add_rogue_ap()\n")));
-
-	TInt err(KErrNone);
-	eap_rogue_ap_entry_c* entry = 0;
-
-	TMacAddress mac;
-
-	TRogueType type;
-
-	for (u32_t i = 0; i < rogue_ap_list.get_object_count(); i++)
-	{
-		entry = rogue_ap_list.get_object(i);
-
-		entry->get_mac_address(mac.iMacAddress);
-
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("Adding rogue AP - type: %d\n"),
-			entry->get_rogue_reason()));
-		EAP_TRACE_DATA_DEBUG(
-			m_am_tools, 
-			TRACE_FLAGS_DEFAULT, 
-			(EAPL("Rogue MAC address"),
-			mac.iMacAddress,
-			KMacAddressLength));
-
-		switch (entry->get_rogue_reason())
-		{
-		case rogue_ap_none:
-			// Ignore this
-			continue;
-		case rogue_ap_association_failed:
-			type = EInvalidAuthenticationType;
-			break;
-		case rogue_ap_timeout:
-			type = EAuthenticationTimeout;
-			break;
-		case rogue_ap_challenge_to_client_failed:
-			type = EChallengeFromAPFailed;
-			break;
-		case rogue_ap_challenge_to_ap_failed:
-			type = EChallengeToAPFailed;
-			break;
-		default:
-			// ignore others
-			continue;
-		}
-
-		err = m_partner->AddRogueAP(mac, type);
-		if (err != KErrNone)
-		{
-			break;
-		}
-	}
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-	return EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(err));
-}
-
-//--------------------------------------------------
-
-void eapol_am_core_symbian_c::RetrievePSKL(TPSKEntry& entry)
-{
-	HBufC* sqlbuf = HBufC::NewLC(KMaxSqlQueryLength);
-	TPtr sqlStatement = sqlbuf->Des();
-
-	RDbView view;
-
-	_LIT(KSQL, "SELECT %S, %S, %S, %S, %S FROM %S WHERE %S=%d AND %S=%d");
-
-	sqlStatement.Format(KSQL, &KServiceType, &KServiceIndex, &KSSID, &KPassword, &KPSK,
-		&KEapolPSKTableName, &KServiceType, entry.indexType, &KServiceIndex, entry.index);
-		
-	User::LeaveIfError(view.Prepare(m_database, TDbQuery(sqlStatement), TDbWindow::EUnlimited));
-	CleanupClosePushL(view);
-	User::LeaveIfError(view.EvaluateAll());	
-
-	TInt rows = view.CountL();
-	
-	if (rows == 0)
-	{
-		// No saved PSK
-		User::Leave(KErrNotFound);
-	}
-	view.FirstL();
-	view.GetL();
-
-	entry.ssid.Copy(view.ColDes8(3));
-	entry.password.Copy(view.ColDes8(4));
-	entry.psk.Copy(view.ColDes8(5));
-
-	CleanupStack::PopAndDestroy(2); // view, buf
-}
-
-//--------------------------------------------------
-
-void eapol_am_core_symbian_c::SavePSKL(TPSKEntry& entry)
-{
-	// Connect to CommDBif so that we can delete PSK entries that have no IAP associated anymore.
-	CWLanSettings* wlan = new(ELeave) CWLanSettings;
-	CleanupStack::PushL(wlan);
-	
-	SWLANSettings wlanSettings;
-
-	if (wlan->Connect() != KErrNone)
-	{
-		// Could not connect to CommDB			
-		User::Leave(KErrCouldNotConnect);
-	}
-
-	HBufC* sqlbuf = HBufC::NewLC(KMaxSqlQueryLength);
-	TPtr sqlStatement = sqlbuf->Des();
-
-	RDbView view;
-
-	_LIT(KSQL, "SELECT %S, %S, %S, %S, %S FROM %S");
-	
-	sqlStatement.Format(KSQL, &KServiceType, &KServiceIndex, &KSSID, &KPassword, &KPSK,
-		&KEapolPSKTableName);
-
-	User::LeaveIfError(view.Prepare(m_database, TDbQuery(sqlStatement), TDbWindow::EUnlimited));	
-	CleanupClosePushL(view);
-	User::LeaveIfError(view.EvaluateAll());
-
-	// Get column set so we get the correct column numbers
-	CDbColSet* colSet = view.ColSetL();		
-	CleanupStack::PushL(colSet);
-
-	// Delete old row and also rows that have no associated IAP settings.
-	if (view.FirstL())
-	{		
-		do {
-			view.GetL();
-
-			if ((wlan->GetWlanSettingsForService(view.ColUint32(colSet->ColNo(KServiceIndex)), wlanSettings) != KErrNone)
-				|| (view.ColUint32(colSet->ColNo(KServiceType)) == static_cast<TUint>(entry.indexType)
-					&& view.ColUint32(colSet->ColNo(KServiceIndex)) == static_cast<TUint>(entry.index)))
-			{	
-				// Not found or current IAP
-				view.DeleteL();	
-			}
-			
-		} while (view.NextL() != EFalse);
-	}
-
-	wlan->Disconnect();
-		
-	view.InsertL();
-	
-	view.SetColL(colSet->ColNo(KServiceType), (TUint)entry.indexType);
-	view.SetColL(colSet->ColNo(KServiceIndex), (TUint)entry.index);
-	view.SetColL(colSet->ColNo(KSSID), entry.ssid);
-	view.SetColL(colSet->ColNo(KPassword), entry.password);
-	view.SetColL(colSet->ColNo(KPSK), entry.psk);	
-		
-	view.PutL();
-	
-	CleanupStack::PopAndDestroy( colSet ); // Delete colSet.	
-
-	CleanupStack::PopAndDestroy(3); // CWLanSettings, session, database
-
-}
-
-														 
-//--------------------------------------------------				
-
-
-// End of file
--- a/eapol/eapol_framework/eapol_symbian/am/core/symbian/eapol_am_core_symbian_simulator.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/core/symbian/eapol_am_core_symbian_simulator.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_symbian/am/core/symbian/eapol_am_core_symbian_wlm.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/core/symbian/eapol_am_core_symbian_wlm.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_symbian/am/core/symbian/eapol_am_wlan_authentication_symbian.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/core/symbian/eapol_am_wlan_authentication_symbian.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 59.1.4 %
+* %version: 88 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -39,26 +39,26 @@
 #include "eapol_key_types.h"
 #include "eap_timer_queue.h"
 #include "eap_crypto_api.h"
-#include "abs_eapol_wlan_database_reference_if.h"
+#include "abs_eap_database_reference_if.h"
 #include "abs_eap_state_notification.h"
 #include "eap_state_notification.h"
 #include "eap_automatic_variable.h"
 #include "eap_base_type.h"
+#include "abs_eap_am_message_if.h"
+#include "eap_am_message_if.h"
+#include "eap_core_client_message_if.h"
 
 #include "EapolDbDefaults.h"
 #include "EapolDbParameterNames.h"
 
-const TUint KMaxSqlQueryLength = 2048;
-
-#ifdef USE_EAP_EXPANDED_TYPES
-
-const TUint KExpandedEAPSize = 8;
+#include "EapConversion.h"
+#include "EapConfigToolsSymbian.h"
 
-#else
+#include <EapPluginTools.h>
 
-const TUint KMaxEapCueLength = 3;
+#include <wdbifwlansettings.h>
 
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
+const TUint KMaxSqlQueryLength = 2048;
 
 //--------------------------------------------------
 
@@ -70,6 +70,7 @@
 		TRACE_FLAGS_DEFAULT, 
 		(EAPL("eapol_am_wlan_authentication_symbian_c::~eapol_am_wlan_authentication_symbian_c(): this = 0x%08x\n"),
 		this));
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_am_wlan_authentication_symbian_c::~eapol_am_wlan_authentication_symbian_c()");
 }
 
 //--------------------------------------------------
@@ -77,10 +78,8 @@
 // 
 EAP_FUNC_EXPORT eapol_am_wlan_authentication_symbian_c::eapol_am_wlan_authentication_symbian_c(
 	abs_eap_am_tools_c * const tools,
-	const bool is_client_when_true,
-	const abs_eapol_wlan_database_reference_if_c * const wlan_database_reference)
-: CActive(CActive::EPriorityStandard)
-, m_am_partner(0)
+	const bool is_client_when_true)
+: m_am_partner(0)
 #if defined(USE_EAP_SIMPLE_CONFIG)
 , m_configuration_if(0)
 #endif // #if defined(USE_EAP_SIMPLE_CONFIG)
@@ -89,12 +88,8 @@
 , m_SSID(tools)
 , m_wpa_preshared_key(tools)
 , m_wpa_preshared_key_hash(tools)
-, m_wlan_database_reference(wlan_database_reference)
-#ifdef USE_EAP_EXPANDED_TYPES
-, m_eap_type_array(tools)
-#endif
+, m_database_reference(tools)
 , m_receive_network_id(tools)
-, m_security_mode(Wpa)
 , m_selected_eapol_key_authentication_type(eapol_key_authentication_type_none)
 , m_WPA_override_enabled(false)
 , m_is_client(is_client_when_true)
@@ -103,6 +98,13 @@
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("eapol_am_wlan_authentication_symbian_c::eapol_am_wlan_authentication_symbian_c(): this = 0x%08x\n"),
+		this));
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_am_wlan_authentication_symbian_c::eapol_am_wlan_authentication_symbian_c()");
+
 	m_is_valid = true;
 
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -114,6 +116,13 @@
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("eapol_am_wlan_authentication_symbian_c::get_is_valid(): this = 0x%08x\n"),
+		this));
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_am_wlan_authentication_symbian_c::get_is_valid()");
+
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 	return m_is_valid;
 }
@@ -126,57 +135,44 @@
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
 		(EAPL("eapol_am_wlan_authentication_symbian_c::TryOpenDatabaseL()\n")));	
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_am_wlan_authentication_symbian_c::TryInitDatabaseL()");
 		
 	// 1. Open/create a database	
 	RDbNamedDatabase db;
 
-#ifdef SYMBIAN_SECURE_DBMS
-	
 	// Create the secure shared database (if necessary) with the specified secure policy.
 	// Database will be created in the data caging path for DBMS (C:\private\100012a5).
-	
-	TInt err = db.Create(m_session, KDatabaseName, KSecureUIDFormat);
+
+	TFileName aPrivateDatabasePathName;
+
+	EapPluginTools::GetPrivatePathL(
+		m_session,
+		aPrivateDatabasePathName);
+
+	aPrivateDatabasePathName.Append(KEapolDatabaseName);
+
+	EAP_TRACE_DATA_DEBUG_SYMBIAN(("aPrivateDatabasePathName",
+		aPrivateDatabasePathName.Ptr(),
+		aPrivateDatabasePathName.Size()));
+
+	TInt error = db.Create(m_session, aPrivateDatabasePathName);
 	
 	EAP_TRACE_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
-		(EAPL("TryOpenDatabaseL() - Created Secure DB for eapol.dat. err=%d\n"), err ));	
+		(EAPL("TryOpenDatabaseL() - Created Secure DB for eapol.dat. error=%d\n"), error ));	
 		
-	if(err == KErrNone)
+	if(error == KErrNone)
 	{	
 		db.Close();
 		
-	} else if (err != KErrAlreadyExists) 
+	} else if (error != KErrAlreadyExists) 
 	{
-		User::LeaveIfError(err);
+		User::LeaveIfError(error);
 	}
 	
-	User::LeaveIfError(db.Open(m_session, KDatabaseName, KSecureUIDFormat));	
+	User::LeaveIfError(db.Open(m_session, aPrivateDatabasePathName));	
 		
-#else
-	// For non-secured database. The database will be created in the old location (c:\system\data).
-	
-	// Create the database (if necessary)		
-	TInt err = db.Create(m_fs, KDatabaseName);
-	
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("TryOpenDatabaseL() - Created Non-Secure DB for eapol.dat. err=%d\n"), err ));	
-	
-	if(err == KErrNone)
-	{
-		db.Close();
-		
-	} else if (err != KErrAlreadyExists) 
-	{
-		User::LeaveIfError(err);
-	}
-		
-	User::LeaveIfError(db.Open(m_session, KDatabaseName));
-	    
-#endif // #ifdef SYMBIAN_SECURE_DBMS		
-
 	CleanupClosePushL(db);
 
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
@@ -198,18 +194,18 @@
 											 %S VARBINARY(255))");
 	sqlStatement.Format(KSQLCreateTable2, &KEapolPSKTableName, 
 		&KServiceType, &KServiceIndex, &KSSID, &KPassword, &KPSK);
-	err = db.Execute(sqlStatement);
-	if (err != KErrNone && err != KErrAlreadyExists)
+	error = db.Execute(sqlStatement);
+	if (error != KErrNone && error != KErrAlreadyExists)
 	{
-		User::Leave(err);
+		User::Leave(error);
 	}
 	
-	CleanupStack::PopAndDestroy(); // buf
+	CleanupStack::PopAndDestroy(buf);
 	
 	// If compacting is not done the database will start growing
 	db.Compact();
 	
-	CleanupStack::PopAndDestroy(); // Close database
+	CleanupStack::PopAndDestroy(&db);
 }
 
 //--------------------------------------------------
@@ -219,15 +215,28 @@
 	EAP_TRACE_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
-		(EAPL("eapol_am_wlan_authentication_symbian_c::OpenDatabaseL()\n")));
+		(EAPL("eapol_am_wlan_authentication_symbian_c::InitDatabaseL()\n")));
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_am_wlan_authentication_symbian_c::InitDatabaseL()");
 
 	// Create the database (if necessary)
-	TRAPD(err, TryInitDatabaseL());
-	if (err != KErrNone)
+	TRAPD(error, TryInitDatabaseL());
+	if (error != KErrNone)
 	{
 		// Because of error remove the database file.
-		err = m_fs.Delete(KDatabaseName);
-		if(err != KErrNone)
+		TFileName aPrivateDatabasePathName;
+
+		EapPluginTools::GetPrivatePathL(
+			m_session,
+			aPrivateDatabasePathName);
+
+		aPrivateDatabasePathName.Append(KEapolDatabaseName);
+
+		EAP_TRACE_DATA_DEBUG_SYMBIAN(("aPrivateDatabasePathName",
+			aPrivateDatabasePathName.Ptr(),
+			aPrivateDatabasePathName.Size()));
+
+		error = m_session.Delete(aPrivateDatabasePathName);
+		if(error != KErrNone)
 		{
 			User::Leave(KErrCorrupt);
 		}		
@@ -250,8 +259,10 @@
 		 (m_is_client == true) ? "client": "server",
 		 this,
 		 dynamic_cast<abs_eap_base_timer_c *>(this)));
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_am_wlan_authentication_symbian_c::configure()");
 
 	TInt error(KErrNone);
+	eap_status_e status(eap_status_process_general_error);
 
 	// Open the database session
 	error = m_session.Connect();
@@ -262,8 +273,9 @@
 		EAP_TRACE_DEBUG(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
-			(EAPL("RDbs::Connect() failed %d.\n"),
-			status));
+			(EAPL("ERROR: RDbs::Connect() failed %d=%s.\n"),
+			status,
+			eap_status_string_c::get_status_string(status)));
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
@@ -273,8 +285,8 @@
 		TRACE_FLAGS_DEFAULT,
 		(EAPL("Database session initialized...\n")));
 
-	// Connect to FS
-	error = m_fs.Connect();
+	// Initialize database
+	TRAP(error, InitDatabaseL());
 	if (error != KErrNone)
 	{
 		eap_status_e status(m_am_tools->convert_am_error_to_eapol_error(error));
@@ -282,28 +294,9 @@
 		EAP_TRACE_DEBUG(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
-			(EAPL("RFs::Connect() failed %d.\n"),
-			status));
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("Fileserver session initialized...\n")));
-
-	// Initialize database
-	TRAPD(err, InitDatabaseL());
-	if (err != KErrNone)
-	{
-		eap_status_e status(m_am_tools->convert_am_error_to_eapol_error(error));
-
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("InitDatabaseL failed %d.\n"),
-			status));
+			(EAPL("ERROR: InitDatabaseL failed %d=%s.\n"),
+			status,
+			eap_status_string_c::get_status_string(status)));
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
@@ -315,169 +308,14 @@
 
 	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
-#if defined(USE_EAP_FILECONFIG)
+	status = EapConfigToolsSymbian::EapReadDefaultConfigFileSymbian(
+		m_am_tools,
+		&m_fileconfig);
+	if (status != eap_status_ok)
 	{
-		eap_am_file_input_symbian_c * const fileio = new eap_am_file_input_symbian_c(m_am_tools);
-
-		eap_automatic_variable_c<eap_am_file_input_symbian_c> automatic_fileio(m_am_tools, fileio);
-
-		if (fileio != 0
-			&& fileio->get_is_valid() == true)
-		{
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("Initialize file configuration.\n")));
-
-			eap_variable_data_c file_name_c_data(m_am_tools);
-
-			eap_status_e status(eap_status_process_general_error);
-
-			{
-				#if defined(EAPOL_SYMBIAN_VERSION_7_0_s)
-					eap_const_string const FILECONFIG_FILENAME_C
-						= "c:\\system\\data\\eap.conf";
-				#else
-					eap_const_string const FILECONFIG_FILENAME_C
-						= "c:\\private\\101F8EC5\\eap.conf";
-				#endif
-
-				status = file_name_c_data.set_copy_of_buffer(
-					FILECONFIG_FILENAME_C,
-					m_am_tools->strlen(FILECONFIG_FILENAME_C));
-				if (status != eap_status_ok)
-				{
-					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-					return EAP_STATUS_RETURN(m_am_tools, status);
-				}
-
-				status = file_name_c_data.add_end_null();
-				if (status != eap_status_ok)
-				{
-					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-					return EAP_STATUS_RETURN(m_am_tools, status);
-				}
-			}
-
-			eap_variable_data_c file_name_z_data(m_am_tools);
-
-			{
-				#if defined(EAPOL_SYMBIAN_VERSION_7_0_s)
-					eap_const_string const FILECONFIG_FILENAME_Z
-						= "z:\\system\\data\\eap.conf";
-				#else
-					eap_const_string const FILECONFIG_FILENAME_Z
-						= "z:\\private\\101F8EC5\\eap.conf";
-				#endif
-
-				status = file_name_z_data.set_copy_of_buffer(
-					FILECONFIG_FILENAME_Z,
-					m_am_tools->strlen(FILECONFIG_FILENAME_Z));
-				if (status != eap_status_ok)
-				{
-					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-					return EAP_STATUS_RETURN(m_am_tools, status);
-				}
-
-				status = file_name_z_data.add_end_null();
-				if (status != eap_status_ok)
-				{
-					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-					return EAP_STATUS_RETURN(m_am_tools, status);
-				}
-			}
-
-
-
-			if (status == eap_status_ok)
-			{
-				// First try open from C: disk.
-				status = fileio->file_open(
-					&file_name_c_data,
-					eap_file_io_direction_read);
-				if (status == eap_status_ok)
-				{
-					EAP_TRACE_DEBUG(
-						m_am_tools,
-						TRACE_FLAGS_DEFAULT,
-						(EAPL("Opens configure file %s\n"),
-						file_name_c_data.get_data(file_name_c_data.get_data_length())));
-				}
-				else if (status != eap_status_ok)
-				{
-					// Second try open from Z: disk.
-					status = fileio->file_open(
-						&file_name_z_data,
-						eap_file_io_direction_read);
-					if (status == eap_status_ok)
-					{
-						EAP_TRACE_DEBUG(
-							m_am_tools,
-							TRACE_FLAGS_DEFAULT,
-							(EAPL("Opens configure file %s\n"),
-							 file_name_z_data.get_data(file_name_z_data.get_data_length())));
-					}
-				}
-
-				if (status == eap_status_ok)
-				{
-					// Some of the files were opened.
-
-					m_fileconfig = new eap_file_config_c(m_am_tools);
-					if (m_fileconfig != 0
-						&& m_fileconfig->get_is_valid() == true)
-					{
-						status = m_fileconfig->configure(fileio);
-						if (status != eap_status_ok)
-						{
-							EAP_TRACE_DEBUG(
-								m_am_tools,
-								TRACE_FLAGS_DEFAULT,
-								(EAPL("ERROR: Configure read from %s failed.\n"),
-								file_name_c_data.get_data(file_name_c_data.get_data_length())));
-						}
-						else
-						{
-							EAP_TRACE_DEBUG(
-								m_am_tools,
-								TRACE_FLAGS_DEFAULT,
-								(EAPL("Configure read from %s\n"),
-								file_name_c_data.get_data(file_name_c_data.get_data_length())));
-						}
-					}
-					else
-					{
-						// No file configuration.
-						delete m_fileconfig;
-						m_fileconfig = 0;
-
-						EAP_TRACE_DEBUG(
-							m_am_tools,
-							TRACE_FLAGS_DEFAULT,
-							(EAPL("ERROR: Cannot create configure object for file %s\n"),
-							file_name_c_data.get_data(file_name_c_data.get_data_length())));
-					}
-				}
-				else
-				{
-					EAP_TRACE_DEBUG(
-						m_am_tools,
-						TRACE_FLAGS_DEFAULT,
-						(EAPL("ERROR: Cannot open configure file neither %s nor %s\n"),
-						file_name_c_data.get_data(file_name_c_data.get_data_length()),
-						file_name_z_data.get_data(file_name_z_data.get_data_length())));
-				}
-			}
-		}
-		else
-		{
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("Skips file configuration.\n")));
-		}
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
-#endif //#if defined(USE_EAP_FILECONFIG)
 
 	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
@@ -485,7 +323,7 @@
 	{
 		eap_variable_data_c trace_output_file(m_am_tools);
 
-		eap_status_e status = read_configure(
+		status = read_configure(
 			cf_str_EAP_TRACE_output_file_name.get_field(),
 			&trace_output_file);
 		if (status == eap_status_ok
@@ -509,9 +347,33 @@
 	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 	{
+		eap_variable_data_c EAP_TRACE_enable_timer_traces(m_am_tools);
+
+		status = read_configure(
+			cf_str_EAP_TRACE_enable_timer_traces.get_field(),
+			&EAP_TRACE_enable_timer_traces);
+		if (status == eap_status_ok
+			&& EAP_TRACE_enable_timer_traces.get_is_valid_data() == true)
+		{
+			u32_t *enable_timer_traces = reinterpret_cast<u32_t *>(
+				EAP_TRACE_enable_timer_traces.get_data(sizeof(u32_t)));
+			if (enable_timer_traces != 0
+				&& *enable_timer_traces != 0)
+			{
+				m_am_tools->set_trace_mask(
+					m_am_tools->get_trace_mask()
+					| TRACE_FLAGS_TIMER
+					);
+			}
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	{
 		eap_variable_data_c EAP_TRACE_enable_timer_queue_traces(m_am_tools);
 
-		eap_status_e status = read_configure(
+		status = read_configure(
 			cf_str_EAP_TRACE_enable_timer_queue_traces.get_field(),
 			&EAP_TRACE_enable_timer_queue_traces);
 		if (status == eap_status_ok
@@ -524,16 +386,18 @@
 			{
 				m_am_tools->set_trace_mask(
 					m_am_tools->get_trace_mask()
-					| eap_am_tools_c::eap_trace_mask_timer_queue
+					| TRACE_FLAGS_TIMER_QUEUE
 					);
 			}
 		}
 	}
 
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
 	{
 		eap_variable_data_c EAP_TRACE_enable_function_traces(m_am_tools);
 
-		eap_status_e status = read_configure(
+		status = read_configure(
 			cf_str_EAP_TRACE_enable_function_traces.get_field(),
 			&EAP_TRACE_enable_function_traces);
 		if (status == eap_status_ok
@@ -565,50 +429,6 @@
 
 //--------------------------------------------------
 
-eap_status_e eapol_am_wlan_authentication_symbian_c::reset_eap_plugins()
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools, 
-		TRACE_FLAGS_DEFAULT, 
-		(EAPL("eapol_am_wlan_authentication_symbian_c::reset_eap_plugins(): %s, this = 0x%08x => 0x%08x\n"),
-		 (m_is_client == true) ? "client": "server",
-		 this,
-		 dynamic_cast<abs_eap_base_timer_c *>(this)));
-
-	// Unload all loaded plugins
-	for(int ind = 0; ind < m_plugin_if_array.Count(); ind++)
-	{
-		delete m_plugin_if_array[ind];
-	}
-
-	m_plugin_if_array.Close();
-
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	m_enabled_expanded_eap_array.ResetAndDestroy();
-
-	m_disabled_expanded_eap_array.ResetAndDestroy();
-	
-	m_eap_type_array.reset();
-	
-#else
-
-	// Delete the IAP EAP type info array
-	m_iap_eap_array.ResetAndDestroy();
-	
-	m_eap_type_array.Close();	
-	
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
-}
-
-
-//--------------------------------------------------
-
 EAP_FUNC_EXPORT eap_status_e eapol_am_wlan_authentication_symbian_c::shutdown()
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -620,15 +440,13 @@
 		 (m_is_client == true) ? "client": "server",
 		 this,
 		 dynamic_cast<abs_eap_base_timer_c *>(this)));
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_am_wlan_authentication_symbian_c::shutdown()");
 
 	m_session.Close();
-	m_fs.Close();
 
 	delete m_fileconfig;
 	m_fileconfig = 0;
 
-	(void) reset_eap_plugins();
-
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
 }
@@ -650,6 +468,7 @@
 		(EAPL("eapol_am_wlan_authentication_simulator_c::set_am_partner(): %s, this = 0x%08x\n"),
 		 (m_is_client == true) ? "client": "server",
 		 this));
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_am_wlan_authentication_symbian_c::set_am_partner()");
 
 	m_am_partner = am_partner;
 
@@ -663,24 +482,25 @@
 
 //--------------------------------------------------
 
-EAP_FUNC_EXPORT eap_status_e eapol_am_wlan_authentication_symbian_c::reset_eap_configuration()
+EAP_FUNC_EXPORT eap_status_e eapol_am_wlan_authentication_symbian_c::reset_wpa_configuration()
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
 	EAP_TRACE_DEBUG(
 		m_am_tools, 
 		TRACE_FLAGS_DEFAULT, 
-		(EAPL("eapol_am_wlan_authentication_symbian_c::reset_eap_configuration(): %s, this = 0x%08x\n"),
+		(EAPL("eapol_am_wlan_authentication_symbian_c::reset_wpa_configuration(): %s, this = 0x%08x\n"),
 		 (m_is_client == true) ? "client": "server",
 		 this));
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_am_wlan_authentication_symbian_c::reset_wpa_configuration()");
 
-	TRAPD(error, ReadEAPSettingsL());
+	TRAPD(error, ReadWPASettingsL());
 	if (error != KErrNone)
 	{
 		EAP_TRACE_ERROR(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
-			(EAPL("EAP settings reading from CommDb failed or cancelled(err %d).\n"), error));
+			(EAPL("EAP settings reading from CommDb failed or cancelled(error %d).\n"), error));
 
 		eap_status_e status(m_am_tools->convert_am_error_to_eapol_error(error));
 
@@ -700,6 +520,7 @@
 		TRACE_FLAGS_DEFAULT, 
 		(EAPL("eapol_am_wlan_authentication_symbian_c::send_error_notification, error=%d\n"),
 		error));	
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_am_wlan_authentication_symbian_c::send_error_notification()");
 
 	eap_general_state_variable_e general_state_variable(eap_general_state_authentication_error);
 	
@@ -748,6 +569,7 @@
 		 (m_is_client == true) ? "client": "server",
 		 this,
 		 dynamic_cast<abs_eap_base_timer_c *>(this)));
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_am_wlan_authentication_symbian_c::set_wlan_parameters()");
 
 	m_WPA_override_enabled = WPA_override_enabled;
 
@@ -780,6 +602,13 @@
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("eapol_am_wlan_authentication_symbian_c::state_notification(): this = 0x%08x\n"),
+		this));
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_am_wlan_authentication_symbian_c::state_notification()");
+
 	EAP_UNREFERENCED_PARAMETER(state);
 
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -799,6 +628,7 @@
 		 (m_is_client == true) ? "client": "server",
 		 this,
 		 dynamic_cast<abs_eap_base_timer_c *>(this)));
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_am_wlan_authentication_symbian_c::association()");
 
 	eap_status_e status = m_receive_network_id.set_copy_of_network_id(receive_network_id);
 
@@ -822,6 +652,7 @@
 		 (m_is_client == true) ? "client": "server",
 		 this,
 		 dynamic_cast<abs_eap_base_timer_c *>(this)));
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_am_wlan_authentication_symbian_c::disassociation()");
 
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
@@ -829,181 +660,6 @@
 
 //--------------------------------------------------
 
-#ifdef USE_EAP_EXPANDED_TYPES
-
-EAP_FUNC_EXPORT eap_status_e eapol_am_wlan_authentication_symbian_c::get_selected_eap_types(
-	eap_array_c<eap_type_selection_c> * const selected_eap_types)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools, 
-		TRACE_FLAGS_DEFAULT, 
-		(EAPL("eapol_am_wlan_authentication_symbian_c::get_selected_eap_types(): %s, this = 0x%08x => 0x%08x\n"),
-		 (m_is_client == true) ? "client": "server",
-		 this,
-		 dynamic_cast<abs_eap_base_timer_c *>(this)));
-
-	eap_status_e status = selected_eap_types->reset();
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	eap_header_string_c eap_string;
-	EAP_UNREFERENCED_PARAMETER(eap_string);
-
-	// We need to return only the EAP types available as enabled types.
-	// It means only the ones available in m_enabled_expanded_eap_array.
-	
-	for (TInt i = 0; i < m_enabled_expanded_eap_array.Count(); i++)
-	{	
-		TBuf8<KExpandedEAPSize> tmpExpEAP(m_enabled_expanded_eap_array[i]->EapExpandedType);
-
-		EAP_TRACE_DEBUG(
-			m_am_tools, 
-			TRACE_FLAGS_DEFAULT, 
-			(EAPL("eapol_am_wlan_authentication_symbian_c::get_selected_eap_types:Enabled expanded EAP type at index=%d\n"),
-			 i));
-
-		EAP_TRACE_DATA_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("Enabled expanded EAP type"),
-			tmpExpEAP.Ptr(),
-			tmpExpEAP.Size()));
-
-		// This is for one expanded EAP type (for the above one).
-		eap_expanded_type_c expandedEAPType;
-				
-		// Read the expanded EAP type details from an item in m_enabled_expanded_eap_array.
-		status = eap_expanded_type_c::read_type(m_am_tools,
-												0,
-												tmpExpEAP.Ptr(),
-												tmpExpEAP.Size(),
-												&expandedEAPType);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		// Add EAP-type to list.
-		eap_type_selection_c * selection = new eap_type_selection_c(
-			m_am_tools,
-			expandedEAPType,
-			true);
-		if (selection != 0)
-		{
-			status = selected_eap_types->add_object(selection, true);
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);
-			}
-			
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("get_selected_eap_types(): added EAP-type=0x%08x=%s\n"),
-				expandedEAPType.get_vendor_type(),
-				eap_string.get_eap_type_string(expandedEAPType)));			
-		}
-		else
-		{
-			// On error we ignore this EAP-type.
-			EAP_TRACE_DEBUG(
-				m_am_tools, 
-				TRACE_FLAGS_DEFAULT, 
-				(EAPL("Some problem with EAP type at index %d in m_enabled_expanded_eap_array\n"),
-				 i));
-		}
-	}
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
-}
-
-//--------------------------------------------------
-
-#else // for non-expanded (normal EAP types)
-
-//--------------------------------------------------
-
-EAP_FUNC_EXPORT eap_status_e eapol_am_wlan_authentication_symbian_c::get_selected_eap_types(
-	eap_array_c<eap_type_selection_c> * const selected_eap_types)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools, 
-		TRACE_FLAGS_DEFAULT, 
-		(EAPL("eapol_am_wlan_authentication_symbian_c::get_selected_eap_types(): %s, this = 0x%08x => 0x%08x\n"),
-		 (m_is_client == true) ? "client": "server",
-		 this,
-		 dynamic_cast<abs_eap_base_timer_c *>(this)));
-
-	eap_status_e status = selected_eap_types->reset();
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	eap_header_string_c eap_string;
-	EAP_UNREFERENCED_PARAMETER(eap_string);
-
-	TEap *eapType = 0; 
-
-	for (TInt i = 0; i < m_iap_eap_array.Count(); i++)
-	{
-		// Check if type is enabled
-		eapType = m_iap_eap_array[i];
-		if (eapType->Enabled == 1)
-		{	
-			TLex8 tmp(eapType->UID);
-			TInt val(0);
-			tmp.Val(val);
-
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("get_selected_eap_types(): adds EAP-type=0x%08x=%s\n"),
-				static_cast<eap_type_ietf_values_e>(val),
-				eap_string.get_eap_type_string(
-					static_cast<eap_type_value_e>(
-						static_cast<eap_type_ietf_values_e>(val)))));
-
-			// Add EAP-type to list.
-			eap_type_selection_c * selection = new eap_type_selection_c(
-				m_am_tools,
-				static_cast<eap_type_value_e>(static_cast<eap_type_ietf_values_e>(val)),
-				true);
-			if (selection != 0)
-			{
-				status = selected_eap_types->add_object(selection, true);
-				if (status != eap_status_ok)
-				{
-					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-					return EAP_STATUS_RETURN(m_am_tools, status);
-				}
-			}
-			else
-			{
-				// On error we ignore this EAP-type.
-			}
-		}
-	}
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
-}
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
-//--------------------------------------------------
-
 EAP_FUNC_EXPORT eap_status_e eapol_am_wlan_authentication_symbian_c::get_wlan_configuration(
 	eap_variable_data_c * const wpa_preshared_key_hash)
 {
@@ -1016,6 +672,7 @@
 		 (m_is_client == true) ? "client": "server",
 		 this,
 		 dynamic_cast<abs_eap_base_timer_c *>(this)));
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_am_wlan_authentication_symbian_c::get_wlan_configuration()");
 
 	eap_status_e status = wpa_preshared_key_hash->set_copy_of_buffer(&m_wpa_preshared_key_hash);
 
@@ -1039,46 +696,13 @@
 		 (m_is_client == true) ? "client": "server",
 		 this,
 		 dynamic_cast<abs_eap_base_timer_c *>(this)));
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_am_wlan_authentication_symbian_c::authentication_finished()");
 
 	if (when_true_successfull == true)
 	{
 		if (authentication_type != eapol_key_authentication_type_RSNA_PSK
 			&& authentication_type != eapol_key_authentication_type_WPA_PSK)
 		{
-
-#ifdef USE_EAP_EXPANDED_TYPES
-
-			// This moves the successful type to be the top priority type in IAP settings.
-			TRAPD(err, SetToTopPriorityL(eap_type));
-			if (err != KErrNone)
-			{
-				// Just log the error. 
-				EAP_TRACE_DEBUG(
-					m_am_tools,
-					TRACE_FLAGS_DEFAULT, 
-					(EAPL("state_notification: SetToTopPriorityL() Expanded EAP type - leave with error=%d!\n"),
-					err));
-			}
-
-#else // For normal EAP types
-					
-			TEap eap;
-			eap.Enabled = ETrue;
-			eap.UID.Num(static_cast<TInt>(convert_eap_type_to_u32_t(eap_type)));
-			
-			// This moves the successful type to be the top priority type in IAP settings.
-			TRAPD(err, SetToTopPriorityL(&eap));
-			if (err != KErrNone)
-			{
-				// Just log the error. 
-				EAP_TRACE_DEBUG(
-					m_am_tools,
-					TRACE_FLAGS_DEFAULT, 
-					(EAPL("state_notification: SetToTopPriorityL leaved!\n")));
-			}
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
 			// Move the active eap type index to the first type
 			m_am_partner->set_current_eap_index(0ul);
 		}
@@ -1103,19 +727,11 @@
 		 (m_is_client == true) ? "client": "server",
 		 this,
 		 dynamic_cast<abs_eap_base_timer_c *>(this)));
-
-	eap_variable_data_c database_reference(m_am_tools);
-
-	eap_status_e status = m_wlan_database_reference->get_wlan_database_reference_values(&database_reference);
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_am_wlan_authentication_symbian_c::read_database_reference_values()");
 
 	const eapol_wlan_database_reference_values_s * const database_reference_values
 		= reinterpret_cast<eapol_wlan_database_reference_values_s *>(
-		database_reference.get_data(sizeof(eapol_wlan_database_reference_values_s)));
+		m_database_reference.get_data(sizeof(eapol_wlan_database_reference_values_s)));
 	if (database_reference_values == 0)
 	{
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -1138,351 +754,6 @@
 
 //--------------------------------------------------
 
-EAP_FUNC_EXPORT eap_status_e eapol_am_wlan_authentication_symbian_c::load_module(
-	const eap_type_value_e type,
-	const eap_type_value_e tunneling_type,
-	abs_eap_base_type_c * const partner,
-	eap_base_type_c ** const eap_type_if,
-	const bool is_client_when_true,
-	const eap_am_network_id_c * const receive_network_id ///< source includes remote address, destination includes local address.
-	)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("eapol_am_wlan_authentication_symbian_c::load_module(type %d=%s, tunneling_type %d=%s)\n"),
-		convert_eap_type_to_u32_t(type),
-		eap_header_string_c::get_eap_type_string(type),
-		convert_eap_type_to_u32_t(tunneling_type),
-		eap_header_string_c::get_eap_type_string(tunneling_type)));
-
-	eap_status_e status(eap_status_process_general_error);
-	
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	CEapType* eapType = 0;
-	TInt error(KErrNone);
-
-	// Check if this EAP type has already been loaded
-	TInt eapArrayIndex = find<eap_type_value_e>(
-		&m_eap_type_array,
-		&type,
-		m_am_tools);
-
-	if (eapArrayIndex >= 0)
-	{
-		// We found the entry in the array.
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("eapol_am_wlan_authentication_symbian_c::load_module(type %d=%s, tunneling_type %d=%s) already loaded.\n"),
-			convert_eap_type_to_u32_t(type),
-			eap_header_string_c::get_eap_type_string(type),
-			convert_eap_type_to_u32_t(tunneling_type),
-			eap_header_string_c::get_eap_type_string(tunneling_type)));
-
-		// Yep. It was loaded already.
-		eapType = m_plugin_if_array[eapArrayIndex];		
-	}
-	else 
-	{
-		TIndexType index_type(ELan);
-		TUint index(0UL);
-
-		status = read_database_reference_values(
-			&index_type,
-			&index);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("eapol_am_wlan_authentication_symbian_c::load_module(type %d=%s, tunneling_type %d=%s) load new, index type=%d, index=%d.\n"),
-			convert_eap_type_to_u32_t(type),
-			eap_header_string_c::get_eap_type_string(type),
-			convert_eap_type_to_u32_t(tunneling_type),
-			eap_header_string_c::get_eap_type_string(tunneling_type),
-			index_type,
-			index));
-
-		TBuf8<KExpandedEAPSize> ExpandedCue;
-		
-		// Some indirect way of forming the 8 byte string of an EAP type for the cue is needed here.		
-		TUint8 tmpExpCue[KExpandedEAPSize];
-
-		// This is to make the tmpExpCue in 8 byte string with correct vendor type and vendor id details.
-		status = eap_expanded_type_c::write_type(m_am_tools,
-												0, // index should be zero here.
-												tmpExpCue,
-												KExpandedEAPSize,
-												true,
-												type);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("load_module: eap_expanded_type_c::write_type failed \n")));
-		
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-		
-		// Now copy the 8 byte string to the real expanded cue.
-		ExpandedCue.Copy(tmpExpCue, KExpandedEAPSize);
-
-		EAP_TRACE_DATA_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("EAPOL:eapol_am_wlan_authentication_symbian_c::load_module: Expanded CUE:"),
-			ExpandedCue.Ptr(),
-			ExpandedCue.Size()));
-
-
-		// We must have a trap here since the EAPOL core knows nothing about Symbian.
-		TRAP(error, (eapType = CEapType::NewL(
-			ExpandedCue,
-			index_type,
-			index)));	
-		if (error != KErrNone
-			|| eapType == 0)
-		{
-			// Interface not found or implementation creation function failed
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("ECom could not find/initiate implementation.\n")));
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-	}
-
-#else // For normal EAP types
-	
-	TBuf8<KMaxEapCueLength> cue;
-	cue.Num(static_cast<TInt>(convert_eap_type_to_u32_t(type)));
-	CEapType* eapType = 0;
-	TInt error(KErrNone);
-
-	// Check if this EAP type has already been loaded
-	TInt eapArrayIndex = m_eap_type_array.Find(type);
-	if (eapArrayIndex != KErrNotFound)
-	{
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("eapol_am_wlan_authentication_symbian_c::load_module(type %d=%s, tunneling_type %d=%s) already loaded.\n"),
-			convert_eap_type_to_u32_t(type),
-			eap_header_string_c::get_eap_type_string(type),
-			convert_eap_type_to_u32_t(tunneling_type),
-			eap_header_string_c::get_eap_type_string(tunneling_type)));
-
-		// Yep. It was loaded already.
-		eapType = m_plugin_if_array[eapArrayIndex];		
-	}
-	else 
-	{
-		TIndexType index_type(ELan);
-		TUint index(0UL);
-
-		status = read_database_reference_values(
-			&index_type,
-			&index);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("eapol_am_wlan_authentication_symbian_c::load_module(type %d=%s, tunneling_type %d=%s) load new, index type=%d, index=%d.\n"),
-			convert_eap_type_to_u32_t(type),
-			eap_header_string_c::get_eap_type_string(type),
-			convert_eap_type_to_u32_t(tunneling_type),
-			eap_header_string_c::get_eap_type_string(tunneling_type),
-			index_type,
-			index));
-
-		// We must have a trap here since the EAPOL core knows nothing about Symbian.
-		TRAP(error, (eapType = CEapType::NewL(
-			cue,
-			index_type,
-			index)));	
-		if (error != KErrNone
-			|| eapType == 0)
-		{
-			// Interface not found or implementation creation function failed
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("ECom could not find/initiate implementation.\n")));
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-		}
-	}
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
-	// Set the tunneling type
-	eapType->SetTunnelingType(convert_eap_type_to_u32_t(tunneling_type));
-
-	// Create the EAP protocol interface implementation.
-	
-#ifdef USE_EAP_SIMPLE_CONFIG
-
-	TRAP(error, (*eap_type_if = eapType->GetStackInterfaceL(m_am_tools, 
-		partner, 
-		is_client_when_true, 
-		receive_network_id,
-		this)));
-
-#else
-
-	TRAP(error, (*eap_type_if = eapType->GetStackInterfaceL(m_am_tools, 
-		partner, 
-		is_client_when_true, 
-		receive_network_id)));
-
-#endif // #ifdef USE_EAP_SIMPLE_CONFIG
-	
-		
-	if (error != KErrNone 
-		|| *eap_type_if == 0 
-		|| (*eap_type_if)->get_is_valid() == false)
-	{
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("Could not create EAP type interface instance. Error: %d\n"), error));
-
-		status = eap_status_allocation_error;
-		// Unload DLL (two ways, depending whether this type was already loaded...)
-		if  (eapArrayIndex == KErrNotFound)
-		{
-			// No need to call shutdown here because GetStackInterfaceL has done it.
-			delete eapType;
-		}
-		else
-		{
-			unload_module(type);
-		}
-		// Note: even in error cases eap_core_c deletes eap_type_if
-	}
-	else
-	{
-		status = eap_status_ok;
-		if (eapArrayIndex  == KErrNotFound)
-		{
-			// Add plugin information to the member arrays. There is no need to store eap_type pointer because
-			// the stack takes care of its deletion.
-			if (m_plugin_if_array.Append(eapType) != KErrNone)
-			{
-				delete eapType;
-				status = eap_status_allocation_error;
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);				
-			}
-			
-#ifdef USE_EAP_EXPANDED_TYPES
-
-			eap_type_value_e * tmpEAPType = new eap_type_value_e();
-			if(tmpEAPType == NULL)
-			{
-				EAP_TRACE_DEBUG(
-					m_am_tools,
-					TRACE_FLAGS_DEFAULT,
-					(EAPL("eapol_am_wlan_authentication_symbian_c::load_module() eap_type_value_e creation failed\n")));
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);				
-			}
-			
-			*tmpEAPType = type;
-			
-			status = m_eap_type_array.add_object(tmpEAPType, true);
-			
-			if (status != eap_status_ok)			
-
-#else // For normal EAP type.			
-			
-			if (m_eap_type_array.Append(type) != KErrNone)
-
-#endif // #ifdef USE_EAP_EXPANDED_TYPES			
-			{
-				// Remove the eap type added just previously
-				m_plugin_if_array.Remove(m_plugin_if_array.Count() - 1);
-				delete eapType;
-				status = eap_status_allocation_error;
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);				
-			}
-		} 
-	}
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, status);
-}
-
-//--------------------------------------------------
-
-EAP_FUNC_EXPORT eap_status_e eapol_am_wlan_authentication_symbian_c::unload_module(
-	const eap_type_value_e type)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools, 
-		TRACE_FLAGS_DEFAULT, 
-		(EAPL("eapol_am_wlan_authentication_symbian_c::unload_module(): %s, this = 0x%08x => 0x%08x\n"),
-		 (m_is_client == true) ? "client": "server",
-		 this,
-		 dynamic_cast<abs_eap_base_timer_c *>(this)));
-
-	eap_status_e status(eap_status_type_does_not_exists_error);
-
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	// Check if this EAP type has already been loaded
-	TInt index = find<eap_type_value_e>(
-		&m_eap_type_array,
-		&type,
-		m_am_tools);
-		
-	if (index >= 0)
-	{
-		// EAP was loaded before.
-		
-		delete m_plugin_if_array[index];
-		m_plugin_if_array.Remove(index);
-		
-		status = m_eap_type_array.remove_object(index);
-	}
-
-#else // For normal EAP types.
-
-	TInt index = m_eap_type_array.Find(type);
-	if (index != KErrNotFound)
-	{
-		delete m_plugin_if_array[index];
-		m_plugin_if_array.Remove(index);
-		m_eap_type_array.Remove(index);
-		status = eap_status_ok;			
-	}
-
-#endif // #ifdef USE_EAP_EXPANDED_TYPES
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, status);
-}
-
-//--------------------------------------------------
-
 EAP_FUNC_EXPORT eap_status_e eapol_am_wlan_authentication_symbian_c::read_configure(
 	const eap_configuration_field_c * const field,
 	eap_variable_data_c * const data)
@@ -1497,7 +768,8 @@
 		 (m_is_client == true) ? "client": "server",
 		 this,
 		 dynamic_cast<abs_eap_base_timer_c *>(this)));
-	
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, TRACE_FLAGS_DEFAULT, "returns: eapol_am_wlan_authentication_symbian_c::read_configure()");
+
 	// Trap must be set here because the OS independent portion of EAPOL
 	// that calls this function does not know anything about Symbian.	
 	eap_status_e status(eap_status_ok);
@@ -1515,7 +787,7 @@
 	if (status != eap_status_ok)
 	{
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return status;
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 	
 	status = type_field.set_buffer(
@@ -1526,220 +798,55 @@
 	if (status != eap_status_ok)
 	{
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return status;
+		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
-	eap_type_value_e aSelectedEapType;
-	
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	if (!wanted_field.compare(&type_field))
-	{
-		TInt ind; 
-
-		// First check do we have read configuration from databases.
-		if (m_enabled_expanded_eap_array.Count() == 0)
-		{
-			EAP_TRACE_ERROR(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("EAP settings not read from CommsDat\n")));
-
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_process_general_error);
-		}
-
-		// Now we need to return here the next EAP type we should try		
-		for (ind = m_am_partner->get_current_eap_index(); ind < m_enabled_expanded_eap_array.Count(); ind++)
-		{
-			// Find the highest priority EAP with index "ind".
-			
-			TBuf8<KExpandedEAPSize> tmpExpEAP(m_enabled_expanded_eap_array[ind]->EapExpandedType);
-			
-			status = data->set_copy_of_buffer(tmpExpEAP.Ptr(), tmpExpEAP.Size());			
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);			
-			}
-
-			EAP_TRACE_DATA_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("EAPOL:eapol_am_wlan_authentication_symbian_c::read_configure: Trying EAP type:"),
-				tmpExpEAP.Ptr(),
-				tmpExpEAP.Size()));
-			status = eap_expanded_type_c::read_type(m_am_tools,
-					0,
-					tmpExpEAP.Ptr(),
-					tmpExpEAP.Size(),
-					&aSelectedEapType);
-			if (status == eap_status_ok)
-			{
-				break;
-			}
-		}
-
-		// Set the index of new EAP type we are trying now.
-		m_am_partner->set_current_eap_index(ind);
-		
-		if (ind >= m_enabled_expanded_eap_array.Count())
-		{
-			// Not found any other EAP type as enabled.
-			// Send WLM notification because there is no way that the authentication
-			// can be successful if we don't have any EAP types to use...
-			if (m_is_client)
-			{
-				EAP_TRACE_ERROR(
-					m_am_tools,
-					TRACE_FLAGS_DEFAULT,
-					(EAPL("ERROR: read_configure: No configured EAP types or all tried unsuccessfully.\n")));
-			}
-
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_configure_field);
-		}
-	
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);		
-	}
-
-#else // For normal non-expanded EAP
-
-	if (!wanted_field.compare(&type_field))
-	{
-		TInt ind; 
-
-		// First check do we have read configuration from databases.
-		if (m_iap_eap_array.Count() == 0)
-		{
-			EAP_TRACE_ERROR(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("EAP settings not read from CommDb\n")));
-
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_process_general_error);
-		}
-
-		// We need to return here the next EAP type we should try		
-		for (ind = m_am_partner->get_current_eap_index(); ind < m_iap_eap_array.Count(); ind++)
-		{
-			// Find the first enabled EAP type (highest priority)
-			TEap *eapType = m_iap_eap_array[ind];			
-			if (eapType->Enabled == 1)
-			{
-				// Convert the string to integer
-				TLex8 tmp(eapType->UID);
-				TInt val(0);
-				tmp.Val(val);
-				status = data->set_copy_of_buffer(reinterpret_cast<u8_t *>(&val), sizeof(TUint));
-				if (status != eap_status_ok)
-				{
-					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-					return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);			
-				}
-
-				EAP_TRACE_DEBUG(
-					m_am_tools,
-					TRACE_FLAGS_DEFAULT,
-					(EAPL("EAPOL: Trying EAP type: %d.\n"), val));
-				aSelectedEapType = val;
-				break;
-			}
-		}
-
-		m_am_partner->set_current_eap_index(ind);
-		if (ind >= m_iap_eap_array.Count())
-		{
-			// Not found
-			// Send WLM notification because there is no way that the authentication
-			// can be successful if we don't have any EAP types to use...
-			if (m_is_client)
-			{
-				EAP_TRACE_ERROR(
-					m_am_tools,
-					TRACE_FLAGS_DEFAULT,
-					(EAPL("ERROR: No configured EAP types or all tried unsuccessfully.\n")));
-			}
-
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_configure_field);
-		}
-	
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);		
-	}
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
 	// It was something else than EAP type. Read it from eapol DB.
 	_LIT( KEapolTableName, "eapol" );
-	TRAPD( err, read_configureL(
-		KDatabaseName,
+
+	TFileName aPrivateDatabasePathName;
+
+	TRAPD(err, EapPluginTools::GetPrivatePathL(
+		m_session,
+		aPrivateDatabasePathName));
+		
+	if (err)
+		{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(err));
+		}
+
+	aPrivateDatabasePathName.Append(KEapolDatabaseName);
+
+	EAP_TRACE_DATA_DEBUG_SYMBIAN(("aPrivateDatabasePathName",
+		aPrivateDatabasePathName.Ptr(),
+		aPrivateDatabasePathName.Size()));
+
+	TRAPD( error, read_configureL(
+		aPrivateDatabasePathName,
 		KEapolTableName,
 		field->get_field(),
 		field->get_field_length(),
 		data) );
+
 	// Try to read it for eap fast DB	
-	HBufC8* fieldBuf = HBufC8::NewLC( field->get_field_length() );
+	HBufC8* fieldBuf = HBufC8::New( field->get_field_length() );
+
+	eap_automatic_variable_c<HBufC8> automatic_fieldBuf(
+		m_am_tools,
+		fieldBuf);
+
+	if (fieldBuf == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
 	TPtr8 fieldPtr = fieldBuf->Des();
 	fieldPtr.Copy( reinterpret_cast<const TUint8 *> ( field->get_field() ));
 
-	_LIT8(cf_str_EAP_TLS_PEAP_use_identity_privacy_literal, "EAP_TLS_PEAP_use_identity_privacy");
-	
-	if ( err != KErrNone &&
-		 fieldPtr.Compare( cf_str_EAP_TLS_PEAP_use_identity_privacy_literal() ) == 0 ) 
-		{
-		if (aSelectedEapType == eap_type_tls)
-			{
-			_LIT(KGeneralSettingsDBTableName, "KTlsDatabaseTableName");
-			TRAP( err, read_configureL(
-					KDatabaseName,
-					KGeneralSettingsDBTableName,
-					field->get_field(),
-					field->get_field_length(),
-					data) );		
-
-			}
-		if (aSelectedEapType == eap_type_peap)
-			{
-			_LIT(KGeneralSettingsDBTableName, "KPeapDatabaseTableName"); 
-			TRAP( err, read_configureL(
-					KDatabaseName,
-					KGeneralSettingsDBTableName,
-					field->get_field(),
-					field->get_field_length(),
-					data) );		
-			}
-		if (aSelectedEapType == eap_type_ttls)
-			{
-			_LIT(KGeneralSettingsDBTableName, "KTtlsDatabaseTableName"); 
-			TRAP( err, read_configureL(
-					KDatabaseName,
-					KGeneralSettingsDBTableName,
-					field->get_field(),
-					field->get_field_length(),
-					data) );		
-			}
-#if defined (USE_FAST_EAP_TYPE)
-		if ( aSelectedEapType == eap_type_fast)
-			{
-			_LIT(KFastGeneralSettingsDBTableName, "eapfast_general_settings"); 
-			TRAP( err, read_configureL(
-			KFastDatabaseName,
-			KFastGeneralSettingsDBTableName,
-			field->get_field(),
-			field->get_field_length(),
-			data) );		
-			}
-#endif
-		}
-	CleanupStack::PopAndDestroy( fieldBuf );
-
-	if (err != KErrNone) 
+	if (error != KErrNone) 
 	{
-		status = m_am_tools->convert_am_error_to_eapol_error(err);
+		status = m_am_tools->convert_am_error_to_eapol_error(error);
 
 #if defined(USE_EAP_FILECONFIG)
 		if (m_fileconfig != 0
@@ -1752,6 +859,7 @@
 		}
 #endif //#if defined(USE_EAP_FILECONFIG)
 	}
+
 	m_am_tools->trace_configuration(
 		status,
 		field,
@@ -1771,15 +879,27 @@
 	eap_variable_data_c * const data)
 {	
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-	
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("eapol_am_wlan_authentication_symbian_c::read_configureL(): %s, this = 0x%08x => 0x%08x\n"),
+		 (m_is_client == true) ? "client": "server",
+		 this,
+		 dynamic_cast<abs_eap_base_timer_c *>(this)));
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, TRACE_FLAGS_DEFAULT, "returns: eapol_am_wlan_authentication_symbian_c::read_configureL()");
+
 	// Open database
 	RDbNamedDatabase db;
 
-#ifdef SYMBIAN_SECURE_DBMS
-	User::LeaveIfError(db.Open(m_session, aDbName, KSecureUIDFormat));	
-#else			
-	User::LeaveIfError(db.Open(m_session, aDbName));
-#endif // #ifdef SYMBIAN_SECURE_DBMS		
+	TInt error = db.Open(m_session, aDbName);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("eapol_am_wlan_authentication_symbian_c::read_configureL(): db.Open(), error = %d\n"),
+		 error));
+
+	User::LeaveIfError(error);
 	
 	CleanupClosePushL(db);
 
@@ -1822,7 +942,8 @@
 					status = data->set_copy_of_buffer(asciiString.Ptr(), asciiString.Size());
 					if (status != eap_status_ok)
 					{
-						User::Leave(KErrNoMemory);
+						User::Leave(m_am_tools->convert_eapol_error_to_am_error(
+							EAP_STATUS_RETURN(m_am_tools, status)));
 					}
 				} 
 				else 
@@ -1839,7 +960,8 @@
 				status = data->set_copy_of_buffer((const unsigned char *) &value, sizeof(value));
 				if (status != eap_status_ok)
 				{
-					User::Leave(KErrNoMemory);
+					User::Leave(m_am_tools->convert_eapol_error_to_am_error(
+						EAP_STATUS_RETURN(m_am_tools, status)));
 				}
 			}
 			break;
@@ -1847,7 +969,7 @@
 			EAP_TRACE_DEBUG(
 				m_am_tools,
 				TRACE_FLAGS_DEFAULT,
-				(EAPL("read_configureL: Unexpected column type.\n")));
+				(EAPL("ERROR: read_configureL: Unexpected column type.\n")));
 			User::Panic(_L("EAPOL"), 1);			
 		}
 	} 
@@ -1857,12 +979,17 @@
 		EAP_TRACE_DEBUG(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
-			(EAPL("read_configureL: Could not find configuration parameter.\n")));
-		User::Leave(KErrNotFound);
+			(EAPL("ERROR: read_configureL: Could not find configuration parameter.\n")));
+		User::Leave(m_am_tools->convert_eapol_error_to_am_error(
+							EAP_STATUS_RETURN(m_am_tools, eap_status_not_found)));
 	}		
 	
 	// Close database
-	CleanupStack::PopAndDestroy(5); // view, 3 buffers and database
+	CleanupStack::PopAndDestroy(&view);
+	CleanupStack::PopAndDestroy(buf);
+	CleanupStack::PopAndDestroy(unicodebuf);
+	CleanupStack::PopAndDestroy(asciibuf);
+	CleanupStack::PopAndDestroy(&db);
 
 
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -1892,6 +1019,13 @@
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("eapol_am_wlan_authentication_symbian_c::set_timer(): this = 0x%08x\n"),
+		this));
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_am_wlan_authentication_symbian_c::set_timer()");
+
 	const eap_status_e status = m_am_tools->am_set_timer(
 		p_initializer, 
 		p_id, 
@@ -1910,6 +1044,13 @@
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("eapol_am_wlan_authentication_symbian_c::cancel_timer(): this = 0x%08x\n"),
+		this));
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_am_wlan_authentication_symbian_c::cancel_timer()");
+
 	const eap_status_e status = m_am_tools->am_cancel_timer(
 		p_initializer, 
 		p_id);
@@ -1924,6 +1065,13 @@
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("eapol_am_wlan_authentication_symbian_c::cancel_all_timers(): this = 0x%08x\n"),
+		this));
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_am_wlan_authentication_symbian_c::cancel_all_timers()");
+
 	const eap_status_e status = m_am_tools->am_cancel_all_timers();
 
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -1932,315 +1080,39 @@
 
 //--------------------------------------------------
 
-EAP_FUNC_EXPORT eap_status_e eapol_am_wlan_authentication_symbian_c::check_is_valid_eap_type(const eap_type_value_e eap_type)
+void eapol_am_wlan_authentication_symbian_c::RetrievePSKL(TPSKEntry& entry)
 {
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	eap_header_string_c eap_string;
-	EAP_UNREFERENCED_PARAMETER(eap_string);
-
 	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("eapol_am_wlan_authentication_symbian_c::check_is_valid_eap_type():  %s, this = 0x%08x => 0x%08x, EAP-type=0x%08x=%s\n"),
-		 (m_is_client == true) ? "client": "server",
-		 this,
-		 dynamic_cast<abs_eap_base_timer_c *>(this),
-		convert_eap_type_to_u32_t(eap_type),
-		eap_string.get_eap_type_string(eap_type)));
-
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	for (int i = 0; i < m_enabled_expanded_eap_array.Count(); i++)
-	{
-		TBuf8<KExpandedEAPSize> tmpExpEAP(m_enabled_expanded_eap_array[i]->EapExpandedType);
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("eapol_am_wlan_authentication_symbian_c::RetrievePSKL(): this = 0x%08x\n"),
+		this));
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_am_wlan_authentication_symbian_c::RetrievePSKL()");
 
-		EAP_TRACE_DEBUG(
-			m_am_tools, 
-			TRACE_FLAGS_DEFAULT, 
-			(EAPL("eapol_am_wlan_authentication_symbian_c::check_is_valid_eap_type:Enabled expanded EAP type at index=%d\n"),
-			 i));
-
-		EAP_TRACE_DATA_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("Enabled expanded EAP type:"),
-			tmpExpEAP.Ptr(),
-			tmpExpEAP.Size()));
-
-		// This is for one expanded EAP type (for the above one).
-		eap_expanded_type_c expandedEAPType;
-				
-		// Read the expanded EAP type details for this item in m_enabled_expanded_eap_array.
-		eap_status_e status = eap_expanded_type_c::read_type(m_am_tools,
-												0,
-												tmpExpEAP.Ptr(),
-												tmpExpEAP.Size(),
-												&expandedEAPType);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
+	// Open database
+	RDbNamedDatabase db;
 
-		if (eap_type == expandedEAPType)
-		{
-			// This is Allowed and Valid.
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
-		}
-	}
-		 
-#else // For normal unexpanded EAP type
+	TFileName aPrivateDatabasePathName;
 
-	TEap *eapType = 0; 
-	
-	for (int i = 0; i < m_iap_eap_array.Count(); i++)
-	{
-		// Try next EAP type
-		eapType = m_iap_eap_array[i];
-		if (eapType->Enabled == 1)
-		{	
-			// Convert the string to integer
-			TLex8 tmp(eapType->UID);
-			TInt val(0);
-			tmp.Val(val);
+	EapPluginTools::GetPrivatePathL(
+		m_session,
+		aPrivateDatabasePathName);
 
-			if (eap_type == static_cast<eap_type_ietf_values_e>(val))
-			{
-				// Allowed
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
-			}
-		}
-	}
-	
-#endif // #ifdef USE_EAP_EXPANDED_TYPES
-	
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("ERROR: %s: check_is_valid_eap_type(): not supported EAP-type=0x%08x=%s\n"),
-		 (m_is_client == true ? "client": "server"),
-		 convert_eap_type_to_u32_t(eap_type),
-		 eap_string.get_eap_type_string(eap_type)));
+	aPrivateDatabasePathName.Append(KEapolDatabaseName);
 
-	
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_eap_type);
-}
+	EAP_TRACE_DATA_DEBUG_SYMBIAN(("aPrivateDatabasePathName",
+		aPrivateDatabasePathName.Ptr(),
+		aPrivateDatabasePathName.Size()));
 
-//--------------------------------------------------
-
-EAP_FUNC_EXPORT eap_status_e eapol_am_wlan_authentication_symbian_c::get_eap_type_list(
-	eap_array_c<eap_type_value_e> * const eap_type_list)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+	TInt error = db.Open(m_session, aPrivateDatabasePathName);
 
 	EAP_TRACE_DEBUG(
 		m_am_tools, 
 		TRACE_FLAGS_DEFAULT, 
-		(EAPL("eapol_am_wlan_authentication_symbian_c::get_eap_type_list(): %s, this = 0x%08x => 0x%08x\n"),
-		 (m_is_client == true) ? "client": "server",
-		 this,
-		 dynamic_cast<abs_eap_base_timer_c *>(this)));
-
-
-	eap_status_e status(eap_status_illegal_eap_type);
-
-	status = eap_type_list->reset();
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-	eap_header_string_c eap_string;
-	EAP_UNREFERENCED_PARAMETER(eap_string);
-
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	// This function is same as get_selected_eap_types in behavior.
-
-	// We need to return only the EAP types available as enabled types.
-	// It means only the ones available in m_enabled_expanded_eap_array.
-	
-	for (TInt i = 0; i < m_enabled_expanded_eap_array.Count(); i++)
-	{	
-		TBuf8<KExpandedEAPSize> tmpExpEAP(m_enabled_expanded_eap_array[i]->EapExpandedType);
-
-		EAP_TRACE_DEBUG(
-			m_am_tools, 
-			TRACE_FLAGS_DEFAULT, 
-			(EAPL("eapol_am_wlan_authentication_symbian_c::get_eap_type_list:Enabled expanded EAP type at index=%d\n"),
-			 i));
-
-		EAP_TRACE_DATA_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("Enabled expanded EAP type:"),
-			tmpExpEAP.Ptr(),
-			tmpExpEAP.Size()));
-
-		// This is for one expanded EAP type (for the above one).
-		eap_expanded_type_c * expandedEAPType = new eap_type_value_e();
-				
-		// Read the expanded EAP type details from an item in m_enabled_expanded_eap_array.
-		status = eap_expanded_type_c::read_type(m_am_tools,
-												0,
-												tmpExpEAP.Ptr(),
-												tmpExpEAP.Size(),
-												expandedEAPType);
-		if (status != eap_status_ok)
-		{
-			delete expandedEAPType;
-			expandedEAPType = 0;
-
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		// Add EAP-type to list.		
-		status = eap_type_list->add_object(expandedEAPType, true);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}		
-			
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("get_eap_type_list():added EAP-type=0x%08x=%s\n"),
-			expandedEAPType->get_vendor_type(),
-			eap_string.get_eap_type_string(*expandedEAPType)));			
-	}
-
-#else // for normal EAP types.
-
-	TEap *eapType = 0; 
-
-	for (TInt i = 0; i < m_iap_eap_array.Count(); i++)
-	{
-		// Check if type is enabled
-		eapType = m_iap_eap_array[i];
-		if (eapType->Enabled == 1)
-		{	
-			TLex8 tmp(eapType->UID);
-			TInt val(0);
-			tmp.Val(val);
-
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("get_eap_type_list(): adds EAP-type=0x%08x=%s\n"),
-				static_cast<eap_type_ietf_values_e>(val),
-				eap_string.get_eap_type_string(
-					static_cast<eap_type_value_e>(
-						static_cast<eap_type_ietf_values_e>(val)))));
+		(EAPL("eapol_am_wlan_authentication_symbian_c::RetrievePSKL(): db.Open(), error = %d\n"),
+		 error));
 
-			eap_type_value_e * const eap_type = new eap_type_value_e(
-				static_cast<eap_type_ietf_values_e>(val));
-			if (eap_type == 0)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-			}
-
-			status = eap_type_list->add_object(eap_type, true);
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);
-			}
-		}
-	}
-
-#endif // #ifdef USE_EAP_EXPANDED_TYPES
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-	return EAP_STATUS_RETURN(m_am_tools, status);
-}
-
-//--------------------------------------------------
-
-//
-void eapol_am_wlan_authentication_symbian_c::RunL()
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);	
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("eapol_am_wlan_authentication_symbian_c::RunL(): iStatus.Int() = %d\n"),
-		iStatus.Int()));
-
-	if (iStatus.Int() != KErrNone)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return;
-	}
-
-	// Authentication cancelled.
-	EAP_TRACE_ALWAYS(
-		m_am_tools,
-		TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT,
-		(EAPL("Authentication cancelled.\n")));
-
-	eap_status_e status = m_am_partner->disassociation(
-		&m_receive_network_id);
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("set_timer(EAPOL_AM_CORE_TIMER_DELETE_STACK_ID) failed in RunL().\n")));
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return;
-	}
-	
-	// Reset index of current EAP-type.
-	m_am_partner->set_current_eap_index(0ul);
-
-	EAP_TRACE_ALWAYS(
-		m_am_tools,
-		TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT,
-		(EAPL("Indication sent to WLM: EFailedCompletely.\n")));
-
-	m_am_partner->eapol_indication(
-		&m_receive_network_id,
-		eapol_wlan_authentication_state_failed_completely);
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-}
-
-//--------------------------------------------------
-
-//
-void eapol_am_wlan_authentication_symbian_c::DoCancel()
-{	
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("eapol_am_wlan_authentication_symbian_c::DoCancel()\n")));
-
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-}
-
-//--------------------------------------------------
-
-void eapol_am_wlan_authentication_symbian_c::RetrievePSKL(TPSKEntry& entry)
-{
-
-	// Open database
-	RDbNamedDatabase db;
-
-#ifdef SYMBIAN_SECURE_DBMS
-	User::LeaveIfError(db.Open(m_session, KDatabaseName, KSecureUIDFormat));	
-#else			
-	User::LeaveIfError(db.Open(m_session, KDatabaseName));
-#endif // #ifdef SYMBIAN_SECURE_DBMS		
+	User::LeaveIfError(error);
 	
 	CleanupClosePushL(db);
 
@@ -2273,13 +1145,22 @@
 	entry.password.Copy(view.ColDes8(4));
 	entry.psk.Copy(view.ColDes8(5));
 
-	CleanupStack::PopAndDestroy(3); // view, buf, database
+	CleanupStack::PopAndDestroy(&view);
+	CleanupStack::PopAndDestroy(sqlbuf);
+	CleanupStack::PopAndDestroy(&db);
 }
 
 //--------------------------------------------------
 
 void eapol_am_wlan_authentication_symbian_c::SavePSKL(TPSKEntry& entry)
 {
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("eapol_am_wlan_authentication_symbian_c::SavePSKL(): this = 0x%08x\n"),
+		this));
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_am_wlan_authentication_symbian_c::SavePSKL()");
+
 	// Connect to CommDBif so that we can delete PSK entries that have no IAP associated anymore.
 	CWLanSettings* wlan_settings = new(ELeave) CWLanSettings;
 	CleanupStack::PushL(wlan_settings);
@@ -2295,11 +1176,19 @@
 	// Open database
 	RDbNamedDatabase db;
 
-#ifdef SYMBIAN_SECURE_DBMS
-	User::LeaveIfError(db.Open(m_session, KDatabaseName, KSecureUIDFormat));	
-#else			
-	User::LeaveIfError(db.Open(m_session, KDatabaseName));
-#endif // #ifdef SYMBIAN_SECURE_DBMS		
+	TFileName aPrivateDatabasePathName;
+
+	EapPluginTools::GetPrivatePathL(
+		m_session,
+		aPrivateDatabasePathName);
+
+	aPrivateDatabasePathName.Append(KEapolDatabaseName);
+
+	EAP_TRACE_DATA_DEBUG_SYMBIAN(("aPrivateDatabasePathName",
+		aPrivateDatabasePathName.Ptr(),
+		aPrivateDatabasePathName.Size()));
+
+	User::LeaveIfError(db.Open(m_session, aPrivateDatabasePathName));	
 	
 	CleanupClosePushL(db);
 
@@ -2352,32 +1241,37 @@
 	
 	CleanupStack::PopAndDestroy( colSet ); // Delete colSet.	
 
-	CleanupStack::PopAndDestroy(4); // CWLanSettings, database, buffer, view
+	CleanupStack::PopAndDestroy(&view);
+	CleanupStack::PopAndDestroy(sqlbuf);
+	CleanupStack::PopAndDestroy(&db);
+	CleanupStack::PopAndDestroy(wlan_settings);
 
 }
 														 
 //--------------------------------------------------
 
 //
-void eapol_am_wlan_authentication_symbian_c::ReadEAPSettingsL()
+void eapol_am_wlan_authentication_symbian_c::ReadWPASettingsL()
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
 	EAP_TRACE_DEBUG(
 		m_am_tools, 
 		TRACE_FLAGS_DEFAULT, 
-		(EAPL("eapol_am_wlan_authentication_symbian_c::ReadEAPSettingsL(): %s, this = 0x%08x => 0x%08x\n"),
+		(EAPL("eapol_am_wlan_authentication_symbian_c::ReadWPASettingsL(): %s, this = 0x%08x => 0x%08x\n"),
 		 (m_is_client == true) ? "client": "server",
 		 this,
 		 dynamic_cast<abs_eap_base_timer_c *>(this)));
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_am_wlan_authentication_symbian_c::ReadWPASettingsL()");
 
 	eap_status_e status(eap_status_ok);
 
-	status = reset_eap_plugins();
-	if (status != eap_status_ok)
+	if (m_selected_eapol_key_authentication_type == eapol_key_authentication_type_WPS)
 	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		User::Leave(m_am_tools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(m_am_tools, status)));
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT, (EAPL("WPS does not use CommDbIf anymore.\n")));
+		return;
 	}
 
 	TIndexType index_type(ELan);
@@ -2397,253 +1291,28 @@
 		EAP_TRACE_DEBUG(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
-			(EAPL("Beginning to read IAP settings - Type: %d, Index: %d.\n"), index_type, index));
-
-		CWLanSettings* wlan_settings = new(ELeave) CWLanSettings;
-		CleanupStack::PushL(wlan_settings);
-		SWLANSettings wlanSettings;
-		if (wlan_settings->Connect() != KErrNone)
-		{
-			// Could not connect to CommDB			
-			User::Leave(KErrCouldNotConnect);
-		}
-
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT, (EAPL("Connected to CommDbIf.\n")));
-
-		if (wlan_settings->GetWlanSettingsForService(index, wlanSettings) != KErrNone)
-		{
-			wlan_settings->Disconnect();
-			User::Leave(KErrUnknown);
-		}
-
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("Got WLAN settings: wlanSettings.EnableWpaPsk=%d, m_WPA_override_enabled=%d\n"),
-			wlanSettings.EnableWpaPsk,
+			(EAPL("WLAN settings: m_WPA_override_enabled=%d\n"),
 			m_WPA_override_enabled));
 
 		EAP_TRACE_DATA_DEBUG(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
-			(EAPL("WPA-PSK"),
-			wlanSettings.WPAPreSharedKey.Ptr(),
-			wlanSettings.WPAPreSharedKey.Size()));
-
-#ifdef USE_EAP_EXPANDED_TYPES
-
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("Beginning to read EAP Data using new Comm_DB_if for expanded eap type\n")));
-
-		wlan_settings->GetEapDataL(m_enabled_expanded_eap_array, m_disabled_expanded_eap_array);
+			(EAPL("m_wpa_preshared_key"),
+			m_wpa_preshared_key.get_data(),
+			m_wpa_preshared_key.get_data_length()));
 
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("Enabled EAP count=%d, Disabled EAP count=%d\n"),
-			m_enabled_expanded_eap_array.Count(), m_disabled_expanded_eap_array.Count()));
-
-			
-	
-#else
-		// Without expanded EAP type. Normal EAP type stuff.
-		wlan_settings->GetEapDataL(m_iap_eap_array);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
-		
-		EAP_TRACE_DEBUG(
+		EAP_TRACE_DATA_DEBUG(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
-			(EAPL("Got EAP data:\n")));
-
-#ifdef USE_EAP_EXPANDED_TYPES
-
-		// Reading enabled.
-		for (TInt i = 0; i < m_enabled_expanded_eap_array.Count(); i++)
-		{	
-			TBuf8<KExpandedEAPSize> tmpExpEAP(m_enabled_expanded_eap_array[i]->EapExpandedType);
-
-			EAP_TRACE_DEBUG(
-				m_am_tools, 
-				TRACE_FLAGS_DEFAULT, 
-				(EAPL("eapol_am_wlan_authentication_symbian_c::ReadEAPSettingsL:Enabled expanded EAP type at index=%d\n"),
-				 i));
-
-			EAP_TRACE_DATA_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("Enabled expanded EAP type:"),
-				tmpExpEAP.Ptr(),
-				tmpExpEAP.Size()));
-		}
-
-		// Now reading disabled.
-		for (TInt i = 0; i < m_disabled_expanded_eap_array.Count(); i++)
-		{	
-			TBuf8<KExpandedEAPSize> tmpExpEAP(m_disabled_expanded_eap_array[i]->EapExpandedType);
-
-			EAP_TRACE_DEBUG(
-				m_am_tools, 
-				TRACE_FLAGS_DEFAULT, 
-				(EAPL("eapol_am_wlan_authentication_symbian_c::ReadEAPSettingsL:Disabled expanded EAP type at index=%d\n"),
-				 i));
-
-			EAP_TRACE_DATA_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("Disabled expanded EAP type:"),
-				tmpExpEAP.Ptr(),
-				tmpExpEAP.Size()));
-		}
-
-#else // Normal EAP type.
-
-		for (TInt i = 0; i < m_iap_eap_array.Count(); i++)
-		{
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("EAP type %d\n"),
-				i));
-
-			TLex8 tmp(m_iap_eap_array[i]->UID);
-			TInt val(0);
-			tmp.Val(val);
-		
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("  UID: %d\n"), val));
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("  Enabled: %d\n"),
-				m_iap_eap_array[i]->Enabled));
-		}
-
-#endif // #ifdef USE_EAP_EXPANDED_TYPES
-
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("End EAP data:\n")));
-
-
-#ifndef USE_EAP_EXPANDED_TYPES
-
-// There can not be a situation where all EAPs are disabled.
-
-		if (m_iap_eap_array.Count() == 0)
-		{
-
-#if defined(USE_EAP_ALLOW_ALL_EAP_TYPES_WHEN_NONE_IS_ACTIVATED_IN_CONFIGURATION)
-
-			// The EAP field was empty. Allow all types.
-
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("Empty EAP field -> enable all types.\n")));
-
-			RImplInfoPtrArray eapArray;
-			
-			REComSession::ListImplementationsL(KEapTypeInterfaceUid, eapArray);
-		
-			TEap *eap;
-			for (TInt i = 0; i < eapArray.Count(); i++)
-			{
-				eap = new(ELeave) TEap;
-				eap->UID.Copy(eapArray[i]->DataType());
-				eap->Enabled = ETrue;
-				m_iap_eap_array.Append(eap);
-			}
-
-			eapArray.ResetAndDestroy();
-
-#else
-
-			// The EAP field was empty. Allow EAP-SIM only.
-
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("Empty EAP field -> enable EAP-SIM only.\n")));
-
-			{
-				TBuf8<3> eap_sim_uid = _L8("018");
-
-				TEap *eap = new(ELeave) TEap;
-				eap->UID.Copy(eap_sim_uid);
-				eap->Enabled = ETrue;
-				m_iap_eap_array.Append(eap);
-			}
-
-#endif //#if defined(USE_EAP_ALLOW_ALL_EAP_TYPES_WHEN_NONE_IS_ACTIVATED_IN_CONFIGURATION)
-
-		}
-
-#endif // #ifndef USE_EAP_EXPANDED_TYPES
-
-		// Get security mode
-		if (m_WPA_override_enabled == false)
-		{
-			m_security_mode = static_cast<EWlanSecurityMode>(wlanSettings.SecurityMode);
-		}
-		else
-		{
-			// WPA override is enabled
-			m_security_mode = Wpa;
-		}
+			(EAPL("m_SSID"),
+			m_SSID.get_data(),
+			m_SSID.get_data_length()));
 
 		// Get WPA pre shared key & SSID
 		if (m_is_client == true
-			&& (wlanSettings.EnableWpaPsk
-				|| m_WPA_override_enabled == true)
 			&& (m_selected_eapol_key_authentication_type == eapol_key_authentication_type_RSNA_PSK
 				|| m_selected_eapol_key_authentication_type == eapol_key_authentication_type_WPA_PSK))
 		{
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("Uses WPAPSK: wlanSettings.EnableWpaPsk=%d\n"),
-				wlanSettings.EnableWpaPsk));
-
-			// When not using easy WLAN there is no WPA PSK override.
-			if (m_WPA_override_enabled == false)
-			{
-				status = m_wpa_preshared_key.set_copy_of_buffer(
-					wlanSettings.WPAPreSharedKey.Ptr(),
-					wlanSettings.WPAPreSharedKey.Size());
-				if (status != eap_status_ok)
-				{
-					send_error_notification(eap_status_key_error);
-					wlan_settings->Disconnect();
-					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-					User::Leave(m_am_tools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(m_am_tools, status)));
-				}
-
-				// Here we copy the SSID read from IAP.
-				TBuf8<K_Max_SSID_Length> tmp;
-				tmp.Copy(wlanSettings.SSID);
-				status = m_SSID.set_copy_of_buffer(tmp.Ptr(), tmp.Size());
-				if (status != eap_status_ok)
-				{
-					wlan_settings->Disconnect();
-					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-					User::Leave(m_am_tools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(m_am_tools, status)));
-				}
-			}
-			else
-			{
-				// In override mode SSID is stored to m_SSID
-				// and password is stored to m_wpa_preshared_key.
-			}
-
 			TPSKEntry pskEntry;
 			pskEntry.indexType = index_type;
 			pskEntry.index = index;
@@ -2651,12 +1320,12 @@
 			pskEntry.password.Zero();
 			pskEntry.psk.Zero();
 
-            TInt err(KErrNone);
+            TInt error(KErrNone);
 
 			// Retrieve saved PSK only when override is not in effect
-			TRAP(err, RetrievePSKL(pskEntry));
+			TRAP(error, RetrievePSKL(pskEntry));
 			
-			if (err != KErrNone
+			if (error != KErrNone
 				|| m_SSID.compare(pskEntry.ssid.Ptr(), pskEntry.ssid.Size()) != 0
 				|| m_wpa_preshared_key.compare(pskEntry.password.Ptr(), pskEntry.password.Size()) != 0)
 			{
@@ -2676,7 +1345,6 @@
 					if (status != eap_status_ok)
 					{
 						send_error_notification(eap_status_key_error);
-						wlan_settings->Disconnect();							
 						EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 						User::Leave(m_am_tools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(m_am_tools, status)));
 					}
@@ -2685,7 +1353,6 @@
 					if (status != eap_status_ok)
 					{
 						send_error_notification(eap_status_key_error);
-						wlan_settings->Disconnect();							
 						EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 						User::Leave(m_am_tools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(m_am_tools, status)));
 					}
@@ -2699,7 +1366,6 @@
 						|| target_length != EAPOL_WPA_PSK_LENGTH_BYTES)
 					{
 						send_error_notification(eap_status_key_error);
-						wlan_settings->Disconnect();							
 						EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 						User::Leave(m_am_tools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(m_am_tools, status)));
 					}
@@ -2716,7 +1382,6 @@
 					if (status != eap_status_ok)
 					{
 						send_error_notification(eap_status_key_error);
-						wlan_settings->Disconnect();							
 						EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 						User::Leave(m_am_tools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(m_am_tools, status)));
 					}
@@ -2770,7 +1435,6 @@
 				if (status != eap_status_ok)
 				{
 					send_error_notification(eap_status_key_error);
-					wlan_settings->Disconnect();
 					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 					User::Leave(m_am_tools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(m_am_tools, status)));
 				}
@@ -2797,17 +1461,6 @@
 					m_wpa_preshared_key_hash.get_data_length()));
 			}
 		}
-		
-		wlan_settings->Disconnect();
-		CleanupStack::PopAndDestroy(wlan_settings);
-
-		if (m_security_mode != Wlan8021x
-			&& m_security_mode != Wpa
-			&& m_security_mode != Wpa2Only)
-		{
-			// Unsupported mode
-			User::Leave(KErrNotSupported);
-		}
 	} 
 	else
 	{
@@ -2820,253 +1473,6 @@
 
 //--------------------------------------------------
 
-#ifdef USE_EAP_EXPANDED_TYPES
-
-void eapol_am_wlan_authentication_symbian_c::SetToTopPriorityL(const eap_type_value_e aEapType)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("eapol_am_wlan_authentication_symbian_c::SetToTopPriorityL() - for EXP EAP types\n")));
-
-	TIndexType index_type(ELan);
-	TUint index(0UL);
-	TInt priorityIndex (0);
-
-	eap_status_e status = read_database_reference_values(
-		&index_type,
-		&index);
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		User::Leave(m_am_tools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(m_am_tools, status)));
-	}
-
-	if (index_type == ELan)
-	{
-		for (TInt i = 0; i < m_enabled_expanded_eap_array.Count(); i++)
-		{
-			TBuf8<KExpandedEAPSize> tmpExpEAP(m_enabled_expanded_eap_array[i]->EapExpandedType);
-
-			EAP_TRACE_DEBUG(
-				m_am_tools, 
-				TRACE_FLAGS_DEFAULT, 
-				(EAPL("eapol_am_wlan_authentication_symbian_c::SetToTopPriorityL:Enabled expanded EAP type at index=%d\n"),
-				 i));
-
-			EAP_TRACE_DATA_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("Enabled expanded EAP type:"),
-				tmpExpEAP.Ptr(),
-				tmpExpEAP.Size()));
-
-			// This is for one expanded EAP type (for the above one).
-			eap_expanded_type_c expandedEAPType;
-					
-			// Read the expanded EAP type details for this item in m_enabled_expanded_eap_array.
-			eap_status_e status = eap_expanded_type_c::read_type(m_am_tools,
-													0,
-													tmpExpEAP.Ptr(),
-													tmpExpEAP.Size(),
-													&expandedEAPType);
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				User::Leave(m_am_tools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(m_am_tools, status)));
-			}
-
-			if (aEapType == expandedEAPType)
-			{
-				// Found it. This is the EAP type which should be at top priority.
-				priorityIndex = i;
-				break;
-			}
-		}	
-				
-		if(priorityIndex == 0)
-		{
-			// This means this EAP type is already at the top priority.
-
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("eapol_am_wlan_authentication_symbian_c::SetToTopPriorityL() - This is already at top\n")));
-			
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return;
-		}
-
-		if (priorityIndex >= m_enabled_expanded_eap_array.Count())
-		{
-			// No such EAP type in enabled list. This should never happen.
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("ERROR: eapol_am_wlan_authentication_symbian_c::SetToTopPriorityL() - No such EAP in the enabled list\n")));
-			
-			User::Leave(KErrNotFound);					
-		}
-
-		CWLanSettings* wlan = new(ELeave) CWLanSettings;
-		CleanupStack::PushL(wlan);
-		SWLANSettings wlanSettings;
-		if (wlan->Connect() != KErrNone)
-		{
-			// Could not connect to CommDB			
-			User::Leave(KErrCouldNotConnect);
-		}
-		
-		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("SetToTopPriorityL():Connected to CommDbIf.\n")));
-
-		if (wlan->GetWlanSettingsForService(index, wlanSettings) != KErrNone)
-		{
-			wlan->Disconnect();
-			User::Leave(KErrUnknown);
-		}
-		
-		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("SetToTopPriorityL():Got WLAN settings.\n")));
-		
-		// Change the order
-		SEapExpandedType* TopPriorityEAP(m_enabled_expanded_eap_array[priorityIndex]);
-
-		m_enabled_expanded_eap_array.Remove(priorityIndex); // This does not delete the object	
-				
-		m_enabled_expanded_eap_array.Insert(TopPriorityEAP, 0); // Insert in the beginning.
-
-		wlan->SetEapDataL(m_enabled_expanded_eap_array, m_disabled_expanded_eap_array);
-		
-		wlan->Disconnect();
-
-		CleanupStack::PopAndDestroy(wlan);		
-	} 
-	else
-	{
-		// At the moment only LAN bearer is supported.
-
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("eapol_am_wlan_authentication_symbian_c::SetToTopPriorityL() - LEAVE - only LAN bearer is supported\n")));
-		
-		User::Leave(KErrNotSupported);
-	}
-		
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-}
-
-#else // For normal EAP types
-
-void eapol_am_wlan_authentication_symbian_c::SetToTopPriorityL(const TEap* const aEapType)
-{
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("eapol_am_wlan_authentication_symbian_c::SetToTopPriorityL()\n")));
-
-	TIndexType index_type(ELan);
-	TUint index(0UL);
-
-	eap_status_e status = read_database_reference_values(
-		&index_type,
-		&index);
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		User::Leave(m_am_tools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(m_am_tools, status)));
-	}
-
-	if (index_type == ELan)
-	{
-		TInt i(0);
-		TBuf8<3> uid;
-		for (i = 0; i < m_iap_eap_array.Count(); i++)
-		{
-			TEap* eap = m_iap_eap_array[i];
-			if (eap->UID[0] == '0')
-			{
-				// Cut the leading zero
-				uid.Copy(eap->UID.Right(eap->UID.Length()-1));				
-			}
-			else
-			{
-				uid.Copy(eap->UID);
-			}
-			if (eap->Enabled == aEapType->Enabled
-				&& uid.Compare(aEapType->UID) == 0)
-			{
-				// Found
-				break;
-			}
-		}
-		if (i >= m_iap_eap_array.Count())
-		{
-			// This should never happen
-			User::Leave(KErrNotFound);					
-		}
-	
-		TLex8 tmp(aEapType->UID);
-		TInt val(0);
-		tmp.Val(val);
-
-		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("Setting to top priority:\n")));
-		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("Old index: %d\n"), i));
-		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("  UID: %d\n"), val));
-		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("  Enabled: %d\n"), aEapType->Enabled));
-	
-		if (i == 0)
-		{
-			// Already at the highest priority
-			return;
-		}
-
-		CWLanSettings* wlan = new(ELeave) CWLanSettings;
-		CleanupStack::PushL(wlan);
-		SWLANSettings wlanSettings;
-		if (wlan->Connect() != KErrNone)
-		{
-			// Could not connect to CommDB			
-			User::Leave(KErrCouldNotConnect);
-		}
-		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("Connected to CommDbIf.\n")));
-
-		if (wlan->GetWlanSettingsForService(index, wlanSettings) != KErrNone)
-		{
-			wlan->Disconnect();
-			User::Leave(KErrUnknown);
-		}
-		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("Got WLAN settings.\n")));
-		
-		// Change the order
-		TEap* eap = m_iap_eap_array[i];
-
-		m_iap_eap_array.Remove(i); // This does not delete the object	
-				
-		m_iap_eap_array.Insert(eap, 0);
-
-		wlan->SetEapDataL(m_iap_eap_array);
-		
-		wlan->Disconnect();
-
-		CleanupStack::PopAndDestroy(wlan);		
-	} 
-	else
-	{
-		// At the moment only LAN bearer is supported.
-		User::Leave(KErrNotSupported);
-	}
-		
-	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-}
-
-#endif // #ifdef USE_EAP_EXPANDED_TYPES 
-
-//--------------------------------------------------
-
 #if defined(USE_EAP_SIMPLE_CONFIG)
 
 EAP_FUNC_EXPORT eap_status_e eapol_am_wlan_authentication_symbian_c::save_simple_config_session(
@@ -3081,6 +1487,7 @@
 		TRACE_FLAGS_DEFAULT,
 		(EAPL("%s: eapol_am_wlan_authentication_simulator_c::save_simple_config_session()\n"),
 		(m_is_client == true ? "client": "server")));
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_am_wlan_authentication_symbian_c::save_simple_config_session()");
 
 	eap_status_e status(eap_status_ok);
 
@@ -3099,17 +1506,45 @@
 
 //--------------------------------------------------
 
+EAP_FUNC_EXPORT eap_status_e eapol_am_wlan_authentication_symbian_c::set_eap_database_reference_values(
+	const eap_variable_data_c * const reference)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("%s: eapol_am_wlan_authentication_symbian_c::set_eap_database_reference_values()\n"),
+		(m_is_client == true ? "client": "server")));
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eapol_am_wlan_authentication_symbian_c::set_eap_database_reference_values()");
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("eapol_am_wlan_authentication_symbian_c::set_eap_database_reference_values(): reference"),
+		 reference->get_data(),
+		 reference->get_data_length()));
+
+	eap_status_e status = m_database_reference.set_copy_of_buffer(reference);
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
 EAP_FUNC_EXPORT eapol_am_wlan_authentication_c * eapol_am_wlan_authentication_c::new_eapol_am_wlan_authentication(
 	abs_eap_am_tools_c * const tools,
-	const bool is_client_when_true,
-	const abs_eapol_wlan_database_reference_if_c * const wlan_database_reference)
+	const bool is_client_when_true)
 {
 	EAP_TRACE_BEGIN(tools, TRACE_FLAGS_DEFAULT);
 
+	EAP_TRACE_DEBUG(
+		tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("eapol_am_wlan_authentication_symbian_c::new_eapol_am_wlan_authentication()\n")));
+	EAP_TRACE_RETURN_STRING(tools, "returns: eapol_am_wlan_authentication_symbian_c::new_eapol_am_wlan_authentication()");
+
 	eapol_am_wlan_authentication_c * const wauth = new eapol_am_wlan_authentication_symbian_c(
 		tools,
-		is_client_when_true,
-		wlan_database_reference);
+		is_client_when_true);
 
 	EAP_TRACE_END(tools, TRACE_FLAGS_DEFAULT);
 	return wauth;
@@ -3117,6 +1552,82 @@
 
 
 //--------------------------------------------------
+
+//
+eap_session_core_base_c * new_eap_core_client_message_if_c(
+	abs_eap_am_tools_c * const tools,
+	abs_eap_session_core_c * const partner,
+	const bool is_client_when_true,
+	const u32_t MTU)
+{
+	EAP_TRACE_DEBUG(
+		tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("new_eap_core_client_message_if_c()\n")));
+	EAP_TRACE_RETURN_STRING(tools, "returns: new_eap_core_client_message_if_c()");
+
+	eap_am_message_if_c *client_if = new_eap_am_client_message_if_c(
+		tools,
+		is_client_when_true,
+		MTU);
+
+	eap_automatic_variable_c<eap_am_message_if_c> automatic_server_if(
+		tools,
+		client_if);
+
+	if (client_if == 0
+		|| client_if->get_is_valid() == false)
+	{
+		// ERROR.
+		if (client_if != 0)
+		{
+			EAP_TRACE_DEBUG(
+				tools,
+				TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+				(EAPL("ERROR: calls: eap_session_core_base_c::new_eap_core_client_message_if_c(): client_if->shutdown(): %s.\n"),
+				(is_client_when_true == true) ? "client": "server"));
+
+			(void) client_if->shutdown();
+		}
+
+		return 0;
+	}
+
+	eap_core_client_message_if_c * new_session_core = new eap_core_client_message_if_c(tools, client_if, partner, is_client_when_true);
+
+	eap_automatic_variable_c<eap_core_client_message_if_c> automatic_new_session_core(
+		tools,
+		new_session_core);
+
+	if (new_session_core == 0
+		|| new_session_core->get_is_valid() == false)
+	{
+		// ERROR.
+		if (new_session_core != 0)
+		{
+			EAP_TRACE_DEBUG(
+				tools,
+				TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+				(EAPL("ERROR: calls: eap_session_core_base_c::new_eap_core_client_message_if_c(): new_session_core->shutdown(): %s.\n"),
+				(is_client_when_true == true) ? "client": "server"));
+
+			new_session_core->shutdown();
+		}
+
+		(void) client_if->shutdown();
+
+		return 0;
+	}
+
+	client_if->set_partner(new_session_core);
+
+	automatic_server_if.do_not_free_variable();
+	automatic_new_session_core.do_not_free_variable();
+
+	return new_session_core;
+}
+
+//--------------------------------------------------
 //--------------------------------------------------
 //--------------------------------------------------
 // End.
--- a/eapol/eapol_framework/eapol_symbian/am/core/symbian/file_config/eap_symbian.conf	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/core/symbian/file_config/eap_symbian.conf	Mon May 24 20:32:47 2010 +0300
@@ -2,7 +2,7 @@
 #  Name        : ./wlan_symbian/wlaneapol_symbian/am/core/symbian/file_config/eap_symbian.conf
 #  Part of     : EAPOL / 
 #  Description : Configuration file for EAPOL.
-#  Version     : %version: 16 %
+#  Version     : %version: 15.1.4 %
 #  
 #  Copyright © 2001-2005 Nokia. All rights reserved.
 #  This material, including documentation and any related 
@@ -17,9 +17,9 @@
 
 EAP_TRACE_disable_traces = bool:false
 
-EAP_TRACE_enable_timer_traces = bool:false
+EAP_TRACE_enable_timer_traces = bool:true
 
-EAP_TRACE_enable_timer_queue_traces = bool:false
+EAP_TRACE_enable_timer_queue_traces = bool:true
 
 EAP_TRACE_output_file_name = string:e:\logs\eapol\eap_core.txt
 
@@ -153,4 +153,7 @@
 
 EAP_SIMPLE_CONFIG_manual_username = string:WFA-SimpleConfig-Enrollee-1-0
 
+# JPH: This is for testing, remove after the QT UI works.
+#EAP_TLS_PEAP_use_automatic_ca_certificate = bool:true
+
 # end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/eap_notifier/group/bld.inf	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2000-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Build information file for eap_notifier
+*
+*/
+
+/*
+* %version: 3 %
+*/
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+
+
+
+PRJ_MMPFILES
+eap_notifier.mmp
+
+//PRJ_EXPORTS
+
+//../inc/eap_auth_notifier.h
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/eap_notifier/group/eap_notifier.mmp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,48 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Project definition file for eap_notifier
+*
+*/
+
+/*
+* %version:  %
+*/
+
+// using relative paths for sourcepath and user includes
+
+TARGET        eap_notifier.dll
+TARGETTYPE    dll
+
+UID           0x1000008d 0x2002E6F1
+
+CAPABILITY    All -TCB
+
+SOURCEPATH    ..\src
+SOURCE        eap_auth_notifier.cpp
+SOURCE        eap_auth_observer.cpp
+
+USERINCLUDE   ..\inc
+
+MW_LAYER_SYSTEMINCLUDE
+
+LIBRARY       euser.lib
+LIBRARY	      eapsymbiantools.lib 
+LIBRARY	      eaptools.lib
+LIBRARY		    HbCore.lib
+LIBRARY	      HbWidgets.lib
+
+EXPORTUNFROZEN
+
+//deffile ...
+//nostrictdef
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/eap_notifier/inc/eap_auth_notifier.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,237 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Eap Dialog implementation
+*
+*/
+
+#ifndef __EAPAUTHNOTIFIER_H__
+#define __EAPAUTHNOTIFIER_H__
+
+#include <e32base.h>
+#include <hb/hbcore/hbdevicedialogsymbian.h>
+
+const TUint KMaxNotifItemLength = 256;
+const TUint KMaxUiDataLength = 1024;
+
+/**
+ * Callback interface
+ */
+class MNotificationCallback
+    {
+    public:
+        virtual void DlgComplete( TInt aStatus ) = 0;
+    };
+
+class TEapExpandedType;
+class CEapAuthObserver;
+
+
+NONSHARABLE_CLASS ( CEapAuthNotifier ): public CBase
+    {
+    public:
+        
+        enum EEapNotifierType
+        {
+            EEapNotifierTypeLEapUsernamePasswordDialog, 
+            EEapNotifierTypeGTCSecurIDPasscodeQueryUidDialog,
+            EEapNotifierTypeGTCQueryDialog,
+            EEapNotifierTypePapAuthQueryDialog,
+            EEapNotifierTypePapChallengeReplyQueryDialog, 
+            EEapNotifierTypeFastInstallPacQueryDialog,
+            EEapNotifierTypeFastPacStorePwQueryDialog,
+            EEapNotifierTypeFastCreateMasterkeyQueryDialog, 
+            EEapNotifierTypeFastPacFilePwQueryDialog, 
+            EEapNotifierTypeFastStartAuthProvWaitNote, 
+            EEapNotifierTypeFastStartUnauthProvWaitNote,
+            EEapNotifierTypePapUsernamePasswordDialog,
+            EEapNotifierTypeFastShowProvNotSuccessNote, 
+            EEapNotifierTypeEapMsChapV2UsernamePasswordDialog,
+            EEapNotifierTypeMsChapV2UsernamePasswordDialog, 
+            EEapNotifierTypeMsChapV2NewPasswordDialog, 
+            EEapNotifierTypeMsChapV2OldPasswordDialog,
+            EEapNotifierTypeMsChapV2PasswordExpiredNote,
+            EEapNotifierTypeGTCUsernamePasswordDialog,
+        }; 
+        
+        struct TEapDialogInfo
+        {
+            TBool iPasswordPromptEnabled;
+            TBool iIsIdentityQuery;
+            TBuf16<KMaxNotifItemLength> iUsername;
+            TBuf16<KMaxNotifItemLength> iPassword;
+            TBuf16<KMaxNotifItemLength> iOldPassword; 
+            TBool iIsFirstQuery;
+            TBuf16<KMaxUiDataLength> iUidata;
+        };
+          
+        /**
+        * Two-phased constructor.
+        */
+        IMPORT_C  static CEapAuthNotifier* NewL( MNotificationCallback& aClient );
+        
+        /**
+        * Destructor
+        */
+        ~CEapAuthNotifier();
+        
+        /**
+        * Start the Notifier
+        * @param  aType            notifier type
+        * @param  aPasswordInfo    data to be filled
+        * @param  aEapType         eap type
+        * return -
+        */
+        IMPORT_C void StartL( EEapNotifierType aType,
+                              TEapDialogInfo* aEapInfo,
+                              TEapExpandedType& aEapType );
+        
+        /**
+        * Cancel() the notifier
+        * @param  -
+        * return -
+        */
+        IMPORT_C void Cancel();
+        
+    public:           
+        /**
+        * CompleteL the notifier is complete
+        * @param  aStatus status
+        * return  -
+        */
+        void CompleteL( TInt aStatus );
+        
+        /**
+        * Sets the selected user name and password of the presented dialog
+        * @param  aPasswordInfo password 
+        * return  -
+        */
+        void SetSelectedUnameAndPwd( TEapDialogInfo& aPasswordInfo );
+                
+        /**
+        * Sets the selected password of the presented dialog
+        * @param  aPasswordInfo password 
+        * return  -
+        */
+        void SetSelectedPassword(
+                TEapDialogInfo& aPasswordInfo );
+        
+        /**
+        * Sets the selected Old password of the presented dialog
+        * @param  aPasswordInfo old password 
+        * return  -
+        */
+        void SetSelectedOldPassword(
+                TEapDialogInfo& aPasswordInfo );
+       
+    private:
+        /**
+        * Constructor
+        */
+        CEapAuthNotifier( MNotificationCallback& aClient );
+        
+        /**
+        * Set data for the UsernamePassword Dialog(s)
+        * @param  aPasswordInfo    data to be filled
+        * @param  aEapType         Eap type to be used
+        * @param  aMap             Pointer to variant data
+        * @param  aAuthMethod      Auth method to be used
+        * return -
+        */
+        void SetUsernamePasswordDataL( 
+            TEapDialogInfo* aPasswordInfo,
+            TEapExpandedType& aEapType,
+            CHbSymbianVariantMap* aMap,
+            TDesC& aAuthMethod );
+                
+        
+        /**
+        * Set data for the query Dialog(s)
+        * @param  aEapInfo         data to be filled
+        * @param  aMap             Pointer to variant data
+        * @param  aAuthMethod      Auth method to be used
+        * return -
+        */
+        void SetQueryDialogDataL( 
+            TEapDialogInfo* aEapInfo,
+            CHbSymbianVariantMap* aMap,
+            TDesC& aAuthMethod );
+        
+       /**
+        * Set data for the Install Pac query Dialog(s)
+        * @param  aEapInfo         data to be filled
+        * @param  aMap             Pointer to variant data
+        * return -
+        */
+        void SetFastInstallPacQueryDialogDataL( 
+            TEapDialogInfo* aEapInfo,
+            CHbSymbianVariantMap* aMap );
+        
+       /**
+        * Set data for the Pac file query Dialog(s)
+        * @param  aEapInfo         data to be filled
+        * @param  aMap             Pointer to variant data
+        * return -
+        */
+        void setFastPacFileQueryPwDialogDataL( 
+            TEapDialogInfo* aEapInfo,
+            CHbSymbianVariantMap* aMap );
+        
+       /**
+        * Set data for the prov wait note Dialog(s)
+        * @param  aMap                  Pointer to variant data
+        * @param  aAuthProvWaitNote     Tells whether aut or unauth 
+        * return -
+        */
+        void setFastProvWaitNoteDialogDataL( 
+            CHbSymbianVariantMap* aMap,
+            TBool aAuthProvWaitNote );
+                    
+       /**
+        * Set data for the Password Dialog(s)
+        * @param  aEapType         Eap type to be used
+        * @param  aMap             Pointer to variant data
+        * @param  aAuthMethod      Auth method to be used
+        * return -
+        */
+        void SetPasswordQueryDataL( 
+            TEapExpandedType& aEapType,
+            CHbSymbianVariantMap* aMap,
+            TDesC& aAuthMethod );
+        
+    private:
+        /** Pointer to the device dialog interface for handling the dialog */
+        CHbDeviceDialogSymbian* iDialog;
+        /** The observer to handle the data received from the orbit dialog */
+        CEapAuthObserver* iObserver;
+        
+        TEapDialogInfo* iEapInfo;
+        
+        // for callback
+        MNotificationCallback& iClient;  
+        
+        /* Information if request was already completed, in case the
+         * observer receives the data signal and the signal about closing the
+         * dialog.
+         */
+        TBool iCompleted;
+        
+        /* Information if request was already cancelled.
+         */
+        TBool iCancelled;
+        
+    
+    };
+
+#endif //__EAPAUTHNOTIFIER_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/eap_notifier/inc/eap_auth_observer.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,87 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Dialog Observer implementation
+*
+*/
+
+#ifndef __EAPAUTHOBSERVER_H__
+#define __EAPAUTHOBSERVER_H__
+
+class CEapAuthNotifier;
+
+NONSHARABLE_CLASS ( CEapAuthObserver ) : public CBase, public MHbDeviceDialogObserver
+    {
+    public:
+        /**
+        * Two-phased constructor.
+        */
+        static CEapAuthObserver* NewL( 
+                CEapAuthNotifier* aNotifier,
+                CEapAuthNotifier::EEapNotifierType aType );
+        
+        /**
+        * Destructor
+        */
+        ~CEapAuthObserver();
+        
+        /**
+        * Handles the user input received from the dialog
+        * @param    aData CHbSymbianVariantMap&
+        */
+        void DataReceived(CHbSymbianVariantMap& aData);
+        
+        /**
+        * Handles the closing of the dialog
+        * @param    aCompletionCode TInt
+        */
+        void DeviceDialogClosed( TInt /*aCompletionCode*/ );
+    private:
+        /**
+        * Constructor
+        */
+        CEapAuthObserver( 
+                CEapAuthNotifier* aNotifier,
+                CEapAuthNotifier::EEapNotifierType aType );
+        
+        /**
+        * Handles the user name password input received from the dialog
+        * @param    aData CHbSymbianVariantMap&
+        */
+        void UsernamePasswordDlgDataReceived( CHbSymbianVariantMap& aData );
+        
+        
+        /**
+        * Handles the password query user input received from the dialog
+        * @param    aData CHbSymbianVariantMap&
+        */
+        void PwdQueryDataReceived( CHbSymbianVariantMap& aData );
+        
+        /**
+        * Handles the old password query user input received from the dialog
+        * @param    aData CHbSymbianVariantMap&
+        */
+        void OldPwdQueryDataReceived( CHbSymbianVariantMap& aData );
+        
+    private:
+        
+        /* Current EAP notifier type to serve */
+        CEapAuthNotifier::EEapNotifierType iType;
+        
+        /* Pointer to the object that triggered the dialog opening,
+         * needed to update the information about the user input.
+         */
+        CEapAuthNotifier* iNotifier;
+    };
+
+#endif /* __EAPAUTHOBSERVER_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/eap_notifier/inc/eap_auth_ui_strings.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   EAP String definitions for the Notifier
+ *
+ */
+
+
+#ifndef EAPAUTHUISTRINGS_H
+#define EAPAUTHUISTRINGS_H
+
+#include <e32base.h>
+
+namespace EapAuthUiStrings
+{
+_LIT(EapAka, "EAP-AKA");
+_LIT(EapFast, "EAP-FAST");
+_LIT(EapGtc, "EAP-GTC");
+_LIT(EapMschapv2, "EAP-MSCHAPv2");
+_LIT(EapSim, "EAP-SIM");
+_LIT(EapTls, "EAP-TLS");
+_LIT(EapTtls, "EAP-TTLS");
+_LIT(Leap, "LEAP");
+_LIT(Mschapv2, "MSCHAPv2");
+_LIT(Pap, "PAP");
+_LIT(Peap, "PEAP");
+}
+
+#endif //EAPAUTHUISTRINGS_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/eap_notifier/rom/eap_notifier.iby	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ * 
+ */
+ 
+#ifndef __EAP_NOTIFIER_IBY__
+#define __EAP_NOTIFIER_IBY__
+
+#include <bldvariant.hrh>
+
+file=ABI_DIR\BUILD_DIR\eap_notifier.dll                  SHARED_LIB_DIR\eap_notifier.dll
+
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/eap_notifier/src/eap_auth_notifier.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,526 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: EAP Auth notitier implementation
+*
+*/
+
+// INCLUDE FILES
+#include <hb/hbcore/hbsymbianvariant.h>
+#include <e32debug.h> 
+#include <eapexpandedtype.h> 
+#include "eap_auth_notifier.h"
+#include "eap_auth_observer.h"
+#include "eap_auth_ui_strings.h"
+
+// CONSTANTS
+const TInt KVariableLength = 30; 
+const TInt KDlgTypeStrLength = 100; 
+const TInt KMaxAuthMethodLength = 50;
+
+_LIT( KUsername, "username");
+_LIT( KAuthmethod, "authmethod");
+_LIT( KPacservername, "pacservername");
+_LIT( KPacfilename, "pacfilename");
+_LIT( KEaptype, "eaptype");
+_LIT( KMessage, "messagetxt");
+_LIT( KFastprovwaitnote, "notificationtxt");
+
+_LIT(KTypeunamepwddlg, "com.nokia.eap.usernamepassworddialog/1.0");
+_LIT(KTypepwdquerydlg, "com.nokia.eap.passwordquerydialog/1.0");
+_LIT(KTypequerydlg, "com.nokia.eap.querydialog/1.0"); 
+_LIT(KTypeinstallpacquerydlg, "com.nokia.eap.fastinstallpacquerydialog/1.0");
+_LIT(KTypepacstorepwquerydlg, "com.nokia.eap.fastpacstorepwquerydialog/1.0"); 
+_LIT(KTypemasterkeyquerydlg, "com.nokia.eap.fastcreatemasterkeyquerydialog/1.0"); 
+_LIT(KTypepacfilepwquerydlg, "com.nokia.eap.fastpacfilepwquerydialog/1.0"); 
+_LIT(KTypeprovwaitnotedlg, "com.nokia.eap.fastprovwaitnotedialog/1.0"); 
+_LIT(KTypepwdexpnotedlg,"com.nokia.eap.mschapv2passwordexpirednotedialog/1.0"); 
+_LIT(KTypeoldpwddlg,"com.nokia.eap.mschapv2oldpassworddialog/1.0"); 
+_LIT(KTypenewpwddlg,"com.nokia.eap.mschapv2newpassworddialog/1.0"); 
+_LIT(KTypeshowprovnotsuccdlg,"com.nokia.eap.fastshowprovnotsuccessnotedialog/1.0"); 
+
+// ---------------------------------------------------------
+// CEapAuthNotifier::CEapAuthNotifier()
+// ---------------------------------------------------------
+//
+CEapAuthNotifier::CEapAuthNotifier( MNotificationCallback& aClient )
+    :iClient(aClient)
+    {
+    RDebug::Print(_L("CEapAuthNotifier::CEapAuthNotifier DLL++") );
+    
+    iCompleted = EFalse; 
+    iCancelled = EFalse;
+    iObserver = NULL;
+    iDialog = NULL;
+    }
+
+// ---------------------------------------------------------
+// CEapAuthNotifier::~CEapAuthNotifier()
+// ---------------------------------------------------------
+//
+CEapAuthNotifier::~CEapAuthNotifier()
+    {
+    RDebug::Print(_L("CEapAuthNotifier::~CEapAuthNotifier") );
+    
+    if ( iCancelled == EFalse )
+        {
+        iCompleted = ETrue;
+        if ( iDialog )
+            { 
+            iDialog->Cancel();
+            }
+        }
+    if ( iDialog )
+        { 
+        delete iDialog;
+        }
+    if ( iObserver )
+        {
+        delete iObserver;
+        }
+    }
+
+// ---------------------------------------------------------
+// CEapAuthNotifier* CEapAuthNotifier::NewL
+// ---------------------------------------------------------
+//
+EXPORT_C CEapAuthNotifier* CEapAuthNotifier::NewL( MNotificationCallback& aClient )
+    {
+    RDebug::Print(_L("CEapAuthNotifier::NewL"));
+    
+    CEapAuthNotifier* self = new ( ELeave ) CEapAuthNotifier( aClient );
+    return self;
+    }
+
+// ---------------------------------------------------------
+// void CEapAuthNotifier::StartL
+// ---------------------------------------------------------
+//
+EXPORT_C void CEapAuthNotifier::StartL( 
+    EEapNotifierType aType,
+    TEapDialogInfo* aEapInfo, 
+    TEapExpandedType& aEapType )
+    {
+    TInt error;
+    TBuf<KDlgTypeStrLength> EapNtfType;
+    TBuf16<KMaxAuthMethodLength> authMethod;
+               
+    RDebug::Print(_L("CEapAuthNotifier::StartL: ENTERING"));
+    
+    iCancelled = EFalse;
+    iCompleted = EFalse;
+    iEapInfo = aEapInfo;
+        
+    // Observer is needed in order to get the user inputs
+    iObserver = CEapAuthObserver::NewL( this, aType ); 
+    iDialog = CHbDeviceDialogSymbian::NewL();
+        
+    //The variant map is needed to construct the dialog correctly,
+    CHbSymbianVariantMap* map = CHbSymbianVariantMap::NewL();
+    CleanupStack::PushL( map );
+    
+    if ( aType == EEapNotifierTypeLEapUsernamePasswordDialog )
+        {
+        authMethod.Copy(EapAuthUiStrings::Leap);
+        SetUsernamePasswordDataL( aEapInfo, aEapType, map, authMethod );  
+        EapNtfType.Copy(KTypeunamepwddlg);
+        }   
+    else if ( aType == EEapNotifierTypeGTCUsernamePasswordDialog )
+        {
+        authMethod.Copy(EapAuthUiStrings::EapGtc);
+        SetUsernamePasswordDataL( aEapInfo, aEapType, map, authMethod );  
+        EapNtfType.Copy(KTypeunamepwddlg);
+        }   
+    else if ( aType == EEapNotifierTypePapUsernamePasswordDialog )
+        {
+        authMethod.Copy(EapAuthUiStrings::Pap);
+        SetUsernamePasswordDataL( aEapInfo, aEapType, map, authMethod );    
+        EapNtfType.Copy(KTypeunamepwddlg);
+        }   
+    else if ( aType == EEapNotifierTypeEapMsChapV2UsernamePasswordDialog )
+        {
+        authMethod.Copy(EapAuthUiStrings::EapMschapv2);
+        SetUsernamePasswordDataL( aEapInfo, aEapType, map, authMethod );   
+        EapNtfType.Copy(KTypeunamepwddlg);
+        }   
+    else if ( aType == EEapNotifierTypeMsChapV2UsernamePasswordDialog )
+        {
+        authMethod.Copy(EapAuthUiStrings::Mschapv2);
+        SetUsernamePasswordDataL( aEapInfo, aEapType, map, authMethod );  
+        EapNtfType.Copy(KTypeunamepwddlg);
+        }   
+    else if ( aType == EEapNotifierTypeGTCSecurIDPasscodeQueryUidDialog )
+        {
+        authMethod.Copy(EapAuthUiStrings::EapGtc);
+        SetPasswordQueryDataL( aEapType, map, authMethod );
+        EapNtfType.Copy(KTypepwdquerydlg);
+        }
+    else if ( aType == EEapNotifierTypePapChallengeReplyQueryDialog )
+        {
+        authMethod.Copy(EapAuthUiStrings::Pap);
+        SetPasswordQueryDataL( aEapType, map, authMethod );
+        EapNtfType.Copy(KTypepwdquerydlg);
+        }
+    else if ( aType == EEapNotifierTypeGTCQueryDialog )
+        {
+        authMethod.Copy(EapAuthUiStrings::EapGtc);
+        SetQueryDialogDataL( aEapInfo, map, authMethod );
+        EapNtfType.Copy(KTypequerydlg);
+        }
+    else if ( aType == EEapNotifierTypePapAuthQueryDialog )
+        {
+        authMethod.Copy(EapAuthUiStrings::Pap);
+        SetQueryDialogDataL( aEapInfo, map, authMethod );
+        EapNtfType.Copy(KTypequerydlg);    
+        }
+    else if ( aType == EEapNotifierTypeFastInstallPacQueryDialog ) 
+        {
+        SetFastInstallPacQueryDialogDataL( aEapInfo, map );
+        EapNtfType.Copy(KTypeinstallpacquerydlg);
+        }
+    else if ( aType == EEapNotifierTypeFastPacStorePwQueryDialog ) 
+        {
+        EapNtfType.Copy(KTypepacstorepwquerydlg);
+        }
+    else if ( aType == EEapNotifierTypeFastCreateMasterkeyQueryDialog ) 
+        {
+        EapNtfType.Copy(KTypemasterkeyquerydlg);
+        }
+    else if ( aType == EEapNotifierTypeFastPacFilePwQueryDialog ) 
+        {
+        setFastPacFileQueryPwDialogDataL( aEapInfo, map );
+        EapNtfType.Copy(KTypepacfilepwquerydlg);
+        }
+    else if ( aType == EEapNotifierTypeFastStartAuthProvWaitNote )
+        {
+        setFastProvWaitNoteDialogDataL( map, ETrue );
+        EapNtfType.Copy(KTypeprovwaitnotedlg);
+        }
+    else if ( aType == EEapNotifierTypeFastStartUnauthProvWaitNote )
+        {
+        setFastProvWaitNoteDialogDataL( map, EFalse );
+        EapNtfType.Copy(KTypeprovwaitnotedlg);
+        }   
+    else if ( aType == EEapNotifierTypeMsChapV2PasswordExpiredNote )
+        {
+        EapNtfType.Copy(KTypepwdexpnotedlg);
+        }
+    else if ( aType == EEapNotifierTypeMsChapV2OldPasswordDialog )
+        {
+        EapNtfType.Copy(KTypeoldpwddlg);
+        }
+    else if ( aType == EEapNotifierTypeMsChapV2NewPasswordDialog )
+        {
+        EapNtfType.Copy(KTypenewpwddlg);
+        }
+    else if ( aType == EEapNotifierTypeFastShowProvNotSuccessNote )
+        {
+        EapNtfType.Copy(KTypeshowprovnotsuccdlg);
+        }
+
+    RDebug::Print(_L("CEapAuthNotifier::StartL: Load the Dialog NOW!"));
+    // Show the dialog.
+    error = iDialog->Show( EapNtfType, *map, iObserver );
+    
+    User::LeaveIfError( error );
+    CleanupStack::PopAndDestroy( map ); 
+
+    RDebug::Print(_L("CEapAuthNotifier::StartL: LEAVING") );
+    }
+
+// ---------------------------------------------------------
+// void CEapAuthNotifier::setFastProvWaitNoteDialogDataL
+// ---------------------------------------------------------
+//
+void CEapAuthNotifier::setFastProvWaitNoteDialogDataL(    
+    CHbSymbianVariantMap* aMap,
+    TBool aAuthProvWaitNote )
+    {
+    TInt error;  
+    TBuf<KVariableLength> key(KFastprovwaitnote);
+            
+    CHbSymbianVariant *variant = NULL;
+    
+    RDebug::Print(_L("CEapAuthNotifier::setFastProvWaitNoteDialogData: ENTERING"));    
+
+    //Create the variant data information for the plugin
+    variant =  CHbSymbianVariant::NewL ( &aAuthProvWaitNote, CHbSymbianVariant::EBool );
+    CleanupStack::PushL( variant );
+    error = aMap->Add( key, variant);
+    User::LeaveIfError( error );
+    CleanupStack::Pop( variant ); // map's cleanup sequence handles variant.
+    
+    RDebug::Print(_L("CEapAuthNotifier::setFastProvWaitNoteDialogData: LEAVING") );
+    }
+
+// ---------------------------------------------------------
+// void CEapAuthNotifier::setFastPacFileQueryPwDialogDataL
+// ---------------------------------------------------------
+//
+void CEapAuthNotifier::setFastPacFileQueryPwDialogDataL( 
+    TEapDialogInfo* aEapInfo,
+    CHbSymbianVariantMap* aMap )
+    {
+    TInt error;  
+    TBuf<KVariableLength> key(KPacfilename);
+                
+    CHbSymbianVariant *variant = NULL;
+        
+    RDebug::Print(_L("CEapAuthNotifier::setFastPacFileQueryPwDialogData: ENTERING"));
+        
+    if( 0 < aEapInfo->iUidata.Length() )
+       {
+       RDebug::Print(_L("CEapAuthNotifier::setFastPacFileQueryPwDialogData: Set PAC filename"));
+       RDebug::Print(_L("CEapAuthNotifier::setFastPacFileQueryPwDialogData: aEapInfo->iUidata = %S\n"), &aEapInfo->iUidata );
+        
+       // Create the variant data information for the plugin
+       variant =  CHbSymbianVariant::NewL ( &aEapInfo->iUidata, CHbSymbianVariant::EDes );
+       CleanupStack::PushL( variant );
+       error = aMap->Add( key, variant);
+       User::LeaveIfError( error );
+       CleanupStack::Pop( variant ); // map's cleanup sequence handles variant.
+       }     
+    RDebug::Print(_L("CEapAuthNotifier::setFastPacFileQueryPwDialogData: LEAVING") );
+    }
+
+// --------------------------------------------------------------
+// void CEapAuthNotifier::SetFastInstallPacQueryDialogDataL
+// --------------------------------------------------------------
+//
+void CEapAuthNotifier::SetFastInstallPacQueryDialogDataL( 
+    TEapDialogInfo* aEapInfo,
+    CHbSymbianVariantMap* aMap )
+    {
+    TInt error;  
+    TBuf<KVariableLength> key(KPacservername);
+            
+    CHbSymbianVariant *variant = NULL;
+    
+    RDebug::Print(_L("CEapAuthNotifier::SetFastInstallPacQueryDialogData: ENTERING"));
+    
+    if( 0 < aEapInfo->iUidata.Length() )
+        {
+        RDebug::Print(_L("CEapAuthNotifier::SetFastInstallPacQueryDialogData: Set PAC Install server name"));
+        RDebug::Print(_L("CEapAuthNotifier::SetFastInstallPacQueryDialogData: aEapInfo->iUidata = %S\n"), &aEapInfo->iUidata );
+    
+        // Create the variant data information for the plugin
+        variant =  CHbSymbianVariant::NewL ( &aEapInfo->iUidata, CHbSymbianVariant::EDes );
+        CleanupStack::PushL( variant );
+        error = aMap->Add( key, variant);
+        User::LeaveIfError( error );
+        CleanupStack::Pop( variant ); // map's cleanup sequence handles variant.
+        }     
+    RDebug::Print(_L("CEapAuthNotifier::SetFastInstallPacQueryDialogData: LEAVING") );
+    }
+
+// ---------------------------------------------------------
+// void CEapAuthNotifier::SetQueryDialogDataL
+// ---------------------------------------------------------
+//
+void CEapAuthNotifier::SetQueryDialogDataL( 
+    TEapDialogInfo* aEapInfo,
+    CHbSymbianVariantMap* aMap,
+    TDesC& aAuthMethod )
+    {
+    TInt error;  
+    TBuf<KVariableLength> key1(KAuthmethod);
+    TBuf<KVariableLength> key2(KMessage);
+        
+    CHbSymbianVariant *variant = NULL;
+    
+    RDebug::Print(_L("CEapAuthNotifier::SetQueryDialogData: ENTERING"));
+    
+    RDebug::Print(_L("CEapAuthNotifier::SetQueryDialogData: Set Heading"));
+    RDebug::Print(_L("CEapAuthNotifier::SetQueryDialogData: aAuthMethod = %S\n"), &aAuthMethod );
+    
+    // Create the variant data information for the plugin
+    variant =  CHbSymbianVariant::NewL ( &aAuthMethod, CHbSymbianVariant::EDes );
+    CleanupStack::PushL( variant );
+    error = aMap->Add( key1, variant);
+    User::LeaveIfError( error );
+    CleanupStack::Pop( variant ); // map's cleanup sequence handles variant.
+            
+    if( 0 < aEapInfo->iUidata.Length() )
+        {
+        RDebug::Print(_L("CEapAuthNotifier::SetQueryDialogData: Set user input message"));
+        RDebug::Print(_L("CEapAuthObserver::SetQueryDialogData: aEapInfo->iUidata = %S\n"), &aEapInfo->iUidata );
+    
+        // Create the variant data information for the plugin
+        variant =  CHbSymbianVariant::NewL ( &aEapInfo->iUidata, CHbSymbianVariant::EDes );
+        CleanupStack::PushL( variant );
+        error = aMap->Add( key2, variant);
+        User::LeaveIfError( error );
+        CleanupStack::Pop( variant ); // map's cleanup sequence handles variant.
+        }     
+    RDebug::Print(_L("CEapAuthNotifier::SetQueryDialogData: LEAVING") );
+    }
+
+// ---------------------------------------------------------
+// void CEapAuthNotifier::SetPasswordQueryDataL
+// ---------------------------------------------------------
+//
+void CEapAuthNotifier::SetPasswordQueryDataL( 
+    TEapExpandedType& aEapType,
+    CHbSymbianVariantMap* aMap,
+    TDesC& aAuthMethod )
+    {
+    TInt error;  
+    TBuf<KVariableLength> key2(KAuthmethod);
+    TBuf<KVariableLength> key3(KEaptype);
+    CHbSymbianVariant *variant = NULL;
+    
+    RDebug::Print(_L("CEapAuthNotifier::SetPasswordQueryData: ENTERING"));
+    RDebug::Print(_L("CEapAuthNotifier::SetPasswordQueryData: aAuthMethod = %S\n"), &aAuthMethod );
+    
+    //Create the variant data information for the plugin
+    //Set authentication method 
+    variant =  CHbSymbianVariant::NewL ( &aAuthMethod, CHbSymbianVariant::EDes );
+    CleanupStack::PushL( variant );
+    error = aMap->Add( key2, variant);
+    User::LeaveIfError( error );
+    CleanupStack::Pop( variant ); // map's cleanup sequence handles variant.
+    
+    //Set EAP type
+    variant =  CHbSymbianVariant::NewL( &aEapType.GetValue(), CHbSymbianVariant::EBinary );
+    CleanupStack::PushL( variant );
+    error = aMap->Add( key3, variant);
+    User::LeaveIfError( error );
+    CleanupStack::Pop( variant ); // map's cleanup sequence handles variant.    
+    RDebug::Print(_L("CEapAuthNotifier::SetPasswordQueryData: LEAVING") );
+    }
+
+// ---------------------------------------------------------
+// void CEapAuthNotifier::SetUsernamePasswordDataL
+// ---------------------------------------------------------
+//
+void CEapAuthNotifier::SetUsernamePasswordDataL( 
+    TEapDialogInfo* aEapInfo,
+    TEapExpandedType& aEapType,
+    CHbSymbianVariantMap* aMap,
+    TDesC& aAuthMethod )
+    {
+    TInt error;  
+    TBuf<KVariableLength> key1(KUsername);
+    TBuf<KVariableLength> key2(KAuthmethod);
+    TBuf<KVariableLength> key3(KEaptype);
+    CHbSymbianVariant *variant = NULL;
+    
+    RDebug::Print(_L("CEapAuthNotifier::SetUsernamePasswordData: ENTERING"));
+    RDebug::Print(_L("CEapAuthNotifier::SetUsernamePasswordData: aAuthMethod = %S\n"), &aAuthMethod );
+    
+    //Create the variant data information for the plugin
+    //Set authentication method 
+    variant =  CHbSymbianVariant::NewL ( &aAuthMethod, CHbSymbianVariant::EDes );
+    CleanupStack::PushL( variant );
+    error = aMap->Add( key2, variant);
+    User::LeaveIfError( error );
+    CleanupStack::Pop( variant ); // map's cleanup sequence handles variant.
+    
+    //Set username
+    if( 0 < aEapInfo->iUsername.Length() )
+        {
+        RDebug::Print(_L("CEapAuthNotifier::SetUsernamePasswordData: Set default UNAME"));
+        RDebug::Print(_L("CEapAuthNotifier::SetUsernamePasswordData: iEapInfo->iUsername = %S\n"), &iEapInfo->iUsername );
+    
+        // Create the variant data information for the plugin
+        variant =  CHbSymbianVariant::NewL ( &aEapInfo->iUsername, CHbSymbianVariant::EDes );
+        CleanupStack::PushL( variant );
+        error = aMap->Add( key1, variant);
+        User::LeaveIfError( error );
+        CleanupStack::Pop( variant ); // map's cleanup sequence handles variant.
+        }
+
+    //Set EAP type
+    variant =  CHbSymbianVariant::NewL( &aEapType.GetValue(), CHbSymbianVariant::EBinary );
+    CleanupStack::PushL( variant );
+    error = aMap->Add( key3, variant);
+    User::LeaveIfError( error );
+    CleanupStack::Pop( variant ); // map's cleanup sequence handles variant.    
+    RDebug::Print(_L("CEapAuthNotifier::SetUsernamePasswordData: LEAVING") );
+    }
+
+// --------------------------------------------------------------------------
+// void CEapAuthNotifier::SetSelectedUnameAndPwd( TEapDialogInfo& aEapInfo )
+// --------------------------------------------------------------------------
+//
+void CEapAuthNotifier::SetSelectedUnameAndPwd ( TEapDialogInfo& aEapInfo )
+    {
+    RDebug::Print(_L("CEapAuthNotifier::SetSelectedUnameAndPwd"));
+    
+    iEapInfo->iIsIdentityQuery = aEapInfo.iIsIdentityQuery;
+    if ( aEapInfo.iIsIdentityQuery ) 
+        {
+        iEapInfo->iUsername = aEapInfo.iUsername;
+        RDebug::Print(_L("CEapAuthNotifier::SetSelectedUnameAndPwd: iEapInfo->iUsername = %S\n"), &iEapInfo->iUsername );
+        }
+    
+    iEapInfo->iPasswordPromptEnabled = aEapInfo.iPasswordPromptEnabled;
+    if ( aEapInfo.iPasswordPromptEnabled )
+        {
+        iEapInfo->iPassword = aEapInfo.iPassword;
+        RDebug::Print(_L("CEapAuthNotifier::SetSelectedUnameAndPwd: iEapInfo->iPassword = %S\n"), &iEapInfo->iPassword );
+        }    
+    }
+
+// ------------------------------------------------------------------------------
+// void CEapAuthNotifier::SetSelectedPassword( TEapDialogInfo& aPasswordInfo )
+// ------------------------------------------------------------------------------
+//
+void CEapAuthNotifier::SetSelectedPassword ( TEapDialogInfo& aPasswordInfo )
+    {
+    RDebug::Print(_L("CEapAuthNotifier::SetSelectedPassword"));
+
+    iEapInfo->iPassword = aPasswordInfo.iPassword;
+    RDebug::Print(_L("CEapAuthNotifier::SetSelectedPassword: iEapInfo->iPassword = %S\n"), &iEapInfo->iPassword );    
+    }
+
+// ---------------------------------------------------------------------------------
+// void CEapAuthNotifier::SetSelectedOldPassword( TEapDialogInfo& aPasswordInfo )
+// ---------------------------------------------------------------------------------
+//
+void CEapAuthNotifier::SetSelectedOldPassword ( TEapDialogInfo& aPasswordInfo )
+    {
+    RDebug::Print(_L("CEapAuthNotifier::SetSelectedOldPassword"));
+
+    iEapInfo->iOldPassword = aPasswordInfo.iOldPassword;
+    RDebug::Print(_L("CEapAuthNotifier::SetSelectedOldPassword: iEapInfo->iOldPassword = %S\n"), &iEapInfo->iOldPassword );    
+    }
+
+// ---------------------------------------------------------
+// void CEapAuthNotifier::CompleteL( TInt aStatus )
+// ---------------------------------------------------------
+//
+void CEapAuthNotifier::CompleteL( TInt aStatus )
+    {
+    RDebug::Print(_L("CEapAuthNotifier::CompleteL"));
+    
+    if ( !iCompleted )
+        {
+        iClient.DlgComplete(aStatus);
+        iCompleted = ETrue;
+        }
+    }
+
+// ------------------------------------------------------------
+// void CEapAuthNotifier::Cancel()
+// ------------------------------------------------------------
+//
+EXPORT_C void CEapAuthNotifier::Cancel()
+    {
+    RDebug::Print(_L("CEapAuthNotifier::Cancel"));
+    if ( !iCompleted )
+        {
+        iCancelled = ETrue;
+        iDialog->Cancel();
+        }
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/eap_notifier/src/eap_auth_observer.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,247 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Dialog observer implementation
+*
+*/
+
+#include <hb/hbcore/hbsymbianvariant.h>
+#include <e32debug.h>
+#include "eap_auth_notifier.h"
+#include "eap_auth_observer.h"
+
+
+// ---------------------------------------------------------
+// CEapAuthObserver* CEapAuthObserver::NewL
+// ---------------------------------------------------------
+//
+CEapAuthObserver* CEapAuthObserver::NewL( 
+    CEapAuthNotifier* aNotifier,
+    CEapAuthNotifier::EEapNotifierType aType )
+    {
+    RDebug::Print(_L("CEapAuthObserver::NewL") );
+    
+    CEapAuthObserver* self = new ( ELeave ) CEapAuthObserver( aNotifier, aType );
+    return self;
+    }
+
+// ---------------------------------------------------------
+// CEapAuthObserver::CEapAuthObserver
+// ---------------------------------------------------------
+//
+CEapAuthObserver::CEapAuthObserver( 
+    CEapAuthNotifier* aNotifier,
+    CEapAuthNotifier::EEapNotifierType aType ): 
+    iNotifier( aNotifier ),
+    iType(aType)
+    {
+    RDebug::Print(_L("CEapAuthObserver::CEapAuthObserver") );
+    }
+
+// ---------------------------------------------------------
+// CEapAuthObserver::~CEapAuthObserver()
+// ---------------------------------------------------------
+//
+CEapAuthObserver::~CEapAuthObserver()
+    {
+    RDebug::Print(_L("CEapAuthObserver::~CEapAuthObserver") );
+    }
+
+// ---------------------------------------------------------
+// void CEapAuthObserver::DataReceived
+// ---------------------------------------------------------
+//
+void CEapAuthObserver::DataReceived( CHbSymbianVariantMap& aData )
+{
+    RDebug::Print(_L("CEapAuthObserver::DataReceived") );
+    
+    if ( iType == CEapAuthNotifier::EEapNotifierTypeLEapUsernamePasswordDialog )
+        {
+        RDebug::Print(_L("CEapAuthObserver::DataReceived: EEapNotifierTypeLEapUsernamePasswordDialog") );
+        UsernamePasswordDlgDataReceived(aData);
+        }
+    else if ( iType == CEapAuthNotifier::EEapNotifierTypeGTCUsernamePasswordDialog )
+        {
+        RDebug::Print(_L("CEapAuthObserver::DataReceived: EEapNotifierTypeGTCUsernamePasswordDialog") );
+        UsernamePasswordDlgDataReceived(aData);
+        }
+    else if ( iType == CEapAuthNotifier::EEapNotifierTypePapUsernamePasswordDialog )
+        {
+        RDebug::Print(_L("CEapAuthObserver::DataReceived: EEapNotifierTypePapUsernamePasswordDialog") );
+        UsernamePasswordDlgDataReceived(aData);
+        }
+    else if ( iType == CEapAuthNotifier::EEapNotifierTypeEapMsChapV2UsernamePasswordDialog )
+        {
+        RDebug::Print(_L("CEapAuthObserver::DataReceived: EEapNotifierTypeEapMsChapV2UsernamePasswordDialog") );
+        UsernamePasswordDlgDataReceived(aData);
+        }
+    else if ( iType == CEapAuthNotifier::EEapNotifierTypeMsChapV2UsernamePasswordDialog )
+        {
+        RDebug::Print(_L("CEapAuthObserver::DataReceived: EEapNotifierTypeMsChapV2UsernamePasswordDialog") );
+        UsernamePasswordDlgDataReceived(aData);
+        }
+    else if ( iType == CEapAuthNotifier::EEapNotifierTypeGTCSecurIDPasscodeQueryUidDialog )
+        {
+        RDebug::Print(_L("CEapAuthObserver::DataReceived: EEapNotifierTypeGTCSecurIDPasscodeQueryUidDialog") ); 
+        PwdQueryDataReceived(aData);
+        }
+    else if ( iType == CEapAuthNotifier::EEapNotifierTypePapChallengeReplyQueryDialog )
+        {
+        RDebug::Print(_L("CEapAuthObserver::DataReceived: EEapNotifierTypePapChallengeReplyQueryDialog") ); 
+        PwdQueryDataReceived(aData);
+        }
+    else if ( iType == CEapAuthNotifier::EEapNotifierTypeFastPacStorePwQueryDialog )
+        {
+        RDebug::Print(_L("CEapAuthObserver::DataReceived: EEapNotifierTypeFastPacStorePwQueryDialog") ); 
+        PwdQueryDataReceived(aData);
+        }
+    else if ( iType == CEapAuthNotifier::EEapNotifierTypeFastCreateMasterkeyQueryDialog )
+        {
+        RDebug::Print(_L("CEapAuthObserver::DataReceived: EEapNotifierTypeFastCreateMasterkeyQueryDialog") ); 
+        PwdQueryDataReceived(aData);
+        }
+    else if ( iType == CEapAuthNotifier::EEapNotifierTypeFastPacFilePwQueryDialog )
+        {
+        RDebug::Print(_L("CEapAuthObserver::DataReceived: EEapNotifierTypeFastPacFilePwQueryDialog") ); 
+        PwdQueryDataReceived(aData);
+        }
+    else if ( iType == CEapAuthNotifier::EEapNotifierTypeMsChapV2OldPasswordDialog )
+        {
+        RDebug::Print(_L("CEapAuthObserver::DataReceived: EEapNotifierTypeMsChapV2OldPasswordDialog") ); 
+        OldPwdQueryDataReceived(aData);
+        }
+    else if ( iType == CEapAuthNotifier::EEapNotifierTypeMsChapV2NewPasswordDialog )
+        {
+        RDebug::Print(_L("CEapAuthObserver::DataReceived: EEapNotifierTypeMsChapV2NewPasswordDialog") ); 
+        PwdQueryDataReceived(aData);
+        }
+    
+    TInt status = KErrNone;
+    
+    TRAP_IGNORE( iNotifier->CompleteL( status ));
+}
+
+// ---------------------------------------------------------
+// void CEapAuthObserver::UsernamePasswordDlgDataReceived
+// ---------------------------------------------------------
+//
+void CEapAuthObserver::UsernamePasswordDlgDataReceived( CHbSymbianVariantMap& aData )
+{
+    RDebug::Print(_L("CEapAuthObserver::UsernamePasswordDlgDataReceived") ); 
+    
+    _LIT(KUsername, "username");
+    _LIT(KPassword, "password");
+    
+    CEapAuthNotifier::TEapDialogInfo PasswordInfo;
+    TDesC* Data = NULL;
+       
+    PasswordInfo.iIsIdentityQuery = EFalse; 
+    PasswordInfo.iPasswordPromptEnabled = EFalse;
+    
+    const CHbSymbianVariant *my_variant = aData.Get(KUsername); 
+    if ( my_variant != NULL )
+        {
+        ASSERT( my_variant->Type() == CHbSymbianVariant::EDes  );
+    
+        Data = reinterpret_cast<TDesC*>(my_variant->Data());       
+        PasswordInfo.iUsername.Copy( Data->Ptr(), Data->Length() );
+        PasswordInfo.iIsIdentityQuery = ETrue; 
+        RDebug::Print(_L("CEapAuthObserver::DataReceived: PasswordInfo.iUsername = %S\n"), &PasswordInfo.iUsername );
+        }
+    my_variant = aData.Get(KPassword);
+    if ( my_variant != NULL )
+        {
+        ASSERT( my_variant->Type() == CHbSymbianVariant::EDes  );
+    
+        Data = reinterpret_cast<TDesC*>(my_variant->Data());     
+        PasswordInfo.iPassword.Copy( Data->Ptr(), Data->Length() );
+        PasswordInfo.iPasswordPromptEnabled = ETrue;
+        RDebug::Print(_L("CEapAuthObserver::DataReceived: PasswordInfo.iPassword = %S\n"), &PasswordInfo.iPassword );
+        }
+       
+    iNotifier->SetSelectedUnameAndPwd( PasswordInfo );   
+}
+
+// ---------------------------------------------------------
+// void CEapAuthObserver::OldPwdQueryDataReceived
+// ---------------------------------------------------------
+//
+void CEapAuthObserver::OldPwdQueryDataReceived( CHbSymbianVariantMap& aData )
+{
+    RDebug::Print(_L("CEapAuthObserver::OldPwdQueryDataReceived") ); 
+    
+    _LIT(KPassword, "password");
+    
+    CEapAuthNotifier::TEapDialogInfo PasswordInfo;
+    TDesC* Data = NULL;
+          
+    const CHbSymbianVariant *my_variant = aData.Get(KPassword); 
+    if ( my_variant != NULL )
+        {
+        ASSERT( my_variant->Type() == CHbSymbianVariant::EDes  );
+    
+        Data = reinterpret_cast<TDesC*>(my_variant->Data());     
+        PasswordInfo.iOldPassword.Copy( Data->Ptr(), Data->Length() );
+
+        RDebug::Print(_L("CEapAuthObserver::OldPwdQueryDataReceived: PasswordInfo.iOldPassword = %S\n"), &PasswordInfo.iOldPassword );
+        }
+       
+    iNotifier->SetSelectedOldPassword( PasswordInfo );   
+}
+
+// ---------------------------------------------------------
+// void CEapAuthObserver::PwdQueryDataReceived
+// ---------------------------------------------------------
+//
+void CEapAuthObserver::PwdQueryDataReceived( CHbSymbianVariantMap& aData )
+{
+    RDebug::Print(_L("CEapAuthObserver::PwdQueryDataReceived") ); 
+    
+    _LIT(KPassword, "password");
+    
+    CEapAuthNotifier::TEapDialogInfo PasswordInfo;
+    TDesC* Data = NULL;
+           
+    const CHbSymbianVariant *my_variant = aData.Get(KPassword); 
+    if ( my_variant != NULL )
+        {
+        ASSERT( my_variant->Type() == CHbSymbianVariant::EDes  );
+    
+        Data = reinterpret_cast<TDesC*>(my_variant->Data());     
+        PasswordInfo.iPassword.Copy( Data->Ptr(), Data->Length() );
+
+        RDebug::Print(_L("CEapAuthObserver::PwdQueryDataReceived: PasswordInfo.iPassword = %S\n"), &PasswordInfo.iPassword );
+        }
+       
+    iNotifier->SetSelectedPassword( PasswordInfo );   
+}
+
+// ---------------------------------------------------------
+// void CEapAuthObserver::DeviceDialogClosed
+// ---------------------------------------------------------
+//
+void CEapAuthObserver::DeviceDialogClosed( TInt /*aCompletionCode*/ )
+{
+    // Dialog was closed, let's complete with that error code
+    RDebug::Print(_L("CEapAuthObserver::DeviceDialogClosed"));
+    
+    TInt status = KErrCancel;
+    
+    if ( iType != CEapAuthNotifier::EEapNotifierTypeFastStartAuthProvWaitNote &&
+         iType != CEapAuthNotifier::EEapNotifierTypeFastStartUnauthProvWaitNote )
+        {
+        TRAP_IGNORE( iNotifier->CompleteL( status ));
+        }
+}
+
+
--- a/eapol/eapol_framework/eapol_symbian/am/eap_test_timer/symbian/eap_test_timer.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/eap_test_timer/symbian/eap_test_timer.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_symbian/am/eapvpnif/data/10200ec9.rss	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/eapvpnif/data/10200ec9.rss	Mon May 24 20:32:47 2010 +0300
@@ -17,7 +17,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: 9.1.2 %
 */
 
 #include <ecom/registryinfo.rh>
--- a/eapol/eapol_framework/eapol_symbian/am/eapvpnif/data/10200eca.rss	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/eapvpnif/data/10200eca.rss	Mon May 24 20:32:47 2010 +0300
@@ -17,10 +17,10 @@
 */
 
 /*
-* %version: 11 %
+* %version: 9.1.2 %
 */
 
-#include <ecom/RegistryInfo.rh>
+#include <ecom/registryinfo.rh>
 
 RESOURCE REGISTRY_INFO theInfo
 	{
--- a/eapol/eapol_framework/eapol_symbian/am/eapvpnif/inc/eap_vpn_if_implementation.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/eapvpnif/inc/eap_vpn_if_implementation.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 21 %
+* %version: 19.1.11 %
 */
 
 #ifndef __EAPPLUGIN_H__
@@ -27,17 +27,20 @@
 
 #include <wdbifwlansettings.h>
 #include "eap_vpn_if.h"
-#include "abs_eap_core.h"
+//#include "abs_eap_core.h"
 #include "eapol_session_key.h"
-#include "eap_core.h"
 #include "eap_am_tools_symbian.h"
 #include "EapType.h"
 #include "EapolTimer.h"
+#include "abs_eap_session_core.h"
 
 // FORWARD DECLARATIONS
 class CEapType;
+class CEapTypePlugin;
 class eap_am_tools_symbian_c;
 class eap_file_config_c;
+class eap_session_core_base_c;
+class eap_process_tlv_message_data_c;
 
 /**
  * Class:       CEapVpnInterfaceImplementation
@@ -48,7 +51,7 @@
  */
 class CEapVpnInterfaceImplementation
 	: public CEapVpnInterface
-	, public abs_eap_core_c
+	, public abs_eap_session_core_c
 	, public abs_eap_base_timer_c
 {
 public:
@@ -320,6 +323,35 @@
     eap_status_e timer_delete_data(
         const u32_t id, void *data);
 
+	eap_status_e complete_get_802_11_authentication_mode(
+		const eap_status_e completion_status,
+		const eap_am_network_id_c * const receive_network_id,
+		const eapol_key_802_11_authentication_mode_e mode);
+
+	eap_status_e complete_remove_eap_session(
+		const bool complete_to_lower_layer,
+		const eap_am_network_id_c * const receive_network_id);
+
+#if defined(USE_EAP_SIMPLE_CONFIG)
+	/**
+	 * This function tells AM to save SIMPLE_CONFIG configuration parameters.
+	 * This is always syncronous call.
+	 */
+	eap_status_e save_simple_config_session(
+		const simple_config_state_e state,
+		EAP_TEMPLATE_CONST eap_array_c<simple_config_credential_c> * const credential_array,
+		const eap_variable_data_c * const new_password,
+		const simple_config_Device_Password_ID_e Device_Password_ID,
+		const simple_config_payloads_c * const other_configuration
+		);
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+
+	static eap_session_core_base_c * new_eap_core_client_message_if_c(
+		abs_eap_am_tools_c * const tools,
+		abs_eap_session_core_c * const partner,
+		const bool is_client_when_true,
+		const u32_t MTU);
+
 private:
 
     TInt CompleteAssociation(const TInt aResult);
@@ -327,6 +359,13 @@
     
     eap_status_e create_upper_stack();
 
+	eap_status_e add_configuration_data(
+		eap_process_tlv_message_data_c * const message,
+		const eap_configuration_field_c * field,
+		const eap_configure_type_e type,
+		const eap_variable_data_c * const value_data
+		);
+
 protected:
 
 	/**
@@ -355,25 +394,17 @@
     TBool iQueryIdentity;
 
     /// Pointer to the lower layer in the stack
-    MAbsEapVpnInterface* iCaller;
+    MAbsEapVpnInterface * iCaller;
 
     /// Pointer to the upper layer in the stack
-    eap_core_c* iEapCore;
+    eap_session_core_base_c * iEapCore;
 
-#ifdef USE_EAP_EXPANDED_TYPES
-    
     eap_type_value_e iRequestedEapType;
 
-#else
-    
-    TUint8 iRequestedEapType;
+    /// Pointer to the tools class
+    eap_am_tools_symbian_c * m_am_tools;
 
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-    
-    /// Pointer to the tools class
-    eap_am_tools_symbian_c* m_am_tools;
-
-    eap_am_network_id_c* m_receive_network_id;
+    eap_am_network_id_c * m_receive_network_id;
 
 	eap_variable_data_c * m_trace_log_file_name;
     
@@ -388,9 +419,10 @@
     bool m_is_client;	
 
     /// Array for storing the loaded EAP types.
-    RPointerArray<CEapType> m_plugin_if_array;
+    RPointerArray<CEapType> m_eap_if_array;
 
-#ifdef USE_EAP_EXPANDED_TYPES
+    /// Array for storing the loaded EAP types.
+    RPointerArray<CEapTypePlugin> m_eap_plugin_if_array;
 
 	/// Enabled expanded EAP configuration data from CommsDat
 	// This is for the outer most EAP (not tunneled)
@@ -403,23 +435,13 @@
 	/// Array which corresponds with m_plugin_if_array and indicates the types of the loaded EAP types.	
 	eap_array_c<eap_type_value_e> * m_eap_type_array;
 
-#else
-
-    /// EAP configuration data from CommDb
-    TEapArray m_iap_eap_array;
-
-    /// Array which corresponds with m_plugin_if_array and indicates the types of the loaded EAP types.
-    RArray<TUint8> m_eap_type_array;
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
     /// Indicates the bearer type
     TIndexType m_index_type;
 
     /// Indicates the service index in CommDb
     TInt m_index;
 
-    eap_file_config_c* m_fileconfig;
+    eap_file_config_c * m_fileconfig;
 
     u32_t m_packet_index;
 
@@ -427,9 +449,9 @@
 
     bool m_stack_marked_to_be_deleted;
 
-    HBufC8* iManualUsername;
-    HBufC8* iManualRealm;
-    HBufC8* iRealmPrefix;
+    HBufC8 * iManualUsername;
+    HBufC8 * iManualRealm;
+    HBufC8 * iRealmPrefix;
     TBool iHideInitialIdentity;    
 };
 
--- a/eapol/eapol_framework/eapol_symbian/am/eapvpnif/inc/eap_vpn_if_resolver.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/eapvpnif/inc/eap_vpn_if_resolver.h	Mon May 24 20:32:47 2010 +0300
@@ -17,7 +17,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 #ifndef __EAPPLUGINRESOLVER_H__
--- a/eapol/eapol_framework/eapol_symbian/am/eapvpnif/inc/eap_vpn_if_timer.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/eapvpnif/inc/eap_vpn_if_timer.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 6 %
+* %version: %
 */
 
 #if !defined(_EAPOL_TIMER_H_)
--- a/eapol/eapol_framework/eapol_symbian/am/eapvpnif/src/eap_vpn_if_implementation.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/eapvpnif/src/eap_vpn_if_implementation.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,13 +16,16 @@
 */
 
 /*
-* %version: 38.1.5 %
+* %version: 59 %
 */
 
 // INCLUDE FILES
 #include <w32std.h>
 #include <pathinfo.h>
 
+#include <EapType.h>
+#include <EapTypePlugin.h>
+
 #include "eap_vpn_if_implementation.h"
 #include "eap_am_memory.h"
 #include "eap_tools.h"
@@ -32,13 +35,19 @@
 #include "eap_type_gsmsim.h"
 #include "eap_type_aka.h"
 #include "eap_header_string.h"
-#include "EapolDbDefaults.h"
-#include "EapolDbParameterNames.h"
+//#include "EapolDbDefaults.h"
+//#include "EapolDbParameterNames.h"
 #include "eap_am_file_input_symbian.h"
 #include "abs_eap_vpn_if.h"
 #include "eap_array_algorithms.h"
+#include "eap_core.h"
 
 #include "EapSimDbDefaults.h"
+#include "EapConversion.h"
+#include "eap_session_core_base.h"
+#include "eap_automatic_variable.h"
+#include "eap_core_client_message_if.h"
+#include "eap_process_tlv_message_data.h"
 
 // LOCAL CONSTANTS
 const TUint KMaxConfigStringLength = 256;
@@ -46,12 +55,6 @@
 const u32_t KTrailerLength = 0;
 const u32_t KHeaderOffset = 0;
 
-#ifndef USE_EAP_EXPANDED_TYPES
-
-static const TUint KMaxEapCueLength = 3;
-
-#endif //#ifndef USE_EAP_EXPANDED_TYPES
-
 #define KEapIdentityOffset 5
 const eap_const_string EAPPLUGIN_TRACE_FILE = EAPL("logs\\eapol\\eap_vpn_if.txt");
 
@@ -91,9 +94,7 @@
 CEapVpnInterfaceImplementation::CEapVpnInterfaceImplementation()
 : m_trace_log_file_name(0)
 , m_is_client(true)
-#ifdef USE_EAP_EXPANDED_TYPES
 , m_eap_type_array(0)
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
 , m_index_type(EVpn)
 , m_index(EAP_VPN_DEFAULT_SERVICE_TABLE_INDEX)
 {
@@ -215,18 +216,12 @@
 		CleanupStack::PopAndDestroy(buf); // Delete pathbuffer.
 	}
     
-
-#ifdef USE_EAP_EXPANDED_TYPES
-
 	m_eap_type_array = new eap_array_c<eap_type_value_e>(m_am_tools);
 	if (m_eap_type_array == 0)
 	{
 		User::Leave(KErrGeneral);
 	}
 
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
-
     //------ Create network id
 	{
 		EAP_TRACE_DEBUG(
@@ -386,15 +381,25 @@
 		delete m_receive_network_id;
 	}
 
-	// Unload all loaded plugins
-	for(int i = 0; i < m_plugin_if_array.Count(); i++)
 	{
-		delete m_plugin_if_array[i];
+		// Unload all loaded EAP-interfaces.
+		for(int i = 0; i < m_eap_if_array.Count(); i++)
+		{
+			delete m_eap_if_array[i];
+		}
+
+		m_eap_if_array.Close();
 	}
 
-	m_plugin_if_array.Close();
-
-#ifdef USE_EAP_EXPANDED_TYPES
+	{
+		// Unload all loaded EAP-plugins.
+		for(int i = 0; i < m_eap_plugin_if_array.Count(); i++)
+		{
+			delete m_eap_plugin_if_array[i];
+		}
+
+		m_eap_plugin_if_array.Close();
+	}
 
 	m_enabled_expanded_eap_array.ResetAndDestroy();
 
@@ -405,15 +410,6 @@
 	delete m_eap_type_array;
 	m_eap_type_array = 0;
 
-#else // For normal EAP type.
-
-	// Delete the IAP EAP type info array
-	m_iap_eap_array.ResetAndDestroy();
-
-	m_eap_type_array.Close();
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
 	delete iManualUsername;
 	iManualUsername = NULL;
 
@@ -683,8 +679,6 @@
 	// Clear packet send and notification blocking.
 	m_block_packet_sends_and_notifications = false;
 
-#ifdef USE_EAP_EXPANDED_TYPES
-
 	if (m_enabled_expanded_eap_array.Count() == 0)
 	{
 		// The EAP field was empty. Allow all types.
@@ -758,60 +752,6 @@
 		CleanupStack::PopAndDestroy(&eapArray);
 	}
 
-#else // For normal EAP type.
-
-	if (m_iap_eap_array.Count() == 0)
-	{
-		// The EAP field was empty. Allow all types.
-
-		EAP_TRACE_ALWAYS(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("Empty EAP field -> enable all types.\n")));
-
-		RImplInfoPtrArray eapArray;
-		CleanupStack::PushL( TCleanupItem( CleanupImplArray, &eapArray ) );
-
-		REComSession::ListImplementationsL(KEapTypeInterfaceUid, eapArray);
-
-		for (TInt i = 0; i < eapArray.Count(); i++)
-		{
-			TEap *eap = new(ELeave) TEap;
-			eap->UID.Copy(eapArray[i]->DataType());
-			eap->Enabled = EFalse;
-
-			// Convert the string to integer
-			TLex8 tmp(eap->UID);
-			TInt val(0);
-			tmp.Val(val);
-
-			if(val == iRequestedEapType)
-			{
-				eap->Enabled = ETrue;
-
-				EAP_TRACE_ALWAYS(
-					m_am_tools,
-					TRACE_FLAGS_DEFAULT,
-					(EAPL("EAP-Type %d enabled\n"), val));
-
-				m_iap_eap_array.Insert(eap, 0);
-			}
-			else
-			{
-				m_iap_eap_array.Append(eap);
-
-				EAP_TRACE_ALWAYS(
-					m_am_tools,
-					TRACE_FLAGS_DEFAULT,
-					(EAPL("EAP-Type %d disabled\n"), val));
-			}
-		} // for()
-
-		CleanupStack::PopAndDestroy(&eapArray);
-	}
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
 	CompleteAssociation(status);
 
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
@@ -1078,7 +1018,11 @@
 
 	if (iEapCore == 0)
 	{        
-		iEapCore = new eap_core_c(m_am_tools, this, m_is_client, m_receive_network_id, EFalse);
+		iEapCore = new_eap_core_client_message_if_c(
+			m_am_tools,
+			this,
+			true,
+			KMTU);
 
 		if (iEapCore == 0
 			|| iEapCore->get_is_valid() != true)
@@ -1323,96 +1267,186 @@
 
 	EAP_ASSERT_TOOLS(m_am_tools, (type == iRequestedEapType));
 
-#ifdef USE_EAP_EXPANDED_TYPES
-
-		TBuf8<KExpandedEapTypeSize> cue;
-		
-		// Some indirect way of forming the 8 byte string of an EAP type for the cue is needed here.		
-		TUint8 tmpExpCue[KExpandedEapTypeSize];
-
-		// This is to make the tmpExpCue in 8 byte string with correct vendor type and vendor id details.
-		status = eap_expanded_type_c::write_type(m_am_tools,
-												0, // index should be zero here.
-												tmpExpCue,
-												KExpandedEapTypeSize,
-												true,
-												iRequestedEapType);
-		if (status != eap_status_ok)
+	TEapExpandedType aEapType;
+
+	TInt error = CEapConversion::ConvertInternalTypeToExpandedEAPType(
+		&iRequestedEapType,
+		&aEapType);
+	if (error != KErrNone)
+	{
+		EAP_TRACE_DEBUG_SYMBIAN(
+			(_L("ERROR: CEapVpnInterfaceImplementation::load_module(): Error from CEapConversion::ConvertExpandedEAPTypeToInternalType()=%d\n"),
+			error));		
+	
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(error));
+	}
+
+	i32_t eapArrayIndex = -1;
+
+	{
+		CEapType* eapType = 0;
+
+		// Check if this EAP type has already been loaded
+		eapArrayIndex = find<eap_type_value_e>(
+			m_eap_type_array,
+			&iRequestedEapType,
+			m_am_tools);
+
+		if (eapArrayIndex >= 0)
+		{
+			// Yep. It was loaded already.
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("CEapVpnInterfaceImplementation: EAP Type Already loaded\n")));
+
+			eapType = m_eap_if_array[eapArrayIndex];		
+		}
+		else 
+		{
+			// We must have a trap here since the EAP core knows nothing about Symbian.
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("CEapVpnInterfaceImplementation: EAP Type new\n")));
+
+			TRAP(error, (eapType = CEapType::NewL(m_index_type, m_index, aEapType)));	
+
+			if (error != KErrNone
+				|| eapType == 0)
+			{
+				// Interface not found or implementation creation function failed
+				
+				delete eapType;
+				eapType = 0;
+				
+				EAP_TRACE_DEBUG(
+					m_am_tools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("CEapVpnInterfaceImplementation: EAP Type new, unable to load\n")));
+				EAP_TRACE_ALWAYS(
+					m_am_tools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("ECom could not find/initiate implementation.\n")));
+				return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+			}
+
+			// Add EAP-interface information to the member arrays.
+			if (m_eap_if_array.Append(eapType) != KErrNone)
+			{
+				delete eapType;
+				status = eap_status_allocation_error;
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);				
+			}
+		}
+
+		//--------------------------------------------------------
+		//--------------------------------------------------------
+		// Set the values for realm and user name if there is any.
+		// If there is no values the default settings will be used( automatic realm and username).
+
+
 		{
 			EAP_TRACE_DEBUG(
 				m_am_tools,
 				TRACE_FLAGS_DEFAULT,
-				(EAPL("load_module: eap_expanded_type_c::write_type failed \n")));
-		
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
+				(EAPL("CEapVpnInterfaceImplementation::load_module - About to configure manual/auto username and manual/auto realm \n")));
 		
-		// Now copy the 8 byte string to the real expanded cue.
-		cue.Copy(tmpExpCue, KExpandedEapTypeSize);
-
-		EAP_TRACE_DATA_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("EAPOL:CEapVpnInterfaceImplementation::load_module: Expanded CUE:"),
-			cue.Ptr(),
-			cue.Size()));
-
-#else
-
-	TBuf8<KMaxEapCueLength> cue;
-	cue.Num(static_cast<TInt>(iRequestedEapType));
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
-	CEapType* eapType = 0;
-	TInt error(KErrNone);
-
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	// Check if this EAP type has already been loaded
-	TInt eapArrayIndex = find<eap_type_value_e>(
-		m_eap_type_array,
-		&iRequestedEapType,
-		m_am_tools);
-
-	if (eapArrayIndex >= 0)
-
-#else // For normal EAP type.
-
-	// Check if this EAP type has already been loaded
-	TInt eapArrayIndex = m_eap_type_array.Find(iRequestedEapType);
-
-	if (eapArrayIndex != KErrNotFound)
-
-#endif
+			EAPSettings* setSettings = new EAPSettings;
+			if( setSettings == NULL )     
+			{
+				EAP_TRACE_DEBUG(
+					m_am_tools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("CEapVpnInterfaceImplementation::load_module - EAPSettings allocation error \n")));
+	    		
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);				
+			}
+			
+			if(iRequestedEapType == eap_type_aka)
+			{
+				setSettings->iEAPExpandedType = *EapExpandedTypeAka.GetType();
+				
+			}
+			else if(iRequestedEapType == eap_type_gsmsim)
+			{
+				setSettings->iEAPExpandedType = *EapExpandedTypeSim.GetType();
+			}
+			else
+			{
+				delete setSettings;
+				setSettings = 0;
+
+				// Only EAP-SIM and AKA are possible now.
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_eap_type);
+			}
+			
+			if(iManualUsername && iManualUsername->Length() != 0)
+			{
+    			setSettings->iUsernamePresent = ETrue; // Same value for both SIM and AKA.
+	    		setSettings->iUsername.Copy(iManualUsername->Des());
+			}
+			else
+			{
+	    		// No user name. we have to set automatic now.
+	    		setSettings->iUsernamePresent = EFalse; // Same value for both SIM and AKA.
+	    		setSettings->iUseAutomaticUsernamePresent = ETrue; // Same value for both SIM and AKA.
+	    		setSettings->iUseAutomaticUsername = ETrue; // Same value for both SIM and AKA.
+			}
+			
+			if(iManualRealm && iManualRealm->Length() != 0)
+			{
+	    		setSettings->iRealmPresent = ETrue; // Same value for both SIM and AKA.
+	    		setSettings->iRealm.Copy(iManualRealm->Des());
+			}
+			else
+			{
+	    		// No realm. we have to set automatic now.
+	    		setSettings->iRealmPresent = EFalse; // Same value for both SIM and AKA.
+	    		setSettings->iUseAutomaticRealmPresent = ETrue; // Same value for both SIM and AKA.
+	    		setSettings->iUseAutomaticRealm = ETrue; // Same value for both SIM and AKA.
+			}    
+			
+			TRAP(error, eapType->SetConfigurationL(*setSettings) );
+			if ( error != KErrNone )
+			{
+				EAP_TRACE_DEBUG(
+					m_am_tools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("CEapVpnInterfaceImplementation::load_module - Setting Manual Username and Realm failed.error=%d, Continuing \n")));
+			}
+			
+			delete setSettings;
+			setSettings = 0;    
+		}
+	}
+    
+	//--------------------------------------------------------
+	//--------------------------------------------------------
+	
+	// Create the EAP protocol interface implementation.
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapVpnInterfaceImplementation: EAP Type new, GetStackInterfaceL()\n")));
+
 
 	{
-		// Yep. It was loaded already.
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("CEapVpnInterfaceImplementation: EAP Type Already loaded\n")));
-
-		eapType = m_plugin_if_array[eapArrayIndex];		
-	}
-	else 
-	{
-		// We must have a trap here since the EAP core knows nothing about Symbian.
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("CEapVpnInterfaceImplementation: EAP Type new\n")));
-
-		TRAP(error, (eapType = CEapType::NewL(cue, m_index_type, m_index)));	
+		CEapTypePlugin* eapPlugin = 0;
+
+		TRAP(error, (eapPlugin = CEapTypePlugin::NewL(aEapType.GetValue(), m_index_type, m_index)));
 
 		if (error != KErrNone
-			|| eapType == 0)
+			|| eapPlugin == 0)
 		{
 			// Interface not found or implementation creation function failed
 			
-			delete eapType;
-			eapType = 0;
+			delete eapPlugin;
+			eapPlugin = 0;
 			
 			EAP_TRACE_DEBUG(
 				m_am_tools,
@@ -1424,197 +1458,112 @@
 				(EAPL("ECom could not find/initiate implementation.\n")));
 			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
 		}
-	}
-
-	//--------------------------------------------------------
-	//--------------------------------------------------------
-	// Set the values for realm and user name if there is any.
-	// If there is no values the default settings will be used( automatic realm and username).
-
-
-	{
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("CEapVpnInterfaceImplementation::load_module - About to configure manual/auto username and manual/auto realm \n")));
-	
-	    EAPSettings* setSettings = new EAPSettings;
-		if( setSettings == NULL )     
+
+#ifdef USE_EAP_SIMPLE_CONFIG
+
+		TRAP(error, (*eap_type_if = eapPlugin->GetStackInterfaceL(
+			m_am_tools, 
+			partner, 
+			is_client_when_true, 
+			receive_network_id,
+			0))); // Check this up.
+
+#else
+
+		TRAP(error, (*eap_type_if = eapPlugin->GetStackInterfaceL(
+			m_am_tools, 
+			partner, 
+			is_client_when_true, 
+			receive_network_id)));
+
+#endif // #ifdef USE_EAP_SIMPLE_CONFIG
+
+		if (error != KErrNone 
+			|| *eap_type_if == 0 
+			|| (*eap_type_if)->get_is_valid() == false)
 		{
 			EAP_TRACE_DEBUG(
 				m_am_tools,
 				TRACE_FLAGS_DEFAULT,
-				(EAPL("CEapVpnInterfaceImplementation::load_module - EAPSettings allocation error \n")));
-	    	
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);				
-		}
-	    
-		if(iRequestedEapType == eap_type_aka)
-		{
-			setSettings->iEAPType = EAPSettings::EEapAka;
-			
-		}
-		else if(iRequestedEapType == eap_type_gsmsim)
-		{
-			setSettings->iEAPType = EAPSettings::EEapSim;
+				(EAPL("CEapVpnInterfaceImplementation: EAP Type new, GetStackInterfaceL(), failed = %d\n"), error));
+
+			EAP_TRACE_ALWAYS(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("Could not create EAP type interface instance. Error: %d\n"), error));
+
+			status = eap_status_allocation_error;
+
+			// Unload DLL (two ways, depending whether this type was already loaded...)
+			if  (eapArrayIndex < 0)
+			{
+				// No need to call shutdown here because GetStackInterfaceL has done it.
+				delete m_eap_if_array[m_eap_if_array.Count() - 1];
+				m_eap_if_array.Remove(m_eap_if_array.Count() - 1);
+
+				delete eapPlugin;
+			}
+			else
+			{
+				unload_module((eap_type_value_e)iRequestedEapType);
+			}
+			// Note: even in error cases eap_core_c deletes eap_type_if
 		}
 		else
 		{
-			delete setSettings;
-			setSettings = 0;
-
-			// Only EAP-SIM and AKA are possible now.
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_eap_type);
-		}
-	    
-	    if(iManualUsername && iManualUsername->Length() != 0)
-	    {
-    		setSettings->iUsernamePresent = EGSMSIMUseManualUsernameYes; // Same value for both SIM and AKA.
-	    	setSettings->iUsername.Copy(iManualUsername->Des());
-	    }
-	    else
-	    {
-	    	// No user name. we have to set automatic now.
-	    	setSettings->iUsernamePresent = EGSMSIMUseManualUsernameNo; // Same value for both SIM and AKA.
-	    }
-	    
-	    if(iManualRealm && iManualRealm->Length() != 0)
-	    {
-	    	setSettings->iRealmPresent = EGSMSIMUseManualRealmYes; // Same value for both SIM and AKA.
-	    	setSettings->iRealm.Copy(iManualRealm->Des());
-	    }
-	    else
-	    {
-	    	// No realm. we have to set automatic now.
-	    	setSettings->iRealmPresent = EGSMSIMUseManualRealmNo; // Same value for both SIM and AKA.
-	    }    
-	    
-		TRAP(error, eapType->SetConfigurationL(*setSettings) );
-	    if ( error != KErrNone )
-	    {
 			EAP_TRACE_DEBUG(
 				m_am_tools,
 				TRACE_FLAGS_DEFAULT,
-				(EAPL("CEapVpnInterfaceImplementation::load_module - Setting Manual Username and Realm failed.error=%d, Continuing \n")));
-	    }
-	    
-	    delete setSettings;
-	    setSettings = 0;    
-	}
-    
-	//--------------------------------------------------------
-	//--------------------------------------------------------
-	
-	// Create the EAP protocol interface implementation.
-	EAP_TRACE_DEBUG(
-		m_am_tools,
-		TRACE_FLAGS_DEFAULT,
-		(EAPL("CEapVpnInterfaceImplementation: EAP Type new, GetStackInterfaceL()\n")));
-
-#ifdef USE_EAP_SIMPLE_CONFIG
-
-	TRAP(error, (*eap_type_if = eapType->GetStackInterfaceL(
-		m_am_tools, 
-		partner, 
-		is_client_when_true, 
-		receive_network_id,
-		0))); // Check this up.
-
-#else
-
-	TRAP(error, (*eap_type_if = eapType->GetStackInterfaceL(
-		m_am_tools, 
-		partner, 
-		is_client_when_true, 
-		receive_network_id)));
-
-#endif // #ifdef USE_EAP_SIMPLE_CONFIG
-
-	if (error != KErrNone 
-		|| *eap_type_if == 0 
-		|| (*eap_type_if)->get_is_valid() == false)
-	{
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("CEapVpnInterfaceImplementation: EAP Type new, GetStackInterfaceL(), failed = %d\n"), error));
-
-		EAP_TRACE_ALWAYS(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("Could not create EAP type interface instance. Error: %d\n"), error));
-
-		status = eap_status_allocation_error;
-
-		// Unload DLL (two ways, depending whether this type was already loaded...)
-		if  (eapArrayIndex == KErrNotFound)
-		{
-			// No need to call shutdown here because GetStackInterfaceL has done it.
-			delete eapType;
+				(EAPL("CEapVpnInterfaceImplementation: EAP Type new, GetStackInterfaceL(), success\n")));
+
+			status = eap_status_ok;
+
+			if (eapArrayIndex  < 0)
+			{
+				// Add plugin information to the member arrays. There is no need to store eap_type pointer because
+				// the stack takes care of its deletion.
+				if (m_eap_plugin_if_array.Append(eapPlugin) != KErrNone)
+				{
+					delete m_eap_if_array[m_eap_if_array.Count() - 1];
+					m_eap_if_array.Remove(m_eap_if_array.Count() - 1);
+
+					delete eapPlugin;
+					status = eap_status_allocation_error;
+					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+					return EAP_STATUS_RETURN(m_am_tools, status);				
+				}
+
+				eap_type_value_e * tmpEAPType = new eap_type_value_e();
+				if(tmpEAPType == NULL)
+				{
+					EAP_TRACE_DEBUG(
+						m_am_tools,
+						TRACE_FLAGS_DEFAULT,
+						(EAPL("eapol_am_wlan_authentication_symbian_c::load_module() eap_type_value_e creation failed\n")));
+					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+					return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);				
+				}
+				
+				*tmpEAPType = type;
+				
+				status = m_eap_type_array->add_object(tmpEAPType, true);
+				
+				if (status != eap_status_ok)			
+				{
+					delete m_eap_if_array[m_eap_if_array.Count() - 1];
+					m_eap_if_array.Remove(m_eap_if_array.Count() - 1);
+
+					// Remove the eap type added just previously
+					m_eap_plugin_if_array.Remove(m_eap_plugin_if_array.Count() - 1);
+					delete eapPlugin;
+
+					status = eap_status_allocation_error;
+
+					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+					return EAP_STATUS_RETURN(m_am_tools, status);				
+				}
+			} 
 		}
-		else
-		{
-			unload_module((eap_type_value_e)iRequestedEapType);
-		}
-		// Note: even in error cases eap_core_c deletes eap_type_if
-	}
-	else
-	{
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("CEapVpnInterfaceImplementation: EAP Type new, GetStackInterfaceL(), success\n")));
-
-		status = eap_status_ok;
-
-		if (eapArrayIndex  == KErrNotFound)
-		{
-			// Add plugin information to the member arrays. There is no need to store eap_type pointer because
-			// the stack takes care of its deletion.
-			if (m_plugin_if_array.Append(eapType) != KErrNone)
-			{
-				delete eapType;
-				status = eap_status_allocation_error;
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);				
-			}
-
-#ifdef USE_EAP_EXPANDED_TYPES
-
-			eap_type_value_e * tmpEAPType = new eap_type_value_e();
-			if(tmpEAPType == NULL)
-			{
-				EAP_TRACE_DEBUG(
-					m_am_tools,
-					TRACE_FLAGS_DEFAULT,
-					(EAPL("eapol_am_wlan_authentication_symbian_c::load_module() eap_type_value_e creation failed\n")));
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);				
-			}
-			
-			*tmpEAPType = type;
-			
-			status = m_eap_type_array->add_object(tmpEAPType, true);
-			
-			if (status != eap_status_ok)			
-
-#else // For normal EAP type.			
-
-			if (m_eap_type_array.Append(iRequestedEapType) != KErrNone)
-
-#endif
-			{
-				// Remove the eap type added just previously
-				m_plugin_if_array.Remove(m_plugin_if_array.Count() - 1);
-				delete eapType;
-				status = eap_status_allocation_error;
-
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);				
-			}
-		} 
 	}
 
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -1630,8 +1579,6 @@
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 	eap_status_e status(eap_status_type_does_not_exists_error);
 
-#ifdef USE_EAP_EXPANDED_TYPES
-
 	// Check if this EAP type has already been loaded
 	TInt index = find<eap_type_value_e>(
 		m_eap_type_array,
@@ -1642,26 +1589,15 @@
 	{
 		// EAP was loaded before.
 		
-		delete m_plugin_if_array[index];
-		m_plugin_if_array.Remove(index);
+		delete m_eap_if_array[index];
+		m_eap_if_array.Remove(index);
+		
+		delete m_eap_plugin_if_array[index];
+		m_eap_plugin_if_array.Remove(index);
 		
 		status = m_eap_type_array->remove_object(index);
 	}
 
-#else // For normal EAP types.
-
-	TInt index = m_eap_type_array.Find(type);
-
-	if (index != KErrNotFound)
-	{
-		delete m_plugin_if_array[index];
-		m_plugin_if_array.Remove(index);
-		m_eap_type_array.Remove(index);
-		status = eap_status_ok;			
-	}
-
-#endif
-
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
@@ -1758,6 +1694,82 @@
 	return EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(status));
 }
 
+
+eap_status_e CEapVpnInterfaceImplementation::add_configuration_data(
+	eap_process_tlv_message_data_c * const message,
+	const eap_configuration_field_c * field,
+	const eap_configure_type_e type,
+	const eap_variable_data_c * const value_data
+    )
+{
+	eap_variable_data_c selector(m_am_tools);
+
+	eap_status_e status = selector.set_buffer(
+		field->get_field(),
+		field->get_field_length(),
+		false,
+		false);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return status;
+	}
+
+	eap_config_value_c config(m_am_tools);
+
+	if (config.get_is_valid() == false)
+	{
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	config.set_type(eap_configure_type_hex_data);
+
+	status = config.get_data()->set_copy_of_buffer(
+		value_data);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	status = message->add_parameter_data(
+		&selector,
+		&config);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+
+const TUint32 K2DigitMncMccList[]
+	= {
+		202,204,206,208,213,214,216,218,
+		219,220,222,226,228,230,231,232,
+		234,238,240,242,244,246,247,248,
+		250,255,257,259,260,262,266,268,
+		270,272,274,276,278,280,282,284,
+		286,288,290,293,294,295,308,340,
+		362,363,400,401,402,404,410,413,
+		414,415,416,417,419,420,421,422,
+		424,425,426,427,428,429,432,434,
+		436,437,438,440,441,452,454,455,
+		456,457,460,470,472,502,505,510,
+		515,520,525,528,530,537,539,541,
+		546,547,549,602,603,604,605,607,
+		608,609,610,611,612,613,614,615,
+		616,617,619,620,621,622,623,624,
+		625,626,628,629,630,631,633,634,
+		635,636,638,639,640,641,642,643,
+		645,646,647,648,649,650,651,652,
+		653,654,655,702,704,706,710,712,
+		714,716,724,730,734,744,746,901
+	};
+
 /**
  * The read_configure() function reads the configuration data identified
  * by the field string of field_length bytes length. Adaptation module must direct
@@ -1789,6 +1801,496 @@
 
 	// Check if the wanted parameter is default type
 
+	if (field->get_type() == eap_configure_type_all_configurations
+		&& field->compare(
+			m_am_tools,
+			cf_str_EAP_read_all_configurations.get_field()) == true)
+	{
+		// Copy all special configurations to data.
+
+		eap_process_tlv_message_data_c message(m_am_tools);
+
+		if (message.get_is_valid() == false)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		{
+			// cf_str_EAP_default_type_hex_data and cf_str_EAP_server_default_type_hex_data
+
+			eap_variable_data_c value_data(m_am_tools);
+			if (value_data.get_is_valid() == false)
+			{
+				return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+			}
+
+			// Now there are enabled EAP type, we need to take the first EAP type from the arrary.
+			SEapExpandedType * expandedEAPType = m_enabled_expanded_eap_array[0]; //First item.
+
+			status = value_data.set_copy_of_buffer(
+				expandedEAPType->EapExpandedType.Ptr(),
+				KExpandedEapTypeSize);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);			
+			}
+
+			status = add_configuration_data(
+				&message,
+				cf_str_EAP_default_type_hex_data.get_field(),
+				eap_configure_type_hex_data,
+				&value_data);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);			
+			}
+
+			status = add_configuration_data(
+				&message,
+				cf_str_EAP_server_default_type_hex_data.get_field(),
+				eap_configure_type_hex_data,
+				&value_data);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);			
+			}
+		}
+
+		{
+			// cf_str_EAP_GSMSIM_UMA_profile, cf_str_EAP_AKA_UMA_profile,
+			// cf_str_EAP_GSMSIM_wait_eap_success_packet and cf_str_EAP_AKA_wait_eap_success_packet
+
+			TInt val(1);
+
+			eap_variable_data_c value_data(m_am_tools);
+			if (value_data.get_is_valid() == false)
+			{
+				return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+			}
+
+			status = value_data.set_copy_of_buffer((u8_t*) &val, sizeof(TUint));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);			
+			}
+
+			status = add_configuration_data(
+				&message,
+				cf_str_EAP_GSMSIM_UMA_profile.get_field(),
+				eap_configure_type_boolean,
+				&value_data);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);			
+			}
+
+			status = add_configuration_data(
+				&message,
+				cf_str_EAP_AKA_UMA_profile.get_field(),
+				eap_configure_type_boolean,
+				&value_data);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);			
+			}
+
+			status = add_configuration_data(
+				&message,
+				cf_str_EAP_GSMSIM_wait_eap_success_packet.get_field(),
+				eap_configure_type_boolean,
+				&value_data);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);			
+			}
+
+			status = add_configuration_data(
+				&message,
+				cf_str_EAP_AKA_wait_eap_success_packet.get_field(),
+				eap_configure_type_boolean,
+				&value_data);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);			
+			}
+		}
+
+		{
+			// cf_str_EAP_GSMSIM_UMA_realm_prefix and cf_str_EAP_AKA_UMA_realm_prefix
+
+			eap_variable_data_c value_data(m_am_tools);
+			if (value_data.get_is_valid() == false)
+			{
+				return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+			}
+
+			// Set uma realm prefix of EAP-SIM and EAP-AKA.
+			status = value_data.set_copy_of_buffer(iRealmPrefix->Ptr(), iRealmPrefix->Length());
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);			
+			}
+
+			status = add_configuration_data(
+				&message,
+				cf_str_EAP_GSMSIM_UMA_realm_prefix.get_field(),
+				eap_configure_type_string,
+				&value_data);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);			
+			}
+
+			status = add_configuration_data(
+				&message,
+				cf_str_EAP_AKA_UMA_realm_prefix.get_field(),
+				eap_configure_type_string,
+				&value_data);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);			
+			}
+		}
+
+		{
+			// cf_str_EAP_GSMSIM_use_manual_realm, cf_str_EAP_AKA_use_manual_realm
+
+			TInt val(1);
+
+			if(iManualRealm == NULL || (iManualRealm && (iManualRealm->Length() == 0)))
+			{
+				val = 0;
+			}
+
+			eap_variable_data_c value_data(m_am_tools);
+			if (value_data.get_is_valid() == false)
+			{
+				return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+			}
+
+			status = value_data.set_copy_of_buffer((u8_t*) &val, sizeof(TUint));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);			
+			}
+
+			status = add_configuration_data(
+				&message,
+				cf_str_EAP_GSMSIM_use_manual_realm.get_field(),
+				eap_configure_type_boolean,
+				&value_data);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);			
+			}
+
+			status = add_configuration_data(
+				&message,
+				cf_str_EAP_AKA_use_manual_realm.get_field(),
+				eap_configure_type_boolean,
+				&value_data);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);			
+			}
+		}
+
+		{
+			// cf_str_EAP_GSMSIM_manual_realm and cf_str_EAP_AKA_manual_realm
+
+			eap_variable_data_c value_data(m_am_tools);
+			if (value_data.get_is_valid() == false)
+			{
+				return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+			}
+
+			// ManualRealm of EAP-SIM and EAP-AKA.
+			status = value_data.set_copy_of_buffer(iManualRealm->Ptr(), iManualRealm->Length());
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);			
+			}
+
+			status = add_configuration_data(
+				&message,
+				cf_str_EAP_GSMSIM_manual_realm.get_field(),
+				eap_configure_type_string,
+				&value_data);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);			
+			}
+
+			status = add_configuration_data(
+				&message,
+				cf_str_EAP_AKA_manual_realm.get_field(),
+				eap_configure_type_string,
+				&value_data);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);			
+			}
+		}
+
+		{
+			// cf_str_EAP_GSMSIM_use_manual_username, cf_str_EAP_AKA_use_manual_username
+
+			// Use ManualUsername of EAP-SIM and EAP-AKA.
+			TInt val(1);
+			if (iManualUsername == NULL)
+				{
+				val = 0;
+				}
+			if (iManualUsername && (iManualUsername->Length() == 0))
+				{
+				val = 0;
+				}
+
+			eap_variable_data_c value_data(m_am_tools);
+			if (value_data.get_is_valid() == false)
+			{
+				return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+			}
+
+			status = value_data.set_copy_of_buffer((u8_t*) &val, sizeof(TUint));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);			
+			}
+
+			status = add_configuration_data(
+				&message,
+				cf_str_EAP_GSMSIM_use_manual_username.get_field(),
+				eap_configure_type_boolean,
+				&value_data);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);			
+			}
+
+			status = add_configuration_data(
+				&message,
+				cf_str_EAP_AKA_use_manual_username.get_field(),
+				eap_configure_type_boolean,
+				&value_data);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);			
+			}
+		}
+
+		{
+			// cf_str_EAP_GSMSIM_manual_username and cf_str_EAP_AKA_manual_username
+
+			eap_variable_data_c value_data(m_am_tools);
+			if (value_data.get_is_valid() == false)
+			{
+				return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+			}
+
+			// ManualUsername of EAP-SIM and EAP-AKA.
+			if (iManualUsername != NULL)
+				{
+				status = value_data.set_copy_of_buffer(iManualUsername->Ptr(), iManualUsername->Length());
+				if (status != eap_status_ok)
+					{
+					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+					return EAP_STATUS_RETURN(m_am_tools, status);			
+					}
+				}
+			status = add_configuration_data(
+				&message,
+				cf_str_EAP_GSMSIM_manual_username.get_field(),
+				eap_configure_type_string,
+				&value_data);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);			
+			}
+
+			status = add_configuration_data(
+				&message,
+				cf_str_EAP_AKA_manual_username.get_field(),
+				eap_configure_type_string,
+				&value_data);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);			
+			}
+		}
+
+		{
+			// cf_str_EAP_TRACE_output_file_name
+
+			eap_variable_data_c value_data(m_am_tools);
+			if (value_data.get_is_valid() == false)
+			{
+				return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+			}
+
+			status = value_data.set_copy_of_buffer(m_trace_log_file_name);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);			
+			}
+
+			status = add_configuration_data(
+				&message,
+				cf_str_EAP_TRACE_output_file_name.get_field(),
+				eap_configure_type_string,
+				&value_data);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);			
+			}
+		}
+
+		{
+			// cf_str_EAP_GSMSIM_max_session_validity_time and cf_str_EAP_AKA_max_session_validity_time
+
+			u32_t session_validity_time_in_seconds(43200ul);
+
+			eap_variable_data_c value_data(m_am_tools);
+			if (value_data.get_is_valid() == false)
+			{
+				return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+			}
+
+			status = value_data.set_copy_of_buffer(reinterpret_cast<u8_t*>(&session_validity_time_in_seconds), sizeof(session_validity_time_in_seconds));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);			
+			}
+
+			status = add_configuration_data(
+				&message,
+				cf_str_EAP_GSMSIM_max_session_validity_time.get_field(),
+				eap_configure_type_u32_t,
+				&value_data);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);			
+			}
+
+			status = add_configuration_data(
+				&message,
+				cf_str_EAP_AKA_max_session_validity_time.get_field(),
+				eap_configure_type_u32_t,
+				&value_data);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);			
+			}
+		}
+
+		{
+			// cf_str_EAP_CORE_wait_eap_request_type_timeout
+
+			u32_t wait_eap_request_type_timeout_in_milli_seconds(30000ul);
+
+			eap_variable_data_c value_data(m_am_tools);
+			if (value_data.get_is_valid() == false)
+			{
+				return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+			}
+
+			status = value_data.set_copy_of_buffer(reinterpret_cast<u8_t*>(&wait_eap_request_type_timeout_in_milli_seconds), sizeof(wait_eap_request_type_timeout_in_milli_seconds));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);			
+			}
+
+			status = add_configuration_data(
+				&message,
+				cf_str_EAP_CORE_wait_eap_request_type_timeout.get_field(),
+				eap_configure_type_u32_t,
+				&value_data);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);			
+			}
+		}
+
+		{
+			// cf_str_EAP_GSMSIM_2_digit_mnc_map_of_mcc_of_imsi_array and cf_str_EAP_AKA_2_digit_mnc_map_of_mcc_of_imsi_array
+
+			eap_variable_data_c value_data(m_am_tools);
+			if (value_data.get_is_valid() == false)
+			{
+				return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+			}
+
+			// 2-digit MNC configuration of EAP-SIM and EAP-AKA.
+			status = value_data.set_copy_of_buffer((u32_t*) K2DigitMncMccList, sizeof(K2DigitMncMccList));
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);			
+			}
+
+			status = add_configuration_data(
+				&message,
+				cf_str_EAP_GSMSIM_2_digit_mnc_map_of_mcc_of_imsi_array.get_field(),
+				eap_configure_type_u32array,
+				&value_data);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);			
+			}
+
+			status = add_configuration_data(
+				&message,
+				cf_str_EAP_AKA_2_digit_mnc_map_of_mcc_of_imsi_array.get_field(),
+				eap_configure_type_u32array,
+				&value_data);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);			
+			}
+		}
+
+		status = data->set_copy_of_buffer(
+			message.get_message_data(),
+			message.get_message_data_length());
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+	else
 	{
 		eap_variable_data_c wanted_field(m_am_tools);
 
@@ -1805,15 +2307,13 @@
 
 
 		if (wanted_field.compare(
-		cf_str_EAP_default_type_u32_t.get_field()->get_field(),
-		cf_str_EAP_default_type_u32_t.get_field()->get_field_length()) == 0
+			cf_str_EAP_default_type_hex_data.get_field()->get_field(),
+			cf_str_EAP_default_type_hex_data.get_field()->get_field_length()) == 0
 		|| wanted_field.compare(
-		cf_str_EAP_server_default_type_u32_t.get_field()->get_field(),
-		cf_str_EAP_server_default_type_u32_t.get_field()->get_field_length()) == 0)
+			cf_str_EAP_server_default_type_hex_data.get_field()->get_field(),
+			cf_str_EAP_server_default_type_hex_data.get_field()->get_field_length()) == 0)
 		{
 			// We need to return here the next EAP type we should try
-			
-#ifdef USE_EAP_EXPANDED_TYPES
 
 			if(m_enabled_expanded_eap_array.Count() < 1)
 			{
@@ -1874,62 +2374,6 @@
 					expandedEAPType->EapExpandedType.Size()));
 			}							
 
-#else // For normal EAP types
-		
-			TInt i; 	
-
-			for (i = 0; i < m_iap_eap_array.Count(); i++)
-			{
-				// Find the first enabled EAP type (highest priority)
-				TEap *eapType = m_iap_eap_array[i];			
-				if (eapType->Enabled == 1)
-				{
-					// Convert the string to integer
-					TLex8 tmp(eapType->UID);
-					TInt val(0);
-					tmp.Val(val);
-
-					status = data->set_copy_of_buffer((u8_t*) &val, sizeof(TUint));
-					if (status != eap_status_ok)
-					{
-						EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-						return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);			
-					}
-
-					if(val == iRequestedEapType)
-					{
-						EAP_TRACE_ALWAYS(
-							m_am_tools,
-							TRACE_FLAGS_DEFAULT,
-							(EAPL("EAPOL: Trying EAP type: %d.\n"), val));
-						break;
-					}
-					else
-					{
-						continue;
-					}
-				}
-			} // for()
-
-			if (i >= m_iap_eap_array.Count())
-			{
-				// Not found
-				// Send WLM notification because there is no way that the authentication
-				// can be successful if we don't have any EAP types to use...
-				if (m_is_client)
-				{
-					EAP_TRACE_ERROR(
-						m_am_tools,
-						TRACE_FLAGS_DEFAULT,
-						(EAPL("ERROR: No configured EAP types or all tried unsuccessfully.\n")));
-				}
-
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_configure_field);
-			}
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
 			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 			return EAP_STATUS_RETURN(m_am_tools, status);		
 		}
@@ -2009,7 +2453,11 @@
 		{
 			// Use ManualUsername of EAP-SIM and EAP-AKA.
 			TInt val(1);
-			if(iManualUsername == NULL || (iManualUsername && (iManualUsername->Length() == 0)))
+			if(iManualUsername == NULL)
+			{
+				val = 0;
+			}
+			if (iManualUsername && (iManualUsername->Length() == 0))
 			{
 				val = 0;
 			}
@@ -2025,9 +2473,12 @@
 				cf_str_EAP_AKA_manual_username.get_field()->get_field_length()) == 0)
 		{
 			// ManualUsername of EAP-SIM and EAP-AKA.
-			status = data->set_copy_of_buffer(iManualUsername->Ptr(), iManualUsername->Length());
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);		
+			if(iManualUsername != NULL)
+				{
+				status = data->set_copy_of_buffer(iManualUsername->Ptr(), iManualUsername->Length());
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(m_am_tools, status);		
+				}
 		}
 		else if (wanted_field.compare(
 				cf_str_EAP_GSMSIM_2_digit_mnc_map_of_mcc_of_imsi_array.get_field()->get_field(),
@@ -2037,30 +2488,6 @@
 					cf_str_EAP_AKA_2_digit_mnc_map_of_mcc_of_imsi_array.get_field()->get_field_length()) == 0)
 		{
 			// 2-digit MNC configuration of EAP-SIM and EAP-AKA.
-			const TUint32 K2DigitMncMccList[]
-				= {
-					202,204,206,208,213,214,216,218,
-					219,220,222,226,228,230,231,232,
-					234,238,240,242,244,246,247,248,
-					250,255,257,259,260,262,266,268,
-					270,272,274,276,278,280,282,284,
-					286,288,290,293,294,295,308,340,
-					362,363,400,401,402,404,410,413,
-					414,415,416,417,419,420,421,422,
-					424,425,426,427,428,429,432,434,
-					436,437,438,440,441,452,454,455,
-					456,457,460,470,472,502,505,510,
-					515,520,525,528,530,537,539,541,
-					546,547,549,602,603,604,605,607,
-					608,609,610,611,612,613,614,615,
-					616,617,619,620,621,622,623,624,
-					625,626,628,629,630,631,633,634,
-					635,636,638,639,640,641,642,643,
-					645,646,647,648,649,650,651,652,
-					653,654,655,702,704,706,710,712,
-					714,716,724,730,734,744,746,901
-				};
-
 			status = data->set_copy_of_buffer((u32_t*) K2DigitMncMccList, sizeof(K2DigitMncMccList));
 			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 			return EAP_STATUS_RETURN(m_am_tools, status);		
@@ -2243,11 +2670,16 @@
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
-	const eap_status_e status = m_am_tools->am_set_timer(
-		p_initializer, 
-		p_id, 
-		p_data,
-		p_time_ms);
+	eap_status_e status(eap_status_ok);
+
+	if (m_am_tools != 0)
+	{
+		status = m_am_tools->am_set_timer(
+			p_initializer, 
+			p_id, 
+			p_data,
+			p_time_ms);
+	}
 
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 	return status;
@@ -2267,9 +2699,14 @@
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
-	const eap_status_e status = m_am_tools->am_cancel_timer(
-		p_initializer, 
-		p_id);
+	eap_status_e status(eap_status_ok);
+
+	if (m_am_tools != 0)
+	{
+		status = m_am_tools->am_cancel_timer(
+			p_initializer, 
+			p_id);
+	}
 
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 	return status;
@@ -2288,7 +2725,12 @@
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
-	const eap_status_e status = m_am_tools->am_cancel_all_timers();
+	eap_status_e status(eap_status_ok);
+
+	if (m_am_tools != 0)
+	{
+		status = m_am_tools->am_cancel_all_timers();
+	}
 
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 	return status;
@@ -2305,8 +2747,6 @@
 
 	eap_status_e status(eap_status_illegal_eap_type);
 
-#ifdef USE_EAP_EXPANDED_TYPES
-
 	for (int i = 0; i < m_enabled_expanded_eap_array.Count(); i++)
 	{
 		TBuf8<KExpandedEapTypeSize> tmpExpEAP(m_enabled_expanded_eap_array[i]->EapExpandedType);
@@ -2346,32 +2786,6 @@
 			return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
 		}
 	} // End of for()
-		 
-#else // For normal unexpanded EAP type
-
-	TEap *eapType = 0; 
-
-	for (int i = 0; i < m_iap_eap_array.Count(); i++)
-	{
-		// Try next EAP type
-		eapType = m_iap_eap_array[i];
-		if (eapType->Enabled == 1)
-		{	
-			// Convert the string to integer
-			TLex8 tmp(eapType->UID);
-			TInt val(0);
-			tmp.Val(val);
-
-			if (val == eap_type)
-			{
-				// Allowed
-				status = eap_status_ok;
-				break;
-			}	
-		}
-	} // for()
-
-#endif // #ifdef USE_EAP_EXPANDED_TYPES
 
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 
@@ -2400,8 +2814,6 @@
 	eap_header_string_c eap_string;
 	EAP_UNREFERENCED_PARAMETER(eap_string);
 
-#ifdef USE_EAP_EXPANDED_TYPES
-
 	// This function is same as get_selected_eap_types in behavior.
 
 	// We need to return only the EAP types available as enabled types.
@@ -2449,48 +2861,16 @@
 			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 			return EAP_STATUS_RETURN(m_am_tools, status);
 		}		
-			
+
 		EAP_TRACE_DEBUG(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
-			(EAPL("get_eap_type_list():added EAP-type=0x%08x=%s\n"),
+			(EAPL("get_eap_type_list():added EAP-type=0xfe%06x%08x=%s\n"),
+			expandedEAPType->get_vendor_id(),
 			expandedEAPType->get_vendor_type(),
-			eap_string.get_eap_type_string(*expandedEAPType)));			
+			eap_header_string_c::get_eap_type_string(*expandedEAPType)));
 	}
 
-#else // for normal EAP types.
-
-	TEap *eapType = 0; 
-
-	for (TInt i = 0; i < m_iap_eap_array.Count(); i++)
-	{
-		// Check if type is enabled
-		eapType = m_iap_eap_array[i];
-		if (eapType->Enabled == 1)
-		{
-			TLex8 tmp(eapType->UID);
-			TInt val(0);
-			tmp.Val(val);
-
-			eap_type_value_e * const eap_type = new eap_type_value_e(
-			static_cast<eap_type_ietf_values_e>(val));
-			if (eap_type == 0)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-			}
-
-			status = eap_type_list->add_object(eap_type, true);
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);
-			}
-		}
-	} // for()
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 	return eap_status_ok;
 }
@@ -2656,4 +3036,125 @@
 
 //--------------------------------------------------
 
+eap_status_e CEapVpnInterfaceImplementation::complete_get_802_11_authentication_mode(
+	const eap_status_e completion_status,
+	const eap_am_network_id_c * const receive_network_id,
+	const eapol_key_802_11_authentication_mode_e mode)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_not_supported);
+}
+
+//--------------------------------------------------
+
+eap_status_e CEapVpnInterfaceImplementation::complete_remove_eap_session(
+	const bool complete_to_lower_layer,
+	const eap_am_network_id_c * const receive_network_id)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_not_supported);
+}
+
+//--------------------------------------------------
+
+#if defined(USE_EAP_SIMPLE_CONFIG)
+
+eap_status_e CEapVpnInterfaceImplementation::save_simple_config_session(
+	const simple_config_state_e state,
+	EAP_TEMPLATE_CONST eap_array_c<simple_config_credential_c> * const credential_array,
+	const eap_variable_data_c * const new_password,
+	const simple_config_Device_Password_ID_e Device_Password_ID,
+	const simple_config_payloads_c * const other_configuration
+	)
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_not_supported);
+}
+
+#endif // #if defined(USE_EAP_SIMPLE_CONFIG)
+
+//--------------------------------------------------
+
+//
+eap_session_core_base_c * CEapVpnInterfaceImplementation::new_eap_core_client_message_if_c(
+	abs_eap_am_tools_c * const tools,
+	abs_eap_session_core_c * const partner,
+	const bool is_client_when_true,
+	const u32_t MTU)
+{
+	eap_am_message_if_c *client_if = new_eap_am_client_message_if_c(
+		tools,
+		is_client_when_true,
+		MTU);
+
+	eap_automatic_variable_c<eap_am_message_if_c> automatic_server_if(
+		tools,
+		client_if);
+
+	if (client_if == 0
+		|| client_if->get_is_valid() == false)
+	{
+		// ERROR.
+		if (client_if != 0)
+		{
+			EAP_TRACE_DEBUG(
+				tools,
+				TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+				(EAPL("ERROR: calls: eap_session_core_base_c::new_eap_core_client_message_if_c(): client_if->shutdown(): %s.\n"),
+				(is_client_when_true == true) ? "client": "server"));
+
+			(void) client_if->shutdown();
+		}
+
+		return 0;
+	}
+
+	eap_core_client_message_if_c * new_session_core = new eap_core_client_message_if_c(tools, client_if, partner, is_client_when_true);
+
+	eap_automatic_variable_c<eap_core_client_message_if_c> automatic_new_session_core(
+		tools,
+		new_session_core);
+
+	if (new_session_core == 0
+		|| new_session_core->get_is_valid() == false)
+	{
+		// ERROR.
+		if (new_session_core != 0)
+		{
+			EAP_TRACE_DEBUG(
+				tools,
+				TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+				(EAPL("ERROR: calls: eap_session_core_base_c::new_eap_core_client_message_if_c(): new_session_core->shutdown(): %s.\n"),
+				(is_client_when_true == true) ? "client": "server"));
+
+			new_session_core->shutdown();
+		}
+
+		(void) client_if->shutdown();
+
+		return 0;
+	}
+
+	client_if->set_partner(new_session_core);
+
+	automatic_server_if.do_not_free_variable();
+	automatic_new_session_core.do_not_free_variable();
+
+	return new_session_core;
+}
+
+//--------------------------------------------------
+
 // End
--- a/eapol/eapol_framework/eapol_symbian/am/eapvpnif/src/eap_vpn_if_main.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/eapvpnif/src/eap_vpn_if_main.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11 %
+* %version: %
 */
 
 // INCLUDE FILES
--- a/eapol/eapol_framework/eapol_symbian/am/eapvpnif/src/eap_vpn_if_proxy.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/eapvpnif/src/eap_vpn_if_proxy.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: 8.1.2 %
 */
 
 // INCLUDE FILES
--- a/eapol/eapol_framework/eapol_symbian/am/eapvpnif/src/eap_vpn_if_resolver.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/eapvpnif/src/eap_vpn_if_resolver.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 // INCLUDE FILES
--- a/eapol/eapol_framework/eapol_symbian/am/eapvpnif/src/eap_vpn_if_resolvermain.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/eapvpnif/src/eap_vpn_if_resolvermain.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 // INCLUDE FILES
--- a/eapol/eapol_framework/eapol_symbian/am/eapvpnif/src/eap_vpn_if_resolverproxy.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/eapvpnif/src/eap_vpn_if_resolverproxy.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 // INCLUDE FILES
--- a/eapol/eapol_framework/eapol_symbian/am/eapvpnif/src/eap_vpn_if_timer.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/eapvpnif/src/eap_vpn_if_timer.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 13 %
+* %version: %
 */
 
 // INCLUDE FILES
--- a/eapol/eapol_framework/eapol_symbian/am/include/EapAkaInterface.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/EapAkaInterface.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 13 %
+* %version: 10.1.2 %
 */
 
 #ifndef _EAPAKAINTERFACE_H_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/include/EapConfigToolsSymbian.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,44 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 1 %
+*/
+
+#if !defined(_EAP_CONFIG_TOOLS_SYMBIAN_H_)
+#define _EAP_CONFIG_TOOLS_SYMBIAN_H_
+
+class abs_eap_am_tools_c;
+class eap_file_config_c;
+
+class EapConfigToolsSymbian
+{
+
+public:
+
+	// ----------------------------------------------------------------------
+
+	static eap_status_e EapReadDefaultConfigFileSymbian(
+		abs_eap_am_tools_c * const aAmTools,
+		eap_file_config_c ** const aFileconfig);
+
+};
+
+#endif //#if !defined(_EAP_CONFIG_TOOLS_SYMBIAN_H_)
+
+//--------------------------------------------------
+// End.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/include/EapConversion.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,141 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#ifndef _EAP_CONVERSION_H_
+#define _EAP_CONVERSION_H_
+
+// INCLUDES
+#include <e32base.h>
+#include "eap_array.h"
+#include "eap_expanded_type.h"
+#include "eap_method_settings.h"
+#include "EapExpandedType.h"
+#include "EapSettings.h"
+
+// FORWARD DECLARATIONS
+
+
+// CLASS DECLARATION
+/**
+* Class that implements the conversion functions for EAP type interface.
+*/
+class EAP_EXPORT CEapConversion
+{
+
+public:
+
+	EAP_FUNC_IMPORT static TInt ConvertFromTDesCToInternal(
+		abs_eap_am_tools_c * const tools,
+		const TDesC & input16,
+		eap_variable_data_c * const target8);
+
+
+	EAP_FUNC_IMPORT static TInt ConvertFromInternalToBuf16(
+		abs_eap_am_tools_c * const tools,
+		const eap_variable_data_c * const input8,
+		TDes * const target16);
+
+	EAP_FUNC_IMPORT static TInt ConvertFromBuf16ToInternal(
+		abs_eap_am_tools_c * const tools,
+		const TDes * const input16,
+		eap_variable_data_c * const target8);
+
+
+	EAP_FUNC_IMPORT static TInt ConvertEAPTypesToInternalTypes(
+		abs_eap_am_tools_c * const tools,
+		const RArray<TUint> * const EncapsulatedEAPTypes,
+		eap_array_c<eap_type_value_e> * const target);
+
+	EAP_FUNC_IMPORT static TInt ConvertInternalTypesToEAPTypes(
+		abs_eap_am_tools_c * const tools,
+		const eap_array_c<eap_type_value_e> * const source,
+		RArray<TUint> * const EncapsulatedEAPTypes);
+
+
+	EAP_FUNC_IMPORT static TInt ConvertExpandedEAPTypeToInternalType(
+		const TEapExpandedType * const EncapsulatedExpandedEAPType,
+		eap_type_value_e * const target);
+
+	EAP_FUNC_IMPORT static TInt ConvertInternalTypeToExpandedEAPType(
+		const eap_type_value_e * const source,
+		TEapExpandedType * const EncapsulatedExpandedEAPType);
+
+
+	EAP_FUNC_IMPORT static TInt ConvertExpandedEAPTypesToInternalTypes(
+		abs_eap_am_tools_c * const tools,
+		const RArray<TEapExpandedType> * const EncapsulatedExpandedEAPTypes,
+		eap_array_c<eap_type_value_e> * const target);
+
+	EAP_FUNC_IMPORT static TInt ConvertInternalTypesToExpandedEAPTypes(
+		abs_eap_am_tools_c * const tools,
+		const eap_array_c<eap_type_value_e> * const source,
+		RArray<TEapExpandedType> * const EncapsulatedExpandedEAPTypes);
+
+
+	EAP_FUNC_IMPORT static TInt ConvertInternalTypesToHBufC8(
+		abs_eap_am_tools_c * const tools,
+		const eap_array_c<eap_type_value_e> * const source,
+		HBufC8 ** const EncapsulatedExpandedEAPTypesData);
+
+	EAP_FUNC_IMPORT static TInt ConvertHBufC8ToInternalTypes(
+		abs_eap_am_tools_c * const tools,
+		const HBufC8 * const EncapsulatedExpandedEAPTypesData,
+		eap_array_c<eap_type_value_e> * const target);
+
+
+	EAP_FUNC_IMPORT static TInt ConvertCipherSuitesToInternalType(
+		abs_eap_am_tools_c * const tools,
+		const RArray<TUint> * const aCipherSuites,
+		eap_array_c<u16_t> * const internal_cipher_suites);
+
+	EAP_FUNC_IMPORT static TInt ConvertInternalTypeToCipherSuites(
+		abs_eap_am_tools_c * const tools,
+		const eap_array_c<u16_t> * const internal_cipher_suites,
+		RArray<TUint> * const aCipherSuites);
+
+
+	EAP_FUNC_IMPORT static TInt ConvertCertificatesToInternalType(
+		abs_eap_am_tools_c * const tools,
+		const RPointerArray<EapCertificateEntry> * const aCertificates,
+		eap_array_c<eap_certificate_entry_c> * const internal_certificates);
+
+	EAP_FUNC_IMPORT static TInt ConvertInternalTypeToCertificates(
+		abs_eap_am_tools_c * const tools,
+		const eap_certificate_entry_c::eap_certificate_type_e select_certificate_type,
+		const eap_array_c<eap_certificate_entry_c> * const internal_certificates,
+		RPointerArray<EapCertificateEntry> * const aCertificates);
+
+
+	EAP_FUNC_IMPORT static TInt ConvertEAPSettingsToInternalType(
+		abs_eap_am_tools_c * const tools,
+		const EAPSettings * const aSettings,
+		eap_method_settings_c * const internal_settings);
+
+	EAP_FUNC_IMPORT static TInt ConvertInternalTypeToEAPSettings(
+		abs_eap_am_tools_c * const tools,
+		const eap_method_settings_c * const internal_settings,
+		EAPSettings * const aSettings);
+
+};
+
+#endif // _EAP_CONVERSION_H_
+
+// End of file
--- a/eapol/eapol_framework/eapol_symbian/am/include/EapLeapNotifierStructs.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/EapLeapNotifierStructs.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7 %
+* %version: %
 */
 
 #ifndef EAPLEAPNOTIFIERSTRUCTS_H
--- a/eapol/eapol_framework/eapol_symbian/am/include/EapLeapNotifierUids.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/EapLeapNotifierUids.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7 %
+* %version: %
 */
 
 /** 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/include/EapMessageQueue.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,76 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version:  5 %
+*/
+
+#ifndef EAPMESSAGEQUEU_H_
+#define EAPMESSAGEQUEU_H_
+
+#include "EapServerClientDef.h"
+#include "abs_eap_am_tools.h"
+#include "eap_am_export.h"
+
+class EAP_EXPORT EapMessageBuffer
+{
+public:
+
+	EAP_FUNC_IMPORT EapMessageBuffer(abs_eap_am_tools_c * const tools);
+
+	EAP_FUNC_IMPORT virtual ~EapMessageBuffer();
+
+	EAP_FUNC_IMPORT TInt CopyData(TEapRequests type, const void * const data, const TUint length);
+
+	EAP_FUNC_IMPORT HBufC8 * GetData() const;
+
+	EAP_FUNC_IMPORT TEapRequests GetRequestType() const;
+
+private:
+
+	abs_eap_am_tools_c * const iTools;
+
+	TEapRequests iRequestType;
+
+	HBufC8 * iData;
+
+};
+
+    
+class EAP_EXPORT EapMessageQueue
+{
+public:
+
+	EAP_FUNC_IMPORT EapMessageQueue(abs_eap_am_tools_c * const tools);
+
+	EAP_FUNC_IMPORT virtual ~EapMessageQueue();
+
+	EAP_FUNC_IMPORT TInt AddMessage(TEapRequests type, const void * const data, const TUint length);
+
+	EAP_FUNC_IMPORT EapMessageBuffer * GetFirstMessage();
+
+	EAP_FUNC_IMPORT TInt DeleteFirstMessage();
+
+private:
+
+	abs_eap_am_tools_c * const iTools;
+
+	RArray<EapMessageBuffer *> iEapMessageQueue;
+
+};
+    
+#endif /* EAPMESSAGEQUEU_H_ */
--- a/eapol/eapol_framework/eapol_symbian/am/include/EapMsChapV2NotifierStructs.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/EapMsChapV2NotifierStructs.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7 %
+* %version: %
 */
 
 #ifndef EAPMSCHAPV2NOTIFIERSTRUCTS_H
--- a/eapol/eapol_framework/eapol_symbian/am/include/EapMsChapV2NotifierUids.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/EapMsChapV2NotifierUids.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7 %
+* %version: %
 */
 
 //
--- a/eapol/eapol_framework/eapol_symbian/am/include/EapProtectedSetupInterface.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/EapProtectedSetupInterface.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 6 %
+* %version: 4.1.2 %
 */
 
 #ifndef _EAPPROTECTEDSETUPINTERFACE_H_
@@ -29,7 +29,7 @@
 #include <etelmm.h>
 
 // FORWARD DECLARATIONS
-class eap_am_type_protected_setup_symbian_c;
+class CEapAmProtectedSetupSymbian;
 
 // CLASS DECLARATION
 /**
@@ -54,7 +54,7 @@
 	*/
 	static CEapProtectedSetupInterface* NewL(
 		abs_eap_am_tools_c* const aTools, 
-		eap_am_type_protected_setup_symbian_c* const aParent);	
+		CEapAmProtectedSetupSymbian* const aParent);	
 
 	/**
 	* Destructor
@@ -69,7 +69,7 @@
 
 protected:
 
-	CEapProtectedSetupInterface(abs_eap_am_tools_c* const aTools, eap_am_type_protected_setup_symbian_c* const aParent);
+	CEapProtectedSetupInterface(abs_eap_am_tools_c* const aTools, CEapAmProtectedSetupSymbian* const aParent);
 
 	void ConstructL();
 	
@@ -85,7 +85,7 @@
 
 private:
 
-	eap_am_type_protected_setup_symbian_c * const iParent;
+	CEapAmProtectedSetupSymbian * const iParent;
 	
 	abs_eap_am_tools_c * const m_am_tools;
 		
--- a/eapol/eapol_framework/eapol_symbian/am/include/EapSecurIDNotifierStructs.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/EapSecurIDNotifierStructs.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7 %
+* %version: %
 */
 
 #ifndef EAPSECURIDNOTIFIERSTRUCTS_H
--- a/eapol/eapol_framework/eapol_symbian/am/include/EapSecurIDNotifierUids.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/EapSecurIDNotifierUids.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7 %
+* %version: %
 */
 
 /** 
--- a/eapol/eapol_framework/eapol_symbian/am/include/EapSimInterface.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/EapSimInterface.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: 9.1.2 %
 */
 
 #ifndef _EAPSIMINTERFACE_H_
--- a/eapol/eapol_framework/eapol_symbian/am/include/EapSimIsaInterface.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/EapSimIsaInterface.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 #ifndef _EAPSIMISAINTERFACE_H_
--- a/eapol/eapol_framework/eapol_symbian/am/include/EapTlsPeapCertInterface.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/EapTlsPeapCertInterface.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 13.1.2 %
+* %version: %
 */
 
 #ifndef _EAPTLSPEAPCERTINTERFACE_H_
@@ -48,17 +48,20 @@
 
 	virtual ~CEapTlsPeapCertInterface();	
 	
-	void ReadCertificateL(SCertEntry& aCertInfo, const TBool aRetrieveChain);
+	void ReadCertificateL(EapCertificateEntry& aCertInfo, const TBool aRetrieveChain);
 	
-	void ReadCACertificateL(SCertEntry& aCertInfo);
+	void ReadCACertificateL(EapCertificateEntry& aCertInfo);
 	
 	void ReadPrivateKeyL(TKeyIdentifier& aHash);
 	
-	void ValidateChainL(TDesC8& aCertChain, RArray<SCertEntry>& aCACerts);
+	void ValidateChainL(
+		TDesC8& aCertChain,
+		RPointerArray<EapCertificateEntry>& aCACerts,
+		const TBool aUseAutomaticCaCertificate);
 
 	
 	void GetMatchingCertificatesL(
-		const RArray<SCertEntry>& aAllowedUserCerts,
+		const RPointerArray<EapCertificateEntry>& aAllowedUserCerts,
 		const TBool aUseCertAuthoritiesFilter,
 		EAP_TEMPLATE_CONST eap_array_c<eap_variable_data_c> * const aCertAuthorities,
 		const TBool aUseCertTypesFilter,
@@ -67,12 +70,12 @@
 		const RArray<TUint>& aAllowedCipherSuites);		
 
 	void SignL(
-		TKeyIdentifier& aKeyId,
+		const TKeyIdentifier& aKeyId,
 		const TDesC8& aHashIn,
 		const TUint aSignatureLength);
 
 	void DecryptL(
-		TKeyIdentifier& aKeyId,
+		const TKeyIdentifier& aKeyId,
 		const TDesC8& aData);
 		
 	void CancelSignWithPrivateKey();		
@@ -134,7 +137,7 @@
 	
 	RFs iFs;
 	
-	RArray<SCertEntry> iAllowedUserCerts;
+	RPointerArray<EapCertificateEntry> iAllowedUserCerts;
 
 	TBool iUseCertAuthoritiesFilter;
 	
@@ -145,9 +148,9 @@
 	TBool iRSACertsAllowed;
 
 	TBool iDSACertsAllowed;
-	
+
 	RPointerArray<CX500DistinguishedName> iCertAuthorities;
-	
+
 	const eap_array_c<u8_t>* iCertTypes;
 
 	RMPointerArray<CCTCertInfo> iCertInfos;
@@ -173,17 +176,17 @@
 
 	RPointerArray<CX509Certificate> iUserCertChain;
 	
-	CArrayFixFlat<SCertEntry> iMatchingUserCertInfos;
+	RPointerArray<EapCertificateEntry> iMatchingUserCertInfos;
 
 	TUint iCAIndex;
 
 	TUint iUserCertIndex;
 	
-	RArray<SCertEntry> iAllowedCACerts;
+	RPointerArray<EapCertificateEntry> iAllowedCACerts;
 	
 	HBufC8* iInputCertChain;
 
-	SCertEntry iCertInfo;
+	EapCertificateEntry iCertInfo;
 
 	TAny *iResArray;	
 
@@ -209,6 +212,9 @@
 	CUnifiedKeyStore* iKeyStore;
 
 	TBool iRetrieveChain;
+
+	TBool iUseAutomaticCaCertificate;
+
 }; 
 
 #endif // _EAPTLSPEAPCERTINTERFACE_H_
--- a/eapol/eapol_framework/eapol_symbian/am/include/EapTlsPeapNotifierStructs.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/EapTlsPeapNotifierStructs.h	Mon May 24 20:32:47 2010 +0300
@@ -16,24 +16,59 @@
 */
 
 /*
-* %version: 6.1.2 %
+* %version: %
 */
 
 #ifndef _CERTIFICATESELECTIONINFO_H_
 #define _CERTIFICATESELECTIONINFO_H_
 
 #include "EapTlsPeapUtils.h"
+#include "EapTraceSymbian.h"
 
 const TUint KIdentityFieldLength = 64;
 
-struct TCertificateSelectionInfo
+class TCertificateSelectionInfo
 {
-	TInt iCount;
-	TFixedArray<SCertEntry, 32> iCertificates;
+
+public:
+
+	TCertificateSelectionInfo()
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("TCertificateSelectionInfo::TCertificateSelectionInfo()\n")));
+		EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: TCertificateSelectionInfo::TCertificateSelectionInfo()\n"));
+	}
+
+	virtual ~TCertificateSelectionInfo()
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("TCertificateSelectionInfo::~TCertificateSelectionInfo()\n")));
+		EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: TCertificateSelectionInfo::~TCertificateSelectionInfo()\n"));
+
+		EAP_TRACE_DEBUG_SYMBIAN((_L("TCertificateSelectionInfo::~TCertificateSelectionInfo(): calls iCertificates.ResetAndDestroy()")));
+		iCertificates.ResetAndDestroy(); // ResetAndDestroy() function must be called because the objects represented by the array need to be deleted before the array object is destroyed.
+
+		EAP_TRACE_DEBUG_SYMBIAN((_L("TCertificateSelectionInfo::~TCertificateSelectionInfo(): calls iCertificates.Close()")));
+		iCertificates.Close(); // The Close() function must be called before RPointerArray object is destroyed.
+	}
+
+	RPointerArray<EapCertificateEntry> iCertificates;
 };
 
-struct TIdentityInfo
+class TIdentityInfo
 {
+public:
+
+	TIdentityInfo()
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("TIdentityInfo::TIdentityInfo()\n")));
+		EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: TIdentityInfo::TIdentityInfo()\n"));
+	}
+
+	virtual ~TIdentityInfo()
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("TIdentityInfo::~TIdentityInfo()\n")));
+		EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: TIdentityInfo::~TIdentityInfo()\n"));
+	}
+
 	TBool iUseManualUsername;
 	TBuf<KIdentityFieldLength> iUsername;
 	TBuf<KIdentityFieldLength> iRealm;	
--- a/eapol/eapol_framework/eapol_symbian/am/include/EapTlsPeapTimerValues.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/EapTlsPeapTimerValues.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #ifndef _EAPTLSPEAPTIMERVALUES_H_
--- a/eapol/eapol_framework/eapol_symbian/am/include/EapTtlsPapDbInfoStruct.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/EapTtlsPapDbInfoStruct.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7 %
+* %version: %
 */
 
 #ifndef EAPTTLSPAPDBINFOSTRUCT_H
--- a/eapol/eapol_framework/eapol_symbian/am/include/Eapol.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/Eapol.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #if !defined(_EAPOL_H_)
--- a/eapol/eapol_framework/eapol_symbian/am/include/EapolDbDefaults.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/EapolDbDefaults.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7 %
+* %version: 5.1.5 %
 */
 
 #if !defined(_EAPOLDBDEFAULTS_H_)
@@ -24,44 +24,17 @@
 
 // LOCAL CONSTANTS
 
-#ifdef SYMBIAN_SECURE_DBMS
-// For EAPOL secure database.
-// Full path is not needed. The database eapol.dat will be saved in the 
-// data cage path for DBMS. So it will be in "\private\100012a5\eapol.dat" in C: drive.
-// The maximum length of database name is 0x40 (KDbMaxName) , which is defined in d32dbms.h.
-
-_LIT(KDatabaseName, "c:eapol.dat");
-
-_LIT(KSecureUIDFormat, "SECURE[102072e9]"); // For the security policy.
-
-#else
-
-_LIT(KDatabaseName, "c:\\system\\data\\eapol.dat");
-
-#endif // #ifdef SYMBIAN_SECURE_DBMS
-
-#if !defined(USE_EAP_FILECONFIG)
-	const TInt default_EAP_TRACE_disable_traces = 0;
-	const TInt default_EAP_TRACE_enable_function_traces = 0;
-	const TInt default_EAP_TRACE_only_trace_messages = 0;
-	const TInt default_EAP_TRACE_only_test_vectors = 0;
-#endif //#if !defined(USE_EAP_FILECONFIG)
+// For EAPOL database.
+// Database will be written to private folder of the WLAN-server.
+_LIT(KEapolDatabaseName, "eapol.dat");
 
 _LIT(default_EAP_TRACE_output_file_name, "c:\\logs\\eapol\\eap_core.txt");
 
 #if !defined(USE_EAP_FILECONFIG)
-	const TInt default_EAP_CORE_session_timeout = 120000; // ms = 120 seconds = 2 minutes.
 	const TInt default_EAPOL_CORE_starts_max_count = 3;		
 	const TInt default_EAPOL_CORE_send_start_interval = 2000; // ms
-	const TInt default_EAP_ERROR_TEST_enable_random_errors = 0;
-	const TInt default_EAP_ERROR_TEST_send_original_packet_first = 0;
-	const TInt default_EAP_ERROR_TEST_generate_multiple_error_packets = 2;
-	const TInt default_EAP_ERROR_TEST_manipulate_ethernet_header = 0;
-	const TInt default_EAP_ERROR_TEST_error_probability = 8000000;
-	const TInt default_EAP_test_default_type = 18; // EAP-SIM
-	const TInt default_EAP_CORE_retransmission_counter = 0;
 #endif //#if !defined(USE_EAP_FILECONFIG)
-		
+
 #endif // _EAPOLDBDEFAULTS_H_
 
 // End of file
--- a/eapol/eapol_framework/eapol_symbian/am/include/EapolDbParameterNames.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/EapolDbParameterNames.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #if !defined(_EAPOLDBPARAMETERNAMES_H_)
--- a/eapol/eapol_framework/eapol_symbian/am/include/EapolTimer.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/EapolTimer.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 #if !defined(_EAPOL_TIMER_H_)
--- a/eapol/eapol_framework/eapol_symbian/am/include/EapolToWlmIf.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/EapolToWlmIf.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #if !defined(_EAPOLTOWLMIF_H_)
--- a/eapol/eapol_framework/eapol_symbian/am/include/EapolUID.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/EapolUID.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12.1.2 %
+* %version: 23 %
 */
 
 #ifndef _EAPOLUID_H_
@@ -55,8 +55,8 @@
 #define EAP_MSCHAPV2_CHANGE_PASSWORD_NOTIFIER_UID 0x101f8e6a
 
 // EAP-SecurID
+#define EAP_SECURID_DLL_UID 0x101f8e74
 #define EAP_SECURID_NOTIFIERS_DLL_UID 0x101f8e6c
-#define EAP_SECURID_DLL_UID 0x101f8e74
 #define EAP_SECURID_IMPLEMENTATION_UID 0x101f8e75
 #define EAP_SECURID_IDENTITY_NOTIFIER_UID 0x101f8e76
 #define EAP_SECURID_PASSCODE_NOTIFIER_UID 0x101f8e77
@@ -81,6 +81,51 @@
 #define EAP_PROTECTED_SETUP_DLL_UID 0x2000b003
 #define EAP_PROTECTED_SETUP_IMPLEMENTATION_UID 0x2000b004	 
 
+// EAP-Generic IF
+#define EAP_GENERIC_DLL_UID 0x20026FD1
+#define EAP_GENERIC_IMPLEMENTATION_UID 0x20026FD2
+#define EAP_GENERIC_INTERFACE_UID 0x20026FF7
+
+// EAP-General-Settings IF
+#define EAP_GENERAL_SETTINGS_DLL_UID 0x20026FD6
+#define EAP_GENERAL_SETTINGS_IMPLEMENTATION_UID 0x20026FD8
+#define EAP_GENERAL_SETTINGS_INTERFACE_UID 0x20026FF8
+
+#define EAP_PLUGIN_DLL_UID 0x20026FD3
+#define EAP_PLUGIN_IMPLEMENTATION_UID 0x20026FD5
+#define EAP_PLUGIN_INTERFACE_UID 0x20026FD4
+
+#define EAP_CORE_INTERFACEIMPLEMENTATION_DLL_UID 0x20026FCD
+#define EAP_CORE_INTERFACEIMPLEMENTATION_IMPLEMENTATION_UID 0x20026FCC
+#define EAP_CORE_INTERFACEIMPLEMENTATION_INTERFACE_UID 0x20026FC7
+
+#define EAP_TOOLS_DLL_UID 0x20026FC8
+#define EAP_SYMBIAN_TOOLS_UID 0x20026FD0
+#define EAP_TOOLS_INTERFACE_UID 0x20026FCF
+
+#define EAP_SERVER_UID 0x20026FCB
+
+#define EAP_CORE_INTERFACE_DLL_UID 0x20026FEC
+
+// WAPI Security Settings
+#define WAPI_SETTINGS_CLIENT_PLUGIN_DLL_UID 0x2002DC6C
+#define WAPI_SETTINGS_CLIENT_IMPLEMENTATION_UID 0x2002DC6E
+#define WAPI_SETTINGS_CLIENT_INTERFACE_UID 0x2002DC6D
+
+#define WAPI_SETTINGS_SERVER_PLUGIN_DLL_UID 0x2002DC90
+#define WAPI_SETTINGS_SERVER_IMPLEMENTATION_UID 0x2002DC92
+#define WAPI_SETTINGS_SERVER_INTERFACE_UID 0x2002DC91
+
+// WAPI Core
+#define WAPI_CORE_INTERFACE_DLL_UID 0x2002E6E3
+
+#define WAPI_CORE_INTERFACEIMPLEMENTATION_DLL_UID 0x2002E6E4
+#define WAPI_CORE_INTERFACEIMPLEMENTATION_IMPLEMENTATION_UID 0x2002E6E6
+#define WAPI_CORE_INTERFACEIMPLEMENTATION_INTERFACE_UID 0x2002E6E5
+
+#define WAPI_CORE_SERVER_PLUGIN_DLL_UID 0x2002E6EE
+#define WAPI_CORE_SERVER_IMPLEMENTATION_UID 0x2002E6F0
+#define WAPI_CORE_SERVER_INTERFACE_UID 0x2002E6EF
 
 // FREE UIDS
 
--- a/eapol/eapol_framework/eapol_symbian/am/include/abs_eapol_am_core_symbian.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/abs_eapol_am_core_symbian.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7 %
+* %version: %
 */
 
 #if !defined(_ABS_EAPOL_AM_CORE_SYMBIAN_H_)
--- a/eapol/eapol_framework/eapol_symbian/am/include/abs_eapol_am_core_symbian_simulator.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/abs_eapol_am_core_symbian_simulator.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 #if !defined(_ABS_EAPOL_AM_CORE_SYMBIAN_H_)
--- a/eapol/eapol_framework/eapol_symbian/am/include/eap_am_async_wait_symbian.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/eap_am_async_wait_symbian.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 4 %
+* %version: 2.1.2 %
 */
 
 #ifndef _EAP_AM_ASYNC_WAIT_SYMBIAN_H_
@@ -39,7 +39,7 @@
         /**
         * Destructor.
         */    
-        ~eap_am_async_wait_symbian_c() ;
+        virtual ~eap_am_async_wait_symbian_c() ;
 
     public: 
 
--- a/eapol/eapol_framework/eapol_symbian/am/include/eap_am_crypto_symbian.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/eap_am_crypto_symbian.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 6 %
+* %version: %
 */
 
 #if !defined( _EAP_AM_CRYPTO_SYMBIAN_H_ )
--- a/eapol/eapol_framework/eapol_symbian/am/include/eap_am_file_input_symbian.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/eap_am_file_input_symbian.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 3.1.12 %
+* %version: %
 */
 
 #if !defined(_EAP_AM_FILE_INPUT_SYMBIAN_H_)
--- a/eapol/eapol_framework/eapol_symbian/am/include/eap_am_mutex_symbian.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/eap_am_mutex_symbian.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 4 %
+* %version: %
 */
 
 #if !defined( _EAP_AM_MUTEX_SYMBIAN_H_ )
--- a/eapol/eapol_framework/eapol_symbian/am/include/eap_am_semaphore_symbian.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/eap_am_semaphore_symbian.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 5 %
+* %version: %
 */
 
 #if !defined( _EAP_AM_SEMAPHORE_SYMBIAN_H_ )
--- a/eapol/eapol_framework/eapol_symbian/am/include/eap_am_tools_symbian.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/eap_am_tools_symbian.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 3.1.2 %
+* %version: %
 */
 
 // INCLUDES
@@ -51,6 +51,7 @@
 private:
 
 #if defined(USE_EAP_FILE_TRACE)
+
 	/// File server used in filetrace.
 	RFs m_Fs;
 
@@ -59,8 +60,12 @@
 
 	/// File name used in filetrace.
 	TBuf<64> m_filename;
+
 #endif //#if defined(USE_EAP_FILE_TRACE)
 
+	/// Prefix string used in filetrace.
+	eap_variable_data_c m_prefix_string;
+
 	u64_t m_start_ticks;
 
 	bool m_directory_exists;
@@ -163,6 +168,9 @@
 	EAP_FUNC_IMPORT bool get_is_timer_thread_active();
 
 
+	EAP_FUNC_IMPORT eap_status_e set_trace_prefix(
+		const eap_variable_data_c * const prefix8bit);
+
 	EAP_FUNC_IMPORT eap_status_e set_trace_file_name(const eap_variable_data_c * const trace_output_file);
 
 	EAP_FUNC_IMPORT void set_max_trace_file_size(const u32_t max_trace_file_size);
--- a/eapol/eapol_framework/eapol_symbian/am/include/eap_am_trace_symbian.h	Thu May 13 22:51:27 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
-* Copyright (c) 2001-2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  EAP and WLAN authentication protocols.
-*
-*/
-
-/*
-* %version: 8.1.2 %
-*/
-
-#if !defined( _EAP_AM_TRACE_SYMBIAN_H_ )
-#define _EAP_AM_TRACE_SYMBIAN_H_
-
-#if defined(_DEBUG)
-
-#include "eap_status_string.h"
-#include <e32debug.h>
-
-#define DEBUG(a)		            RDebug::Print(_L(a))
-#define DEBUG1(a,b)		            RDebug::Print(_L(a),b)
-#define DEBUG2(a,b,c)	            RDebug::Print(_L(a),b,c)
-#define DEBUG3(a,b,c,d)	            RDebug::Print(_L(a),b,c,d)
-#define DEBUG4(a,b,c,d,e)	        RDebug::Print(_L(a),b,c,d,e)
-#define DEBUG5(a,b,c,d,e,f)	        RDebug::Print(_L(a),b,c,d,e,f)
-#define DEBUG6(a,b,c,d,e,f,g)	    RDebug::Print(_L(a),b,c,d,e,f,g)
-#define DEBUG7(a,b,c,d,e,f,g,h) 	RDebug::Print(_L(a),b,c,d,e,f,g,h)
-#define DEBUG8(a,b,c,d,e,f,g,h,i)	RDebug::Print(_L(a),b,c,d,e,f,g,h,i)
-
-void trace_data(
-	eap_const_string prefix,
-	const void * const p_data,
-	const u32_t data_length);
-
-#define EAP_TRACE_DEBUG_SYMBIAN(_parameter_list_) \
-		{ \
-			RDebug::Print _parameter_list_ ; \
-		} \
-
-#define EAP_TRACE_DATA_DEBUG_SYMBIAN(_parameter_list_) \
-		{ \
-			trace_data _parameter_list_ ; \
-		} \
-
-#else // #if defined(_DEBUG) || defined(DEBUG)
-
-#define DEBUG(a)
-#define DEBUG1(a,b)
-#define DEBUG2(a,b,c)
-#define DEBUG3(a,b,c,d)
-#define DEBUG4(a,b,c,d,e)
-#define DEBUG5(a,b,c,d,e,f)
-#define DEBUG6(a,b,c,d,e,f,g)
-#define DEBUG7(a,b,c,d,e,f,g,h)
-#define DEBUG8(a,b,c,d,e,f,g,h,i)
-
-#define EAP_TRACE_DEBUG_SYMBIAN(_parameter_list_) 
-
-#define EAP_TRACE_DATA_DEBUG_SYMBIAN(_parameter_list_)
-
-#endif // #if defined(_DEBUG) || defined(DEBUG)
-
-#endif //#if !defined( _EAP_AM_TRACE_SYMBIAN_H_ )
--- a/eapol/eapol_framework/eapol_symbian/am/include/eap_am_type_aka_symbian.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/eap_am_type_aka_symbian.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 20 %
+* %version: 18.1.4 %
 */
 
 #if !defined(_EAP_AM_TYPE_AKA_SYMBIAN_H_)
@@ -423,8 +423,10 @@
 	void store_authentication_timeL();
 
 private:
+
 	//--------------------------------------------------
-	RDbs m_session;
+
+	RFs m_session;
 	
 	RDbNamedDatabase m_database;	
 
@@ -494,14 +496,6 @@
 	// This holds the max session time read from the configuration file.
 	TInt64 m_max_session_time;
 	
-	// This is the vendor-type for tunneling EAP type.
-	// Valid for both expanded and non-expanded EAP types.
-	// This is used since m_tunneling_type can not be used in the same way 
-	// in expanded and non-expanded cases. 
-	// Unlike EAP type, Tunneling type is still non-expanded
-	// for both cases especially for using in the EAP databases.
-	u32_t m_tunneling_vendor_type;	
-	
 }; // class eap_am_type_aka_symbian_c
 
 
--- a/eapol/eapol_framework/eapol_symbian/am/include/eap_am_type_gsmsim_symbian.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/eap_am_type_gsmsim_symbian.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 21 %
+* %version: 19.1.4 %
 */
 
 #if !defined(_EAP_AM_TYPE_GSMSIM_SYMBIAN_H_)
@@ -262,6 +262,7 @@
 	//--------------------------------------------------
 
 private:
+
 	void type_configure_readL(
 		eap_config_string field,
 		const u32_t field_length,
@@ -337,10 +338,12 @@
 	
 
 private:
+
 	//--------------------------------------------------
-	RDbs m_session;
+
+	RFs m_session;
 	
-	RDbNamedDatabase m_database;	
+	RDbNamedDatabase m_database;
 
 	eap_am_tools_symbian_c * const m_am_tools;
 
@@ -400,14 +403,6 @@
 	// This holds the max session time read from the configuration file.
 	TInt64 m_max_session_time;
 
-	// This is the vendor-type for tunneling EAP type.
-	// Valid for both expanded and non-expanded EAP types.
-	// This is used since m_tunneling_type can not be used in the same way 
-	// in expanded and non-expanded cases. 
-	// Unlike EAP type, Tunneling type is still non-expanded
-	// for both cases especially for using in the EAP databases.
-	u32_t m_tunneling_vendor_type;	
-
 	//--------------------------------------------------
 }; // class eap_am_type_gsmsim_symbian_c
 
--- a/eapol/eapol_framework/eapol_symbian/am/include/eap_am_type_gsmsim_symbian_simulator.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/eap_am_type_gsmsim_symbian_simulator.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: %
 */
 
 #if !defined(_EAP_AM_TYPE_GSMSIM_SYMBIAN_SIMULATOR_H_)
--- a/eapol/eapol_framework/eapol_symbian/am/include/eap_am_type_leap_symbian.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/eap_am_type_leap_symbian.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 18 %
+* %version: 16.1.8 %
 */
 
 #ifndef EAP_AM_TYPE_LEAP_SYMBIAN_H
@@ -28,7 +28,9 @@
 #include "abs_eap_base_type.h"
 #include "eap_am_type_leap.h"
 #include "eap_am_network_id.h"
-#include "EapLeapNotifierStructs.h"
+
+#include "eap_auth_notifier.h"
+
 #include <EapType.h>
 #include <d32dbms.h>
 
@@ -42,6 +44,8 @@
 */
 class EAP_EXPORT eap_am_type_leap_symbian_c
 : public CActive, public eap_am_type_leap_c
+	, public MNotificationCallback
+
 {
 private:
 	//--------------------------------------------------
@@ -50,15 +54,15 @@
 
 	abs_eap_base_type_c * const m_partner;
 
-	RDbs m_session;
+	RFs m_session;
 
 	RDbNamedDatabase m_database;
 
 	RNotifier m_notifier;
 
-	TEapLeapUsernamePasswordInfo * m_input_output_data_ptr;
+	CEapAuthNotifier::TEapDialogInfo * m_input_output_data_ptr;
 
-	TPckg<TEapLeapUsernamePasswordInfo> * m_input_output_pckg_ptr;
+	TPckg<CEapAuthNotifier::TEapDialogInfo> * m_input_output_pckg_ptr;
 
 	eap_am_network_id_c m_receive_network_id;
 
@@ -82,19 +86,10 @@
 
 	bool m_shutdown_was_called;
 	
-	bool m_is_notifier_connected; // Tells if notifier server is connected.
-	
+
 	// This holds the max session time read from the configuration file.
 	TInt64 m_max_session_time;
 	
-	// This is the vendor-type for tunneling EAP type.
-	// Valid for both expanded and non-expanded EAP types.
-	// This is used since m_tunneling_type can not be used in the same way 
-	// in expanded and non-expanded cases. 
-	// Unlike EAP type, Tunneling type is still non-expanded
-	// for both cases especially for using in the EAP databases.
-	u32_t m_tunneling_vendor_type;	
-	
 	void send_error_notification(const eap_status_e error);
 
 	/**
@@ -105,6 +100,7 @@
 	 
 	bool is_session_validL();	
 
+	CEapAuthNotifier* iEapAuthNotifier;
 
 	//--------------------------------------------------
 protected:
@@ -197,6 +193,8 @@
 	 */
 	eap_status_e store_authentication_time();
 
+	void DlgComplete( TInt aStatus );
+
 }; // class eap_am_type_leap_symbian_c
 
 
--- a/eapol/eapol_framework/eapol_symbian/am/include/eap_am_type_mschapv2_symbian.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/eap_am_type_mschapv2_symbian.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 18 %
+* %version: 16.1.7 %
 */
 
 #ifndef _EAP_AM_TYPE_MSCHAPV2_SYMBIAN_H_
@@ -27,7 +27,8 @@
 #include "abs_eap_base_type.h"
 #include "eap_am_type_mschapv2.h"
 #include "eap_type_mschapv2.h"
-#include "EapMsChapV2NotifierStructs.h"
+#include "eap_auth_notifier.h"
+
 #include <EapType.h>
 #include <d32dbms.h>
 
@@ -39,14 +40,19 @@
 */
 class EAP_EXPORT eap_am_type_mschapv2_symbian_c
 : public CActive, public eap_am_type_mschapv2_c
+	, public MNotificationCallback
+
+
 {
 private:
+
 	//--------------------------------------------------
+
 	eap_am_tools_symbian_c * const m_am_tools;
 
 	abs_eap_base_type_c * const m_partner;
 
-	RDbs m_session;
+	RFs m_session;
 
 	RDbNamedDatabase m_database;
 
@@ -58,7 +64,7 @@
 
 	TState m_state;
 
-	RNotifier m_notifier;
+
 
 	eap_variable_data_c * m_username_utf8;
 	eap_variable_data_c * m_password_utf8;
@@ -66,8 +72,9 @@
 	bool * m_password_prompt_enabled;
 	bool m_is_identity_query;
 
-	TEapMsChapV2UsernamePasswordInfo * m_username_password_io_ptr;
-	TPckg<TEapMsChapV2UsernamePasswordInfo> * m_username_password_io_pckg_ptr;
+	CEapAuthNotifier::TEapDialogInfo * m_username_password_io_ptr;
+	TPckg<CEapAuthNotifier::TEapDialogInfo> * m_username_password_io_pckg_ptr;
+
 
 	eap_am_network_id_c m_receive_network_id;
 
@@ -83,18 +90,13 @@
 
 	bool m_shutdown_was_called;
 	
-	bool m_is_notifier_connected; // Tells if notifier server is connected.
+
 
 	// This holds the max session time read from the configuration file.
 	TInt64 m_max_session_time;
 
-	// This is the vendor-type for tunneling EAP type.
-	// Valid for both expanded and non-expanded EAP types.
-	// This is used since m_tunneling_type can not be used in the same way 
-	// in expanded and non-expanded cases. 
-	// Unlike EAP type, Tunneling type is still non-expanded
-	// for both cases especially for using in the EAP databases.
-	u32_t m_tunneling_vendor_type;	
+	CEapAuthNotifier* iEapAuthNotifier;
+
 
 	void send_error_notification(const eap_status_e error);
 
@@ -202,6 +204,9 @@
 	 */
 	eap_status_e store_authentication_time();	
 
+	EAP_FUNC_IMPORT void DlgComplete( TInt aStatus );
+
+
 }; // class eap_am_type_mschapv2_symbian_c
 
 
--- a/eapol/eapol_framework/eapol_symbian/am/include/eap_am_type_protected_setup_symbian.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/eap_am_type_protected_setup_symbian.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 18 %
+* %version: 13.1.9 %
 */
 
 #if !defined(_EAP_AM_TYPE_PROTECTED_SETUP_SYMBIAN_H_)
@@ -52,14 +52,15 @@
 */
 
 
-class EAP_EXPORT eap_am_type_protected_setup_symbian_c
-: public eap_am_type_simple_config_c
+class EAP_EXPORT CEapAmProtectedSetupSymbian
+: public CBase
+, public eap_am_type_simple_config_c
 {
 public:
 
 	//--------------------------------------------------	
 	
-	EAP_FUNC_IMPORT static eap_am_type_protected_setup_symbian_c* NewL(
+	EAP_FUNC_IMPORT static CEapAmProtectedSetupSymbian* NewL(
 		abs_eap_am_tools_c * const tools,
 		abs_eap_base_type_c * const partner,
 		const TIndexType aIndexType,
@@ -71,7 +72,7 @@
 		abs_eap_configuration_if_c * const configuration_if);
 		
 	// 
-	EAP_FUNC_IMPORT ~eap_am_type_protected_setup_symbian_c();	
+	EAP_FUNC_IMPORT virtual ~CEapAmProtectedSetupSymbian();	
 	
 	EAP_FUNC_IMPORT void set_is_valid();	
 		
@@ -243,7 +244,7 @@
 
 	//--------------------------------------------------
 
-	eap_am_type_protected_setup_symbian_c(
+	CEapAmProtectedSetupSymbian(
 		abs_eap_am_tools_c * const tools,
 		abs_eap_base_type_c * const partner,
 		const TIndexType aIndexType,
@@ -330,7 +331,7 @@
     
 	//-----------------------------------------------------------------	
 	
-}; // class eap_am_type_protected_setup_symbian_c
+}; // class CEapAmProtectedSetupSymbian
 
 
 #endif //#if !defined(_EAP_AM_TYPE_PROTECTED_SETUP_SYMBIAN_H_)
--- a/eapol/eapol_framework/eapol_symbian/am/include/eap_am_type_securid_symbian.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/eap_am_type_securid_symbian.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 18 %
+* %version: 16.1.7 %
 */
 
 #ifndef EAP_AM_TYPE_SECURID_SYMBIAN_H
@@ -27,7 +27,8 @@
 #include "abs_eap_base_type.h"
 #include "eap_am_type_securid.h"
 #include "eap_am_network_id.h"
-#include "EapSecurIDNotifierStructs.h"
+#include "eap_auth_notifier.h"
+
 #include <EapType.h>
 #include <d32dbms.h>
 
@@ -39,10 +40,13 @@
 */
 class EAP_EXPORT eap_am_type_securid_symbian_c
 	: public CActive, public eap_am_type_securid_c
+	, public MNotificationCallback
+
+
 {
 private:
 
-	RDbs m_session;
+	RFs m_session;
 
 	RDbNamedDatabase m_database;
 
@@ -58,8 +62,9 @@
 
 	RNotifier m_notifier;
 
-	TEapSecurIDStruct * m_dialog_data_ptr;
-	TPckg<TEapSecurIDStruct> * m_dialog_data_pckg_ptr;
+	CEapAuthNotifier::TEapDialogInfo * m_dialog_data_ptr;
+	TPckg<CEapAuthNotifier::TEapDialogInfo> * m_dialog_data_pckg_ptr;
+
 
 	abs_eap_am_tools_c * const m_am_tools;
 
@@ -88,20 +93,13 @@
 	// This holds the max session time read from the configuration file.
 	TInt64 m_max_session_time;
 	
-	// This is the vendor-type for tunneling EAP type.
-	// Valid for both expanded and non-expanded EAP types.
-	// This is used since m_tunneling_type can not be used in the same way 
-	// in expanded and non-expanded cases. 
-	// Unlike EAP type, Tunneling type is still non-expanded
-	// for both cases especially for using in the EAP databases.
-	u32_t m_tunneling_vendor_type;	
-
-	u32_t m_eap_vendor_type; // This is needed in certain cases.
-	
 	void send_error_notification(const eap_status_e error);
 	
 	bool is_session_validL();	
 
+	CEapAuthNotifier* iEapAuthNotifier;
+
+
 protected:
 
 	eap_am_type_securid_symbian_c(
@@ -205,6 +203,9 @@
 	 */
 	eap_status_e store_authentication_time();
 
+	void DlgComplete( TInt aStatus );
+
+
 }; // class eap_am_type_securid_symbian_c
 
 
--- a/eapol/eapol_framework/eapol_symbian/am/include/eap_am_type_sim_symbian.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/eap_am_type_sim_symbian.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 #if !defined(_EAP_AM_TYPE_SIM_SYMBIAN_H_)
--- a/eapol/eapol_framework/eapol_symbian/am/include/eap_am_type_tls_peap_symbian.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/eap_am_type_tls_peap_symbian.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 86.1.2 %
+* %version: 109 %
 */
 
 #if !defined(_EAP_AM_TYPE_TLS_PEAP_SYMBIAN_H_)
@@ -33,7 +33,8 @@
 #include <unifiedcertstore.h>
 #include <mctwritablecertstore.h>
 #include <pkixcertchain.h>
-#include "EapTlsPeapNotifierStructs.h"
+#include "eap_auth_notifier.h"
+
 #include "EapTlsPeapUtils.h"
 #include <bigint.h>
 
@@ -48,14 +49,12 @@
 class CEapTlsPeapCertInterface;
 class eap_am_tools_symbian_c;
 class abs_tls_am_application_eap_fast_c;
-#if defined(USE_FAST_EAP_TYPE)
-class CEapFastActive;
-#endif
-class CEapTtlsPapActive;
+
+
 
 #ifdef USE_PAC_STORE
 class CPacStoreDatabase;
-struct SInfoEntry;
+class SInfoEntry;
 #endif
 #if defined(USE_EAP_CONFIGURATION_TO_SKIP_USER_INTERACTIONS)
 class eap_file_config_c;
@@ -73,7 +72,10 @@
 /// This class is interface to adaptation module of EAP/TLS and PEAP.
 class EAP_EXPORT eap_am_type_tls_peap_symbian_c
 : public CActive, public eap_am_type_tls_peap_c
-,public abs_eap_base_timer_c 
+,public abs_eap_base_timer_c
+	, public MNotificationCallback
+
+
 {
 
 public:
@@ -88,7 +90,7 @@
 private: // data
 //--------------------------------------------------
 
-	RDbs m_session;
+	RFs m_session;
 
 	RDbNamedDatabase m_database;
 
@@ -98,17 +100,21 @@
 		EHandlingManualIdentityQuery,     /* 1 */
 		EHandlingChainQuery,              /* 2 */
 		EHandlingCipherSuiteQuery,        /* 3 */
-#if defined(USE_FAST_EAP_TYPE)            /* 4 */
-		EHandlingNotifierQuery,           /* 5 */
-		EPasswordQuery,                   /* 6 */
-		EWrongPassword,                   /* 7 */
-		EFilePasswordQuery,               /* 8 */
-		EMasterkeyQuery,                  /* 9 */
-		EPasswordCancel,                  /* 10 */
-		EShowProvSuccesstNote,            /* 11 */
-		EShowProvNotSuccesstNote,         /* 12 */
-		ENone                             /* 13 */
+    EHandlingDeviceSeedQuery,        /* 4 */
+#if defined(USE_FAST_EAP_TYPE)            /* 5 */
+		EHandlingNotifierQuery,           /* 6 */
+		EPasswordQuery,                   /* 7 */
+		EWrongPassword,                   /* 8 */
+		EFilePasswordQuery,               /* 9 */
+		EMasterkeyQuery,                  /* 10 */
+		EPasswordCancel,                  /* 11 */
+		EShowProvSuccesstNote,            /* 12 */
+		EShowProvNotSuccesstNote,         /* 13 */
+		ENotifierComplete,				/*14 */
 #endif //#if defined(USE_FAST_EAP_TYPE)
+		EPapUserNameAndPassword, /* 15 */
+		EPapChallenge, /* 16 */
+		ENone                             /* 17 */
 		
 	};
 	
@@ -130,9 +136,7 @@
 
 #if defined(USE_FAST_EAP_TYPE)
 	abs_tls_am_application_eap_fast_c * m_tls_application;
-	CEapFastActive* iEapFastActiveWaitNote;
-	CEapFastActive* iEapFastActiveNotes;
-	
+
 	enum TAlterTableCmd
 	    {
 	    EAddColumn,
@@ -146,11 +150,6 @@
 
 	eap_type_value_e m_current_eap_type;
 
-	// These are the vendor-types for EAP type and tunneling EAP type.
-	// Valid for both expanded and non-expanded EAP types.
-	u32_t m_current_eap_vendor_type;
-	u32_t m_tunneling_vendor_type;
-
 	TBufC<KMaxDatabaseTableName> m_db_table_name;
 	TBufC<KMaxDatabaseTableName> m_db_user_cert_table_name;
 	TBufC<KMaxDatabaseTableName> m_db_ca_cert_table_name;
@@ -158,8 +157,8 @@
 	TBufC<KMaxDatabaseTableName> m_db_name;
 
 #if defined (USE_FAST_EAP_TYPE)	
-TBufC<KMaxDatabaseTableName> m_db_fast_special_table_name;
-RArray<SInfoEntry> m_info_array;
+	TBufC<KMaxDatabaseTableName> m_db_fast_special_table_name;
+	RPointerArray<SInfoEntry> m_info_array;
 #endif	
 
 	u32_t m_max_count_of_session_resumes;
@@ -174,7 +173,7 @@
 
 	CEapTlsPeapCertInterface* m_cert_if;	
 
-	SCertEntry m_own_certificate_info;
+	EapCertificateEntry m_own_certificate_info;
 
 	eap_am_network_id_c m_receive_network_id;
 
@@ -182,11 +181,11 @@
 
 	TKeyIdentifier m_subject_key_id;
 
-	RArray<SCertEntry> m_allowed_ca_certs;
+	RPointerArray<EapCertificateEntry> m_allowed_ca_certs;
 
-	RArray<SCertEntry> m_allowed_user_certs;
+	RPointerArray<EapCertificateEntry> m_allowed_user_certs;
 	
-	RArray<SCertEntry> m_allowed_server_certs;
+	RPointerArray<EapCertificateEntry> m_allowed_server_certs;
 
 	RArray<TUint> m_allowed_cipher_suites;
 
@@ -198,20 +197,11 @@
 	
 	bool m_shutdown_was_called;
 
-#ifdef USE_EAP_EXPANDED_TYPES
-
 	/// Tunneling EAP configuration data from EAP database.
-	RExpandedEapTypePtrArray m_enabled_tunneling_exp_eap_array;
-	RExpandedEapTypePtrArray m_disabled_tunneling_exp_eap_array;
+	RPointerArray<TEapExpandedType> m_enabled_tunneling_exp_eap_array;
+	RPointerArray<TEapExpandedType> m_disabled_tunneling_exp_eap_array;
 
-#else
 
-	/// Tunneling EAP configuration data from EAP database.
-	TEapArray m_iap_eap_array;
-
-#endif  // #ifdef USE_EAP_EXPANDED_TYPES
-	TIdentityInfo* m_identity_info; 
-	
 	TBuf8<4> m_selector_output;
 
 	eap_type_value_e m_tunneled_type;
@@ -230,6 +220,8 @@
 	
 	bool m_tls_peap_server_authenticates_client_policy_flag;
 
+	bool m_use_automatic_ca_certificate;
+
 	/// This flag prevents double configuration. This can happen when 
 	/// this class implements many interfaces.
 	bool m_configured;
@@ -264,18 +256,16 @@
 	
 	bool m_serv_unauth_prov_mode;
 	bool m_serv_auth_prov_mode;
+#endif
 	
-	// For FAST notifiers
-	RNotifier m_notifier;	
-	bool m_is_notifier_connected; // Tells if notifier server is connected.
+
 
-	TEapFastNotifierStruct * m_notifier_data_to_user;
-	TPckg<TEapFastNotifierStruct> * m_notifier_data_pckg_to_user;	
+	CEapAuthNotifier::TEapDialogInfo * m_notifier_data_to_user;
 
-	TEapFastNotifierStruct * m_notifier_data_from_user;
-	TPckg<TEapFastNotifierStruct> * m_notifier_data_pckg_from_user;	
+	TPckg<CEapAuthNotifier::TEapDialogInfo> * m_notifier_data_pckg_to_user;
 
     /* For MMETEL */
+#if defined(USE_FAST_EAP_TYPE)
     
 	// ETel connection.
     RTelServer iServer;
@@ -287,6 +277,7 @@
     	
     // Tells if MMETEL is connected already or not.
     TBool iMMETELConnectionStatus;    
+
     TBool m_completed_with_zero;   
 	TBool m_verificationStatus;
 
@@ -294,7 +285,6 @@
 	EEapFastNotifierUserAction m_userAction;
 	eap_pac_store_data_type_e m_pacStoreDataRefType;
 	eap_fast_pac_store_data_c m_data_reference;
-	TBool m_notifier_complete;
 	eap_variable_data_c m_userResponse;
 	eap_fast_pac_store_pending_operation_e m_pending_operation;
 	TInt m_both_completed;
@@ -316,6 +306,7 @@
 	eap_fast_initialize_pac_store_completion_e iCompletion;
 
 #endif //#if defined(USE_FAST_EAP_TYPE)
+	TBool m_notifier_complete;
 
 #ifdef USE_PAC_STORE
 	CPacStoreDatabase * iPacStoreDb;
@@ -338,7 +329,16 @@
 	* Provides asynch services used by the caller such as
     * query for TTLS-PAP user name and password.
     */
-	CEapTtlsPapActive* iEapTtlsPapActive;
+
+ //   eap_am_type_tls_peap_symbian_c* iCaller;
+    
+    eap_variable_data_c* iPacStoreDeviceSeed;
+
+#ifdef USE_PAC_STORE
+#endif
+
+	CEapAuthNotifier* iEapAuthNotifier;
+
 
 	
 //--------------------------------------------------
@@ -460,8 +460,7 @@
 		const eap_fast_pac_store_pending_operation_e in_pending_operation,
 		EAP_TEMPLATE_CONST eap_array_c<eap_fast_pac_store_data_c> * const in_references_and_data_blocks);
 		
-	eap_status_e ShowNotifierItemAndGetResponse(
-		EEapFastNotifierUiItem aNotifierUiItem, TBool aSetActive );
+
 
 	eap_status_e RemoveIAPReference();
 
@@ -562,6 +561,15 @@
 		const TInt64& aInMaxSessionTime,
 		const TInt64& aInLastFullAuthTime );
 	
+#ifdef USE_FAST_EAP_TYPE    
+    TInt CreateMMETelConnectionL();
+
+    void DisconnectMMETel();    
+
+    eap_status_e CreateDeviceSeedAsync();
+    
+    void CompleteCreateDeviceSeedL( TInt aStatus );
+#endif
 	
 //--------------------------------------------------
 protected: // methods
@@ -602,7 +610,7 @@
 
 	EAP_FUNC_IMPORT virtual ~eap_am_type_tls_peap_symbian_c();
 
-	EAP_FUNC_EXPORT eap_status_e shutdown();
+	EAP_FUNC_IMPORT eap_status_e shutdown();
 
 	EAP_FUNC_IMPORT void set_is_valid();
 
@@ -818,7 +826,7 @@
 
 	void complete_validate_chain(CPKIXValidationResult& aValidationResult, eap_status_e aStatus);
 
-	void complete_get_matching_certificates(CArrayFixFlat<SCertEntry>& aMatchingCerts, eap_status_e aStatus);
+	void complete_get_matching_certificates(RPointerArray<EapCertificateEntry>& aMatchingCerts, eap_status_e aStatus);
 
 	void complete_sign(const RInteger& aR, const RInteger& aS, eap_status_e aStatus);
 
@@ -1016,7 +1024,12 @@
 #if defined(USE_EAP_CONFIGURATION_TO_SKIP_USER_INTERACTIONS)
  	eap_status_e ReadFileConfig();
 #endif
-#endif 	
+
+#endif 
+
+	EAP_FUNC_IMPORT void DlgComplete( TInt aStatus );
+
+	
 }; // class eap_am_type_tls_peap_symbian_c
 
 
--- a/eapol/eapol_framework/eapol_symbian/am/include/eapol_am_core_symbian.h	Thu May 13 22:51:27 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,379 +0,0 @@
-/*
-* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  EAP and WLAN authentication protocols.
-*
-*/
-
-/*
-* %version: 11 %
-*/
-
-#if !defined(_EAPOL_AM_CORE_SYMBIAN_H_)
-#define _EAPOL_AM_CORE_SYMBIAN_H_
-
-// INCLUDES
-#include <d32dbms.h>
-#include <wlanmgmtpacket.h> // For MWlanMgmtPacket
-
-#include <wdbifwlansettings.h>
-
-#include "abs_ethernet_core.h"
-#include "eapol_key_types.h"
-#include <EapType.h> // For TIndexType
-//#include "EapolTimer.h"
-
-#include <Eapol.h>
-
-// FORWARD DECLARATIONS
-class MEapolToWlmIf;
-class CEapType;
-class ethernet_core_c;
-class eap_am_tools_symbian_c;
-class eap_file_config_c;
-
-const TInt KMaxWPAPSKPasswordLength = 64;
-const TInt KWPAPSKLength = 32;
-
-// CLASS DECLARATION
-class eapol_am_core_symbian_c
-:  public CActive, public abs_ethernet_core_c,
-	public abs_eap_base_timer_c
-
-{
-public:
-
-	struct TPSKEntry {
-		TIndexType indexType;
-		TUint index;
-		TBuf8<KMaxSSIDLength> ssid;
-		TBuf8<KMaxWPAPSKPasswordLength> password;
-		TBuf8<KWPAPSKLength> psk;
-	};
-
-	virtual ~eapol_am_core_symbian_c();	
-	
-	///////////////////////////////////////////////////////////////
-	/* These are called from WLM via CEapol */
-
-	static eapol_am_core_symbian_c * NewL(
-		MEapolToWlmIf* const aPartner,
-		const bool aIsClient = ETrue,
-		const TUint aServerIndex = 0);
-
-
-	TInt Start( 
-		const TIndexType aIndexType, 
-		const TUint aIndex,
-		const TSSID& aSSID,
-		const TBool aWPAOverrideEnabled,
-		const TUint8* aWPAPSK,
-		const TUint aWPAPSKLength
-		);
-
-	TInt CompleteAssociation(
-		const TInt aResult,
-		const TMacAddress& aLocalAddress, 
-		const TMacAddress& aRemoteAddress,
-		const TUint8* const aReceivedWPAIE, // WLM must give only the WPA IE to EAPOL									        
-		const TUint aReceivedWPAIELength,
-		const TUint8* const aSentWPAIE,
-		const TUint aSentWPAIELength,
-		const TWPACipherSuite aGroupKeyCipherSuite,
-		const TWPACipherSuite aPairwiseKeyCipherSuite
-		);		
-
-	
-	TInt Disassociated(); 
-		
-	TInt ReceivePacket(
-		const TUint aLength, 
-		const TUint8* const aData);
-
-	TInt SendWPAMICFailureReport(
-		TBool aFatalMICFailure,
-		const TMICFailureType aMICFailureType); 	
-
-	/////////////////////////////////////////
-	/* These are called from ethernet_core */
-	
-	/**
-	* Sends packet to lower layers
-	*/
-	eap_status_e packet_send(
-		const eap_am_network_id_c * const send_network_id,
-		eap_buf_chain_wr_c * const sent_packet,
-		const u32_t header_offset,
-		const u32_t data_length,
-		const u32_t buffer_length); 
-
-	u32_t get_header_offset(
-		u32_t * const MTU,
-		u32_t * const trailer_length);
-
-	eap_status_e eap_acknowledge(const eap_am_network_id_c * const receive_network_id); 
-
-	eap_status_e reassociate(
-			const eap_am_network_id_c * const send_network_id,
-			const eapol_key_authentication_type_e authentication_type,
-			const eap_variable_data_c * const PMKID,
-			const eap_variable_data_c * const WPXM_WPXK1,
-			const eap_variable_data_c * const WPXM_WPXK2);
-
-	/**
-	* Loads an EAP type plug-in.
-	* @param type Type to be loaded.
-	* @param partner Pointer to the partner class for the EAP type.
-	* @param eap_type The pointer for the loaded type should be set here.
-	* @param is_client_when_true Indicates whether the loaded EAP type should be client or server.
-	* @param receive_network_id Network address.
-	*/
-	eap_status_e load_module(
-		const eap_type_value_e type,
-		const eap_type_value_e /* tunneling_type */,
-		abs_eap_base_type_c * const partner,
-		eap_base_type_c ** const eap_type,
-		const bool is_client_when_true,
-		const eap_am_network_id_c * const receive_network_id);
-
-	eap_status_e unload_module(const eap_type_value_e type); 	
-
-	void set_is_valid();
-
-	bool get_is_valid();
-
-	void increment_authentication_counter();
-
-	u32_t get_authentication_counter();
-
-	bool get_is_client();
-
-	/**
-	* This does the initial configuration of the class.
-	*/
-	eap_status_e configure();
-
-	eap_status_e shutdown();
-
-	/**
-	* Reads a configuration parameter value from the database. 
-	* In Symbian this function is only a TRAP wrapper for read_configure_L.
-	*/
-	eap_status_e read_configure(
-		const eap_configuration_field_c * const field,
-		eap_variable_data_c * const data);
-
-	eap_status_e write_configure(
-		const eap_configuration_field_c * const field,
-		eap_variable_data_c * const data);
-
-	// See abs_eap_base_type_c::state_notification().
-	void state_notification(const abs_eap_state_notification_c * const state);
-	
-	eap_status_e set_timer(
-		abs_eap_base_timer_c * const p_initializer, 
-		const u32_t p_id, 
-		void * const p_data,
-		const u32_t p_time_ms);
-
-	eap_status_e cancel_timer(
-		abs_eap_base_timer_c * const p_initializer, 
-		const u32_t p_id);
-
-	eap_status_e cancel_all_timers();
-
-	eap_status_e check_is_valid_eap_type(const eap_type_value_e eap_type);
-	
-	eap_status_e packet_data_crypto_keys(
-		const eap_am_network_id_c * const send_network_id,
-		const eap_variable_data_c * const master_session_key);
-
-	/**
-	* Forwards the keys to lower layer (= WLM).
-	*/
-	eap_status_e packet_data_session_key(
-		const eap_am_network_id_c * const send_network_id,
-		const eapol_session_key_c * const key);
-
-	/**
-	* Packet mangling routine for testing.
-	*/
-	
-	eap_status_e timer_expired(const u32_t id, void *data);
-
-	eap_status_e timer_delete_data(const u32_t id, void *data);
-
-	eap_status_e get_eap_type_list(
-		eap_array_c<eap_type_value_e> * const eap_type_list);
-
-	eap_status_e add_rogue_ap(eap_array_c<eap_rogue_ap_entry_c> & rogue_ap_list);
-
-protected:
-	
-	eapol_am_core_symbian_c(
-		MEapolToWlmIf * const aPartner,
-		const bool is_client_when_true,
-		const TUint aServerIndex);
-	
-	void ConstructL();
-
-	void RunL();
-	
-	void DoCancel();
-
-private:
-
-	eap_status_e random_error(
-		eap_buf_chain_wr_c * const sent_packet,
-		const bool forse_error,
-		const u32_t packet_index);
-
-	/**
-	* Tries to open EAPOL parameter database.
-	*/
-	void TryOpenDatabaseL(RDbNamedDatabase& aDatabase, RDbs& aSession);
-
-	/**
-	* Opening function for EAPOL parameter database.
-	*/
-	void OpenDatabaseL(RDbNamedDatabase& aDatabase, RDbs& aSession);
-	
-	void read_configureL(eap_config_string field,
-										const u32_t field_length,
-										eap_variable_data_c * const data);	
-
-	void ReadEAPSettingsL();
-
-	void SetToTopPriorityL(const TEap* const aEapType);
-
-	eap_status_e create_upper_stack();
-
-	void RetrievePSKL(TPSKEntry& entry);
-
-	void SavePSKL(TPSKEntry& entry);
-
-
-
-private:
-
-	RDbs m_session;
-	RDbNamedDatabase m_database;
-
-	/// Pointer to the lower layer in the stack
-	MEapolToWlmIf* m_partner;
-
-	/// Pointer to the upper layer in the stack
-	ethernet_core_c* m_ethernet_core;
-
-	/// Pointer to the tools class
-	eap_am_tools_symbian_c* m_am_tools;
-
-	bool m_enable_random_errors;
-
-	u32_t m_error_probability;
-
-	u32_t m_generate_multiple_error_packets;
-	
-	u32_t m_authentication_counter;
-
-	u32_t m_successful_authentications;
-
-	u32_t m_failed_authentications;
-
-	bool m_is_valid;
-
-	bool m_is_client;	
-
-	/// Array for storing the loaded EAP types.
-	RPointerArray<CEapType> m_plugin_if_array;
-	/// Array which corresponds with m_plugin_if_array and indicates the types of the loaded EAP types.
-	RArray<eap_type_value_e> m_eap_type_array;
-
-	/// EAP configuration data from CommDb
-	TEapArray m_iap_eap_array;
-	TUint m_eap_index;
-	/// Indicates the bearer type
-	TIndexType m_index_type;
-	/// Indicates the service index in CommDb
-	TUint m_index;
-
-	u32_t m_packet_index;
-
-	bool m_manipulate_ethernet_header;
-
-	bool m_send_original_packet_first;
-
-	bool m_authentication_indication_sent;
-
-	bool m_unicast_wep_key_received;
-
-	bool m_broadcast_wep_key_received;
-
-	bool m_block_packet_sends_and_notifications;
-
-	bool m_success_indication_sent;
-
-	bool m_first_authentication;
-
-	bool m_self_disassociated;
-
-	TAuthenticationMode m_802_11_authentication_mode;
-
-	EWlanSecurityMode m_security_mode;
-
-	eap_variable_data_c * m_wpa_preshared_key;
-
-	eap_variable_data_c * m_ssid;
-
-	eap_am_network_id_c* m_receive_network_id;
-	
-	eap_variable_data_c * m_wpa_psk_password_override;
-
-	bool m_wpa_override_enabled;
-
-	bool m_wpa_psk_mode_allowed;
-
-	bool m_wpa_psk_mode_active;	
-
-	bool m_stack_marked_to_be_deleted;
-
-	TMacAddress m_local_address;
-
-	TMacAddress m_remote_address;
-
-	const TUint8* m_received_wpa_ie;
-
-	TUint m_received_wpa_ie_length;
-
-	const TUint8* m_sent_wpa_ie;
-
-	TUint m_sent_wpa_ie_length;
-
-	TWPACipherSuite m_group_key_cipher_suite;
-
-	TWPACipherSuite m_pairwise_key_cipher_suite;
-
-	bool m_active_type_is_leap;
-
-	eap_file_config_c* m_fileconfig;
-
-	//--------------------------------------------------
-}; // class eapol_am_core_symbian_c
-
-#endif //#if !defined(_EAPOL_AM_CORE_SYMBIAN_H_)
-
-//--------------------------------------------------
-
-
-
-// End of file
--- a/eapol/eapol_framework/eapol_symbian/am/include/eapol_am_core_symbian_simulator.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/eapol_am_core_symbian_simulator.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7.1.2 %
+* %version: %
 */
 
 #if !defined(_EAP_AM_SYMBIAN_H_)
@@ -92,7 +92,7 @@
 
 #if defined(USE_EAPOL_LLC_INTERFACE)
 	//
-	EAP_FUNC_EXPORT eap_status_e packet_process(
+	EAP_FUNC_IMPORT eap_status_e packet_process(
 		RMBufChain& aPdu);
 #endif //#if defined(USE_EAPOL_LLC_INTERFACE)
 
--- a/eapol/eapol_framework/eapol_symbian/am/include/eapol_am_core_symbian_wlm.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/eapol_am_core_symbian_wlm.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 #if !defined(_EAPOL_AM_CORE_SYMBIAN_WLM_H_)
--- a/eapol/eapol_framework/eapol_symbian/am/include/eapol_am_wlan_authentication_symbian.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/include/eapol_am_wlan_authentication_symbian.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 30.1.2 %
+* %version: 46 %
 */
 
 #if !defined(_EAPOL_AM_WLAN_AUTHENTICATION_SYMBIAN_H_)
@@ -38,29 +38,10 @@
 #include <e32std.h>
 #include <d32dbms.h>
 
-#include <wdbifwlansettings.h>
+//#include <wdbifwlansettings.h>
 
 #include <EapType.h> // For TIndexType
 
-
-#ifdef SYMBIAN_SECURE_DBMS
-// For EAP TLS, PEAP, TTLS, FAST secure databases.
-// Full path is not needed. The database eaptls.dat will be saved in the 
-// data cage path for DBMS. So it will be in "\private\100012a5\eaptls.dat" in C: drive.
-// The maximum length of database name is 0x40 (KDbMaxName) , which is defined in d32dbms.h.
-
-_LIT(KFastDatabaseName, "c:eapfast.dat");
-
-
-#else
-
-#ifdef USE_EAP_FAST_TYPE
-_LIT(KFastDatabaseName, "c:\\system\\data\\eapfast.dat");
-#endif
-
-#endif // #ifdef SYMBIAN_SECURE_DBMS
-
-
 class CEapType;
 class abs_eapol_am_wlan_authentication_c;
 class abs_eap_am_tools_c;
@@ -75,8 +56,7 @@
 /// This class declares the simulator adaptation module of eapol_am_wlan_authentication_c.
 /// See comments of the functions from eapol_am_wlan_authentication_c.
 class EAP_EXPORT eapol_am_wlan_authentication_symbian_c
-: public CActive
-, public eapol_am_wlan_authentication_c
+: public eapol_am_wlan_authentication_c
 #if defined(USE_EAP_SIMPLE_CONFIG)
 , public abs_eap_configuration_if_c
 #endif // #if defined(USE_EAP_SIMPLE_CONFIG)
@@ -104,47 +84,18 @@
 	/// HAHS of WPA(2)-PSK 
 	eap_variable_data_c m_wpa_preshared_key_hash;
 
-	/// This pointer is abstract interface to reference of WLAN database of the current connection.
-	const abs_eapol_wlan_database_reference_if_c * m_wlan_database_reference;
+	/// Database reference to EAPOL settings.
+	eap_variable_data_c m_database_reference;
 
 	/// Handle of database session.
-	RDbs m_session;
+	RFs m_session;
 
 	/// Handle of database file.
-	RFs m_fs;
-
-	/// Array for storing the loaded EAP types.
-	RPointerArray<CEapType> m_plugin_if_array;
-
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	/// Enabled expanded EAP configuration data from CommsDat
-	// This is for the outer most EAP (not tunneled)
-	RExpandedEapTypeArray m_enabled_expanded_eap_array;
-
-	/// Disabled expanded EAP configuration data from CommsDat
-	// This is for the outer most EAP (not tunneled)
-	RExpandedEapTypeArray m_disabled_expanded_eap_array;
-	
-	/// Array which corresponds with m_plugin_if_array and indicates the types of the loaded EAP types.	
-	eap_array_c<eap_type_value_e> m_eap_type_array;
-		
-#else
-
-	/// EAP configuration data from CommDb
-	TEapArray m_iap_eap_array;
-	
-	/// Array which corresponds with m_plugin_if_array and indicates the types of the loaded EAP types.
-	RArray<eap_type_value_e> m_eap_type_array;	
-	
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
+	//RFs m_fs;
 
 	/// Network identity of current connection.
 	eap_am_network_id_c m_receive_network_id;
 
-	/// WLAN security mode as defined in Symbian platform.
-	EWlanSecurityMode m_security_mode;
-
 	/// WLAN authentication type.
 	eapol_key_authentication_type_e m_selected_eapol_key_authentication_type;
 
@@ -196,29 +147,14 @@
 	/// This function saves WPA(2)-PSK to database.
 	void SavePSKL(TPSKEntry& entry);
 
-	/// This function reads EAP-settings from database.
-	void ReadEAPSettingsL();
-
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	/// This function set the EAP-type to highest in priority.
-	void SetToTopPriorityL(const eap_type_value_e aEapType);
-
-#else // For normal EAP types.
-
-	/// This function set the EAP-type to highest in priority.
-	void SetToTopPriorityL(const TEap* const aEapType);
-
-#endif // #ifdef USE_EAP_EXPANDED_TYPES
+	/// This function reads WPA-settings from database.
+	void ReadWPASettingsL();
 
 	/// THis function reads the references to active Internet Access Point (IAP).
 	eap_status_e read_database_reference_values(
 		TIndexType * const type,
 		TUint * const index);
 
-	/// This function resets all EAP-plugings.
-	eap_status_e reset_eap_plugins();
-
 	/// This function sends error notification to partner object.
 	void send_error_notification(const eap_status_e error);
 
@@ -232,8 +168,7 @@
 	// 
 	EAP_FUNC_IMPORT eapol_am_wlan_authentication_symbian_c(
 		abs_eap_am_tools_c * const tools,
-		const bool is_client_when_true,
-		const abs_eapol_wlan_database_reference_if_c * const wlan_database_reference);
+		const bool is_client_when_true);
 
 
 	/// See comments of the functions from eapol_am_wlan_authentication_c.
@@ -251,7 +186,7 @@
 #endif // #if defined(USE_EAP_SIMPLE_CONFIG)
 		);
 
-	EAP_FUNC_IMPORT eap_status_e reset_eap_configuration();
+	EAP_FUNC_IMPORT eap_status_e reset_wpa_configuration();
 
 	EAP_FUNC_IMPORT eap_status_e set_wlan_parameters(
 		const eap_variable_data_c * const SSID,
@@ -266,9 +201,6 @@
 		const eap_am_network_id_c * const receive_network_id ///< source includes remote address, destination includes local address.
 		);
 
-	EAP_FUNC_IMPORT eap_status_e get_selected_eap_types(
-		eap_array_c<eap_type_selection_c> * const selected_eap_types);
-
 	EAP_FUNC_IMPORT eap_status_e get_wlan_configuration(
 		eap_variable_data_c * const wpa_preshared_key_hash);
 
@@ -277,18 +209,6 @@
 		const eap_type_value_e eap_type,
 		const eapol_key_authentication_type_e authentication_type);
 
-	EAP_FUNC_IMPORT eap_status_e load_module(
-		const eap_type_value_e type,
-		const eap_type_value_e tunneling_type,
-		abs_eap_base_type_c * const partner,
-		eap_base_type_c ** const eap_type_if,
-		const bool is_client_when_true,
-		const eap_am_network_id_c * const receive_network_id ///< source includes remote address, destination includes local address.
-		);
-
-	EAP_FUNC_IMPORT eap_status_e unload_module(
-		const eap_type_value_e type);
-
 	EAP_FUNC_IMPORT eap_status_e read_configure(
 		const eap_configuration_field_c * const field,
 		eap_variable_data_c * const data);
@@ -309,17 +229,12 @@
 
 	EAP_FUNC_IMPORT eap_status_e cancel_all_timers();
 
-	EAP_FUNC_IMPORT eap_status_e check_is_valid_eap_type(const eap_type_value_e eap_type);
-
-	EAP_FUNC_IMPORT eap_status_e get_eap_type_list(
-		eap_array_c<eap_type_value_e> * const eap_type_list);
-
 	EAP_FUNC_IMPORT void state_notification(
 		const abs_eap_state_notification_c * const state);
 
 #if defined(USE_EAP_SIMPLE_CONFIG)
 
-	EAP_FUNC_EXPORT eap_status_e save_simple_config_session(
+	EAP_FUNC_IMPORT eap_status_e save_simple_config_session(
 		const simple_config_state_e state,
 		EAP_TEMPLATE_CONST eap_array_c<simple_config_credential_c> * const credential_array,
 		const eap_variable_data_c * const new_password,
@@ -328,6 +243,9 @@
 
 #endif // #if defined(USE_EAP_SIMPLE_CONFIG)
 
+	EAP_FUNC_IMPORT eap_status_e set_eap_database_reference_values(
+		const eap_variable_data_c * const reference);
+
 	//--------------------------------------------------
 }; // class eapol_am_wlan_authentication_symbian_c
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/include/eaptlspeap_db_api_inc/AbsEapCertificateFetcher.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 4 %
+*/
+
+#ifndef _ABS_EAP_CERTIFICATE_FETCHER_H_
+#define _ABS_EAP_CERTIFICATE_FETCHER_H_
+
+// INCLUDES
+#include <e32base.h>
+#include "EapSettings.h"
+
+
+// CLASS DECLARATION
+class CAbsEapCertificateFetcher: public CBase
+{
+public:
+
+	CAbsEapCertificateFetcher()
+	{
+	}
+
+	virtual ~CAbsEapCertificateFetcher()
+	{
+	}
+
+	virtual void CompleteReadCertificatesL(
+		const RPointerArray<EapCertificateEntry>& aUserCerts, 
+		const RPointerArray<EapCertificateEntry>& aCACerts) = 0;
+};
+
+#endif // _ABS_EAP_CERTIFICATE_FETCHER_H_
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/include/eaptlspeap_db_api_inc/AbsEapTlsPeapUiCertificates.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,42 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#ifndef _ABSEAPTLSPEAPUICERTIFICATES_H_
+#define _ABSEAPTLSPEAPUICERTIFICATES_H_
+
+// INCLUDES
+
+// CLASS DECLARATION
+/**
+* Class for 
+*/
+class MEapTlsPeapUiCertificates
+{
+public:
+	/**
+	* 
+	*/
+	virtual void CompleteReadCertificates(const TInt aResult) = 0;	
+};
+
+#endif // _ABSEAPTLSPEAPUICERTIFICATES_H_
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/include/eaptlspeap_db_api_inc/EapFastNotifierStruct.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,61 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#ifndef EAPFASTNOTIFIERSTRUCT_H
+#define EAPFASTNOTIFIERSTRUCT_H
+
+const TUid KEapFastNotifierUid = {0x2000F8DF};
+
+const TUint KMaxEapFastNotifierBufLength = 255;
+
+enum EEapFastNotifierUiItem
+{
+	EEapFastNotifierPacStorePwQuery,         /* 0 */
+	EEapFastNotifierWrongPacStorePwNote,     /* 1 */
+	EEapFastNotifierAuthProvWaitNote,        /* 2 */
+	EEapFastNotifierAuthProvWaitNoteEnd,     /* 3 */
+	EEapFastNotifierUnauthProvWaitNote,      /* 4 */
+	EEapFastNotifierUnauthProvWaitNoteEnd,   /* 5 */
+	EEapFastNotifierInstallPacConfirmQuery,	 /* 6 */
+	EEapFastNotifierProvSuccessNote,         /* 7 */
+	EEapFastNotifierProvNotSuccessNote,      /* 8 */
+	EEapFastNotifierPacFilePwQuery,          /* 9 */
+	EEapFastNotifierWrongPacFilePwNote,      /* 10 */
+	EEapFastNotifierCreateMasterkeyQuery,    /* 11 */
+	EEapFastNotifierUiItemsNumber            /* 12 */ // keep always as last element
+};
+
+enum EEapFastNotifierUserAction
+{
+	EEapFastNotifierUserActionOk,
+	EEapFastNotifierUserActionCancel
+};
+
+struct TEapFastNotifierStruct
+{
+	EEapFastNotifierUiItem iEapFastNotifierUiItem;
+	TBuf<KMaxEapFastNotifierBufLength> iEapFastNotifierBuffer;
+	EEapFastNotifierUserAction iEapFastNotifierUserAction;
+};
+
+#endif // EAPFASTNOTIFIERSTRUCT_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/include/eaptlspeap_db_api_inc/EapFastPacStore.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,74 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP-FAST PAC-store IF.
+*
+*/
+
+/*
+* %version: 9 %
+*/
+
+#ifndef _EAPFASTPACSTORE_H_
+#define _EAPFASTPACSTORE_H_
+
+// INCLUDES
+#include <e32base.h>
+#include <ecom/ecom.h> 
+
+
+class CEapFastPacStore
+: public CBase
+{
+
+public:
+
+    /**
+    * Factory function that loads the CEapFastPacStore implementation DLL (plug-in).
+    */
+    static CEapFastPacStore * NewL();
+
+	virtual void OpenPacStoreL() = 0;
+    
+    // this may not be needed at all
+    virtual void CreateDeviceSeedL() = 0;
+
+    virtual TBool IsMasterKeyPresentL() = 0;
+
+    virtual TBool IsMasterKeyAndPasswordMatchingL(
+		const TDesC8 & aPassword8) = 0;
+
+    virtual TInt CreateAndSaveMasterKeyL(
+		const TDesC8 & aPassword8) = 0;
+
+    virtual TInt ComparePacStorePasswordL(
+		TDes8 & aPassword8) = 0;
+
+    virtual TBool IsPacStorePasswordPresentL() = 0;
+
+    virtual TInt SetPacStorePasswordL(
+		const TDesC8 & aPassword8) = 0;
+
+    virtual TInt DestroyPacStore() = 0;
+
+private:
+
+	/// ECom uses this key to keep track of DLL usage.
+	TUid iDtor_ID_Key;
+
+};
+
+#include "EapFastPacStore.inl"
+
+
+#endif //_EAPFASTPACSTORE_H_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/include/eaptlspeap_db_api_inc/EapFastPacStore.inl	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  WAPI authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#include "EapTraceSymbian.h"
+
+inline CEapFastPacStore* CEapFastPacStore::NewL()
+{
+    EAP_TRACE_DEBUG_SYMBIAN((_L("CEapFastPacStore::NewL(): start")));
+
+    // This call finds and loads the correct DLL and after that calls the
+    // entry function in the interface implementation in the DLL.
+    TAny* ptr = 0;
+
+    const TUid KimplementationUid = { 0x2002BC93 };
+
+    TRAPD( err, ptr = REComSession::CreateImplementationL(
+            KimplementationUid,
+            _FOFF(CEapFastPacStore, iDtor_ID_Key)));
+
+    EAP_TRACE_DEBUG_SYMBIAN((_L("CEapFastPacStore::NewL(): CreateImplementationL(Uid=0x%08x), err=%d, returns ptr=0x%08x\n"),
+        KimplementationUid.iUid,
+        err,
+        ptr));
+
+
+    User::LeaveIfError(err);
+
+    return reinterpret_cast<CEapFastPacStore *>(ptr);
+}
+
+// end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/include/eaptlspeap_db_api_inc/EapTlsPeapUiCertificates.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,96 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#ifndef _EAPTLSPEAPUICERTIFICATES_H_
+#define _EAPTLSPEAPUICERTIFICATES_H_
+
+#include <e32base.h>
+#include <AbsEapCertificateFetcher.h>
+
+
+class CEapTlsPeapUiConnection;
+class CEapGeneralSettings;
+class MEapTlsPeapUiCertificates;
+class CEapType;
+
+
+class CEapTlsPeapUiCertificates
+: public CBase
+//, public CAbsEapCertificateFetcher
+{
+
+public:
+
+    CEapTlsPeapUiCertificates(CEapTlsPeapUiConnection * const aUiConn, MEapTlsPeapUiCertificates * const aParent);
+
+    ~CEapTlsPeapUiCertificates();
+
+    TInt Open();
+
+	TInt GetCertificates(RPointerArray<EapCertificateEntry> ** aUserCerts,
+						 RPointerArray<EapCertificateEntry> ** aCACerts);
+    
+    TInt Update();
+
+    TInt Close();
+
+private:
+
+    TBool iIsOpened;
+
+    CEapTlsPeapUiConnection * iUiConn;
+
+    RPointerArray<EapCertificateEntry> * iUserCerts;
+
+    RPointerArray<EapCertificateEntry> * iCACerts;
+
+    TRequestStatus iStatus;
+	
+	CEapGeneralSettings *iEapGeneralSettings;
+	
+	MEapTlsPeapUiCertificates* iParent;
+	
+    CEapType* iEapTypeConnection; 
+
+private:
+
+	void SelectActiveCertificatesL();
+
+	void FetchDataL(
+		const RPointerArray<EapCertificateEntry>& aAvailableCerts,
+		RPointerArray<EapCertificateEntry> * const aArray);    
+
+    void UpdateL();
+
+	void SelectCertificatesL(
+		const EapCertificateEntry::TCertType aCertType,
+		const EAPSettings & aSettings,
+		RPointerArray<EapCertificateEntry>& aAvailableCerts);
+
+	void SaveCertificatesL(
+		const EapCertificateEntry::TCertType aCertType,
+		const RPointerArray<EapCertificateEntry>* const aAvailableCerts,
+		EAPSettings & aSettings);
+};
+
+#endif // _EAPTLSPEAPUICERTIFICATES_H_
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/include/eaptlspeap_db_api_inc/EapTlsPeapUiCipherSuite.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,69 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#ifndef _EAPTLSPEAPUICIPHERSUITE_H_
+#define _EAPTLSPEAPUICIPHERSUITE_H_
+
+#include <e32std.h>
+
+class TEapTlsPeapUiCipherSuite
+{
+public:
+
+	TEapTlsPeapUiCipherSuite()
+		: iIsEnabled(EFalse)
+		, iCipherSuite(0ul)
+	{
+	}
+
+	virtual ~TEapTlsPeapUiCipherSuite()
+	{
+	}
+
+	void SetIsEnabled(const TBool aIsEnabled)
+	{
+		iIsEnabled = aIsEnabled;
+	}
+
+	void SetCipherSuite(const TUint aCipherSuite)
+	{
+		iCipherSuite = aCipherSuite;
+	}
+
+	TBool GetIsEnabled()
+	{
+		return iIsEnabled;
+	}
+
+	TUint GetCipherSuite()
+	{
+		return iCipherSuite;
+	}
+
+private:
+
+    TBool                           iIsEnabled;        
+    TUint							iCipherSuite;
+};
+
+#endif //_EAPTLSPEAPUICIPHERSUITE_H_
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/include/eaptlspeap_db_api_inc/EapTlsPeapUiCipherSuites.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,68 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#ifndef _EAPTLSPEAPUICIPHERSUITES_H_
+#define _EAPTLSPEAPUICIPHERSUITES_H_
+
+#include <e32base.h>
+
+class CEapTlsPeapUiConnection;
+class TEapTlsPeapUiCipherSuite;
+class CEapType;
+
+
+class CEapTlsPeapUiCipherSuites : public CBase
+{
+
+public:
+
+    CEapTlsPeapUiCipherSuites(CEapTlsPeapUiConnection * const aUiConn);
+
+    ~CEapTlsPeapUiCipherSuites();
+
+    TInt Open();
+
+    TInt GetCipherSuites(RPointerArray<TEapTlsPeapUiCipherSuite> ** aDataPtr);
+   	
+    TInt Update();
+
+    TInt Close();
+
+private:
+
+    TBool iIsOpened;
+
+    CEapTlsPeapUiConnection * iUiConn;
+
+	RPointerArray<TEapTlsPeapUiCipherSuite>* iDataPtr;
+
+    CEapType* iEapTypeConnection;
+
+private:
+
+    void FetchDataL();
+    
+    void UpdateL();
+};
+
+#endif //_EAPTLSPEAPUICIPHERSUITES_H_
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/include/eaptlspeap_db_api_inc/EapTlsPeapUiConnection.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,141 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#ifndef _EAPTLSPEAPUICONNECTION_H_
+#define _EAPTLSPEAPUICONNECTION_H_
+
+#include <e32std.h>
+#include <e32base.h>
+#include <d32dbms.h>
+//#include <EapType.h>
+#include <EapTypeDefinitions.h>
+#include <EapExpandedType.h>
+
+class CEapTlsPeapUiDataConnection;
+class CEapTlsPeapUiCipherSuites;
+class CEapTlsPeapUiCertificates;
+class CEapTlsPeapUiEapTypes;
+class MEapTlsPeapUiCertificates;
+class CEapFastPacStore;
+
+class CEapTlsPeapUiConnection : public CBase
+{
+
+public:
+
+	// This creates a connection between EAP plugin and the EAP UI.
+	// aTunnelingType - the Vendor-Type of Tunneling EAP type.
+	// aEapType - the Vendor-Type of the EAP type 
+	// Supported Vendor-ID here is 0x 0 (3 bytes) for both.
+
+    CEapTlsPeapUiConnection(
+        const TIndexType aIndexType,
+        const TInt aIndex,
+        const TEapExpandedType aTunnelingType,
+        const TEapExpandedType aEapType);
+
+    ~CEapTlsPeapUiConnection();
+
+    TInt Connect();
+
+    TInt Close();
+
+    CEapTlsPeapUiDataConnection * GetDataConnection();
+
+	CEapTlsPeapUiCipherSuites * GetCipherSuiteConnection();
+	
+	CEapTlsPeapUiCertificates * GetCertificateConnection(MEapTlsPeapUiCertificates * const aParent);
+	
+	CEapTlsPeapUiEapTypes * GetEapTypeConnection();
+
+    TIndexType GetIndexType();
+
+    TInt GetIndex();
+
+	// Returns the Tunneling EAP type of this EAP type.
+    TEapExpandedType GetTunnelingType();
+
+	// Returns the EAP type.
+    TEapExpandedType GetEapType();
+
+    // Check if there's the PAC store master key.
+    // Call Connect() before doing this and Close() after.	
+    // Returns ETrue if there is master key. EFalse if there is not.
+	TBool IsPacStoreMasterKeyPresentL();
+
+    // This destroys the PAC store if it is created already.
+    // Call Connect() before doing this and Close() after.
+    // Returns KErrNone if successful. Symbian error code otherwise.
+	TInt DestroyPacStore();
+	
+    // This check if the PAC store (or PAC store master key) can be decrypted 
+	// with the password provided.
+    // Call Connect() before doing this and Close() after.	
+    // Returns ETrue if successful.
+	TBool VerifyPacStorePasswordL(const TDesC& aPacStorePw);
+	
+    // This creates the PAC store master key with the password provided.
+    // Call Connect() before doing this and Close() after.	
+    // Returns KErrNone if successful. Symbian error code otherwise.
+	TInt CreatePacStoreMasterKey(const TDesC& aPacStorePw);
+	
+    void GetPacStorePasswordL(
+		TDes8 & aPassword8);
+
+    void SetPacStorePasswordL(
+		const TDesC8 & aPassword8);
+
+protected:
+
+    // Bearer type
+	TIndexType iIndexType;
+	
+	// Unique index
+	TInt iIndex;
+
+	// This stores the Vendor-Type of Tunneling EAP type. Supported Vendor-ID here is 0x 0 (3 bytes).
+	TEapExpandedType iTunnelingType;
+
+	// This stores the Vendor-Type of the EAP type. Supported Vendor-ID here is 0x 0 (3 bytes).
+	TEapExpandedType iEapType;
+	
+    // database names, handlers etc...
+
+    CEapTlsPeapUiDataConnection * iDataConn;
+
+	CEapTlsPeapUiCipherSuites * iCipherSuites;
+		
+	CEapTlsPeapUiEapTypes * iEapTypes;
+	
+	CEapTlsPeapUiCertificates * iCertificates;	
+	
+private:
+	
+    void ConnectL();
+    
+private:
+	
+	CEapFastPacStore * iPacStoreDb;
+};
+
+#endif
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/include/eaptlspeap_db_api_inc/EapTlsPeapUiDataConnection.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,74 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#ifndef _EAPTLSPEAPUIDATACONNECTION_H_
+#define _EAPTLSPEAPUIDATACONNECTION_H_
+
+#include <e32base.h>
+
+class CEapTlsPeapUiConnection;
+class CEapTlsPeapUiTlsPeapData;
+class CEapType;
+
+
+class CEapTlsPeapUiDataConnection : public CBase
+{
+
+public:
+
+    CEapTlsPeapUiDataConnection(CEapTlsPeapUiConnection * aUiConn);
+
+    ~CEapTlsPeapUiDataConnection();
+
+    TInt Open();
+
+    TInt GetData(CEapTlsPeapUiTlsPeapData ** aDataPtr);
+
+   	TInt Update();
+
+    TInt Close();
+
+protected:
+
+    TBool iIsOpened;
+
+    CEapTlsPeapUiConnection * iUiConn;
+
+    CEapTlsPeapUiTlsPeapData * iDataPtr;
+
+private:
+	// Functions.
+	
+    //void FetchDataL();
+    //void UpdateDataL();
+    
+private:	
+	// Member variables.
+
+   // Only used with EAP-FAST. Can't use the flag here.
+    CDbColSet *  iFastSpecificColSet;
+
+    CEapType * iEapTypeConnection; 
+};
+
+#endif // _EAPTLSPEAPUIDATACONNECTION_H_
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/include/eaptlspeap_db_api_inc/EapTlsPeapUiEapType.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,69 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#ifndef _EAPTLSPEAPUIEAPTYPE_H_
+#define _EAPTLSPEAPUIEAPTYPE_H_
+
+#include <e32std.h>
+#include "EapExpandedType.h"
+
+class TEapTlsPeapUiEapType
+: public CBase
+{
+public:
+
+	TEapTlsPeapUiEapType()
+	{
+	}
+
+	virtual ~TEapTlsPeapUiEapType()
+	{
+	}
+
+	void SetIsEnabled(TBool aIsEnabled)
+	{
+		iIsEnabled = aIsEnabled;
+	}
+
+	void SetEapType(TEapExpandedType & aEapType)
+	{
+		iEapType = aEapType;
+	}
+
+	TBool GetIsEnabled()
+	{
+		return iIsEnabled;
+	}
+
+	TEapExpandedType & GetEapType()
+	{
+		return iEapType;
+	}
+
+private:
+
+    TBool            iIsEnabled;
+    TEapExpandedType iEapType;
+};
+
+#endif // _EAPTLSPEAPUIEAPTYPE_H_
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/include/eaptlspeap_db_api_inc/EapTlsPeapUiEapTypes.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,70 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#ifndef _EAPTLSPEAPUIEAPTYPES_H_
+#define _EAPTLSPEAPUIEAPTYPES_H_
+
+#include <e32base.h>
+
+class CEapTlsPeapUiConnection;
+class TEapTlsPeapUiEapType;
+class CEapType;
+
+
+class CEapTlsPeapUiEapTypes : public CBase
+{
+
+public:
+
+    CEapTlsPeapUiEapTypes(CEapTlsPeapUiConnection * const aUiConn);
+
+    ~CEapTlsPeapUiEapTypes();
+
+    TInt Open();
+
+    TInt GetEapTypes(RPointerArray<TEapTlsPeapUiEapType> ** aDataPtr);
+   	
+    TInt Update();
+
+    TInt Close();
+
+private:
+
+    TBool iIsOpened;
+
+    CEapTlsPeapUiConnection * iUiConn;
+
+    RPointerArray<TEapTlsPeapUiEapType>* iDataPtr;    
+    
+    CEapType * iEapTypeConnection;
+
+private:
+
+
+    void FetchExpandedDataL();
+    
+    void UpdateExpandedDataL();
+    
+};
+
+#endif // _EAPTLSPEAPUIEAPTYPES_H_
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/include/eaptlspeap_db_api_inc/EapTlsPeapUiTlsPeapData.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,113 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#ifndef _EAPTLSPEAPUITLSPEAPDATA_H_
+#define _EAPTLSPEAPUITLSPEAPDATA_H_
+
+#include <e32std.h>
+#include <e32base.h>
+
+const TInt KMaxLengthOfUsername=255;
+const TInt KMaxLengthOfPassword=255;
+
+const TInt KMaxLengthOfPapUserName = 253; // according to UI spec
+const TInt KMaxLengthOfPapPassword = 128; // according to UI spec
+
+class CEapTlsPeapUiTlsPeapData : public CBase
+{
+public:
+
+    CEapTlsPeapUiTlsPeapData();
+
+    ~CEapTlsPeapUiTlsPeapData();
+
+    TDes& GetManualUsername();
+
+    TBool * GetUseManualUsername();
+
+    TDes& GetManualRealm();
+
+    TBool * GetUseManualRealm();
+    
+    TBool * GetAllowVersion0();
+    
+    TBool * GetAllowVersion1();
+    
+    TBool * GetAllowVersion2();
+    
+    // New member functions for EAP-FAST 
+    
+    TBool * GetTlsPrivacy();
+    
+    TBool * GetAuthProvModeAllowed();
+
+    TBool * GetUnauthProvModeAllowed();
+    
+    TDes& GetPacStorePassword();
+    
+    TBool* GetUsePacStorePasswordPrompt();
+
+public: // new, for TTLS PAP
+    
+    TDes& GetPapUserName();
+
+    TDes& GetPapPassword();
+
+    TBool* GetPapPasswordPrompt();
+
+private:
+
+    TBuf<KMaxLengthOfUsername> iManualUsername;
+
+    TBool iUseManualUsername;
+
+    TBuf<KMaxLengthOfUsername> iManualRealm;
+
+    TBool iUseManualRealm;
+    
+    TBool iAllowVersion0;
+    
+    TBool iAllowVersion1;
+    
+    TBool iAllowVersion2;
+    
+    // New member variables for EAP-FAST
+    TBool iTlsPrivacy;
+    
+    TBool iAuthProvModeAllowed;
+
+    TBool iUnauthProvModeAllowed;
+    
+    TBuf<KMaxLengthOfPassword> iPacStorePassword;
+    
+    TBuf<KMaxLengthOfPapUserName> iPapUserName;
+
+    TBuf<KMaxLengthOfPapPassword> iPapPassword;
+
+    TBool iPapPasswordPrompt;
+
+    TBool iPasswordPrompt;
+    
+};
+
+#endif
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/include/eaptlspeap_db_api_inc/EapTtlsPapNotifierStruct.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,110 @@
+/*
+* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#ifndef EAPTTLSPAPNOTIFIERSTRUCT_H
+#define EAPTTLSPAPNOTIFIERSTRUCT_H
+
+/**
+* UID of PAP notifier to display authentication query dialog.
+*/ 
+const TUid KPapNotifierUid = { 0x200159A9 };
+
+/**
+* Maximum PAP challenge length.
+*/ 
+const TUint KMaxPapChallengeLength = 4096;
+
+/**
+* Maximum PAP user name.
+*/ 
+const TUint KMaxPapUserNameLength = 253;
+
+/**
+* Maximum PAP password length.
+*/ 
+const TUint KMaxPapPasswordLength = 128;
+
+/**
+* Data structure defines user name, password and password prompt.
+*/ 
+struct TPapUserNamePasswordInfo
+    {
+    /**
+    * True if password prompt is enabled, False - otherwise.
+    */ 
+ 	TBool iPasswordPromptEnabled;
+ 	
+    /*
+ 	* Buffer for user name.
+ 	*/
+ 	TBuf16<KMaxPapUserNameLength> iUserName;
+ 	
+ 	/**
+ 	* Buffer for password.
+ 	*/ 
+ 	TBuf16<KMaxPapPasswordLength> iPassword;   
+    };
+
+/**
+* Data structure used in notifier communication.
+*/ 
+struct TPapUiNotifierInfo
+    {
+    enum TPapUiNotifierState
+        {
+        EPapUiNotifierAuthQueryDialog,               /* 0 */
+        EPapUiNotifierPapChallengeSize,              /* 1 */
+        EPapUiNotifierPapChallengeMsgDialog,         /* 2 */
+        EPapUiNotifierPapChallengeReplyQueryDialog,  /* 3 */
+        // ...
+        EPapUiNotifierStatesNumber                   /* 4 */ // keep always as last element
+        };
+
+    /**
+    * State defines UI notifier logic.
+    */ 
+    TPapUiNotifierState iState;
+
+    /**
+    * Data structure defines user name, password and password prompt.
+    */  
+    TPapUserNamePasswordInfo iUsrPwdInfo;
+    	
+	/**
+	* PAP challenge message.
+	*/
+	TUint iSrvChallengeSize;
+	TBuf16<KMaxPapChallengeLength> iPapChallenge;
+    };
+
+/**
+* Defines user action: accepting or cancelling
+* authentication query dialog.
+*/ 
+enum EPapNotifierUserAction
+    {
+    EPapNotifierUserActionOk,
+    EPapNotifierUserActionCancel
+    };
+    
+#endif // EAPTTLSPAPNOTIFIERSTRUCT_H
+
+// End of File
--- a/eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/EapAkaInterface.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/EapAkaInterface.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 17 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/eap_am_type_aka_symbian.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/eap_am_type_aka_symbian.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 49 %
+* %version: 46.1.6 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -36,7 +36,7 @@
 #include "EapAkaDbDefaults.h"
 #include "EapAkaDbParameterNames.h"
 #include "EapAkaDbUtils.h"
-#include "eap_am_trace_symbian.h"
+#include "EapTraceSymbian.h"
 
 #include <d32dbms.h>	// For DBMS
 #include <s32strm.h> 	// For RReadStream
@@ -154,16 +154,6 @@
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	m_tunneling_vendor_type = m_tunneling_type.get_vendor_type();
-
-#else
-
-	m_tunneling_vendor_type = static_cast<TUint>(m_tunneling_type);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
 	if (receive_network_id != 0
 		&& receive_network_id->get_is_valid_data() == true)
 	{
@@ -582,9 +572,19 @@
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
-	_LIT(KSQLInsert, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLInsert, &KPseudonymId, &KAkaTableName, 
-		&KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+	_LIT(KSQLInsert, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	sqlStatement.Format(
+		KSQLInsert,
+		&KPseudonymId,
+		&KAkaTableName, 
+		&KServiceType,
+		m_index_type,
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType, 
+		m_tunneling_type.get_vendor_type());
 
 	// Evaluate view
 	RDbView view;
@@ -684,9 +684,19 @@
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
-	_LIT(KSQLInsert, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLInsert, &KReauthId, &KAkaTableName, 
-		&KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+	_LIT(KSQLInsert, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	sqlStatement.Format(
+		KSQLInsert,
+		&KReauthId,
+		&KAkaTableName, 
+		&KServiceType,
+		m_index_type,
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType, 
+		m_tunneling_type.get_vendor_type());
 		
 	// Evaluate view
 	RDbView view;
@@ -812,9 +822,22 @@
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
-	_LIT(KSQLInsert, "SELECT %S, %S, %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLInsert, &KXKey, &KK_aut, &KK_encr, &KReauthCounter, &KAkaTableName, 
-		&KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+	_LIT(KSQLInsert, "SELECT %S, %S, %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	sqlStatement.Format(
+		KSQLInsert,
+		&KXKey,
+		&KK_aut,
+		&KK_encr,
+		&KReauthCounter,
+		&KAkaTableName, 
+		&KServiceType,
+		m_index_type,
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType, 
+		m_tunneling_type.get_vendor_type());
 		
 	// Evaluate view
 	RDbView view;
@@ -953,9 +976,22 @@
 	TPtr sqlStatement = buf->Des();
 
 	// Form the query
-	_LIT(KSQLQuery, "SELECT %S, %S, %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLQuery, &KXKey, &KK_aut, &KK_encr, &KReauthCounter, &KAkaTableName, 
-		&KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+	_LIT(KSQLQuery, "SELECT %S, %S, %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	sqlStatement.Format(
+		KSQLQuery,
+		&KXKey,
+		&KK_aut,
+		&KK_encr,
+		&KReauthCounter,
+		&KAkaTableName, 
+		&KServiceType,
+		m_index_type,
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType, 
+		m_tunneling_type.get_vendor_type());
 		
 	RDbView view;
 	// Evaluate view
@@ -1064,9 +1100,19 @@
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
-	_LIT(KSQLInsert, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLInsert, &KReauthCounter, &KAkaTableName, 
-		&KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+	_LIT(KSQLInsert, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	sqlStatement.Format(
+		KSQLInsert,
+		&KReauthCounter,
+		&KAkaTableName, 
+		&KServiceType,
+		m_index_type,
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType, 
+		m_tunneling_type.get_vendor_type());
 		
 	// Evaluate view
 	RDbView view;
@@ -1179,11 +1225,22 @@
 	m_stored_reauth_id.reset();
 	m_previous_imsi.reset();
 
-	_LIT(KSQLQuery, "SELECT %S, %S, %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLQuery, &KReauthId, &KReauthCounter, &KPseudonymId,
-						&KPreviousIMSI, &KAkaTableName,
-						&KServiceType, m_index_type, 
-						&KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+	_LIT(KSQLQuery, "SELECT %S, %S, %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	sqlStatement.Format(
+		KSQLQuery,
+		&KReauthId,
+		&KReauthCounter,
+		&KPseudonymId,
+		&KPreviousIMSI,
+		&KAkaTableName,
+		&KServiceType,
+		m_index_type, 
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType, 
+		m_tunneling_type.get_vendor_type());
 
 	RDbView view;
 	// Evaluate view
@@ -1544,9 +1601,19 @@
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
-	_LIT(KSQLInsert, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLInsert, &KPreviousIMSI, &KAkaTableName, 
-		&KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+	_LIT(KSQLInsert, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	sqlStatement.Format(
+		KSQLInsert,
+		&KPreviousIMSI,
+		&KAkaTableName, 
+		&KServiceType,
+		m_index_type,
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType, 
+		m_tunneling_type.get_vendor_type());
 		
 	// Evaluate view
 	RDbView view;
@@ -2818,9 +2885,19 @@
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
-	_LIT(KSQLQueryRow, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLQueryRow, &unicodeString, &KAkaTableName, 
-		&KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+	_LIT(KSQLQueryRow, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	sqlStatement.Format(
+		KSQLQueryRow,
+		&unicodeString,
+		&KAkaTableName, 
+		&KServiceType,
+		m_index_type,
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType, 
+		m_tunneling_type.get_vendor_type());
 	
 	RDbView view;
 	User::LeaveIfError(view.Prepare(m_database, TDbQuery(sqlStatement), TDbWindow::EUnlimited));
@@ -3016,11 +3093,20 @@
 	TPtr sqlStatement = buf->Des();
 	
 	// Query all the relevant parameters
-	_LIT(KSQLQuery, "SELECT %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLQuery, &cf_str_EAP_AKA_max_session_validity_time_literal,
-						&KAKALastFullAuthTime, &KAkaTableName,
-						&KServiceType, m_index_type, 
-						&KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+	_LIT(KSQLQuery, "SELECT %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	sqlStatement.Format(
+		KSQLQuery,
+		&cf_str_EAP_AKA_max_session_validity_time_literal,
+		&KAKALastFullAuthTime,
+		&KAkaTableName,
+		&KServiceType,
+		m_index_type, 
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType, 
+		m_tunneling_type.get_vendor_type());
 
 	RDbView view;
 	// Evaluate view
@@ -3138,10 +3224,19 @@
 	TPtr sqlStatement = buf->Des();
 	
 	// Query all the relevant parameters
-	_LIT(KSQLQuery, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLQuery, &KAKALastFullAuthTime, &KAkaTableName,
-						&KServiceType, m_index_type, 
-						&KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+	_LIT(KSQLQuery, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	sqlStatement.Format(
+		KSQLQuery,
+		&KAKALastFullAuthTime,
+		&KAkaTableName,
+		&KServiceType,
+		m_index_type, 
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType, 
+		m_tunneling_type.get_vendor_type());
 
 	RDbView view;
 	// Evaluate view
--- a/eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/inc/EapAka.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/inc/EapAka.h	Mon May 24 20:32:47 2010 +0300
@@ -16,14 +16,14 @@
 */
 
 /*
-* %version: 9.1.2 %
+* %version: 16 %
 */
 
 #ifndef _EAPAKA_H_
 #define _EAPAKA_H_
 
 // INCLUDES
-#include <EapType.h>
+#include <EapTypePlugin.h>
 #include "eap_header.h"
 
 // FORWARD DECLARATIONS
@@ -33,7 +33,7 @@
 /**
 * Class that implements the generic EAP type interface. Implements EAP AKA protocol.
 */
-class CEapAka : public CEapType
+class CEapAka : public CEapTypePlugin
 {
 public:		
 
@@ -87,16 +87,13 @@
 	
 #endif // #ifdef USE_EAP_SIMPLE_CONFIG
 	
-	/**
-	* Invokes the configuration UI.
-	**/
-	TInt InvokeUiL();
+
 	
 	/**
 	* Gets information about EAP type. 
 	* @return Pointer to a class that contains the EAP type information. Also pushed to cleanup stack.
 	*/
-	CEapTypeInfo* GetInfoLC();
+	CEapTypeInfo* GetInfoL();
 
 	/**
 	* Deletes EAP type configuration
@@ -118,7 +115,7 @@
 	* EAP type. 
 	* @param aTunnelingType Type number for the tunneling type
 	*/	
-	void SetTunnelingType(const TInt aTunnelingType);
+	void SetTunnelingType(const TEapExpandedType aTunnelingType);
 
 	/**
 	* Changes the index of the saved parameters.
--- a/eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/inc/EapAkaDbDefaults.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/inc/EapAkaDbDefaults.h	Mon May 24 20:32:47 2010 +0300
@@ -16,49 +16,24 @@
 */
 
 /*
-* %version: 17 %
+* %version: %
 */
 
 #if !defined(_EAPAKADBDEFAULTS_H_)
 #define _EAPAKADBDEFAULTS_H_
 
-enum TAKAUsePseudonymId 
-{
-	EAKAUsePseudonymIdNo,		// False. Don't use pseudonym id.
-	EAKAUsePseudonymIdYes,		// True. Use pseudonym id.
-	EAKAUsePseudonymIdNotValid 	// This indicates that the value is not configured.
-};
-
-enum TAKAUseManualRealm 
-{
-	EAKAUseManualRealmNo,		// False. Don't use Manual Realm.
-	EAKAUseManualRealmYes,		// True. Use Manual Realm.
-};
-
-enum TAKAUseManualUsername 
-{
-	EAKAUseManualUsernameNo,		// False. Don't use Manual Username.
-	EAKAUseManualUsernameYes,		// True. Use Manual Username.
-};
+#include "EapPluginDbDefaults.h"
 
 // LOCAL CONSTANTS
-const TUint default_EAP_AKA_use_manual_realm = EAKAUseManualRealmNo;
-_LIT(default_EAP_AKA_manual_realm, "");
+const TUint default_EAP_AKA_use_manual_realm = EEapDbFalse;
 
-const TUint default_EAP_AKA_use_manual_username = EAKAUseManualUsernameNo;
-_LIT(default_EAP_AKA_manual_username, "");
+const TUint default_EAP_AKA_use_manual_username = EEapDbFalse;
 
-const TUint default_EAP_AKA_use_pseudonym_identity = EAKAUsePseudonymIdYes; // Default is use pseudonym identity.
-
-const TInt64 default_MaxSessionTime = 0; // 0 means read from configuration file.
-const TInt64 default_FullAuthTime = 0;
+const TUint default_EAP_AKA_use_pseudonym_identity = EEapDbTrue; // Default is use pseudonym identity.
 
 const TUint KMaxPseudonymIdLengthInDB = 1020; 	// This is the max possible length of an EAP packet.
 const TUint KMaxReauthIdLengthInDB = 1020; 		// pseudonym id or reauth id can't be more than that.
 
-const TUint KMaxManualUsernameLengthInDB = 255;
-const TUint KMaxManualRealmLengthInDB = 255;
-
 const TUint KMaxIMSILengthInDB = 15;
 
 const TUint KMaxXKeyLengthInDB = 20;
--- a/eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/inc/EapAkaDbParameterNames.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/inc/EapAkaDbParameterNames.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 13.1.2 %
+* %version: %
 */
 
 #if !defined(_EAPAKADBPARAMETERNAMES_H_)
@@ -28,6 +28,7 @@
 
 _LIT(KServiceType, "ServiceType");
 _LIT(KServiceIndex, "ServiceIndex");
+_LIT(KTunnelingTypeVendorId, "TunnelingTypeVendorId");
 _LIT(KTunnelingType, "TunnelingType");
 _LIT(KPseudonymId, "PseudonymId");
 _LIT(KXKey, "XKEY");
--- a/eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/inc/EapAkaDbUtils.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/inc/EapAkaDbUtils.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: 7.1.5 %
 */
 
 #ifndef _EAPAKADBUTILS_H_
@@ -29,32 +29,22 @@
 
 // LOCAL CONSTANTS
 
-#ifdef SYMBIAN_SECURE_DBMS
-// For EAP AKA secure database.
-// Full path is not needed. The database eapaka.dat will be saved in the 
-// data cage path for DBMS. So it will be in "\private\100012a5\eapaka.dat" in C: drive.
-// The maximum length of database name is 0x40 (KDbMaxName) , which is defined in d32dbms.h.
-
-_LIT(KDatabaseName, "c:eapaka.dat");
+// For EAP-AKA private database. Database will be in the private folder of EAP-server (20026FCB).
+// The maximum length of database name is 0x40 (KDbMaxName), which is defined in d32dbms.h.
 
-_LIT(KSecureUIDFormat, "SECURE[102072e9]"); // For the security policy.
-
-#else
-
-_LIT(KDatabaseName, "c:\\system\\data\\eapaka.dat");
-
-#endif // #ifdef SYMBIAN_SECURE_DBMS
+_LIT(KEapAkaDatabaseName, "eapaka.dat");
 
 _LIT(KAkaTableName, "eapaka");
 
 // CLASS DECLARATION
 class EapAkaDbUtils 
 {
+
 public:
 	
 	static void OpenDatabaseL(
 		RDbNamedDatabase& aDatabase, 
-		RDbs& aSession, 
+		RFs& aFileServerSession,
 		const TIndexType aIndexType,
 		const TInt aIndex,
 		const eap_type_value_e aTunnelingType);
@@ -98,7 +88,6 @@
 		const TIndexType aIndexType,
 		const TInt aIndex,
 		const eap_type_value_e aTunnelingType);
-
 };
 
 #endif // _EAPAKADBUTILS_H_
--- a/eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/inc/EapAkaGlobal.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/inc/EapAkaGlobal.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7 %
+* %version: %
 */
 
 #ifndef _EAPAKAGLOBAL_H_
@@ -26,9 +26,9 @@
 
 // Release date must be of format YYYYMMDD:. Will be localised automatically. 
 // Note that days and months start from 0.
-_LIT(KReleaseDate, "20040829:"); 
+_LIT(KReleaseDate, ""); 
 _LIT(KEapTypeVersion, "1.0");
-_LIT(KManufacturer, "Nokia");
+_LIT(KManufacturer, "");
 _LIT(KNokiaSignature, ""); // Not used
 _LIT(KExtraInfo1, ""); // Not used
 _LIT(KExtraInfo2, ""); // Not used
--- a/eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/src/102073c1.rss	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/src/102073c1.rss	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: 6.1.2 %
 */
 
 //  INCLUDES
--- a/eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/src/EapAka.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/src/EapAka.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 15.1.3 %
+* %version: 23 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -37,11 +37,11 @@
 #include <EapTypeInfo.h>
 #include "eap_am_type_aka_symbian.h"
 #include "EapAkaDbUtils.h"
-
-
-
+#include "EapConversion.h"
 
 #include "eap_am_tools_symbian.h"
+#include "EapTraceSymbian.h"
+
 
 // LOCAL CONSTANTS
 
@@ -137,26 +137,19 @@
 }
 
 // ----------------------------------------------------------
-TInt CEapAka::InvokeUiL()
-{
-	TInt buttonId(0);
- 
-	return buttonId;
-}
 
-// ----------------------------------------------------------
-CEapTypeInfo* CEapAka::GetInfoLC()
+CEapTypeInfo* CEapAka::GetInfoL()
 {
 	CEapTypeInfo* info = new(ELeave) CEapTypeInfo(
 		(TDesC&)KReleaseDate, 
 		(TDesC&)KEapTypeVersion,
 		(TDesC&)KManufacturer);
 
-	CleanupStack::PushL(info);
 	return info;
 }
 
 // ----------------------------------------------------------
+
 void CEapAka::DeleteConfigurationL()
 {		
 	EapAkaDbUtils::DeleteConfigurationL(iIndexType, iIndex, iTunnelingType);
@@ -171,19 +164,22 @@
 
 // ----------------------------------------------------------
 
-void CEapAka::SetTunnelingType(const TInt aTunnelingType)
-{
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	// Vendor id is eap_type_vendor_id_ietf always in this plugin.
-	iTunnelingType.set_eap_type_values(eap_type_vendor_id_ietf, aTunnelingType);
-
-#else
-
-	iTunnelingType = static_cast<eap_type_value_e>(aTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-}
+void CEapAka::SetTunnelingType(const TEapExpandedType aTunnelingType)
+    {
+    EAP_TRACE_DATA_DEBUG_SYMBIAN(
+         (EAPL("CEapAka::SetTunnelingType - tunneling type"),
+         aTunnelingType.GetValue().Ptr(), aTunnelingType.GetValue().Length()));
+   
+    eap_type_value_e aInternalType;
+    
+    TInt err = CEapConversion::ConvertExpandedEAPTypeToInternalType(
+            &aTunnelingType,
+            &aInternalType);
+    
+    iTunnelingType = aInternalType;
+    
+    
+    }
 
 
 // ----------------------------------------------------------
@@ -208,7 +204,7 @@
 
 	RDbNamedDatabase db;
 
-	RDbs session;
+	RFs session;
 	
 	EapAkaDbUtils::OpenDatabaseL(db, session, iIndexType, iIndex, iTunnelingType);
 	
@@ -227,7 +223,8 @@
 	iIndexType = aIndexType;
 	iIndex = aIndex;
 
-	CleanupStack::PopAndDestroy(2); // db	
+	CleanupStack::PopAndDestroy(&db);
+	CleanupStack::PopAndDestroy(&session);
 }
 
 // ----------------------------------------------------------
@@ -236,8 +233,8 @@
 {
 	RDbNamedDatabase db;
 
-	RDbs session;	
-	
+	RFs session;
+
 	// This also creates the IAP entry if it doesn't exist
 	EapAkaDbUtils::OpenDatabaseL(db, session, iIndexType, iIndex, iTunnelingType);
 	
@@ -250,8 +247,9 @@
 		iIndexType,
 		iIndex,
 		iTunnelingType);		
-		
-	CleanupStack::PopAndDestroy(2); // db, session
+
+	CleanupStack::PopAndDestroy(&db);
+	CleanupStack::PopAndDestroy(&session);
 }
 
 // ----------------------------------------------------------
@@ -260,8 +258,8 @@
 {
 	RDbNamedDatabase db;
 
-	RDbs session;
-	
+	RFs session;
+
 	// This also creates the IAP entry if it doesn't exist
 	EapAkaDbUtils::OpenDatabaseL(db, session, iIndexType, iIndex, iTunnelingType);
 	
@@ -274,8 +272,9 @@
 		iIndexType,
 		iIndex,
 		iTunnelingType);
-		
-	CleanupStack::PopAndDestroy(2); // db, session
+
+	CleanupStack::PopAndDestroy(&db);
+	CleanupStack::PopAndDestroy(&session);
 }
 
 // ----------------------------------------------------------
@@ -301,8 +300,8 @@
 
 	RDbNamedDatabase db;
 
-	RDbs session;
-	
+	RFs session;
+
 	EapAkaDbUtils::OpenDatabaseL(db, session, iIndexType, iIndex, iTunnelingType);
 	
 	CleanupClosePushL(session);
@@ -316,8 +315,9 @@
 		aDestinationIndexType, 
 		aDestinationIndex, 
 		iTunnelingType);
-		
-	CleanupStack::PopAndDestroy(2); // db
-	
+
+	CleanupStack::PopAndDestroy(&db);
+	CleanupStack::PopAndDestroy(&session);
 }
+
 // End of file
--- a/eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/src/EapAkaDbUtils.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/src/EapAkaDbUtils.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 29.1.2 %
+* %version: 47 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -34,160 +34,146 @@
 #include "EapAkaDbParameterNames.h"
 #include "eap_type_aka_types.h"
 
-#include "eap_am_trace_symbian.h"
+#include <EapTraceSymbian.h>
+#include <EapPluginTools.h>
 
 const TInt KMaxSqlQueryLength = 2048;
 const TInt KMicroSecsInAMinute = 60000000; // 60000000 micro seconds is 1 minute.
 
 // ================= MEMBER FUNCTIONS =======================
 
-void EapAkaDbUtils::OpenDatabaseL(RDbNamedDatabase& aDatabase, RDbs& aSession, const TIndexType aIndexType,
-	const TInt aIndex, const eap_type_value_e aTunnelingType)
-{
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
+// ----------------------------------------------------------
 
-#else
-
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapAkaDbUtils::OpenDatabaseL -Start- aIndexType=%d, aIndex=%d, aTunnelingVendorType=%d \n"),
-	aIndexType,aIndex,aTunnelingVendorType) );
+void EapAkaDbUtils::OpenDatabaseL(
+	RDbNamedDatabase& aDatabase,
+	RFs& aFileServerSession,
+	const TIndexType aIndexType,
+	const TInt aIndex,
+	const eap_type_value_e aTunnelingType)
+{
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapAkaDbUtils::OpenDatabaseL(): -Start- aIndexType=%d, aIndex=%d, aTunnelingVendorType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type()) );
 
 	// 1. Open/create a database	
 	
-	// Connect to the DBMS server.
-	User::LeaveIfError(aSession.Connect());		
-	CleanupClosePushL(aSession);	
-	// aSession and aDatabase are pushed to the cleanup stack even though they may be member
-	// variables of the calling class and would be closed in the destructor anyway. This ensures
-	// that if they are not member variables they will be closed. Closing the handle twice
-	// does no harm.	
-	
-#ifdef SYMBIAN_SECURE_DBMS
-	
-	// Create the secure shared database with the specified secure policy.
-	// Database will be created in the data caging path for DBMS (C:\private\100012a5).
-	
-	TInt err = aDatabase.Create(aSession, KDatabaseName, KSecureUIDFormat);
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapAkaDbUtils::OpenDatabaseL - Created Secure DB for eapaka.dat. err=%d\n"), err));
-	
-	
-	if(err == KErrNone)
+	TInt error(KErrNone);
+	TFileName aPrivateDatabasePathName;
+
+	EapPluginTools::CreateDatabaseLC(
+		aDatabase,
+		aFileServerSession,
+		error,
+		KEapAkaDatabaseName,
+		aPrivateDatabasePathName);
+
+	if(error == KErrNone)
 	{
 		aDatabase.Close();
-		
-	} else if (err != KErrAlreadyExists) 
+	}
+	else if (error != KErrAlreadyExists) 
 	{
-		User::LeaveIfError(err);
+		User::LeaveIfError(error);
 	}
 	
-	User::LeaveIfError(aDatabase.Open(aSession, KDatabaseName, KSecureUIDFormat));
-	CleanupClosePushL(aDatabase);		
-		
-#else
-	// For non-secured database. The database will be created in the old location (c:\system\data).
-	
-	RFs fsSession;		
-	User::LeaveIfError(fsSession.Connect());
-	CleanupClosePushL(fsSession);	
-	TInt err = aDatabase.Create(fsSession, KDatabaseName);
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapAkaDbUtils::OpenDatabaseL - Created Non-Secure DB for eapaka.dat. err=%d\n"), err));
-	
-	
-	if(err == KErrNone)
-	{
-		aDatabase.Close();
-		
-	} else if (err != KErrAlreadyExists) 
-	{
-		User::LeaveIfError(err);
-	}
-	CleanupStack::PopAndDestroy( &fsSession ); // close fsSession
-	
-	User::LeaveIfError(aDatabase.Open(aSession, KDatabaseName));
-	CleanupClosePushL(aDatabase);		
-	    
-#endif // #ifdef SYMBIAN_SECURE_DBMS
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapAkaDbUtils::OpenDatabaseL(): - calls aDatabase.Open()\n")));
+
+	error = aDatabase.Open(aFileServerSession, aPrivateDatabasePathName);
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapAkaDbUtils::OpenDatabaseL(): - Opened private DB for EAP-AKA. error=%d\n"), error));
+
+	User::LeaveIfError(error);
 
 	// 2. Create the eapaka table to database (ignore error if exists)
 	
-// Table columns:
-//// NAME ///////////////////////////////////////////////// TYPE ////////////// Constant /////////
-//| ServiceType									| UNSIGNED INTEGER 	| KServiceType      |//
-//| ServiceIndex								| UNSIGNED INTEGER 	| KServiceIndex     |//
-//| TunnelingType								| UNSIGNED INTEGER 	| KTunnelingType    |//
-//| EAP_AKA_use_manual_realm					| UNSIGNED INTEGER 	| cf_str_EAP_AKA_use_manual_realm_literal   |//
-//| EAP_AKA_manual_realm						| VARCHAR(255)	   	| cf_str_EAP_AKA_manual_realm_literal		    |//
-//| EAP_AKA_use_manual_username					| UNSIGNED INTEGER 	| cf_str_EAP_AKA_use_manual_username_literal|//
-//| EAP_AKA_manual_username						| VARCHAR(255)	   	| cf_str_EAP_AKA_manual_username_literal|//
-//| PseudonymId									| LONG VARBINARY   	| KPseudonymId      |//
-//| XKEY										| BINARY(20)       	| KXKey             |//
-//| K_aut										| BINARY(16)       	| KK_aut            |//
-//| K_encr										| BINARY(16)       	| KK_encr           |//
-//| ReauthCounter								| UNSIGNED INTEGER 	| KReauthCounter    |//
-//| ReauthId									| LONG VARBINARY   	| KReauthId         |//
-//| PreviousIMSI								| VARBINARY(15)   	| KPreviousIMSI	   	|//
-//| EAP_AKA_use_pseudonym_identity				| UNSIGNED INTEGER 	| cf_str_EAP_AKA_use_pseudonym_identity_literal	   	|//
-//| EAP_AKA_max_session_validity_time			| BIGINT		   	| cf_str_EAP_AKA_max_session_validity_time_literal   |//
-//| EAP_AKA_last_full_authentication_time		| BIGINT		   	| KAKALastFullAuthTime	|//
-//////////////////////////////////////////////////////////////////////////////////////////////////
+	// Table columns:
+	//// NAME ///////////////////////////////////////////////// TYPE ////////////// Constant /////////
+	//| ServiceType									| UNSIGNED INTEGER 	| KServiceType      |//
+	//| ServiceIndex								| UNSIGNED INTEGER 	| KServiceIndex     |//
+	//| TunnelingTypeVendorId                       | UNSIGNED INTEGER  | KTunnelingTypeVendorId    |//
+	//| TunnelingType								| UNSIGNED INTEGER 	| KTunnelingType    |//
+	//| EAP_AKA_use_manual_realm					| UNSIGNED INTEGER 	| cf_str_EAP_AKA_use_manual_realm_literal   |//
+	//| EAP_AKA_manual_realm						| VARCHAR(255)	   	| cf_str_EAP_AKA_manual_realm_literal		    |//
+	//| EAP_AKA_use_manual_username					| UNSIGNED INTEGER 	| cf_str_EAP_AKA_use_manual_username_literal|//
+	//| EAP_AKA_manual_username						| VARCHAR(255)	   	| cf_str_EAP_AKA_manual_username_literal|//
+	//| PseudonymId									| LONG VARBINARY   	| KPseudonymId      |//
+	//| XKEY										| BINARY(20)       	| KXKey             |//
+	//| K_aut										| BINARY(16)       	| KK_aut            |//
+	//| K_encr										| BINARY(16)       	| KK_encr           |//
+	//| ReauthCounter								| UNSIGNED INTEGER 	| KReauthCounter    |//
+	//| ReauthId									| LONG VARBINARY   	| KReauthId         |//
+	//| PreviousIMSI								| VARBINARY(15)   	| KPreviousIMSI	   	|//
+	//| EAP_AKA_use_pseudonym_identity				| UNSIGNED INTEGER 	| cf_str_EAP_AKA_use_pseudonym_identity_literal	   	|//
+	//| EAP_AKA_max_session_validity_time			| BIGINT		   	| cf_str_EAP_AKA_max_session_validity_time_literal   |//
+	//| EAP_AKA_last_full_authentication_time		| BIGINT		   	| KAKALastFullAuthTime	|//
+	//////////////////////////////////////////////////////////////////////////////////////////////////
 
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 	
-	_LIT(KSQLCreateTable, "CREATE TABLE %S (%S UNSIGNED INTEGER, \
-												 %S UNSIGNED INTEGER, \
-												 %S UNSIGNED INTEGER, \
-												 %S UNSIGNED INTEGER, \
-												 %S VARCHAR(%d), \
-												 %S UNSIGNED INTEGER, \
-												 %S VARCHAR(%d), \
-												 %S LONG VARBINARY, \
-												 %S BINARY(%d), \
-												 %S BINARY(%d), \
-												 %S BINARY(%d), \
-												 %S UNSIGNED INTEGER, \
-												 %S LONG VARBINARY, \
-												 %S VARBINARY(%d), \
-												 %S UNSIGNED INTEGER, \
-												 %S BIGINT, \
-												 %S BIGINT)");
+	_LIT(KSQLCreateTable, "CREATE TABLE %S \
+		(%S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S VARCHAR(%d), \
+		 %S UNSIGNED INTEGER, \
+		 %S VARCHAR(%d), \
+		 %S LONG VARBINARY, \
+		 %S BINARY(%d), \
+		 %S BINARY(%d), \
+		 %S BINARY(%d), \
+		 %S UNSIGNED INTEGER, \
+		 %S LONG VARBINARY, \
+		 %S VARBINARY(%d), \
+		 %S UNSIGNED INTEGER, \
+		 %S BIGINT, \
+		 %S BIGINT)");
 
-	sqlStatement.Format(KSQLCreateTable, &KAkaTableName, &KServiceType,
-														 &KServiceIndex,
-														 &KTunnelingType,
-														 &cf_str_EAP_AKA_use_manual_realm_literal,
-														 &cf_str_EAP_AKA_manual_realm_literal,KMaxManualRealmLengthInDB,
-														 &cf_str_EAP_AKA_use_manual_username_literal, 
-														 &cf_str_EAP_AKA_manual_username_literal, KMaxManualUsernameLengthInDB,
-														 &KPseudonymId, 
-														 &KXKey, KMaxXKeyLengthInDB,
-														 &KK_aut, KMaxK_autLengthInDB,
-														 &KK_encr, KMaxK_encrLengthInDB,
-														 &KReauthCounter, 
-														 &KReauthId, 
-														 &KPreviousIMSI, KMaxIMSILengthInDB,
-														 &cf_str_EAP_AKA_use_pseudonym_identity_literal,
-														 &cf_str_EAP_AKA_max_session_validity_time_literal, 
-														 &KAKALastFullAuthTime);
+	sqlStatement.Format(KSQLCreateTable,
+		&KAkaTableName,
+		&KServiceType,
+		&KServiceIndex,
+		&KTunnelingTypeVendorId,
+		&KTunnelingType,
+		&cf_str_EAP_AKA_use_manual_realm_literal,
+		&cf_str_EAP_AKA_manual_realm_literal, KMaxRealmLengthInDB,
+		&cf_str_EAP_AKA_use_manual_username_literal, 
+		&cf_str_EAP_AKA_manual_username_literal, KMaxUsernameLengthInDB,
+		&KPseudonymId, 
+		&KXKey, KMaxXKeyLengthInDB,
+		&KK_aut, KMaxK_autLengthInDB,
+		&KK_encr, KMaxK_encrLengthInDB,
+		&KReauthCounter, 
+		&KReauthId, 
+		&KPreviousIMSI, KMaxIMSILengthInDB,
+		&cf_str_EAP_AKA_use_pseudonym_identity_literal,
+		&cf_str_EAP_AKA_max_session_validity_time_literal, 
+		&KAKALastFullAuthTime);
 																					
-	err = aDatabase.Execute(sqlStatement);
-	if (err != KErrNone && err != KErrAlreadyExists)
+	error = aDatabase.Execute(sqlStatement);
+	if (error != KErrNone && error != KErrAlreadyExists)
 	{
-		User::Leave(err);
+		User::Leave(error);
 	}
 	
 	// 4. Check if database table contains a row for this service type and id  
 	
-	_LIT(KSQLQueryRow, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLQueryRow, &cf_str_EAP_AKA_manual_realm_literal, &KAkaTableName, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+	_LIT(KSQLQueryRow, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	sqlStatement.Format(KSQLQueryRow,
+		&cf_str_EAP_AKA_manual_realm_literal,
+		&KAkaTableName, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());
 		
 	RDbView view;
 	User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement), TDbWindow::EUnlimited));
@@ -216,13 +202,14 @@
 		view.InsertL();
 		view.SetColL(colSet->ColNo(KServiceType), static_cast<TInt>(aIndexType));
 		view.SetColL(colSet->ColNo(KServiceIndex), aIndex);
-		view.SetColL(colSet->ColNo(KTunnelingType), aTunnelingVendorType);
+		view.SetColL(colSet->ColNo(KTunnelingTypeVendorId), aTunnelingType.get_vendor_id());
+		view.SetColL(colSet->ColNo(KTunnelingType), aTunnelingType.get_vendor_type());
 		
 		view.SetColL(colSet->ColNo(cf_str_EAP_AKA_use_manual_realm_literal), default_EAP_AKA_use_manual_realm);	
-		view.SetColL(colSet->ColNo(cf_str_EAP_AKA_manual_realm_literal), default_EAP_AKA_manual_realm);	
+		view.SetColL(colSet->ColNo(cf_str_EAP_AKA_manual_realm_literal), default_EAP_realm);	
 
 		view.SetColL(colSet->ColNo(cf_str_EAP_AKA_use_manual_username_literal), default_EAP_AKA_use_manual_username);
-		view.SetColL(colSet->ColNo(cf_str_EAP_AKA_manual_username_literal), default_EAP_AKA_manual_username);
+		view.SetColL(colSet->ColNo(cf_str_EAP_AKA_manual_username_literal), default_EAP_username);
 
 		view.SetColL(colSet->ColNo(cf_str_EAP_AKA_use_pseudonym_identity_literal), default_EAP_AKA_use_pseudonym_identity);
 
@@ -232,19 +219,20 @@
 
 		view.PutL();
 		
-		CleanupStack::PopAndDestroy( colSet ); // Delete colSet.
+		CleanupStack::PopAndDestroy( colSet );
 		
-		CleanupStack::PopAndDestroy( &view ); // Close view.
+		CleanupStack::PopAndDestroy( &view );
 	}
 	
-	CleanupStack::PopAndDestroy( buf ); // Delete buf
-	
+	aDatabase.Compact();
+
+	CleanupStack::PopAndDestroy( buf );
 	CleanupStack::Pop( &aDatabase );	
-	CleanupStack::Pop( &aSession );	
-	
-	aDatabase.Compact();
+	CleanupStack::Pop( &aFileServerSession );
 }
 
+// ----------------------------------------------------------
+
 void EapAkaDbUtils::SetIndexL(
 	RDbNamedDatabase& aDatabase, 		
 	const TIndexType aIndexType,
@@ -254,25 +242,37 @@
 	const TInt aNewIndex,
 	const eap_type_value_e aNewTunnelingType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
-	TUint aNewTunnelingVendorType = aNewTunnelingType.get_vendor_type();
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapAkaDbUtils::SetIndexL(): -Start- aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type()));
+	
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapAkaDbUtils::SetIndexL(): -Start- aNewIndexType=%d, aNewIndex=%d, aNewTunnelingType=0xfe%06x%08x\n"),
+		aNewIndexType,
+		aNewIndex,
+		aNewTunnelingType.get_vendor_id(),
+		aNewTunnelingType.get_vendor_type()));
 
-#else
-
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-	TUint aNewTunnelingVendorType = static_cast<TUint>(aNewTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapAkaDbUtils::SetIndexL()\n"));
 
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
-	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
+	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
 
-	sqlStatement.Format(KSQL, &KAkaTableName, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+	sqlStatement.Format(KSQL,
+		&KAkaTableName, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());
 	
 	RDbView view;
 	
@@ -301,16 +301,19 @@
 	view.UpdateL();
 	
     view.SetColL(colSet->ColNo(KServiceType), aNewIndexType);
-    
     view.SetColL(colSet->ColNo(KServiceIndex), aNewIndex);
-    
-    view.SetColL(colSet->ColNo(KTunnelingType), aNewTunnelingVendorType);
+	view.SetColL(colSet->ColNo(KTunnelingTypeVendorId), aNewTunnelingType.get_vendor_id());
+	view.SetColL(colSet->ColNo(KTunnelingType), aNewTunnelingType.get_vendor_type());
 
     view.PutL();
     	
-	CleanupStack::PopAndDestroy(3); // view, colset, buf
+	CleanupStack::PopAndDestroy(colSet);
+	CleanupStack::PopAndDestroy(&view);
+	CleanupStack::PopAndDestroy(buf);
 }
 
+// ----------------------------------------------------------
+
 void EapAkaDbUtils::SetConfigurationL(
 	RDbNamedDatabase& aDatabase,
 	const EAPSettings& aSettings, 
@@ -318,80 +321,20 @@
 	const TInt aIndex,
 	const eap_type_value_e aTunnelingType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
-
-#else
-
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapAkaDbUtils::SetConfigurationL -Start- aIndexType=%d, aIndex=%d, aTunnelingVendorType=%d\n"),
-						aIndexType,aIndex, aTunnelingVendorType));
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("*************************** SetConfigurationL - Set the below values: ***************************\n")) );
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - Set these values for EAPType=%d"),aSettings.iEAPType) );
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, Username=%S"),aSettings.iUsernamePresent, &(aSettings.iUsername)) );
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, Password=%S"),aSettings.iPasswordPresent, &(aSettings.iPassword)) );
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, Realm=%S"),aSettings.iRealmPresent, &(aSettings.iRealm)) );
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, UsePseudonyms=%d"),aSettings.iUsePseudonymsPresent, aSettings.iUsePseudonyms) );
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, VerifyServerRealm=%d"),
-						aSettings.iVerifyServerRealmPresent, aSettings.iVerifyServerRealm) );
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, RequireClientAuthentication=%d"),
-						aSettings.iRequireClientAuthenticationPresent, aSettings.iRequireClientAuthentication) );
-						
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, SessionValidityTime=%d minutes"),
-						aSettings.iSessionValidityTimePresent, aSettings.iSessionValidityTime) );
-												
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, CipherSuites Count=%d"),
-						aSettings.iCipherSuitesPresent, aSettings.iCipherSuites.Count()) );
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapAkaDbUtils::SetConfigurationL -Start- aIndexType=%d, aIndex=%d, aTunnelingVendorType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type()));
 	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, PEAPv0Allowed=%d, PEAPv1Allowed=%d, PEAPv2Allowed=%d"),
-						aSettings.iPEAPVersionsPresent, aSettings.iPEAPv0Allowed,aSettings.iPEAPv1Allowed, aSettings.iPEAPv2Allowed ) );
-		
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, Certificates Count=%d"),
-						aSettings.iCertificatesPresent, aSettings.iCertificates.Count()) );
-						
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - Certificate details below: \n")) );
-	
-	for( TInt n=0; n < aSettings.iCertificates.Count(); n++ )
-	{
-		EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - Certificate type:%d \n"), aSettings.iCertificates[n].iCertType) );
-		
-		EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - certificates - present=%d, SubjectName=%S"),
-						aSettings.iCertificates[n].iSubjectNamePresent, &(aSettings.iCertificates[n].iSubjectName) ) );
-						
-		EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - certificates - present=%d, IssuerName=%S"),
-						aSettings.iCertificates[n].iIssuerNamePresent, &(aSettings.iCertificates[n].iIssuerName) ) );
-						
-		EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - certificates - present=%d, SerialNumber=%S"),
-						aSettings.iCertificates[n].iSerialNumberPresent, &(aSettings.iCertificates[n].iSerialNumber) ) );
-						
-		EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - certificates - SubjectKeyID present=%d"),
-						aSettings.iCertificates[n].iSubjectKeyIDPresent ) );						
-						
-		EAP_TRACE_DATA_DEBUG_SYMBIAN( ( "SubjectKeyID:", aSettings.iCertificates[n].iSubjectKeyID.Ptr(), 
-													aSettings.iCertificates[n].iSubjectKeyID.Size() ) );
-						
-		EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - certificates - present=%d, Thumbprint=%S"),
-						aSettings.iCertificates[n].iThumbprintPresent, &(aSettings.iCertificates[n].iThumbprint) ) );
-	}						
+	EAP_TRACE_DEBUG_SYMBIAN((_L("*************************** SetConfigurationL(): Set the below values: ***************************\n")) );
 
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, EncapsulatedEAPTypes Count=%d"),
-						aSettings.iEncapsulatedEAPTypesPresent, aSettings.iEncapsulatedEAPTypes.Count()) );
-	for( TInt m=0; m < aSettings.iEncapsulatedEAPTypes.Count(); m++ )
-	{	
-		EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - EncapsulatedEAPTypes=%d"),
-						aSettings.iEncapsulatedEAPTypes[m]) );
-	}						
+	EAP_TRACE_SETTINGS(&aSettings);
 
-	EAP_TRACE_DEBUG_SYMBIAN((_L("*************************** SetConfigurationL - Set the above values: ***************************\n")) );
+	EAP_TRACE_DEBUG_SYMBIAN((_L("*************************** SetConfigurationL(): Set the above values: ***************************\n")) );
 
 	// Check if the settings are for the correct type
-	if (aSettings.iEAPType != EAPSettings::EEapAka)
+	if (aSettings.iEAPExpandedType != (*EapExpandedTypeAka.GetType()))
 	{
 		User::Leave(KErrNotSupported);
 	}
@@ -401,9 +344,17 @@
 
 	RDbView view;
 
-	_LIT(KSQLQuery, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLQuery, &KAkaTableName, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+	_LIT(KSQLQuery, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	sqlStatement.Format(KSQLQuery,
+		&KAkaTableName, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());
 	
 	// Evaluate view
 	User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement)));
@@ -420,90 +371,98 @@
 	CDbColSet* colSet = view.ColSetL();
 	CleanupStack::PushL(colSet);
 
-	// Manual username
-	//if (aSettings.iUsernamePresent) // no need to check as there may be empty usernames with the present status is EFlase.
+
+	if (aSettings.iUseAutomaticUsernamePresent)
 	{
-		// Check if length of username is less than the max length.
-		if(aSettings.iUsername.Length() > KMaxManualUsernameLengthInDB)
-		{
-			// Username too long. Can not be stored in DB.
-			
-			EAP_TRACE_DEBUG_SYMBIAN((_L("EapAkaDbUtils::SetConfigurationL: Too long Username. Length=%d \n"),
-			aSettings.iUsername.Length()));
-			
-			User::Leave(KErrArgument);
-		}
-		
-		// Length is ok. Set the value in DB.
-		view.SetColL(colSet->ColNo(cf_str_EAP_AKA_manual_username_literal), aSettings.iUsername);
-		
 		// This is to set the automatic or manual status.
 		TUint useManualUsernameStatus;
 		
-		if (aSettings.iUsernamePresent)
+		if (aSettings.iUseAutomaticUsername)
 		{
-			useManualUsernameStatus = EAKAUseManualUsernameYes;
+			useManualUsernameStatus = EEapDbFalse;
 		}
 		else
 		{
-			useManualUsernameStatus = EAKAUseManualUsernameNo;
+			useManualUsernameStatus = EEapDbTrue;
 		}
 		
 		// Set the value.
 		view.SetColL(colSet->ColNo(cf_str_EAP_AKA_use_manual_username_literal), useManualUsernameStatus);
 	}
+
+
+	if (aSettings.iUseAutomaticRealmPresent)
+	{
+		// This is to set the automatic or manual status.
+		TUint useManualRealmStatus;
+		
+		if (aSettings.iUseAutomaticRealm)
+		{
+			useManualRealmStatus = EEapDbFalse;
+		}
+		else
+		{
+			useManualRealmStatus = EEapDbTrue;
+		}
+
+		// Set the value.
+		view.SetColL(colSet->ColNo(cf_str_EAP_AKA_use_manual_realm_literal), useManualRealmStatus);
+	}
+
+
+	// Manual username
+	if (aSettings.iUsernamePresent) // no need to check as there may be empty usernames with the present status is EFlase.
+	{
+		// Check if length of username is less than the max length.
+		if(aSettings.iUsername.Length() > KMaxUsernameLengthInDB)
+		{
+			// Username too long. Can not be stored in DB.
+			
+			EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapAkaDbUtils::SetConfigurationL(): Too long Username. Length=%d \n"),
+				aSettings.iUsername.Length()));
+			
+			User::Leave(KErrArgument);
+		}
+
+		// Length is ok. Set the value in DB.
+		view.SetColL(colSet->ColNo(cf_str_EAP_AKA_manual_username_literal), aSettings.iUsername);
+	}
 		
 	// Manual realm
-	//if (aSettings.iRealmPresent)  // no need to check as there may be empty realms with the present status is EFlase.
+	if (aSettings.iRealmPresent)  // no need to check as there may be empty realms with the present status is EFlase.
 	{
 		// Check if length of realm is less than the max length.
-		if(aSettings.iRealm.Length() > KMaxManualRealmLengthInDB)
+		if(aSettings.iRealm.Length() > KMaxRealmLengthInDB)
 		{
 			// Realm too long. Can not be stored in DB.
 
-			EAP_TRACE_DEBUG_SYMBIAN((_L("EapAkaDbUtils::SetConfigurationL: Too long Realm. Length=%d \n"),
-			aSettings.iRealm.Length()));
+			EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapAkaDbUtils::SetConfigurationL: Too long Realm. Length=%d \n"),
+				aSettings.iRealm.Length()));
 			
 			User::Leave(KErrArgument);
 		}
 
 		// Length is ok. Set the value in DB. Value could be empty. It doesn't matter.
 		view.SetColL(colSet->ColNo(cf_str_EAP_AKA_manual_realm_literal), aSettings.iRealm);
-
-		// This is to set the automatic or manual status.
-		TUint useManualRealmStatus;
-		
-		if (aSettings.iRealmPresent)
-		{
-			useManualRealmStatus = EAKAUseManualRealmYes;
-		}
-		else
-		{
-			useManualRealmStatus = EAKAUseManualRealmNo;
-		}
-
-		// Set the value.
-		view.SetColL(colSet->ColNo(cf_str_EAP_AKA_use_manual_realm_literal), useManualRealmStatus);
 	}
 	
-	// UsePseudonym
 	if (aSettings.iUsePseudonymsPresent)
 	{
 		if (aSettings.iUsePseudonyms)
 		{
 			// Use pseudonym.
-			view.SetColL(colSet->ColNo(cf_str_EAP_AKA_use_pseudonym_identity_literal), EAKAUsePseudonymIdYes);
+			view.SetColL(colSet->ColNo(cf_str_EAP_AKA_use_pseudonym_identity_literal), EEapDbTrue);
 		}
 		else
 		{			
 			// Don't use pseudonym.
-			view.SetColL(colSet->ColNo(cf_str_EAP_AKA_use_pseudonym_identity_literal), EAKAUsePseudonymIdNo);			
+			view.SetColL(colSet->ColNo(cf_str_EAP_AKA_use_pseudonym_identity_literal), EEapDbFalse);			
 		}
 	}
 	else
 	{
 		// Value is not configured. Value is read from config file if needed.
-		view.SetColL(colSet->ColNo(cf_str_EAP_AKA_use_pseudonym_identity_literal), EAKAUsePseudonymIdNotValid);		
+		view.SetColL(colSet->ColNo(cf_str_EAP_AKA_use_pseudonym_identity_literal), EEapDbNotValid);		
 	}
 	
 	// Session validity time
@@ -525,14 +484,18 @@
 		
 		view.SetColL(colSet->ColNo(KAKALastFullAuthTime), default_FullAuthTime);
 
-		EAP_TRACE_DEBUG_SYMBIAN((_L("Session Validity: EAP-Type=%d, Resetting Full Auth Time since settings are modified\n"),
-									aSettings.iEAPType ));
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapAkaDbUtils::SetConfigurationL(): Session Validity: Resetting Full Auth Time since settings are modified\n")));
 	}
 
 	view.PutL();
-	CleanupStack::PopAndDestroy(3); // view, colset, buf
+
+	CleanupStack::PopAndDestroy(colSet);
+	CleanupStack::PopAndDestroy(&view);
+	CleanupStack::PopAndDestroy(buf);
 }
 
+// ----------------------------------------------------------
+
 void EapAkaDbUtils::GetConfigurationL(
 	RDbNamedDatabase& aDatabase,
 	EAPSettings& aSettings, 
@@ -540,15 +503,14 @@
 	const TInt aIndex,
 	const eap_type_value_e aTunnelingType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapAkaDbUtils::GetConfigurationL(): -Start- aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type()));
 
-#else
-
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapAkaDbUtils::GetConfigurationL()\n"));
 
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();	
@@ -556,9 +518,17 @@
 	RDbView view;
 
 	// Form the query
-	_LIT(KSQLQuery, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLQuery, &KAkaTableName, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+	_LIT(KSQLQuery, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	sqlStatement.Format(KSQLQuery,
+		&KAkaTableName, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());
 	
 	// Evaluate view
 	User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement)));
@@ -575,70 +545,100 @@
 	CDbColSet* colSet = view.ColSetL();
 	CleanupStack::PushL(colSet);
 
-	aSettings.iEAPType = EAPSettings::EEapAka;
-	
-	// Username
-	TPtrC username = view.ColDes(colSet->ColNo(cf_str_EAP_AKA_manual_username_literal));
-	aSettings.iUsername.Copy(username);
-	
-	// For manual or automatic status.
-	TUint useUsername = view.ColUint(colSet->ColNo(cf_str_EAP_AKA_use_manual_username_literal));
-	if(useUsername == EAKAUseManualUsernameNo)
+	aSettings.iEAPExpandedType = *EapExpandedTypeAka.GetType();
+
 	{
-		aSettings.iUsernamePresent = EFalse;		
-	}
-	else
-	{
-		aSettings.iUsernamePresent = ETrue;		
+		// For manual or automatic username.
+		TUint useUsername = view.ColUint(colSet->ColNo(cf_str_EAP_AKA_use_manual_username_literal));
+
+		aSettings.iUseAutomaticUsernamePresent = ETrue;
+
+		if(useUsername == EEapDbTrue)
+		{
+			aSettings.iUseAutomaticUsername = EFalse;		
+		}
+		else
+		{
+			aSettings.iUseAutomaticUsername = ETrue;		
+		}
 	}
-	
-	// Realm
-	TPtrC realm = view.ColDes(colSet->ColNo(cf_str_EAP_AKA_manual_realm_literal));
-	aSettings.iRealm.Copy(realm);
-	
-	// For manual or automatic status.
-	TUint useRealm = view.ColUint(colSet->ColNo(cf_str_EAP_AKA_use_manual_realm_literal));
-	if(useRealm == EAKAUseManualRealmNo)
-	{
-		aSettings.iRealmPresent = EFalse;
-	}
-	else
+
 	{
-		aSettings.iRealmPresent = ETrue;
-	}
-	
-	TInt usePseudonym = view.ColUint(colSet->ColNo(cf_str_EAP_AKA_use_pseudonym_identity_literal));
-	
-	if (usePseudonym == EAKAUsePseudonymIdNotValid)
-	{
-		aSettings.iUsePseudonymsPresent = EFalse;
-	}
-	else
-	{
-		if (usePseudonym == EAKAUsePseudonymIdNo)
+		// For manual or automatic realm.
+		TUint useRealm = view.ColUint(colSet->ColNo(cf_str_EAP_AKA_use_manual_realm_literal));
+
+		aSettings.iUseAutomaticRealmPresent = ETrue;
+
+		if(useRealm == EEapDbTrue)
 		{
-			aSettings.iUsePseudonyms = EFalse;
+			aSettings.iUseAutomaticRealm = EFalse;
 		}
 		else
 		{
-			aSettings.iUsePseudonyms = ETrue;
+			aSettings.iUseAutomaticRealm = ETrue;
 		}
+	}
+
+	{
+		// Username
+		TPtrC username = view.ColDes(colSet->ColNo(cf_str_EAP_AKA_manual_username_literal));
+
+		aSettings.iUsernamePresent = ETrue;
+
+		aSettings.iUsername.Copy(username);
+	}
+
+	{
+		// Realm
+		TPtrC realm = view.ColDes(colSet->ColNo(cf_str_EAP_AKA_manual_realm_literal));
+
+		aSettings.iRealmPresent = ETrue;
+
+		aSettings.iRealm.Copy(realm);
+	}
+
+	{
+		TInt usePseudonym = view.ColUint(colSet->ColNo(cf_str_EAP_AKA_use_pseudonym_identity_literal));
 		
-		aSettings.iUsePseudonymsPresent = ETrue;		
+		if (usePseudonym == EEapDbNotValid)
+		{
+			aSettings.iUsePseudonymsPresent = EFalse;
+		}
+		else
+		{
+			if (usePseudonym == EEapDbFalse)
+			{
+				aSettings.iUsePseudonyms = EFalse;
+			}
+			else
+			{
+				aSettings.iUsePseudonyms = ETrue;
+			}
+			
+			aSettings.iUsePseudonymsPresent = ETrue;		
+		}
+	}
+
+	{
+		// Session validity time	
+		TInt64 maxSessionTimeMicro = view.ColInt64(colSet->ColNo(cf_str_EAP_AKA_max_session_validity_time_literal));
+		
+		// Convert the time to minutes.	
+		TInt64 maxSessionTimeMin = maxSessionTimeMicro / KMicroSecsInAMinute;
+		
+		aSettings.iSessionValidityTime = static_cast<TUint>(maxSessionTimeMin);
+		aSettings.iSessionValidityTimePresent = ETrue;
 	}
 	
-	// Session validity time	
-	TInt64 maxSessionTimeMicro = view.ColInt64(colSet->ColNo(cf_str_EAP_AKA_max_session_validity_time_literal));
-	
-	// Convert the time to minutes.	
-	TInt64 maxSessionTimeMin = maxSessionTimeMicro / KMicroSecsInAMinute;
-	
-	aSettings.iSessionValidityTime = static_cast<TUint>(maxSessionTimeMin);
-	aSettings.iSessionValidityTimePresent = ETrue;
-	
-	CleanupStack::PopAndDestroy(3); // view, colset, buf
+	CleanupStack::PopAndDestroy(colSet);
+	CleanupStack::PopAndDestroy(&view);
+	CleanupStack::PopAndDestroy(buf);
+
+	EAP_TRACE_SETTINGS(&aSettings);
 }
 
+// ----------------------------------------------------------
+
 void EapAkaDbUtils::CopySettingsL(
 	RDbNamedDatabase& aDatabase, 		
 	const TIndexType aSrcIndexType,
@@ -648,25 +648,37 @@
 	const TInt aDestIndex,
 	const eap_type_value_e aDestTunnelingType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aSrcTunnelingVendorType = aSrcTunnelingType.get_vendor_type();
-	TUint aDestTunnelingVendorType = aDestTunnelingType.get_vendor_type();
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapAkaDbUtils::CopySettingsL(): -Start- aSrcIndexType=%d, aSrcIndex=%d, aSrcTunnelingType=0xfe%06x%08x\n"),
+		aSrcIndexType,
+		aSrcIndex,
+		aSrcTunnelingType.get_vendor_id(),
+		aSrcTunnelingType.get_vendor_type()));
+	
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapAkaDbUtils::CopySettingsL(): -Start- aDestIndexType=%d, aDestTunnelingType=0xfe%06x%08x\n"),
+		aDestIndexType,
+		aDestIndex,
+		aDestTunnelingType.get_vendor_id(),
+		aDestTunnelingType.get_vendor_type()));
 
-#else
-
-	TUint aSrcTunnelingVendorType = static_cast<TUint>(aSrcTunnelingType);
-	TUint aDestTunnelingVendorType = static_cast<TUint>(aDestTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapAkaDbUtils::CopySettingsL()\n"));
 
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
-	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
+	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
 
-	sqlStatement.Format(KSQL, &KAkaTableName, 
-		&KServiceType, aSrcIndexType, &KServiceIndex, aSrcIndex, &KTunnelingType, aSrcTunnelingVendorType);
+	sqlStatement.Format(KSQL,
+		&KAkaTableName, 
+		&KServiceType,
+		aSrcIndexType,
+		&KServiceIndex,
+		aSrcIndex,
+		&KTunnelingTypeVendorId,
+		aSrcTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aSrcTunnelingType.get_vendor_type());
 	
 	RDbView view;
 	
@@ -697,99 +709,86 @@
 	CleanupStack::PushL(colSet);
 		
 	view.SetColL(colSet->ColNo(KServiceType), static_cast<TUint>(aDestIndexType));
-    
     view.SetColL(colSet->ColNo(KServiceIndex), aDestIndex);
-    
-    view.SetColL(colSet->ColNo(KTunnelingType), static_cast<TUint>(aDestTunnelingVendorType));
+	view.SetColL(colSet->ColNo(KTunnelingTypeVendorId), aDestTunnelingType.get_vendor_id());
+	view.SetColL(colSet->ColNo(KTunnelingType), aDestTunnelingType.get_vendor_type());
 
     view.PutL();
     	
-	CleanupStack::PopAndDestroy(3); // view, colset, buf
+	CleanupStack::PopAndDestroy(colSet);
+	CleanupStack::PopAndDestroy(&view);
+	CleanupStack::PopAndDestroy(buf);
 }
 
+// ----------------------------------------------------------
+
 void EapAkaDbUtils::DeleteConfigurationL(	
 	const TIndexType aIndexType,
 	const TInt aIndex,
 	const eap_type_value_e aTunnelingType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapAkaDbUtils::DeleteConfigurationL(): -Start- aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type()));
 
-#else
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapAkaDbUtils::DeleteConfigurationL()\n"));
 
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
+	RDbNamedDatabase aDatabase;
+	RFs aFileServerSession;
 
-	RDbs session;
-	RDbNamedDatabase database;
-	// Connect to the DBMS server.
-	User::LeaveIfError(session.Connect());
-	CleanupClosePushL(session);	
-		
-#ifdef SYMBIAN_SECURE_DBMS
+	TInt error(KErrNone);
+	TFileName aPrivateDatabasePathName;
 	
-	// Create the secure shared database with the specified secure policy.
-	// Database will be created in the data caging path for DBMS (C:\private\100012a5).
-	
-	TInt err = database.Create(session, KDatabaseName, KSecureUIDFormat);
-	
-	if(err == KErrNone)
+	EapPluginTools::CreateDatabaseLC(
+		aDatabase,
+		aFileServerSession,
+		error,
+		KEapAkaDatabaseName,
+		aPrivateDatabasePathName);
+
+	if(error == KErrNone)
 	{
 		// Database was created so it was empty. No need for further actions.
-		database.Destroy();
-		CleanupStack::PopAndDestroy();
+		aDatabase.Destroy();
+		CleanupStack::PopAndDestroy(&aDatabase);
+		CleanupStack::PopAndDestroy(&aFileServerSession);
 		return;
-		
-	} 
-	else if (err != KErrAlreadyExists) 
+	}
+	else if (error != KErrAlreadyExists) 
 	{
-		User::LeaveIfError(err);
+		User::LeaveIfError(error);
 	}
 	
-	// Database existed, open it.
-	User::LeaveIfError(database.Open(session, KDatabaseName, KSecureUIDFormat));
-	CleanupClosePushL(database);
-		
-#else
-	// For non-secured database. The database will be created in the old location (c:\system\data).
-	
-	RFs fsSession;		
-	User::LeaveIfError(fsSession.Connect());
-	CleanupClosePushL(fsSession);	
-	TInt err = database.Create(fsSession, KDatabaseName);
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapAkaDbUtils::DeleteConfigurationL(): - calls aDatabase.Open()\n")));
+
+	error = aDatabase.Open(aFileServerSession, aPrivateDatabasePathName);
 
-	if(err == KErrNone)
-	{
-		// Database was created so it was empty. No need for further actions.
-		database.Destroy();
-		CleanupStack::PopAndDestroy(2); // fsSession, database session
-		return;
-		
-	} 
-	else if (err != KErrAlreadyExists) 
-	{
-		User::LeaveIfError(err);
-	}
-	
-	CleanupStack::PopAndDestroy(); // close fsSession
-	
-	User::LeaveIfError(database.Open(session, KDatabaseName));
-	CleanupClosePushL(database);		
-	    
-#endif // #ifdef SYMBIAN_SECURE_DBMS
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapAkaDbUtils::DeleteConfigurationL(): - Opened private DB for EAP-AKA. error=%d\n"), error));
+
+	User::LeaveIfError(error);
 
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
 	// Main settings table
-	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQL, &KAkaTableName, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	sqlStatement.Format(KSQL,
+		&KAkaTableName, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());
+
 	// Evaluate view
 	RDbView view;
-	User::LeaveIfError(view.Prepare(database,TDbQuery(sqlStatement), TDbWindow::EUnlimited));
+	User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement), TDbWindow::EUnlimited));
 	CleanupClosePushL(view);
 	User::LeaveIfError(view.EvaluateAll());
 
@@ -801,8 +800,12 @@
 		} while (view.NextL() != EFalse);
 	}
 
-	// Close database
-	CleanupStack::PopAndDestroy(4); // view, buf, database, session
+	CleanupStack::PopAndDestroy(&view);
+	CleanupStack::PopAndDestroy(buf);
+	CleanupStack::PopAndDestroy(&aDatabase);
+	CleanupStack::PopAndDestroy(&aFileServerSession);
 }
 
+// ----------------------------------------------------------
+
 // End of file
--- a/eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/src/EapAkaProxy.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/src/EapAkaProxy.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 13 %
+* %version: 10.1.2 %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/src/EapAkaUiAkaData.cpp	Thu May 13 22:51:27 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
-* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  EAP and WLAN authentication protocols.
-*
-*/
-
-/*
-* %version: 9 %
-*/
-
-// This is enumeration of EAPOL source code.
-#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
-	#undef EAP_FILE_NUMBER_ENUM
-	#define EAP_FILE_NUMBER_ENUM 180 
-	#undef EAP_FILE_NUMBER_DATE 
-	#define EAP_FILE_NUMBER_DATE 1127594498 
-#endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
-
-#include <EapAkaUiAkaData.h>
-
-
-CEapAkaUiAkaData::CEapAkaUiAkaData()
-{
-}
-
-
-CEapAkaUiAkaData::~CEapAkaUiAkaData()
-{
-}
-
-
-TDes& CEapAkaUiAkaData::GetManualUsername()
-{
-    return iManualUsername;
-}
-
-
-TDes& CEapAkaUiAkaData::GetManualRealm()
-{
-    return iManualRealm;
-}
-
-
-TBool * CEapAkaUiAkaData::GetUseManualUsername()
-{
-    return &iUseManualUsername;
-}
-
-
-TBool * CEapAkaUiAkaData::GetUseManualRealm()
-{
-    return &iUseManualRealm;
-}
--- a/eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/src/EapAkaUiConnection.cpp	Thu May 13 22:51:27 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
-/*
-* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  EAP and WLAN authentication protocols.
-*
-*/
-
-/*
-* %version: 10.1.2 %
-*/
-
-// This is enumeration of EAPOL source code.
-#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
-	#undef EAP_FILE_NUMBER_ENUM
-	#define EAP_FILE_NUMBER_ENUM 182 
-	#undef EAP_FILE_NUMBER_DATE 
-	#define EAP_FILE_NUMBER_DATE 1127594498 
-#endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
-
-#include "EapAkaDbUtils.h"
-#include <EapAkaUiConnection.h>
-#include <EapAkaUiDataConnection.h>
-#include "eap_header.h"
-
-CEapAkaUiConnection::CEapAkaUiConnection(
-    const TIndexType aIndexType,
-    const TInt aIndex,
-    const TInt aTunnelingType)
-    : iIndexType(aIndexType)
-    , iIndex(aIndex)
-    , iTunnelingType(aTunnelingType)
-    , iIsConnected(EFalse)
-    , iDataConn(NULL)
-{
-}
-
-
-CEapAkaUiConnection::~CEapAkaUiConnection()
-{
-}
-
-
-TInt CEapAkaUiConnection::Connect()
-{
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	eap_type_value_e tunnelingType(static_cast<eap_type_ietf_values_e>(iTunnelingType));
-
-#else
-
-	eap_type_value_e tunnelingType = static_cast<eap_type_value_e>(iTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
-	TRAPD(err, EapAkaDbUtils::OpenDatabaseL(
-		iDbNamedDatabase, 
-		iDbs, 
-		iIndexType, 
-		iIndex, 
-		tunnelingType));
-    if (err == KErrNone)
-    {
-        iIsConnected = ETrue;
-    }
-
-    return err;
-}
-
-
-TInt CEapAkaUiConnection::Close()
-{
-    if (iIsConnected)
-    {
-        iDbNamedDatabase.Close();
-        iDbs.Close();
-    }
-    iIsConnected = EFalse;
-
-    return KErrNone;
-}
-
-
-CEapAkaUiDataConnection * CEapAkaUiConnection::GetDataConnection()
-{
-    if (!iDataConn)
-    {
-        iDataConn = new CEapAkaUiDataConnection(this);
-    }
-
-    return iDataConn;
-}
-
-TInt CEapAkaUiConnection::GetDatabase(RDbNamedDatabase & aDatabase)
-{
-    if (iIsConnected == EFalse)
-    {
-        return KErrSessionClosed;
-    }
-
-    aDatabase = iDbNamedDatabase;
-    return KErrNone;
-}
-
-
-TIndexType CEapAkaUiConnection::GetIndexType()
-{
-    return iIndexType;
-}
-
-
-TInt CEapAkaUiConnection::GetIndex()
-{
-    return iIndex;
-}
-
-
-TInt CEapAkaUiConnection::GetTunnelingType()
-{
-    return iTunnelingType;
-}
--- a/eapol/eapol_framework/eapol_symbian/am/type/aka/symbian/plugin/src/EapAkaUiDataConnection.cpp	Thu May 13 22:51:27 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,276 +0,0 @@
-/*
-* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  EAP and WLAN authentication protocols.
-*
-*/
-
-/*
-* %version: 15.1.3.1.2 %
-*/
-
-// This is enumeration of EAPOL source code.
-#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
-	#undef EAP_FILE_NUMBER_ENUM
-	#define EAP_FILE_NUMBER_ENUM 184 
-	#undef EAP_FILE_NUMBER_DATE 
-	#define EAP_FILE_NUMBER_DATE 1127594498 
-#endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
-
-#include <e32base.h>
-#include "EapAkaDbUtils.h"
-#include "EapAkaDbParameterNames.h"
-#include "EapAkaDbDefaults.h"
-#include <EapAkaUiConnection.h>
-#include <EapAkaUiDataConnection.h>
-#include <EapAkaUiAkaData.h>
-#include "eap_am_trace_symbian.h"
-
-const TUint KMaxSqlQueryLength = 256;
-
-CEapAkaUiDataConnection::CEapAkaUiDataConnection(CEapAkaUiConnection * aUiConn)
-: iIsOpened(EFalse)
-, iUiConn(aUiConn)
-, iColSet(NULL)
-, iDataPtr(NULL)
-{
-}
-
-
-CEapAkaUiDataConnection::~CEapAkaUiDataConnection()
-{
-    if (iUiConn)
-    {
-        Close();
-        iUiConn = NULL;
-    }
-}
-
-
-TInt CEapAkaUiDataConnection::Open()
-{
-    if (iIsOpened)
-    {
-        return KErrAlreadyExists;
-    }
-
-    TInt err = iUiConn->GetDatabase(iDatabase);
-    if (err != KErrNone)
-    {
-        return err;
-    }
-
-    iIsOpened = ETrue;
-    return KErrNone;
-}
-
-
-TInt CEapAkaUiDataConnection::GetData(CEapAkaUiAkaData ** aDataPtr)
-{
-    if (aDataPtr == NULL)
-    {
-        return KErrArgument;
-    }
-    if (iIsOpened == EFalse)
-    {
-        return KErrSessionClosed;
-    }
-    iDataPtr = new CEapAkaUiAkaData();
-    if (!iDataPtr)
-    {
-        return KErrNoMemory;
-    }
-
-    TRAPD(err, FetchDataL());
-    if (err != KErrNone)
-    {
-		delete iDataPtr;
-		iDataPtr = NULL;
-		
-		delete iColSet;
-		iColSet = NULL;
-
-        iView.Close();
-        
-        return err;
-    }
-
-    *aDataPtr = iDataPtr;
-
-    return KErrNone;
-}
-
-
-TInt CEapAkaUiDataConnection::Update()
-{
-    TRAPD(err, iView.UpdateL());
-    if (err != KErrNone)
-    {
-        return err;
-    }
-
-	// Check if length of username and realm are less than the max length possible in DB.
-	if(iDataPtr->GetManualUsername().Length() > KMaxManualUsernameLengthInDB
-		|| iDataPtr->GetManualRealm().Length() > KMaxManualRealmLengthInDB)
-	{
-		// Username or realm too long. Can not be stored in DB.
-		EAP_TRACE_DEBUG_SYMBIAN((_L("CEapAkaUiDataConnection::Update: Too long username or realm. Length: UN=%d, Realm=%d\n"),
-			iDataPtr->GetManualUsername().Length(),
-			iDataPtr->GetManualRealm().Length()));
-		
-		return KErrArgument;
-	}
-    
-    TRAP(err, iView.SetColL(iColSet->ColNo(cf_str_EAP_AKA_manual_username_literal), iDataPtr->GetManualUsername()));
-	if (err != KErrNone)
-	{
-		return err;
-	}
-
-    TRAP(err, iView.SetColL(iColSet->ColNo(cf_str_EAP_AKA_manual_realm_literal), iDataPtr->GetManualRealm()));
-	if (err != KErrNone)
-	{
-		return err;
-	}
-
-    if (*(iDataPtr->GetUseManualUsername()))
-    {
-        TRAP(err, iView.SetColL(iColSet->ColNo(cf_str_EAP_AKA_use_manual_username_literal), EAKAUseManualUsernameYes));
-		if (err != KErrNone)
-		{
-			return err;
-		}
-    }
-    else
-    {
-        TRAP(err, iView.SetColL(iColSet->ColNo(cf_str_EAP_AKA_use_manual_username_literal), EAKAUseManualUsernameNo));
-		if (err != KErrNone)
-		{
-			return err;
-		}
-    }
-
-    if (*(iDataPtr->GetUseManualRealm()))
-    {
-        TRAP(err, iView.SetColL(iColSet->ColNo(cf_str_EAP_AKA_use_manual_realm_literal), EAKAUseManualRealmYes));
-		if (err != KErrNone)
-		{
-			return err;
-		}
-    }
-    else
-    {
-        TRAP(err, iView.SetColL(iColSet->ColNo(cf_str_EAP_AKA_use_manual_realm_literal), EAKAUseManualRealmNo));
-		if (err != KErrNone)
-		{
-			return err;
-		}
-    }
-
-	// Last full authentication time should be made zero when EAP configurations are modified.
-	// This makes sure that the next authentication with this EAP would be full authentication
-	// instead of reauthentication even if the session is still valid.
-	
-	TRAP(err, iView.SetColL(iColSet->ColNo(KAKALastFullAuthTime), default_FullAuthTime));
-    if (err != KErrNone)
-    {
-        return err;
-    }
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("Session Validity: Resetting Full Auth Time since EAP-AKA settings are modified\n")));
-
-    TRAP(err, iView.PutL());
-        
-    return err;
-}
-
-
-TInt CEapAkaUiDataConnection::Close()
-{
-    if (iIsOpened == EFalse)
-    {
-        return KErrNone;
-    }
-
-	delete iDataPtr;
-	iDataPtr = NULL;
-	
-	delete iColSet;
-	iColSet = NULL;
-
-    iView.Close();
-
-    iUiConn = NULL;
-    
-    return KErrNone;
-}
-
-
-void CEapAkaUiDataConnection::FetchDataL()
-{
-	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
-	TPtr sqlStatement = buf->Des();
-
-	// Form the query. Query everything.
-	_LIT(KSQLQuery, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLQuery,
-						&KAkaTableName,
-						&KServiceType,
-						iUiConn->GetIndexType(),
-						&KServiceIndex,
-						iUiConn->GetIndex(),
-						&KTunnelingType, 
-						iUiConn->GetTunnelingType());
-	// Evaluate view
-	User::LeaveIfError(iView.Prepare(iDatabase, TDbQuery(sqlStatement)));
-	User::LeaveIfError(iView.EvaluateAll());	
-	// Get the first (and only) row
-	iView.FirstL();
-	iView.GetL();				
-	// Get column set so we get the correct column numbers
-	delete iColSet;
-	iColSet = NULL;
-	iColSet = iView.ColSetL();
-
-	// Start fetching the values
-
-	// use manual username
-	TUint intValue = iView.ColUint(iColSet->ColNo(cf_str_EAP_AKA_use_manual_username_literal));
-    if (intValue == 0)
-    {
-        *(iDataPtr->GetUseManualUsername()) = EFalse;
-    }
-    else
-    {
-        *(iDataPtr->GetUseManualUsername()) = ETrue;
-    }
-
-	// use manual realm
-	intValue = iView.ColUint(iColSet->ColNo(cf_str_EAP_AKA_use_manual_realm_literal));
-    if (intValue == 0)
-    {
-        *(iDataPtr->GetUseManualRealm()) = EFalse;
-    }
-    else
-    {
-        *(iDataPtr->GetUseManualRealm()) = ETrue;
-    }
-
-    // manual username
-    iDataPtr->GetManualUsername().Copy(iView.ColDes16(iColSet->ColNo(cf_str_EAP_AKA_manual_username_literal)));
-
-	// manual realm
-	iDataPtr->GetManualRealm().Copy(iView.ColDes16(iColSet->ColNo(cf_str_EAP_AKA_manual_realm_literal)));
-
-    CleanupStack::PopAndDestroy(buf);
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/type/generic/symbian/plugin/inc/EapGeneric.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,231 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Class implements the generic EAP type interface.
+*
+*/
+
+/*
+* %version: 32 %
+*/
+
+#ifndef _EAP_GENERIC_H_
+#define _EAP_GENERIC_H_
+
+// INCLUDES
+#include <EapType.h>
+#include "eap_header.h"
+#include "eap_array.h"
+#include "abs_eap_plugin_message.h"
+#include "EapClientIf.h"
+
+// FORWARD DECLARATIONS
+class eap_am_network_id_c;
+class eap_method_settings_c;
+class abs_eap_am_tools_c;
+class eap_certificate_entry_c;
+class eap_plugin_message_base_c;
+
+
+enum eap_generic_wait_state_e
+{
+	eap_generic_wait_state_none,
+	eap_generic_wait_state_complete_get_configuration,
+	eap_generic_wait_state_complete_set_configuration,
+	eap_generic_wait_state_complete_delete_configuration,
+	eap_generic_wait_state_complete_copy_configuration,
+	eap_generic_wait_state_complete_get_type_info,
+	eap_generic_wait_state_complete_invoke_ui,
+	eap_generic_wait_state_complete_set_index,
+};
+
+const TUint KMaxStringLength = 64;
+
+// CLASS DECLARATION
+/**
+* Class implements the generic EAP type interface.
+*/
+class CEapGeneric
+: public CEapType
+, public abs_eap_plugin_message_c
+, public EapClientIf
+{
+public:		
+
+	/**
+	* Construction function. Called by ECom after the EAP generic plugin has been loaded.
+	* @param aIapInfo Pointer to the class that contains information about bearer type and unique index.
+	* @return Pointer to the instance.
+	*/
+	static CEapGeneric* NewL(SIapInfo* aIapInfo);	
+
+	/**
+	* Destructor does nothing.
+	*/
+	virtual ~CEapGeneric();
+	
+	/**
+	* Creates EAP protocol interface implementation. Instances an object that
+	* has been derived from eap_base_type_c that handles the communication 
+	* with EAP stack. 
+	* @param aTools Pointer to tools class.
+	* @param aPartner Used for callbacks to the stack.
+	* @param is_client_when_true Specifies whether the EAP type acts as a client or server.
+	* @param receive_network_id Network addresses
+	* @param eap_config_if Pointer used for call back to creater of stack (eapol_am_wlan_authentication_symbian_c class).
+	* @return Pointer to the implementation.
+	*/		
+	virtual eap_base_type_c* GetStackInterfaceL(abs_eap_am_tools_c* const aTools, 
+											   abs_eap_base_type_c* const aPartner,
+											   const bool is_client_when_true,
+											   const eap_am_network_id_c * const receive_network_id,
+											   abs_eap_configuration_if_c * const configuration_if);
+	
+
+
+	/**
+	* Gets information about EAP type. 
+	* @return Pointer to a class that contains the EAP type information. Also pushed to cleanup stack.
+	*/
+	CEapTypeInfo* GetInfoL();
+
+	/**
+	* Deletes EAP type configuration
+	*/	
+	void DeleteConfigurationL();
+
+	/**
+	* Returns the version of the interface that the EAP type implements.
+	* The client-side of the interface must always check the version with this function 
+	* and not call the functions that are not implemented. New functions must be
+	* added to the end of the interface so that the order of the old functions
+	* does not change.
+	* @return Integer indicating the version.
+	*/
+	TUint GetInterfaceVersion();
+
+	/**
+	* Sets the tunneling type. This is used to indicate that this type is run inside another 
+	* EAP type. 
+	* @param aTunnelingType Type number for the tunneling type
+	*/	
+	void SetTunnelingType(const TEapExpandedType aTunnelingType);
+
+	/**
+	* Changes the index of the saved parameters.
+	* @param aIndexType Indicates the bearer used for this connection.
+	* @param aIndex Index for the connection. aIndexType and aIndex uniquely specify the connection.
+	* @return Pointer to the implementation.
+	*/
+	void SetIndexL(
+		const TIndexType aIndexType, 
+		const TInt aIndex );
+		
+	/**
+	* Sets the EAP types configuration
+	* @param aSettings Structure containing the settings
+	*/
+	void SetConfigurationL(const EAPSettings& aSettings);
+
+	/**
+	* Gets the EAP types configuration
+	* @param aSettings Structure containing the settings
+	*/
+	void GetConfigurationL(EAPSettings& aSettings);
+
+	/**
+	* Copies the EAP types configuration
+	* @param aDestinationIndex ID to where copy the settings.
+	*/
+	void CopySettingsL(const TIndexType aDestinationIndexType, const TInt aDestinationIndex);
+
+	eap_status_e complete_get_configuration(
+		const eap_method_settings_c * const internal_settings);
+
+	eap_status_e complete_set_configuration(
+		const eap_status_e completion_status);
+
+	eap_status_e complete_delete_configuration(
+		const eap_status_e completion_status);
+
+	eap_status_e complete_copy_configuration(
+		const eap_status_e completion_status);
+
+	eap_status_e complete_set_index(
+		const eap_status_e completion_status);
+
+	eap_status_e complete_get_type_info(
+		const eap_method_settings_c * const internal_settings);
+
+	eap_status_e complete_invoke_ui(
+		const eap_method_settings_c * const internal_settings);
+
+protected:
+
+	/**
+	* Constructor initialises member variables.
+	*/
+	CEapGeneric(
+		const TIndexType aIndexType,
+		const TInt aIndex,
+		const TEapExpandedType aEapType);
+
+	void ConstructL();
+
+private:
+
+	void Activate();
+
+	void Complete();
+
+	void WaitCompletion();
+
+	void SetCompletionStatusIfStillOk(const eap_status_e status);
+
+	/// This is pointer to the tools class.
+	abs_eap_am_tools_c * const m_am_tools;
+
+	eap_plugin_message_base_c * const m_server;
+
+	CActiveSchedulerWait iWait;
+
+	// Bearer type
+	TIndexType iIndexType;
+
+	// Unique index
+	TInt iIndex;
+
+	TEapExpandedType iEapType;
+
+	// Tunneling type
+	eap_type_value_e iTunnelingType;
+	bool iTunnelingTypePresent;
+
+	eap_generic_wait_state_e iWaitState;
+
+	eap_status_e iCompletionStatus;
+
+	TRequestStatus iAsyncronousStatus;
+
+
+
+	TBuf<KMaxStringLength> iReleaseDate;
+	TBuf<KMaxStringLength> iEapTypeVersion;
+	TBuf<KMaxStringLength> iManufacturer;
+
+	EAPSettings * ipEAPSettings;
+};
+
+#endif // _EAP_GENERIC_H_
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/type/generic/symbian/plugin/src/EapGeneric.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,1170 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 53 %
+*/
+
+// This is enumeration of EAPOL source code.
+#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
+	#undef EAP_FILE_NUMBER_ENUM
+	#define EAP_FILE_NUMBER_ENUM 605 
+	#undef EAP_FILE_NUMBER_DATE 
+	#define EAP_FILE_NUMBER_DATE 1127594498 
+#endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
+
+
+// INCLUDE FILES
+
+#include "EapGeneric.h"
+#include "EapConversion.h"
+#include "eap_base_type.h"
+#include "eap_method_settings.h"
+#include "eap_am_assert.h"
+#include <EapTypeInfo.h>
+#include "abs_eap_am_tools.h"
+#include "eap_automatic_variable.h"
+#include <utf.h>                           // for CnvUtfConverter
+#include "abs_eap_plugin_message.h"
+#include "eap_plugin_message_base.h"
+#include "abs_eap_am_message_if.h"
+#include "eap_am_message_if.h"
+#include "eap_automatic_variable.h"
+#include "eap_plugin_client_message_if.h"
+#include "eap_am_message_if_symbian.h"
+#include "EapTraceSymbian.h"
+
+// LOCAL CONSTANTS
+
+// The version number of this interface.
+const TUint KInterfaceVersion = 1;
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+
+CEapGeneric::CEapGeneric(
+	const TIndexType aIndexType,	
+	const TInt aIndex,
+	const TEapExpandedType aEapType)
+: m_am_tools(abs_eap_am_tools_c::new_abs_eap_am_tools_c())
+, m_server(eap_plugin_message_base_c::new_eap_plugin_client_message_if_c(
+		m_am_tools,
+		this))
+, iIndexType(aIndexType)
+, iIndex(aIndex)
+, iEapType(aEapType)
+, iTunnelingType(eap_type_none)
+, iTunnelingTypePresent(false)
+, iWaitState(eap_generic_wait_state_none)
+, iCompletionStatus(eap_status_process_general_error)
+
+, ipEAPSettings(0)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneric::CEapGeneric(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneric::CEapGeneric()");
+}
+
+// ----------------------------------------------------------
+
+void CEapGeneric::ConstructL()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneric::ConstructL(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneric::ConstructL()");
+
+	if (m_am_tools == 0
+		|| m_am_tools->get_is_valid() == false
+		|| m_server == 0
+		|| m_server->get_is_valid() == false)
+	{
+		abs_eap_am_tools_c::delete_abs_eap_am_tools_c(m_am_tools);
+		delete m_server;
+
+		User::Leave(KErrNoMemory);
+	}
+
+	eap_status_e status = m_server->configure();
+	if (status != eap_status_ok)
+	{
+		abs_eap_am_tools_c::delete_abs_eap_am_tools_c(m_am_tools);
+		delete m_server;
+
+		User::Leave(KErrNoMemory);
+	}
+}
+
+// ----------------------------------------------------------
+
+CEapGeneric* CEapGeneric::NewL(SIapInfo *aIapInfo)
+{
+	CEapGeneric* self = new(ELeave) CEapGeneric(aIapInfo->indexType, aIapInfo->index, aIapInfo->aEapType);
+
+	CleanupStack::PushL(self);
+
+	self->ConstructL();
+
+	CleanupStack::Pop();
+
+	return self;
+}
+
+// ----------------------------------------------------------
+
+CEapGeneric::~CEapGeneric()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneric::~CEapGeneric(): this=0x%08x.\n"),
+		this));
+
+	// Do not use m_am_tools, because it will be destroyed before return.
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapGeneric::~CEapGeneric()"));
+
+	if (m_server != 0)
+	{
+		m_server->shutdown();
+	}
+	delete m_server;
+
+	abs_eap_am_tools_c::delete_abs_eap_am_tools_c(m_am_tools);
+}
+
+// ----------------------------------------------------------
+
+#ifdef USE_EAP_SIMPLE_CONFIG
+
+eap_base_type_c* CEapGeneric::GetStackInterfaceL(abs_eap_am_tools_c* const aTools, 
+											   abs_eap_base_type_c* const aPartner,
+											   const bool is_client_when_true,
+											   const eap_am_network_id_c * const receive_network_id,
+											   abs_eap_configuration_if_c * const /*configuration_if*/)
+	
+#else
+	
+eap_base_type_c* CEapGeneric::GetStackInterfaceL(abs_eap_am_tools_c* const aTools, 
+											abs_eap_base_type_c* const aPartner,
+											const bool is_client_when_true,
+											const eap_am_network_id_c * const receive_network_id)
+	
+#endif // #ifdef USE_EAP_SIMPLE_CONFIG
+{
+	// This class does not have stack interface.
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("ERROR: CEapGeneric::GetStackInterfaceL(): this=0x%08x\n"),
+		this));
+
+	EAP_ASSERT_ANYWAY_TOOLS(aTools);
+
+	return 0;
+}
+
+//----------------------------------------------------------------
+
+void CEapGeneric::Activate()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneric::Activate(): iAsyncronousStatus=%u\n"),
+		iAsyncronousStatus.Int()));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneric::Activate()");
+
+	iAsyncronousStatus = KRequestPending;
+}
+
+//----------------------------------------------------------------
+
+void CEapGeneric::Complete()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneric::Complete(): iAsyncronousStatus=%u\n"),
+		iAsyncronousStatus.Int()));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneric::Complete()");
+
+	iAsyncronousStatus = KErrNone;
+
+	// This is needed to continue the execution after Wait.Start(); 
+	iWait.AsyncStop();
+}
+
+//----------------------------------------------------------------
+
+void CEapGeneric::WaitCompletion()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneric::WaitCompletion(): iAsyncronousStatus=%u\n"),
+		iAsyncronousStatus.Int()));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneric::WaitCompletion()");
+
+	while (iAsyncronousStatus == KRequestPending)
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CEapGeneric::WaitCompletion(): calls iWait.Start()\n")));
+
+		iWait.Start();
+
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CEapGeneric::WaitCompletion(): iWait.Start() continue, iAsyncronousStatus=%u\n"),
+			iAsyncronousStatus.Int()));
+	}
+}
+
+// ----------------------------------------------------------
+
+void CEapGeneric::SetCompletionStatusIfStillOk(const eap_status_e status)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneric::SetCompletionStatusIfStillOk(): iCompletionStatus=%u=%s, status=%d=%s\n"),
+		iCompletionStatus,
+		eap_status_string_c::get_status_string(iCompletionStatus),
+		status,
+		eap_status_string_c::get_status_string(status)));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneric::SetCompletionStatusIfStillOk()");
+
+	if (iCompletionStatus == eap_status_ok)
+	{
+		iCompletionStatus = status;
+	}
+}
+
+// ----------------------------------------------------------
+
+
+
+// ----------------------------------------------------------
+
+CEapTypeInfo* CEapGeneric::GetInfoL()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneric::GetInfoL(): this=0x%08x\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneric::GetInfoL()");
+
+	eap_method_settings_c * const internal_settings = new eap_method_settings_c(m_am_tools);
+	if (internal_settings == 0)
+	{
+		User::Leave(m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error)));
+	}
+
+	iCompletionStatus = eap_status_process_general_error;
+
+	eap_status_e status = m_server->get_type_info(internal_settings);
+
+	delete internal_settings;
+
+	if (status != eap_status_ok)
+	{
+		User::Leave(m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, status)));
+	}
+
+	iWaitState = eap_generic_wait_state_complete_get_type_info;
+    Activate();
+    WaitCompletion();
+
+	if (iCompletionStatus != eap_status_ok)
+	{
+		User::Leave(m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, iCompletionStatus)));
+	}
+
+	CEapTypeInfo* info = new(ELeave) CEapTypeInfo(
+		iReleaseDate, 
+		iEapTypeVersion,
+		iManufacturer);
+
+	return info;
+}
+
+// ----------------------------------------------------------
+
+void CEapGeneric::DeleteConfigurationL()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneric::DeleteConfigurationL(): this=0x%08x\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneric::DeleteConfigurationL()");
+
+	eap_method_settings_c * const internal_settings = new eap_method_settings_c(m_am_tools);
+	if (internal_settings == 0)
+	{
+		User::Leave(m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error)));
+	}
+	
+	CleanupStack::PushL(internal_settings);
+ 	
+	internal_settings->m_IndexType = iIndexType;
+	internal_settings->m_Index = iIndex;
+
+	TInt error =  CEapConversion::ConvertExpandedEAPTypeToInternalType(
+		&iEapType,
+		&(internal_settings->m_EAPType));
+	if (error != KErrNone)
+	{
+		(void)EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(error));
+		User::Leave(error);
+	}
+	iCompletionStatus = eap_status_process_general_error;
+
+	eap_status_e status = m_server->delete_configuration(internal_settings);
+
+	CleanupStack::PopAndDestroy(internal_settings);
+
+	if (status != eap_status_ok)
+	{
+		User::Leave(m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, status)));
+	}
+
+	iWaitState = eap_generic_wait_state_complete_delete_configuration;
+    Activate();
+    WaitCompletion();
+
+	if (iCompletionStatus != eap_status_ok)
+	{
+		User::Leave(m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, iCompletionStatus)));
+	}
+}
+
+// ----------------------------------------------------------
+
+TUint CEapGeneric::GetInterfaceVersion()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneric::GetInterfaceVersion(): this=0x%08x\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneric::GetInterfaceVersion()");
+
+	return KInterfaceVersion;
+}
+
+// ----------------------------------------------------------
+
+void CEapGeneric::SetTunnelingType(const TEapExpandedType aTunnelingType)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneric::SetTunnelingType(): this=0x%08x\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneric::SetTunnelingType()");
+
+    EAP_TRACE_DATA_DEBUG_SYMBIAN(
+        (EAPL("CEapGeneric::SetTunnelingType - tunneling type"),
+        aTunnelingType.GetValue().Ptr(), aTunnelingType.GetValue().Length()));
+
+    iTunnelingTypePresent = true;
+
+	eap_type_value_e aInternalType;
+
+	TInt error = CEapConversion::ConvertExpandedEAPTypeToInternalType(
+	        &aTunnelingType,
+	        &aInternalType);
+	if (error != KErrNone)
+	{
+		(void)EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(error));
+	}
+
+	iTunnelingType = aInternalType;
+	
+}
+
+
+// ----------------------------------------------------------
+
+void CEapGeneric::SetIndexL(
+		const TIndexType aIndexType, 
+		const TInt aIndex )
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneric::SetIndexL(): this=0x%08x\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneric::SetIndexL()");
+
+	eap_method_settings_c * const internal_settings = new eap_method_settings_c(m_am_tools);
+	if (internal_settings == 0)
+	{
+		User::Leave(m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error)));
+	}
+	
+  CleanupStack::PushL(internal_settings);
+	internal_settings->m_IndexType = aIndexType;
+	internal_settings->m_Index = aIndex;
+
+	TInt error =  CEapConversion::ConvertExpandedEAPTypeToInternalType(
+		&iEapType,
+		&(internal_settings->m_EAPType));
+	if (error != KErrNone)
+	{
+		(void)EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(error));
+		User::Leave(error);
+	}
+
+	iCompletionStatus = eap_status_process_general_error;
+
+	eap_status_e status = m_server->delete_configuration(internal_settings);
+
+	if (status != eap_status_ok)
+	{
+		 CleanupStack::PopAndDestroy(internal_settings);
+
+		User::Leave(m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, status)));
+	}
+
+	iWaitState = eap_generic_wait_state_complete_delete_configuration;
+	Activate();
+	WaitCompletion();
+
+	if (iCompletionStatus != eap_status_ok)
+	{
+		User::Leave(m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, iCompletionStatus)));
+	}
+
+	internal_settings->m_IndexType = iIndexType;
+	internal_settings->m_Index = iIndex;
+
+	error =  CEapConversion::ConvertExpandedEAPTypeToInternalType(
+		&iEapType,
+		&(internal_settings->m_EAPType));
+	if (error != KErrNone)
+	{
+		(void)EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(error));
+		User::Leave(error);
+	}
+
+	internal_settings->m_TunnelingTypePresent = iTunnelingTypePresent;
+	internal_settings->m_TunnelingType = iTunnelingType;
+
+	internal_settings->m_DestinationIndexAndTypePresent = true;
+	internal_settings->m_DestinationIndexType = aIndexType;
+	internal_settings->m_DestinationIndex = aIndex;
+
+	iCompletionStatus = eap_status_process_general_error;
+
+	status = m_server->set_index(internal_settings);
+
+	CleanupStack::PopAndDestroy(internal_settings);
+
+	if (status != eap_status_ok)
+	{
+		User::Leave(m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, status)));
+	}
+
+	iWaitState = eap_generic_wait_state_complete_set_index;
+    Activate();
+    WaitCompletion();
+
+	if (iCompletionStatus != eap_status_ok)
+	{
+		User::Leave(m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, iCompletionStatus)));
+	}
+
+}
+
+// ----------------------------------------------------------
+
+void CEapGeneric::SetConfigurationL(const EAPSettings& aSettings)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneric::SetConfigurationL(): this=0x%08x\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneric::SetConfigurationL()");
+
+	eap_method_settings_c * const internal_settings = new eap_method_settings_c(m_am_tools);
+	if (internal_settings == 0)
+	{
+		User::Leave(m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error)));
+	}
+
+	CleanupStack::PushL(internal_settings);
+
+	eap_status_e status(eap_status_process_general_error);
+
+	TInt error(KErrNone);
+
+	error = CEapConversion::ConvertEAPSettingsToInternalType(
+		m_am_tools,
+		&aSettings,
+		internal_settings);
+	if(error == KErrNone)
+	{
+		internal_settings->m_IndexType = iIndexType;
+		internal_settings->m_Index = iIndex;
+
+		TInt error =  CEapConversion::ConvertExpandedEAPTypeToInternalType(
+			&iEapType,
+			&(internal_settings->m_EAPType));
+		if (error != KErrNone)
+		{
+			CleanupStack::PopAndDestroy(internal_settings);
+			(void)EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(error));
+			User::Leave(error);
+		}
+
+		internal_settings->m_TunnelingTypePresent = iTunnelingTypePresent;
+		internal_settings->m_TunnelingType = iTunnelingType;
+
+		iCompletionStatus = eap_status_process_general_error;
+
+		status = m_server->set_configuration(internal_settings);
+	}
+	else
+	{
+		status = m_am_tools->convert_am_error_to_eapol_error(error);
+	}
+
+	CleanupStack::PopAndDestroy(internal_settings);
+
+	if (status != eap_status_ok)
+	{
+		User::Leave(m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, status)));
+	}
+
+	iWaitState = eap_generic_wait_state_complete_set_configuration;
+    Activate();
+    WaitCompletion();
+
+	if (iCompletionStatus != eap_status_ok)
+	{
+		User::Leave(m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, iCompletionStatus)));
+	}
+}
+
+// ----------------------------------------------------------
+
+void CEapGeneric::GetConfigurationL(EAPSettings& aSettings)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneric::GetConfigurationL(): this=0x%08x\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneric::GetConfigurationL()");
+
+	eap_method_settings_c * const internal_settings = new eap_method_settings_c(m_am_tools);
+	if (internal_settings == 0)
+	{
+		User::Leave(m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error)));
+	}
+  CleanupStack::PushL(internal_settings);
+
+	internal_settings->m_IndexType = iIndexType;
+	internal_settings->m_Index = iIndex;
+
+	TInt error =  CEapConversion::ConvertExpandedEAPTypeToInternalType(
+		&iEapType,
+		&(internal_settings->m_EAPType));
+	if (error != KErrNone)
+	{
+		CleanupStack::PopAndDestroy(internal_settings);
+		(void)EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(error));
+		User::Leave(error);
+	}
+
+	internal_settings->m_TunnelingTypePresent = iTunnelingTypePresent;
+	internal_settings->m_TunnelingType = iTunnelingType;
+
+	ipEAPSettings = &aSettings;
+
+	iCompletionStatus = eap_status_process_general_error;
+
+	eap_status_e status = m_server->get_configuration(internal_settings);
+
+	CleanupStack::PopAndDestroy(internal_settings);
+
+	if (status != eap_status_ok)
+	{
+		User::Leave(m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, status)));
+	}
+
+	iWaitState = eap_generic_wait_state_complete_get_configuration;
+    Activate();
+    WaitCompletion();
+
+	if (iCompletionStatus != eap_status_ok)
+	{
+		User::Leave(m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, iCompletionStatus)));
+	}
+}
+
+// ----------------------------------------------------------
+
+void CEapGeneric::CopySettingsL(
+	const TIndexType aDestinationIndexType,
+	const TInt aDestinationIndex)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneric::CopySettingsL(): this=0x%08x\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneric::CopySettingsL()");
+
+	eap_method_settings_c * const internal_settings = new eap_method_settings_c(m_am_tools);
+	if (internal_settings == 0)
+	{
+		User::Leave(m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error)));
+	}
+
+	internal_settings->m_IndexType = aDestinationIndexType;
+	internal_settings->m_Index = aDestinationIndex;
+
+	iCompletionStatus = eap_status_process_general_error;
+
+	eap_status_e status = m_server->delete_configuration(internal_settings);
+
+	if (status != eap_status_ok)
+	{
+		delete internal_settings;
+
+		User::Leave(m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, status)));
+	}
+
+	iWaitState = eap_generic_wait_state_complete_delete_configuration;
+    Activate();
+    WaitCompletion();
+
+	if (iCompletionStatus != eap_status_ok)
+	{
+		delete internal_settings;
+
+		User::Leave(m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, iCompletionStatus)));
+	}
+
+	internal_settings->m_IndexType = iIndexType;
+	internal_settings->m_Index = iIndex;
+
+	TInt error =  CEapConversion::ConvertExpandedEAPTypeToInternalType(
+		&iEapType,
+		&(internal_settings->m_EAPType));
+	if (error != KErrNone)
+	{
+		(void)EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(error));
+		User::Leave(error);
+	}
+
+	internal_settings->m_TunnelingTypePresent = iTunnelingTypePresent;
+	internal_settings->m_TunnelingType = iTunnelingType;
+
+	internal_settings->m_DestinationIndexAndTypePresent = true;
+	internal_settings->m_DestinationIndexType = aDestinationIndexType;
+	internal_settings->m_DestinationIndex = aDestinationIndex;
+
+	iCompletionStatus = eap_status_process_general_error;
+
+	status = m_server->copy_configuration(internal_settings);
+
+	delete internal_settings;
+
+	if (status != eap_status_ok)
+	{
+		User::Leave(m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, status)));
+	}
+
+	iWaitState = eap_generic_wait_state_complete_copy_configuration;
+    Activate();
+    WaitCompletion();
+
+	if (iCompletionStatus != eap_status_ok)
+	{
+		User::Leave(m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, iCompletionStatus)));
+	}
+}
+
+// ----------------------------------------------------------
+
+eap_status_e CEapGeneric::complete_get_configuration(
+	const eap_method_settings_c * const internal_settings)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneric::complete_get_configuration(): this=0x%08x, iWaitState=%d, status=%d=%s\n"),
+		this,
+		iWaitState,
+		internal_settings->m_completion_status,
+		eap_status_string_c::get_status_string(internal_settings->m_completion_status)));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneric::complete_get_configuration()");
+
+	if (internal_settings == 0)
+	{
+		iCompletionStatus = eap_status_illegal_parameter;
+
+		Complete();
+
+		return EAP_STATUS_RETURN(m_am_tools, iCompletionStatus);
+	}
+
+	iCompletionStatus = internal_settings->m_completion_status;
+
+	if (iWaitState == eap_generic_wait_state_complete_get_configuration
+		&& iCompletionStatus == eap_status_ok)
+	{
+		if (ipEAPSettings != 0
+			&& internal_settings != 0)
+		{
+			TInt error(KErrNone);
+
+			error = CEapConversion::ConvertInternalTypeToEAPSettings(
+				m_am_tools,
+				internal_settings,
+				ipEAPSettings);
+			if(error != KErrNone)
+			{
+				SetCompletionStatusIfStillOk(EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(error)));
+			}
+		}
+		else
+		{
+			SetCompletionStatusIfStillOk(EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter));
+		}
+	}
+	else if (iCompletionStatus == eap_status_ok)
+	{
+		// ERROR wrong state.
+		SetCompletionStatusIfStillOk(EAP_STATUS_RETURN(m_am_tools, eap_status_wrong_eap_type_state));
+	}
+
+	Complete();
+
+	return EAP_STATUS_RETURN(m_am_tools, iCompletionStatus);
+}
+
+// ----------------------------------------------------------
+
+eap_status_e CEapGeneric::complete_set_configuration(
+	const eap_status_e completion_status)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneric::complete_set_configuration(): this=0x%08x, iWaitState=%d, status=%d=%s\n"),
+		this,
+		iWaitState,
+		completion_status,
+		eap_status_string_c::get_status_string(completion_status)));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneric::complete_set_configuration()");
+
+	iCompletionStatus = completion_status;
+
+	if (iWaitState != eap_generic_wait_state_complete_set_configuration
+		&& iCompletionStatus == eap_status_ok)
+	{
+		// ERROR wrong state.
+		SetCompletionStatusIfStillOk(EAP_STATUS_RETURN(m_am_tools, eap_status_wrong_eap_type_state));
+	}
+
+	Complete();
+
+	return EAP_STATUS_RETURN(m_am_tools, completion_status);
+}
+
+// ----------------------------------------------------------
+
+eap_status_e CEapGeneric::complete_delete_configuration(
+	const eap_status_e completion_status)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneric::complete_delete_configuration(): this=0x%08x, iWaitState=%d, status=%d=%s\n"),
+		this,
+		iWaitState,
+		completion_status,
+		eap_status_string_c::get_status_string(completion_status)));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneric::complete_delete_configuration()");
+
+	iCompletionStatus = completion_status;
+
+	if (iWaitState != eap_generic_wait_state_complete_delete_configuration
+		&& iCompletionStatus == eap_status_ok)
+	{
+		// ERROR wrong state.
+		SetCompletionStatusIfStillOk(EAP_STATUS_RETURN(m_am_tools, eap_status_wrong_eap_type_state));
+	}
+
+	Complete();
+
+	return EAP_STATUS_RETURN(m_am_tools, completion_status);
+}
+
+// ----------------------------------------------------------
+
+eap_status_e CEapGeneric::complete_copy_configuration(
+	const eap_status_e completion_status)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneric::complete_copy_configuration(): this=0x%08x, iWaitState=%d, status=%d=%s\n"),
+		this,
+		iWaitState,
+		completion_status,
+		eap_status_string_c::get_status_string(completion_status)));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneric::complete_copy_configuration()");
+
+	iCompletionStatus = completion_status;
+
+	if (iWaitState != eap_generic_wait_state_complete_copy_configuration
+		&& iCompletionStatus == eap_status_ok)
+	{
+		// ERROR wrong state.
+		SetCompletionStatusIfStillOk(EAP_STATUS_RETURN(m_am_tools, eap_status_wrong_eap_type_state));
+	}
+
+	Complete();
+
+	return EAP_STATUS_RETURN(m_am_tools, completion_status);
+}
+
+// ----------------------------------------------------------
+
+eap_status_e CEapGeneric::complete_set_index(
+	const eap_status_e completion_status)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneric::complete_set_index(): this=0x%08x, iWaitState=%d, status=%d=%s\n"),
+		this,
+		iWaitState,
+		completion_status,
+		eap_status_string_c::get_status_string(completion_status)));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneric::complete_set_index()");
+
+	iCompletionStatus = completion_status;
+
+	if (iWaitState != eap_generic_wait_state_complete_set_index
+		&& iCompletionStatus == eap_status_ok)
+	{
+		// ERROR wrong state.
+		SetCompletionStatusIfStillOk(EAP_STATUS_RETURN(m_am_tools, eap_status_wrong_eap_type_state));
+	}
+
+	Complete();
+
+	return EAP_STATUS_RETURN(m_am_tools, completion_status);
+}
+
+// ----------------------------------------------------------
+
+eap_status_e CEapGeneric::complete_get_type_info(
+	const eap_method_settings_c * const internal_settings)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneric::complete_get_type_info(): this=0x%08x, iWaitState=%d, status=%d=%s\n"),
+		this,
+		iWaitState,
+		internal_settings->m_completion_status,
+		eap_status_string_c::get_status_string(internal_settings->m_completion_status)));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneric::complete_get_type_info()");
+
+	if (internal_settings == 0)
+	{
+		iCompletionStatus = eap_status_illegal_parameter;
+
+		Complete();
+
+		return EAP_STATUS_RETURN(m_am_tools, iCompletionStatus);
+	}
+
+	iCompletionStatus = internal_settings->m_completion_status;
+
+	if (iWaitState == eap_generic_wait_state_complete_get_type_info
+		&& iCompletionStatus == eap_status_ok)
+	{
+		if (internal_settings != 0
+			&& internal_settings->m_MethodInfoPresent == true)
+		{
+			TInt error(KErrNone);
+
+			error = CEapConversion::ConvertFromInternalToBuf16(
+				m_am_tools,
+				&(internal_settings->m_KReleaseDate),
+				&iReleaseDate);
+
+			if(error == KErrNone)
+			{
+				error = CEapConversion::ConvertFromInternalToBuf16(
+					m_am_tools,
+					&(internal_settings->m_KEapTypeVersion),
+					&iEapTypeVersion);
+			}
+
+			if(error == KErrNone)
+			{
+				error = CEapConversion::ConvertFromInternalToBuf16(
+					m_am_tools,
+					&(internal_settings->m_KManufacturer),
+					&iManufacturer);
+			}
+
+			if(error != KErrNone)
+			{
+				SetCompletionStatusIfStillOk(EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(error)));
+			}
+		}
+		else
+		{
+			SetCompletionStatusIfStillOk(EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter));
+		}
+	}
+	else if (iCompletionStatus == eap_status_ok)
+	{
+		// ERROR wrong state.
+		SetCompletionStatusIfStillOk(EAP_STATUS_RETURN(m_am_tools, eap_status_wrong_eap_type_state));
+	}
+
+	Complete();
+
+	return EAP_STATUS_RETURN(m_am_tools, iCompletionStatus);
+}
+
+// ----------------------------------------------------------
+
+eap_status_e CEapGeneric::complete_invoke_ui(
+	const eap_method_settings_c * const internal_settings)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneric::complete_invoke_ui(): this=0x%08x, iWaitState=%d, status=%d=%s\n"),
+		this,
+		iWaitState,
+		internal_settings->m_completion_status,
+		eap_status_string_c::get_status_string(internal_settings->m_completion_status)));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneric::complete_invoke_ui()");
+
+	if (internal_settings == 0)
+	{
+		iCompletionStatus = eap_status_illegal_parameter;
+
+		Complete();
+
+		return EAP_STATUS_RETURN(m_am_tools, iCompletionStatus);
+	}
+
+	iCompletionStatus = internal_settings->m_completion_status;
+
+	if (iWaitState == eap_generic_wait_state_complete_invoke_ui
+		&& iCompletionStatus == eap_status_ok)
+	{
+		if (internal_settings != 0
+			&& internal_settings->m_ButtonIdPresent == true)
+		{
+
+		}
+		else
+		{
+			SetCompletionStatusIfStillOk(EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter));
+		}
+	}
+	else if (iCompletionStatus == eap_status_ok)
+	{
+		// ERROR wrong state.
+		SetCompletionStatusIfStillOk(EAP_STATUS_RETURN(m_am_tools, eap_status_wrong_eap_type_state));
+	}
+
+	Complete();
+
+	return EAP_STATUS_RETURN(m_am_tools, iCompletionStatus);
+}
+
+
+//--------------------------------------------------
+//--------------------------------------------------
+//--------------------------------------------------
+
+eap_am_message_if_c * eap_am_message_if_c::new_eap_am_message_if_c(
+	abs_eap_am_tools_c * const tools)
+{
+	EAP_TRACE_DEBUG(
+		tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_message_if_c::new_eap_am_server_general_settings_c()\n")));
+
+	EAP_TRACE_RETURN_STRING(tools, "returns: eap_am_message_if_c::new_eap_am_message_if_c()");
+
+    eap_am_message_if_c *client_if = new eap_am_message_if_symbian_c(tools, EEapPluginNew);
+
+	eap_automatic_variable_c<eap_am_message_if_c> automatic_client_if(
+		tools,
+		client_if);
+
+	if (client_if == 0
+		|| client_if->get_is_valid() == false)
+	{
+		// ERROR.
+		if (client_if != 0)
+		{
+			EAP_TRACE_DEBUG(
+				tools,
+				TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+				(EAPL("ERROR: calls: eap_am_message_if_c::new_eap_am_server_general_settings_c(): client_if->shutdown()\n")));
+
+			client_if->shutdown();
+		}
+		return 0;
+	}
+
+	automatic_client_if.do_not_free_variable();
+
+	return client_if;
+
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_plugin_message_base_c * eap_plugin_message_base_c::new_eap_plugin_client_message_if_c(
+	abs_eap_am_tools_c * const tools,
+	abs_eap_plugin_message_c * const partner)
+{
+	EAP_TRACE_DEBUG(
+		tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_plugin_message_base_c::new_eap_plugin_client_message_if_c()\n")));
+
+	EAP_TRACE_RETURN_STRING(tools, "returns: eap_plugin_message_base_c::new_eap_plugin_client_message_if_c()");
+
+	eap_am_message_if_c *client_if = eap_am_message_if_c::new_eap_am_message_if_c(
+		tools);
+
+	eap_automatic_variable_c<eap_am_message_if_c> automatic_client_if(
+		tools,
+		client_if);
+
+	if (client_if == 0
+		|| client_if->get_is_valid() == false)
+	{
+		// ERROR.
+		if (client_if != 0)
+		{
+			EAP_TRACE_DEBUG(
+				tools,
+				TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+				(EAPL("ERROR: calls: eap_plugin_message_base_c::new_eap_plugin_client_message_if_c(): client_if->shutdown()\n")));
+
+			(void) client_if->shutdown();
+		}
+		return 0;
+	}
+
+	eap_plugin_client_message_if_c * new_session_core = new eap_plugin_client_message_if_c(tools, client_if, partner);
+
+	eap_automatic_variable_c<eap_plugin_client_message_if_c> automatic_new_session_core(
+		tools,
+		new_session_core);
+
+	if (new_session_core == 0
+		|| new_session_core->get_is_valid() == false)
+	{
+		// ERROR.
+		if (new_session_core != 0)
+		{
+			EAP_TRACE_DEBUG(
+				tools,
+				TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+				(EAPL("ERROR: calls: eap_plugin_message_base_c::new_eap_plugin_client_message_if_c(): new_session_core->shutdown()\n")));
+
+			new_session_core->shutdown();
+		}
+		return 0;
+	}
+
+	client_if->set_partner(new_session_core);
+
+	automatic_client_if.do_not_free_variable();
+	automatic_new_session_core.do_not_free_variable();
+
+	return new_session_core;
+}
+
+// ----------------------------------------------------------
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/type/generic/symbian/plugin/src/EapGenericProxy.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,51 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 6 %
+*/
+
+// This is enumeration of EAPOL source code.
+#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
+	#undef EAP_FILE_NUMBER_ENUM
+	#define EAP_FILE_NUMBER_ENUM 606 
+	#undef EAP_FILE_NUMBER_DATE 
+	#define EAP_FILE_NUMBER_DATE 1127594498 
+#endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
+
+
+// INCLUDE FILES
+#include "EapGeneric.h"
+#include <e32base.h>
+#include <ecom/implementationproxy.h>
+#include "EapolUID.h"
+
+const TImplementationProxy ImplementationTable[] = 
+{
+	{{EAP_GENERIC_IMPLEMENTATION_UID}, reinterpret_cast<TProxyNewLPtr> (CEapGeneric::NewL)}
+};
+
+// ================= OTHER EXPORTED FUNCTIONS ==============
+
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
+{
+	aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
+
+	return ImplementationTable;
+}
+
+// End of file
--- a/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/EapSimInterface.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/EapSimInterface.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 15 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/eap_am_type_gsmsim_symbian.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/eap_am_type_gsmsim_symbian.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 50 %
+* %version: 47.1.6 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -39,7 +39,7 @@
 #include "EapSimDbDefaults.h"
 #include "EapSimDbParameterNames.h"
 #include "EapSimDbUtils.h"
-#include "eap_am_trace_symbian.h"
+#include "EapTraceSymbian.h"
 
 #include <d32dbms.h>	// For DBMS
 #include <s32strm.h> 	// For RReadStream
@@ -108,16 +108,6 @@
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	m_tunneling_vendor_type = m_tunneling_type.get_vendor_type();
-
-#else
-
-	m_tunneling_vendor_type = static_cast<TUint>(m_tunneling_type);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
 	if (receive_network_id != 0
 		&& receive_network_id->get_is_valid_data() == true)
 	{
@@ -290,9 +280,22 @@
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
-	_LIT(KSQLInsert, "SELECT %S, %S, %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLInsert, &KXKey, &KK_aut, &KK_encr, &KReauthCounter, &KSimTableName, 
-		&KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+	_LIT(KSQLInsert, "SELECT %S, %S, %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	sqlStatement.Format(
+		KSQLInsert,
+		&KXKey,
+		&KK_aut,
+		&KK_encr,
+		&KReauthCounter,
+		&KSimTableName, 
+		&KServiceType,
+		m_index_type,
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType, 
+		m_tunneling_type.get_vendor_type());
 		
 	// Evaluate view
 	RDbView view;
@@ -427,9 +430,22 @@
 	TPtr sqlStatement = buf->Des();
 
 	// Form the query
-	_LIT(KSQLQuery, "SELECT %S, %S, %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLQuery, &KXKey, &KK_aut, &KK_encr, &KReauthCounter, &KSimTableName, 
-		&KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+	_LIT(KSQLQuery, "SELECT %S, %S, %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	sqlStatement.Format(
+		KSQLQuery,
+		&KXKey,
+		&KK_aut,
+		&KK_encr,
+		&KReauthCounter,
+		&KSimTableName,
+		&KServiceType,
+		m_index_type,
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType, 
+		m_tunneling_type.get_vendor_type());
 		
 	RDbView view;
 	// Evaluate view
@@ -533,9 +549,19 @@
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
-	_LIT(KSQLInsert, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLInsert, &KReauthCounter, &KSimTableName, 
-		&KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+	_LIT(KSQLInsert, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	sqlStatement.Format(
+		KSQLInsert,
+		&KReauthCounter,
+		&KSimTableName, 
+		&KServiceType,
+		m_index_type,
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType, 
+		m_tunneling_type.get_vendor_type());
 		
 	// Evaluate view
 	RDbView view;
@@ -904,9 +930,19 @@
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
-	_LIT(KSQLInsert, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLInsert, &KPseudonymId, &KSimTableName, 
-		&KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+	_LIT(KSQLInsert, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	sqlStatement.Format(
+		KSQLInsert,
+		&KPseudonymId,
+		&KSimTableName, 
+		&KServiceType,
+		m_index_type,
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType, 
+		m_tunneling_type.get_vendor_type());
 
 	// Evaluate view
 	RDbView view;
@@ -1001,9 +1037,19 @@
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
-	_LIT(KSQLInsert, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLInsert, &KReauthId, &KSimTableName, 
-		&KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+	_LIT(KSQLInsert, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	sqlStatement.Format(
+		KSQLInsert,
+		&KReauthId,
+		&KSimTableName, 
+		&KServiceType,
+		m_index_type,
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType, 
+		m_tunneling_type.get_vendor_type());
 		
 	// Evaluate view
 	RDbView view;
@@ -1093,9 +1139,20 @@
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
-	_LIT(KSQLInsert, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLInsert, &KPreviousIMSI, &KSimTableName, 
-		&KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+	_LIT(KSQLInsert, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	sqlStatement.Format(
+		KSQLInsert,
+		&KPreviousIMSI,
+		&KSimTableName, 
+		&KServiceType,
+		m_index_type,
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType, 
+		m_tunneling_type.get_vendor_type());
+
 	// Evaluate view
 	RDbView view;
 	
@@ -1217,11 +1274,22 @@
 
 	// Query all the relevant parameters
 
-	_LIT(KSQLQuery, "SELECT %S, %S, %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLQuery, &KReauthId, &KReauthCounter, &KPseudonymId,
-						&KPreviousIMSI, &KSimTableName,
-						&KServiceType, m_index_type, 
-						&KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+	_LIT(KSQLQuery, "SELECT %S, %S, %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	sqlStatement.Format(
+		KSQLQuery,
+		&KReauthId,
+		&KReauthCounter,
+		&KPseudonymId,
+		&KPreviousIMSI,
+		&KSimTableName,
+		&KServiceType,
+		m_index_type, 
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType, 
+		m_tunneling_type.get_vendor_type());
 
 	RDbView view;
 	// Evaluate view
@@ -2074,9 +2142,19 @@
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
-	_LIT(KSQLQueryRow, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLQueryRow, &unicodeString, &KSimTableName, 
-		&KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+	_LIT(KSQLQueryRow, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	sqlStatement.Format(
+		KSQLQueryRow,
+		&unicodeString,
+		&KSimTableName, 
+		&KServiceType,
+		m_index_type,
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType, 
+		m_tunneling_type.get_vendor_type());
 	
 	RDbView view;
 	User::LeaveIfError(view.Prepare(m_database, TDbQuery(sqlStatement), TDbWindow::EUnlimited));
@@ -2628,11 +2706,20 @@
 	TPtr sqlStatement = buf->Des();
 	
 	// Query all the relevant parameters
-	_LIT(KSQLQuery, "SELECT %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLQuery, &cf_str_EAP_GSMSIM_max_session_validity_time_literal,
-						&KGSMSIMLastFullAuthTime, &KSimTableName,
-						&KServiceType, m_index_type, 
-						&KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+	_LIT(KSQLQuery, "SELECT %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	sqlStatement.Format(
+		KSQLQuery,
+		&cf_str_EAP_GSMSIM_max_session_validity_time_literal,
+		&KGSMSIMLastFullAuthTime,
+		&KSimTableName,
+		&KServiceType,
+		m_index_type, 
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType, 
+		m_tunneling_type.get_vendor_type());
 
 	RDbView view;
 	// Evaluate view
@@ -2750,10 +2837,19 @@
 	TPtr sqlStatement = buf->Des();
 	
 	// Query all the relevant parameters
-	_LIT(KSQLQuery, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLQuery, &KGSMSIMLastFullAuthTime, &KSimTableName,
-						&KServiceType, m_index_type, 
-						&KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+	_LIT(KSQLQuery, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	sqlStatement.Format(
+		KSQLQuery,
+		&KGSMSIMLastFullAuthTime,
+		&KSimTableName,
+		&KServiceType,
+		m_index_type, 
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType, 
+		m_tunneling_type.get_vendor_type());
 
 	RDbView view;
 	// Evaluate view
--- a/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/eap_am_type_gsmsim_symbian_simulator.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/eap_am_type_gsmsim_symbian_simulator.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 13 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/inc/EapSim.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/inc/EapSim.h	Mon May 24 20:32:47 2010 +0300
@@ -16,14 +16,14 @@
 */
 
 /*
-* %version: 10.1.2 %
+* %version: 19 %
 */
 
 #ifndef _EAPSIM_H_
 #define _EAPSIM_H_
 
 // INCLUDES
-#include <EapType.h>
+#include <EapTypePlugin.h>
 #include "eap_header.h"
 
 // FORWARD DECLARATIONS
@@ -33,7 +33,7 @@
 /**
 * Class that implements the generic EAP type interface. Implements EAP SIM protocol.
 */
-class CEapSim : public CEapType
+class CEapSim : public CEapTypePlugin
 {
 public:		
 
@@ -87,16 +87,13 @@
 	
 #endif // #ifdef USE_EAP_SIMPLE_CONFIG
 	
-	/**
-	* Invokes the configuration UI.
-	**/
-	TInt InvokeUiL();
+
 	
 	/**
 	* Gets information about EAP type. 
 	* @return Pointer to a class that contains the EAP type information. Also pushed to cleanup stack.
 	*/
-	CEapTypeInfo* GetInfoLC();
+	CEapTypeInfo* GetInfoL();
 
 	/**
 	* Deletes EAP type configuration
@@ -118,7 +115,7 @@
 	* EAP type. 
 	* @param aTunnelingType Type number for the tunneling type
 	*/	
-	void SetTunnelingType(const TInt aTunnelingType);
+	void SetTunnelingType(const TEapExpandedType aTunnelingType);
 
 	/**
 	* Changes the index of the saved parameters.
--- a/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/inc/EapSimDbDefaults.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/inc/EapSimDbDefaults.h	Mon May 24 20:32:47 2010 +0300
@@ -16,49 +16,24 @@
 */
 
 /*
-* %version: 18 %
+* %version: %
 */
 
 #if !defined(_EAPSIMDBDEFAULTS_H_)
 #define _EAPSIMDBDEFAULTS_H_
 
-enum TGSMSIMUsePseudonymId 
-{
-	EGSMSIMUsePseudonymIdNo,		// False. Don't use pseudonym id.
-	EGSMSIMUsePseudonymIdYes,		// True. Use pseudonym id.
-	EGSMSIMUsePseudonymIdNotValid 	// This indicates that the value is not configured.
-};
-
-enum TGSMSIMUseManualRealm 
-{
-	EGSMSIMUseManualRealmNo,		// False. Don't use Manual Realm.
-	EGSMSIMUseManualRealmYes,		// True. Use Manual Realm.
-};
-
-enum TGSMSIMUseManualUsername 
-{
-	EGSMSIMUseManualUsernameNo,		// False. Don't use Manual Username.
-	EGSMSIMUseManualUsernameYes,		// True. Use Manual Username.
-};
+#include "EapPluginDbDefaults.h"
 
 // LOCAL CONSTANTS
-const TInt default_EAP_GSMSIM_use_manual_realm = EGSMSIMUseManualRealmNo;
-_LIT(default_EAP_GSMSIM_manual_realm, "");
+const TInt default_EAP_GSMSIM_use_manual_realm = EEapDbFalse;
 
-const TInt default_EAP_GSMSIM_use_manual_username = EGSMSIMUseManualUsernameNo;
-_LIT(default_EAP_GSMSIM_manual_username, "");
+const TInt default_EAP_GSMSIM_use_manual_username = EEapDbFalse;
 
-const TInt default_EAP_GSMSIM_use_pseudonym_identity = EGSMSIMUsePseudonymIdYes; // Default is, use pseudonym identity.
-
-const TInt64 default_MaxSessionTime = 0; // 0 means read from configuration file.
-const TInt64 default_FullAuthTime = 0;
+const TInt default_EAP_GSMSIM_use_pseudonym_identity = EEapDbTrue; // Default is, use pseudonym identity.
 
 const TUint KMaxPseudonymIdLengthInDB = 1020; // This is the max possible length of an EAP packet.
 const TUint KMaxReauthIdLengthInDB = 1020; //  Hope pseudonym id or reauth id can't be more than that.
 
-const TUint KMaxManualUsernameLengthInDB = 255;
-const TUint KMaxManualRealmLengthInDB = 255;
-
 const TUint KMaxIMSILengthInDB = 15;
 
 const TUint KMaxXKeyLengthInDB = 20;
--- a/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/inc/EapSimDbParameterNames.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/inc/EapSimDbParameterNames.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12.1.2 %
+* %version: %
 */
 
 #if !defined(_EAPSIMDBPARAMETERNAMES_H_)
@@ -28,6 +28,7 @@
 
 _LIT(KServiceType, "ServiceType");
 _LIT(KServiceIndex, "ServiceIndex");
+_LIT(KTunnelingTypeVendorId, "TunnelingTypeVendorId");
 _LIT(KTunnelingType, "TunnelingType");
 _LIT(KPseudonymId, "PseudonymId");
 _LIT(KXKey, "XKEY");
--- a/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/inc/EapSimDbUtils.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/inc/EapSimDbUtils.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: 8.1.6 %
 */
 
 #ifndef _EAPSIMDBUTILS_H_
@@ -29,21 +29,10 @@
 
 // LOCAL CONSTANTS
 
-#ifdef SYMBIAN_SECURE_DBMS
-// For EAP SIM secure database.
-// Full path is not needed. The database eapsim.dat will be saved in the 
-// data cage path for DBMS. So it will be in "\private\100012a5\eapsim.dat" in C: drive.
-// The maximum length of database name is 0x40 (KDbMaxName) , which is defined in d32dbms.h.
-
-_LIT(KDatabaseName, "c:eapsim.dat");
+// For EAP-SIM private database. Database will be in the private folder of EAP-server (20026FCB).
+// The maximum length of database name is 0x40 (KDbMaxName), which is defined in d32dbms.h.
 
-_LIT(KSecureUIDFormat, "SECURE[102072e9]"); // For the security policy.
-
-#else
-
-_LIT(KDatabaseName, "c:\\system\\data\\eapsim.dat");
-
-#endif //#ifdef SYMBIAN_SECURE_DBMS
+_LIT(KEapSimDatabaseName, "eapsim.dat");
 
 _LIT(KSimTableName, "eapsim");
 
@@ -54,8 +43,8 @@
 public:
 	
 	static void OpenDatabaseL(
-		RDbNamedDatabase& aDatabase, 
-		RDbs& aSession, 
+		RDbNamedDatabase& aDatabase,
+		RFs& aFileServerSession,
 		const TIndexType aIndexType,
 		const TInt aIndex,
 		const eap_type_value_e aTunnelingType);
@@ -99,7 +88,6 @@
 		const TIndexType aIndexType,
 		const TInt aIndex,
 		const eap_type_value_e aTunnelingType);
-
 };
 
 #endif // _EAPSIMDBUTILS_H_
--- a/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/inc/EapSimGlobal.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/inc/EapSimGlobal.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7 %
+* %version: %
 */
 
 #ifndef _EAPSIMGLOBAL_H_
@@ -26,9 +26,9 @@
 
 // Release date must be of format YYYYMMDD:. Will be localised automatically. 
 // Note that days and months start from 0.
-_LIT(KReleaseDate, "20040829:"); 
+_LIT(KReleaseDate, ""); 
 _LIT(KEapTypeVersion, "1.0");
-_LIT(KManufacturer, "Nokia");
+_LIT(KManufacturer, "");
 _LIT(KNokiaSignature, ""); // Not used
 _LIT(KExtraInfo1, ""); // Not used
 _LIT(KExtraInfo2, ""); // Not used
--- a/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/simulator/inc/EapSimSimulatorConfig.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/simulator/inc/EapSimSimulatorConfig.h	Mon May 24 20:32:47 2010 +0300
@@ -16,6 +16,6 @@
 */
 
 /*
-* %version: 7 %
+* %version: %
 */
 
--- a/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/simulator/inc/EapSimSimulatorPlugin.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/simulator/inc/EapSimSimulatorPlugin.h	Mon May 24 20:32:47 2010 +0300
@@ -16,14 +16,14 @@
 */
 
 /*
-* %version: 9 %
+* %version: 7.1.2 %
 */
 
 #ifndef _EAPSIMPLUGIN_H_
 #define _EAPSIMPLUGIN_H_
 
 #include "EapPluginInterface.h"
-#include <ecom/ImplementationProxy.h>
+#include <ecom/implementationproxy.h>
 
 const TUint KVersion = 1;
 
--- a/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/simulator/src/26666669.rss	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/simulator/src/26666669.rss	Mon May 24 20:32:47 2010 +0300
@@ -16,10 +16,10 @@
 */
 
 /*
-* %version: 5 %
+* %version: 3.1.2 %
 */
 
-#include <ecom/RegistryInfo.rh>
+#include <ecom/registryinfo.rh>
 RESOURCE REGISTRY_INFO theInfo
 {
 dll_uid = 0x26666669;
--- a/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/simulator/src/EapSimSimulatorConfig.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/simulator/src/EapSimSimulatorConfig.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/simulator/src/EapSimSimulatorPlugin.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/simulator/src/EapSimSimulatorPlugin.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/simulator/src/EapSimSimulatorProxy.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/simulator/src/EapSimSimulatorProxy.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/src/101f8e49.rss	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/src/101f8e49.rss	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 9 %
+* %version: 6.1.3 %
 */
 
 //  INCLUDES
--- a/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/src/EapSim.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/src/EapSim.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 16.1.3 %
+* %version: 24 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -38,9 +38,9 @@
 #include <EapTypeInfo.h>
 #include "EapSimDbUtils.h"
 
-
-
+#include "EapConversion.h"
 #include "eap_am_tools_symbian.h"
+#include "EapTraceSymbian.h"
 
 // LOCAL CONSTANTS
 
@@ -136,21 +136,14 @@
 }
 
 // ----------------------------------------------------------
-TInt CEapSim::InvokeUiL()
-{
-	TInt buttonId(0);
 
-	return buttonId;
-}
-// ----------------------------------------------------------
-CEapTypeInfo* CEapSim::GetInfoLC()
+CEapTypeInfo* CEapSim::GetInfoL()
 {
 	CEapTypeInfo* info = new(ELeave) CEapTypeInfo(
 		(TDesC&)KReleaseDate, 
 		(TDesC&)KEapTypeVersion,
 		(TDesC&)KManufacturer);
 
-	CleanupStack::PushL(info);
 	return info;
 }
 
@@ -170,18 +163,21 @@
 
 // ----------------------------------------------------------
 
-void CEapSim::SetTunnelingType(const TInt aTunnelingType)
+void CEapSim::SetTunnelingType(const TEapExpandedType aTunnelingType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
+
+EAP_TRACE_DATA_DEBUG_SYMBIAN(
+    (EAPL("CEapSim::SetTunnelingType - tunneling type"),
+    aTunnelingType.GetValue().Ptr(), aTunnelingType.GetValue().Length()));
 
-	// Vendor id is eap_type_vendor_id_ietf always in this plugin.
-	iTunnelingType.set_eap_type_values(eap_type_vendor_id_ietf, aTunnelingType);
+eap_type_value_e aInternalType;
 
-#else
+TInt err = CEapConversion::ConvertExpandedEAPTypeToInternalType(
+        &aTunnelingType,
+        &aInternalType);
 
-	iTunnelingType = static_cast<eap_type_value_e>(aTunnelingType);
+iTunnelingType = aInternalType;
 
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
 }
 
 
@@ -207,7 +203,7 @@
 
 	RDbNamedDatabase db;
 
-	RDbs session;
+	RFs session;
 	
 	EapSimDbUtils::OpenDatabaseL(db, session, iIndexType, iIndex, iTunnelingType);
 	
@@ -226,14 +222,15 @@
 	iIndexType = aIndexType;
 	iIndex = aIndex;
 	
-	CleanupStack::PopAndDestroy(2); // db
+	CleanupStack::PopAndDestroy(&db);
+	CleanupStack::PopAndDestroy(&session);
 }
 
 void CEapSim::SetConfigurationL(const EAPSettings& aSettings)
 {
 	RDbNamedDatabase db;
 
-	RDbs session;	
+	RFs session;
 	
 	// This also creates the IAP entry if it doesn't exist
 	EapSimDbUtils::OpenDatabaseL(db, session, iIndexType, iIndex, iTunnelingType);
@@ -248,14 +245,15 @@
 		iIndex,
 		iTunnelingType);		
 		
-	CleanupStack::PopAndDestroy(2); // db, session
+	CleanupStack::PopAndDestroy(&db);
+	CleanupStack::PopAndDestroy(&session);
 }
 
 void CEapSim::GetConfigurationL(EAPSettings& aSettings)
 {
 	RDbNamedDatabase db;
 
-	RDbs session;
+	RFs session;
 	
 	// This also creates the IAP entry if it doesn't exist
 	EapSimDbUtils::OpenDatabaseL(db, session, iIndexType, iIndex, iTunnelingType);
@@ -270,7 +268,8 @@
 		iIndex,
 		iTunnelingType);
 		
-	CleanupStack::PopAndDestroy(2); // db, session
+	CleanupStack::PopAndDestroy(&db);
+	CleanupStack::PopAndDestroy(&session);
 }
 
 void CEapSim::CopySettingsL(
@@ -294,7 +293,7 @@
 
 	RDbNamedDatabase db;
 
-	RDbs session;
+	RFs session;
 	
 	EapSimDbUtils::OpenDatabaseL(db, session, iIndexType, iIndex, iTunnelingType);
 	
@@ -310,7 +309,8 @@
 		aDestinationIndex, 
 		iTunnelingType);
 		
-	CleanupStack::PopAndDestroy(2); // db
+	CleanupStack::PopAndDestroy(&db);
+	CleanupStack::PopAndDestroy(&session);
 	
 }
 
--- a/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/src/EapSimDbUtils.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/src/EapSimDbUtils.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 31.1.2 %
+* %version: 51 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -33,161 +33,149 @@
 #include "EapSimDbDefaults.h"
 #include "EapSimDbParameterNames.h"
 
-#include "eap_am_trace_symbian.h"
+#include <EapTraceSymbian.h>
+#include <EapPluginTools.h>
 
 const TInt KMaxSqlQueryLength = 2048;
 const TInt KMicroSecsInAMinute = 60000000; // 60000000 micro seconds is 1 minute.
 
 // ================= MEMBER FUNCTIONS =======================
 
-void EapSimDbUtils::OpenDatabaseL(RDbNamedDatabase& aDatabase, RDbs& aSession, const TIndexType aIndexType,
-	const TInt aIndex, const eap_type_value_e aTunnelingType)
+void EapSimDbUtils::OpenDatabaseL(
+	RDbNamedDatabase& aDatabase,
+	RFs& aFileServerSession,
+	const TIndexType aIndexType,
+	const TInt aIndex,
+	const eap_type_value_e aTunnelingType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapSimDbUtils::OpenDatabaseL(): Start - aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type()));
 
-#else
-
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapSimDbUtils::OpenDatabaseL -Start- aIndexType=%d, aIndex=%d, aTunnelingVendorType=%d \n"),
-	aIndexType,aIndex,aTunnelingVendorType) );
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapSimDbUtils::OpenDatabaseL()\n"));
 
 	// 1. Open/create a database	
 	
-	// Connect to the DBMS server.
-	User::LeaveIfError(aSession.Connect());		
-	CleanupClosePushL(aSession);	
-	// aSession and aDatabase are pushed to the cleanup stack even though they may be member
-	// variables of the calling class and would be closed in the destructor anyway. This ensures
-	// that if they are not member variables they will be closed. Closing the handle twice
-	// does no harm.	
-	
-#ifdef SYMBIAN_SECURE_DBMS
-	
-	// Create the secure shared database with the specified secure policy.
-	// Database will be created in the data caging path for DBMS (C:\private\100012a5).
-	
-	TInt err = aDatabase.Create(aSession, KDatabaseName, KSecureUIDFormat);
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapSimDbUtils::OpenDatabaseL - Created Secure DB for eapsim.dat. err=%d\n"), err));
+	TInt error(KErrNone);
+	TFileName aPrivateDatabasePathName;
 
-	
-	if(err == KErrNone)
+	EapPluginTools::CreateDatabaseLC(
+		aDatabase,
+		aFileServerSession,
+		error,
+		KEapSimDatabaseName,
+		aPrivateDatabasePathName);
+
+	if(error == KErrNone)
 	{
 		aDatabase.Close();
-		
-	} else if (err != KErrAlreadyExists) 
+	}
+	else if (error != KErrAlreadyExists) 
 	{
-		User::LeaveIfError(err);
+		User::LeaveIfError(error);
 	}
 	
-	User::LeaveIfError(aDatabase.Open(aSession, KDatabaseName, KSecureUIDFormat));
-	CleanupClosePushL(aDatabase);		
-		
-#else
-	// Non secured database. The database will be created in the old location (c:\system\data).
-	
-	RFs fsSession;		
-	User::LeaveIfError(fsSession.Connect());
-	CleanupClosePushL(fsSession);	
-	TInt err = aDatabase.Create(fsSession, KDatabaseName);
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapSimDbUtils::OpenDatabaseL - Created Non-Secure DB for eapsim.dat. err=%d\n"), err));
-	
-	
-	if(err == KErrNone)
-	{
-		aDatabase.Close();
-		
-	} else if (err != KErrAlreadyExists) 
-	{
-		User::LeaveIfError(err);
-	}
-	CleanupStack::PopAndDestroy( &fsSession ); // close fsSession
-	
-	User::LeaveIfError(aDatabase.Open(aSession, KDatabaseName));
-	CleanupClosePushL(aDatabase);		
-	    
-#endif // #ifdef SYMBIAN_SECURE_DBMS
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapSimDbUtils::OpenDatabaseL(): calls aDatabase.Open()\n")));
+
+	error = aDatabase.Open(aFileServerSession, aPrivateDatabasePathName);
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapSimDbUtils::OpenDatabaseL(): Opened private DB for EAP-SIM. error=%d\n"), error));
+
+	User::LeaveIfError(error);
 
 	// 2. Create the eapsim table to database (ignore error if exists)
 	
-// Table columns:
-//// NAME ///////////////////////////////////////////////// TYPE ////////////// Constant /////////
-//| ServiceType									| UNSIGNED INTEGER | KServiceType      |//
-//| ServiceIndex								| UNSIGNED INTEGER | KServiceIndex     |//
-//| TunnelingType								| UNSIGNED INTEGER | KTunnelingType    |//
-//| EAP_GSMSIM_use_manual_realm					| UNSIGNED INTEGER | cf_str_EAP_GSMSIM_use_manual_realm_literal   |//
-//| EAP_GSMSIM_manual_realm						| VARCHAR(255)	   | cf_str_EAP_GSMSIM_manual_realm_literal			   |//
-//| EAP_GSMSIM_use_manual_username				| UNSIGNED INTEGER | cf_str_EAP_GSMSIM_use_manual_username_literal|//
-//| EAP_GSMSIM_manual_username					| VARCHAR(255)	   | cf_str_EAP_GSMSIM_manual_username_literal		   |//
-//| PseudonymId									| LONG VARBINARY   | KPseudonymId      |//
-//| XKEY										| BINARY(20)       | KXKey             |//
-//| K_aut										| BINARY(16)       | KK_aut            |//
-//| K_encr										| BINARY(16)       | KK_encr           |//
-//| ReauthCounter								| UNSIGNED INTEGER | KReauthCounter    |//
-//| ReauthId									| LONG VARBINARY   | KReauthId         |//
-//| PreviousIMSI								| VARBINARY(15)	   | KPreviousIMSI	   |//
-//| EAP_GSMSIM_use_pseudonym_identity 			| UNSIGNED INTEGER | cf_str_EAP_GSMSIM_use_pseudonym_identity_literal	   	|//
-//| EAP_GSMSIM_max_session_validity_time		| BIGINT		   | cf_str_EAP_GSMSIM_max_session_validity_time_literal   |//
-//| EAP_GSMSIM_last_full_authentication_time	| BIGINT		   | KGSMSIMLastFullAuthTime	|//
-//////////////////////////////////////////////////////////////////////////////////////////////////
+	// Table columns:
+	//// NAME ///////////////////////////////////////////////// TYPE ////////////// Constant /////////
+	//| ServiceType									| UNSIGNED INTEGER | KServiceType      |//
+	//| ServiceIndex								| UNSIGNED INTEGER | KServiceIndex     |//
+	//| TunnelingTypeVendorId                       | UNSIGNED INTEGER  | KTunnelingTypeVendorId    |//
+	//| TunnelingType								| UNSIGNED INTEGER | KTunnelingType    |//
+	//| EAP_GSMSIM_use_manual_realm					| UNSIGNED INTEGER | cf_str_EAP_GSMSIM_use_manual_realm_literal   |//
+	//| EAP_GSMSIM_manual_realm						| VARCHAR(255)	   | cf_str_EAP_GSMSIM_manual_realm_literal			   |//
+	//| EAP_GSMSIM_use_manual_username				| UNSIGNED INTEGER | cf_str_EAP_GSMSIM_use_manual_username_literal|//
+	//| EAP_GSMSIM_manual_username					| VARCHAR(255)	   | cf_str_EAP_GSMSIM_manual_username_literal		   |//
+	//| PseudonymId									| LONG VARBINARY   | KPseudonymId      |//
+	//| XKEY										| BINARY(20)       | KXKey             |//
+	//| K_aut										| BINARY(16)       | KK_aut            |//
+	//| K_encr										| BINARY(16)       | KK_encr           |//
+	//| ReauthCounter								| UNSIGNED INTEGER | KReauthCounter    |//
+	//| ReauthId									| LONG VARBINARY   | KReauthId         |//
+	//| PreviousIMSI								| VARBINARY(15)	   | KPreviousIMSI	   |//
+	//| EAP_GSMSIM_use_pseudonym_identity 			| UNSIGNED INTEGER | cf_str_EAP_GSMSIM_use_pseudonym_identity_literal	   	|//
+	//| EAP_GSMSIM_max_session_validity_time		| BIGINT		   | cf_str_EAP_GSMSIM_max_session_validity_time_literal   |//
+	//| EAP_GSMSIM_last_full_authentication_time	| BIGINT		   | KGSMSIMLastFullAuthTime	|//
+	//////////////////////////////////////////////////////////////////////////////////////////////////
 
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 	
-	_LIT(KSQLCreateTable, "CREATE TABLE %S (%S UNSIGNED INTEGER, \
-												 %S UNSIGNED INTEGER, \
-												 %S UNSIGNED INTEGER, \
-												 %S UNSIGNED INTEGER, \
-												 %S VARCHAR(%d), \
-												 %S UNSIGNED INTEGER, \
-												 %S VARCHAR(%d), \
-												 %S LONG VARBINARY, \
-												 %S BINARY(%d), \
-												 %S BINARY(%d), \
-												 %S BINARY(%d), \
-												 %S UNSIGNED INTEGER, \
-												 %S LONG VARBINARY, \
-												 %S VARBINARY(%d), \
-												 %S UNSIGNED INTEGER, \
-												 %S BIGINT, \
-												 %S BIGINT)");
+	_LIT(KSQLCreateTable, "CREATE TABLE %S \
+		(%S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S VARCHAR(%d), \
+		 %S UNSIGNED INTEGER, \
+		 %S VARCHAR(%d), \
+		 %S LONG VARBINARY, \
+		 %S BINARY(%d), \
+		 %S BINARY(%d), \
+		 %S BINARY(%d), \
+		 %S UNSIGNED INTEGER, \
+		 %S LONG VARBINARY, \
+		 %S VARBINARY(%d), \
+		 %S UNSIGNED INTEGER, \
+		 %S BIGINT, \
+		 %S BIGINT)");
 												 
-	sqlStatement.Format(KSQLCreateTable, &KSimTableName, &KServiceType,
-														 &KServiceIndex, 
-														 &KTunnelingType,
-														 &cf_str_EAP_GSMSIM_use_manual_realm_literal, 
-														 &cf_str_EAP_GSMSIM_manual_realm_literal, KMaxManualRealmLengthInDB, 
-														 &cf_str_EAP_GSMSIM_use_manual_username_literal, 
-														 &cf_str_EAP_GSMSIM_manual_username_literal, KMaxManualUsernameLengthInDB, 
-														 &KPseudonymId,
-														 &KXKey, KMaxXKeyLengthInDB, 
-														 &KK_aut, KMaxK_autLengthInDB, 
-														 &KK_encr, KMaxK_encrLengthInDB, 
-														 &KReauthCounter, 
-														 &KReauthId, 
-														 &KPreviousIMSI, KMaxIMSILengthInDB,
-														 &cf_str_EAP_GSMSIM_use_pseudonym_identity_literal,														 
-														 &cf_str_EAP_GSMSIM_max_session_validity_time_literal, 
-														 &KGSMSIMLastFullAuthTime);
+	sqlStatement.Format(KSQLCreateTable,
+		&KSimTableName,
+		&KServiceType,
+		&KServiceIndex, 
+		&KTunnelingTypeVendorId,
+		&KTunnelingType,
+		&cf_str_EAP_GSMSIM_use_manual_realm_literal, 
+		&cf_str_EAP_GSMSIM_manual_realm_literal, KMaxRealmLengthInDB, 
+		&cf_str_EAP_GSMSIM_use_manual_username_literal, 
+		&cf_str_EAP_GSMSIM_manual_username_literal, KMaxUsernameLengthInDB, 
+		&KPseudonymId,
+		&KXKey, KMaxXKeyLengthInDB, 
+		&KK_aut, KMaxK_autLengthInDB, 
+		&KK_encr, KMaxK_encrLengthInDB, 
+		&KReauthCounter, 
+		&KReauthId, 
+		&KPreviousIMSI, KMaxIMSILengthInDB,
+		&cf_str_EAP_GSMSIM_use_pseudonym_identity_literal,														 
+		&cf_str_EAP_GSMSIM_max_session_validity_time_literal, 
+		&KGSMSIMLastFullAuthTime);
 																					
-	err = aDatabase.Execute(sqlStatement);
-	if (err != KErrNone && err != KErrAlreadyExists)
+	error = aDatabase.Execute(sqlStatement);
+	if (error != KErrNone && error != KErrAlreadyExists)
 	{
-		User::Leave(err);
+		User::Leave(error);
 	}
 	
 	// 4. Check if database table contains a row for this service type and id  
 	
-	_LIT(KSQLQueryRow, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLQueryRow, &cf_str_EAP_GSMSIM_manual_realm_literal, &KSimTableName, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
-		
+	_LIT(KSQLQueryRow, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+
+	sqlStatement.Format(KSQLQueryRow,
+		&cf_str_EAP_GSMSIM_manual_realm_literal,
+		&KSimTableName, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());
+
 	RDbView view;
 	User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement), TDbWindow::EUnlimited));
 	// View must be closed when no longer needed
@@ -214,13 +202,14 @@
 		view.InsertL();
 		view.SetColL(colSet->ColNo(KServiceType), static_cast<TInt>(aIndexType));
 		view.SetColL(colSet->ColNo(KServiceIndex), aIndex);
-		view.SetColL(colSet->ColNo(KTunnelingType), aTunnelingVendorType);
+		view.SetColL(colSet->ColNo(KTunnelingTypeVendorId), aTunnelingType.get_vendor_id());
+		view.SetColL(colSet->ColNo(KTunnelingType), aTunnelingType.get_vendor_type());
 		
 		view.SetColL(colSet->ColNo(cf_str_EAP_GSMSIM_use_manual_realm_literal), default_EAP_GSMSIM_use_manual_realm);	
-		view.SetColL(colSet->ColNo(cf_str_EAP_GSMSIM_manual_realm_literal), default_EAP_GSMSIM_manual_realm);
+		view.SetColL(colSet->ColNo(cf_str_EAP_GSMSIM_manual_realm_literal), default_EAP_realm);
 		
 		view.SetColL(colSet->ColNo(cf_str_EAP_GSMSIM_use_manual_username_literal), default_EAP_GSMSIM_use_manual_username);
-		view.SetColL(colSet->ColNo(cf_str_EAP_GSMSIM_manual_username_literal), default_EAP_GSMSIM_manual_username);
+		view.SetColL(colSet->ColNo(cf_str_EAP_GSMSIM_manual_username_literal), default_EAP_username);
 		
 		view.SetColL(colSet->ColNo(cf_str_EAP_GSMSIM_use_pseudonym_identity_literal), default_EAP_GSMSIM_use_pseudonym_identity);			
 		
@@ -230,18 +219,20 @@
 
 		view.PutL();
 		
-		CleanupStack::PopAndDestroy( colSet ); // Delete colSet.
+		CleanupStack::PopAndDestroy( colSet );
 		
-		CleanupStack::PopAndDestroy( &view ); // Close view.
+		CleanupStack::PopAndDestroy( &view );
 	}
 	
-	CleanupStack::PopAndDestroy( buf ); // Delete buf	
+	aDatabase.Compact();
+
+	CleanupStack::PopAndDestroy( buf );
 	CleanupStack::Pop( &aDatabase );	
-	CleanupStack::Pop( &aSession );	
-	
-	aDatabase.Compact();
+	CleanupStack::Pop( &aFileServerSession );
 }
 
+// ----------------------------------------------------------
+
 void EapSimDbUtils::SetIndexL(
 	RDbNamedDatabase& aDatabase, 		
 	const TIndexType aIndexType,
@@ -251,25 +242,37 @@
 	const TInt aNewIndex,
 	const eap_type_value_e aNewTunnelingType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
-	TUint aNewTunnelingVendorType = aNewTunnelingType.get_vendor_type();
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapSimDbUtils::SetIndexL(): -Start- aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type()));
+	
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapSimDbUtils::SetIndexL(): -Start- aNewIndexType=%d, aNewIndex=%d, aNewTunnelingType=0xfe%06x%08x\n"),
+		aNewIndexType,
+		aNewIndex,
+		aNewTunnelingType.get_vendor_id(),
+		aNewTunnelingType.get_vendor_type()));
 
-#else
-
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-	TUint aNewTunnelingVendorType = static_cast<TUint>(aNewTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapSimDbUtils::SetIndexL()\n"));
 
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
-	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
+	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
 
-	sqlStatement.Format(KSQL, &KSimTableName, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+	sqlStatement.Format(KSQL,
+		&KSimTableName, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());
 	
 	RDbView view;
 	
@@ -298,16 +301,19 @@
 	view.UpdateL();
 	
     view.SetColL(colSet->ColNo(KServiceType), static_cast<TUint>(aNewIndexType));
-    
     view.SetColL(colSet->ColNo(KServiceIndex), aNewIndex);
-    
-    view.SetColL(colSet->ColNo(KTunnelingType), aNewTunnelingVendorType);
+	view.SetColL(colSet->ColNo(KTunnelingTypeVendorId), aNewTunnelingType.get_vendor_id());
+	view.SetColL(colSet->ColNo(KTunnelingType), aNewTunnelingType.get_vendor_type());
 
     view.PutL();
     	
-	CleanupStack::PopAndDestroy(3); // view, colset, buf
+	CleanupStack::PopAndDestroy(colSet);
+	CleanupStack::PopAndDestroy(&view);
+	CleanupStack::PopAndDestroy(buf);
 }
 
+// ----------------------------------------------------------
+
 void EapSimDbUtils::SetConfigurationL(
 	RDbNamedDatabase& aDatabase,
 	const EAPSettings& aSettings, 
@@ -315,80 +321,23 @@
 	const TInt aIndex,
 	const eap_type_value_e aTunnelingType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
-
-#else
-
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapSimDbUtils::SetConfigurationL -Start- aIndexType=%d, aIndex=%d, aTunnelingVendorType=%d\n"),
-						aIndexType,aIndex, aTunnelingVendorType));
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("*************************** SetConfigurationL - Set the below values: ***************************\n")) );
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - Set these values for EAPType=%d"),aSettings.iEAPType) );
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, Username=%S"),aSettings.iUsernamePresent, &(aSettings.iUsername)) );
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, Password=%S"),aSettings.iPasswordPresent, &(aSettings.iPassword)) );
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, Realm=%S"),aSettings.iRealmPresent, &(aSettings.iRealm)) );
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, UsePseudonyms=%d"),aSettings.iUsePseudonymsPresent, aSettings.iUsePseudonyms) );
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, VerifyServerRealm=%d"),
-						aSettings.iVerifyServerRealmPresent, aSettings.iVerifyServerRealm) );
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapSimDbUtils::SetConfigurationL(): -Start- aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type()));
 
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, RequireClientAuthentication=%d"),
-						aSettings.iRequireClientAuthenticationPresent, aSettings.iRequireClientAuthentication) );
-						
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, SessionValidityTime=%d minutes"),
-						aSettings.iSessionValidityTimePresent, aSettings.iSessionValidityTime) );
-												
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, CipherSuites Count=%d"),
-						aSettings.iCipherSuitesPresent, aSettings.iCipherSuites.Count()) );
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, PEAPv0Allowed=%d, PEAPv1Allowed=%d, PEAPv2Allowed=%d"),
-						aSettings.iPEAPVersionsPresent, aSettings.iPEAPv0Allowed,aSettings.iPEAPv1Allowed, aSettings.iPEAPv2Allowed ) );
-		
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, Certificates Count=%d"),
-						aSettings.iCertificatesPresent, aSettings.iCertificates.Count()) );
-						
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - Certificate details below: \n")) );
-	
-	for( TInt n=0; n < aSettings.iCertificates.Count(); n++ )
-	{
-		EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - Certificate type:%d \n"), aSettings.iCertificates[n].iCertType) );
-		
-		EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - certificates - present=%d, SubjectName=%S"),
-						aSettings.iCertificates[n].iSubjectNamePresent, &(aSettings.iCertificates[n].iSubjectName) ) );
-						
-		EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - certificates - present=%d, IssuerName=%S"),
-						aSettings.iCertificates[n].iIssuerNamePresent, &(aSettings.iCertificates[n].iIssuerName) ) );
-						
-		EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - certificates - present=%d, SerialNumber=%S"),
-						aSettings.iCertificates[n].iSerialNumberPresent, &(aSettings.iCertificates[n].iSerialNumber) ) );
-						
-		EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - certificates - SubjectKeyID present=%d"),
-						aSettings.iCertificates[n].iSubjectKeyIDPresent ) );						
-						
-		EAP_TRACE_DATA_DEBUG_SYMBIAN( ( "SubjectKeyID:", aSettings.iCertificates[n].iSubjectKeyID.Ptr(), 
-													aSettings.iCertificates[n].iSubjectKeyID.Size() ) );
-						
-		EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - certificates - present=%d, Thumbprint=%S"),
-						aSettings.iCertificates[n].iThumbprintPresent, &(aSettings.iCertificates[n].iThumbprint) ) );
-	}						
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapSimDbUtils::SetConfigurationL()\n"));
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("*************************** SetConfigurationL(): Set the below values: ***************************\n")) );
 
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, EncapsulatedEAPTypes Count=%d"),
-						aSettings.iEncapsulatedEAPTypesPresent, aSettings.iEncapsulatedEAPTypes.Count()) );
-	for( TInt m=0; m < aSettings.iEncapsulatedEAPTypes.Count(); m++ )
-	{	
-		EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - EncapsulatedEAPTypes=%d"),
-						aSettings.iEncapsulatedEAPTypes[m]) );
-	}						
+	EAP_TRACE_SETTINGS(&aSettings);
 
-	EAP_TRACE_DEBUG_SYMBIAN((_L("*************************** SetConfigurationL - Set the above values: ***************************\n")) );
+	EAP_TRACE_DEBUG_SYMBIAN((_L("*************************** SetConfigurationL(): Set the above values: ***************************\n")) );
 
 	// Check if the settings are for the correct type
-	if (aSettings.iEAPType != EAPSettings::EEapSim)
+	if (aSettings.iEAPExpandedType != (*EapExpandedTypeSim.GetType()))
 	{
 		User::Leave(KErrNotSupported);
 	}
@@ -398,9 +347,18 @@
 
 	RDbView view;
 
-	_LIT(KSQLQuery, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLQuery, &KSimTableName, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+	_LIT(KSQLQuery, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+
+	sqlStatement.Format(KSQLQuery,
+		&KSimTableName, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());
 	
 	// Evaluate view
 	User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement)));
@@ -417,11 +375,50 @@
 	CDbColSet* colSet = view.ColSetL();
 	CleanupStack::PushL(colSet);
 
+
+	if (aSettings.iUseAutomaticUsernamePresent)
+	{
+		// This is to set the automatic or manual status.
+		TUint useManualUsernameStatus;
+		
+		if (aSettings.iUseAutomaticUsername)
+		{
+			useManualUsernameStatus = EEapDbFalse;
+		}
+		else
+		{
+			useManualUsernameStatus = EEapDbTrue;
+		}
+		
+		// Set the value.
+		view.SetColL(colSet->ColNo(cf_str_EAP_GSMSIM_use_manual_username_literal), useManualUsernameStatus);
+	}
+
+
+	if (aSettings.iUseAutomaticRealmPresent)
+	{
+		// This is to set the automatic or manual status.
+		TUint useManualRealmStatus;
+		
+		if (aSettings.iUseAutomaticRealm)
+		{
+			useManualRealmStatus = EEapDbFalse;
+		}
+		else
+		{
+			useManualRealmStatus = EEapDbTrue;
+		}
+
+		// Set the value.
+		view.SetColL(colSet->ColNo(cf_str_EAP_GSMSIM_use_manual_realm_literal), useManualRealmStatus);
+	}
+
+
 	// Manual username
-	//if (aSettings.iUsernamePresent) // no need to check as there may be empty usernames with the present status is EFlase.
+	if (aSettings.iUsernamePresent) // no need to check as there may be empty usernames with the present status is EFlase.
 	{
 		// Check if length of username is less than the max length.
-		if(aSettings.iUsername.Length() > KMaxManualUsernameLengthInDB)
+		if(aSettings.iUsername.Length() > KMaxUsernameLengthInDB)
 		{
 			// Username too long. Can not be stored in DB.
 			
@@ -433,28 +430,13 @@
 		
 		// Length is ok. Set the value in DB. Value could be empty. It doesn't matter.
 		view.SetColL(colSet->ColNo(cf_str_EAP_GSMSIM_manual_username_literal), aSettings.iUsername);
-		
-		// This is to set the automatic or manual status.
-		TUint useManualUsernameStatus;
-		
-		if (aSettings.iUsernamePresent)
-		{
-			useManualUsernameStatus = EGSMSIMUseManualUsernameYes;
-		}
-		else
-		{
-			useManualUsernameStatus = EGSMSIMUseManualUsernameNo;
-		}
-		
-		// Set the value.
-		view.SetColL(colSet->ColNo(cf_str_EAP_GSMSIM_use_manual_username_literal), useManualUsernameStatus);
 	}
 		
 	// Manual realm
-	//if (aSettings.iRealmPresent)  // no need to check as there may be empty realms with the present status is EFlase.
+	if (aSettings.iRealmPresent)  // no need to check as there may be empty realms with the present status is EFlase.
 	{
 		// Check if length of realm is less than the max length.
-		if(aSettings.iRealm.Length() > KMaxManualRealmLengthInDB)
+		if(aSettings.iRealm.Length() > KMaxRealmLengthInDB)
 		{
 			// Realm too long. Can not be stored in DB.
 
@@ -466,21 +448,6 @@
 
 		// Length is ok. Set the value in DB. Value could be empty. It doesn't matter.
 		view.SetColL(colSet->ColNo(cf_str_EAP_GSMSIM_manual_realm_literal), aSettings.iRealm);
-		
-		// This is to set the automatic or manual status.
-		TUint useManualRealmStatus;
-		
-		if (aSettings.iRealmPresent)
-		{
-			useManualRealmStatus = EGSMSIMUseManualRealmYes;
-		}
-		else
-		{
-			useManualRealmStatus = EGSMSIMUseManualRealmNo;
-		}
-		
-		// Set the value.
-		view.SetColL(colSet->ColNo(cf_str_EAP_GSMSIM_use_manual_realm_literal), useManualRealmStatus);	
 	}
 	
 	// UsePseudonym
@@ -489,20 +456,20 @@
 		if (aSettings.iUsePseudonyms)
 		{
 			// Use pseudonym.
-			view.SetColL(colSet->ColNo(cf_str_EAP_GSMSIM_use_pseudonym_identity_literal), EGSMSIMUsePseudonymIdYes);
+			view.SetColL(colSet->ColNo(cf_str_EAP_GSMSIM_use_pseudonym_identity_literal), EEapDbTrue);
 		}
 		else
 		{			
 			// Don't use pseudonym.
-			view.SetColL(colSet->ColNo(cf_str_EAP_GSMSIM_use_pseudonym_identity_literal), EGSMSIMUsePseudonymIdNo);			
+			view.SetColL(colSet->ColNo(cf_str_EAP_GSMSIM_use_pseudonym_identity_literal), EEapDbFalse);			
 		}
 	}
 	else
 	{
 		// Value is not configured. Value is read from config file if needed.
-		view.SetColL(colSet->ColNo(cf_str_EAP_GSMSIM_use_pseudonym_identity_literal), EGSMSIMUsePseudonymIdNotValid);		
+		view.SetColL(colSet->ColNo(cf_str_EAP_GSMSIM_use_pseudonym_identity_literal), EEapDbNotValid);		
 	}
-	
+
 	// Session validity time
 	if (aSettings.iSessionValidityTimePresent)
 	{
@@ -513,23 +480,27 @@
 		
 		view.SetColL(colSet->ColNo(cf_str_EAP_GSMSIM_max_session_validity_time_literal), validityInMicro);
 	}
-	
+
 	if (aIndexType != EVpn) // This allows current VPN IF to use reauthentication. VPN does not zero last full authentication time.
 	{
 		// Last full authentication time should be made zero when EAP configurations are modified.
 		// This makes sure that the next authentication with this EAP would be full authentication
 		// instead of reauthentication even if the session is still valid.
-		
+
 		view.SetColL(colSet->ColNo(KGSMSIMLastFullAuthTime), default_FullAuthTime);
 
-		EAP_TRACE_DEBUG_SYMBIAN((_L("Session Validity: EAP-Type=%d, Resetting Full Auth Time since settings are modified\n"),
-									aSettings.iEAPType ));
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapSimDbUtils::SetConfigurationL(): Session Validity: Resetting Full Auth Time since settings are modified\n")));
 	}
-	
+
 	view.PutL();
-	CleanupStack::PopAndDestroy(3); // view, colset, buf
+
+	CleanupStack::PopAndDestroy(colSet);
+	CleanupStack::PopAndDestroy(&view);
+	CleanupStack::PopAndDestroy(buf);
 }
 
+// ----------------------------------------------------------
+
 void EapSimDbUtils::GetConfigurationL(
 	RDbNamedDatabase& aDatabase,
 	EAPSettings& aSettings, 
@@ -537,15 +508,14 @@
 	const TInt aIndex,
 	const eap_type_value_e aTunnelingType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapSimDbUtils::GetConfigurationL(): -Start- aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type()));
 
-#else
-
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapSimDbUtils::GetConfigurationL()\n"));
 
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();	
@@ -553,9 +523,18 @@
 	RDbView view;
 
 	// Form the query
-	_LIT(KSQLQuery, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLQuery, &KSimTableName, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+	_LIT(KSQLQuery, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+
+	sqlStatement.Format(KSQLQuery,
+		&KSimTableName, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());
 	
 	// Evaluate view
 	User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement)));
@@ -572,70 +551,100 @@
 	CDbColSet* colSet = view.ColSetL();
 	CleanupStack::PushL(colSet);
 
-	aSettings.iEAPType = EAPSettings::EEapSim;
-	
-	// Username
-	TPtrC username = view.ColDes(colSet->ColNo(cf_str_EAP_GSMSIM_manual_username_literal));
-	aSettings.iUsername.Copy(username);
-	
-	// For manual or automatic status.
-	TUint useUsername = view.ColUint(colSet->ColNo(cf_str_EAP_GSMSIM_use_manual_username_literal));
-	if(useUsername == EGSMSIMUseManualUsernameNo)
+	aSettings.iEAPExpandedType = *EapExpandedTypeSim.GetType();
+
 	{
-		aSettings.iUsernamePresent = EFalse;		
-	}
-	else
-	{
-		aSettings.iUsernamePresent = ETrue;		
+		// For manual or automatic username.
+		TUint useUsername = view.ColUint(colSet->ColNo(cf_str_EAP_GSMSIM_use_manual_username_literal));
+
+		aSettings.iUseAutomaticUsernamePresent = ETrue;
+
+		if(useUsername == EEapDbTrue)
+		{
+			aSettings.iUseAutomaticUsername = EFalse;		
+		}
+		else
+		{
+			aSettings.iUseAutomaticUsername = ETrue;		
+		}
 	}
-	
-	// Realm
-	TPtrC realm = view.ColDes(colSet->ColNo(cf_str_EAP_GSMSIM_manual_realm_literal));
-	aSettings.iRealm.Copy(realm);
-	
-	// For manual or automatic status.
-	TUint useRealm = view.ColUint(colSet->ColNo(cf_str_EAP_GSMSIM_use_manual_realm_literal));
-	if(useRealm == EGSMSIMUseManualRealmNo)
-	{
-		aSettings.iRealmPresent = EFalse;
-	}
-	else
+
 	{
-		aSettings.iRealmPresent = ETrue;
-	}
-	
-	TInt usePseudonym = view.ColUint(colSet->ColNo(cf_str_EAP_GSMSIM_use_pseudonym_identity_literal));
-	
-	if (usePseudonym == EGSMSIMUsePseudonymIdNotValid)
-	{
-		aSettings.iUsePseudonymsPresent = EFalse;
-	}
-	else
-	{
-		if (usePseudonym == EGSMSIMUsePseudonymIdNo)
+		// For manual or automatic realm.
+		TUint useRealm = view.ColUint(colSet->ColNo(cf_str_EAP_GSMSIM_use_manual_realm_literal));
+
+		aSettings.iUseAutomaticRealmPresent = ETrue;
+
+		if(useRealm == EEapDbTrue)
 		{
-			aSettings.iUsePseudonyms = EFalse;
+			aSettings.iUseAutomaticRealm = EFalse;
 		}
 		else
 		{
-			aSettings.iUsePseudonyms = ETrue;
+			aSettings.iUseAutomaticRealm = ETrue;
 		}
+	}
+
+	{
+		// Username
+		TPtrC username = view.ColDes(colSet->ColNo(cf_str_EAP_GSMSIM_manual_username_literal));
+
+		aSettings.iUsernamePresent = ETrue;
+
+		aSettings.iUsername.Copy(username);
+	}
+
+	{
+		// Realm
+		TPtrC realm = view.ColDes(colSet->ColNo(cf_str_EAP_GSMSIM_manual_realm_literal));
+
+		aSettings.iRealmPresent = ETrue;
+
+		aSettings.iRealm.Copy(realm);
+	}
+
+	{
+		TInt usePseudonym = view.ColUint(colSet->ColNo(cf_str_EAP_GSMSIM_use_pseudonym_identity_literal));
 		
-		aSettings.iUsePseudonymsPresent = ETrue;		
-	}	
-	
-	// Session validity time	
-	TInt64 maxSessionTimeMicro = view.ColInt64(colSet->ColNo(cf_str_EAP_GSMSIM_max_session_validity_time_literal));
-	
-	// Convert the time to minutes.	
-	TInt64 maxSessionTimeMin = maxSessionTimeMicro / KMicroSecsInAMinute;
-	
-	aSettings.iSessionValidityTime = static_cast<TUint>(maxSessionTimeMin);
-	aSettings.iSessionValidityTimePresent = ETrue;
-	
-	CleanupStack::PopAndDestroy(3); // view, colset, buf
+		if (usePseudonym == EEapDbNotValid)
+		{
+			aSettings.iUsePseudonymsPresent = EFalse;
+		}
+		else
+		{
+			if (usePseudonym == EEapDbFalse)
+			{
+				aSettings.iUsePseudonyms = EFalse;
+			}
+			else
+			{
+				aSettings.iUsePseudonyms = ETrue;
+			}
+			
+			aSettings.iUsePseudonymsPresent = ETrue;		
+		}	
+	}
+
+	{
+		// Session validity time	
+		TInt64 maxSessionTimeMicro = view.ColInt64(colSet->ColNo(cf_str_EAP_GSMSIM_max_session_validity_time_literal));
+		
+		// Convert the time to minutes.	
+		TInt64 maxSessionTimeMin = maxSessionTimeMicro / KMicroSecsInAMinute;
+		
+		aSettings.iSessionValidityTime = static_cast<TUint>(maxSessionTimeMin);
+		aSettings.iSessionValidityTimePresent = ETrue;
+	}
+
+	CleanupStack::PopAndDestroy(colSet);
+	CleanupStack::PopAndDestroy(&view);
+	CleanupStack::PopAndDestroy(buf);
+
+	EAP_TRACE_SETTINGS(&aSettings);
 }
 
+// ----------------------------------------------------------
+
 void EapSimDbUtils::CopySettingsL(
 	RDbNamedDatabase& aDatabase, 		
 	const TIndexType aSrcIndexType,
@@ -645,25 +654,37 @@
 	const TInt aDestIndex,
 	const eap_type_value_e aDestTunnelingType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aSrcTunnelingVendorType = aSrcTunnelingType.get_vendor_type();
-	TUint aDestTunnelingVendorType = aDestTunnelingType.get_vendor_type();
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapSimDbUtils::CopySettingsL(): -Start- aSrcIndexType=%d, aSrcIndex=%d, aSrcTunnelingType=0xfe%06x%08x\n"),
+		aSrcIndexType,
+		aSrcIndex,
+		aSrcTunnelingType.get_vendor_id(),
+		aSrcTunnelingType.get_vendor_type()));
+	
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapSimDbUtils::CopySettingsL(): -Start- aDestIndexType=%d, aDestTunnelingType=0xfe%06x%08x\n"),
+		aDestIndexType,
+		aDestIndex,
+		aDestTunnelingType.get_vendor_id(),
+		aDestTunnelingType.get_vendor_type()));
 
-#else
-
-	TUint aSrcTunnelingVendorType = static_cast<TUint>(aSrcTunnelingType);
-	TUint aDestTunnelingVendorType = static_cast<TUint>(aDestTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapSimDbUtils::CopySettingsL()\n"));
 
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
-	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
+	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
 
-	sqlStatement.Format(KSQL, &KSimTableName, 
-		&KServiceType, aSrcIndexType, &KServiceIndex, aSrcIndex, &KTunnelingType, aSrcTunnelingVendorType);
+	sqlStatement.Format(KSQL,
+		&KSimTableName, 
+		&KServiceType,
+		aSrcIndexType,
+		&KServiceIndex,
+		aSrcIndex,
+		&KTunnelingTypeVendorId,
+		aSrcTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aSrcTunnelingType.get_vendor_type());
 	
 	RDbView view;
 	
@@ -694,112 +715,144 @@
 	CleanupStack::PushL(colSet);
 		
 	view.SetColL(colSet->ColNo(KServiceType), static_cast<TUint>(aDestIndexType));
-    
     view.SetColL(colSet->ColNo(KServiceIndex), aDestIndex);
-    
-    view.SetColL(colSet->ColNo(KTunnelingType), aDestTunnelingVendorType);
+	view.SetColL(colSet->ColNo(KTunnelingTypeVendorId), aDestTunnelingType.get_vendor_id());
+	view.SetColL(colSet->ColNo(KTunnelingType), aDestTunnelingType.get_vendor_type());
 
     view.PutL();
     	
-	CleanupStack::PopAndDestroy(3); // view, colset, buf
+	CleanupStack::PopAndDestroy(colSet);
+	CleanupStack::PopAndDestroy(&view);
+	CleanupStack::PopAndDestroy(buf);
 }
 
+// ----------------------------------------------------------
+
 void EapSimDbUtils::DeleteConfigurationL(	
 	const TIndexType aIndexType,
 	const TInt aIndex,
 	const eap_type_value_e aTunnelingType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapSimDbUtils::DeleteConfigurationL(): -Start- aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type()));
 
-#else
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapSimDbUtils::DeleteConfigurationL()\n"));
 
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
+	RDbNamedDatabase aDatabase;
+	RFs aFileServerSession;
 
-	RDbs session;
-	RDbNamedDatabase database;
-	// Connect to the DBMS server.
-	User::LeaveIfError(session.Connect());
-	CleanupClosePushL(session);	
-		
-#ifdef SYMBIAN_SECURE_DBMS
+	TInt error(KErrNone);
+	TFileName aPrivateDatabasePathName;
 	
-	// Create the secure shared database with the specified secure policy.
-	// Database will be created in the data caging path for DBMS (C:\private\100012a5).
-	
-	TInt err = database.Create(session, KDatabaseName, KSecureUIDFormat);
-	
-	if(err == KErrNone)
+	EapPluginTools::CreateDatabaseLC(
+		aDatabase,
+		aFileServerSession,
+		error,
+		KEapSimDatabaseName,
+		aPrivateDatabasePathName);
+
+	if(error == KErrNone)
 	{
 		// Database was created so it was empty. No need for further actions.
-		database.Destroy();
-		CleanupStack::PopAndDestroy();
+		aDatabase.Destroy();
+		CleanupStack::PopAndDestroy(&aDatabase);
+		CleanupStack::PopAndDestroy(&aFileServerSession);
 		return;
-		
-	} 
-	else if (err != KErrAlreadyExists) 
+	}
+	else if (error != KErrAlreadyExists) 
 	{
-		User::LeaveIfError(err);
+		User::LeaveIfError(error);
 	}
 	
-	// Database existed, open it.
-	User::LeaveIfError(database.Open(session, KDatabaseName, KSecureUIDFormat));
-	CleanupClosePushL(database);
-		
-#else
-	// For non-secured database. The database will be created in the old location (c:\system\data).
-	
-	RFs fsSession;		
-	User::LeaveIfError(fsSession.Connect());
-	CleanupClosePushL(fsSession);	
-	TInt err = database.Create(fsSession, KDatabaseName);
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapSimDbUtils::DeleteConfigurationL(): calls aDatabase.Open()\n")));
+
+	error = aDatabase.Open(aFileServerSession, aPrivateDatabasePathName);
 
-	if(err == KErrNone)
-	{
-		// Database was created so it was empty. No need for further actions.
-		database.Destroy();
-		CleanupStack::PopAndDestroy(2); // fsSession, database session
-		return;
-		
-	} 
-	else if (err != KErrAlreadyExists) 
-	{
-		User::LeaveIfError(err);
-	}
-	
-	CleanupStack::PopAndDestroy(); // close fsSession
-	
-	User::LeaveIfError(database.Open(session, KDatabaseName));
-	CleanupClosePushL(database);		
-	    
-#endif // #ifdef SYMBIAN_SECURE_DBMS
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapSimDbUtils::DeleteConfigurationL(): Opened private DB for EAP-SIM. error=%d\n"), error));
+
+	User::LeaveIfError(error);
 
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapSimDbUtils::DeleteConfigurationL(): calls sqlStatement.Format()\n")));
+
 	// Main settings table
-	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQL, &KSimTableName, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+
+	sqlStatement.Format(
+		KSQL,
+		&KSimTableName, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());
+
 	// Evaluate view
 	RDbView view;
-	User::LeaveIfError(view.Prepare(database,TDbQuery(sqlStatement), TDbWindow::EUnlimited));
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapSimDbUtils::DeleteConfigurationL(): calls view.Prepare()\n")));
+
+	error = view.Prepare(aDatabase, TDbQuery(sqlStatement), TDbWindow::EUnlimited);
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapSimDbUtils::DeleteConfigurationL(): view.Prepare(), error=%d\n"), error));
+
+	User::LeaveIfError(error);
+
 	CleanupClosePushL(view);
-	User::LeaveIfError(view.EvaluateAll());
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapSimDbUtils::DeleteConfigurationL(): calls view.EvaluateAll()\n")));
+
+	error = view.EvaluateAll();
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapSimDbUtils::DeleteConfigurationL(): view.EvaluateAll(), error=%d\n"), error));
+
+	User::LeaveIfError(error);
 
 	// Delete rows
 	if (view.FirstL())
 	{		
-		do {
+		do
+		{
+			EAP_TRACE_DEBUG_SYMBIAN((_L("EapSimDbUtils::DeleteConfigurationL(): calls view.DeleteL()\n")));
+
 			view.DeleteL();
-		} while (view.NextL() != EFalse);
+		}
+		while (view.NextL() != EFalse);
+
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapSimDbUtils::DeleteConfigurationL(): All rows deleted.\n")));
+
+	}
+	else
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapSimDbUtils::DeleteConfigurationL(): No rows to delete.\n")));
 	}
 
-	// Close database
-	CleanupStack::PopAndDestroy(4); // view, buf, database, session
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapSimDbUtils::DeleteConfigurationL(): calls CleanupStack::PopAndDestroy(&view)\n")));
+
+	CleanupStack::PopAndDestroy(&view);
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapSimDbUtils::DeleteConfigurationL(): calls CleanupStack::PopAndDestroy(buf)\n")));
+
+	CleanupStack::PopAndDestroy(buf);
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapSimDbUtils::DeleteConfigurationL(): calls CleanupStack::PopAndDestroy(&aDatabase)\n")));
+
+	CleanupStack::PopAndDestroy(&aDatabase);
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapSimDbUtils::DeleteConfigurationL(): calls CleanupStack::PopAndDestroy(&aFileServerSession)\n")));
+
+	CleanupStack::PopAndDestroy(&aFileServerSession);
 }
 
+// ----------------------------------------------------------
+
 // End of file
--- a/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/src/EapSimProxy.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/src/EapSimProxy.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: 9.1.2 %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/src/EapSimUiConnection.cpp	Thu May 13 22:51:27 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,131 +0,0 @@
-/*
-* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  EAP and WLAN authentication protocols.
-*
-*/
-
-/*
-* %version: 11.1.2 %
-*/
-
-// This is enumeration of EAPOL source code.
-#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
-	#undef EAP_FILE_NUMBER_ENUM
-	#define EAP_FILE_NUMBER_ENUM 213 
-	#undef EAP_FILE_NUMBER_DATE 
-	#define EAP_FILE_NUMBER_DATE 1127594498 
-#endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
-
-#include "EapSimDbUtils.h"
-#include <EapSimUiConnection.h>
-#include <EapSimUiDataConnection.h>
-
-CEapSimUiConnection::CEapSimUiConnection(
-    const TIndexType aIndexType,
-    const TInt aIndex,
-    const TInt aTunnelingType)
-    : iIndexType(aIndexType)
-    , iIndex(aIndex)
-    , iTunnelingType(aTunnelingType)
-    , iIsConnected(EFalse)
-    , iDataConn(NULL)
-{
-}
-
-
-CEapSimUiConnection::~CEapSimUiConnection()
-{
-}
-
-
-TInt CEapSimUiConnection::Connect()
-{
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	eap_type_value_e tunnelingType(static_cast<eap_type_ietf_values_e>(iTunnelingType));
-
-#else
-
-	eap_type_value_e tunnelingType = static_cast<eap_type_value_e>(iTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
-	TRAPD(err, EapSimDbUtils::OpenDatabaseL(
-		iDbNamedDatabase, 
-		iDbs, 
-		iIndexType, 
-		iIndex, 
-		tunnelingType));
-    if (err == KErrNone)
-    {
-        iIsConnected = ETrue;
-    }
-
-    return err;
-}
-
-
-TInt CEapSimUiConnection::Close()
-{
-    if (iIsConnected)
-    {
-        iDbNamedDatabase.Close();
-        iDbs.Close();
-    }
-    iIsConnected = EFalse;
-
-    return KErrNone;
-}
-
-
-CEapSimUiDataConnection * CEapSimUiConnection::GetDataConnection()
-{
-    if (!iDataConn)
-    {
-        iDataConn = new CEapSimUiDataConnection(this);
-    }
-
-    return iDataConn;
-}
-
-TInt CEapSimUiConnection::GetDatabase(RDbNamedDatabase & aDatabase)
-{
-    if (iIsConnected == EFalse)
-    {
-        return KErrSessionClosed;
-    }
-
-    aDatabase = iDbNamedDatabase;
-    return KErrNone;
-}
-
-
-TIndexType CEapSimUiConnection::GetIndexType()
-{
-    return iIndexType;
-}
-
-
-TInt CEapSimUiConnection::GetIndex()
-{
-    return iIndex;
-}
-
-
-TInt CEapSimUiConnection::GetTunnelingType()
-{
-    return iTunnelingType;
-}
-
-// End of file
--- a/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/src/EapSimUiDataConnection.cpp	Thu May 13 22:51:27 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,277 +0,0 @@
-/*
-* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  EAP and WLAN authentication protocols.
-*
-*/
-
-/*
-* %version: 14.1.3.1.2 %
-*/
-
-// This is enumeration of EAPOL source code.
-#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
-	#undef EAP_FILE_NUMBER_ENUM
-	#define EAP_FILE_NUMBER_ENUM 215 
-	#undef EAP_FILE_NUMBER_DATE 
-	#define EAP_FILE_NUMBER_DATE 1127594498 
-#endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
-
-#include <e32base.h>
-#include "EapSimDbUtils.h"
-#include "EapSimDbParameterNames.h"
-#include "EapSimDbDefaults.h"
-#include <EapSimUiConnection.h>
-#include <EapSimUiDataConnection.h>
-#include <EapSimUiSimData.h>
-#include "eap_am_trace_symbian.h"
-
-const TUint KMaxSqlQueryLength = 256;
-
-CEapSimUiDataConnection::CEapSimUiDataConnection(CEapSimUiConnection * aUiConn)
-: iIsOpened(EFalse)
-, iUiConn(aUiConn)
-, iColSet(NULL)
-, iDataPtr(NULL)
-{
-}
-
-
-CEapSimUiDataConnection::~CEapSimUiDataConnection()
-{
-    if (iUiConn)
-    {
-        Close();
-        iUiConn = NULL;
-    }
-}
-
-
-TInt CEapSimUiDataConnection::Open()
-{
-    if (iIsOpened)
-    {
-        return KErrAlreadyExists;
-    }
-
-    TInt err = iUiConn->GetDatabase(iDatabase);
-    if (err != KErrNone)
-    {
-        return err;
-    }
-
-    iIsOpened = ETrue;
-    return KErrNone;
-}
-
-
-TInt CEapSimUiDataConnection::GetData(CEapSimUiSimData ** aDataPtr)
-{
-    if (aDataPtr == NULL)
-    {
-        return KErrArgument;
-    }
-    if (iIsOpened == EFalse)
-    {
-        return KErrSessionClosed;
-    }
-    iDataPtr = new CEapSimUiSimData();
-    if (!iDataPtr)
-    {
-        return KErrNoMemory;
-    }
-
-    TRAPD(err, FetchDataL());
-    if (err != KErrNone)
-    {
-		delete iDataPtr;
-		iDataPtr = NULL;
-		
-		delete iColSet;
-		iColSet = NULL;
-
-        iView.Close();
-        
-        return err;
-    }
-
-    *aDataPtr = iDataPtr;
-
-    return KErrNone;
-}
-
-
-TInt CEapSimUiDataConnection::Update()
-{
-    TRAPD(err, iView.UpdateL());
-    if (err != KErrNone)
-    {
-        return err;
-    }
-    
-	// Check if length of username and realm are less than the max length possible in DB.
-	if(iDataPtr->GetManualUsername().Length() > KMaxManualUsernameLengthInDB
-		|| iDataPtr->GetManualRealm().Length() > KMaxManualRealmLengthInDB)
-	{
-		// Username or realm too long. Can not be stored in DB.
-		EAP_TRACE_DEBUG_SYMBIAN((_L("CEapSimUiDataConnection::Update: Too long username or realm. Length: UN=%d, Realm=%d\n"),
-			iDataPtr->GetManualUsername().Length(),
-			iDataPtr->GetManualRealm().Length()));
-		
-		return KErrArgument;
-	}
-    
-    TRAP(err, iView.SetColL(iColSet->ColNo(cf_str_EAP_GSMSIM_manual_username_literal), iDataPtr->GetManualUsername()));
-    if (err != KErrNone)
-    {
-        return err;
-    }
-
-    TRAP(err, iView.SetColL(iColSet->ColNo(cf_str_EAP_GSMSIM_manual_realm_literal), iDataPtr->GetManualRealm()));
-    if (err != KErrNone)
-    {
-        return err;
-    }
-
-    if (*(iDataPtr->GetUseManualUsername()))
-    {
-        TRAP(err, iView.SetColL(iColSet->ColNo(cf_str_EAP_GSMSIM_use_manual_username_literal), EGSMSIMUseManualUsernameYes));
-		if (err != KErrNone)
-		{
-			return err;
-		}
-    }
-    else
-    {
-        TRAP(err, iView.SetColL(iColSet->ColNo(cf_str_EAP_GSMSIM_use_manual_username_literal), EGSMSIMUseManualUsernameNo));
-		if (err != KErrNone)
-		{
-			return err;
-		}
-    }
-
-    if (*(iDataPtr->GetUseManualRealm()))
-    {
-        TRAP(err, iView.SetColL(iColSet->ColNo(cf_str_EAP_GSMSIM_use_manual_realm_literal), EGSMSIMUseManualRealmYes));
-		if (err != KErrNone)
-		{
-			return err;
-		}
-    }
-    else
-    {
-        TRAP(err, iView.SetColL(iColSet->ColNo(cf_str_EAP_GSMSIM_use_manual_realm_literal), EGSMSIMUseManualRealmNo));
-		if (err != KErrNone)
-		{
-			return err;
-		}
-    }
-
-	// Last full authentication time should be made zero when EAP configurations are modified.
-	// This makes sure that the next authentication with this EAP would be full authentication
-	// instead of reauthentication even if the session is still valid.
-	
-	TRAP(err, iView.SetColL(iColSet->ColNo(KGSMSIMLastFullAuthTime), default_FullAuthTime));
-	if (err != KErrNone)
-	{
-		return err;
-	}
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("Session Validity: Resetting Full Auth Time since EAP-SIM settings are modified\n")));
-
-    TRAP(err, iView.PutL());
-        
-    return err;
-}
-
-
-TInt CEapSimUiDataConnection::Close()
-{
-    if (iIsOpened == EFalse)
-    {
-        return KErrNone;
-    }
-
-	delete iDataPtr;
-	iDataPtr = NULL;
-	
-	delete iColSet;
-	iColSet = NULL;
-
-    iView.Close();
-
-    iUiConn = NULL;
-    return KErrNone;
-}
-
-
-void CEapSimUiDataConnection::FetchDataL()
-{
-	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
-	TPtr sqlStatement = buf->Des();
-
-	// Form the query. Query everything.
-	_LIT(KSQLQuery, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLQuery,
-						&KSimTableName,
-						&KServiceType,
-						iUiConn->GetIndexType(),
-						&KServiceIndex,
-						iUiConn->GetIndex(),
-						&KTunnelingType, 
-						iUiConn->GetTunnelingType());
-	// Evaluate view
-	User::LeaveIfError(iView.Prepare(iDatabase, TDbQuery(sqlStatement)));
-	User::LeaveIfError(iView.EvaluateAll());	
-	// Get the first (and only) row
-	iView.FirstL();
-	iView.GetL();				
-	// Get column set so we get the correct column numbers
-	delete iColSet;
-	iColSet = NULL;
-	iColSet = iView.ColSetL();
-
-	// Start fetching the values
-
-	// use manual username
-	TUint intValue = iView.ColUint(iColSet->ColNo(cf_str_EAP_GSMSIM_use_manual_username_literal));
-    if (intValue == 0)
-    {
-        *(iDataPtr->GetUseManualUsername()) = EFalse;
-    }
-    else
-    {
-        *(iDataPtr->GetUseManualUsername()) = ETrue;
-    }
-
-	// use manual realm
-	intValue = iView.ColUint(iColSet->ColNo(cf_str_EAP_GSMSIM_use_manual_realm_literal));
-    if (intValue == 0)
-    {
-        *(iDataPtr->GetUseManualRealm()) = EFalse;
-    }
-    else
-    {
-        *(iDataPtr->GetUseManualRealm()) = ETrue;
-    }
-
-    // manual username
-    iDataPtr->GetManualUsername().Copy(iView.ColDes16(iColSet->ColNo(cf_str_EAP_GSMSIM_manual_username_literal)));
-
-	// manual realm
-	iDataPtr->GetManualRealm().Copy(iView.ColDes16(iColSet->ColNo(cf_str_EAP_GSMSIM_manual_realm_literal)));
-
-    CleanupStack::PopAndDestroy(buf);
-}
-
-// End of file
--- a/eapol/eapol_framework/eapol_symbian/am/type/gsmsim/symbian/plugin/src/EapSimUiSimData.cpp	Thu May 13 22:51:27 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-/*
-* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  EAP and WLAN authentication protocols.
-*
-*/
-
-/*
-* %version: 11 %
-*/
-
-// This is enumeration of EAPOL source code.
-#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
-	#undef EAP_FILE_NUMBER_ENUM
-	#define EAP_FILE_NUMBER_ENUM 217 
-	#undef EAP_FILE_NUMBER_DATE 
-	#define EAP_FILE_NUMBER_DATE 1127594498 
-#endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
-
-#include <EapSimUiSimData.h>
-
-
-CEapSimUiSimData::CEapSimUiSimData()
-{
-}
-
-
-CEapSimUiSimData::~CEapSimUiSimData()
-{
-}
-
-
-TDes& CEapSimUiSimData::GetManualUsername()
-{
-    return iManualUsername;
-}
-
-
-TDes& CEapSimUiSimData::GetManualRealm()
-{
-    return iManualRealm;
-}
-
-
-TBool * CEapSimUiSimData::GetUseManualUsername()
-{
-    return &iUseManualUsername;
-}
-
-
-TBool * CEapSimUiSimData::GetUseManualRealm()
-{
-    return &iUseManualRealm;
-}
-
-// End of file
--- a/eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/eap_am_type_mschapv2_symbian.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/eap_am_type_mschapv2_symbian.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 33 %
+* %version: 30.1.14 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -42,7 +42,7 @@
 #include "EapMsChapV2NotifierUids.h"
 #include "eap_state_notification.h"
 
-#include "eap_am_trace_symbian.h"
+#include "EapTraceSymbian.h"
 
 const TUint KMaxSqlQueryLength = 256;
 const TUint KMaxDBFieldNameLength = 255;
@@ -70,6 +70,12 @@
 	delete m_username_password_io_ptr;
 	delete m_username_password_io_pckg_ptr;
 
+	if (iEapAuthNotifier != 0)
+		{
+		delete iEapAuthNotifier;
+		iEapAuthNotifier = 0;
+		}
+
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 }
 
@@ -85,36 +91,9 @@
 		(EAPL("eap_am_type_mschapv2_symbian_c::shutdown(): this = 0x%08x\n"),
 		this));
 		
-	if( IsActive() )
-	{
-		Cancel(); // Cancel only if active.
-	}  
-	else
-	{
-		if( m_is_notifier_connected )
-		{
-		
-		EAP_TRACE_DEBUG(
-			m_am_tools, 
-			TRACE_FLAGS_DEFAULT, 
-			(EAPL("eap_am_type_mschapv2_symbian_c::shutdown - calling m_notifier.CancelNotifier(..)\n")));
-			
-		TInt error = KErrNone;			
-		EAP_UNREFERENCED_PARAMETER(error);
-		error = m_notifier.CancelNotifier(KEapMsChapV2UsernamePasswordUid);
-	
-		EAP_TRACE_DEBUG(
-			m_am_tools, 
-			TRACE_FLAGS_DEFAULT, 
-			(EAPL("eap_am_type_mschapv2_symbian_c::shutdown - calling m_notifier.Close(), prev error=%d\n"),
-			error));
-		
-		m_notifier.Close(); // Call close only if it is connected.	
-		
-		m_is_notifier_connected = false;
-		}
-	}
-	
+
+
+
 	m_shutdown_was_called = true;
 
 	EAP_TRACE_DEBUG(
@@ -156,21 +135,14 @@
 , m_is_client(aIsClient)
 , m_is_valid(false)
 , m_shutdown_was_called(false)
-, m_is_notifier_connected(false)
+
 , m_max_session_time(0)
+	, iEapAuthNotifier(0)	
+
+
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 	
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	m_tunneling_vendor_type = m_tunneling_type.get_vendor_type();
-
-#else
-
-	m_tunneling_vendor_type = static_cast<TUint>(m_tunneling_type);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES	
-
 	if (receive_network_id != 0
 		&& receive_network_id->get_is_valid_data() == true)
 	{
@@ -232,8 +204,15 @@
 	// Open/create the database
 	EapMsChapV2DbUtils::OpenDatabaseL(m_database, m_session, m_index_type, m_index, m_tunneling_type);
 
-	m_username_password_io_ptr = new(ELeave) TEapMsChapV2UsernamePasswordInfo;
-	m_username_password_io_pckg_ptr = new(ELeave) TPckg<TEapMsChapV2UsernamePasswordInfo> (*m_username_password_io_ptr);
+	m_username_password_io_ptr = new(ELeave) CEapAuthNotifier::TEapDialogInfo;
+	m_username_password_io_pckg_ptr = new(ELeave) TPckg<CEapAuthNotifier::TEapDialogInfo> (*m_username_password_io_ptr);
+
+		EAP_TRACE_DATA_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_am_type_mschapv2_symbian_c::ConstructL m_username_password_io_pckg_ptr"),
+			m_username_password_io_pckg_ptr->Ptr(),
+			m_username_password_io_pckg_ptr->Size()));	
 
 	CActiveScheduler::Add(this);
 
@@ -289,6 +268,227 @@
 }
 
 //--------------------------------------------------
+EAP_FUNC_EXPORT void eap_am_type_mschapv2_symbian_c::DlgComplete( TInt aStatus )
+	{
+	if (aStatus == KErrCancel)
+		{
+		EAP_TRACE_DEBUG(
+			m_am_tools, 
+			TRACE_FLAGS_DEFAULT, 
+			(EAPL("eap_am_type_mschapv2_symbian_c::RunL - User seems to have cancelled the prompt. Stop Immediately.\n")));
+		
+		// User cancelled the password prompt. Stop everything.
+		// Appropriate error notification is sent from finish_unsuccessful_authentication.
+		get_am_partner()->finish_unsuccessful_authentication(true);
+		
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
+		return;
+		}
+
+	if (aStatus != KErrNone)
+		{
+		// Something is very wrong...
+		EAP_TRACE_ERROR(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("ERROR: EAP - MS-Chap-V2 notifier or dialog, aStatus=%d\n"), aStatus));
+
+		send_error_notification(eap_status_authentication_failure);
+
+		get_am_partner()->finish_unsuccessful_authentication(false);
+
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
+		return;
+		}
+
+	eap_status_e status(eap_status_ok);
+
+	switch (m_state)
+		{
+		case EHandlingUsernamePasswordQuery:
+			{
+			if (m_username_password_io_ptr->iPasswordPromptEnabled)
+				{
+				*m_password_prompt_enabled = true;
+				}
+			else
+				{
+				*m_password_prompt_enabled = false;
+				}
+
+				{
+				eap_variable_data_c tmp_username_unicode(
+					m_am_tools);
+
+				status = tmp_username_unicode.set_buffer(
+					m_username_password_io_ptr->iUsername.Ptr(),
+					m_username_password_io_ptr->iUsername.Size(),
+					false,
+					false);
+				if (status != eap_status_ok)
+					{
+					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+					(void) EAP_STATUS_RETURN(m_am_tools, status);
+					return;
+					}
+
+				eap_variable_data_c tmp_username_utf8(m_am_tools);
+				status = m_am_tools->convert_unicode_to_utf8(tmp_username_utf8, tmp_username_unicode);
+				if (status != eap_status_ok)
+					{
+					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+					(void) EAP_STATUS_RETURN(m_am_tools, status);
+					return;
+					}
+
+				status = m_username_utf8->set_copy_of_buffer(&tmp_username_utf8);
+				if (status != eap_status_ok)
+					{
+					get_am_partner()->finish_unsuccessful_authentication(false);
+					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+					(void) EAP_STATUS_RETURN(m_am_tools, status);
+					return;
+					}
+				}
+
+				{
+				eap_variable_data_c tmp_password_unicode(
+					m_am_tools);
+
+				status = tmp_password_unicode.set_buffer(
+					m_username_password_io_ptr->iPassword.Ptr(),
+					m_username_password_io_ptr->iPassword.Size(),
+					false,
+					false);
+				if (status != eap_status_ok)
+					{
+					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+					(void) EAP_STATUS_RETURN(m_am_tools, status);
+					return;
+					}
+
+				eap_variable_data_c tmp_password_utf8(m_am_tools);
+				status = m_am_tools->convert_unicode_to_utf8(tmp_password_utf8, tmp_password_unicode);
+				if (status != eap_status_ok)
+					{
+					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+					(void) EAP_STATUS_RETURN(m_am_tools, status);
+					return;
+					}
+
+				status = m_password_utf8->set_copy_of_buffer(&tmp_password_utf8);
+				if (status != eap_status_ok)
+					{
+					get_am_partner()->finish_unsuccessful_authentication(false);
+					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
+					(void) EAP_STATUS_RETURN(m_am_tools, status);
+					return;
+					}
+				}
+
+			// Store username and/or password if "Prompt for username" is enabled
+			status = update_username_password();
+			if (status != eap_status_ok)
+				{
+				get_am_partner()->finish_unsuccessful_authentication(false);
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
+				return;
+				}
+
+			if (m_is_identity_query)
+				{
+				status = get_am_partner()->complete_eap_identity_query();
+				}
+			else
+				{
+				status = get_am_partner()->complete_failure_retry_response();
+				}
+			}
+		break;
+
+	case EHandlingChangePasswordQuery:
+		{
+				{
+				eap_variable_data_c tmp_password_unicode(
+					m_am_tools);
+
+				status = tmp_password_unicode.set_buffer(
+					m_username_password_io_ptr->iPassword.Ptr(),
+					m_username_password_io_ptr->iPassword.Size(),
+					false,
+					false);
+				if (status != eap_status_ok)
+					{
+					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+					(void) EAP_STATUS_RETURN(m_am_tools, status);
+					return;
+					}
+
+				eap_variable_data_c tmp_password_utf8(m_am_tools);
+				status = m_am_tools->convert_unicode_to_utf8(tmp_password_utf8, tmp_password_unicode);
+				if (status != eap_status_ok)
+					{
+					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+					(void) EAP_STATUS_RETURN(m_am_tools, status);
+					return;
+					}
+
+				eap_status_e status = m_password_utf8->set_copy_of_buffer(&tmp_password_utf8);
+				if (status != eap_status_ok)
+					{
+					get_am_partner()->finish_unsuccessful_authentication(false);
+					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
+					return;
+					}
+				}
+
+				{
+				eap_variable_data_c tmp_old_password_unicode(
+					m_am_tools);
+
+				status = tmp_old_password_unicode.set_buffer(
+					m_username_password_io_ptr->iOldPassword.Ptr(),
+					m_username_password_io_ptr->iOldPassword.Size(),
+					false,
+					false);
+				if (status != eap_status_ok)
+					{
+					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+					(void) EAP_STATUS_RETURN(m_am_tools, status);
+					return;
+					}
+
+				eap_variable_data_c tmp_old_password_utf8(m_am_tools);
+				status = m_am_tools->convert_unicode_to_utf8(tmp_old_password_utf8, tmp_old_password_unicode);
+				if (status != eap_status_ok)
+					{
+					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+					(void) EAP_STATUS_RETURN(m_am_tools, status);
+					return;
+					}
+
+				status = m_old_password_utf8->set_copy_of_buffer(&tmp_old_password_utf8);
+				if (status != eap_status_ok)
+					{
+					get_am_partner()->finish_unsuccessful_authentication(false);
+					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
+					return;
+					}
+				}
+
+			status = get_am_partner()->complete_change_password_query();
+			}
+		break;
+
+	default:
+		EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: EAP - MS-Chap-V2 illegal state in RunL.\n")));
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
+		return;		
+
+		}
+	}
+
+//--------------------------------------------------
 
 void eap_am_type_mschapv2_symbian_c::RunL()
 {
@@ -301,221 +501,6 @@
 		 EAPL("m_state, iStatus.Int()=%d\n"),
 		 m_state, iStatus.Int()));
 
-	if (iStatus.Int() == KErrCancel)
-	{
-		EAP_TRACE_DEBUG(
-			m_am_tools, 
-			TRACE_FLAGS_DEFAULT, 
-			(EAPL("eap_am_type_mschapv2_symbian_c::RunL - User seems to have cancelled the prompt. Stop Immediately.\n")));
-		
-		// User cancelled the password prompt. Stop everything.
-		// Appropriate error notification is sent from finish_unsuccessful_authentication.
-		get_am_partner()->finish_unsuccessful_authentication(true);
-		
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-		return;
-	}
-
-	if (iStatus.Int() != KErrNone)
-	{
-		// Something is very wrong...
-		EAP_TRACE_ERROR(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("ERROR: EAP - MS-Chap-V2 notifier or dialog, iStatus.Int()=%d\n"), iStatus.Int()));
-
-		send_error_notification(eap_status_authentication_failure);
-
-		get_am_partner()->finish_unsuccessful_authentication(false);
-
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-		return;
-	}
-
-	eap_status_e status(eap_status_ok);
-
-	switch (m_state)
-	{
-	case EHandlingUsernamePasswordQuery:
-		{
-			if (m_username_password_io_ptr->iPasswordPromptEnabled)
-			{
-				*m_password_prompt_enabled = true;
-			}
-			else
-			{
-				*m_password_prompt_enabled = false;
-			}
-
-			{
-				eap_variable_data_c tmp_username_unicode(
-					m_am_tools);
-
-				status = tmp_username_unicode.set_buffer(
-					m_username_password_io_ptr->iUsername.Ptr(),
-					m_username_password_io_ptr->iUsername.Size(),
-					false,
-					false);
-				if (status != eap_status_ok)
-				{
-					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-					(void) EAP_STATUS_RETURN(m_am_tools, status);
-					return;
-				}
-
-				eap_variable_data_c tmp_username_utf8(m_am_tools);
-				status = m_am_tools->convert_unicode_to_utf8(tmp_username_utf8, tmp_username_unicode);
-				if (status != eap_status_ok)
-				{
-					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-					(void) EAP_STATUS_RETURN(m_am_tools, status);
-					return;
-				}
-
-				status = m_username_utf8->set_copy_of_buffer(&tmp_username_utf8);
-				if (status != eap_status_ok)
-				{
-					get_am_partner()->finish_unsuccessful_authentication(false);
-					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-					(void) EAP_STATUS_RETURN(m_am_tools, status);
-					return;
-				}
-			}
-
-			{
-				eap_variable_data_c tmp_password_unicode(
-					m_am_tools);
-
-				status = tmp_password_unicode.set_buffer(
-					m_username_password_io_ptr->iPassword.Ptr(),
-					m_username_password_io_ptr->iPassword.Size(),
-					false,
-					false);
-				if (status != eap_status_ok)
-				{
-					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-					(void) EAP_STATUS_RETURN(m_am_tools, status);
-					return;
-				}
-
-				eap_variable_data_c tmp_password_utf8(m_am_tools);
-				status = m_am_tools->convert_unicode_to_utf8(tmp_password_utf8, tmp_password_unicode);
-				if (status != eap_status_ok)
-				{
-					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-					(void) EAP_STATUS_RETURN(m_am_tools, status);
-					return;
-				}
-
-				status = m_password_utf8->set_copy_of_buffer(&tmp_password_utf8);
-				if (status != eap_status_ok)
-				{
-					get_am_partner()->finish_unsuccessful_authentication(false);
-					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-					(void) EAP_STATUS_RETURN(m_am_tools, status);
-					return;
-				}
-			}
-
-			// Store username and/or password if "Prompt for username" is enabled
-			status = update_username_password();
-			if (status != eap_status_ok)
-			{
-				get_am_partner()->finish_unsuccessful_authentication(false);
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-				return;
-			}
-
-			if (m_is_identity_query)
-			{
-				status = get_am_partner()->complete_eap_identity_query();
-			}
-			else
-			{
-				status = get_am_partner()->complete_failure_retry_response();
-			}
-		}
-		break;
-
-	case EHandlingChangePasswordQuery:
-		{
-			{
-				eap_variable_data_c tmp_password_unicode(
-					m_am_tools);
-
-				status = tmp_password_unicode.set_buffer(
-					m_username_password_io_ptr->iPassword.Ptr(),
-					m_username_password_io_ptr->iPassword.Size(),
-					false,
-					false);
-				if (status != eap_status_ok)
-				{
-					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-					(void) EAP_STATUS_RETURN(m_am_tools, status);
-					return;
-				}
-
-				eap_variable_data_c tmp_password_utf8(m_am_tools);
-				status = m_am_tools->convert_unicode_to_utf8(tmp_password_utf8, tmp_password_unicode);
-				if (status != eap_status_ok)
-				{
-					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-					(void) EAP_STATUS_RETURN(m_am_tools, status);
-					return;
-				}
-
-				eap_status_e status = m_password_utf8->set_copy_of_buffer(&tmp_password_utf8);
-				if (status != eap_status_ok)
-				{
-					get_am_partner()->finish_unsuccessful_authentication(false);
-					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-					return;
-				}
-			}
-
-			{
-				eap_variable_data_c tmp_old_password_unicode(
-					m_am_tools);
-
-				status = tmp_old_password_unicode.set_buffer(
-					m_username_password_io_ptr->iOldPassword.Ptr(),
-					m_username_password_io_ptr->iOldPassword.Size(),
-					false,
-					false);
-				if (status != eap_status_ok)
-				{
-					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-					(void) EAP_STATUS_RETURN(m_am_tools, status);
-					return;
-				}
-
-				eap_variable_data_c tmp_old_password_utf8(m_am_tools);
-				status = m_am_tools->convert_unicode_to_utf8(tmp_old_password_utf8, tmp_old_password_unicode);
-				if (status != eap_status_ok)
-				{
-					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-					(void) EAP_STATUS_RETURN(m_am_tools, status);
-					return;
-				}
-
-				status = m_old_password_utf8->set_copy_of_buffer(&tmp_old_password_utf8);
-				if (status != eap_status_ok)
-				{
-					get_am_partner()->finish_unsuccessful_authentication(false);
-					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-					return;
-				}
-			}
-
-			status = get_am_partner()->complete_change_password_query();
-		}
-		break;
-
-	default:
-		EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: EAP - MS-Chap-V2 illegal state in RunL.\n")));
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-		return;		
-	}
 
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
 }
@@ -524,28 +509,13 @@
 
 void eap_am_type_mschapv2_symbian_c::DoCancel()
 {
-	if( m_is_notifier_connected )
-	{
-	EAP_TRACE_DEBUG(
-		m_am_tools, 
-		TRACE_FLAGS_DEFAULT, 
-		(EAPL("eap_am_type_mschapv2_symbian_c::DoCancel - calling m_notifier.CancelNotifier(..)\n")));
-			
-		TInt error = KErrNone;
-		EAP_UNREFERENCED_PARAMETER(error);
-		error = m_notifier.CancelNotifier(KEapMsChapV2UsernamePasswordUid);
+	if (iEapAuthNotifier != 0)
+		{
+		iEapAuthNotifier->Cancel();
+		}
 
-	EAP_TRACE_DEBUG(
-		m_am_tools, 
-		TRACE_FLAGS_DEFAULT, 
-		(EAPL("eap_am_type_mschapv2_symbian_c::DoCancel - calling m_notifier.Close(), prev error=%d\n"),
-		error));
-		
-		m_notifier.Close(); // Call close only if it is connected.	
-		
-		m_is_notifier_connected = false;
+
 	}
-}
 
 //--------------------------------------------------
 
@@ -604,16 +574,19 @@
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
-	_LIT(KSQLQueryRow, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLQueryRow,
-						&unicodeString,
-						&KMsChapV2TableName,
-						&KServiceType,
-						m_index_type,
-						&KServiceIndex,
-						m_index,
-						&KTunnelingType, 
-						m_tunneling_vendor_type);
+	_LIT(KSQLQueryRow, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	sqlStatement.Format(
+		KSQLQueryRow,
+		&unicodeString,
+		&KMsChapV2TableName,
+		&KServiceType,
+		m_index_type,
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType, 
+		m_tunneling_type.get_vendor_type());
 	
 	RDbView view;
 	User::LeaveIfError(view.Prepare(m_database, TDbQuery(sqlStatement), TDbWindow::EUnlimited));
@@ -750,18 +723,21 @@
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
-	_LIT(KSQLUpdate, "SELECT %S,%S,%S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLUpdate,
-						&cf_str_EAP_MSCHAPV2_username_literal,
-						&cf_str_EAP_MSCHAPV2_password_prompt_literal,
-						&cf_str_EAP_MSCHAPV2_password_literal,
-						&KMsChapV2TableName,
-						&KServiceType,
-						m_index_type,
-						&KServiceIndex,
-						m_index,
-						&KTunnelingType, 
-						m_tunneling_vendor_type);
+	_LIT(KSQLUpdate, "SELECT %S,%S,%S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	sqlStatement.Format(
+		KSQLUpdate,
+		&cf_str_EAP_MSCHAPV2_username_literal,
+		&cf_str_EAP_MSCHAPV2_password_prompt_literal,
+		&cf_str_EAP_MSCHAPV2_password_literal,
+		&KMsChapV2TableName,
+		&KServiceType,
+		m_index_type,
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType, 
+		m_tunneling_type.get_vendor_type());
 	
 	RDbView view;
 	User::LeaveIfError(view.Prepare(m_database, TDbQuery(sqlStatement), RDbView::EUpdatable));
@@ -821,7 +797,7 @@
 	if (*m_password_prompt_enabled)
 	{
 		// Username and password prompt flag is stored, password is cleared
-		view.SetColL(colSet->ColNo(cf_str_EAP_MSCHAPV2_password_prompt_literal), EMSCHAPV2PasswordPromptOn);
+		view.SetColL(colSet->ColNo(cf_str_EAP_MSCHAPV2_password_prompt_literal), EEapDbTrue);
 		view.SetColNullL(colSet->ColNo(cf_str_EAP_MSCHAPV2_password_literal));
 	}
 	else
@@ -853,7 +829,7 @@
 			User::Leave(KErrArgument);
 		}
 
-		view.SetColL(colSet->ColNo(cf_str_EAP_MSCHAPV2_password_prompt_literal), EMSCHAPV2PasswordPromptOff);
+		view.SetColL(colSet->ColNo(cf_str_EAP_MSCHAPV2_password_prompt_literal), EEapDbFalse);
 
 		// Length is ok. Set the value in DB.			
 		view.SetColL(colSet->ColNo(cf_str_EAP_MSCHAPV2_password_literal), password);
@@ -928,88 +904,70 @@
 	m_password_prompt_enabled = &password_prompt_enabled;
 	m_is_identity_query = is_identity_query;
 
-	if (!IsActive())
-	{
 		if (*m_password_prompt_enabled == true)
-		{
+			{
 			m_username_password_io_ptr->iPasswordPromptEnabled = ETrue; 
-		}
+			}
 		else
-		{
+			{
 			m_username_password_io_ptr->iPasswordPromptEnabled = EFalse; 
-		}
+			}
 
 		if (m_is_identity_query == true)
-		{
+			{
 			m_username_password_io_ptr->iIsIdentityQuery = ETrue; 
-		}
+			}
 		else
-		{
+			{
 			m_username_password_io_ptr->iIsIdentityQuery = EFalse; 
-		}
+			}
 
 
-		{
-			eap_variable_data_c tmp_username_unicode(m_am_tools);
-			eap_status_e status = m_am_tools->convert_utf8_to_unicode(tmp_username_unicode, *m_username_utf8);
-			if (status != eap_status_ok)
+		eap_variable_data_c tmp_username_unicode(m_am_tools);
+		eap_status_e status = m_am_tools->convert_utf8_to_unicode(tmp_username_unicode, *m_username_utf8);
+		if (status != eap_status_ok)
 			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
 			}
 
-			m_username_password_io_ptr->iUsername.Copy(
-				reinterpret_cast<TUint16 *> (
-					tmp_username_unicode.get_data(tmp_username_unicode.get_data_length())),
-					tmp_username_unicode.get_data_length() / 2); // 8bit -> 16bit
-		}
+		m_username_password_io_ptr->iUsername.Copy(
+			reinterpret_cast<TUint16 *> (
+				tmp_username_unicode.get_data(tmp_username_unicode.get_data_length())),
+				tmp_username_unicode.get_data_length() / 2); // 8bit -> 16bit
 
 
 		m_state = EHandlingUsernamePasswordQuery;
-		
-	EAP_TRACE_DEBUG(
-		m_am_tools, 
-		TRACE_FLAGS_DEFAULT, 
-		(EAPL(" eap_am_type_mschapv2_symbian_c::show_username_password_dialog - before m_notifier.Connect(), m_is_notifier_connected=%d\n"),
-		m_is_notifier_connected));
-		
-		if( !m_is_notifier_connected )
-		{
-			TInt error = m_notifier.Connect();
-
-	EAP_TRACE_DEBUG(
-		m_am_tools, 
-		TRACE_FLAGS_DEFAULT, 
-		(EAPL(" eap_am_type_mschapv2_symbian_c::show_username_password_dialog - m_notifier.Connect() returned error=%d\n"),
-		error));
-			
-			if( error != KErrNone)
-			{
-				// Can not connect to notifier.
-				return EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(error));		
-			}
-			
-			m_is_notifier_connected = true; // Got connectted to notifier.
-		}
 
 	EAP_TRACE_DEBUG(
 		m_am_tools, 
 		TRACE_FLAGS_DEFAULT, 
 		(EAPL(" eap_am_type_mschapv2_symbian_c::show_username_password_dialog - before m_notifier.StartNotifierAndGetResponse()\n")));		
 
-		m_notifier.StartNotifierAndGetResponse(
-			iStatus, 
-			KEapMsChapV2UsernamePasswordUid, 
-			*m_username_password_io_pckg_ptr, 
-			*m_username_password_io_pckg_ptr);
+	    TEapExpandedType aEapType(*EapExpandedTypeFast.GetType());
+	    
+	    m_username_password_io_ptr->iPassword.Zero();
+	    
+	    if (iEapAuthNotifier == 0)
+	    	{
+	    	TRAPD(err, iEapAuthNotifier = CEapAuthNotifier::NewL( *this ));
+	  		if (err)
+	  			{
+	  				return eap_status_authentication_failure;
+	  			}
+	    	}
+	    else
+		   	{
+			 	iEapAuthNotifier->Cancel();
+	     	}
+	
+	    TRAPD(err1, iEapAuthNotifier->StartL(CEapAuthNotifier::EEapNotifierTypeMsChapV2UsernamePasswordDialog, m_username_password_io_ptr, aEapType));
+  		if (err1)
+  			{
+  				return eap_status_authentication_failure;
+  			}
+	    	
 
-		SetActive();
-	} 
-	else
-	{
-		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("eap_am_type_mschapv2_symbian_c: Already active when tried to show username/password dialog.\n")));
-		return eap_status_process_general_error;
-	}
 
 	return eap_status_pending_request;
 }
@@ -1044,68 +1002,8 @@
 	m_old_password_utf8 = &old_password;
 	m_password_prompt_enabled = &password_prompt_enabled;
 
-	if (!IsActive())
-	{
-		{
-			eap_variable_data_c tmp_username_unicode(m_am_tools);
-			eap_status_e status = m_am_tools->convert_utf8_to_unicode(tmp_username_unicode, *m_username_utf8);
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);
-			}
-
-			m_username_password_io_ptr->iUsername.Copy(
-				reinterpret_cast<TUint16 *> (
-					tmp_username_unicode.get_data(tmp_username_unicode.get_data_length())),
-					tmp_username_unicode.get_data_length() / 2); // 8bit -> 16bit
-		}
-
-		m_state = EHandlingChangePasswordQuery;
-		
-	EAP_TRACE_DEBUG(
-		m_am_tools, 
-		TRACE_FLAGS_DEFAULT, 
-		(EAPL(" eap_am_type_mschapv2_symbian_c::show_change_password_dialog - before m_notifier.Connect(), m_is_notifier_connected=%d\n"),
-		m_is_notifier_connected));
-		
-		if( !m_is_notifier_connected )
-		{
-			TInt error = m_notifier.Connect();
 
-	EAP_TRACE_DEBUG(
-		m_am_tools, 
-		TRACE_FLAGS_DEFAULT, 
-		(EAPL(" eap_am_type_mschapv2_symbian_c::show_change_password_dialog - m_notifier.Connect() returned error=%d\n"),
-		error));
-			
-			if( error != KErrNone)
-			{
-				// Can not connect to notifier.
-				return EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(error));		
-			}
-			
-			m_is_notifier_connected = true; // Got connectted to notifier.
-		}
 
-	EAP_TRACE_DEBUG(
-		m_am_tools, 
-		TRACE_FLAGS_DEFAULT, 
-		(EAPL(" eap_am_type_mschapv2_symbian_c::show_change_password_dialog - before m_notifier.StartNotifierAndGetResponse()\n")));	
-
-		m_notifier.StartNotifierAndGetResponse(
-			iStatus, 
-			KEapMsChapV2ChangePasswordUid, 
-			*m_username_password_io_pckg_ptr, 
-			*m_username_password_io_pckg_ptr);
-
-		SetActive();
-	} 
-	else
-	{
-		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("eap_am_type_mschapv2_symbian_c: Already active when tried to show change password dialog.\n")));
-		return eap_status_process_general_error;
-	}
 
 	return eap_status_pending_request;
 	
@@ -1179,13 +1077,29 @@
 		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
-	status = memory_store_key->add_data(
-		&m_tunneling_vendor_type,
-		sizeof(m_tunneling_vendor_type));
-	if (status != eap_status_ok)
 	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
+		u32_t vendor_id = m_tunneling_type.get_vendor_id();
+
+		status = memory_store_key->add_data(
+			&vendor_id,
+			sizeof(vendor_id));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	{
+		u32_t vendor_type = m_tunneling_type.get_vendor_type();
+		status = memory_store_key->add_data(
+			&vendor_type,
+			sizeof(vendor_type));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
 	}
 
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -1228,11 +1142,20 @@
 	TPtr sqlStatement = buf->Des();
 	
 	// Query all the relevant parameters
-	_LIT(KSQLQuery, "SELECT %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLQuery, &cf_str_EAP_MSCHAPv2_max_session_validity_time_literal,
-						&KMSCHAPv2LastFullAuthTime, &KMsChapV2TableName,
-						&KServiceType, m_index_type, 
-						&KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+	_LIT(KSQLQuery, "SELECT %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	sqlStatement.Format(
+		KSQLQuery,
+		&cf_str_EAP_MSCHAPv2_max_session_validity_time_literal,
+		&KMSCHAPv2LastFullAuthTime,
+		&KMsChapV2TableName,
+		&KServiceType,
+		m_index_type, 
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType, 
+		m_tunneling_type.get_vendor_type());
 
 	RDbView view;
 	// Evaluate view
@@ -1369,10 +1292,19 @@
 	TPtr sqlStatement = buf->Des();
 	
 	// Query all the relevant parameters
-	_LIT(KSQLQuery, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLQuery, &KMSCHAPv2LastFullAuthTime, &KMsChapV2TableName,
-						&KServiceType, m_index_type, 
-						&KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+	_LIT(KSQLQuery, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	sqlStatement.Format(
+		KSQLQuery,
+		&KMSCHAPv2LastFullAuthTime,
+		&KMsChapV2TableName,
+		&KServiceType,
+		m_index_type, 
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType, 
+		m_tunneling_type.get_vendor_type());
 
 	RDbView view;
 	// Evaluate view
--- a/eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/inc/EapMsChapV2.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/inc/EapMsChapV2.h	Mon May 24 20:32:47 2010 +0300
@@ -16,14 +16,14 @@
 */
 
 /*
-* %version: 11.1.2 %
+* %version: 19 %
 */
 
 #ifndef _EAPMSCHAPV2_H_
 #define _EAPMSCHAPV2_H_
 
 // INCLUDES
-#include <EapType.h>
+#include <EapTypePlugin.h>
 #include "eap_header.h"
 
 // LOCAL CONSTANTS
@@ -33,7 +33,7 @@
 * Class that implements the generic EAP type interface. Implements EAP MSCHAPv2 and 
 * plain MSCHAPv2 protocol.
 */
-class CEapMsChapV2 : public CEapType
+class CEapMsChapV2 : public CEapTypePlugin
 {
 public:		
 	/**
@@ -93,16 +93,13 @@
 	
 #endif // #ifdef USE_EAP_SIMPLE_CONFIG
 
-	/**
-	* Invokes the configuration UI.
-	**/
-	TInt InvokeUiL();
+
 	
 	/**
 	* Gets information about EAP type. 
 	* @return Pointer to a class that contains the EAP type information. Also pushed to cleanup stack.
 	*/
-	CEapTypeInfo* GetInfoLC();
+	CEapTypeInfo* GetInfoL();
 	
 	/**
 	* Deletes EAP type configuration
@@ -124,7 +121,7 @@
 	* EAP type. 
 	* @param aTunnelingType Type number for the tunneling type
 	*/	
-	void SetTunnelingType(const TInt aTunnelingType);
+	void SetTunnelingType(const TEapExpandedType aTunnelingType);
 	
 	/**
 	* Changes the index of the saved parameters.
@@ -159,7 +156,7 @@
 	* Constructor initialises member variables.
 	*/
 	CEapMsChapV2(const TIndexType aIndexType, const TInt aIndex,
-				 const eap_type_value_e aEapType = eap_type_mschapv2 );
+				 const eap_type_value_e aEapType );
 
 private:
 
--- a/eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/inc/EapMsChapV2DbDefaults.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/inc/EapMsChapV2DbDefaults.h	Mon May 24 20:32:47 2010 +0300
@@ -16,29 +16,12 @@
 */
 
 /*
-* %version: 12 %
+* %version: %
 */
 
 #ifndef _EAPMSCHAPV2DBDEFAULTS_H_
 #define _EAPMSCHAPV2DBDEFAULTS_H_
 
-enum TMSCHAPV2PasswordPrompt
-{
-	EMSCHAPV2PasswordPromptOff,		// False. Don't show password prompt.
-	EMSCHAPV2PasswordPromptOn,		// True. Show password prompt.
-};
-
-// LOCAL CONSTANTS
-
-const TUint default_EAP_MSCHAPV2_password_prompt = EMSCHAPV2PasswordPromptOff;
-
-_LIT(default_EAP_MSCHAPV2_username, "");
-_LIT(default_EAP_MSCHAPV2_password, "");
-
-const TInt64 default_MaxSessionTime = 0; // 0 means read from configuration file.
-const TInt64 default_FullAuthTime = 0;
-
-const TUint KMaxUsernameLengthInDB = 255;
-const TUint KMaxPasswordLengthInDB = 255;
+#include "EapPluginDbDefaults.h"
 
 #endif // _EAPMSCHAPV2DBDEFAULTS_H_
--- a/eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/inc/EapMsChapV2DbParameterNames.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/inc/EapMsChapV2DbParameterNames.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8.1.2 %
+* %version: %
 */
 
 #ifndef EAPMSCHAPV2DBPARAMETERNAMES_H
@@ -28,6 +28,7 @@
 
 _LIT(KServiceType, "ServiceType");
 _LIT(KServiceIndex, "ServiceIndex");
+_LIT(KTunnelingTypeVendorId, "TunnelingTypeVendorId");
 _LIT(KTunnelingType, "TunnelingType");
 
 _LIT(KMSCHAPv2LastFullAuthTime, "EAP_MSCHAPv2_last_full_authentication_time");
--- a/eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/inc/EapMsChapV2DbUtils.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/inc/EapMsChapV2DbUtils.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: 8.1.7 %
 */
 
 #ifndef _EAPMSCHAPV2DBUTILS_H_
@@ -30,21 +30,10 @@
 
 // LOCAL CONSTANTS
 
-#ifdef SYMBIAN_SECURE_DBMS
-// For EAP MSCHAPV2 secure database.
-// Full path is not needed. The database eapmsmhapv2.dat will be saved in the 
-// data cage path for DBMS. So it will be in "\private\100012a5\eapmsmhapv2.dat" in C: drive.
-// The maximum length of database name is 0x40 (KDbMaxName) , which is defined in d32dbms.h.
-
-_LIT(KDatabaseName, "c:eapmschapv2.dat");
+// For EAP-MsChapV2 private database. Database will be in the private folder of EAP-server (20026FCB).
+// The maximum length of database name is 0x40 (KDbMaxName), which is defined in d32dbms.h.
 
-_LIT(KSecureUIDFormat, "SECURE[102072e9]"); // For the security policy.
-
-#else
-
-_LIT(KDatabaseName, "c:\\system\\data\\eapmschapv2.dat");
-
-#endif // #ifdef SYMBIAN_SECURE_DBMS
+_LIT(KEapMsChapV2DatabaseName, "eapmschapv2.dat");
 
 _LIT(KMsChapV2TableName, "eapmschapv2");
 
@@ -54,8 +43,8 @@
 public:
 	
 	static void OpenDatabaseL(
-		RDbNamedDatabase& aDatabase, 
-		RDbs& aSession, 
+		RDbNamedDatabase& aDatabase,
+		RFs& aFileServerSession,
 		const TIndexType aIndexType,
 		const TInt aIndex,
 		const eap_type_value_e aTunnelingType);
@@ -99,7 +88,6 @@
 		const TIndexType aIndexType,
 		const TInt aIndex,
 		const eap_type_value_e aTunnelingType);
-
 };
 
 #endif // _EAPMSCHAPV2DBUTILS_H_
--- a/eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/inc/EapMsChapV2Global.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/inc/EapMsChapV2Global.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7 %
+* %version: %
 */
 
 #ifndef _EAPMSCHAPV2GLOBAL_H_
@@ -24,9 +24,9 @@
 
 // LOCAL CONSTANTS
 
-_LIT(KReleaseDate, "20040829:"); // Must be in format YYYYMMDD: (dates and months start from 0)
+_LIT(KReleaseDate, ""); // Must be in format YYYYMMDD: (dates and months start from 0)
 _LIT(KEapTypeVersion, "1.0");
-_LIT(KManufacturer, "Nokia");
+_LIT(KManufacturer, "");
 _LIT(KNokiaSignature, "");
 _LIT(KExtraInfo1, "");
 _LIT(KExtraInfo2, "");
--- a/eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/src/101F8E66.rss	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/src/101F8E66.rss	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 14 %
+* %version: 11.1.3 %
 */
 
 //  INCLUDES
--- a/eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/src/EapMsChapV2.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/src/EapMsChapV2.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 17.1.4 %
+* %version: 28 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -37,6 +37,8 @@
 #include <EapTypeInfo.h>
 #include "EapMsChapV2DbUtils.h"
 
+#include "EapConversion.h"
+#include "EapTraceSymbian.h"
 
 // LOCAL CONSTANTS
 
@@ -47,34 +49,41 @@
 // ================= MEMBER FUNCTIONS =======================
 
 
-CEapMsChapV2::CEapMsChapV2(const TIndexType aIndexType,	
-				 const TInt aIndex, const eap_type_value_e aEapType /* =eap_type_mschapv2 */)
+CEapMsChapV2::CEapMsChapV2(
+	const TIndexType aIndexType,	
+	const TInt aIndex,
+	const eap_type_value_e aEapType)
 : iIndexType(aIndexType)
 , iIndex(aIndex)
 , iTunnelingType(eap_type_none)
 , iEapType(aEapType)
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapMsChapV2::CEapMsChapV2()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapMsChapV2::CEapMsChapV2()\n"));
+
 }
 
 // ----------------------------------------------------------
 
 CEapMsChapV2* CEapMsChapV2::NewL(SIapInfo *aIapInfo)
 {
-	return new (ELeave) CEapMsChapV2(aIapInfo->indexType, aIapInfo->index);
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapMsChapV2::NewL()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapMsChapV2::NewL()\n"));
+
+	return new (ELeave) CEapMsChapV2(aIapInfo->indexType, aIapInfo->index, eap_type_mschapv2);
 }
 
 // ----------------------------------------------------------
 
 CEapMsChapV2* CEapMsChapV2::NewPlainMSCHAPv2L(SIapInfo *aIapInfo)
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapMsChapV2::NewPlainMSCHAPv2L()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapMsChapV2::NewPlainMSCHAPv2L()\n"));
+
 	return new (ELeave) CEapMsChapV2(
 		aIapInfo->indexType,
 		aIapInfo->index,
-#if defined(USE_EAP_EXPANDED_TYPES)
 		eap_expanded_type_ttls_plain_mschapv2.get_type()
-#else
-		eap_type_plain_mschapv2
-#endif //#if defined(USE_EAP_EXPANDED_TYPES)
 		);
 }
 
@@ -83,6 +92,9 @@
 
 CEapMsChapV2::~CEapMsChapV2()
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapMsChapV2::~CEapMsChapV2()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapMsChapV2::~CEapMsChapV2()\n"));
+
 }
 
 // ----------------------------------------------------------
@@ -104,6 +116,9 @@
 	
 #endif // #ifdef USE_EAP_SIMPLE_CONFIG
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapMsChapV2::GetStackInterfaceL()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapMsChapV2::GetStackInterfaceL()\n"));
+
 	// Create AM
 	eap_am_type_mschapv2_symbian_c* amEapType = eap_am_type_mschapv2_symbian_c::NewL(
 		aTools,
@@ -151,28 +166,24 @@
 
 TUint CEapMsChapV2::GetInterfaceVersion() 
 { 
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapMsChapV2::GetInterfaceVersion()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapMsChapV2::GetInterfaceVersion()\n"));
+
 	return KInterfaceVersion; 
 }
 
-
 // ----------------------------------------------------------
-TInt CEapMsChapV2::InvokeUiL()
-{
-	TInt buttonId(0);
 
-	return buttonId;
-}
-
+CEapTypeInfo* CEapMsChapV2::GetInfoL()
+{
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapMsChapV2::GetInfoL()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapMsChapV2::GetInfoL()\n"));
 
-// ----------------------------------------------------------
-CEapTypeInfo* CEapMsChapV2::GetInfoLC()
-{
 	CEapTypeInfo* info = new(ELeave) CEapTypeInfo(
 		(TDesC&)KReleaseDate, 
 		(TDesC&)KEapTypeVersion,
 		(TDesC&)KManufacturer);
 
-	CleanupStack::PushL(info);
 	return info;
 }
 
@@ -180,30 +191,42 @@
 
 void CEapMsChapV2::DeleteConfigurationL()
 {		
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapMsChapV2::DeleteConfigurationL()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapMsChapV2::DeleteConfigurationL()\n"));
+
 	EapMsChapV2DbUtils::DeleteConfigurationL(iIndexType, iIndex, iTunnelingType);
 }
 
 // ----------------------------------------------------------
 
-void CEapMsChapV2::SetTunnelingType(const TInt aTunnelingType)
-{
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	// Vendor id is eap_type_vendor_id_ietf always in this plugin.
-	iTunnelingType.set_eap_type_values(eap_type_vendor_id_ietf, aTunnelingType);
+void CEapMsChapV2::SetTunnelingType(const TEapExpandedType aTunnelingType)
+    {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapMsChapV2::SetTunnelingType()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapMsChapV2::SetTunnelingType()\n"));
 
-#else
-
-	iTunnelingType = static_cast<eap_type_value_e>(aTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-}
+    EAP_TRACE_DATA_DEBUG_SYMBIAN(
+        (EAPL("CEapMsChapV2::SetTunnelingType - tunneling type"),
+        aTunnelingType.GetValue().Ptr(), aTunnelingType.GetValue().Length()));
+    
+    eap_type_value_e aInternalType;
+    
+    TInt err = CEapConversion::ConvertExpandedEAPTypeToInternalType(
+            &aTunnelingType,
+            &aInternalType);
+    
+    iTunnelingType = aInternalType;
+    
+    }
 
 // ----------------------------------------------------------
+
 void CEapMsChapV2::SetIndexL(
 		const TIndexType aIndexType, 
 		const TInt aIndex)
 {		
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapMsChapV2::SetIndexL()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapMsChapV2::SetIndexL()\n"));
+
 	// First delete the target configuration
 	TIndexType tmpIndexType = iIndexType;
 	TInt tmpIndex = iIndex;
@@ -221,7 +244,7 @@
 
 	RDbNamedDatabase db;
 
-	RDbs session;
+	RFs session;
 	
 	EapMsChapV2DbUtils::OpenDatabaseL(db, session, iIndexType, iIndex, iTunnelingType);
 	
@@ -240,14 +263,18 @@
 	iIndexType = aIndexType;
 	iIndex = aIndex;
 
-	CleanupStack::PopAndDestroy(2); // db
+	CleanupStack::PopAndDestroy(&db);
+	CleanupStack::PopAndDestroy(&session);
 }
 
 void CEapMsChapV2::SetConfigurationL(const EAPSettings& aSettings)
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapMsChapV2::SetConfigurationL()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapMsChapV2::SetConfigurationL()\n"));
+
 	RDbNamedDatabase db;
 
-	RDbs session;	
+	RFs session;
 	
 	// This also creates the IAP entry if it doesn't exist
 	EapMsChapV2DbUtils::OpenDatabaseL(db, session, iIndexType, iIndex, iTunnelingType);
@@ -262,14 +289,18 @@
 		iIndex,
 		iTunnelingType);		
 		
-	CleanupStack::PopAndDestroy(2); // db, session
+	CleanupStack::PopAndDestroy(&db);
+	CleanupStack::PopAndDestroy(&session);
 }
 
 void CEapMsChapV2::GetConfigurationL(EAPSettings& aSettings)
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapMsChapV2::GetConfigurationL()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapMsChapV2::GetConfigurationL()\n"));
+
 	RDbNamedDatabase db;
 
-	RDbs session;
+	RFs session;
 	
 	// This also creates the IAP entry if it doesn't exist
 	EapMsChapV2DbUtils::OpenDatabaseL(db, session, iIndexType, iIndex, iTunnelingType);
@@ -284,13 +315,17 @@
 		iIndex,
 		iTunnelingType);
 		
-	CleanupStack::PopAndDestroy(2); // db, session
+	CleanupStack::PopAndDestroy(&db);
+	CleanupStack::PopAndDestroy(&session);
 }
 
 void CEapMsChapV2::CopySettingsL(
 	const TIndexType aDestinationIndexType,
 	const TInt aDestinationIndex)
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapMsChapV2::CopySettingsL()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapMsChapV2::CopySettingsL()\n"));
+
 	// First delete the target configuration
 	TIndexType tmpIndexType = iIndexType;
 	TInt tmpIndex = iIndex;
@@ -308,7 +343,7 @@
 
 	RDbNamedDatabase db;
 
-	RDbs session;
+	RFs session;
 	
 	EapMsChapV2DbUtils::OpenDatabaseL(db, session, iIndexType, iIndex, iTunnelingType);
 	
@@ -324,7 +359,8 @@
 		aDestinationIndex, 
 		iTunnelingType);
 		
-	CleanupStack::PopAndDestroy(2); // db
+	CleanupStack::PopAndDestroy(&db);
+	CleanupStack::PopAndDestroy(&session);
 	
 }
 
--- a/eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/src/EapMsChapV2DbUtils.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/src/EapMsChapV2DbUtils.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 21.1.2 %
+* %version: 46 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -34,116 +34,96 @@
 #include "EapMsChapV2DbDefaults.h"
 #include "EapMsChapV2DbParameterNames.h"
 
-#include "eap_am_trace_symbian.h"
+#include <EapTraceSymbian.h>
+#include <EapPluginTools.h>
 
 const TUint KMaxSqlQueryLength = 512;
 const TInt KMicroSecsInAMinute = 60000000; // 60000000 micro seconds is 1 minute.
 
 // ================= MEMBER FUNCTIONS =======================
 
-void EapMsChapV2DbUtils::OpenDatabaseL(RDbNamedDatabase& aDatabase, RDbs& aSession, const TIndexType aIndexType,
-	const TInt aIndex, const eap_type_value_e aTunnelingType)
+void EapMsChapV2DbUtils::OpenDatabaseL(
+	RDbNamedDatabase& aDatabase,
+	RFs& aFileServerSession,
+	const TIndexType aIndexType,
+	const TInt aIndex,
+	const eap_type_value_e aTunnelingType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapMsChapV2DbUtils::OpenDatabaseL(): - Start - aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type()));
 
-#else
-
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapMsChapV2DbUtils::OpenDatabaseL -Start- aIndexType=%d, aIndex=%d, aTunnelingVendorType=%d \n"),
-	aIndexType,aIndex,aTunnelingVendorType) );
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapMsChapV2DbUtils::OpenDatabaseL()\n"));
 
 	// 1. Open/create a database	
 	
-	// Connect to the DBMS server.
-	User::LeaveIfError(aSession.Connect());		
-	CleanupClosePushL(aSession);	
-	// aSession and aDatabase are pushed to the cleanup stack even though they may be member
-	// variables of the calling class and would be closed in the destructor anyway. This ensures
-	// that if they are not member variables they will be closed. Closing the handle twice
-	// does no harm.	
-	
-#ifdef SYMBIAN_SECURE_DBMS
-	
-	// Create the secure shared database with the specified secure policy.
-	// Database will be created in the data caging path for DBMS (C:\private\100012a5).
-	
-	TInt err = aDatabase.Create(aSession, KDatabaseName, KSecureUIDFormat);
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapMsChapV2DbUtils::OpenDatabaseL - Created Secure DB for eapmsmhapv2.dat. err=%d\n"), err));
+	TInt error(KErrNone);
+	TFileName aPrivateDatabasePathName;
 
-	
-	if(err == KErrNone)
+	EapPluginTools::CreateDatabaseLC(
+		aDatabase,
+		aFileServerSession,
+		error,
+		KEapMsChapV2DatabaseName,
+		aPrivateDatabasePathName);
+
+	if(error == KErrNone)
 	{
 		aDatabase.Close();
-		
-	} else if (err != KErrAlreadyExists) 
+	}
+	else if (error != KErrAlreadyExists) 
 	{
-		User::LeaveIfError(err);
+		User::LeaveIfError(error);
 	}
 	
-	User::LeaveIfError(aDatabase.Open(aSession, KDatabaseName, KSecureUIDFormat));
-	CleanupClosePushL(aDatabase);		
-		
-#else
-	// For non-secured database. The database will be created in the old location (c:\system\data).
-	
-	RFs fsSession;		
-	User::LeaveIfError(fsSession.Connect());
-	CleanupClosePushL(fsSession);	
-	TInt err = aDatabase.Create(fsSession, KDatabaseName);
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapMsChapV2DbUtils::OpenDatabaseL - Created Non-Secure DB for eapmsmhapv2.dat. err=%d\n"), err));
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapMsChapV2DbUtils::OpenDatabaseL(): - calls aDatabase.Open()\n")));
+
+	error = aDatabase.Open(aFileServerSession, aPrivateDatabasePathName);
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapMsChapV2DbUtils::OpenDatabaseL(): - Opened private DB for EAP-AKA. error=%d\n"), error));
+
+	User::LeaveIfError(error);
 
-	
-	if(err == KErrNone)
-	{
-		aDatabase.Close();
-		
-	} else if (err != KErrAlreadyExists) 
-	{
-		User::LeaveIfError(err);
-	}
-	CleanupStack::PopAndDestroy(); // close fsSession
-	
-	User::LeaveIfError(aDatabase.Open(aSession, KDatabaseName));
-	CleanupClosePushL(aDatabase);		
-	    
-#endif // #ifdef SYMBIAN_SECURE_DBMS
+	// 2. Create the MSCHAPv2 table to database (ignore error if database exists)
+	// Table columns:
+	//// NAME ///////////////////////////////////////////////// TYPE ////////////// Constant /////////
+	//| ServiceType                                         | UNSIGNED INTEGER  | KServiceType      |//
+	//| ServiceIndex                                        | UNSIGNED INTEGER  | KServiceIndex     |//
+	//| TunnelingTypeVendorId                               | UNSIGNED INTEGER  | KTunnelingTypeVendorId    |//
+	//| TunnelingType                                       | UNSIGNED INTEGER  | KTunnelingType    |//
+	//| EAP_MSCHAPV2_password_prompt                        | UNSIGNED INTEGER  | cf_str_EAP_MSCHAPV2_password_prompt_literal   |//
+	//| EAP_MSCHAPV2_username                               | VARCHAR(255)      | cf_str_EAP_MSCHAPV2_username_literal         |//
+	//| EAP_MSCHAPV2_password                               | VARCHAR(255)      | cf_str_EAP_MSCHAPV2_password_literal         |//
+	//| EAP_MSCHAPv2_max_session_validity_time				      | BIGINT		   	    | cf_str_EAP_MSCHAPv2_max_session_validity_time_literal   |//
+	//| EAP_MSCHAPv2_last_full_authentication_time			    | BIGINT		   	    | KMSCHAPv2LastFullAuthTime	|//
+	//////////////////////////////////////////////////////////////////////////////////////////////////
 
-// 2. Create the MSCHAPv2 table to database (ignore error if database exists)
-// Table columns:
-//// NAME ///////////////////////////////////////////////// TYPE ////////////// Constant /////////
-//| ServiceType                                         | UNSIGNED INTEGER  | KServiceType      |//
-//| ServiceIndex                                        | UNSIGNED INTEGER  | KServiceIndex     |//
-//| TunnelingType                                       | UNSIGNED INTEGER  | KTunnelingType    |//
-//| EAP_MSCHAPV2_password_prompt                        | UNSIGNED INTEGER  | cf_str_EAP_MSCHAPV2_password_prompt_literal   |//
-//| EAP_MSCHAPV2_username                               | VARCHAR(255)      | cf_str_EAP_MSCHAPV2_username_literal         |//
-//| EAP_MSCHAPV2_password                               | VARCHAR(255)      | cf_str_EAP_MSCHAPV2_password_literal         |//
-//| EAP_MSCHAPv2_max_session_validity_time				| BIGINT		   	| cf_str_EAP_MSCHAPv2_max_session_validity_time_literal   |//
-//| EAP_MSCHAPv2_last_full_authentication_time			| BIGINT		   	| KMSCHAPv2LastFullAuthTime	|//
-//////////////////////////////////////////////////////////////////////////////////////////////////
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapMsChapV2DbUtils::OpenDatabaseL(): calls HBufC::NewLC()\n")));
 
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
-	_LIT(KSQLCreateTable1, "CREATE TABLE %S (%S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S VARCHAR(255), \
-											 %S VARCHAR(255), \
-											 %S BIGINT, \
-											 %S BIGINT)");
+	_LIT(KSQLCreateTable1, "CREATE TABLE %S \
+		(%S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S VARCHAR(255), \
+		 %S VARCHAR(255), \
+		 %S BIGINT, \
+		 %S BIGINT)");
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapMsChapV2DbUtils::OpenDatabaseL(): calls sqlStatement.Format()\n")));
 
 	sqlStatement.Format(KSQLCreateTable1,
 						&KMsChapV2TableName,
 						&KServiceType,
 						&KServiceIndex,
+						&KTunnelingTypeVendorId,
 						&KTunnelingType,
 						&cf_str_EAP_MSCHAPV2_password_prompt_literal,
 						&cf_str_EAP_MSCHAPV2_username_literal,
@@ -151,57 +131,100 @@
 						&cf_str_EAP_MSCHAPv2_max_session_validity_time_literal, 
 						&KMSCHAPv2LastFullAuthTime);
 
-	err = aDatabase.Execute(sqlStatement);
-	if (err != KErrNone && err != KErrAlreadyExists)
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapMsChapV2DbUtils::OpenDatabaseL(): calls aDatabase.Execute()\n")));
+
+	error = aDatabase.Execute(sqlStatement);
+	if (error != KErrNone && error != KErrAlreadyExists)
 	{
-		User::Leave(err);
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapMsChapV2DbUtils::OpenDatabaseL(): aDatabase.Execute() error=%d\n"),
+			error));
+
+		User::Leave(error);
 	}
 
 	// 4. Check if database table contains a row for this service type and id  
-	
-	_LIT(KSQLQueryRow, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapMsChapV2DbUtils::OpenDatabaseL(): calls sqlStatement.Format()\n")));
+
+	_LIT(KSQLQueryRow, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
 	sqlStatement.Format(KSQLQueryRow,
-						&cf_str_EAP_MSCHAPV2_username_literal,
-						&KMsChapV2TableName,
-						&KServiceType,
-						aIndexType,
-						&KServiceIndex,
-						aIndex,
-						&KTunnelingType, 
-						aTunnelingVendorType);
-							
+		&cf_str_EAP_MSCHAPV2_username_literal,
+		&KMsChapV2TableName,
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());
+
 	RDbView view;
-	User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement), TDbWindow::EUnlimited));
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapMsChapV2DbUtils::OpenDatabaseL(): calls view.Prepare()\n")));
+
+	error = view.Prepare(aDatabase, TDbQuery(sqlStatement), TDbWindow::EUnlimited);
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapMsChapV2DbUtils::OpenDatabaseL(): view.Prepare() error=%d\n"),
+		error));
+
+	User::LeaveIfError(error);
 	// View must be closed when no longer needed
 	CleanupClosePushL(view);
-	User::LeaveIfError(view.EvaluateAll());
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapMsChapV2DbUtils::OpenDatabaseL(): calls view.EvaluateAll()\n")));
+
+	error = view.EvaluateAll();
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapMsChapV2DbUtils::OpenDatabaseL(): view.EvaluateAll() error=%d\n"),
+		error));
+
+	User::LeaveIfError(error);
 	
 	// 5. If row is not found then add it
 	
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapMsChapV2DbUtils::OpenDatabaseL(): calls view.CountL()\n")));
+
 	TInt rows = view.CountL();
-	CleanupStack::PopAndDestroy(); // view
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapMsChapV2DbUtils::OpenDatabaseL(): view.CountL() rows=%d\n"),
+		rows));
+
+	CleanupStack::PopAndDestroy(&view);
 	if (rows == 0)
 	{
 		_LIT(KSQLInsert, "SELECT * FROM %S");
 		sqlStatement.Format(KSQLInsert, &KMsChapV2TableName);		
-										
-		view.Prepare(aDatabase, TDbQuery(sqlStatement), TDbWindow::EUnlimited, RDbView::EInsertOnly);
+		
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapMsChapV2DbUtils::OpenDatabaseL(): calls view.Prepare()\n")));
+
+		error = view.Prepare(aDatabase, TDbQuery(sqlStatement), TDbWindow::EUnlimited, RDbView::EInsertOnly);
+
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapMsChapV2DbUtils::OpenDatabaseL(): view.Prepare() error=%d\n"),
+			error));
+
+		User::LeaveIfError(error);
 		CleanupClosePushL(view);
-		
+
 		// Get column set so we get the correct column numbers
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapMsChapV2DbUtils::OpenDatabaseL(): calls view.ColSetL()\n")));
+
 		CDbColSet* colSet = view.ColSetL();		
 		CleanupStack::PushL(colSet);
-		
+
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapMsChapV2DbUtils::OpenDatabaseL(): calls view.InsertL()\n")));
+
 		view.InsertL();
 		view.SetColL(colSet->ColNo(KServiceType), static_cast<TInt> (aIndexType));
 		view.SetColL(colSet->ColNo(KServiceIndex), aIndex);
-		view.SetColL(colSet->ColNo(KTunnelingType), aTunnelingVendorType);
-		
-		view.SetColL(colSet->ColNo(cf_str_EAP_MSCHAPV2_password_prompt_literal), default_EAP_MSCHAPV2_password_prompt);
+		view.SetColL(colSet->ColNo(KTunnelingTypeVendorId), aTunnelingType.get_vendor_id());
+		view.SetColL(colSet->ColNo(KTunnelingType), aTunnelingType.get_vendor_type());
 		
-		view.SetColL(colSet->ColNo(cf_str_EAP_MSCHAPV2_username_literal), default_EAP_MSCHAPV2_username);
+		view.SetColL(colSet->ColNo(cf_str_EAP_MSCHAPV2_password_prompt_literal), default_EAP_password_prompt);
 		
-		view.SetColL(colSet->ColNo(cf_str_EAP_MSCHAPV2_password_literal), default_EAP_MSCHAPV2_password);
+		view.SetColL(colSet->ColNo(cf_str_EAP_MSCHAPV2_username_literal), default_EAP_username);
+		
+		view.SetColL(colSet->ColNo(cf_str_EAP_MSCHAPV2_password_literal), default_EAP_password);
 		
 		view.SetColL(colSet->ColNo(cf_str_EAP_MSCHAPv2_max_session_validity_time_literal), default_MaxSessionTime);
 		
@@ -209,16 +232,15 @@
 		
 		view.PutL();
 				
-		CleanupStack::PopAndDestroy( colSet ); // Delete colSet.
-		
-		CleanupStack::PopAndDestroy( &view ); // Close view.		
+		CleanupStack::PopAndDestroy(colSet);
+		CleanupStack::PopAndDestroy(&view);
 	} 
-	
-	CleanupStack::PopAndDestroy( buf ); // Delete buf	
+
+	aDatabase.Compact();
+
+	CleanupStack::PopAndDestroy( buf );
 	CleanupStack::Pop( &aDatabase );	
-	CleanupStack::Pop( &aSession );	
-		
-	aDatabase.Compact();
+	CleanupStack::Pop( &aFileServerSession );
 }
 
 
@@ -231,25 +253,37 @@
 	const TInt aNewIndex,
 	const eap_type_value_e aNewTunnelingType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
-	TUint aNewTunnelingVendorType = aNewTunnelingType.get_vendor_type();
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapMsChapV2DbUtils::SetIndexL(): -Start- aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type()));
+	
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapMsChapV2DbUtils::SetIndexL(): -Start- aNewIndexType=%d, aNewIndex=%d, aNewTunnelingType=0xfe%06x%08x\n"),
+		aNewIndexType,
+		aNewIndex,
+		aNewTunnelingType.get_vendor_id(),
+		aNewTunnelingType.get_vendor_type()));
 
-#else
-
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-	TUint aNewTunnelingVendorType = static_cast<TUint>(aNewTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapMsChapV2DbUtils::SetIndexL()\n"));
 
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
-	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
+	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
 
-	sqlStatement.Format(KSQL, &KMsChapV2TableName, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+	sqlStatement.Format(KSQL,
+		&KMsChapV2TableName, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());
 	
 	RDbView view;
 	
@@ -279,14 +313,15 @@
 	view.UpdateL();
 	
     view.SetColL(colSet->ColNo(KServiceType), static_cast<TUint>(aNewIndexType));
-    
     view.SetColL(colSet->ColNo(KServiceIndex), aNewIndex);
-    
-    view.SetColL(colSet->ColNo(KTunnelingType), aNewTunnelingVendorType);
+	view.SetColL(colSet->ColNo(KTunnelingTypeVendorId), aNewTunnelingType.get_vendor_id());
+	view.SetColL(colSet->ColNo(KTunnelingType), aNewTunnelingType.get_vendor_type());
 
     view.PutL();
     	
-	CleanupStack::PopAndDestroy(3); // view, colset, buf
+	CleanupStack::PopAndDestroy(colSet);
+	CleanupStack::PopAndDestroy(&view);
+	CleanupStack::PopAndDestroy(buf);
 }
 
 void EapMsChapV2DbUtils::SetConfigurationL(
@@ -296,19 +331,20 @@
 	const TInt aIndex,
 	const eap_type_value_e aTunnelingType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapMsChapV2DbUtils::SetConfigurationL(): -Start- aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type()));
 
-#else
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapMsChapV2DbUtils::SetConfigurationL()\n"));
 
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
+	EAP_TRACE_SETTINGS(&aSettings);
 
 	// Check if the settings are for the correct type
-	if (aSettings.iEAPType != EAPSettings::EEapMschapv2 &&
-		aSettings.iEAPType != EAPSettings::EPlainMschapv2)
+	if (aSettings.iEAPExpandedType != (*EapExpandedTypeMsChapv2.GetType())
+		&& aSettings.iEAPExpandedType != (*EapExpandedPlainMsChapv2.GetType()))
 	{
 		User::Leave(KErrNotSupported);
 	}
@@ -318,9 +354,18 @@
 
 	RDbView view;
 
-	_LIT(KSQLQuery, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLQuery, &KMsChapV2TableName, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+	_LIT(KSQLQuery, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+
+	sqlStatement.Format(KSQLQuery,
+		&KMsChapV2TableName, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());
 	
 	// Evaluate view
 	User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement)));
@@ -345,7 +390,7 @@
 		{
 			// Username too long. Can not be stored in DB.
 			
-			EAP_TRACE_DEBUG_SYMBIAN((_L("EapMsChapV2DbUtils::SetConfigurationL: Too long Username. Length=%d \n"),
+			EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapMsChapV2DbUtils::SetConfigurationL(): Too long Username. Length=%d \n"),
 			aSettings.iUsername.Length()));
 			
 			User::Leave(KErrArgument);
@@ -355,6 +400,16 @@
 		view.SetColL(colSet->ColNo(cf_str_EAP_MSCHAPV2_username_literal), aSettings.iUsername);		
 	}
 		
+	// Password existence.
+	if (aSettings.iPasswordExistPresent
+		&& !aSettings.iPasswordExist)
+	{
+		// Clear password from database.
+		view.SetColL(colSet->ColNo(cf_str_EAP_MSCHAPV2_password_literal), KNullPasswordData);
+		view.PutL();
+		view.SetColNullL(colSet->ColNo(cf_str_EAP_MSCHAPV2_password_literal));
+	}
+
 	// Password
 	if (aSettings.iPasswordPresent)
 	{
@@ -363,7 +418,7 @@
 		{
 			// Password too long. Can not be stored in DB.
 			
-			EAP_TRACE_DEBUG_SYMBIAN((_L("EapMsChapV2DbUtils::SetConfigurationL: Too long Password. Length=%d \n"),
+			EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapMsChapV2DbUtils::SetConfigurationL(): Too long Password. Length=%d \n"),
 			aSettings.iPassword.Length()));
 			
 			User::Leave(KErrArgument);
@@ -372,10 +427,14 @@
 		// Length is ok. Set the value in DB.	
 		view.SetColL(colSet->ColNo(cf_str_EAP_MSCHAPV2_password_literal), aSettings.iPassword);
 		
-		// If password was supplied set password prompting off
-		view.SetColL(colSet->ColNo(cf_str_EAP_MSCHAPV2_password_prompt_literal), EMSCHAPV2PasswordPromptOff);		
 	}
 			
+	if (aSettings.iShowPassWordPromptPresent)
+		{	
+		// If password was supplied set password prompting off
+		view.SetColL(colSet->ColNo(cf_str_EAP_MSCHAPV2_password_prompt_literal), aSettings.iShowPassWordPrompt);		
+		}
+
 	// Session validity time
 	if (aSettings.iSessionValidityTimePresent)
 	{
@@ -392,22 +451,23 @@
 		
 		if( validityInMicro != 0)
 		{
-			view.SetColL(colSet->ColNo(cf_str_EAP_MSCHAPV2_password_prompt_literal), EMSCHAPV2PasswordPromptOn);
+			view.SetColL(colSet->ColNo(cf_str_EAP_MSCHAPV2_password_prompt_literal), EEapDbTrue);
 		}		
 	}
 	
 	// Last full authentication time should be made zero when EAP configurations are modified.
 	// This makes sure that the next authentication with this EAP would be full authentication
 	// instead of reauthentication even if the session is still valid.
-	
+
 	view.SetColL(colSet->ColNo(KMSCHAPv2LastFullAuthTime), default_FullAuthTime);
 
-	EAP_TRACE_DEBUG_SYMBIAN((_L("Session Validity: EAP-Type=%d, Resetting Full Auth Time since settings are modified\n"),
-								aSettings.iEAPType ));
-	
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapMsChapV2DbUtils::SetConfigurationL(): Session Validity: Resetting Full Auth Time since settings are modified\n")));
+
 	view.PutL();
-	CleanupStack::PopAndDestroy(3); // view, colset, buf
 
+	CleanupStack::PopAndDestroy(colSet);
+	CleanupStack::PopAndDestroy(&view);
+	CleanupStack::PopAndDestroy(buf);
 }
 
 void EapMsChapV2DbUtils::GetConfigurationL(
@@ -417,15 +477,14 @@
 	const TInt aIndex,
 	const eap_type_value_e aTunnelingType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapMsChapV2DbUtils::GetConfigurationL(): -Start- aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type()));
 
-#else
-
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapMsChapV2DbUtils::GetConfigurationL()\n"));
 
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();	
@@ -433,9 +492,18 @@
 	RDbView view;
 
 	// Form the query
-	_LIT(KSQLQuery, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLQuery, &KMsChapV2TableName, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+	_LIT(KSQLQuery, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+
+	sqlStatement.Format(KSQLQuery,
+		&KMsChapV2TableName, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());
 	
 	// Evaluate view
 	User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement)));
@@ -452,18 +520,38 @@
 	CDbColSet* colSet = view.ColSetL();
 	CleanupStack::PushL(colSet);
 
-	aSettings.iEAPType = EAPSettings::EEapMschapv2; 
+	aSettings.iEAPExpandedType = *EapExpandedTypeMsChapv2.GetType(); 
 	
 	// Username
 	TPtrC username = view.ColDes(colSet->ColNo(cf_str_EAP_MSCHAPV2_username_literal));
 	aSettings.iUsername.Copy(username);
 	aSettings.iUsernamePresent = ETrue;
 	
+	// Password existence.
+	aSettings.iPasswordExistPresent = ETrue;
+	aSettings.iPasswordExist = ! view.IsColNull(colSet->ColNo(cf_str_EAP_MSCHAPV2_password_literal));
+
+#if defined(USE_EAP_PASSWORD_READ_FROM_DATABASE)
 	// Password
 	TPtrC password = view.ColDes(colSet->ColNo(cf_str_EAP_MSCHAPV2_password_literal));
 	aSettings.iPassword.Copy(password);
 	aSettings.iPasswordPresent = ETrue;
+#else
+	EAP_TRACE_DEBUG_SYMBIAN((_L("WARNING: EapMsChapV2DbUtils::GetConfigurationL(): Password read is disabled\n")));
+#endif //#if defined(USE_EAP_PASSWORD_READ_FROM_DATABASE)
 
+	aSettings.iShowPassWordPromptPresent = ETrue;
+
+	TUint aShow = view.ColUint(colSet->ColNo(cf_str_EAP_MSCHAPV2_password_prompt_literal));
+	if(aShow == EEapDbFalse)
+	{
+		aSettings.iShowPassWordPrompt = EFalse;
+	}
+	else
+	{
+		aSettings.iShowPassWordPrompt = ETrue;
+	}
+	
 	// Session validity time	
 	TInt64 maxSessionTimeMicro = view.ColInt64(colSet->ColNo(cf_str_EAP_MSCHAPv2_max_session_validity_time_literal));
 	
@@ -473,7 +561,11 @@
 	aSettings.iSessionValidityTime = static_cast<TUint>(maxSessionTimeMin);
 	aSettings.iSessionValidityTimePresent = ETrue;
 		
-	CleanupStack::PopAndDestroy(3); // view, colset, buf
+	CleanupStack::PopAndDestroy(colSet);
+	CleanupStack::PopAndDestroy(&view);
+	CleanupStack::PopAndDestroy(buf);
+
+	EAP_TRACE_SETTINGS(&aSettings);
 }
 
 void EapMsChapV2DbUtils::CopySettingsL(
@@ -485,25 +577,37 @@
 	const TInt aDestIndex,
 	const eap_type_value_e aDestTunnelingType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aSrcTunnelingVendorType = aSrcTunnelingType.get_vendor_type();
-	TUint aDestTunnelingVendorType = aDestTunnelingType.get_vendor_type();
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapMsChapV2DbUtils::CopySettingsL(): -Start- aSrcIndexType=%d, aSrcIndex=%d, aSrcTunnelingType=0xfe%06x%08x\n"),
+		aSrcIndexType,
+		aSrcIndex,
+		aSrcTunnelingType.get_vendor_id(),
+		aSrcTunnelingType.get_vendor_type()));
+	
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapMsChapV2DbUtils::CopySettingsL(): -Start- aDestIndexType=%d, aDestTunnelingType=0xfe%06x%08x\n"),
+		aDestIndexType,
+		aDestIndex,
+		aDestTunnelingType.get_vendor_id(),
+		aDestTunnelingType.get_vendor_type()));
 
-#else
-
-	TUint aSrcTunnelingVendorType = static_cast<TUint>(aSrcTunnelingType);
-	TUint aDestTunnelingVendorType = static_cast<TUint>(aDestTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapMsChapV2DbUtils::CopySettingsL()\n"));
 
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
-	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
+	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
 
-	sqlStatement.Format(KSQL, &KMsChapV2TableName, 
-		&KServiceType, aSrcIndexType, &KServiceIndex, aSrcIndex, &KTunnelingType, aSrcTunnelingVendorType);
+	sqlStatement.Format(KSQL,
+		&KMsChapV2TableName, 
+		&KServiceType,
+		aSrcIndexType,
+		&KServiceIndex,
+		aSrcIndex,
+		&KTunnelingTypeVendorId,
+		aSrcTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aSrcTunnelingType.get_vendor_type());
 	
 	RDbView view;
 	
@@ -534,14 +638,15 @@
 	CleanupStack::PushL(colSet);
 		
 	view.SetColL(colSet->ColNo(KServiceType), static_cast<TUint>(aDestIndexType));
-    
     view.SetColL(colSet->ColNo(KServiceIndex), aDestIndex);
-    
-    view.SetColL(colSet->ColNo(KTunnelingType), aDestTunnelingVendorType);
+	view.SetColL(colSet->ColNo(KTunnelingTypeVendorId), aDestTunnelingType.get_vendor_id());
+	view.SetColL(colSet->ColNo(KTunnelingType), aDestTunnelingType.get_vendor_type());
 
     view.PutL();
     	
-	CleanupStack::PopAndDestroy(3); // view, colset, buf
+	CleanupStack::PopAndDestroy(colSet);
+	CleanupStack::PopAndDestroy(&view);
+	CleanupStack::PopAndDestroy(buf);
 }
 
 void EapMsChapV2DbUtils::DeleteConfigurationL(	
@@ -549,84 +654,69 @@
 	const TInt aIndex,
 	const eap_type_value_e aTunnelingType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapMsChapV2DbUtils::DeleteConfigurationL(): -Start- aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type()));
 
-#else
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapMsChapV2DbUtils::DeleteConfigurationL()\n"));
 
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
+	RDbNamedDatabase aDatabase;
+	RFs aFileServerSession;
 
-	RDbs session;
-	RDbNamedDatabase database;
-	// Connect to the DBMS server.
-	User::LeaveIfError(session.Connect());
-	CleanupClosePushL(session);	
-		
-#ifdef SYMBIAN_SECURE_DBMS
+	TInt error(KErrNone);
+	TFileName aPrivateDatabasePathName;
 	
-	// Create the secure shared database with the specified secure policy.
-	// Database will be created in the data caging path for DBMS (C:\private\100012a5).
-	
-	TInt err = database.Create(session, KDatabaseName, KSecureUIDFormat);
-	
-	if(err == KErrNone)
+	EapPluginTools::CreateDatabaseLC(
+		aDatabase,
+		aFileServerSession,
+		error,
+		KEapMsChapV2DatabaseName,
+		aPrivateDatabasePathName);
+
+	if(error == KErrNone)
 	{
 		// Database was created so it was empty. No need for further actions.
-		database.Destroy();
-		CleanupStack::PopAndDestroy();
+		aDatabase.Destroy();
+		CleanupStack::PopAndDestroy(&aDatabase);
+		CleanupStack::PopAndDestroy(&aFileServerSession);
 		return;
-		
-	} 
-	else if (err != KErrAlreadyExists) 
+	}
+	else if (error != KErrAlreadyExists) 
 	{
-		User::LeaveIfError(err);
+		User::LeaveIfError(error);
 	}
 	
-	// Database existed, open it.
-	User::LeaveIfError(database.Open(session, KDatabaseName, KSecureUIDFormat));
-	CleanupClosePushL(database);
-		
-#else
-	// For non-secured database. The database will be created in the old location (c:\system\data).
-	
-	RFs fsSession;		
-	User::LeaveIfError(fsSession.Connect());
-	CleanupClosePushL(fsSession);	
-	TInt err = database.Create(fsSession, KDatabaseName);
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapMsChapV2DbUtils::DeleteConfigurationL(): - calls aDatabase.Open()\n")));
+
+	error = aDatabase.Open(aFileServerSession, aPrivateDatabasePathName);
 
-	if(err == KErrNone)
-	{
-		// Database was created so it was empty. No need for further actions.
-		database.Destroy();
-		CleanupStack::PopAndDestroy(2); // fsSession, database session
-		return;
-		
-	} 
-	else if (err != KErrAlreadyExists) 
-	{
-		User::LeaveIfError(err);
-	}
-	
-	CleanupStack::PopAndDestroy(); // close fsSession
-	
-	User::LeaveIfError(database.Open(session, KDatabaseName));
-	CleanupClosePushL(database);		
-	    
-#endif // #ifdef SYMBIAN_SECURE_DBMS
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapMsChapV2DbUtils::DeleteConfigurationL(): - Opened private DB for EAP-LEAP. error=%d\n"), error));
+
+	User::LeaveIfError(error);
 
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
 	// Main settings table
-	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQL, &KMsChapV2TableName, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+
+	sqlStatement.Format(KSQL,
+		&KMsChapV2TableName, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());
+
 	// Evaluate view
 	RDbView view;
-	User::LeaveIfError(view.Prepare(database,TDbQuery(sqlStatement), TDbWindow::EUnlimited));
+	User::LeaveIfError(view.Prepare(aDatabase,TDbQuery(sqlStatement), TDbWindow::EUnlimited));
 	CleanupClosePushL(view);
 	User::LeaveIfError(view.EvaluateAll());
 
@@ -638,8 +728,10 @@
 		} while (view.NextL() != EFalse);
 	}
 
-	// Close database
-	CleanupStack::PopAndDestroy(4); // view, buf, database, session
+	CleanupStack::PopAndDestroy(&view);
+	CleanupStack::PopAndDestroy(buf);
+	CleanupStack::PopAndDestroy(&aDatabase);
+	CleanupStack::PopAndDestroy(&aFileServerSession);
 }
 
 // End of File
--- a/eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/src/EapMsChapV2Proxy.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/src/EapMsChapV2Proxy.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 16 %
+* %version: 13.1.5 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -32,6 +32,7 @@
 #include "EapMsChapV2.h"
 #include <e32base.h>
 #include <ecom/implementationproxy.h>
+#include "EapTraceSymbian.h"
 
 #include "EapolUID.h"
 
@@ -45,6 +46,9 @@
 
 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("ImplementationGroupProxy(): CEapMsChapV2\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: ImplementationGroupProxy(): CEapMsChapV2\n"));
+
 	aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
 
 	return ImplementationTable;
--- a/eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/src/EapMsChapV2UiConnection.cpp	Thu May 13 22:51:27 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,140 +0,0 @@
-/*
-* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  EAP and WLAN authentication protocols.
-*
-*/
-
-/*
-* %version: 10.1.2 %
-*/
-
-// This is enumeration of EAPOL source code.
-#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
-	#undef EAP_FILE_NUMBER_ENUM
-	#define EAP_FILE_NUMBER_ENUM 298 
-	#undef EAP_FILE_NUMBER_DATE 
-	#define EAP_FILE_NUMBER_DATE 1127594498 
-#endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
-
-#include "EapMsChapV2DbUtils.h"
-#include <EapMsChapV2UiConnection.h>
-#include <EapMsChapV2UiDataConnection.h>
-
-CEapMsChapV2UiConnection::CEapMsChapV2UiConnection(
-    const TIndexType aIndexType,
-    const TInt aIndex,
-    const TInt aTunnelingType,
-    const TInt aEAPType)
-    : iIndexType(aIndexType)
-    , iIndex(aIndex)
-    , iTunnelingType(aTunnelingType)
-    , iIsConnected(EFalse)
-    , iDataConn(NULL)
-    , iEAPType(aEAPType)
-{
-}
-
-
-CEapMsChapV2UiConnection::~CEapMsChapV2UiConnection()
-{
-}
-
-
-TInt CEapMsChapV2UiConnection::Connect()
-{
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	eap_type_value_e tunnelingType(static_cast<eap_type_ietf_values_e>(iTunnelingType));
-
-#else
-
-	eap_type_value_e tunnelingType = static_cast<eap_type_value_e>(iTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
-	TRAPD(err, EapMsChapV2DbUtils::OpenDatabaseL(
-		iDbNamedDatabase, 
-		iDbs, 
-		iIndexType, 
-		iIndex, 
-		tunnelingType));
-    if (err == KErrNone)
-    {
-        iIsConnected = ETrue;
-    }
-
-    return err;
-}
-
-
-TInt CEapMsChapV2UiConnection::Close()
-{
-    if (iIsConnected)
-    {
-        iDbNamedDatabase.Close();
-        iDbs.Close();
-    }
-    iIsConnected = EFalse;
-
-    return KErrNone;
-}
-
-
-CEapMsChapV2UiDataConnection * CEapMsChapV2UiConnection::GetDataConnection()
-{
-    if (!iDataConn)
-    {
-        iDataConn = new CEapMsChapV2UiDataConnection(this);
-    }
-
-    return iDataConn;
-}
-
-TInt CEapMsChapV2UiConnection::GetDatabase(RDbNamedDatabase & aDatabase)
-{
-    if (iIsConnected == EFalse)
-    {
-        return KErrSessionClosed;
-    }
-
-    aDatabase = iDbNamedDatabase;
-    return KErrNone;
-}
-
-
-TIndexType CEapMsChapV2UiConnection::GetIndexType()
-{
-    return iIndexType;
-}
-
-
-TInt CEapMsChapV2UiConnection::GetIndex()
-{
-    return iIndex;
-}
-
-
-TInt CEapMsChapV2UiConnection::GetTunnelingType()
-{
-    return iTunnelingType;
-}
-
-TInt CEapMsChapV2UiConnection::GetBearerEAPType()
-{
-	return iEAPType;
-}
-
-// End of file
-
-
--- a/eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/src/EapMsChapV2UiDataConnection.cpp	Thu May 13 22:51:27 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,253 +0,0 @@
-/*
-* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  EAP and WLAN authentication protocols.
-*
-*/
-
-/*
-* %version: 12.1.2.1.2 %
-*/
-
-// This is enumeration of EAPOL source code.
-#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
-	#undef EAP_FILE_NUMBER_ENUM
-	#define EAP_FILE_NUMBER_ENUM 300 
-	#undef EAP_FILE_NUMBER_DATE 
-	#define EAP_FILE_NUMBER_DATE 1127594498 
-#endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
-
-#include <e32base.h>
-#include "EapMsChapV2DbUtils.h"
-#include "EapMsChapV2DbParameterNames.h"
-#include "EapMsChapV2DbDefaults.h"
-#include <EapMsChapV2UiConnection.h>
-#include <EapMsChapV2UiDataConnection.h>
-#include <EapMsChapV2UiMsChapV2Data.h>
-#include "eap_am_trace_symbian.h"
-
-const TUint KMaxSqlQueryLength = 256;
-
-
-CEapMsChapV2UiDataConnection::CEapMsChapV2UiDataConnection(CEapMsChapV2UiConnection * aUiConn)
-: iIsOpened(EFalse)
-, iUiConn(aUiConn)
-, iColSet(NULL)
-, iDataPtr(NULL)
-{
-}
-
-
-CEapMsChapV2UiDataConnection::~CEapMsChapV2UiDataConnection()
-{
-    if (iUiConn)
-    {
-        Close();
-        iUiConn = NULL;
-    }
-}
-
-
-TInt CEapMsChapV2UiDataConnection::Open()
-{
-    if (iIsOpened)
-    {
-        return KErrAlreadyExists;
-    }
-
-    TInt err = iUiConn->GetDatabase(iDatabase);
-    if (err != KErrNone)
-    {
-        return err;
-    }
-
-    iIsOpened = ETrue;
-    return KErrNone;
-}
-
-
-TInt CEapMsChapV2UiDataConnection::GetData(CEapMsChapV2UiMsChapV2Data ** aDataPtr)
-{
-    if (aDataPtr == NULL)
-    {
-        return KErrArgument;
-    }
-    if (iIsOpened == EFalse)
-    {
-        return KErrSessionClosed;
-    }
-    iDataPtr = new CEapMsChapV2UiMsChapV2Data();
-    if (!iDataPtr)
-    {
-        return KErrNoMemory;
-    }
-
-    TRAPD(err, FetchDataL());
-    if (err != KErrNone)
-    {
-        delete iDataPtr;
-        iDataPtr = NULL;
-        
-        delete iColSet;
-        iColSet = NULL;
-        
-        iView.Close();
-        
-        return err;
-    }
-
-    *aDataPtr = iDataPtr;
-
-    return KErrNone;
-}
-
-
-TInt CEapMsChapV2UiDataConnection::Update()
-{
-    TRAPD(err, iView.UpdateL());
-    if (err != KErrNone)
-    {
-        return err;
-    }
-    
-	// Validate the length of username and password.
-	if(iDataPtr->GetUsername().Length() > KMaxUsernameLengthInDB
-		|| iDataPtr->GetPassword().Length() > KMaxPasswordLengthInDB)
-	{
-		// Username or password too long. Can not be stored in DB.
-		EAP_TRACE_DEBUG_SYMBIAN((_L("CEapMsChapV2UiDataConnection::Update: Too long username or password. Length: UN=%d, PW=%d\n"),
-			iDataPtr->GetUsername().Length(),
-			iDataPtr->GetPassword().Length()));
-		
-		return KErrArgument;
-	}
-    
-    TRAP(err, iView.SetColL(iColSet->ColNo(cf_str_EAP_MSCHAPV2_username_literal), iDataPtr->GetUsername()));
-    if (err != KErrNone)
-    {
-        return err;
-    }
-
-    TRAP(err, iView.SetColL(iColSet->ColNo(cf_str_EAP_MSCHAPV2_password_literal), iDataPtr->GetPassword()));
-    if (err != KErrNone)
-    {
-        return err;
-    }
-    
-    if (*(iDataPtr->GetPasswordPrompt()))
-    {
-        TRAP(err, iView.SetColL(iColSet->ColNo(cf_str_EAP_MSCHAPV2_password_prompt_literal), EMSCHAPV2PasswordPromptOn));
-		if (err != KErrNone)
-		{
-			return err;
-		}
-    }
-    else
-    {
-        TRAP(err, iView.SetColL(iColSet->ColNo(cf_str_EAP_MSCHAPV2_password_prompt_literal), EMSCHAPV2PasswordPromptOff));
-		if (err != KErrNone)
-		{
-			return err;
-		}
-    }
-    
-	// Last full authentication time should be made zero when EAP configurations are modified.
-	// This makes sure that the next authentication with this EAP would be full authentication
-	// instead of reauthentication even if the session is still valid.
-	
-	TRAP(err, iView.SetColL(iColSet->ColNo(KMSCHAPv2LastFullAuthTime), default_FullAuthTime));
-    if (err != KErrNone)
-    {
-        return err;
-    }
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("Session Validity: EAP-Type=MSCHAPv2 (or plain), Resetting Full Auth Time since settings are modified\n")));
-
-    TRAP(err, iView.PutL());
-
-    return err;
-}
-
-
-TInt CEapMsChapV2UiDataConnection::Close()
-{
-    if (iIsOpened == EFalse)
-    {
-        return KErrNone;
-    }
-
-	delete iDataPtr;
-	iDataPtr = NULL;
-	
-	delete iColSet;
-	iColSet = NULL;
-
-    iView.Close();
-
-    iUiConn = NULL;
-    
-    return KErrNone;
-}
-
-
-void CEapMsChapV2UiDataConnection::FetchDataL()
-{
-	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
-	TPtr sqlStatement = buf->Des();
-
-	// Form the query. Query everything.
-	_LIT(KSQLQuery, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLQuery,
-						&KMsChapV2TableName,
-						&KServiceType,
-						iUiConn->GetIndexType(),
-						&KServiceIndex,
-						iUiConn->GetIndex(),
-						&KTunnelingType, 
-						iUiConn->GetTunnelingType());
-	// Evaluate view
-	User::LeaveIfError(iView.Prepare(iDatabase, TDbQuery(sqlStatement)));
-	User::LeaveIfError(iView.EvaluateAll());
-		
-	// Get the first (and only) row
-	iView.FirstL();
-	iView.GetL();
-					
-	// Get column set so we get the correct column numbers
-	delete iColSet;
-	iColSet = NULL;
-	iColSet = iView.ColSetL();
-
-	// Start fetching the values
-
-	// Prompt password
-	TUint intValue = iView.ColUint(iColSet->ColNo(cf_str_EAP_MSCHAPV2_password_prompt_literal));
-    if (intValue == 0)
-    {
-        *(iDataPtr->GetPasswordPrompt()) = EFalse;
-    }
-    else
-    {
-        *(iDataPtr->GetPasswordPrompt()) = ETrue;
-    }
-
-	// username
-    iDataPtr->GetUsername().Copy(iView.ColDes16(iColSet->ColNo(cf_str_EAP_MSCHAPV2_username_literal)));
-
-	// password
-	iDataPtr->GetPassword().Copy(iView.ColDes16(iColSet->ColNo(cf_str_EAP_MSCHAPV2_password_literal)));
-
-    CleanupStack::PopAndDestroy(buf);
-}
-
-// End of file
--- a/eapol/eapol_framework/eapol_symbian/am/type/mschapv2/symbian/plugin/src/EapMsChapV2UiMsChapV2Data.cpp	Thu May 13 22:51:27 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
-* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  EAP and WLAN authentication protocols.
-*
-*/
-
-/*
-* %version: 7.1.2 %
-*/
-
-// This is enumeration of EAPOL source code.
-#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
-	#undef EAP_FILE_NUMBER_ENUM
-	#define EAP_FILE_NUMBER_ENUM 302 
-	#undef EAP_FILE_NUMBER_DATE 
-	#define EAP_FILE_NUMBER_DATE 1127594498 
-#endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
-
-#include <EapMsChapV2UiMsChapV2Data.h>
-
-
-CEapMsChapV2UiMsChapV2Data::CEapMsChapV2UiMsChapV2Data()
-{
-}
-
-
-CEapMsChapV2UiMsChapV2Data::~CEapMsChapV2UiMsChapV2Data()
-{
-}
-
-
-TDes& CEapMsChapV2UiMsChapV2Data::GetUsername()
-{
-    return iUsername;
-}
-
-
-TDes& CEapMsChapV2UiMsChapV2Data::GetPassword()
-{
-    return iPassword;
-}
-
-
-TBool * CEapMsChapV2UiMsChapV2Data::GetPasswordPrompt()
-{
-    return &iPasswordPrompt;
-}
-
-// End of file
--- a/eapol/eapol_framework/eapol_symbian/am/type/protected_setup/EapProtectedSetupInterface.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/protected_setup/EapProtectedSetupInterface.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: 6.1.2 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -36,7 +36,7 @@
 
 // ================= MEMBER FUNCTIONS =======================
 
-CEapProtectedSetupInterface::CEapProtectedSetupInterface(abs_eap_am_tools_c* const aTools, eap_am_type_protected_setup_symbian_c* const aParent)
+CEapProtectedSetupInterface::CEapProtectedSetupInterface(abs_eap_am_tools_c* const aTools, CEapAmProtectedSetupSymbian* const aParent)
 : CActive(CActive::EPriorityStandard)
 , iParent(aParent)
 , m_am_tools(aTools)
@@ -50,7 +50,7 @@
 //--------------------------------------------------
 
 CEapProtectedSetupInterface* CEapProtectedSetupInterface::NewL(abs_eap_am_tools_c* const aTools, 
-											   eap_am_type_protected_setup_symbian_c* const aParent)
+											   CEapAmProtectedSetupSymbian* const aParent)
 {
 	CEapProtectedSetupInterface* self = new(ELeave) CEapProtectedSetupInterface(aTools, aParent);
 	CleanupStack::PushL(self);
--- a/eapol/eapol_framework/eapol_symbian/am/type/protected_setup/eap_am_type_protected_setup_symbian.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/protected_setup/eap_am_type_protected_setup_symbian.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 18.1.8 %
+* %version: 18.1.4.1.9 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -34,7 +34,6 @@
 #include "eap_am_tools.h"
 #include "eap_state_notification.h"
 #include "eap_config.h"
-#include <wdbifwlansettings.h>
 
 #include "eap_type_simple_config_types.h"
 #include "eap_tlv_message_data.h"
@@ -42,7 +41,7 @@
 #include "simple_config_credential.h"
 #include "abs_eap_configuration_if.h"
 
-#include "eap_am_trace_symbian.h"
+#include "EapTraceSymbian.h"
 #include <mmtsy_names.h>
 
 static const char EAP_AM_TYPE_SIMPLE_CONFIG_MEMORY_STORE_KEY[] = "eap_am_type_simple_config_simulator_c credential_store";
@@ -51,7 +50,7 @@
 
 
 // 
-EAP_FUNC_EXPORT eap_am_type_protected_setup_symbian_c::eap_am_type_protected_setup_symbian_c(
+EAP_FUNC_EXPORT CEapAmProtectedSetupSymbian::CEapAmProtectedSetupSymbian(
 	abs_eap_am_tools_c * const tools,
 	abs_eap_base_type_c * const partner,
 	const TIndexType aIndexType,
@@ -92,7 +91,7 @@
 	EAP_TRACE_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
-		(EAPL("SIMPLE_CONFIG: %s: function: eap_am_type_protected_setup_symbian_c(): this = 0x%08x\n"),
+		(EAPL("SIMPLE_CONFIG: %s: function: CEapAmProtectedSetupSymbian(): this = 0x%08x\n"),
 		(m_is_client == true ? "client": "server"),
 		this));
 
@@ -119,7 +118,7 @@
 
 //--------------------------------------------------
 
-void eap_am_type_protected_setup_symbian_c::ConstructL()
+void CEapAmProtectedSetupSymbian::ConstructL()
 {
 	if (m_is_client == true)
 	{
@@ -139,7 +138,7 @@
 
 //--------------------------------------------------
 
-eap_am_type_protected_setup_symbian_c* eap_am_type_protected_setup_symbian_c::NewL(
+CEapAmProtectedSetupSymbian* CEapAmProtectedSetupSymbian::NewL(
 	abs_eap_am_tools_c * const tools,
 	abs_eap_base_type_c * const partner,
 	const TIndexType aIndexType,
@@ -150,7 +149,7 @@
 	const eap_am_network_id_c * const receive_network_id,
 	abs_eap_configuration_if_c * const configuration_if)
 {
-	eap_am_type_protected_setup_symbian_c* self = new (ELeave) eap_am_type_protected_setup_symbian_c(
+	CEapAmProtectedSetupSymbian* self = new (ELeave) CEapAmProtectedSetupSymbian(
 		tools,
 		partner,
 		aIndexType, 
@@ -177,7 +176,7 @@
 //--------------------------------------------------
 
 // 
-EAP_FUNC_EXPORT eap_am_type_protected_setup_symbian_c::~eap_am_type_protected_setup_symbian_c()
+EAP_FUNC_EXPORT CEapAmProtectedSetupSymbian::~CEapAmProtectedSetupSymbian()
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
@@ -185,7 +184,7 @@
 	EAP_TRACE_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
-		(EAPL("SIMPLE_CONFIG: %s: function: ~eap_am_type_protected_setup_symbian_c(): this = 0x%08x\n"),
+		(EAPL("SIMPLE_CONFIG: %s: function: ~CEapAmProtectedSetupSymbian(): this = 0x%08x\n"),
 		(m_is_client == true ? "client": "server"),
 		this));
 
@@ -201,7 +200,7 @@
 
 //--------------------------------------------------
 
-abs_simple_config_am_services_c * eap_am_type_protected_setup_symbian_c::get_simple_config_am_partner()
+abs_simple_config_am_services_c * CEapAmProtectedSetupSymbian::get_simple_config_am_partner()
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 	EAP_ASSERT_ALWAYS(m_simple_config_am_partner != 0);
@@ -211,7 +210,7 @@
 
 //--------------------------------------------------
 
-EAP_FUNC_EXPORT void eap_am_type_protected_setup_symbian_c::set_simple_config_am_partner(abs_simple_config_am_services_c * const simple_config_am_partner)
+EAP_FUNC_EXPORT void CEapAmProtectedSetupSymbian::set_simple_config_am_partner(abs_simple_config_am_services_c * const simple_config_am_partner)
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 	m_simple_config_am_partner = simple_config_am_partner;
@@ -220,7 +219,7 @@
 
 //--------------------------------------------------
 
-EAP_FUNC_EXPORT void eap_am_type_protected_setup_symbian_c::set_am_partner(abs_eap_am_type_simple_config_c * const partner)
+EAP_FUNC_EXPORT void CEapAmProtectedSetupSymbian::set_am_partner(abs_eap_am_type_simple_config_c * const partner)
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -229,13 +228,13 @@
 
 //--------------------------------------------------
 
-EAP_FUNC_EXPORT eap_status_e eap_am_type_protected_setup_symbian_c::configure()
+EAP_FUNC_EXPORT eap_status_e CEapAmProtectedSetupSymbian::configure()
 {
 
 	EAP_TRACE_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
-		(EAPL("SIMPLE_CONFIG: %s: function: eap_am_type_protected_setup_symbian_c::configure()\n"),
+		(EAPL("SIMPLE_CONFIG: %s: function: CEapAmProtectedSetupSymbian::configure()\n"),
 		 (m_is_client == true ? "client": "server")));
 
 	if (m_configured == true)
@@ -243,7 +242,7 @@
 		EAP_TRACE_DEBUG(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
-			(EAPL("SIMPLE_CONFIG: %s: function: eap_am_type_protected_setup_symbian_c::configure(): Already configured.\n"),
+			(EAPL("SIMPLE_CONFIG: %s: function: CEapAmProtectedSetupSymbian::configure(): Already configured.\n"),
 			 (m_is_client == true ? "client": "server")));
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
@@ -326,7 +325,7 @@
 
 //--------------------------------------------------
 
-EAP_FUNC_EXPORT eap_status_e eap_am_type_protected_setup_symbian_c::reset()
+EAP_FUNC_EXPORT eap_status_e CEapAmProtectedSetupSymbian::reset()
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 	m_device_parameters_valid = false;
@@ -336,14 +335,14 @@
 
 //--------------------------------------------------
 
-EAP_FUNC_EXPORT eap_status_e eap_am_type_protected_setup_symbian_c::shutdown()
+EAP_FUNC_EXPORT eap_status_e CEapAmProtectedSetupSymbian::shutdown()
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
 	EAP_TRACE_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
-		(EAPL("SIMPLE_CONFIG: %s: function: eap_am_type_protected_setup_symbian_c::shutdown(): ")
+		(EAPL("SIMPLE_CONFIG: %s: function: CEapAmProtectedSetupSymbian::shutdown(): ")
 		 EAPL("this = 0x%08x\n"),
 		(m_is_client == true ? "client": "server"),
 		this));
@@ -387,7 +386,7 @@
 		EAP_TRACE_DEBUG(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
-			(EAPL("EAP_type_SIMPLE_CONFIG: eap_am_type_protected_setup_symbian_c::shutdown():")
+			(EAPL("EAP_type_SIMPLE_CONFIG: CEapAmProtectedSetupSymbian::shutdown():")
 			 EAPL("credentials removed from eapol\n")));
 		
 		eap_tlv_message_data_c tlv_data(m_am_tools);
@@ -417,7 +416,7 @@
 
 //--------------------------------------------------
 
-void eap_am_type_protected_setup_symbian_c::send_error_notification(const eap_status_e error)
+void CEapAmProtectedSetupSymbian::send_error_notification(const eap_status_e error)
 {
 	{
 		eap_general_state_variable_e general_state_variable(eap_general_state_authentication_error);
@@ -448,7 +447,7 @@
 
 //--------------------------------------------------
 
-EAP_FUNC_EXPORT eap_status_e eap_am_type_protected_setup_symbian_c::authentication_finished(
+EAP_FUNC_EXPORT eap_status_e CEapAmProtectedSetupSymbian::authentication_finished(
 	const bool true_when_successfull,
 	const bool true_when_session_resumed)
 {
@@ -470,7 +469,7 @@
 
 //--------------------------------------------------
 
-EAP_FUNC_EXPORT eap_status_e eap_am_type_protected_setup_symbian_c::query_eap_identity(
+EAP_FUNC_EXPORT eap_status_e CEapAmProtectedSetupSymbian::query_eap_identity(
 	const eap_am_network_id_c * const receive_network_id,
 	const u8_t eap_identifier,
 	bool * const use_manual_username,
@@ -496,6 +495,12 @@
 	if (m_use_manual_username == true
 		&& m_manual_username.get_is_valid_data() == true)
 	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("SIMPLE_CONFIG: %s: function: query_eap_identity(): manual username\n"),
+			 (m_is_client == true ? "client": "server")));
+
 		status = manual_username->set_copy_of_buffer(&m_manual_username);
 	}
 
@@ -534,7 +539,7 @@
 //--------------------------------------------------
 
 //
-EAP_FUNC_EXPORT eap_status_e eap_am_type_protected_setup_symbian_c::cancel_identity_query()
+EAP_FUNC_EXPORT eap_status_e CEapAmProtectedSetupSymbian::cancel_identity_query()
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
@@ -560,7 +565,7 @@
 //--------------------------------------------------
 
 //
-EAP_FUNC_EXPORT void eap_am_type_protected_setup_symbian_c::set_is_valid()
+EAP_FUNC_EXPORT void CEapAmProtectedSetupSymbian::set_is_valid()
 {
 	m_is_valid = true;
 }
@@ -568,7 +573,7 @@
 //--------------------------------------------------
 
 //
-EAP_FUNC_EXPORT bool eap_am_type_protected_setup_symbian_c::get_is_valid()
+EAP_FUNC_EXPORT bool CEapAmProtectedSetupSymbian::get_is_valid()
 {
 	return m_is_valid;
 }
@@ -576,7 +581,7 @@
 //--------------------------------------------------
 
 //
-EAP_FUNC_EXPORT eap_status_e eap_am_type_protected_setup_symbian_c::type_configure_read(
+EAP_FUNC_EXPORT eap_status_e CEapAmProtectedSetupSymbian::type_configure_read(
 	const eap_configuration_field_c * const field,
 	eap_variable_data_c * const data)
 {
@@ -656,18 +661,20 @@
 //--------------------------------------------------
 
 //
-void eap_am_type_protected_setup_symbian_c::read_device_passwordL(
+void CEapAmProtectedSetupSymbian::read_device_passwordL(
 	eap_config_string /*field*/,
 	const u32_t /*field_length*/,
-	eap_variable_data_c * const data)
+	eap_variable_data_c * const /* data */)
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
 	// Get the things from commsdat here.
-	
+
+#if 0
+
 	// We need PSK (PIN code for protected setup) from the CommsDat.
 	// CommDbIf is used to get the PSK.
-	
+
 	CWLanSettings* wlan_settings = new(ELeave) CWLanSettings;
 	CleanupStack::PushL(wlan_settings);
 	SWLANSettings wlanSettings;
@@ -682,7 +689,7 @@
 		EAP_TRACE_DEBUG(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT, (
-			EAPL("ERROR: eap_am_type_protected_setup_symbian_c::read_device_passwordL() Connecting to CommsDat failed!\n")));
+			EAPL("ERROR: CEapAmProtectedSetupSymbian::read_device_passwordL() Connecting to CommsDat failed!\n")));
 				
 		User::Leave(KErrCouldNotConnect);
 	}
@@ -690,7 +697,7 @@
 	EAP_TRACE_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT, (
-		EAPL("eap_am_type_protected_setup_symbian_c::read_device_passwordL() Connected to CommDbIf.\n")));
+		EAPL("CEapAmProtectedSetupSymbian::read_device_passwordL() Connected to CommDbIf.\n")));
 
 	error = wlan_settings->GetWlanSettingsForService(m_index, wlanSettings);
 	if ( error != KErrNone)
@@ -698,7 +705,7 @@
 		EAP_TRACE_DEBUG(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT, (
-			EAPL("ERROR: eap_am_type_protected_setup_symbian_c::read_device_passwordL() GetWlanSettingsForService failed, error=%d\n"),
+			EAPL("ERROR: CEapAmProtectedSetupSymbian::read_device_passwordL() GetWlanSettingsForService failed, error=%d\n"),
 			error));
 	
 		wlan_settings->Disconnect();
@@ -765,13 +772,15 @@
 	wlan_settings->Disconnect();
 	CleanupStack::PopAndDestroy(wlan_settings);
 
+#endif
+
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 }
 
 //--------------------------------------------------
 
 //
-EAP_FUNC_EXPORT eap_status_e eap_am_type_protected_setup_symbian_c::type_configure_write(
+EAP_FUNC_EXPORT eap_status_e CEapAmProtectedSetupSymbian::type_configure_write(
 	const eap_configuration_field_c * const field,
 	eap_variable_data_c * const data)
 {
@@ -787,7 +796,7 @@
 
 //--------------------------------------------------
 
-abs_eap_am_type_simple_config_c * eap_am_type_protected_setup_symbian_c::get_am_partner()
+abs_eap_am_type_simple_config_c * CEapAmProtectedSetupSymbian::get_am_partner()
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -796,7 +805,7 @@
 
 //--------------------------------------------------
 
-EAP_FUNC_EXPORT eap_status_e eap_am_type_protected_setup_symbian_c::query_network_and_device_parameters(
+EAP_FUNC_EXPORT eap_status_e CEapAmProtectedSetupSymbian::query_network_and_device_parameters(
 	const simple_config_state_e state)
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -808,7 +817,7 @@
 	EAP_TRACE_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
-		(EAPL("SIMPLE_CONFIG: %s: eap_am_type_protected_setup_symbian_c::query_network_and_device_parameters()\n"),
+		(EAPL("SIMPLE_CONFIG: %s: CEapAmProtectedSetupSymbian::query_network_and_device_parameters()\n"),
 		(m_is_client == true ? "client": "server")));
 
 	eap_status_e status = eap_status_process_general_error;
@@ -820,7 +829,7 @@
 	{
 		
 		EAP_TRACE_DEBUG_SYMBIAN(
-			(_L("eap_am_type_protected_setup_symbian_c::query_network_and_device_parameters: Parameters exist, completing query immediately.")));
+			(_L("CEapAmProtectedSetupSymbian::query_network_and_device_parameters: Parameters exist, completing query immediately.")));
 
 		// pass the parameters
 		status = get_simple_config_am_partner()->complete_query_network_and_device_parameters(
@@ -928,7 +937,7 @@
 	EAP_TRACE_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
-		(EAPL("eap_am_type_protected_setup_symbian_c::query_network_and_device_parameters() m_Device_Password_ID=%d\n"),
+		(EAPL("CEapAmProtectedSetupSymbian::query_network_and_device_parameters() m_Device_Password_ID=%d\n"),
 		m_Device_Password_ID));
 
 	{
@@ -1097,7 +1106,7 @@
 //--------------------------------------------------
 
 // This is always synchronous call.
-EAP_FUNC_EXPORT eap_status_e eap_am_type_protected_setup_symbian_c::save_simple_config_session(
+EAP_FUNC_EXPORT eap_status_e CEapAmProtectedSetupSymbian::save_simple_config_session(
 	const simple_config_state_e state,
 	EAP_TEMPLATE_CONST eap_array_c<simple_config_credential_c> * const credential_array,
 	const eap_variable_data_c * const new_password,
@@ -1200,7 +1209,7 @@
 
 //--------------------------------------------------
 
-EAP_FUNC_EXPORT eap_status_e eap_am_type_protected_setup_symbian_c::received_registrar_information(
+EAP_FUNC_EXPORT eap_status_e CEapAmProtectedSetupSymbian::received_registrar_information(
 	EAP_TEMPLATE_CONST eap_array_c<simple_config_payloads_c> * const M2D_payloads)
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -1281,7 +1290,7 @@
 
 //--------------------------------------------------
 
-EAP_FUNC_EXPORT eap_status_e eap_am_type_protected_setup_symbian_c::cancel_query_network_and_device_parameters()
+EAP_FUNC_EXPORT eap_status_e CEapAmProtectedSetupSymbian::cancel_query_network_and_device_parameters()
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
@@ -1306,7 +1315,7 @@
 
 //--------------------------------------------------
 
-EAP_FUNC_EXPORT eap_status_e eap_am_type_protected_setup_symbian_c::load_module(
+EAP_FUNC_EXPORT eap_status_e CEapAmProtectedSetupSymbian::load_module(
 		const eap_type_value_e eap_type,
 		const eap_type_value_e tunneling_type,
 		abs_eap_base_type_c * const partner,
@@ -1318,7 +1327,7 @@
 	EAP_TRACE_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
-		(EAPL("eap_am_type_protected_setup_symbian_c::load_module(0x%08x)\n"),
+		(EAPL("CEapAmProtectedSetupSymbian::load_module(0x%08x)\n"),
 		 convert_eap_type_to_u32_t(eap_type)));
 
 	eap_status_e status = m_partner->load_module(
@@ -1335,13 +1344,13 @@
 
 //--------------------------------------------------
 
-EAP_FUNC_EXPORT eap_status_e eap_am_type_protected_setup_symbian_c::check_is_valid_eap_type(const eap_type_value_e eap_type)
+EAP_FUNC_EXPORT eap_status_e CEapAmProtectedSetupSymbian::check_is_valid_eap_type(const eap_type_value_e eap_type)
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 	EAP_TRACE_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
-		(EAPL("eap_am_type_protected_setup_symbian_c::check_is_valid_eap_type(0x%08x)\n"),
+		(EAPL("CEapAmProtectedSetupSymbian::check_is_valid_eap_type(0x%08x)\n"),
 		 convert_eap_type_to_u32_t(eap_type)));
 
 	eap_status_e status = m_partner->check_is_valid_eap_type(
@@ -1353,7 +1362,7 @@
 
 //--------------------------------------------------
 
-EAP_FUNC_EXPORT eap_status_e eap_am_type_protected_setup_symbian_c::get_eap_type_list(
+EAP_FUNC_EXPORT eap_status_e CEapAmProtectedSetupSymbian::get_eap_type_list(
 	eap_array_c<eap_type_value_e> * const eap_type_list)
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -1366,13 +1375,13 @@
 
 //--------------------------------------------------
 
-EAP_FUNC_EXPORT eap_status_e eap_am_type_protected_setup_symbian_c::unload_module(const eap_type_value_e eap_type)
+EAP_FUNC_EXPORT eap_status_e CEapAmProtectedSetupSymbian::unload_module(const eap_type_value_e eap_type)
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 	EAP_TRACE_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
-		(EAPL("eap_am_type_protected_setup_symbian_c::unload_module(0x%08x)\n"),
+		(EAPL("CEapAmProtectedSetupSymbian::unload_module(0x%08x)\n"),
 		convert_eap_type_to_u32_t(eap_type)));
 
 	eap_status_e status = m_partner->unload_module(
@@ -1384,7 +1393,7 @@
 
 //--------------------------------------------------
 
-EAP_FUNC_EXPORT eap_status_e eap_am_type_protected_setup_symbian_c::complete_protected_setup_device_paramsL(
+EAP_FUNC_EXPORT eap_status_e CEapAmProtectedSetupSymbian::complete_protected_setup_device_paramsL(
 	const RMobilePhone::TMobilePhoneIdentityV1 &phone_identity,
 	const eap_status_e completion_status )
 {
@@ -1491,7 +1500,7 @@
 		// since there is nothing better for the purpose.
 		
 		EAP_TRACE_DEBUG_SYMBIAN(
-			(_L("eap_am_type_protected_setup_symbian_c::complete_protected_setup_device_paramsL: Uses model as device name.")));
+			(_L("CEapAmProtectedSetupSymbian::complete_protected_setup_device_paramsL: Uses model as device name.")));
 
 		status = m_network_and_device_parameters.copy_attribute_data(
 				simple_config_Attribute_Type_Device_Name,
@@ -1603,23 +1612,23 @@
 
 //--------------------------------------------------
 
-void eap_am_type_protected_setup_symbian_c::ConvertUnicodeToAsciiL(const TDesC16& aFromUnicode, TDes8& aToAscii)
+void CEapAmProtectedSetupSymbian::ConvertUnicodeToAsciiL(const TDesC16& aFromUnicode, TDes8& aToAscii)
 {
 		EAP_TRACE_DATA_DEBUG_SYMBIAN(
-			("eap_am_type_protected_setup_symbian_c::ConvertUnicodeToAsciiL:From TEXT",
+			("CEapAmProtectedSetupSymbian::ConvertUnicodeToAsciiL:From TEXT",
 			aFromUnicode.Ptr(), 
 			aFromUnicode.Size()));	
 		
 		if(aFromUnicode.Length() <= 0)
 		{
 			EAP_TRACE_DEBUG_SYMBIAN(
-			(_L("eap_am_type_protected_setup_symbian_c::ConvertUnicodeToAsciiL: Return: NOTHING TO CONVERT")));
+			(_L("CEapAmProtectedSetupSymbian::ConvertUnicodeToAsciiL: Return: NOTHING TO CONVERT")));
 			
 			return;
 		}	
 		
 		EAP_TRACE_DEBUG_SYMBIAN(
-			(_L("eap_am_type_protected_setup_symbian_c::ConvertUnicodeToAsciiL, aFromUnicode.Length=%d, aFromUnicode.Size=%d"),
+			(_L("CEapAmProtectedSetupSymbian::ConvertUnicodeToAsciiL, aFromUnicode.Length=%d, aFromUnicode.Size=%d"),
 			aFromUnicode.Length(), aFromUnicode.Size()));	
 		
 		// Convert from Unicode to ascii.
@@ -1627,7 +1636,7 @@
 		TPtr8 aFromUnicodePtr8 = aFromUnicodeBuf8->Des();
 		
 		EAP_TRACE_DEBUG_SYMBIAN(
-			(_L("eap_am_type_protected_setup_symbian_c::ConvertUnicodeToAsciiL, aFromUnicodePtr8.Length=%d, aFromUnicodePtr8.Size=%d, aFromUnicodePtr8.MaxLength=%d, aFromUnicodePtr8.MaxSize=%d"),
+			(_L("CEapAmProtectedSetupSymbian::ConvertUnicodeToAsciiL, aFromUnicodePtr8.Length=%d, aFromUnicodePtr8.Size=%d, aFromUnicodePtr8.MaxLength=%d, aFromUnicodePtr8.MaxSize=%d"),
 			aFromUnicodePtr8.Length(), aFromUnicodePtr8.Size(), aFromUnicodePtr8.MaxLength(), aFromUnicodePtr8.MaxSize()));				
 		
 		aFromUnicodePtr8.Copy(aFromUnicode); // Unicode -> ascii.
@@ -1637,7 +1646,7 @@
 		CleanupStack::PopAndDestroy(aFromUnicodeBuf8); // Delete aFromUnicodeBuf8.	
 
 		EAP_TRACE_DATA_DEBUG_SYMBIAN(
-			("eap_am_type_protected_setup_symbian_c::ConvertUnicodeToAsciiL:To ASCII",
+			("CEapAmProtectedSetupSymbian::ConvertUnicodeToAsciiL:To ASCII",
 			aToAscii.Ptr(), 
 			aToAscii.Size()));	
 }
--- a/eapol/eapol_framework/eapol_symbian/am/type/protected_setup/symbian/plugin/inc/EapProtectedSetup.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/protected_setup/symbian/plugin/inc/EapProtectedSetup.h	Mon May 24 20:32:47 2010 +0300
@@ -16,21 +16,21 @@
 */
 
 /*
-* %version: 4.1.2 %
+* %version: 11 %
 */
 
 #ifndef _EAPPROTECTEDSETUP_H_
 #define _EAPPROTECTEDSETUP_H_
 
 // INCLUDES
-#include <EapType.h>
+#include <EapTypePlugin.h>
 #include "eap_header.h"
 
 // CLASS DECLARATION
 /**
 * Class that implements the generic EAP type interface for EAP protected setup (EAP-WSC).
 */
-class CEapProtectedSetup : public CEapType
+class CEapProtectedSetup : public CEapTypePlugin
 {
 public:		
 
@@ -63,16 +63,13 @@
 											   const eap_am_network_id_c * const receive_network_id,
 											   abs_eap_configuration_if_c * const configuration_if);
 	
-	/**
-	* Invokes the configuration UI. This doesn't do anything.
-	**/
-	TInt InvokeUiL();
+
 	
 	/**
 	* Gets information about EAP type. 
 	* @return Pointer to a class that contains the EAP type information. Also pushed to cleanup stack.
 	*/
-	CEapTypeInfo* GetInfoLC();
+	CEapTypeInfo* GetInfoL();
 	
 	/**
 	* Deletes EAP type configuration
@@ -94,7 +91,7 @@
 	* EAP type. 
 	* @param aTunnelingType Type number for the tunneling type
 	*/	
-	void SetTunnelingType(const TInt aTunnelingType);
+	void SetTunnelingType(const TEapExpandedType aTunnelingType);
 
 	/**
 	* Changes the index of the saved parameters.
--- a/eapol/eapol_framework/eapol_symbian/am/type/protected_setup/symbian/plugin/inc/EapProtectedSetupGlobal.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/protected_setup/symbian/plugin/inc/EapProtectedSetupGlobal.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 4 %
+* %version: %
 */
 
 #ifndef _EAPPROTECTEDSETUPGLOBAL_H_
--- a/eapol/eapol_framework/eapol_symbian/am/type/protected_setup/symbian/plugin/src/2000b003.rss	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/protected_setup/symbian/plugin/src/2000b003.rss	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7 %
+* %version: 4.1.2 %
 */
 
 //  INCLUDES
--- a/eapol/eapol_framework/eapol_symbian/am/type/protected_setup/symbian/plugin/src/EapProtectedSetup.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/protected_setup/symbian/plugin/src/EapProtectedSetup.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11.1.2 %
+* %version: 19 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -40,9 +40,8 @@
 #include <EapTypeInfo.h>
 #include "eap_am_type_protected_setup_symbian.h"
 #include "EapProtectedSetupGlobal.h"
-#include "eap_am_trace_symbian.h"
-
-//#include "EapAkaDbUtils.h"
+#include "EapTraceSymbian.h"
+#include "EapConversion.h"
 
 #include "eap_am_tools_symbian.h"
 
@@ -96,7 +95,7 @@
 		(_L("CEapProtectedSetup::GetStackInterfaceL - Start")));
 
 	// Create AM
-	eap_am_type_protected_setup_symbian_c* amEapType = eap_am_type_protected_setup_symbian_c::NewL(
+	CEapAmProtectedSetupSymbian* amEapType = CEapAmProtectedSetupSymbian::NewL(
 		aTools, 
 		aPartner, 
 		iIndexType,
@@ -111,7 +110,7 @@
 	{
 	
 		EAP_TRACE_DEBUG_SYMBIAN(
-			(_L("ERROR: GetStackInterfaceL : eap_am_type_protected_setup_symbian_c(): failed.")));
+			(_L("ERROR: GetStackInterfaceL : CEapAmProtectedSetupSymbian(): failed.")));
 	
 		delete amEapType;
 		User::Leave(KErrNoMemory);
@@ -183,27 +182,18 @@
 }
 
 // ----------------------------------------------------------
-TInt CEapProtectedSetup::InvokeUiL()
-{
-	EAP_TRACE_DEBUG_SYMBIAN(
-		(_L("ERROR: CEapProtectedSetup::InvokeUiL - THIS IS NOT SUPPORTED")));
 
-	TInt buttonId(0);
- 
-	// This is a dummy function.
-	
-	return buttonId;
-}
+
 
 // ----------------------------------------------------------
-CEapTypeInfo* CEapProtectedSetup::GetInfoLC()
+
+CEapTypeInfo* CEapProtectedSetup::GetInfoL()
 {
 	CEapTypeInfo* info = new(ELeave) CEapTypeInfo(
 		(TDesC&)KReleaseDate, 
 		(TDesC&)KEapTypeVersion,
 		(TDesC&)KManufacturer);
 
-	CleanupStack::PushL(info);
 	return info;
 }
 
@@ -223,14 +213,20 @@
 
 // ----------------------------------------------------------
 
-void CEapProtectedSetup::SetTunnelingType(const TInt aTunnelingType)
+void CEapProtectedSetup::SetTunnelingType(const TEapExpandedType aTunnelingType)
 {
-	EAP_TRACE_DEBUG_SYMBIAN(
-		(_L("CEapProtectedSetup::SetTunnelingType - tunneling type=%d"),
-		aTunnelingType));
+	EAP_TRACE_DATA_DEBUG_SYMBIAN(
+		(EAPL("CEapProtectedSetup::SetTunnelingType - tunneling type"),
+		aTunnelingType.GetValue().Ptr(), aTunnelingType.GetValue().Length()));
+
+	eap_type_value_e aInternalType;
 
-	// Vendor id is eap_type_vendor_id_ietf always in this plugin.
-	iTunnelingType.set_eap_type_values(eap_type_vendor_id_ietf, aTunnelingType);
+	    TInt err = CEapConversion::ConvertExpandedEAPTypeToInternalType(
+	            &aTunnelingType,
+	            &aInternalType);
+
+	    iTunnelingType = aInternalType;
+
 }
 
 
--- a/eapol/eapol_framework/eapol_symbian/am/type/protected_setup/symbian/plugin/src/EapProtectedSetupProxy.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/protected_setup/symbian/plugin/src/EapProtectedSetupProxy.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 6 %
+* %version: 3.1.2 %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/eap_am_type_securid_symbian.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/eap_am_type_securid_symbian.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 32 %
+* %version: 29.1.14 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -39,14 +39,17 @@
 #include "eap_am_type_securid_symbian.h"
 #include "EapSecurIDDbParameterNames.h"
 #include "EapSecurIDDbUtils.h"
-#include "EapSecurIDNotifierStructs.h"
+
+#include "eap_auth_notifier.h"
+
+
 #include "EapGtcDbParameterNames.h"
 #include "EapGtcDbUtils.h"
 #include "EapSecurIDNotifierUids.h"
 #include "eap_configuration_field.h"
 #include "eap_state_notification.h"
 
-#include "eap_am_trace_symbian.h"
+#include "EapTraceSymbian.h"
 
 const TUint KMaxSqlQueryLength = 256;
 const TUint KMaxDBFieldNameLength = 255;
@@ -75,6 +78,9 @@
 	delete m_dialog_data_pckg_ptr;
 	delete m_message_buf;
 
+	delete iEapAuthNotifier;
+	iEapAuthNotifier = 0;
+
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 }
 
@@ -90,50 +96,7 @@
 		(EAPL("eap_am_type_securid_symbian_c::shutdown(): this = 0x%08x\n"),
 		this));
 
-	if( IsActive() )
-	{
-		Cancel(); // Cancel only if active.
-	}  
-	else
-	{
-		if( m_is_notifier_connected )
-		{
-	EAP_TRACE_DEBUG_SYMBIAN((_L(" eap_am_type_securid_symbian_c::shutdown - calling m_notifier.CancelNotifier(..)\n")));
-	
-			TInt error = m_notifier.CancelNotifier(KEapSecurIDIdentityQueryUid);
-			
-	EAP_TRACE_DEBUG_SYMBIAN((_L(" eap_am_type_securid_symbian_c::shutdown - CancelNotifier(KEapSecurIDIdentityQueryUid) error=%d\n"), error));
 
-
-			error = m_notifier.CancelNotifier(KEapSecurIDPasscodeQueryUid);
-			
-	EAP_TRACE_DEBUG_SYMBIAN((_L(" eap_am_type_securid_symbian_c::shutdown - CancelNotifier(KEapSecurIDPasscodeQueryUid) error=%d\n"), error));
-
-
-			error = m_notifier.CancelNotifier(KEapSecurIDPincodeQueryUid);
-			
-	EAP_TRACE_DEBUG_SYMBIAN((_L(" eap_am_type_securid_symbian_c::shutdown - CancelNotifier(KEapSecurIDPincodeQueryUid) error=%d\n"), error));
-
-
-			error = m_notifier.CancelNotifier(KEapGtcIdentityQueryUid);
-			
-	EAP_TRACE_DEBUG_SYMBIAN((_L(" eap_am_type_securid_symbian_c::shutdown - CancelNotifier(KEapGtcIdentityQueryUid) error=%d\n"), error));
-
-
-			error = m_notifier.CancelNotifier(KEapGtcUserInputQueryUid);
-			
-	EAP_TRACE_DEBUG_SYMBIAN((_L(" eap_am_type_securid_symbian_c::shutdown - CancelNotifier(KEapGtcUserInputQueryUid) error=%d\n"), error));
-
-
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L(" eap_am_type_securid_symbian_c::shutdown - calling m_notifier.Close(), prev error=%d\n"), error));
-
-			m_notifier.Close(); // Call close only if it is connected.	
-			
-			m_is_notifier_connected = false;
-		}
-	}
-	
 	m_shutdown_was_called = true;
 
 	EAP_TRACE_DEBUG(
@@ -171,22 +134,12 @@
 		, m_shutdown_was_called(false)
 		, m_eap_type(aEapType)
 		, m_is_notifier_connected(false)
-		, m_max_session_time(0)	
+		, m_max_session_time(0)
+		, iEapAuthNotifier(0)	
+
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	m_tunneling_vendor_type = m_tunneling_type.get_vendor_type();
-	m_eap_vendor_type = m_eap_type.get_vendor_type();
-
-#else
-
-	m_tunneling_vendor_type = static_cast<TUint>(m_tunneling_type);
-	m_eap_vendor_type = static_cast<TUint>(m_eap_type);	
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
 	if (receive_network_id != 0
 		&& receive_network_id->get_is_valid_data() == true)
 	{
@@ -255,8 +208,8 @@
 		EapSecurIDDbUtils::OpenDatabaseL(m_database, m_session, m_index_type, m_index, m_tunneling_type);
 	}
 
-	m_dialog_data_ptr = new(ELeave) TEapSecurIDStruct;
-	m_dialog_data_pckg_ptr = new(ELeave) TPckg<TEapSecurIDStruct> (*m_dialog_data_ptr);
+	m_dialog_data_ptr = new(ELeave) CEapAuthNotifier::TEapDialogInfo;
+	m_dialog_data_pckg_ptr = new(ELeave) TPckg<CEapAuthNotifier::TEapDialogInfo> (*m_dialog_data_ptr);
 
 	CActiveScheduler::Add(this);
 }
@@ -322,199 +275,6 @@
 		 EAPL("m_state, iStatus.Int()=%d\n"),
 		 m_state, iStatus.Int()));
 
-	if (iStatus.Int() == KErrCancel)
-	{
-		delete m_message_buf;
-		m_message_buf = NULL;
-		get_am_partner()->finish_unsuccessful_authentication(true);
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-		return;
-	}
-	
-	if (iStatus.Int() != KErrNone)
-	{
-		delete m_message_buf;
-		m_message_buf = NULL;
-		// Something is very wrong...
-
-		EAP_TRACE_ERROR(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("ERROR: EAP - SecurID notifier or dialog\n")));
-
-		send_error_notification(eap_status_authentication_failure);
-
-		get_am_partner()->finish_unsuccessful_authentication(false);
-
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-		return;
-	}
-
-	switch (m_state)
-	{
-	case EHandlingIdentityQuery:
-		{
-			EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("eap_am_type_securid_symbian_c::RunL(): EHandlingIdentityQuery\n")));
-
-			eap_variable_data_c identity(m_am_tools);
-
-			eap_status_e status = identity.set_copy_of_buffer(
-				m_dialog_data_ptr->iIdentity.Ptr(),
-				m_dialog_data_ptr->iIdentity.Size());
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-				(void)EAP_STATUS_RETURN(m_am_tools, status);
-				return;
-			}
-
-			eap_variable_data_c identity_utf8(m_am_tools);
-			status = m_am_tools->convert_unicode_to_utf8(identity_utf8, identity);
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-				(void)EAP_STATUS_RETURN(m_am_tools, status);
-				return;
-			}
-
-			status = get_am_partner()->complete_eap_identity_query(&identity_utf8);
-		}
-		break;
-
-	case EHandlingPasscodeQuery:
-		{
-			EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("eap_am_type_securid_symbian_c::RunL(): EHandlingPasscodeQuery\n")));
-
-			eap_variable_data_c passcode(m_am_tools);
-
-			eap_status_e status = passcode.set_copy_of_buffer(
-				m_dialog_data_ptr->iPasscode.Ptr(),
-				m_dialog_data_ptr->iPasscode.Size());
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-				(void)EAP_STATUS_RETURN(m_am_tools, status);
-				return;
-			}
-
-			eap_variable_data_c passcode_utf8(m_am_tools);
-			status = m_am_tools->convert_unicode_to_utf8(passcode_utf8, passcode);
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-				(void)EAP_STATUS_RETURN(m_am_tools, status);
-				return;
-			}
-
-			status = get_am_partner()->client_securid_complete_passcode_query(&passcode_utf8);
-		}
-		break;
-
-	case EHandlingPincodeQuery:
-		{
-			EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("eap_am_type_securid_symbian_c::RunL(): EHandlingPincodeQuery\n")));
-
-			eap_variable_data_c pincode(m_am_tools);
-
-			eap_status_e status = pincode.set_copy_of_buffer(
-				m_dialog_data_ptr->iPincode.Ptr(),
-				m_dialog_data_ptr->iPincode.Size());
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-				(void)EAP_STATUS_RETURN(m_am_tools, status);
-				return;
-			}
-
-			eap_variable_data_c passcode(m_am_tools);
-
-			status = passcode.set_copy_of_buffer(
-				m_dialog_data_ptr->iPasscode.Ptr(),
-				m_dialog_data_ptr->iPasscode.Size());
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-				(void)EAP_STATUS_RETURN(m_am_tools, status);
-				return;
-			}
-
-
-			eap_variable_data_c pincode_utf8(m_am_tools);
-			status = m_am_tools->convert_unicode_to_utf8(pincode_utf8, pincode);
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-				(void)EAP_STATUS_RETURN(m_am_tools, status);
-				return;
-			}
-
-			eap_variable_data_c passcode_utf8(m_am_tools);
-			status = m_am_tools->convert_unicode_to_utf8(passcode_utf8, passcode);
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-				(void)EAP_STATUS_RETURN(m_am_tools, status);
-				return;
-			}
-
-			status = get_am_partner()->client_securid_complete_pincode_query(&passcode_utf8, &passcode_utf8);
-		}
-		break;
-
-	case EHandlingGTCQuery:
-		{
-			EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("eap_am_type_securid_symbian_c::RunL(): EHandlingGTCQuery\n")));
-
-			delete m_message_buf;
-			m_message_buf = NULL;
-
-			eap_variable_data_c passcode(m_am_tools);
-
-			eap_status_e status = passcode.set_copy_of_buffer(
-				m_dialog_data_ptr->iPasscode.Ptr(),
-				m_dialog_data_ptr->iPasscode.Size());
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-				(void)EAP_STATUS_RETURN(m_am_tools, status);
-				return;
-			}
-
-			eap_variable_data_c passcode_utf8(m_am_tools);
-			status = m_am_tools->convert_unicode_to_utf8(passcode_utf8, passcode);
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-				(void)EAP_STATUS_RETURN(m_am_tools, status);
-				return;
-			}
-			
-			// User must have entered some password and pressed OK.
-			// Treat this as a full authentication and update the Last Auth Time.
-			status = store_authentication_time();
-			if (status != eap_status_ok)
-			{
-				// Storing failed. Don't care.
-				EAP_TRACE_ERROR(m_am_tools, 
-					TRACE_FLAGS_DEFAULT, (
-					EAPL("eap_am_type_securid_symbian_c:Storing Last Full Authentication time failed, status=%d, but continuing\n"), 
-					status));
-
-				status = eap_status_ok;
-			}			
-
-			status = get_am_partner()->client_gtc_complete_user_input_query(&passcode_utf8);
-		}
-		break;
-
-	default:
-		EAP_TRACE_ERROR(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("ERROR: EAP - SecurID illegal state in RunL.\n")));
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
-		return;		
-	}
 
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
 }
@@ -523,34 +283,8 @@
 
 void eap_am_type_securid_symbian_c::DoCancel()
 {
-	if( m_is_notifier_connected )
-	{
-	EAP_TRACE_DEBUG_SYMBIAN((_L(" eap_am_type_securid_symbian_c::DoCancel - calling m_notifier.CancelNotifier(..)\n")));
-		
-		TInt error = m_notifier.CancelNotifier(KEapSecurIDIdentityQueryUid);
-		
-	EAP_TRACE_DEBUG_SYMBIAN((_L(" eap_am_type_securid_symbian_c::DoCancel - CancelNotifier(KEapSecurIDIdentityQueryUid) error=%d\n"), error));
-
-		error = m_notifier.CancelNotifier(KEapSecurIDPasscodeQueryUid);
-		
-	EAP_TRACE_DEBUG_SYMBIAN((_L(" eap_am_type_securid_symbian_c::DoCancel - CancelNotifier(KEapSecurIDPasscodeQueryUid) error=%d\n"), error));
+	iEapAuthNotifier->Cancel();
 
-		error = m_notifier.CancelNotifier(KEapSecurIDPincodeQueryUid);
-		
-	EAP_TRACE_DEBUG_SYMBIAN((_L(" eap_am_type_securid_symbian_c::DoCancel - CancelNotifier(KEapSecurIDPincodeQueryUid) error=%d\n"), error));
-
-		error = m_notifier.CancelNotifier(KEapGtcIdentityQueryUid);
-		
-	EAP_TRACE_DEBUG_SYMBIAN((_L(" eap_am_type_securid_symbian_c::DoCancel - CancelNotifier(KEapGtcIdentityQueryUid) error=%d\n"), error));
-
-		error = m_notifier.CancelNotifier(KEapGtcUserInputQueryUid);
-		
-	EAP_TRACE_DEBUG_SYMBIAN((_L(" eap_am_type_securid_symbian_c::DoCancel - CancelNotifier(KEapGtcUserInputQueryUid) error=%d\n"), error));
-
-		m_notifier.Close(); // Call close only if it is connected.	
-		
-		m_is_notifier_connected = false;
-	}
 }
 
 //--------------------------------------------------
@@ -609,17 +343,38 @@
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
-	_LIT(KSQLQueryRow, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
+	_LIT(KSQLQueryRow, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
 	if (m_eap_type == eap_type_securid)
 	{
-		sqlStatement.Format(KSQLQueryRow, &unicodeString, &KSecurIDTableName, 
-			&KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+		sqlStatement.Format(
+			KSQLQueryRow,
+			&unicodeString,
+			&KSecurIDTableName, 
+			&KServiceType,
+			m_index_type,
+			&KServiceIndex,
+			m_index,
+			&KTunnelingTypeVendorId,
+			m_tunneling_type.get_vendor_id(),
+			&KTunnelingType, 
+			m_tunneling_type.get_vendor_type());
 	}
 	else
 	{
-		sqlStatement.Format(KSQLQueryRow, &unicodeString, &KGtcTableName, 
-			&KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
-	}	
+		sqlStatement.Format(
+			KSQLQueryRow,
+			&unicodeString,
+			&KGtcTableName, 
+			&KServiceType,
+			m_index_type,
+			&KServiceIndex,
+			m_index,
+			&KTunnelingTypeVendorId,
+			m_tunneling_type.get_vendor_id(),
+			&KTunnelingType, 
+			m_tunneling_type.get_vendor_type());
+	}
+
 	RDbView view;
 	User::LeaveIfError(view.Prepare(m_database, TDbQuery(sqlStatement), TDbWindow::EUnlimited));
 	CleanupClosePushL(view);
@@ -791,10 +546,8 @@
 	eap_variable_data_c * const /*passcode*/,
 	bool is_first_query)
 {
-	if (!IsActive())
-	{
 		m_state = EHandlingPasscodeQuery;
-		
+	//     m_input_output_data_ptr = new(ELeave) TEapLeapUsernamePasswordInfo;
 		if (is_first_query == true)
 		{
 			m_dialog_data_ptr->iIsFirstQuery = ETrue;
@@ -804,36 +557,23 @@
 			m_dialog_data_ptr->iIsFirstQuery = EFalse;
 		}
 
-		if( !m_is_notifier_connected )
-		{
-			TInt error = m_notifier.Connect();
-			
-			EAP_TRACE_DEBUG_SYMBIAN((_L(" eap_am_type_securid_symbian_c::show_passcode_query_dialog - m_notifier.Connect() returned error=%d\n"), error));
-			
-			if( error != KErrNone)
+    TEapExpandedType aEapType(*EapExpandedTypeGtc.GetType());
+    
+    if (iEapAuthNotifier == 0)
+    	{
+    	TRAPD(err, iEapAuthNotifier = CEapAuthNotifier::NewL( *this ));
+  		if (err)
+  			{
+  				return eap_status_authentication_failure;
+  			}
+    	}
+    TRAPD(err, iEapAuthNotifier->StartL(CEapAuthNotifier::EEapNotifierTypeGTCSecurIDPasscodeQueryUidDialog, m_dialog_data_ptr, aEapType));
+		if (err)
 			{
-				// Can not connect to notifier.
-				return EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(error));		
+				return eap_status_authentication_failure;
 			}
-			
-			m_is_notifier_connected = true; // Got connectted to notifier.
-		}
 
-		EAP_TRACE_DEBUG_SYMBIAN((_L(" eap_am_type_securid_symbian_c::show_passcode_query_dialog - StartNotifierAndGetResponse - KEapSecurIDPasscodeQueryUid \n")));
 
-		m_notifier.StartNotifierAndGetResponse(
-			iStatus, 
-			KEapSecurIDPasscodeQueryUid, 
-			*m_dialog_data_pckg_ptr, 
-			*m_dialog_data_pckg_ptr);
-
-		SetActive();
-	} 
-	else
-	{
-		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("eap_am_type_securid_symbian_c: Already active when tried to show passcode query dialog.\n")));
-		return eap_status_process_general_error;
-	}
 
 	return eap_status_pending_request;
 }
@@ -853,10 +593,8 @@
 		message,
 		message_length));
 
-	if (!IsActive())
-	{
 		m_state = EHandlingGTCQuery;
-
+		
 		eap_variable_data_c message_utf8(m_am_tools);
 		eap_status_e status = message_utf8.set_buffer(message, message_length, false, false);
 		if (status != eap_status_ok)
@@ -871,13 +609,16 @@
 			return EAP_STATUS_RETURN(m_am_tools, status);
 		}
 
-		TRAPD(err, m_message_buf = HBufC8::NewL(message_unicode.get_data_length()));
+/*		TRAPD(err, m_message_buf = HBufC8::NewL(message_unicode.get_data_length()));
 		if (err != KErrNone)
 		{
 			return eap_status_allocation_error;
 		}
 		TPtr8 messageBufPtr = m_message_buf->Des();
-		messageBufPtr.Copy(message_unicode.get_data(), message_unicode.get_data_length());
+		
+		*/
+		
+		m_dialog_data_ptr->iUidata.Copy((TText *)message_unicode.get_data(), message_unicode.get_data_length());
 
 		if (is_first_query == true)
 		{
@@ -888,43 +629,24 @@
 			m_dialog_data_ptr->iIsFirstQuery = EFalse;
 		}
 		
-		EAP_TRACE_DEBUG_SYMBIAN((_L(" eap_am_type_securid_symbian_c::show_gtc_query_dialog - before m_notifier.Connect(), m_is_notifier_connected=%d\n"), m_is_notifier_connected));
-
-		if( !m_is_notifier_connected )
-		{
-			TInt error = m_notifier.Connect();
-			
-			EAP_TRACE_DEBUG_SYMBIAN((_L(" eap_am_type_securid_symbian_c::show_gtc_query_dialog - m_notifier.Connect() returned error=%d\n"), error));
-			
-			if( error != KErrNone)
+	//     m_input_output_data_ptr = new(ELeave) TEapLeapUsernamePasswordInfo;
+    TEapExpandedType aEapType(*EapExpandedTypeGtc.GetType());
+    
+    if (iEapAuthNotifier == 0)
+    	{
+    	TRAPD(err, iEapAuthNotifier = CEapAuthNotifier::NewL( *this ));
+  		if (err)
+  			{
+  				return eap_status_authentication_failure;
+  			}
+    	}
+    TRAPD(err1, iEapAuthNotifier->StartL(CEapAuthNotifier::EEapNotifierTypeGTCQueryDialog, m_dialog_data_ptr, aEapType));
+		if (err1)
 			{
-				// Can not connect to notifier.
-				return EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(error));		
+				return eap_status_authentication_failure;
 			}
-			
-			m_is_notifier_connected = true; // Got connectted to notifier.
-		}
+	
 
-		EAP_TRACE_DATA_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("eap_am_type_securid_symbian_c::show_gtc_query_dialog: m_message_buf"),
-			m_message_buf->Ptr(),
-			m_message_buf->Size()));
-
-		m_notifier.StartNotifierAndGetResponse(
-			iStatus, 
-			KEapGtcUserInputQueryUid, 
-			*m_message_buf, 
-			*m_dialog_data_pckg_ptr);
-
-		SetActive();
-	} 
-	else
-	{
-		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("eap_am_type_securid_symbian_c: Already active when tried to show GTC query dialog.\n")));
-		return eap_status_process_general_error;
-	}
 
 	return eap_status_pending_request;
 }
@@ -938,8 +660,10 @@
 {
 	EAP_TRACE_DEBUG_SYMBIAN((_L(" eap_am_type_securid_symbian_c::_pincode_query_dialog - start - is_first_query=%d\n"), is_first_query));
 	
-	if (!IsActive())
-	{
+		m_state = EHandlingPincodeQuery;
+	//     m_input_output_data_ptr = new(ELeave) TEapLeapUsernamePasswordInfo;
+    TEapExpandedType aEapType(*EapExpandedTypeGtc.GetType());
+    
 		m_state = EHandlingPincodeQuery;
 
 		if (is_first_query == true)
@@ -951,38 +675,221 @@
 			m_dialog_data_ptr->iIsFirstQuery = EFalse;
 		}
 
-		if( !m_is_notifier_connected )
+    if (iEapAuthNotifier == 0)
+    	{
+    	TRAPD(err, iEapAuthNotifier = CEapAuthNotifier::NewL( *this ));
+  		if (err)
+  			{
+  				return eap_status_authentication_failure;
+  			}
+    	}
+    TRAPD(err1, iEapAuthNotifier->StartL(CEapAuthNotifier::EEapNotifierTypeGTCSecurIDPasscodeQueryUidDialog, m_dialog_data_ptr, aEapType));
+  		if (err1)
+  			{
+  				return eap_status_authentication_failure;
+  			}
+	
+
+
+	return eap_status_pending_request;
+}
+
+//--------------------------------------------------
+EAP_FUNC_EXPORT void eap_am_type_securid_symbian_c::DlgComplete( TInt aStatus )  
+{
+		if (aStatus == KErrCancel)
+	{
+		delete m_message_buf;
+		m_message_buf = NULL;
+		get_am_partner()->finish_unsuccessful_authentication(true);
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
+		return;
+	}
+	
+	if (aStatus != KErrNone)
+	{
+		delete m_message_buf;
+		m_message_buf = NULL;
+		// Something is very wrong...
+
+		EAP_TRACE_ERROR(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("ERROR: EAP - SecurID notifier or dialog\n")));
+
+		send_error_notification(eap_status_authentication_failure);
+
+		get_am_partner()->finish_unsuccessful_authentication(false);
+
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
+		return;
+	}
+
+	switch (m_state)
+	{
+	case EHandlingIdentityQuery:
+		{
+			EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("eap_am_type_securid_symbian_c::RunL(): EHandlingIdentityQuery\n")));
+
+			eap_variable_data_c identity(m_am_tools);
+
+			eap_status_e status = identity.set_copy_of_buffer(
+				m_dialog_data_ptr->iUsername.Ptr(),
+				m_dialog_data_ptr->iUsername.Size());
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
+				(void)EAP_STATUS_RETURN(m_am_tools, status);
+				return;
+			}
+
+			eap_variable_data_c identity_utf8(m_am_tools);
+			status = m_am_tools->convert_unicode_to_utf8(identity_utf8, identity);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
+				(void)EAP_STATUS_RETURN(m_am_tools, status);
+				return;
+			}
+
+			status = get_am_partner()->complete_eap_identity_query(&identity_utf8);
+		}
+		break;
+
+	case EHandlingPasscodeQuery:
 		{
-			TInt error = m_notifier.Connect();
-			
-			EAP_TRACE_DEBUG_SYMBIAN((_L(" eap_am_type_securid_symbian_c::show_pincode_query_dialog - m_notifier.Connect() returned error=%d\n"), error));
-			
-			if( error != KErrNone)
+			EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("eap_am_type_securid_symbian_c::RunL(): EHandlingPasscodeQuery\n")));
+
+			eap_variable_data_c passcode(m_am_tools);
+
+			eap_status_e status = passcode.set_copy_of_buffer(
+				m_dialog_data_ptr->iPassword.Ptr(),
+				m_dialog_data_ptr->iPassword.Size());
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
+				(void)EAP_STATUS_RETURN(m_am_tools, status);
+				return;
+			}
+
+			eap_variable_data_c passcode_utf8(m_am_tools);
+			status = m_am_tools->convert_unicode_to_utf8(passcode_utf8, passcode);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
+				(void)EAP_STATUS_RETURN(m_am_tools, status);
+				return;
+			}
+
+			status = get_am_partner()->client_securid_complete_passcode_query(&passcode_utf8);
+		}
+		break;
+
+	case EHandlingPincodeQuery:
+		{
+			EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("eap_am_type_securid_symbian_c::RunL(): EHandlingPincodeQuery\n")));
+
+			eap_variable_data_c pincode(m_am_tools);
+
+			eap_status_e status = pincode.set_copy_of_buffer(
+				m_dialog_data_ptr->iUsername.Ptr(),
+				m_dialog_data_ptr->iUsername.Size());
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
+				(void)EAP_STATUS_RETURN(m_am_tools, status);
+				return;
+			}
+
+			eap_variable_data_c passcode(m_am_tools);
+
+			status = passcode.set_copy_of_buffer(
+				m_dialog_data_ptr->iPassword.Ptr(),
+				m_dialog_data_ptr->iPassword.Size());
+			if (status != eap_status_ok)
 			{
-				// Can not connect to notifier.
-				return EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(error));		
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
+				(void)EAP_STATUS_RETURN(m_am_tools, status);
+				return;
+			}
+
+
+			eap_variable_data_c pincode_utf8(m_am_tools);
+			status = m_am_tools->convert_unicode_to_utf8(pincode_utf8, pincode);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
+				(void)EAP_STATUS_RETURN(m_am_tools, status);
+				return;
+			}
+
+			eap_variable_data_c passcode_utf8(m_am_tools);
+			status = m_am_tools->convert_unicode_to_utf8(passcode_utf8, passcode);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
+				(void)EAP_STATUS_RETURN(m_am_tools, status);
+				return;
+			}
+
+			status = get_am_partner()->client_securid_complete_pincode_query(&passcode_utf8, &passcode_utf8);
+		}
+		break;
+
+	case EHandlingGTCQuery:
+		{
+			EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("eap_am_type_securid_symbian_c::RunL(): EHandlingGTCQuery\n")));
+
+			delete m_message_buf;
+			m_message_buf = NULL;
+
+			eap_variable_data_c passcode(m_am_tools);
+
+			eap_status_e status = passcode.set_copy_of_buffer(
+				m_dialog_data_ptr->iPassword.Ptr(),
+				m_dialog_data_ptr->iPassword.Size());
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
+				(void)EAP_STATUS_RETURN(m_am_tools, status);
+				return;
+			}
+
+			eap_variable_data_c passcode_utf8(m_am_tools);
+			status = m_am_tools->convert_unicode_to_utf8(passcode_utf8, passcode);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
+				(void)EAP_STATUS_RETURN(m_am_tools, status);
+				return;
 			}
 			
-			m_is_notifier_connected = true; // Got connectted to notifier.
-		}
-
-		EAP_TRACE_DEBUG_SYMBIAN((_L(" eap_am_type_securid_symbian_c::show_pincode_query_dialog - StartNotifierAndGetResponse - KEapSecurIDPincodeQueryUid \n")));
+			// User must have entered some password and pressed OK.
+			// Treat this as a full authentication and update the Last Auth Time.
+			status = store_authentication_time();
+			if (status != eap_status_ok)
+			{
+				// Storing failed. Don't care.
+				EAP_TRACE_ERROR(m_am_tools, 
+					TRACE_FLAGS_DEFAULT, (
+					EAPL("eap_am_type_securid_symbian_c:Storing Last Full Authentication time failed, status=%d, but continuing\n"), 
+					status));
 
-		m_notifier.StartNotifierAndGetResponse(
-			iStatus, 
-			KEapSecurIDPincodeQueryUid, 
-			*m_dialog_data_pckg_ptr, 
-			*m_dialog_data_pckg_ptr);
+				status = eap_status_ok;
+			}			
+
+			status = get_am_partner()->client_gtc_complete_user_input_query(&passcode_utf8);
+		}
+		break;
 
-		SetActive();
-	} 
-	else
-	{
-		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("eap_am_type_securid_symbian_c: Already active when tried to show identity query dialog.\n")));
-		return eap_status_process_general_error;
+	default:
+		EAP_TRACE_ERROR(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("ERROR: EAP - SecurID illegal state in RunL.\n")));
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
+		return;		
 	}
-
-	return eap_status_pending_request;
 }
 
 //--------------------------------------------------
@@ -1055,13 +962,29 @@
 		return EAP_STATUS_RETURN(m_am_tools, status);
 	}
 
-	status = memory_store_key->add_data(
-		&m_tunneling_vendor_type,
-		sizeof(m_tunneling_vendor_type));
-	if (status != eap_status_ok)
 	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
+		u32_t vendor_id = m_tunneling_type.get_vendor_id();
+
+		status = memory_store_key->add_data(
+			&vendor_id,
+			sizeof(vendor_id));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	}
+
+	{
+		u32_t vendor_type = m_tunneling_type.get_vendor_type();
+		status = memory_store_key->add_data(
+			&vendor_type,
+			sizeof(vendor_type));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, status);
+		}
 	}
 
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -1080,8 +1003,8 @@
 	if (err != KErrNone) 
 	{
 		EAP_TRACE_ERROR(m_am_tools, 
-			TRACE_FLAGS_DEFAULT, (
-			EAPL("eap_am_type_securid_symbian_c::is_session_valid - LEAVE - error=%d, Assuming session is invalid \n"),
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_am_type_securid_symbian_c::is_session_valid(): LEAVE - error=%d, Assuming session is invalid \n"),
 			err));
 			
 		sessionValidity = false;
@@ -1098,23 +1021,34 @@
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
-	EAP_TRACE_DEBUG(m_am_tools, 
-		TRACE_FLAGS_DEFAULT, (
-		EAPL("eap_am_type_securid_symbian_c::is_session_valid: EAP vendor type=%d\n"),
-		m_eap_vendor_type));
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_type_securid_symbian_c::is_session_valid(): EAP-tunneling type=0xfe%06x%08x\n"),
+		m_tunneling_type.get_vendor_id(),
+		m_tunneling_type.get_vendor_type()));
 
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 	
 	// Query all the relevant parameters
-	_LIT(KSQLQuery, "SELECT %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
+	_LIT(KSQLQuery, "SELECT %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
 	
 	if (m_eap_type == eap_type_generic_token_card)
 	{
-		sqlStatement.Format(KSQLQuery, &cf_str_EAP_GTC_max_session_validity_time_literal,
-							&KGTCLastFullAuthTime, &KGtcTableName,
-							&KServiceType, m_index_type, 
-							&KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+		sqlStatement.Format(
+			KSQLQuery,
+			&cf_str_EAP_GTC_max_session_validity_time_literal,
+			&KGTCLastFullAuthTime,
+			&KGtcTableName,
+			&KServiceType,
+			m_index_type, 
+			&KServiceIndex,
+			m_index,
+			&KTunnelingTypeVendorId,
+			m_tunneling_type.get_vendor_id(),
+			&KTunnelingType, 
+			m_tunneling_type.get_vendor_type());
 	}
 	else
 	{
@@ -1258,20 +1192,30 @@
 	
 	EAP_TRACE_DEBUG(m_am_tools, 
 		TRACE_FLAGS_DEFAULT, (
-		EAPL("eap_am_type_securid_symbian_c::store_authentication_timeL: EAP Vendor Type=%d\n"),
-		m_eap_vendor_type));	
+		EAPL("eap_am_type_securid_symbian_c::store_authentication_timeL: EAP-tunneling type=0xfe%06x%08x\n"),
+		m_tunneling_type.get_vendor_id(),
+		m_tunneling_type.get_vendor_type()));	
 
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 	
 	// Query all the relevant parameters
-	_LIT(KSQLQuery, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
+	_LIT(KSQLQuery, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
 	
 	if (m_eap_type == eap_type_generic_token_card)
 	{
-		sqlStatement.Format(KSQLQuery, &KGTCLastFullAuthTime, &KGtcTableName,
-							&KServiceType, m_index_type, 
-							&KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+		sqlStatement.Format(
+			KSQLQuery,
+			&KGTCLastFullAuthTime,
+			&KGtcTableName,
+			&KServiceType,
+			m_index_type, 
+			&KServiceIndex,
+			m_index,
+			&KTunnelingTypeVendorId,
+			m_tunneling_type.get_vendor_id(),
+			&KTunnelingType, 
+			m_tunneling_type.get_vendor_type());
 	}
 	else
 	{
--- a/eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/inc/EapGtcDbDefaults.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/inc/EapGtcDbDefaults.h	Mon May 24 20:32:47 2010 +0300
@@ -16,20 +16,15 @@
 */
 
 /*
-* %version: 8.1.2 %
+* %version: %
 */
 
 #ifndef EAPGTCDBDEFAULTS_H
 #define EAPGTCDBDEFAULTS_H
 
+#include "EapPluginDbDefaults.h"
 // LOCAL CONSTANTS
 
-_LIT(default_EAP_GTC_identity, "");
-
-const TInt64 default_MaxSessionTime = 0; // 0 means read from configuration file.
-const TInt64 default_FullAuthTime = 0;
-
-const TUint KMaxIdentityLengthInDB = 255;
 
 #endif // EAPGTCDBDEFAULTS_H
 
--- a/eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/inc/EapGtcDbParameterNames.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/inc/EapGtcDbParameterNames.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11 %
+* %version: %
 */
 
 #ifndef EAPGTCDBPARAMETERNAMES_H
--- a/eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/inc/EapGtcDbUtils.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/inc/EapGtcDbUtils.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: 8.1.5 %
 */
 
 #ifndef EAPGTCDBUTILS_H
@@ -29,21 +29,10 @@
 
 // LOCAL CONSTANTS
 
-#ifdef SYMBIAN_SECURE_DBMS
-// For EAP GTC secure database.
-// Full path is not needed. The database eapgtc.dat will be saved in the 
-// data cage path for DBMS. So it will be in "\private\100012a5\eapgtc.dat" in C: drive.
-// The maximum length of database name is 0x40 (KDbMaxName) , which is defined in d32dbms.h.
-
-_LIT(KGtcDatabaseName, "c:eapgtc.dat");
+// For EAP-GTC private database. Database will be in the private folder of EAP-server (20026FCB).
+// The maximum length of database name is 0x40 (KDbMaxName), which is defined in d32dbms.h.
 
-_LIT(KGtcSecureUIDFormat, "SECURE[102072e9]"); // For the security policy.
-
-#else
-
-_LIT(KGtcDatabaseName, "c:\\system\\data\\eapgtc.dat");
-
-#endif // #ifdef SYMBIAN_SECURE_DBMS
+_LIT(KEapGtcDatabaseName, "eapgtc.dat");
 
 _LIT(KGtcTableName, "eapgtc");
 
@@ -60,8 +49,8 @@
 	* @param aIndex Index
 	*/
 	static void OpenDatabaseL(
-		RDbNamedDatabase& aDatabase, 
-		RDbs& aSession, 
+		RDbNamedDatabase& aDatabase,
+		RFs& aFileServerSession,
 		const TIndexType aIndexType,
 		const TInt aIndex,
 		const eap_type_value_e aTunnelingType);
@@ -105,7 +94,6 @@
 		const TIndexType aIndexType,
 		const TInt aIndex,
 		const eap_type_value_e aTunnelingType);
-
 };
 
 #endif // EAPGTCBUTILS_H
--- a/eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/inc/EapSecurID.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/inc/EapSecurID.h	Mon May 24 20:32:47 2010 +0300
@@ -16,14 +16,14 @@
 */
 
 /*
-* %version: 9.1.2 %
+* %version: 16 %
 */
 
 #ifndef EAPSECURID_H
 #define EAPSECURID_H
 
 // INCLUDES
-#include <EapType.h>
+#include <EapTypePlugin.h>
 #include "eap_header.h"
 
 // LOCAL CONSTANTS
@@ -32,7 +32,7 @@
 /**
 * Class that implements the generic EAP type interface. Implements EAP SecurID protocol.
 */
-class CEapSecurID : public CEapType
+class CEapSecurID : public CEapTypePlugin
 {
 public:		
 	/**
@@ -92,16 +92,13 @@
 	
 #endif // #ifdef USE_EAP_SIMPLE_CONFIG
 
-	/**
-	* Invokes the configuration UI.
-	**/
-	TInt InvokeUiL();
+
 	
 	/**
 	* Gets information about EAP type. 
 	* @return Pointer to a class that contains the EAP type information. Also pushed to cleanup stack.
 	*/
-	CEapTypeInfo* GetInfoLC();
+	CEapTypeInfo* GetInfoL();
 	
 	/**
 	* Deletes EAP type configuration
@@ -123,7 +120,7 @@
 	* EAP type. 
 	* @param aTunnelingType Type number for the tunneling type
 	*/	
-	void SetTunnelingType(const TInt aTunnelingType);
+	void SetTunnelingType(const TEapExpandedType aTunnelingType);
 
 	/**
 	* Changes the index of the saved parameters.
--- a/eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/inc/EapSecurIDDbDefaults.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/inc/EapSecurIDDbDefaults.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7 %
+* %version: %
 */
 
 #ifndef EAPSECURIDDBDEFAULTS_H
--- a/eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/inc/EapSecurIDDbParameterNames.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/inc/EapSecurIDDbParameterNames.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 5.1.2 %
+* %version: %
 */
 
 #ifndef EAPSECURIDDBPARAMETERNAMES_H
@@ -28,6 +28,7 @@
 
 _LIT(KServiceType, "ServiceType");
 _LIT(KServiceIndex, "ServiceIndex");
+_LIT(KTunnelingTypeVendorId, "TunnelingTypeVendorId");
 _LIT(KTunnelingType, "TunnelingType");
 
 #endif // EAPSECURIDDBPARAMETERNAMES_H
--- a/eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/inc/EapSecurIDDbUtils.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/inc/EapSecurIDDbUtils.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: 6.1.6 %
 */
 
 #ifndef EAPSECURIDDBUTILS_H
@@ -29,21 +29,10 @@
 
 // LOCAL CONSTANTS
 
-#ifdef SYMBIAN_SECURE_DBMS
-// For EAP SecureID secure database.
-// Full path is not needed. The database eapsecurid.dat will be saved in the 
-// data cage path for DBMS. So it will be in "\private\100012a5\eapsecurid.dat" in C: drive.
-// The maximum length of database name is 0x40 (KDbMaxName) , which is defined in d32dbms.h.
-
-_LIT(KDatabaseName, "c:eapsecurid.dat");
+// For EAP-GTC private database. Database will be in the private folder of EAP-server (20026FCB).
+// The maximum length of database name is 0x40 (KDbMaxName), which is defined in d32dbms.h.
 
-_LIT(KSecureUIDFormat, "SECURE[102072e9]"); // For the security policy.
-
-#else
-
-_LIT(KDatabaseName, "c:\\system\\data\\eapsecurid.dat");
-
-#endif // #ifdef SYMBIAN_SECURE_DBMS
+_LIT(KSecurIDDatabaseName, "eapsecurid.dat");
 
 _LIT(KSecurIDTableName, "eapsecurid");
 
@@ -60,8 +49,8 @@
 	* @param aIndex Index
 	*/
 	static void OpenDatabaseL(
-		RDbNamedDatabase& aDatabase, 
-		RDbs& aSession, 
+		RDbNamedDatabase& aDatabase,
+		RFs& aFileServerSession,
 		const TIndexType aIndexType,
 		const TInt aIndex,
 		const eap_type_value_e aTunnelingType);
--- a/eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/inc/EapSecurIDGlobal.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/inc/EapSecurIDGlobal.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7 %
+* %version: %
 */
 
 #ifndef EAPSECURIDGLOBAL_H
@@ -24,9 +24,9 @@
 
 // LOCAL CONSTANTS
 
-_LIT(KReleaseDate, "20040829:"); // Must be in format YYYYMMDD: (dates and months start from 0)
+_LIT(KReleaseDate, ""); // Must be in format YYYYMMDD: (dates and months start from 0)
 _LIT(KEapTypeVersion, "1.0");
-_LIT(KManufacturer, "Nokia");
+_LIT(KManufacturer, "");
 _LIT(KNokiaSignature, "");
 _LIT(KExtraInfo1, "");
 _LIT(KExtraInfo2, "");
--- a/eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/src/101F8E74.rss	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/src/101F8E74.rss	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: 7.1.2 %
 */
 
 //  INCLUDES
--- a/eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/src/EapGtcDbUtils.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/src/EapGtcDbUtils.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 18.1.2 %
+* %version: 38 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -35,177 +35,218 @@
 #include "EapGtcDbParameterNames.h"
 #include "EapSecurIDDbParameterNames.h"
 
-#include "eap_am_trace_symbian.h"
+#include <EapTraceSymbian.h>
+#include <EapPluginTools.h>
 
 const TUint KMaxSqlQueryLength = 512;
 const TInt KMicroSecsInAMinute = 60000000; // 60000000 micro seconds is 1 minute.
 
 // ================= MEMBER FUNCTIONS =======================
 
-void EapGtcDbUtils::OpenDatabaseL(RDbNamedDatabase& aDatabase, RDbs& aSession, const TIndexType aIndexType,
-	const TInt aIndex, const eap_type_value_e aTunnelingType)
+void EapGtcDbUtils::OpenDatabaseL(
+	RDbNamedDatabase& aDatabase,
+	RFs& aFileServerSession,
+	const TIndexType aIndexType,
+	const TInt aIndex,
+	const eap_type_value_e aTunnelingType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapGtcDbUtils::OpenDatabaseL(): - Start - aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type()));
 
-#else
-
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapGtcDbUtils::OpenDatabaseL -Start- aIndexType=%d, aIndex=%d, aTunnelingVendorType=%d \n"),
-	aIndexType,aIndex,aTunnelingVendorType) );
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapGtcDbUtils::OpenDatabaseL()\n"));
 
 	// 1. Open/create a database	
 	
-	// Connect to the DBMS server.
-	User::LeaveIfError(aSession.Connect());		
-	CleanupClosePushL(aSession);	
-	// aSession and aDatabase are pushed to the cleanup stack even though they may be member
-	// variables of the calling class and would be closed in the destructor anyway. This ensures
-	// that if they are not member variables they will be closed. Closing the handle twice
-	// does no harm.	
-	
-#ifdef SYMBIAN_SECURE_DBMS
-	
-	// Create the secure shared database with the specified secure policy.
-	// Database will be created in the data caging path for DBMS (C:\private\100012a5).
-	
-	TInt err = aDatabase.Create(aSession, KGtcDatabaseName, KGtcSecureUIDFormat);
+	TInt error(KErrNone);
+	TFileName aPrivateDatabasePathName;
 
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapGtcDbUtils::OpenDatabaseL - Created Secure DB for eapgtc.dat. err=%d\n"), err));
+	EapPluginTools::CreateDatabaseLC(
+		aDatabase,
+		aFileServerSession,
+		error,
+		KEapGtcDatabaseName,
+		aPrivateDatabasePathName);
 
-	
-	if(err == KErrNone)
+	if(error == KErrNone)
 	{
 		aDatabase.Close();
-		
-	} else if (err != KErrAlreadyExists) 
+	}
+	else if (error != KErrAlreadyExists) 
 	{
-		User::LeaveIfError(err);
+		User::LeaveIfError(error);
 	}
 	
-	User::LeaveIfError(aDatabase.Open(aSession, KGtcDatabaseName, KGtcSecureUIDFormat));
-	CleanupClosePushL(aDatabase);		
-		
-#else
-	// For non-secured database. The database will be created in the old location (c:\system\data).
-	
-	RFs fsSession;		
-	User::LeaveIfError(fsSession.Connect());
-	CleanupClosePushL(fsSession);	
-	TInt err = aDatabase.Create(fsSession, KGtcDatabaseName);
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapGtcDbUtils::OpenDatabaseL - Created Non-Secure DB for eapgtc.dat. err=%d\n"), err));
-	
-	
-	if(err == KErrNone)
-	{
-		aDatabase.Close();
-		
-	} else if (err != KErrAlreadyExists) 
-	{
-		User::LeaveIfError(err);
-	}
-	CleanupStack::PopAndDestroy(); // close fsSession
-	
-	User::LeaveIfError(aDatabase.Open(aSession, KGtcDatabaseName));
-	CleanupClosePushL(aDatabase);		
-	    
-#endif // #ifdef SYMBIAN_SECURE_DBMS
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapGtcDbUtils::OpenDatabaseL(): - calls aDatabase.Open()\n")));
+
+	error = aDatabase.Open(aFileServerSession, aPrivateDatabasePathName);
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapGtcDbUtils::OpenDatabaseL(): - Opened private DB for EAP-AKA. error=%d\n"), error));
+
+	User::LeaveIfError(error);
 
 	// 2. Create the eap-securid table to database (ignore error if exists)
 	
-// Table columns:
-//// NAME ///////////////////////////////////////////////// TYPE ////////////// Constant /////////
-//| ServiceType								| UNSIGNED INTEGER 	| KServiceType      |//
-//| ServiceIndex							| UNSIGNED INTEGER 	| KServiceIndex     |//
-//| TunnelingType							| UNSIGNED INTEGER 	| KTunnelingType    |//
-//| EAP_GTC_identity				    	| VARCHAR(255)     	| cf_str_EAP_GTC_identity_literal	|//
-//| EAP_GTC_max_session_validity_time	    | BIGINT		   	| cf_str_EAP_GTC_max_session_validity_time_literal   |//
-//| EAP_GTC_last_full_authentication_time	| BIGINT		   	| KGTCLastFullAuthTime	|//
+	// Table columns:
+	//// NAME ///////////////////////////////////////////////// TYPE ////////////// Constant /////////
+	//| ServiceType								| UNSIGNED INTEGER 	| KServiceType      |//
+	//| ServiceIndex							| UNSIGNED INTEGER 	| KServiceIndex     |//
+	//| TunnelingTypeVendorId                   | UNSIGNED INTEGER  | KTunnelingTypeVendorId    |//
+	//| TunnelingType							| UNSIGNED INTEGER 	| KTunnelingType    |//
+	//| EAP_GTC_identity				    	| VARCHAR(255)     	| cf_str_EAP_GTC_identity_literal	|//
+	//| EAP_GTC_max_session_validity_time	    | BIGINT		   	| cf_str_EAP_GTC_max_session_validity_time_literal   |//
+	//| EAP_GTC_last_full_authentication_time	| BIGINT		   	| KGTCLastFullAuthTime	|//
+	//| EAP_GTC_password_prompt                        | UNSIGNED INTEGER  | cf_str_EAP_GTC_passcode_prompt_literal   |//
+	//| EAP_GTC_password                               | VARCHAR(255)      | cf_str_EAP_GTC_passcode_literal         |//
 	//////////////////////////////////////////////////////////////////////////////////////////////////
 
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapGtcDbUtils::OpenDatabaseL(): calls HBufC::NewLC()\n")));
+
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 	
-	_LIT(KSQLCreateTable1, "CREATE TABLE %S (%S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S VARCHAR(255), \
-											 %S BIGINT, \
-											 %S BIGINT)");
+	_LIT(KSQLCreateTable1, "CREATE TABLE %S \
+		(%S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S VARCHAR(255), \
+		 %S BIGINT, \
+		 %S BIGINT, \
+		 %S UNSIGNED INTEGER, \
+		 %S VARCHAR(255))");
 											 
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapGtcDbUtils::OpenDatabaseL(): calls sqlStatement.Format()\n")));
+
 	sqlStatement.Format(KSQLCreateTable1, 
 						&KGtcTableName, 
 						&KServiceType, 
 						&KServiceIndex, 
+						&KTunnelingTypeVendorId,
 						&KTunnelingType, 
 						&cf_str_EAP_GTC_identity_literal,
 						&cf_str_EAP_GTC_max_session_validity_time_literal, 
-						&KGTCLastFullAuthTime);
+						&KGTCLastFullAuthTime,
+						&cf_str_EAP_GTC_passcode_prompt_literal,
+						&cf_str_EAP_GTC_passcode_literal);
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapGtcDbUtils::OpenDatabaseL(): calls aDatabase.Execute()\n")));
 
-	err = aDatabase.Execute(sqlStatement);
-	if (err != KErrNone && err != KErrAlreadyExists)
+	error = aDatabase.Execute(sqlStatement);
+	if (error != KErrNone && error != KErrAlreadyExists)
 	{
-		User::Leave(err);
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapGtcDbUtils::OpenDatabaseL(): aDatabase.Execute() error=%d\n"),
+			error));
+
+		User::Leave(error);
 	}
 
 	// 4. Check if database table contains a row for this service type and id  
-	
-	_LIT(KSQLQueryRow, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLQueryRow, &cf_str_EAP_GTC_identity_literal, &KGtcTableName, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapGtcDbUtils::OpenDatabaseL(): calls sqlStatement.Format()\n")));
+
+	_LIT(KSQLQueryRow, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+
+	sqlStatement.Format(KSQLQueryRow,
+		&cf_str_EAP_GTC_identity_literal,
+		&KGtcTableName, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());
 			
 	RDbView view;
-	User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement), TDbWindow::EUnlimited));
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapGtcDbUtils::OpenDatabaseL(): calls view.Prepare()\n")));
+
+	error = view.Prepare(aDatabase, TDbQuery(sqlStatement), TDbWindow::EUnlimited);
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapGtcDbUtils::OpenDatabaseL(): view.Prepare() error=%d\n"),
+		error));
+
+	User::LeaveIfError(error);
 	// View must be closed when no longer needed
 	CleanupClosePushL(view);
-	User::LeaveIfError(view.EvaluateAll());
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapGtcDbUtils::OpenDatabaseL(): calls view.EvaluateAll()\n")));
+
+	error = view.EvaluateAll();
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapGtcDbUtils::OpenDatabaseL(): view.EvaluateAll() error=%d\n"),
+		error));
+
+	User::LeaveIfError(error);
 	
 	// 5. If row is not found then add it
 	
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapGtcDbUtils::OpenDatabaseL(): calls view.CountL()\n")));
+
 	TInt rows = view.CountL();
-	CleanupStack::PopAndDestroy(); // view
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapGtcDbUtils::OpenDatabaseL(): view.CountL() rows=%d\n"),
+		rows));
+
+	CleanupStack::PopAndDestroy(&view);
 	if (rows == 0)
 	{		
 		_LIT(KSQLInsert, "SELECT * FROM %S");
 		sqlStatement.Format(KSQLInsert, &KGtcTableName);		
-		
-		view.Prepare(aDatabase, TDbQuery(sqlStatement), TDbWindow::EUnlimited, RDbView::EInsertOnly);
+
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapGtcDbUtils::OpenDatabaseL(): calls view.Prepare()\n")));
+
+		error = view.Prepare(aDatabase, TDbQuery(sqlStatement), TDbWindow::EUnlimited, RDbView::EInsertOnly);
+
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapGtcDbUtils::OpenDatabaseL(): view.Prepare() error=%d\n"),
+			error));
+
 		CleanupClosePushL(view);
 		
 		// Get column set so we get the correct column numbers
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapGtcDbUtils::OpenDatabaseL(): calls view.ColSetL()\n")));
+
 		CDbColSet* colSet = view.ColSetL();		
 		CleanupStack::PushL(colSet);
 		
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapGtcDbUtils::OpenDatabaseL(): calls view.InsertL()\n")));
+
 		view.InsertL();
 		view.SetColL(colSet->ColNo(KServiceType), static_cast<TInt> (aIndexType));
 		view.SetColL(colSet->ColNo(KServiceIndex), aIndex);
-		view.SetColL(colSet->ColNo(KTunnelingType), aTunnelingVendorType);
-		view.SetColL(colSet->ColNo(cf_str_EAP_GTC_identity_literal), default_EAP_GTC_identity);
+		view.SetColL(colSet->ColNo(KTunnelingTypeVendorId), aTunnelingType.get_vendor_id());
+		view.SetColL(colSet->ColNo(KTunnelingType), aTunnelingType.get_vendor_type());
+		view.SetColL(colSet->ColNo(cf_str_EAP_GTC_identity_literal), default_EAP_identity);
 		
 		view.SetColL(colSet->ColNo(cf_str_EAP_GTC_max_session_validity_time_literal), default_MaxSessionTime);
 		
 		view.SetColL(colSet->ColNo(KGTCLastFullAuthTime), default_FullAuthTime);		
+		view.SetColL(colSet->ColNo(cf_str_EAP_GTC_passcode_prompt_literal), default_EAP_password_prompt);
+		view.SetColL(colSet->ColNo(cf_str_EAP_GTC_passcode_literal), default_EAP_password);
 				
 		view.PutL();
 
-		CleanupStack::PopAndDestroy( colSet ); // Delete colSet.
+		CleanupStack::PopAndDestroy( colSet );
 		
-		CleanupStack::PopAndDestroy( &view ); // Close view.
+		CleanupStack::PopAndDestroy( &view );
 		
 	}
-	
-	CleanupStack::PopAndDestroy( buf ); // Delete buf	
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapGtcDbUtils::OpenDatabaseL(): calls aDatabase.Compact()\n")));
+
+	aDatabase.Compact();
+
+	CleanupStack::PopAndDestroy( buf );
 	CleanupStack::Pop( &aDatabase );	
-	CleanupStack::Pop( &aSession );	
-	
-	aDatabase.Compact();
+	CleanupStack::Pop( &aFileServerSession );
 }
 
+// ----------------------------------------------------------
 
 void EapGtcDbUtils::SetIndexL(
 	RDbNamedDatabase& aDatabase, 		
@@ -216,25 +257,37 @@
 	const TInt aNewIndex,
 	const eap_type_value_e aNewTunnelingType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
-	TUint aNewTunnelingVendorType = aNewTunnelingType.get_vendor_type();
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapGtcDbUtils::SetIndexL(): -Start- aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type()));
+	
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapGtcDbUtils::SetIndexL(): -Start- aNewIndexType=%d, aNewIndex=%d, aNewTunnelingType=0xfe%06x%08x\n"),
+		aNewIndexType,
+		aNewIndex,
+		aNewTunnelingType.get_vendor_id(),
+		aNewTunnelingType.get_vendor_type()));
 
-#else
-
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-	TUint aNewTunnelingVendorType = static_cast<TUint>(aNewTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapGtcDbUtils::SetIndexL()\n"));
 
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
-	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
+	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
 
-	sqlStatement.Format(KSQL, &KGtcTableName, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+	sqlStatement.Format(KSQL,
+		&KGtcTableName, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());
 	
 	RDbView view;
 	
@@ -264,17 +317,20 @@
 	
 	view.UpdateL();
 	
-        view.SetColL(colSet->ColNo(KServiceType), static_cast<TUint>(aNewIndexType));
-    
-    view.SetColL(colSet->ColNo(KServiceIndex), aNewIndex);
-    
-    view.SetColL(colSet->ColNo(KTunnelingType), aNewTunnelingVendorType);
+	view.SetColL(colSet->ColNo(KServiceType), static_cast<TUint>(aNewIndexType));
+	view.SetColL(colSet->ColNo(KServiceIndex), aNewIndex);
+	view.SetColL(colSet->ColNo(KTunnelingTypeVendorId), aNewTunnelingType.get_vendor_id());
+	view.SetColL(colSet->ColNo(KTunnelingType), aNewTunnelingType.get_vendor_type());
 
     view.PutL();
     	
-	CleanupStack::PopAndDestroy(3); // view, colset, buf
+	CleanupStack::PopAndDestroy(colSet);
+	CleanupStack::PopAndDestroy(&view);
+	CleanupStack::PopAndDestroy(buf);
 }
 
+// ----------------------------------------------------------
+
 void EapGtcDbUtils::SetConfigurationL(
 	RDbNamedDatabase& aDatabase,
 	const EAPSettings& aSettings, 
@@ -282,18 +338,19 @@
 	const TInt aIndex,
 	const eap_type_value_e aTunnelingType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapGtcDbUtils::SetConfigurationL(): -Start- aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type()));
 
-#else
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapGtcDbUtils::SetConfigurationL()\n"));
 
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
+	EAP_TRACE_SETTINGS(&aSettings);
 
 	// Check if the settings are for the correct type
-	if (aSettings.iEAPType != EAPSettings::EEapGtc)
+	if (aSettings.iEAPExpandedType != (*EapExpandedTypeGtc.GetType()))
 	{
 		User::Leave(KErrNotSupported);
 	}
@@ -304,9 +361,18 @@
 
 	RDbView view;
 
-	_LIT(KSQLQuery, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLQuery, &KGtcTableName, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+	_LIT(KSQLQuery, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+
+	sqlStatement.Format(KSQLQuery,
+		&KGtcTableName, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());
 	
 	// Evaluate view
 	User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement)));
@@ -331,7 +397,7 @@
 		{
 			// Username too long. Can not be stored in DB.
 			
-			EAP_TRACE_DEBUG_SYMBIAN((_L("EapGtcDbUtils::SetConfigurationL: Too long Username. Length=%d \n"),
+			EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapGtcDbUtils::SetConfigurationL(): Too long Username. Length=%d \n"),
 			aSettings.iUsername.Length()));
 			
 			User::Leave(KErrArgument);
@@ -351,21 +417,59 @@
 		
 		view.SetColL(colSet->ColNo(cf_str_EAP_GTC_max_session_validity_time_literal), validityInMicro);
 	}
-	
+
 	// Last full authentication time should be made zero when EAP configurations are modified.
 	// This makes sure that the next authentication with this EAP would be full authentication
 	// instead of reauthentication even if the session is still valid.
-	
+
 	view.SetColL(colSet->ColNo(KGTCLastFullAuthTime), default_FullAuthTime);
 
-	EAP_TRACE_DEBUG_SYMBIAN((_L("Session Validity: EAP-Type=%d, Resetting Full Auth Time since settings are modified\n"),
-								aSettings.iEAPType ));
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapGtcDbUtils::SetConfigurationL(): Session Validity: Resetting Full Auth Time since settings are modified\n")));
+
+	// Password existence.
+	if (aSettings.iPasswordExistPresent
+		&& !aSettings.iPasswordExist)
+	{
+		// Clear password from database.
+		view.SetColL(colSet->ColNo(cf_str_EAP_GTC_passcode_literal), KNullPasswordData);
+		view.PutL();
+		view.SetColNullL(colSet->ColNo(cf_str_EAP_GTC_passcode_literal));
+	}
+
+	// Password
+	if (aSettings.iPasswordPresent)
+	{
+		// Validate length.
+		if(aSettings.iPassword.Length() > KMaxPasswordLengthInDB)
+		{
+			// Password too long. Can not be stored in DB.
 			
+			EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapGtcDbUtils::SetConfigurationL(): Too long Password. Length=%d \n"),
+				aSettings.iPassword.Length()));
+			
+			User::Leave(KErrArgument);
+		}
+					
+		// Length is ok. Set the value in DB.	
+		view.SetColL(colSet->ColNo(cf_str_EAP_GTC_passcode_literal), aSettings.iPassword);
+		
+	}
+			
+	if (aSettings.iShowPassWordPromptPresent)
+		{	
+		// If password was supplied set password prompting off
+		view.SetColL(colSet->ColNo(cf_str_EAP_GTC_passcode_prompt_literal), aSettings.iShowPassWordPrompt);		
+		}
+		
 	view.PutL();
-	CleanupStack::PopAndDestroy(3); // view, colset, buf
 
+	CleanupStack::PopAndDestroy(colSet);
+	CleanupStack::PopAndDestroy(&view);
+	CleanupStack::PopAndDestroy(buf);
 }
 
+// ----------------------------------------------------------
+
 void EapGtcDbUtils::GetConfigurationL(
 	RDbNamedDatabase& aDatabase,
 	EAPSettings& aSettings, 
@@ -373,15 +477,14 @@
 	const TInt aIndex,
 	const eap_type_value_e aTunnelingType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapGtcDbUtils::GetConfigurationL(): -Start- aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type()));
 
-#else
-
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapGtcDbUtils::GetConfigurationL()\n"));
 
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();	
@@ -389,9 +492,18 @@
 	RDbView view;
 
 	// Form the query
-	_LIT(KSQLQuery, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLQuery, &KGtcTableName, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+	_LIT(KSQLQuery, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+
+	sqlStatement.Format(KSQLQuery,
+		&KGtcTableName, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());
 	
 	// Evaluate view
 	User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement)));
@@ -408,13 +520,38 @@
 	CDbColSet* colSet = view.ColSetL();
 	CleanupStack::PushL(colSet);
 
-	aSettings.iEAPType = EAPSettings::EEapGtc;
+	aSettings.iEAPExpandedType = *EapExpandedTypeGtc.GetType();
 	
 	// Username
 	TPtrC username = view.ColDes(colSet->ColNo(cf_str_EAP_GTC_identity_literal));
 	aSettings.iUsername.Copy(username);
 	aSettings.iUsernamePresent = ETrue;
 	
+	// Password existence.
+	aSettings.iPasswordExistPresent = ETrue;
+	aSettings.iPasswordExist = ! view.IsColNull(colSet->ColNo(cf_str_EAP_GTC_passcode_literal));
+
+#if defined(USE_EAP_PASSWORD_READ_FROM_DATABASE)
+	// Password
+	TPtrC password = view.ColDes(colSet->ColNo(cf_str_EAP_GTC_passcode_literal));
+	aSettings.iPassword.Copy(password);
+	aSettings.iPasswordPresent = ETrue;
+#else
+	EAP_TRACE_DEBUG_SYMBIAN((_L("WARNING: EapGtcDbUtils::GetConfigurationL(): Password read is disabled\n")));
+#endif //#if defined(USE_EAP_PASSWORD_READ_FROM_DATABASE)
+
+	aSettings.iShowPassWordPromptPresent = ETrue;
+
+	TUint aShow = view.ColUint(colSet->ColNo(cf_str_EAP_GTC_passcode_prompt_literal));
+	if(aShow == EEapDbFalse)
+	{
+		aSettings.iShowPassWordPrompt = EFalse;
+	}
+	else
+	{
+		aSettings.iShowPassWordPrompt = ETrue;
+	}
+
 	// Session validity time	
 	TInt64 maxSessionTimeMicro = view.ColInt64(colSet->ColNo(cf_str_EAP_GTC_max_session_validity_time_literal));
 	
@@ -424,9 +561,15 @@
 	aSettings.iSessionValidityTime = static_cast<TUint>(maxSessionTimeMin);
 	aSettings.iSessionValidityTimePresent = ETrue;
 	
-	CleanupStack::PopAndDestroy(3); // view, colset, buf
+	CleanupStack::PopAndDestroy(colSet);
+	CleanupStack::PopAndDestroy(&view);
+	CleanupStack::PopAndDestroy(buf);
+
+	EAP_TRACE_SETTINGS(&aSettings);
 }
 
+// ----------------------------------------------------------
+
 void EapGtcDbUtils::CopySettingsL(
 	RDbNamedDatabase& aDatabase, 		
 	const TIndexType aSrcIndexType,
@@ -436,25 +579,37 @@
 	const TInt aDestIndex,
 	const eap_type_value_e aDestTunnelingType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aSrcTunnelingVendorType = aSrcTunnelingType.get_vendor_type();
-	TUint aDestTunnelingVendorType = aDestTunnelingType.get_vendor_type();
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapGtcDbUtils::CopySettingsL(): -Start- aSrcIndexType=%d, aSrcIndex=%d, aSrcTunnelingType=0xfe%06x%08x\n"),
+		aSrcIndexType,
+		aSrcIndex,
+		aSrcTunnelingType.get_vendor_id(),
+		aSrcTunnelingType.get_vendor_type()));
+	
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapGtcDbUtils::CopySettingsL(): -Start- aDestIndexType=%d, aDestTunnelingType=0xfe%06x%08x\n"),
+		aDestIndexType,
+		aDestIndex,
+		aDestTunnelingType.get_vendor_id(),
+		aDestTunnelingType.get_vendor_type()));
 
-#else
-
-	TUint aSrcTunnelingVendorType = static_cast<TUint>(aSrcTunnelingType);
-	TUint aDestTunnelingVendorType = static_cast<TUint>(aDestTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapGtcDbUtils::CopySettingsL()\n"));
 
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
-	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
+	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
 
-	sqlStatement.Format(KSQL, &KGtcTableName, 
-		&KServiceType, aSrcIndexType, &KServiceIndex, aSrcIndex, &KTunnelingType, aSrcTunnelingVendorType);
+	sqlStatement.Format(KSQL,
+		&KGtcTableName, 
+		&KServiceType,
+		aSrcIndexType,
+		&KServiceIndex,
+		aSrcIndex,
+		&KTunnelingTypeVendorId,
+		aSrcTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aSrcTunnelingType.get_vendor_type());
 	
 	RDbView view;
 	
@@ -485,99 +640,87 @@
 	CleanupStack::PushL(colSet);
 		
 	view.SetColL(colSet->ColNo(KServiceType), static_cast<TUint>(aDestIndexType));
-    
     view.SetColL(colSet->ColNo(KServiceIndex), aDestIndex);
-    
-    view.SetColL(colSet->ColNo(KTunnelingType), aDestTunnelingVendorType);
+	view.SetColL(colSet->ColNo(KTunnelingTypeVendorId), aDestTunnelingType.get_vendor_id());
+	view.SetColL(colSet->ColNo(KTunnelingType), aDestTunnelingType.get_vendor_type());
 
     view.PutL();
     	
-	CleanupStack::PopAndDestroy(3); // view, colset, buf
+	CleanupStack::PopAndDestroy(colSet);
+	CleanupStack::PopAndDestroy(&view);
+	CleanupStack::PopAndDestroy(buf);
 }
 
+// ----------------------------------------------------------
+
 void EapGtcDbUtils::DeleteConfigurationL(	
 	const TIndexType aIndexType,
 	const TInt aIndex,
 	const eap_type_value_e aTunnelingType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapGtcDbUtils::DeleteConfigurationL(): -Start- aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type()));
 
-#else
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapGtcDbUtils::DeleteConfigurationL()\n"));
 
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
+	RDbNamedDatabase aDatabase;
+	RFs aFileServerSession;
 
-	RDbs session;
-	RDbNamedDatabase database;
-	// Connect to the DBMS server.
-	User::LeaveIfError(session.Connect());
-	CleanupClosePushL(session);	
-		
-#ifdef SYMBIAN_SECURE_DBMS
+	TInt error(KErrNone);
+	TFileName aPrivateDatabasePathName;
 	
-	// Create the secure shared database with the specified secure policy.
-	// Database will be created in the data caging path for DBMS (C:\private\100012a5).
-	
-	TInt err = database.Create(session, KGtcDatabaseName, KGtcSecureUIDFormat);
-	
-	if(err == KErrNone)
+	EapPluginTools::CreateDatabaseLC(
+		aDatabase,
+		aFileServerSession,
+		error,
+		KEapGtcDatabaseName,
+		aPrivateDatabasePathName);
+
+	if(error == KErrNone)
 	{
 		// Database was created so it was empty. No need for further actions.
-		database.Destroy();
-		CleanupStack::PopAndDestroy();
+		aDatabase.Destroy();
+		CleanupStack::PopAndDestroy(&aDatabase);
+		CleanupStack::PopAndDestroy(&aFileServerSession);
 		return;
-		
-	} 
-	else if (err != KErrAlreadyExists) 
+	}
+	else if (error != KErrAlreadyExists) 
 	{
-		User::LeaveIfError(err);
+		User::LeaveIfError(error);
 	}
 	
-	// Database existed, open it.
-	User::LeaveIfError(database.Open(session, KGtcDatabaseName, KGtcSecureUIDFormat));
-	CleanupClosePushL(database);
-		
-#else
-	// For non-secured database. The database will be created in the old location (c:\system\data).
-	
-	RFs fsSession;		
-	User::LeaveIfError(fsSession.Connect());
-	CleanupClosePushL(fsSession);	
-	TInt err = database.Create(fsSession, KGtcDatabaseName);
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapGtcDbUtils::DeleteConfigurationL(): - calls aDatabase.Open()\n")));
+
+	error = aDatabase.Open(aFileServerSession, aPrivateDatabasePathName);
 
-	if(err == KErrNone)
-	{
-		// Database was created so it was empty. No need for further actions.
-		database.Destroy();
-		CleanupStack::PopAndDestroy(2); // fsSession, database session
-		return;
-		
-	} 
-	else if (err != KErrAlreadyExists) 
-	{
-		User::LeaveIfError(err);
-	}
-	
-	CleanupStack::PopAndDestroy(); // close fsSession
-	
-	User::LeaveIfError(database.Open(session, KGtcDatabaseName));
-	CleanupClosePushL(database);		
-	    
-#endif // #ifdef SYMBIAN_SECURE_DBMS
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapGtcDbUtils::DeleteConfigurationL(): - Opened private DB for EAP-GTC. error=%d\n"), error));
+
+	User::LeaveIfError(error);
 
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
 	// Main settings table
-	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQL, &KGtcTableName, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+
+	sqlStatement.Format(KSQL,
+		&KGtcTableName, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());
+
 	// Evaluate view
 	RDbView view;
-	User::LeaveIfError(view.Prepare(database,TDbQuery(sqlStatement), TDbWindow::EUnlimited));
+	User::LeaveIfError(view.Prepare(aDatabase,TDbQuery(sqlStatement), TDbWindow::EUnlimited));
 	CleanupClosePushL(view);
 	User::LeaveIfError(view.EvaluateAll());
 
@@ -589,8 +732,12 @@
 		} while (view.NextL() != EFalse);
 	}
 
-	// Close database
-	CleanupStack::PopAndDestroy(4); // view, buf, database, session
+	CleanupStack::PopAndDestroy(&view);
+	CleanupStack::PopAndDestroy(buf);
+	CleanupStack::PopAndDestroy(&aDatabase);
+	CleanupStack::PopAndDestroy(&aFileServerSession);
 }
 
+// ----------------------------------------------------------
+
 // End of File
--- a/eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/src/EapGtcUiConnection.cpp	Thu May 13 22:51:27 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,131 +0,0 @@
-/*
-* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  EAP and WLAN authentication protocols.
-*
-*/
-
-/*
-* %version: 10.1.2 %
-*/
-
-// This is enumeration of EAPOL source code.
-#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
-	#undef EAP_FILE_NUMBER_ENUM
-	#define EAP_FILE_NUMBER_ENUM 339 
-	#undef EAP_FILE_NUMBER_DATE 
-	#define EAP_FILE_NUMBER_DATE 1127594498 
-#endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
-
-#include "EapGtcDbUtils.h"
-#include <EapGtcUiConnection.h>
-#include <EapGtcUiDataConnection.h>
-
-CEapGtcUiConnection::CEapGtcUiConnection(
-    const TIndexType aIndexType,
-    const TInt aIndex,
-    const TInt aTunnelingType)
-    : iIndexType(aIndexType)
-    , iIndex(aIndex)
-    , iTunnelingType(aTunnelingType)
-    , iIsConnected(EFalse)
-    , iDataConn(NULL)
-{
-}
-
-
-CEapGtcUiConnection::~CEapGtcUiConnection()
-{
-}
-
-
-TInt CEapGtcUiConnection::Connect()
-{
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	eap_type_value_e tunnelingType(static_cast<eap_type_ietf_values_e>(iTunnelingType));
-
-#else
-
-	eap_type_value_e tunnelingType = static_cast<eap_type_value_e>(iTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
-	TRAPD(err, EapGtcDbUtils::OpenDatabaseL(
-		iDbNamedDatabase, 
-		iDbs, 
-		iIndexType, 
-		iIndex, 
-		tunnelingType));
-    if (err == KErrNone)
-    {
-        iIsConnected = ETrue;
-    }
-
-    return err;
-}
-
-
-TInt CEapGtcUiConnection::Close()
-{
-    if (iIsConnected)
-    {
-        iDbNamedDatabase.Close();
-        iDbs.Close();
-    }
-    iIsConnected = EFalse;
-
-    return KErrNone;
-}
-
-
-CEapGtcUiDataConnection * CEapGtcUiConnection::GetDataConnection()
-{
-    if (!iDataConn)
-    {
-        iDataConn = new CEapGtcUiDataConnection(this);
-    }
-
-    return iDataConn;
-}
-
-TInt CEapGtcUiConnection::GetDatabase(RDbNamedDatabase & aDatabase)
-{
-    if (iIsConnected == EFalse)
-    {
-        return KErrSessionClosed;
-    }
-
-    aDatabase = iDbNamedDatabase;
-    return KErrNone;
-}
-
-
-TIndexType CEapGtcUiConnection::GetIndexType()
-{
-    return iIndexType;
-}
-
-
-TInt CEapGtcUiConnection::GetIndex()
-{
-    return iIndex;
-}
-
-
-TInt CEapGtcUiConnection::GetTunnelingType()
-{
-    return iTunnelingType;
-}
-
-// End of File
--- a/eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/src/EapGtcUiDataConnection.cpp	Thu May 13 22:51:27 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,217 +0,0 @@
-/*
-* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  EAP and WLAN authentication protocols.
-*
-*/
-
-/*
-* %version: 14.1.2.1.2 %
-*/
-
-// This is enumeration of EAPOL source code.
-#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
-	#undef EAP_FILE_NUMBER_ENUM
-	#define EAP_FILE_NUMBER_ENUM 341 
-	#undef EAP_FILE_NUMBER_DATE 
-	#define EAP_FILE_NUMBER_DATE 1127594498 
-#endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
-
-#include <e32base.h>
-#include "EapGtcDbUtils.h"
-#include "EapSecurIDDbParameterNames.h"
-#include "EapGtcDbParameterNames.h"
-#include "EapGtcDbDefaults.h"
-#include <EapGtcUiConnection.h>
-#include <EapGtcUiDataConnection.h>
-#include <EapGtcUiGtcData.h>
-#include "eap_am_trace_symbian.h"
-
-const TUint KMaxSqlQueryLength = 256;
-
-
-CEapGtcUiDataConnection::CEapGtcUiDataConnection(CEapGtcUiConnection * aUiConn)
-: iIsOpened(EFalse)
-, iUiConn(aUiConn)
-, iColSet(NULL)
-, iDataPtr(NULL)
-{
-}
-
-
-CEapGtcUiDataConnection::~CEapGtcUiDataConnection()
-{
-    if (iUiConn)
-    {
-        Close();
-        iUiConn = NULL;
-    }
-}
-
-
-TInt CEapGtcUiDataConnection::Open()
-{
-    if (iIsOpened)
-    {
-        return KErrAlreadyExists;
-    }
-
-    TInt err = iUiConn->GetDatabase(iDatabase);
-    if (err != KErrNone)
-    {
-        return err;
-    }
-
-    iIsOpened = ETrue;
-    return KErrNone;
-}
-
-
-TInt CEapGtcUiDataConnection::GetData(CEapGtcUiGtcData ** aDataPtr)
-{
-    if (aDataPtr == NULL)
-    {
-        return KErrArgument;
-    }
-    if (iIsOpened == EFalse)
-    {
-        return KErrSessionClosed;
-    }
-    iDataPtr = new CEapGtcUiGtcData();
-    if (!iDataPtr)
-    {
-        return KErrNoMemory;
-    }
-
-    TRAPD(err, FetchDataL());
-    if (err != KErrNone)
-    {
-		delete iDataPtr;
-		iDataPtr = NULL;
-		
-		delete iColSet;
-		iColSet = NULL;
-		
-        iView.Close();
-        
-        return err;
-    }
-
-    *aDataPtr = iDataPtr;
-
-    return KErrNone;
-}
-
-
-TInt CEapGtcUiDataConnection::Update()
-{
-    TRAPD(err, iView.UpdateL());
-    if (err != KErrNone)
-    {
-        return err;
-    }
-    
-	// Validate the length of username/identity.
-	if(iDataPtr->GetIdentity().Length() > KMaxIdentityLengthInDB)
-	{
-		// Username or identity too long. Can not be stored in DB.
-		EAP_TRACE_DEBUG_SYMBIAN((_L("CEapGtcUiDataConnection::Update: Too long username/identity. length =%d\n"),
-			iDataPtr->GetIdentity().Length()));
-		
-		return KErrArgument;
-	}
-    
-	TRAP(err, iView.SetColL(iColSet->ColNo(cf_str_EAP_GTC_identity_literal), iDataPtr->GetIdentity()));
-    if (err != KErrNone)
-    {
-        return err;
-    }
-
-	// Last full authentication time should be made zero when EAP configurations are modified.
-	// This makes sure that the next authentication with this EAP would be full authentication
-	// instead of reauthentication even if the session is still valid.
-	
-	TRAP(err, iView.SetColL(iColSet->ColNo(KGTCLastFullAuthTime), default_FullAuthTime));
-    if (err != KErrNone)
-    {
-        return err;
-    }
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("Session Validity: Resetting Full Auth Time since EAP-GTC settings are modified\n")));
-
-    TRAP(err, iView.PutL());
-        
-    return err;
-}
-
-
-TInt CEapGtcUiDataConnection::Close()
-{
-    if (iIsOpened == EFalse)
-    {
-        return KErrNone;
-    }
-
-	delete iDataPtr;
-	iDataPtr = NULL;
-	
-	delete iColSet;
-	iColSet = NULL;
-
-    iView.Close();
-
-    iUiConn = NULL;
-    
-    return KErrNone;
-}
-
-
-void CEapGtcUiDataConnection::FetchDataL()
-{
-	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
-	TPtr sqlStatement = buf->Des();
-
-	// Form the query. Query everything.
-	_LIT(KSQLQuery, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLQuery,
-						&KGtcTableName,
-						&KServiceType,
-						iUiConn->GetIndexType(),
-						&KServiceIndex,
-						iUiConn->GetIndex(),
-						&KTunnelingType, 
-						iUiConn->GetTunnelingType());
-						
-	// Evaluate view
-	User::LeaveIfError(iView.Prepare(iDatabase, TDbQuery(sqlStatement)));
-	
-	User::LeaveIfError(iView.EvaluateAll());
-		
-	// Get the first (and only) row
-	iView.FirstL();
-	iView.GetL();	
-				
-	// Get column set so we get the correct column numbers
-	delete iColSet;
-	iColSet = NULL;
-	iColSet = iView.ColSetL();
-
-	// Start fetching the values
-
-	// identity
-    iDataPtr->GetIdentity().Copy(iView.ColDes16(iColSet->ColNo(cf_str_EAP_GTC_identity_literal)));
-
-    CleanupStack::PopAndDestroy(buf);
-}
-
-// End of File
--- a/eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/src/EapGtcUiGtcData.cpp	Thu May 13 22:51:27 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:  EAP and WLAN authentication protocols.
-*
-*/
-
-/*
-* %version: 8.1.2 %
-*/
-
-// This is enumeration of EAPOL source code.
-#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
-	#undef EAP_FILE_NUMBER_ENUM
-	#define EAP_FILE_NUMBER_ENUM 343 
-	#undef EAP_FILE_NUMBER_DATE 
-	#define EAP_FILE_NUMBER_DATE 1127594498 
-#endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
-
-#include <EapGtcUiGtcData.h>
-
-
-CEapGtcUiGtcData::CEapGtcUiGtcData()
-{
-}
-
-
-CEapGtcUiGtcData::~CEapGtcUiGtcData()
-{
-}
-
-
-TDes& CEapGtcUiGtcData::GetIdentity()
-{
-    return iIdentity;
-}
-
-// End of File
--- a/eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/src/EapSecurID.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/src/EapSecurID.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 15.1.3 %
+* %version: 23 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -37,8 +37,9 @@
 #include <EapTypeInfo.h>
 #include "EapGtcDbUtils.h"
 
-
 #include "eap_am_tools_symbian.h"
+#include "EapConversion.h"
+#include "EapTraceSymbian.h"
 
 // LOCAL CONSTANTS
 
@@ -150,21 +151,13 @@
 
 // ----------------------------------------------------------
 
-TInt CEapSecurID::InvokeUiL()
-{
-	TInt buttonId(0);
-	return buttonId;
-}
-
-// ----------------------------------------------------------
-
-CEapTypeInfo* CEapSecurID::GetInfoLC()
+CEapTypeInfo* CEapSecurID::GetInfoL()
 {
 	CEapTypeInfo* info = new(ELeave) CEapTypeInfo(
 		(TDesC&) KReleaseDate,
 		(TDesC&) KEapTypeVersion,
 		(TDesC&) KManufacturer);
-	CleanupStack::PushL(info);
+
 	return info;
 }
 
@@ -177,19 +170,20 @@
 
 // ----------------------------------------------------------
 
-void CEapSecurID::SetTunnelingType(const TInt aTunnelingType)
-{
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	// Vendor id is eap_type_vendor_id_ietf always in this plugin.
-	iTunnelingType.set_eap_type_values(eap_type_vendor_id_ietf, aTunnelingType);
-
-#else
-
-	iTunnelingType = static_cast<eap_type_value_e>(aTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-}
+void CEapSecurID::SetTunnelingType(const TEapExpandedType aTunnelingType)
+    {
+    EAP_TRACE_DATA_DEBUG_SYMBIAN(
+        (EAPL("CEapSecurID::SetTunnelingType - tunneling type"),
+        aTunnelingType.GetValue().Ptr(), aTunnelingType.GetValue().Length()));
+    
+    eap_type_value_e aInternalType;
+    
+    TInt err = CEapConversion::ConvertExpandedEAPTypeToInternalType(
+            &aTunnelingType,
+            &aInternalType);
+    
+    iTunnelingType = aInternalType;
+    }
 
 // ----------------------------------------------------------
 void CEapSecurID::SetIndexL(
@@ -213,7 +207,7 @@
 
 	RDbNamedDatabase db;
 
-	RDbs session;
+	RFs session;
 	
 	EapGtcDbUtils::OpenDatabaseL(db, session, iIndexType, iIndex, iTunnelingType);
 	
@@ -232,16 +226,15 @@
 	iIndexType = aIndexType;
 	iIndex = aIndex;
 
-	CleanupStack::PopAndDestroy(2); // db
-	
-		
+	CleanupStack::PopAndDestroy(&db);
+	CleanupStack::PopAndDestroy(&session);
 }
 
 void CEapSecurID::SetConfigurationL(const EAPSettings& aSettings)
 {
 	RDbNamedDatabase db;
 
-	RDbs session;	
+	RFs session;
 	
 	// This also creates the IAP entry if it doesn't exist
 	EapGtcDbUtils::OpenDatabaseL(db, session, iIndexType, iIndex, iTunnelingType);
@@ -255,15 +248,16 @@
 		iIndexType,
 		iIndex,
 		iTunnelingType);		
-		
-	CleanupStack::PopAndDestroy(2); // db, session
+
+	CleanupStack::PopAndDestroy(&db);
+	CleanupStack::PopAndDestroy(&session);
 }
 
 void CEapSecurID::GetConfigurationL(EAPSettings& aSettings)
 {
 	RDbNamedDatabase db;
 
-	RDbs session;
+	RFs session;
 	
 	// This also creates the IAP entry if it doesn't exist
 	EapGtcDbUtils::OpenDatabaseL(db, session, iIndexType, iIndex, iTunnelingType);
@@ -277,8 +271,9 @@
 		iIndexType,
 		iIndex,
 		iTunnelingType);
-		
-	CleanupStack::PopAndDestroy(2); // db, session
+
+	CleanupStack::PopAndDestroy(&db);
+	CleanupStack::PopAndDestroy(&session);
 }
 
 void CEapSecurID::CopySettingsL(
@@ -302,7 +297,7 @@
 
 	RDbNamedDatabase db;
 
-	RDbs session;
+	RFs session;
 	
 	EapGtcDbUtils::OpenDatabaseL(db, session, iIndexType, iIndex, iTunnelingType);
 	
@@ -317,9 +312,9 @@
 		aDestinationIndexType, 
 		aDestinationIndex, 
 		iTunnelingType);
-		
-	CleanupStack::PopAndDestroy(2); // db
-	
+
+	CleanupStack::PopAndDestroy(&db);
+	CleanupStack::PopAndDestroy(&session);
 }
 
 
--- a/eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/src/EapSecurIDDbUtils.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/src/EapSecurIDDbUtils.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 14.1.2 %
+* %version: 24 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -34,88 +34,64 @@
 #include "EapSecurIDDbDefaults.h"
 #include "EapSecurIDDbParameterNames.h"
 
-#include "eap_am_trace_symbian.h"
+#include <EapTraceSymbian.h>
+#include <EapPluginTools.h>
 
 const TUint KMaxSqlQueryLength = 512;
 
 // ================= MEMBER FUNCTIONS =======================
 
-void EapSecurIDDbUtils::OpenDatabaseL(RDbNamedDatabase& aDatabase, RDbs& aSession, const TIndexType aIndexType,
-	const TInt aIndex, const eap_type_value_e aTunnelingType)
+void EapSecurIDDbUtils::OpenDatabaseL(
+	RDbNamedDatabase& aDatabase,
+	RFs& aFileServerSession,
+	const TIndexType aIndexType,
+	const TInt aIndex,
+	const eap_type_value_e aTunnelingType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapSecurIDDbUtils::OpenDatabaseL(): - Start - aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type()));
 
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
-
-#else
-
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapSecurIDDbUtils::OpenDatabaseL()\n"));
 
 	// 1. Open/create a database	
-	
-	// Connect to the DBMS server.
-	User::LeaveIfError(aSession.Connect());		
-	CleanupClosePushL(aSession);	
-	// aSession and aDatabase are pushed to the cleanup stack even though they may be member
-	// variables of the calling class and would be closed in the destructor anyway. This ensures
-	// that if they are not member variables they will be closed. Closing the handle twice
-	// does no harm.	
-	
-#ifdef SYMBIAN_SECURE_DBMS
-	
-	// Create the secure shared database with the specified secure policy.
-	// Database will be created in the data caging path for DBMS (C:\private\100012a5).
-	
-	TInt err = aDatabase.Create(aSession, KDatabaseName, KSecureUIDFormat);
+
+	TInt error(KErrNone);
+	TFileName aPrivateDatabasePathName;
 
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapSecurIDDbUtils::OpenDatabaseL - Created Secure DB for eapsecurid.dat. err=%d\n"), err));
+	EapPluginTools::CreateDatabaseLC(
+		aDatabase,
+		aFileServerSession,
+		error,
+		KSecurIDDatabaseName,
+		aPrivateDatabasePathName);
 
-	
-	if(err == KErrNone)
+	if(error == KErrNone)
 	{
 		aDatabase.Close();
-		
-	} else if (err != KErrAlreadyExists) 
+	}
+	else if (error != KErrAlreadyExists) 
 	{
-		User::LeaveIfError(err);
+		User::LeaveIfError(error);
 	}
 	
-	User::LeaveIfError(aDatabase.Open(aSession, KDatabaseName, KSecureUIDFormat));
-	CleanupClosePushL(aDatabase);		
-		
-#else
-	// For non-secured database. The database will be created in the old location (c:\system\data).
-	
-	RFs fsSession;		
-	User::LeaveIfError(fsSession.Connect());
-	CleanupClosePushL(fsSession);	
-	TInt err = aDatabase.Create(fsSession, KDatabaseName);
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapSecurIDDbUtils::OpenDatabaseL - Created Non-Secure DB for eapsecurid.dat. err=%d\n"), err));
-	
-	
-	if(err == KErrNone)
-	{
-		aDatabase.Close();
-		
-	} else if (err != KErrAlreadyExists) 
-	{
-		User::LeaveIfError(err);
-	}
-	CleanupStack::PopAndDestroy(); // close fsSession
-	
-	User::LeaveIfError(aDatabase.Open(aSession, KDatabaseName));
-	CleanupClosePushL(aDatabase);		
-	    
-#endif // #ifdef SYMBIAN_SECURE_DBMS
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapSecurIDDbUtils::OpenDatabaseL(): - calls aDatabase.Open()\n")));
+
+	error = aDatabase.Open(aFileServerSession, aPrivateDatabasePathName);
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapSecurIDDbUtils::OpenDatabaseL(): - Opened private DB for EAP-AKA. error=%d\n"), error));
+
+	User::LeaveIfError(error);
 
 	// 2. Create the eap-securid table to database (ignore error if exists)
 	// Table columns:
 	//// NAME ///////////////////////////////////////////////// TYPE ////////////// Constant /////////
 	//| ServiceType											| UNSIGNED INTEGER | KServiceType      |//
 	//| ServiceIndex										| UNSIGNED INTEGER | KServiceIndex     |//
+	//| TunnelingTypeVendorId                               | UNSIGNED INTEGER  | KTunnelingTypeVendorId    |//
 	//| TunnelingType										| UNSIGNED INTEGER | KTunnelingType    |//
 	//| EAP_SECURID_identity				        		| VARCHAR(255)     | cf_str_EAP_SECURID_identity_literal         |//
 	//////////////////////////////////////////////////////////////////////////////////////////////////
@@ -123,22 +99,43 @@
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
-	_LIT(KSQLCreateTable1, "CREATE TABLE %S (%S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S VARCHAR(255))");
-	sqlStatement.Format(KSQLCreateTable1, &KSecurIDTableName, &KServiceType, &KServiceIndex, &KTunnelingType, &cf_str_EAP_SECURID_identity_literal);
-	err = aDatabase.Execute(sqlStatement);
-	if (err != KErrNone && err != KErrAlreadyExists)
+	_LIT(KSQLCreateTable1, "CREATE TABLE %S \
+		(%S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S VARCHAR(255))");
+
+	sqlStatement.Format(KSQLCreateTable1,
+		&KSecurIDTableName,
+		&KServiceType,
+		&KServiceIndex,
+		&KTunnelingTypeVendorId,
+		&KTunnelingType,
+		&cf_str_EAP_SECURID_identity_literal);
+
+	error = aDatabase.Execute(sqlStatement);
+	if (error != KErrNone && error != KErrAlreadyExists)
 	{
-		User::Leave(err);
+		User::Leave(error);
 	}
 
 	// 4. Check if database table contains a row for this service type and id  
 	
-	_LIT(KSQLQueryRow, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLQueryRow, &cf_str_EAP_SECURID_identity_literal, &KSecurIDTableName, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+	_LIT(KSQLQueryRow, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+
+	sqlStatement.Format(KSQLQueryRow,
+		&cf_str_EAP_SECURID_identity_literal,
+		&KSecurIDTableName, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());
+
 	RDbView view;
 	User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement), TDbWindow::EUnlimited));
 	// View must be closed when no longer needed
@@ -146,7 +143,7 @@
 	User::LeaveIfError(view.EvaluateAll());
 	// 5. If row is not found then add it
 	TInt rows = view.CountL();
-	CleanupStack::PopAndDestroy(); // view
+	CleanupStack::PopAndDestroy(&view);
 	if (rows == 0)
 	{
 		_LIT(KSQLInsert, "SELECT * FROM %S");
@@ -162,7 +159,8 @@
 		view.InsertL();
 		view.SetColL(colSet->ColNo(KServiceType), static_cast<TInt> (aIndexType));
 		view.SetColL(colSet->ColNo(KServiceIndex), aIndex);
-		view.SetColL(colSet->ColNo(KTunnelingType), aTunnelingVendorType);
+		view.SetColL(colSet->ColNo(KTunnelingTypeVendorId), aTunnelingType.get_vendor_id());
+		view.SetColL(colSet->ColNo(KTunnelingType), aTunnelingType.get_vendor_type());
 		view.SetColL(colSet->ColNo(cf_str_EAP_SECURID_identity_literal), default_EAP_SECURID_identity);
 		view.PutL();
 		
@@ -171,9 +169,11 @@
 		CleanupStack::PopAndDestroy( &view ); // Close view.
 	} 
 	
-	CleanupStack::PopAndDestroy(); // sqlStatement
-	CleanupStack::Pop(2); // database, session
 	aDatabase.Compact();
+
+	CleanupStack::PopAndDestroy( buf );
+	CleanupStack::Pop( &aDatabase );	
+	CleanupStack::Pop( &aFileServerSession );
 }
 
 // End of File
--- a/eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/src/EapSecurIDProxy.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/securid/symbian/plugin/src/EapSecurIDProxy.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12 %
+* %version: 9.1.2 %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_symbian/am/type/sim/symbian/eap_am_type_sim_symbian.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/sim/symbian/eap_am_type_sim_symbian.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 13 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_symbian/am/type/symbian/plugin/common/EapTypeInfo.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/symbian/plugin/common/EapTypeInfo.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 7 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/am/type/symbian/plugin/include/EapPluginDbDefaults.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,71 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 6 %
+*/
+
+#if !defined(_EAPPLUGINDBDEFAULTS_H_)
+#define _EAPPLUGINDBDEFAULTS_H_
+
+enum TEapDbBoolean 
+{
+	EEapDbFalse,
+	EEapDbTrue,
+	EEapDbNotValid, // This indicates that the value is not configured.
+};
+
+// LOCAL CONSTANTS
+
+_LIT(KEapSecureUIDFormat, "SECURE[102072e9]"); // For the security policy.
+
+const TUint default_EAP_password_prompt = EEapDbTrue;
+
+_LIT(default_EAP_identity, "");
+_LIT(default_EAP_username, "");
+_LIT(default_EAP_realm, "");
+_LIT(default_EAP_password, "");
+
+_LIT(KNullPasswordData, "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00");
+
+const TInt64 default_MaxSessionTime = 0; // 0 means read from configuration file.
+const TInt64 default_FullAuthTime = 0;
+
+const TUint KMaxIdentityLengthInDB = 255;
+const TUint KMaxUsernameLengthInDB = 255;
+const TUint KMaxRealmLengthInDB    = 255;
+const TUint KMaxPasswordLengthInDB = 255;
+
+#if !defined(USE_EAP_FILECONFIG)
+	const TInt default_EAP_TRACE_disable_traces = 0;
+	const TInt default_EAP_TRACE_enable_function_traces = 0;
+	const TInt default_EAP_TRACE_only_trace_messages = 0;
+	const TInt default_EAP_TRACE_only_test_vectors = 0;
+	const TInt default_EAP_CORE_session_timeout = 120000; // ms = 120 seconds = 2 minutes.
+	const TInt default_EAP_ERROR_TEST_enable_random_errors = 0;
+	const TInt default_EAP_ERROR_TEST_send_original_packet_first = 0;
+	const TInt default_EAP_ERROR_TEST_generate_multiple_error_packets = 2;
+	const TInt default_EAP_ERROR_TEST_manipulate_ethernet_header = 0;
+	const TInt default_EAP_ERROR_TEST_error_probability = 8000000;
+	const TInt default_EAP_test_default_type = 18; // EAP-SIM
+	const TInt default_EAP_CORE_retransmission_counter = 0;
+#endif //#if !defined(USE_EAP_FILECONFIG)
+
+#endif // _EAPPLUGINDBDEFAULTS_H_
+
+
+// End of file
--- a/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/EapTlsPeapCertInterface.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/EapTlsPeapCertInterface.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 42 %
+* %version: 38.1.24 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -34,10 +34,13 @@
 #include <x509keys.h>
 #include <x509cert.h>
 #include "eap_tlv_message_data.h"
-#include "eap_am_trace_symbian.h"
+#include "EapTraceSymbian.h"
+#include "eap_automatic_variable.h"
 
-const TText8 KKeyStoreHandlePrefix[] = "EapTlsPeapKeyStoreHandler";
-const TText8 KKeyStoreHandleKey[] = "CEapTlsPeapCertInterface KeyStore handle";
+#if defined(USE_EAP_TLS_PEAP_UNIFIED_KEY_STORE_CACHE)
+	const TText8 KKeyStoreHandlePrefix[] = "EapTlsPeapKeyStoreHandler";
+	const TText8 KKeyStoreHandleKey[] = "CEapTlsPeapCertInterface KeyStore handle";
+#endif //#if defined(USE_EAP_TLS_PEAP_UNIFIED_KEY_STORE_CACHE)
 
 enum TAlgorithmAndSignedType
 {
@@ -61,6 +64,14 @@
 CEapTlsPeapCertInterface* CEapTlsPeapCertInterface::NewL(abs_eap_am_tools_c* const aTools, 
 											   eap_am_type_tls_peap_symbian_c* const aParent)
 {
+	EAP_TRACE_DEBUG(
+		aTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapTlsPeapCertInterface::NewL()\n")));
+
+	EAP_TRACE_RETURN_STRING(aTools, "returns: CEapTlsPeapCertInterface::NewL()");
+
+
 	CEapTlsPeapCertInterface* self = new(ELeave) CEapTlsPeapCertInterface(aTools, aParent);
 	CleanupStack::PushL(self);
 	self->ConstructL();
@@ -72,14 +83,22 @@
 
 CEapTlsPeapCertInterface::CEapTlsPeapCertInterface(abs_eap_am_tools_c* const aTools, eap_am_type_tls_peap_symbian_c* const aParent)
 : CActive(CActive::EPriorityStandard)
-,iParent(aParent)
-,m_am_tools(aTools)
-,iAllowedUserCerts(1)
-,iEncodedCertificate(0)
-,iCertPtr(0,0)
-,iMatchingUserCertInfos(1)
-,iCAIndex(0)
+, iParent(aParent)
+, m_am_tools(aTools)
+, iAllowedUserCerts(1)
+, iEncodedCertificate(0)
+, iCertPtr(0,0)
+, iMatchingUserCertInfos(1)
+, iCAIndex(0)
+, iUseAutomaticCaCertificate(EFalse)
 {
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapTlsPeapCertInterface::CEapTlsPeapCertInterface()\n")));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapTlsPeapCertInterface::CEapTlsPeapCertInterface()");
+
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 }
@@ -88,8 +107,13 @@
 
 void CEapTlsPeapCertInterface::ConstructL()
 {
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-	
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapTlsPeapCertInterface::ConstructL()\n")));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapTlsPeapCertInterface::ConstructL()");
+
 	User::LeaveIfError(iFs.Connect());
 	
 	CActiveScheduler::Add(this);		
@@ -106,19 +130,72 @@
 
 CEapTlsPeapCertInterface::~CEapTlsPeapCertInterface()
 {
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-	
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapTlsPeapCertInterface::~CEapTlsPeapCertInterface()\n")));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapTlsPeapCertInterface::~CEapTlsPeapCertInterface()");
+
+	if(IsActive())
+	{
+		Cancel();		
+	}
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapTlsPeapCertInterface::~CEapTlsPeapCertInterface(): iMatchingUserCerts.ResetAndDestroy()\n")));
+
 	iMatchingUserCerts.ResetAndDestroy();
 
-	iMatchingUserCertInfos.Reset();
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapTlsPeapCertInterface::~CEapTlsPeapCertInterface(): iMatchingUserCertInfos.ResetAndDestroy()\n")));
+
+	iMatchingUserCertInfos.ResetAndDestroy();
 	
-	iAllowedUserCerts.Reset();
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapTlsPeapCertInterface::~CEapTlsPeapCertInterface(): iAllowedUserCerts.ResetAndDestroy()\n")));
+
+	iAllowedUserCerts.ResetAndDestroy();
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapTlsPeapCertInterface::~CEapTlsPeapCertInterface(): iAllowedCACerts.ResetAndDestroy()\n")));
+
+	iAllowedCACerts.ResetAndDestroy();
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapTlsPeapCertInterface::~CEapTlsPeapCertInterface(): iRootCerts.ResetAndDestroy()\n")));
 
 	iRootCerts.ResetAndDestroy();
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapTlsPeapCertInterface::~CEapTlsPeapCertInterface(): iUserCertChain.ResetAndDestroy()\n")));
+
 	iUserCertChain.ResetAndDestroy();
 	
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapTlsPeapCertInterface::~CEapTlsPeapCertInterface(): iCertAuthorities.ResetAndDestroy()\n")));
+
 	iCertAuthorities.ResetAndDestroy();
 	
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapTlsPeapCertInterface::~CEapTlsPeapCertInterface(): iCertInfos.Reset()\n")));
+
 	TInt i(0);
 	for (i = 0; i < iCertInfos.Count(); i++)
 	{
@@ -126,12 +203,22 @@
 	}
 	iCertInfos.Reset();
 
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapTlsPeapCertInterface::~CEapTlsPeapCertInterface(): iKeyInfos.Reset()\n")));
+
 	for (i = 0; i < iKeyInfos.Count(); i++)
 	{
 		iKeyInfos[i]->Release();
 	}
 	iKeyInfos.Reset();
 
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapTlsPeapCertInterface::~CEapTlsPeapCertInterface(): delete rest\n")));
+
 	delete iCertFilter;
 	delete iCertStore;
 	delete iCertChain;
@@ -143,9 +230,18 @@
 	delete iSignature;
 	delete iPtrOut;
 	delete iSignaturePtr;
+	delete iRSASignature;
+	delete iDSASignature;
+	delete iKeyFilter;
+
+#if !defined(USE_EAP_TLS_PEAP_UNIFIED_KEY_STORE_CACHE)
+
+	delete iKeyStore;
+
+#endif //#if !defined(USE_EAP_TLS_PEAP_UNIFIED_KEY_STORE_CACHE)
 	
-	iFs.Close();	
-	
+	iFs.Close();
+
 	EAP_TRACE_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
@@ -157,7 +253,7 @@
 //--------------------------------------------------
 
 void CEapTlsPeapCertInterface::GetMatchingCertificatesL(
-	const RArray<SCertEntry>& aAllowedUserCerts,
+	const RPointerArray<EapCertificateEntry>& aAllowedUserCerts,
 	const TBool aUseCertAuthoritiesFilter,
 	EAP_TEMPLATE_CONST eap_array_c<eap_variable_data_c> * const aCertAuthorities,
 	const TBool aUseCertTypesFilter,
@@ -165,54 +261,61 @@
 	const TBool aUseAllowedCipherSuitesFilter,
 	const RArray<TUint>& aAllowedCipherSuites)
 {
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-	
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapTlsPeapCertInterface::GetMatchingCertificatesL(): Total allowed user certs=%d, aAllowedUserCerts=0x%08x, iAllowedUserCerts=0x%08x, aCertAuthorities=0x%08x, aCertTypes=0x%08x, aAllowedCipherSuites=0x%08x\n"),
+		aAllowedUserCerts.Count(),
+		&aAllowedUserCerts,
+		&iAllowedUserCerts,
+		aCertAuthorities,
+		aCertTypes,
+		&aAllowedCipherSuites));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapTlsPeapCertInterface::GetMatchingCertificatesL()");
+
 	iUseCertAuthoritiesFilter = aUseCertAuthoritiesFilter;
 	
 	iUseCertTypesFilter = aUseCertTypesFilter;
 	
 	iUseAllowedCipherSuitesFilter = aUseAllowedCipherSuitesFilter;
 
-	iAllowedUserCerts.Reset();
-	
 	EAP_TRACE_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
-		(EAPL("CEapTlsPeapCertInterface::GetMatchingCertificatesL: Total allowed user certs=%d\n"),
-		aAllowedUserCerts.Count()));		
+		(EAPL("CEapTlsPeapCertInterface::GetMatchingCertificatesL(): iAllowedUserCerts.Count()=%d\n"),
+		iAllowedUserCerts.Count()));
+
+	iAllowedUserCerts.ResetAndDestroy();
 	
 	EAP_TRACE_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
-		(EAPL("CEapTlsPeapCertInterface::GetMatchingCertificatesL:UseCertAuthoritiesFilter=%d, UseCertTypesFilter=%d, UseAllowedCipherSuitesFilter=%d\n"),
-		iUseCertAuthoritiesFilter,iUseCertTypesFilter,iUseAllowedCipherSuitesFilter));		
+		(EAPL("CEapTlsPeapCertInterface::GetMatchingCertificatesL(): UseCertAuthoritiesFilter=%d, UseCertTypesFilter=%d, UseAllowedCipherSuitesFilter=%d\n"),
+		iUseCertAuthoritiesFilter,
+		iUseCertTypesFilter,
+		iUseAllowedCipherSuitesFilter));		
 	
 	for (TInt j = 0; j < aAllowedUserCerts.Count(); j++)
 	{
-		iAllowedUserCerts.AppendL(aAllowedUserCerts[j]);
-		
-#if defined(_DEBUG) || defined(DEBUG)
+		EapCertificateEntry * const copy_cert = aAllowedUserCerts[j]->Copy();
+		if (copy_cert == 0)
+		{
+			User::Leave(KErrNoMemory);
+		}
 
-		// This is just for the debug prints.
-		TCertLabel tempLabel = iAllowedUserCerts[j].iLabel;
-		TKeyIdentifier tempSubjectKeyId = iAllowedUserCerts[j].iSubjectKeyId;
-		
-		EAP_TRACE_DEBUG(
-			m_am_tools,
-			TRACE_FLAGS_DEFAULT,
-			(EAPL("CEapTlsPeapCertInterface::GetMatchingCertificatesL: details of allowed user certs,Label=%S\n"),
-		&tempLabel));		
-		
-		EAP_TRACE_DATA_DEBUG_SYMBIAN( ( "GetMatchingCertificatesL : Subject Key Id:",
-		tempSubjectKeyId.Ptr(), tempSubjectKeyId.Size() ) );			
-#endif
+		iAllowedUserCerts.AppendL(copy_cert);
+
+		EAP_TRACE_SETTINGS(copy_cert);
 	}
 
 	if (iCertAuthorities.Count() > 0)
 	{
 		iCertAuthorities.ResetAndDestroy();
 	}
-	if (aUseCertAuthoritiesFilter)
+
+	if (aUseCertAuthoritiesFilter
+		&& aCertAuthorities)
 	{
 		for (TUint i = 0; i < aCertAuthorities->get_object_count(); i++)
 		{
@@ -223,8 +326,8 @@
 
 			// Try to form distiguished name
 			CX500DistinguishedName* tmp = 0;
-			TRAPD(err, tmp = CX500DistinguishedName::NewL(ptr));
-			if (err == KErrNone)
+			TRAPD(error, tmp = CX500DistinguishedName::NewL(ptr));
+			if (error == KErrNone)
 			{
 				CleanupStack::PushL(tmp);
 				// Distinguished name was found -> add it to array.
@@ -262,7 +365,7 @@
 	
 	if (iCertStore == 0)
 	{
-		iCertStore = CUnifiedCertStore::NewL(iFs, false);
+		iCertStore = CUnifiedCertStore::NewL(iFs, EFalse);
 		iCertStore->Initialize(iStatus);		
 	}
 	else
@@ -277,16 +380,22 @@
 
 //--------------------------------------------------
 
-void CEapTlsPeapCertInterface::ReadCertificateL(SCertEntry& aCertInfo, const TBool aRetrieveChain)
+void CEapTlsPeapCertInterface::ReadCertificateL(EapCertificateEntry& aCertInfo, const TBool aRetrieveChain)
 {	
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapTlsPeapCertInterface::ReadCertificateL()\n")));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapTlsPeapCertInterface::ReadCertificateL()");
+
 	iCertInfo = aCertInfo;
 	iRetrieveChain = aRetrieveChain;
 	iState = EReadCertInitStore;
 	
 	if (iCertStore == 0)
 	{
-		iCertStore = CUnifiedCertStore::NewL(iFs, false);
+		iCertStore = CUnifiedCertStore::NewL(iFs, EFalse);
 		iCertStore->Initialize(iStatus);		
 	}
 	else
@@ -300,17 +409,21 @@
 
 //--------------------------------------------------
 
-void CEapTlsPeapCertInterface::ReadCACertificateL(SCertEntry& aCertInfo)
+void CEapTlsPeapCertInterface::ReadCACertificateL(EapCertificateEntry& aCertInfo)
 {	
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-	EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("CEapTlsPeapCertInterface::ReadCACertificateL.\n")));
-	
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapTlsPeapCertInterface::ReadCACertificateL()\n")));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapTlsPeapCertInterface::ReadCACertificateL()");
+
 	iCertInfo = aCertInfo;
 	iState = EReadCACertInitStore;
 	
 	if (iCertStore == 0)
 	{
-		iCertStore = CUnifiedCertStore::NewL(iFs, false);
+		iCertStore = CUnifiedCertStore::NewL(iFs, EFalse);
 		iCertStore->Initialize(iStatus);		
 	}
 	else
@@ -325,19 +438,48 @@
 
 //--------------------------------------------------
 
-void CEapTlsPeapCertInterface::ValidateChainL(TDesC8& aCertChain, RArray<SCertEntry>& aAllowedCACerts)
-{	
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);	
+void CEapTlsPeapCertInterface::ValidateChainL(
+	TDesC8& aCertChain,
+	RPointerArray<EapCertificateEntry>& aAllowedCACerts,
+	const TBool aUseAutomaticCaCertificate)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapTlsPeapCertInterface::ValidateChainL(): aUseAutomaticCaCertificate=%d\n"),
+		aUseAutomaticCaCertificate));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapTlsPeapCertInterface::ValidateChainL()");
+
+	iUseAutomaticCaCertificate = aUseAutomaticCaCertificate;
 	iCAIndex = 0;
-	iAllowedCACerts = aAllowedCACerts;
+	iAllowedCACerts.ResetAndDestroy();
+
+	if (!iUseAutomaticCaCertificate)
+	{
+		for (TInt j = 0; j < aAllowedCACerts.Count(); j++)
+		{
+			EapCertificateEntry * const copy_cert = aAllowedCACerts[j]->Copy();
+			if (copy_cert == 0)
+			{
+				User::Leave(KErrNoMemory);
+			}
+
+			iAllowedCACerts.AppendL(copy_cert);
+
+			EAP_TRACE_SETTINGS(copy_cert);
+		}
+	}
+
 	delete iInputCertChain;
 
 	iInputCertChain = 0;
 	iInputCertChain = aCertChain.AllocL();
 	iState = EValidateChainInitStore;
+
 	if (iCertStore == 0)
 	{
-		iCertStore = CUnifiedCertStore::NewL(iFs, false);
+		iCertStore = CUnifiedCertStore::NewL(iFs, EFalse);
 		iCertStore->Initialize(iStatus);		
 	}
 	else
@@ -345,7 +487,9 @@
 		TRequestStatus* status = &iStatus;
 		User::RequestComplete(status, KErrNone);		
 	}
+
 	SetActive();
+
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 }
 
@@ -353,13 +497,13 @@
 
 void CEapTlsPeapCertInterface::DoCancel()
 {
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
-
 	EAP_TRACE_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
 		(EAPL("CEapTlsPeapCertInterface::DoCancel()\n")));
 
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapTlsPeapCertInterface::DoCancel()");
+
 	if (iCertStore != 0 && iCertStore->IsActive())
 	{
 		EAP_TRACE_DEBUG(
@@ -457,15 +601,23 @@
 //--------------------------------------------------
 	
 void CEapTlsPeapCertInterface::SignL(
-	TKeyIdentifier& aKeyId,
+	const TKeyIdentifier& aKeyId,
 	const TDesC8& aHashIn,
 	const TUint aSignatureLength)
 {
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);	
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapTlsPeapCertInterface::SignL()\n")));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapTlsPeapCertInterface::SignL()");
+
 	iKeyIdentifier = aKeyId;
 	if (aHashIn.Size() > KMaxHashLength)
 	{
-		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: Illegal hash size to SignL.\n")));
+		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: Illegal hash size %d to SignL(), shoudbe <= %d.\n"),
+			aHashIn.Size(),
+			KMaxHashLength));
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 		User::Leave(KErrGeneral);		
 	}
@@ -493,6 +645,9 @@
 	
 	if (iKeyStore == 0)
 	{
+
+#if defined(USE_EAP_TLS_PEAP_UNIFIED_KEY_STORE_CACHE)
+
 		// Try to get the keystore class pointer from memory store
 		eap_variable_data_c key(m_am_tools);
 		eap_status_e status = key.set_copy_of_buffer(KKeyStoreHandlePrefix, sizeof(KKeyStoreHandlePrefix));
@@ -511,12 +666,17 @@
 		eap_tlv_message_data_c tlv_data(m_am_tools);
 		
 		status = m_am_tools->memory_store_get_data(&key, &tlv_data);
+
 		if (status != eap_status_ok)
 		{
+
+#endif //#if defined(USE_EAP_TLS_PEAP_UNIFIED_KEY_STORE_CACHE)
+
+
 			EAP_TRACE_DEBUG(
 				m_am_tools,
 				TRACE_FLAGS_DEFAULT,
-				(EAPL("EAP_type_TLSPEAP: cannot get previous keystore handle.\n")));
+				(EAPL("EAP_type_TLSPEAP: CEapTlsPeapCertInterface::SignL(): cannot get previous CUnifiedKeyStore handle.\n")));
 
 
 			// At this point we can set the passphrase timeout because it the passphrase 
@@ -527,6 +687,8 @@
 			iKeyStore = CUnifiedKeyStore::NewL(iFs);
 			iKeyStore->Initialize(iStatus);		
 			
+#if defined(USE_EAP_TLS_PEAP_UNIFIED_KEY_STORE_CACHE)
+
 			status = tlv_data.add_message_data(
 				eap_type_tlspeap_stored_keystore_handle,
 				sizeof(iKeyStore),
@@ -601,15 +763,24 @@
 				User::Leave(KErrGeneral);
 			}			
 		}
+
+#endif //#if defined(USE_EAP_TLS_PEAP_UNIFIED_KEY_STORE_CACHE)
+
 	}
 	else
 	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("EAP_type_TLSPEAP: CEapTlsPeapCertInterface::SignL(): uses previous CUnifiedKeyStore handle.\n")));
+
 		// Skip passphrase setting because it clears the passphrase cache
 		iState = ESetPassphraseTimeout;
 
 		TRequestStatus* status = &iStatus;
 		User::RequestComplete(status, KErrNone);
 	}		
+
 	SetActive();
 
 
@@ -620,10 +791,16 @@
 //--------------------------------------------------
 	
 void CEapTlsPeapCertInterface::DecryptL(
-	TKeyIdentifier& aKeyId,
+	const TKeyIdentifier& aKeyId,
 	const TDesC8& aDataIn)
 {
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);	
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapTlsPeapCertInterface::DecryptL()\n")));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapTlsPeapCertInterface::DecryptL()");
+
 	iKeyIdentifier = aKeyId;
 
 	delete iDataIn;
@@ -647,6 +824,9 @@
 	// Try to get the keystore handler class from memory store 
 	if (iKeyStore == 0)
 	{
+
+#if defined(USE_EAP_TLS_PEAP_UNIFIED_KEY_STORE_CACHE)
+
 		// Try to get the keystore class pointer from memory store
 		eap_variable_data_c key(m_am_tools);
 		eap_status_e status = key.set_copy_of_buffer(KKeyStoreHandlePrefix, sizeof(KKeyStoreHandlePrefix));
@@ -665,16 +845,22 @@
 		eap_tlv_message_data_c tlv_data(m_am_tools);
 		
 		status = m_am_tools->memory_store_get_data(&key, &tlv_data);
+
 		if (status != eap_status_ok)
 		{
+
+#endif //#if defined(USE_EAP_TLS_PEAP_UNIFIED_KEY_STORE_CACHE)
+
 			EAP_TRACE_DEBUG(
 				m_am_tools,
 				TRACE_FLAGS_DEFAULT,
-				(EAPL("EAP_type_TLSPEAP: cannot get previous keystore handle.\n")));
+				(EAPL("EAP_type_TLSPEAP: CEapTlsPeapCertInterface::DecryptL(): cannot get previous CUnifiedKeyStore handle.\n")));
 
 			iKeyStore = CUnifiedKeyStore::NewL(iFs);
 			iKeyStore->Initialize(iStatus);		
 			
+#if defined(USE_EAP_TLS_PEAP_UNIFIED_KEY_STORE_CACHE)
+
 			status = tlv_data.add_message_data(
 				eap_type_tlspeap_stored_keystore_handle,
 				sizeof(iKeyStore),
@@ -700,7 +886,7 @@
 			EAP_TRACE_DEBUG(
 				m_am_tools,
 				TRACE_FLAGS_DEFAULT,
-				(EAPL("EAP_type_TLSPEAP: Found previous keystore handle.\n")));
+				(EAPL("EAP_type_TLSPEAP: CEapTlsPeapCertInterface::DecryptL(): Found previous keystore handle.\n")));
 
 			// Parse read data.
 			eap_array_c<eap_tlv_header_c> tlv_blocks(m_am_tools);
@@ -743,14 +929,23 @@
 				User::Leave(KErrGeneral);
 			}
 		}
+
+#endif //#if defined(USE_EAP_TLS_PEAP_UNIFIED_KEY_STORE_CACHE)
+
 	}
 	else
 	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("EAP_type_TLSPEAP: CEapTlsPeapCertInterface::DecryptL(): uses previous CUnifiedKeyStore handle.\n")));
+
 		TRequestStatus* status = &iStatus;
 		User::RequestComplete(status, KErrNone);
 	}		
 
-	SetActive();	
+	SetActive();
+
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 }
 
@@ -758,49 +953,51 @@
 
 void CEapTlsPeapCertInterface::RunL()
 {
-	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);		
-	
-	EAP_TRACE_DEBUG_SYMBIAN(
-	(_L("CEapTlsPeapCertInterface::RunL(): TEMP iStatus=%d, iState=%d"),
-	iStatus.Int(), iState));
-					
 	EAP_TRACE_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
-		(EAPL("CEapTlsPeapCertInterface::RunL(): iStatus %d\n"),
-		iStatus.Int()));
+		(EAPL("CEapTlsPeapCertInterface::RunL(): TEMP iStatus=%d, iState=%d\n"),
+		iStatus.Int(),
+		iState));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapTlsPeapCertInterface::RunL()");
 
 	if (!(iStatus.Int() == KErrNone))
 	{		
 		EAP_TRACE_ERROR(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
-			(EAPL("ERROR: EAP-TLS certificate interface failed: %d.\n"),
+			(EAPL("ERROR: EAP-TLS certificate interface failed: error=%d.\n"),
 			iStatus.Int()));
 		iParent->SendErrorNotification(eap_status_user_cancel_authentication);
 		
 		if(iState == ESignOpenKeyStore)
 		{
 			// User probably cancelled the keystore password query.
-			
-			EAP_TRACE_DEBUG_SYMBIAN(
-			(_L("CEapTlsPeapCertInterface::RunL(): ESignOpenKeyStore Failed")));
-			
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("CEapTlsPeapCertInterface::RunL(): ESignOpenKeyStore Failed\n")));
+
 			if(iRSASigner != NULL)
 			{
 				iRSASigner->Release();
 				
-				EAP_TRACE_DEBUG_SYMBIAN(
-				(_L("CEapTlsPeapCertInterface::RunL(): iRSASigner->Release() OK")));
-				
+				EAP_TRACE_DEBUG(
+					m_am_tools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("CEapTlsPeapCertInterface::RunL(): iRSASigner->Release() OK\n")));
 			}
 			
 			if(iDSASigner != NULL)
 			{
 				iDSASigner->Release(); 
 				
-				EAP_TRACE_DEBUG_SYMBIAN(
-				(_L("CEapTlsPeapCertInterface::RunL(): iDSASigner->Release() OK")));							
+				EAP_TRACE_DEBUG(
+					m_am_tools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("CEapTlsPeapCertInterface::RunL(): iDSASigner->Release() OK\n")));
 			}		
 		}
 		
@@ -827,12 +1024,12 @@
 			}
 			iCertInfos.Reset();			
 			
-			TRAPD(err, iCertFilter = CCertAttributeFilter::NewL());
-			if (err != KErrNone)
+			TRAPD(error, iCertFilter = CCertAttributeFilter::NewL());
+			if (error != KErrNone)
 			{ 
 				EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: Out of memory in EAP-TLS.\n")));
 				
-				CArrayFixFlat<SCertEntry> tmp(sizeof(SCertEntry));
+				RPointerArray<EapCertificateEntry> tmp(sizeof(EapCertificateEntry));
 
 				m_am_tools->enter_global_mutex();
 				
@@ -863,7 +1060,7 @@
 				(EAPL("CEapTlsPeapCertInterface::RunL(): EGetMatchingCertsInitialize, Total Certs: iCertInfos.Count()=%d\n"),
 				iCertInfos.Count()));
 
-			iMatchingUserCertInfos.Reset();
+			iMatchingUserCertInfos.ResetAndDestroy();
 
 			// Remove non-allowed
 			TInt i(0);
@@ -872,10 +1069,10 @@
 			{
 				for (j = 0; j < iAllowedUserCerts.Count(); j++)
 				{				
-					if ( (iCertInfos[i]->Label().Compare(iAllowedUserCerts[j].iLabel) == 0
+					if ( (iCertInfos[i]->Label().Compare(*(iAllowedUserCerts[j]->GetLabel())) == 0
 						 || iCertInfos[i]->Label().Length() == 0
-						 || iAllowedUserCerts[j].iLabel.Length() == 0)
-						&& iCertInfos[i]->SubjectKeyId() == iAllowedUserCerts[j].iSubjectKeyId)
+						 || iAllowedUserCerts[j]->GetLabel()->Length() == 0)
+						&& iCertInfos[i]->SubjectKeyId() == iAllowedUserCerts[j]->GetSubjectKeyId())
 					{
 
 						EAP_TRACE_DEBUG(
@@ -883,14 +1080,19 @@
 							TRACE_FLAGS_DEFAULT,
 							(EAPL("RunL(): EGetMatchingCertsInitialize, Found a Matching USER cert\n")));
 
-						EAP_TRACE_DEBUG(
+						EAP_TRACE_DATA_DEBUG(
 							m_am_tools,
 							TRACE_FLAGS_DEFAULT,
-							(EAPL("RunL(): EGetMatchingCertsInitialize,Label of matching cert=%S\n"),
-							&(iCertInfos[i]->Label())));		
-						
-						EAP_TRACE_DATA_DEBUG_SYMBIAN(("RunL(): EGetMatchingCertsInitialize,SubjectkeyID of matching cert",
-						iCertInfos[i]->SubjectKeyId().Ptr(), iCertInfos[i]->SubjectKeyId().Size()));			
+							(EAPL("RunL(): EGetMatchingCertsInitialize, Label of matching cert"),
+							iCertInfos[i]->Label().Ptr(),
+							iCertInfos[i]->Label().Size()));
+
+						EAP_TRACE_DATA_DEBUG(
+							m_am_tools,
+							TRACE_FLAGS_DEFAULT,
+							(EAPL("RunL(): EGetMatchingCertsInitialize, SubjectkeyID of matching cert"),
+							iCertInfos[i]->SubjectKeyId().Ptr(),
+							iCertInfos[i]->SubjectKeyId().Size()));
 
 						break;
 					}
@@ -901,7 +1103,8 @@
 					iCertInfos.Remove(i);
 					i--;
 				}
-			}	
+			}
+
 			if (iCertInfos.Count() == 0)
 			{
 				EAP_TRACE_DEBUG(
@@ -911,10 +1114,10 @@
 			
 				// No matching certs
 				
-				CArrayFixFlat<SCertEntry>* tmp = NULL;
+				RPointerArray<EapCertificateEntry>* tmp = NULL;
 				
-				TRAPD(err, tmp = new (ELeave) CArrayFixFlat<SCertEntry>(1) );
-				if (tmp == 0 || err != KErrNone)
+				tmp = new (ELeave) RPointerArray<EapCertificateEntry>(1);
+				if (tmp == 0)
 				{
 					// Timeout handles error situation
 					EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: Out of memory in EAP-TLS.\n")));					
@@ -939,29 +1142,29 @@
 
 			iEncodedCertificate->Des().SetLength(0);
 			
-			TRAPD(err, iEncodedCertificate = iEncodedCertificate->ReAllocL(iCertInfos[iUserCertIndex]->Size()));
-			if (err != KErrNone)
+			TRAPD(error, iEncodedCertificate = iEncodedCertificate->ReAllocL(iCertInfos[iUserCertIndex]->Size()));
+			if (error != KErrNone)
 			{
 				EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: Out of memory in EAP-TLS.\n")));
-				
-				CArrayFixFlat<SCertEntry> tmp(sizeof(SCertEntry));
-											
+
+				RPointerArray<EapCertificateEntry> tmp(sizeof(EapCertificateEntry));
+
 				m_am_tools->enter_global_mutex();
-				
+
 				iParent->complete_get_matching_certificates(tmp, eap_status_allocation_error); //Failure
-				
+
 				m_am_tools->leave_global_mutex();
 
 				break;
 			}
-			
+
 			iCertPtr.Set(iEncodedCertificate->Des());
 
 			iCertStore->Retrieve(
 				*(iCertInfos[iUserCertIndex]), 
 				iCertPtr,
 				iStatus);
-			
+
 			SetActive();						
 		}		
 		break;
@@ -974,12 +1177,12 @@
 				(EAPL("CEapTlsPeapCertInterface::RunL(): EGetMatchingCertsLoop\n")));
 
 			CX509Certificate* cert = 0;
-			TRAPD(err, cert = CX509Certificate::NewL(iEncodedCertificate->Des()));
-			if (err != KErrNone || cert == 0)
+			TRAPD(error, cert = CX509Certificate::NewL(iEncodedCertificate->Des()));
+			if (error != KErrNone || cert == 0)
 			{
 				EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: Out of memory in EAP-TLS.\n")));
 				
-				CArrayFixFlat<SCertEntry> tmp(sizeof(SCertEntry));
+				RPointerArray<EapCertificateEntry> tmp(sizeof(EapCertificateEntry));
 											
 				m_am_tools->enter_global_mutex();
 				
@@ -995,7 +1198,7 @@
 				delete cert;
 				EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: Out of memory in EAP-TLS.\n")));
 				
-				CArrayFixFlat<SCertEntry> tmp(sizeof(SCertEntry));
+				RPointerArray<EapCertificateEntry> tmp(sizeof(EapCertificateEntry));
 
 				m_am_tools->enter_global_mutex();
 				
@@ -1009,17 +1212,36 @@
 			// No need to validate iCertInfos here as the execution doesn't come to this case if iCertInfos
 			// is empty, check is done in the above case.
 						
-			SCertEntry entry;
-			entry.iLabel.Copy(iCertInfos[iUserCertIndex]->Label());
-			entry.iSubjectKeyId = iCertInfos[iUserCertIndex]->SubjectKeyId();
+			EapCertificateEntry * entry = new EapCertificateEntry;
+			entry = new (ELeave) EapCertificateEntry;
+			if (entry == 0 || error != KErrNone)
+			{
+				// Timeout handles error situation
+				EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: Out of memory in EAP-TLS.\n")));					
+
+				RPointerArray<EapCertificateEntry> tmp(sizeof(EapCertificateEntry));
+
+				m_am_tools->enter_global_mutex();
+				
+				iParent->complete_get_matching_certificates(tmp, eap_status_allocation_error); //Failure
+				
+				m_am_tools->leave_global_mutex();
+
+				delete entry;
+
+				break;
+			}
+
+			entry->SetLabel(iCertInfos[iUserCertIndex]->Label());
+			entry->SetSubjectKeyId(iCertInfos[iUserCertIndex]->SubjectKeyId());
 			
-			TRAP(err, iMatchingUserCertInfos.AppendL(entry));
-			if (err != KErrNone)
+			TRAP(error, iMatchingUserCertInfos.AppendL(entry));
+			if (error != KErrNone)
 			{
 				EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: Out of memory in EAP-TLS.\n")));
 				
-				CArrayFixFlat<SCertEntry> tmp(sizeof(SCertEntry));
-				
+				RPointerArray<EapCertificateEntry> tmp(sizeof(EapCertificateEntry));
+
 				m_am_tools->enter_global_mutex();
 				
 				iParent->complete_get_matching_certificates(tmp, eap_status_allocation_error); //Failure
@@ -1052,13 +1274,15 @@
 								// Matches
 								break;
 							}
-						}
+						} // for()
+
 						if (j == iCertAuthorities.Count())
 						{						
 							// No match. Remove
 							delete iMatchingUserCerts[i];
 							iMatchingUserCerts.Remove(i);
-							iMatchingUserCertInfos.Delete(i);
+							delete iMatchingUserCertInfos[i];
+							iMatchingUserCertInfos.Remove(i);
 							i--;
 							
 							EAP_TRACE_DEBUG(
@@ -1069,7 +1293,8 @@
 					}
 				}
 				// Check Certificate types
-				if (iUseCertTypesFilter)
+				if (iUseCertTypesFilter
+					&& iCertTypes != 0)
 				{
 					for (i = 0; i < (TInt) iMatchingUserCerts.Count(); i++)
 					{
@@ -1081,27 +1306,33 @@
 						for (j = 0; j < iCertTypes->get_object_count(); j++)
 						{
 							u8_t* val = iCertTypes->get_object(j);
-							if (algorithm == ERSA 
-								&& (*val == ERSASign
-								|| *val == ERSASignWithFixedDH 
-								|| *val == ERSASignWithEphemeralDH))
+
+							if (val != 0)
 							{
-								break;				
+								if (algorithm == ERSA 
+									&& (*val == ERSASign
+									|| *val == ERSASignWithFixedDH 
+									|| *val == ERSASignWithEphemeralDH))
+								{
+									break;				
+								}
+								else if (algorithm == EDSA 
+									&& (*val == EDSASign
+									|| *val == EDSASignWithFixedDH 
+									|| *val == EDSASignWithEphemeralDH))
+								{
+									break;				
+								}
 							}
-							if (algorithm == EDSA 
-								&& (*val == EDSASign
-								|| *val == EDSASignWithFixedDH 
-								|| *val == EDSASignWithEphemeralDH))
-							{
-								break;				
-							}
-						}
+						} // for()
+
 						if (j == iCertTypes->get_object_count())
 						{
 							// No match. Remove
 							delete iMatchingUserCerts[i];
 							iMatchingUserCerts.Remove(i);
-							iMatchingUserCertInfos.Delete(i);
+							delete iMatchingUserCertInfos[i];
+							iMatchingUserCertInfos.Remove(i);
 							i--;
 							
 							EAP_TRACE_DEBUG(
@@ -1113,6 +1344,7 @@
 
 					}
 				}
+
 				// Check cipher suites
 				if (iUseAllowedCipherSuitesFilter)
 				{
@@ -1132,7 +1364,8 @@
 							// No match. Remove
 							delete iMatchingUserCerts[i];
 							iMatchingUserCerts.Remove(i);
-							iMatchingUserCertInfos.Delete(i);
+							delete iMatchingUserCertInfos[i];
+							iMatchingUserCertInfos.Remove(i);
 							i--;
 							
 							EAP_TRACE_DEBUG(
@@ -1157,12 +1390,12 @@
 
 				iEncodedCertificate->Des().SetLength(0);
 
-				TRAPD(err, iEncodedCertificate = iEncodedCertificate->ReAllocL(iCertInfos[iUserCertIndex]->Size()));
-				if (err != KErrNone)
+				TRAPD(error, iEncodedCertificate = iEncodedCertificate->ReAllocL(iCertInfos[iUserCertIndex]->Size()));
+				if (error != KErrNone)
 				{
 					EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: Out of memory in EAP-TLS.\n")));
 				
-					CArrayFixFlat<SCertEntry> tmp(sizeof(SCertEntry));
+					RPointerArray<EapCertificateEntry> tmp(sizeof(EapCertificateEntry));
 
 					m_am_tools->enter_global_mutex();
 					
@@ -1202,8 +1435,8 @@
 			}
 			iCertInfos.Reset();			
 			
-			TRAPD(err, iCertFilter = CCertAttributeFilter::NewL());
-			if (err != KErrNone || iCertFilter == 0)
+			TRAPD(error, iCertFilter = CCertAttributeFilter::NewL());
+			if (error != KErrNone || iCertFilter == 0)
 			{ 
 				EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: Out of memory in EAP-TLS.\n")));
 				
@@ -1220,10 +1453,13 @@
 			
 			iCertFilter->SetFormat(EX509Certificate);
 			iCertFilter->SetOwnerType(EUserCertificate);
-			iCertFilter->SetSubjectKeyId(iCertInfo.iSubjectKeyId);
-			if (iCertInfo.iLabel.Size()>0)
-				iCertFilter->SetLabel(iCertInfo.iLabel); // We can not use Label in the filter as certificates saved
+			iCertFilter->SetSubjectKeyId(iCertInfo.GetSubjectKeyId());
+
+			if (iCertInfo.GetLabel()->Size() > 0)
+			{
+				iCertFilter->SetLabel(*(iCertInfo.GetLabel())); // We can not use Label in the filter as certificates saved
 													   // by using SetConfigurationL (OMA DM etc uses it) will not have Label.
+			}
 
 			iState = EReadCertList;
 			iCertStore->List(
@@ -1266,8 +1502,8 @@
 			
 			iEncodedCertificate->Des().SetLength(0);
 
-			TRAPD(err, iEncodedCertificate = iEncodedCertificate->ReAllocL(info->Size()));
-			if (err != KErrNone)
+			TRAPD(error, iEncodedCertificate = iEncodedCertificate->ReAllocL(info->Size()));
+			if (error != KErrNone)
 			{
 				EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: Out of memory in EAP-TLS.\n")));			
 				
@@ -1300,8 +1536,8 @@
 				(EAPL("CEapTlsPeapCertInterface::RunL(): EReadCert\n")));
 
 			CX509Certificate* cert = 0;
-			TRAPD(err, cert = CX509Certificate::NewL(iEncodedCertificate->Des()));
-			if (err != KErrNone)
+			TRAPD(error, cert = CX509Certificate::NewL(iEncodedCertificate->Des()));
+			if (error != KErrNone)
 			{
 				EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: Out of memory in EAP-TLS.\n")));			
 				
@@ -1344,7 +1580,7 @@
 				iState = ERetrieveChainInitStore;
 				if (iCertStore == 0)
 				{
-					iCertStore = CUnifiedCertStore::NewL(iFs, false);
+					iCertStore = CUnifiedCertStore::NewL(iFs, EFalse);
 					iCertStore->Initialize(iStatus);		
 				}
 				else
@@ -1378,8 +1614,8 @@
 			}
 			iCertInfos.Reset();			
 			
-			TRAPD(err, iCertFilter = CCertAttributeFilter::NewL());
-			if (err != KErrNone)
+			TRAPD(error, iCertFilter = CCertAttributeFilter::NewL());
+			if (error != KErrNone)
 			{ 
 				EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: Out of memory in EAP-TLS.\n")));
 				
@@ -1452,8 +1688,8 @@
 			iState = ECreateCertChain;
 			
 			iEncodedCertificate->Des().SetLength(0);
-			TRAPD(err, iEncodedCertificate = iEncodedCertificate->ReAllocL(info->Size()));
-			if (err != KErrNone)
+			TRAPD(error, iEncodedCertificate = iEncodedCertificate->ReAllocL(info->Size()));
+			if (error != KErrNone)
 			{
 				EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: Out of memory in EAP-TLS.\n")));			
 				
@@ -1487,8 +1723,8 @@
 				(EAPL("CEapTlsPeapCertInterface::RunL(): ECreateCertChain\n")));
 
 			CX509Certificate* cert = 0;
-			TRAPD(err, cert = CX509Certificate::NewL(iEncodedCertificate->Des()));
-			if (err != KErrNone || cert == 0)
+			TRAPD(error, cert = CX509Certificate::NewL(iEncodedCertificate->Des()));
+			if (error != KErrNone || cert == 0)
 			{
 				EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: Out of memory in EAP-TLS.\n")));			
 				
@@ -1505,24 +1741,33 @@
 			
 #if defined(_DEBUG) || defined(DEBUG)
 				
+			{
 				// No need to validate iCertInfos in here as it is done in case: EGetAllCerts
 				CCTCertInfo* tempInfo;
 				tempInfo = iCertInfos[iCAIndex];
 
 				// These are for the trace debug.
 				TCertLabel label = tempInfo->Label();				
-				TKeyIdentifier KeyIdentifier = tempInfo->SubjectKeyId();
+				TKeyIdentifier SubjectKeyId = tempInfo->SubjectKeyId();
 				TKeyIdentifier IssuerId = tempInfo->IssuerKeyId();
 				TCertificateFormat format = tempInfo->CertificateFormat();
 				TCertificateOwnerType ownerType = tempInfo->CertificateOwnerType();			
 				
-				EAP_TRACE_DEBUG_SYMBIAN((_L("\n CEapTlsPeapCertInterface::RunL() : About to retrieve Cert with details, Label = %S"), &label));
-				EAP_TRACE_DEBUG_SYMBIAN((_L("Other detials- Format=%d, Owner type=%d, IsDeletable=%d, Type UID=%d"),
-									format, ownerType, tempInfo->IsDeletable(), tempInfo->Type()));
+				EAP_TRACE_DEBUG_SYMBIAN((_L("\n CEapTlsPeapCertInterface::RunL() : About to retrieve Cert with details, Label = %S"),
+					&label));
+
+				EAP_TRACE_DEBUG(
+					m_am_tools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("Other detials- Format=%d, Owner type=%d, IsDeletable=%d, Type UID=%d\n"),
+					format,
+					ownerType,
+					tempInfo->IsDeletable(),
+					tempInfo->Type()));
 				
 				EAP_TRACE_DATA_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("Subject key Id is"),
-					KeyIdentifier.Ptr(),
-					KeyIdentifier.Size()));
+					SubjectKeyId.Ptr(),
+					SubjectKeyId.Size()));
 
 				EAP_TRACE_DATA_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("Issuer Id is"),
 					IssuerId.Ptr(),
@@ -1550,14 +1795,15 @@
 					}
 					else
 					{
-						EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("WARNING: No extension for this certificate\n")));			
+						EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("WARNING: No extension for this certificate\n")));			
 					}
 				}
 				else
 				{
 					EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: No Certs here!\n")));			
 				}
-					
+			}
+
 #endif
 			
 		
@@ -1625,8 +1871,8 @@
 							const CSubjectPublicKeyInfo& key = iRootCerts[i]->PublicKey();
 							const TPtrC8 params = key.EncodedParams();	
 							
-							TRAPD(err, dsaParams = CX509DSAPublicKey::DSAParametersL(params));
-							if (err != KErrNone)
+							TRAPD(error, dsaParams = CX509DSAPublicKey::DSAParametersL(params));
+							if (error != KErrNone)
 							{				
 				
 								RPointerArray<CX509Certificate> tmp;
@@ -1639,8 +1885,8 @@
 								return;
 							}					
 									
-							TRAP(err, signParams = CSigningKeyParameters::NewL());
-							if (err != KErrNone)
+							TRAP(error, signParams = CSigningKeyParameters::NewL());
+							if (error != KErrNone)
 							{				
 								RPointerArray<CX509Certificate> tmp;
 				
@@ -1653,8 +1899,8 @@
 								delete dsaParams;
 								return;
 							}
-							TRAP(err, signParams->SetDSAParamsL(*dsaParams));
-							if (err != KErrNone)
+							TRAP(error, signParams->SetDSAParamsL(*dsaParams));
+							if (error != KErrNone)
 							{				
 								RPointerArray<CX509Certificate> tmp;
 								
@@ -1669,8 +1915,8 @@
 								return;
 							}
 
-							TRAP(err, iUserCertChain[iUserCertChain.Count()-1]->SetParametersL(*signParams));
-							if (err != KErrNone)
+							TRAP(error, iUserCertChain[iUserCertChain.Count()-1]->SetParametersL(*signParams));
+							if (error != KErrNone)
 							{
 								RPointerArray<CX509Certificate> tmp;
 								m_am_tools->enter_global_mutex();
@@ -1741,8 +1987,8 @@
 				
 				
 				iEncodedCertificate->Des().SetLength(0);
-				TRAPD(err, iEncodedCertificate = iEncodedCertificate->ReAllocL(info->Size()));
-				if (err != KErrNone)
+				TRAPD(error, iEncodedCertificate = iEncodedCertificate->ReAllocL(info->Size()));
+				if (error != KErrNone)
 				{
 					EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: Out of memory in EAP-TLS.\n")));			
 				
@@ -1786,8 +2032,8 @@
 			}
 			iCertInfos.Reset();			
 			
-			TRAPD(err, iCertFilter = CCertAttributeFilter::NewL());
-			if (err != KErrNone)
+			TRAPD(error, iCertFilter = CCertAttributeFilter::NewL());
+			if (error != KErrNone)
 			{ 
 				EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: Out of memory in EAP-TLS.\n")));
 				RPointerArray<CX509Certificate> tmp;
@@ -1802,10 +2048,13 @@
 			
 			iCertFilter->SetFormat(EX509Certificate);
 			iCertFilter->SetOwnerType(ECACertificate);
-			iCertFilter->SetSubjectKeyId(iCertInfo.iSubjectKeyId);
-			if (iCertInfo.iLabel.Size()>0)
-				iCertFilter->SetLabel(iCertInfo.iLabel);// We can not use Label in the filter as certificates saved
+			iCertFilter->SetSubjectKeyId(iCertInfo.GetSubjectKeyId());
+
+			if (iCertInfo.GetLabel()->Size() > 0)
+			{
+				iCertFilter->SetLabel(*(iCertInfo.GetLabel()));// We can not use Label in the filter as certificates saved
 													// by using SetConfigurationL (OMA DM etc uses it) will not have Label.
+			}
 
 			iState = EReadCACertList;
 			iCertStore->List(
@@ -1846,8 +2095,8 @@
 			
 			iEncodedCertificate->Des().SetLength(0);
 
-			TRAPD(err, iEncodedCertificate = iEncodedCertificate->ReAllocL(info->Size()));
-			if (err != KErrNone)
+			TRAPD(error, iEncodedCertificate = iEncodedCertificate->ReAllocL(info->Size()));
+			if (error != KErrNone)
 			{
 				EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: Out of memory in EAP-TLS.\n")));			
 				RPointerArray<CX509Certificate> tmp;
@@ -1885,8 +2134,8 @@
 				iEncodedCertificate->Size()));		
 
 			CX509Certificate* cert = 0;
-			TRAPD(err, cert = CX509Certificate::NewL(iEncodedCertificate->Des()));
-			if (err != KErrNone)
+			TRAPD(error, cert = CX509Certificate::NewL(iEncodedCertificate->Des()));
+			if (error != KErrNone)
 			{
 				EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: Out of memory in EAP-TLS.\n")));			
 				RPointerArray<CX509Certificate> tmp;
@@ -1936,8 +2185,8 @@
 			}
 			iCertInfos.Reset();			
 			
-			TRAPD(err, iCertFilter = CCertAttributeFilter::NewL());
-			if (err != KErrNone)
+			TRAPD(error, iCertFilter = CCertAttributeFilter::NewL());
+			if (error != KErrNone)
 			{ 
 				EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: Out of memory in EAP-TLS.\n")));
 				CPKIXValidationResult* tmp = 0;
@@ -1949,10 +2198,12 @@
 				m_am_tools->leave_global_mutex();
 				break;
 			}
+
 			iCertFilter->SetOwnerType(ECACertificate);
 			iCertFilter->SetFormat(EX509Certificate);
 
 			iState = EValidateChainGetCACertList;
+
 			iCertStore->List(
 				iCertInfos,
 				*iCertFilter, 
@@ -1969,31 +2220,44 @@
 				(EAPL("CEapTlsPeapCertInterface::RunL(): EValidateChainGetCACertList\n")));
 
 			int index;			
-			TIdentityRelation<SCertEntry> comparator(&EapTlsPeapUtils::CompareSCertEntries);
-			// Remove disallowed CA certs from the array
-			for (TInt i = 0; i < iCertInfos.Count(); i++)
+			TIdentityRelation<EapCertificateEntry> comparator(&EapTlsPeapUtils::CompareSCertEntries);
+
+			if (iUseAutomaticCaCertificate)
+			{
+				// All CA certificates are allowed.
+				EAP_TRACE_DEBUG(
+					m_am_tools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("CEapTlsPeapCertInterface::RunL(): EValidateChainGetCACertList: All CA certificates are allowed.\n")));
+			}
+			else
 			{
-				SCertEntry certEntry;
-				certEntry.iLabel.Copy(iCertInfos[i]->Label());
-				certEntry.iSubjectKeyId.Copy(iCertInfos[i]->SubjectKeyId());
-				index = iAllowedCACerts.Find(certEntry, comparator);
-				
-				if (index == KErrNotFound)
+				// Remove disallowed CA certs from the array
+				for (TInt i = 0; i < iCertInfos.Count(); i++)
 				{
-					// Remove					
-					iCertInfos[i]->Release();
-					iCertInfos.Remove(i);
-					i--;
+					EapCertificateEntry certEntry;
+					certEntry.SetLabel(iCertInfos[i]->Label());
+					certEntry.SetSubjectKeyId(iCertInfos[i]->SubjectKeyId());
+					index = iAllowedCACerts.Find(&certEntry, comparator);
+					
+					if (index == KErrNotFound)
+					{
+						// Remove					
+						iCertInfos[i]->Release();
+						iCertInfos.Remove(i);
+						i--;
+					}
 				}
 			}
+
 			if (iCertInfos.Count() == 0)
 			{	
 				// Create new validation result for this failure case. 
 				// CPKIXValidationResult does include a Reset-member function
 				// but it is not in x500.lib as the documentation says.
 				CPKIXValidationResult* validationResult = 0;
-				TRAPD(err, validationResult = CPKIXValidationResult::NewL());
-				if (err != KErrNone)
+				TRAPD(error, validationResult = CPKIXValidationResult::NewL());
+				if (error != KErrNone)
 				{
 					// Do nothing. Session timeout takes care of cleanup...
 					EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: Out of memory in EAP-TLS.\n")));			
@@ -2006,37 +2270,39 @@
 				delete validationResult;
 				break;
 			}
-			
-			CCTCertInfo* info;
-			info = iCertInfos[0];
-			iCAIndex = 0;
+
+			{
+				CCTCertInfo* info;
+				info = iCertInfos[0];
+				iCAIndex = 0;
+
+				iState = EValidateChainGetCACert;
 
-			iState = EValidateChainGetCACert;
-			
-			iEncodedCertificate->Des().SetLength(0);
-			TRAPD(err, iEncodedCertificate = iEncodedCertificate->ReAllocL(info->Size()));
-			if (err != KErrNone)
-			{
-				EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: Out of memory in EAP-TLS.\n")));			
-				
-				CPKIXValidationResult* tmp = 0;
+				iEncodedCertificate->Des().SetLength(0);
+				TRAPD(error, iEncodedCertificate = iEncodedCertificate->ReAllocL(info->Size()));
+				if (error != KErrNone)
+				{
+					EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: Out of memory in EAP-TLS.\n")));
+					
+					CPKIXValidationResult* tmp = 0;
+					
+					m_am_tools->enter_global_mutex();
+
+					iParent->complete_validate_chain(*tmp, eap_status_ca_certificate_unknown); //Failure.
+
+					m_am_tools->leave_global_mutex();
+					break;
+				}
+
+				iCertPtr.Set(iEncodedCertificate->Des());
+
+				iCertStore->Retrieve(
+					*info, 
+					iCertPtr,
+					iStatus);
 				
-				m_am_tools->enter_global_mutex();
-
-				iParent->complete_validate_chain(*tmp, eap_status_ca_certificate_unknown); //Failure.
-
-				m_am_tools->leave_global_mutex();
-				break;
+				SetActive();
 			}
-				
-			iCertPtr.Set(iEncodedCertificate->Des());			
-
-			iCertStore->Retrieve(
-				*info, 
-				iCertPtr,
-				iStatus);
-			
-			SetActive();			
 		}
 		break;
 
@@ -2048,8 +2314,8 @@
 				(EAPL("CEapTlsPeapCertInterface::RunL(): EValidateChainGetCACert\n")));
 
 			CX509Certificate* cert = 0;
-			TRAPD(err, cert = CX509Certificate::NewL(iEncodedCertificate->Des()));
-			if (err != KErrNone)
+			TRAPD(error, cert = CX509Certificate::NewL(iEncodedCertificate->Des()));
+			if (error != KErrNone)
 			{
 				EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: Out of memory in EAP-TLS.\n")));			
 				CPKIXValidationResult* tmp = 0;
@@ -2083,10 +2349,10 @@
 				delete iCertChain;
 				iCertChain = 0;
 
-				TRAPD(err, iCertChain = CPKIXCertChain::NewL(iFs, *iInputCertChain, iRootCerts));
-				if (err != KErrNone)
+				TRAPD(error, iCertChain = CPKIXCertChain::NewL(iFs, *iInputCertChain, iRootCerts));
+				if (error != KErrNone)
 				{
-					EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: EAP-TLS error %d.\n"), err));
+					EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: EAP-TLS error %d.\n"), error));
 					CPKIXValidationResult* tmp = 0;
 					
 					m_am_tools->enter_global_mutex();
@@ -2096,13 +2362,22 @@
 					m_am_tools->leave_global_mutex();
 					break;
 				}
+
 				// Set the current time
 				iTime.UniversalTime();
 				iState = EValidateChainEnd;
-				TRAP(err, iCertChain->ValidateL(*iValidationResult, iTime, iStatus));
-				if (err != KErrNone)
+
+				EAP_TRACE_DEBUG(
+					m_am_tools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("CEapTlsPeapCertInterface::RunL(): EValidateChainGetCACert, calls iCertChain->ValidateL(), count of root CA certificates = %d\n"),
+					iRootCerts.Count()));
+
+				TRAP(error, iCertChain->ValidateL(*iValidationResult, iTime, iStatus));
+				if (error != KErrNone)
 				{
-					EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: Error in certificate validation in EAP-TLS.\n")));			
+					EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: Error in certificate validation in EAP-TLS, error = %d.\n"),
+						error));			
 					CPKIXValidationResult* tmp = 0;
 					
 					m_am_tools->enter_global_mutex();
@@ -2111,7 +2386,7 @@
 
 					m_am_tools->leave_global_mutex();
 					break;
-				}				
+				}
 				SetActive();	// Validate.
 			}
 			else
@@ -2122,8 +2397,8 @@
 				iState = EValidateChainGetCACert;
 				
 				iEncodedCertificate->Des().SetLength(0);
-				TRAPD(err, iEncodedCertificate = iEncodedCertificate->ReAllocL(info->Size()));
-				if (err != KErrNone)
+				TRAPD(error, iEncodedCertificate = iEncodedCertificate->ReAllocL(info->Size()));
+				if (error != KErrNone)
 				{
 					EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: Out of memory in EAP-TLS.\n")));			
 					CPKIXValidationResult* tmp = 0;
@@ -2153,7 +2428,8 @@
 		EAP_TRACE_DEBUG(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
-			(EAPL("CEapTlsPeapCertInterface::RunL(): EValidateChainEnd\n")));
+			(EAPL("CEapTlsPeapCertInterface::RunL(): EValidateChainEnd, iValidationResult->Error().iReason=%d\n"),
+			iValidationResult->Error().iReason));
 		
 		m_am_tools->enter_global_mutex();
 		
@@ -2187,8 +2463,8 @@
 			delete iKeyFilter;
 			iKeyFilter = 0;
 			
-			TRAPD(err, iKeyFilter = new (ELeave) TCTKeyAttributeFilter);
-			if (err != KErrNone)
+			iKeyFilter = new (ELeave) TCTKeyAttributeFilter;
+			if (!iKeyFilter)
 			{ 
 				EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: Out of memory in EAP-TLS.\n")));
 				RInteger tmp;
@@ -2310,6 +2586,9 @@
 				CleanupStack::PushL(R);
 				
 				iParent->complete_sign(R, reinterpret_cast<const RInteger&>(iRSASignature->S()), eap_status_ok);
+
+				delete iRSASignature;
+				iRSASignature = 0;
 				
 				CleanupStack::PopAndDestroy();
 				
@@ -2319,6 +2598,9 @@
 			{
 				iParent->complete_sign(reinterpret_cast<const RInteger&>(iDSASignature->R()), 
 					reinterpret_cast<const RInteger&>(iDSASignature->S()), eap_status_ok);
+
+				delete iDSASignature;
+				iDSASignature = 0;
 				
 				iDSASigner->Release(); // This seems to be needed.
 			}			
@@ -2336,8 +2618,8 @@
 			delete iKeyFilter;
 			iKeyFilter = 0;
 			
-			TRAPD(err, iKeyFilter = new (ELeave) TCTKeyAttributeFilter);
-			if (err != KErrNone)
+			iKeyFilter = new (ELeave) TCTKeyAttributeFilter;
+			if (!iKeyFilter)
 			{ 
 				EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: Out of memory in EAP-TLS.\n")));
 				TBuf8<1> tmp;
@@ -2425,13 +2707,17 @@
 	return;
 }
 
+//--------------------------------------------------
+
 void CEapTlsPeapCertInterface::CancelSignWithPrivateKey()
 {
 	EAP_TRACE_DEBUG(
 		m_am_tools,
 		TRACE_FLAGS_DEFAULT,
-		(EAPL("CEapTlsPeapCertInterface::CancelSignWithPrivateKey():Cancelling Signing - iState=%d (13=ESign)\n"),
-		iState));		
+		(EAPL("CEapTlsPeapCertInterface::CancelSignWithPrivateKey(): iState=%d (13=ESign)\n"),
+		iState));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapTlsPeapCertInterface::CancelSignWithPrivateKey()");
 
 	if(IsActive())
 	{
@@ -2459,4 +2745,6 @@
 	}	
 }
 
+
+//--------------------------------------------------
 // End of file
--- a/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/eap_am_type_tls_peap_symbian.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/eap_am_type_tls_peap_symbian.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 253 %
+* %version: 247.2.42 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -53,7 +53,7 @@
 #include <asn1enc.h>
 #include "EapTlsPeapTimerValues.h"
 #include "eap_state_notification.h"
-#include "eap_am_trace_symbian.h"
+#include "EapTraceSymbian.h"
 #include "eap_automatic_variable.h"
 
 #if defined(USE_FAST_EAP_TYPE)
@@ -65,36 +65,49 @@
 #include "eap_tlv_header.h"
 #include "eap_tlv_message_data.h"
 #endif
-
-#include "eap_ttls_pap_active.h"
+#include <utf.h>
+
 
 #ifdef USE_PAC_STORE
-#include "pac_store_db_symbian.h"
-#include <f32file.h>
+	#include "pac_store_db_symbian.h"
+	#include <f32file.h>
 #endif
 
-#ifdef USE_EAP_EXPANDED_TYPES
 #include "eap_header_string.h"
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
 
 #if defined(USE_EAP_CONFIGURATION_TO_SKIP_USER_INTERACTIONS)
-#include "eap_config.h"
-#include "eap_file_config.h"
-#include "eap_am_file_input_symbian.h"
+	#include "eap_config.h"
+	#include "eap_file_config.h"
+	#include "eap_am_file_input_symbian.h"
 #endif
 
+#include "EapConfigToolsSymbian.h"
+#include "EapConversion.h"
+
+#include <EapPluginTools.h>
+#include <mmtsy_names.h>
+
+
 const TUint KMaxSqlQueryLength = 512;
 const TUint KMaxDBFieldNameLength = 255;
 const TUint KDSASignatureLength = 40;
 const TInt 	KDefaultColumnInView_One = 1; // For DB view.
 const TInt 	KMicroSecsInASecond = 1000000; // 1000000 micro seconds is 1 second.
-		
+
+#ifdef USE_FAST_EAP_TYPE
+
+const TUint KMaxDeviceSeedLength = RMobilePhone::KPhoneManufacturerIdSize+
+			RMobilePhone::KPhoneModelIdSize+
+			RMobilePhone::KPhoneSerialNumberSize;
+const TUint KMaxDeviceSeedSize = 2*KMaxDeviceSeedLength;
+#endif	
 /**
  * Length of the MAC address
  */
 #ifdef USE_FAST_EAP_TYPE
- const TUint8 KMacAddressLength = 6;
+	const TUint8 KMacAddressLength = 6;
 #endif
+
 //--------------------------------------------------
 
 eap_am_type_tls_peap_symbian_c::eap_am_type_tls_peap_symbian_c(
@@ -116,8 +129,7 @@
 #if defined(USE_FAST_EAP_TYPE)
 	  , m_tls_application(0)
 	  //, iWaitNoteCancelled( EFalse )
-      , iEapFastActiveWaitNote( NULL )
-      , iEapFastActiveNotes( NULL )
+
 #endif //#if defined(USE_FAST_EAP_TYPE)
 	  , m_is_valid(false)
 	  , m_is_client(aIsClient)
@@ -138,7 +150,7 @@
 	  , m_param_q(aTools)
 	  , m_param_g(aTools)
 	  , m_shutdown_was_called(false)
-	  , m_identity_info(0)
+
 	  , m_tunneled_type(eap_type_none)
 	  , m_verify_certificate_realm(true)
 	  , m_allow_subdomain_matching(false)
@@ -148,6 +160,7 @@
 	  , m_use_manual_realm(false)
 	  , m_manual_realm(aTools)
 	  , m_tls_peap_server_authenticates_client_policy_flag(true)
+	  , m_use_automatic_ca_certificate(false)
 	  , m_configured(false)
 	  , m_max_session_time(0)
 #if defined(USE_EAP_TLS_SESSION_TICKET)
@@ -176,101 +189,98 @@
 	, m_ready_references_and_data_blocks(aTools)
 	, m_serv_unauth_prov_mode(false)
 	, m_serv_auth_prov_mode(false)
-	, m_is_notifier_connected(false)
+
 	, m_notifier_data_to_user(NULL)
 	, m_notifier_data_pckg_to_user(NULL)
-	, m_notifier_data_from_user(NULL)
-	, m_notifier_data_pckg_from_user(NULL)
+
+	, iMMETELConnectionStatus(false)
 	, m_completed_with_zero(false)
 	, m_verificationStatus(false)
+	, m_pacStorePWBuf8(0)
+	, m_userAction(EEapFastNotifierUserActionOk)
+	, m_pacStoreDataRefType(eap_pac_store_data_type_none)
 	, m_data_reference(m_am_tools)
-	, m_notifier_complete(false)
 	, m_userResponse(m_am_tools)
+	, m_pending_operation(eap_fast_pac_store_pending_operation_none)
 	, m_both_completed(0)
 	, m_both_asked(0)
+	, m_ready_references_array_index(0)
+	, m_provisioning_mode(eap_fast_completion_operation_none)
+	, iCompletionOperation(eap_fast_completion_operation_none)
+	, iCompletion(eap_fast_initialize_pac_store_completion_none)
 #endif //#if defined(USE_FAST_EAP_TYPE)
 
+	, m_notifier_complete(false)
+
 #ifdef USE_PAC_STORE
 	,iPacStoreDb(NULL)
 #endif    
 	
 #ifdef USE_EAP_CONFIGURATION_TO_SKIP_USER_INTERACTIONS
-, m_skip_user_interactions(false)
-, m_fileconfig(0)
+	, m_skip_user_interactions(false)
+	, m_fileconfig(0)
 #endif
-	
-	
-	
-    , iEapTtlsPapMaxSessionConfigTime( 0 )
-    , iEapTtlsPapActive( NULL )
-    
+
+  , iEapTtlsPapMaxSessionConfigTime( 0 )
+
+
+
+  , iPacStoreDeviceSeed(0)
+
+	, iEapAuthNotifier(0)	
+
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	m_tunneling_vendor_type = m_tunneling_type.get_vendor_type();
-	m_current_eap_vendor_type = m_current_eap_type.get_vendor_type();
-
-#else
-
-	m_tunneling_vendor_type = static_cast<TUint>(m_tunneling_type);
-	m_current_eap_vendor_type = static_cast<TUint>(m_current_eap_type);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
 	// Set the database table name based on the type
-	switch (m_current_eap_vendor_type)
-	{
-		case eap_type_tls:
-			m_db_table_name = KTlsDatabaseTableName;
-			m_db_user_cert_table_name = KTlsAllowedUserCertsDatabaseTableName;
-			m_db_ca_cert_table_name = KTlsAllowedCACertsDatabaseTableName;
-			m_db_cipher_suite_table_name = KTlsAllowedCipherSuitesDatabaseTableName;
-			m_db_name = KTlsDatabaseName;	
-			break;
-		
-		case eap_type_peap:
-			m_db_table_name = KPeapDatabaseTableName;
-			m_db_user_cert_table_name = KPeapAllowedUserCertsDatabaseTableName;
-			m_db_ca_cert_table_name = KPeapAllowedCACertsDatabaseTableName;
-			m_db_cipher_suite_table_name = KPeapAllowedCipherSuitesDatabaseTableName;
-			m_db_name = KPeapDatabaseName;	
-			break;
-			
-		case eap_type_ttls_plain_pap:
-		    // use the same case as for eap_type_ttls;
-		    // break is not needed
-		
-		case eap_type_ttls:
-			m_db_table_name = KTtlsDatabaseTableName;
-			m_db_user_cert_table_name = KTtlsAllowedUserCertsDatabaseTableName;
-			m_db_ca_cert_table_name = KTtlsAllowedCACertsDatabaseTableName;
-			m_db_cipher_suite_table_name = KTtlsAllowedCipherSuitesDatabaseTableName;
-			m_db_name = KTtlsDatabaseName;
-			break;
+	if (m_current_eap_type == eap_type_tls)
+	{
+		m_db_table_name = KTlsDatabaseTableName;
+		m_db_user_cert_table_name = KTlsAllowedUserCertsDatabaseTableName;
+		m_db_ca_cert_table_name = KTlsAllowedCACertsDatabaseTableName;
+		m_db_cipher_suite_table_name = KTlsAllowedCipherSuitesDatabaseTableName;
+		m_db_name = KTlsDatabaseName;	
+	}
+	else if (m_current_eap_type == eap_type_peap)
+	{
+		m_db_table_name = KPeapDatabaseTableName;
+		m_db_user_cert_table_name = KPeapAllowedUserCertsDatabaseTableName;
+		m_db_ca_cert_table_name = KPeapAllowedCACertsDatabaseTableName;
+		m_db_cipher_suite_table_name = KPeapAllowedCipherSuitesDatabaseTableName;
+		m_db_name = KPeapDatabaseName;	
+	}
+	else if (m_current_eap_type == eap_type_ttls_plain_pap
+			|| m_current_eap_type == eap_type_ttls)
+	{
+		m_db_table_name = KTtlsDatabaseTableName;
+		m_db_user_cert_table_name = KTtlsAllowedUserCertsDatabaseTableName;
+		m_db_ca_cert_table_name = KTtlsAllowedCACertsDatabaseTableName;
+		m_db_cipher_suite_table_name = KTtlsAllowedCipherSuitesDatabaseTableName;
+		m_db_name = KTtlsDatabaseName;
+	}
 			
 #if defined (USE_FAST_EAP_TYPE)
-			case eap_type_fast:
-			m_db_table_name = KFastGeneralSettingsDBTableName; // General settings
-			m_db_fast_special_table_name = KFastSpecialSettingsDBTableName; // Special settings  for only FAST
-			m_db_user_cert_table_name = KFastAllowedUserCertsDatabaseTableName;
-			m_db_ca_cert_table_name = KFastAllowedCACertsDatabaseTableName;
-			m_db_cipher_suite_table_name = KFastAllowedCipherSuitesDatabaseTableName;
-			m_db_name = KFastDatabaseName;
-			break;
+	else if (m_current_eap_type == eap_type_fast)
+	{
+		m_db_table_name = KFastGeneralSettingsDBTableName; // General settings
+		m_db_fast_special_table_name = KFastSpecialSettingsDBTableName; // Special settings  for only FAST
+		m_db_user_cert_table_name = KFastAllowedUserCertsDatabaseTableName;
+		m_db_ca_cert_table_name = KFastAllowedCACertsDatabaseTableName;
+		m_db_cipher_suite_table_name = KFastAllowedCipherSuitesDatabaseTableName;
+		m_db_name = KFastDatabaseName;
+	}
 #endif // #if defined (USE_FAST_EAP_TYPE)			
-		default:
-			{
-				// Unsupported type		
-				// Should never happen
-				EAP_TRACE_ERROR(m_am_tools, 
-					TRACE_FLAGS_DEFAULT, (
-					EAPL("Unsupported EAP type, m_current_eap_vendor_type=%d \n"),
-					m_current_eap_vendor_type));
-		
-				return;
-			}
+	else
+	{
+		// Unsupported type		
+		// Should never happen
+		EAP_TRACE_ERROR(m_am_tools, 
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("Unsupported EAP type, m_current_eap_vendor_type=0xfe%06x%08x\n"),
+			m_current_eap_type.get_vendor_id(),
+			m_current_eap_type.get_vendor_type()));
+
+		return;
 	}
 
 	if (receive_network_id != 0
@@ -372,28 +382,24 @@
 		EAP_TRACE_DEBUG_SYMBIAN(
 			(_L("eap_am_type_tls_peap_symbian_c::ConstructL Opened PAC store")));		
 	}
-	m_info_array.Reset();
+	m_info_array.ResetAndDestroy();
 	
 #endif	// End: #ifdef USE_FAST_EAP_TYPE
 #endif // End: 	#ifdef USE_PAC_STORE
 
-#ifdef USE_FAST_EAP_TYPE
-	
-	if(m_current_eap_type == eap_type_fast)
-	{
-		m_notifier_data_to_user = new(ELeave) TEapFastNotifierStruct;
-		m_notifier_data_pckg_to_user = new(ELeave) TPckg<TEapFastNotifierStruct> (*m_notifier_data_to_user);
-		
+	m_notifier_data_to_user = new(ELeave) CEapAuthNotifier::TEapDialogInfo;
+	m_notifier_data_pckg_to_user = new(ELeave) TPckg<CEapAuthNotifier::TEapDialogInfo> (*m_notifier_data_to_user);
+
 		EAP_TRACE_DATA_DEBUG(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
 			(EAPL("eap_am_type_tls_peap_symbian_c::ConstructL m_notifier_data_pckg_to_user"),
 			m_notifier_data_pckg_to_user->Ptr(),
 			m_notifier_data_pckg_to_user->Size()));	
-		
-		m_notifier_data_from_user = new(ELeave) TEapFastNotifierStruct;
-		m_notifier_data_pckg_from_user = new(ELeave) TPckg<TEapFastNotifierStruct> (*m_notifier_data_from_user);		
-	}	
+
+
+#ifdef USE_FAST_EAP_TYPE
+
 #endif	// End: #ifdef USE_FAST_EAP_TYPE	
 	
 
@@ -424,48 +430,27 @@
 			m_cert_if->Cancel();
 		}		
 	}
-	
-	if ( iEapTtlsPapActive )
-		{
-		if ( iEapTtlsPapActive->IsActive() )
-			{
-			EAP_TRACE_DEBUG_SYMBIAN(
-				( _L( " eap_am_type_tls_peap_symbian_c::shutdown() \
-				Cancelling iEapTtlsPapActive." ) ) );
-			iEapTtlsPapActive->Cancel();
-			}
-		EAP_TRACE_DEBUG_SYMBIAN(
-			( _L( " eap_am_type_tls_peap_symbian_c::shutdown() \
-			Deleting iEapTtlsPapActive." ) ) );
-		delete iEapTtlsPapActive;
-		iEapTtlsPapActive = NULL;
-		}
-	
-#if defined(USE_FAST_EAP_TYPE)		
-		if( m_is_notifier_connected )
-		{
-			EAP_TRACE_DEBUG_SYMBIAN(
-				(_L(" eap_am_type_tls_peap_symbian_c::shutdown - calling m_notifier.CancelNotifier")));
-			if(IsActive())
-				{
-				TInt error = m_notifier.CancelNotifier(KEapFastNotifierUid);
-				EAP_TRACE_DEBUG_SYMBIAN(
-					(_L("eap_am_type_tls_peap_symbian_c::shutdown - CancelNotifier=%d"), error));
-				}	
-			EAP_TRACE_DEBUG_SYMBIAN(
-				(_L(" eap_am_type_securid_symbian_c::shutdown - calling m_notifier.Close()")));
-			
-			m_notifier.Close(); // Call close only if it is connected.	
-			
-			m_is_notifier_connected = false;
-			
-		} // End: if( m_is_notifier_connected )	
+
+	if (iEapAuthNotifier != 0)
+		{
+		iEapAuthNotifier->Cancel();
+		}
+
+	
+
+	
+#if defined(USE_FAST_EAP_TYPE)
+
+
+
+#endif 
 
 		if (m_partner != NULL)
 		    {
 		    EAP_TRACE_DEBUG_SYMBIAN(
 				(_L(" eap_am_type_tls_peap_symbian_c::shutdown - Cancel timers ...")));
 
+#if defined(USE_FAST_EAP_TYPE)
 		    m_partner->cancel_timer(
 				this, 
 				KRemoveIAPReferenceTimerID);
@@ -482,36 +467,28 @@
 				this, 
 				KHandleReadPacstoreTimerID);
 
+		    m_partner->cancel_timer(
+				this, 
+				KHandleCompletePacstoreNokTimerID);
+
+		    m_partner->cancel_timer(
+				this, 
+				KHandleCompletePacstoreOkTimerID);
+				
+#endif
 		    EAP_TRACE_DEBUG_SYMBIAN(
 				(_L(" eap_am_type_tls_peap_symbian_c::shutdown - Timers canceled")));
 		    }
 		
-		if ( iEapFastActiveWaitNote )
-			{
-			if ( iEapFastActiveWaitNote->IsActive() )
-				{
-				iEapFastActiveWaitNote->Cancel();
-				}
-			delete iEapFastActiveWaitNote;
-			iEapFastActiveWaitNote = NULL;
-			}
-
-		if ( iEapFastActiveNotes )
-			{
-			if ( iEapFastActiveNotes->IsActive() )
-				{
-			    iEapFastActiveNotes->Cancel();
-				}
-			delete iEapFastActiveNotes;
-			iEapFastActiveNotes = NULL;
-			}
+#if defined(USE_FAST_EAP_TYPE)
+
 #endif // #if defined(USE_FAST_EAP_TYPE)
 	
 
-	m_allowed_server_certs.Reset();
-	m_allowed_ca_certs.Close();			
+	m_allowed_server_certs.ResetAndDestroy();
+	m_allowed_ca_certs.ResetAndDestroy();			
 	m_allowed_cipher_suites.Close();			
-	m_allowed_user_certs.Reset();			
+	m_allowed_user_certs.ResetAndDestroy();			
 
 #ifdef USE_PAC_STORE
 #ifdef USE_FAST_EAP_TYPE
@@ -521,13 +498,7 @@
 		iPacStoreDb->Close();
 	}
 	
-	TInt count=0;
-	while (count < m_info_array.Count())
-		{
-		delete m_info_array[count].iData;
-		delete m_info_array[count].iReference;
-		}
-	m_info_array.Reset();
+	m_info_array.ResetAndDestroy();
 
 	EAP_TRACE_DEBUG_SYMBIAN(
 			(_L(" eap_am_type_tls_peap_symbian_c::shutdown - Arrays cleared")));
@@ -551,7 +522,6 @@
 	return eap_status_ok;
 }
 
-
 //--------------------------------------------------
 
 EAP_FUNC_EXPORT eap_am_type_tls_peap_symbian_c::~eap_am_type_tls_peap_symbian_c()
@@ -571,16 +541,12 @@
 	m_database.Close();
 	m_session.Close();
 
+	delete m_notifier_data_to_user;
+	delete m_notifier_data_pckg_to_user;
+
+
 #ifdef USE_FAST_EAP_TYPE
 	
-	if(m_current_eap_type == eap_type_fast)
-	{
-		delete m_notifier_data_to_user;
-		delete m_notifier_data_pckg_to_user;
-		
-		delete m_notifier_data_from_user;
-		delete m_notifier_data_pckg_from_user;		
-	}	
 #endif	// End: #ifdef USE_FAST_EAP_TYPE	
 		
 	delete m_cert_if;
@@ -588,9 +554,6 @@
 	delete m_ca_certificate;
 	delete m_own_certificate;
 	delete m_peer_certificate;
-	delete m_identity_info;
-
-#ifdef USE_EAP_EXPANDED_TYPES
 
 	m_enabled_tunneling_exp_eap_array.ResetAndDestroy();
 	m_disabled_tunneling_exp_eap_array.ResetAndDestroy();
@@ -600,24 +563,187 @@
 			TRACE_FLAGS_DEFAULT,
 			(EAPL("eap_am_type_tls_peap_symbian_c::~eap_am_type_tls_peap_symbian_c() tunneling done.\n")));
 
-#else
-
-	m_iap_eap_array.ResetAndDestroy();
-
-#endif  // #ifdef USE_EAP_EXPANDED_TYPES
-
 #ifdef USE_PAC_STORE
 	
 	delete iPacStoreDb;
 	
 #endif	// End: #ifdef USE_PAC_STORE	
-	
+	delete iEapAuthNotifier;
+	iEapAuthNotifier = 0;
+
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 }
 //--------------------------------------------------
 
+EAP_FUNC_EXPORT void eap_am_type_tls_peap_symbian_c::DlgComplete( TInt aStatus )
+	{
+#ifdef USE_FAST_EAP_TYPE
+	m_userAction = EEapFastNotifierUserActionOk;
+#endif
+	eap_status_e status = m_am_tools->convert_am_error_to_eapol_error(aStatus);
+	
+	
+	if(m_notifier_complete)
+		{
+  	EAP_TRACE_DEBUG_SYMBIAN(
+  			(_L("m_notifier_data_pckg_to_user"),
+  			m_notifier_data_pckg_to_user->Ptr(),
+  			m_notifier_data_pckg_to_user->Size()));	    		
+  	if ( aStatus == KErrCancel )
+  		{
+  		EAP_TRACE_DEBUG_SYMBIAN(
+  				(_L("eap_am_type_tls_peap_symbian_c::DlgComplete - User cancelled the dialog")));
+#ifdef USE_FAST_EAP_TYPE
+  		m_userAction = EEapFastNotifierUserActionCancel;	
+#endif
+  		}		
+  	else if( aStatus != KErrNone )
+  		{
+  		EAP_TRACE_DEBUG_SYMBIAN(
+  			(_L("eap_am_type_tls_peap_symbian_c::DlgComplete - ERROR: dialog error=%d"),
+  			aStatus));	
+	  	TBuf8<KMaxNotifItemLength> userNameUtf8;
+	  	TBuf8<KMaxUiDataLength> challengeUtf8;
+			userNameUtf8.Zero();
+			challengeUtf8.Zero();
+			
+    	CompleteQueryTtlsPapUserNameAndPassword(
+       	status, userNameUtf8, challengeUtf8 );  
+  		return; // m_am_tools->convert_am_error_to_eapol_error(aStatus);		
+  		}
+
+  	if ( m_notifier_data_to_user->iPassword.Size() > 0 )
+  		{
+  		HBufC8* notifier_data8 = NULL;
+			TRAPD(err, notifier_data8 = HBufC8::NewL(m_notifier_data_to_user->iPassword.Size()));
+			if (err)
+				{
+				return;	
+				}
+			TPtr8 notifier_dataPtr8 = notifier_data8->Des();
+			
+			notifier_dataPtr8.Copy(m_notifier_data_to_user->iPassword); // Unicode -> ascii.
+			EAP_TRACE_DEBUG_SYMBIAN(
+				(_L("eap_am_type_tls_peap_symbian_c::DlgComplete Data copy done")));
+		    
+			EAP_TRACE_DATA_DEBUG_SYMBIAN(
+  			("eap_am_type_tls_peap_symbian_c::DlgComplete PW from UI (8bits)",
+				notifier_dataPtr8.Ptr(), 
+				notifier_dataPtr8.Size()));	    
+		    
+#ifdef USE_FAST_EAP_TYPE
+			status = m_userResponse.set_copy_of_buffer(
+				notifier_dataPtr8.Ptr(),
+				notifier_dataPtr8.Size());
+#endif			
+  		CleanupStack::PopAndDestroy( notifier_data8 );
+  		}
+		}
+  m_notifier_complete = 0;
+
+	if ( m_state == EPapChallenge)
+		{
+  	TBuf8<KMaxNotifItemLength> userNameUtf8;
+  	TBuf8<KMaxUiDataLength> challengeUtf8;
+		userNameUtf8.Zero();
+		challengeUtf8.Zero();
+
+		if (m_notifier_data_to_user->iUsername.Size()>0)
+			{
+			const TPtrC16 unicode_uname(
+				reinterpret_cast<unsigned short *>(&m_notifier_data_to_user->iUsername),
+				m_notifier_data_to_user->iUsername.Size()); // Length in unicode characters
+	
+	  	CnvUtfConverter::ConvertFromUnicodeToUtf8( userNameUtf8, unicode_uname );
+			}
+  	EAP_TRACE_DATA_DEBUG( m_am_tools, TRACE_FLAGS_DEFAULT, (
+  		EAPL( "userNameUtf8" ),
+  		userNameUtf8.Ptr(),
+  		userNameUtf8.Size() ) );
+
+		if (m_notifier_data_to_user->iUidata.Size()>0)
+			{
+			const TPtrC16 unicode_pw(
+				reinterpret_cast<unsigned short *>(&m_notifier_data_to_user->iUidata),
+				m_notifier_data_to_user->iUidata.Size()); // Length in unicode characters
+	
+	  	CnvUtfConverter::ConvertFromUnicodeToUtf8( challengeUtf8, unicode_pw );  
+  		} 	
+  	EAP_TRACE_DATA_DEBUG( m_am_tools, TRACE_FLAGS_DEFAULT, (
+  		EAPL( "challengeUtf8" ),
+  		challengeUtf8.Ptr(),
+  		challengeUtf8.Size() ) );
+
+    	CompleteQueryTtlsPapUserNameAndPassword(
+       	status, userNameUtf8, challengeUtf8 );  
+		}
+	if ( m_state == EPapUserNameAndPassword )
+		{
+  	TBuf8<KMaxNotifItemLength> userNameUtf8;
+  	TBuf8<KMaxNotifItemLength> passwordUtf8;
+		userNameUtf8.Zero();
+		passwordUtf8.Zero();
+
+		if (m_notifier_data_to_user->iUsername.Size()>0)
+			{
+			const TPtrC16 unicode_uname(
+				reinterpret_cast<unsigned short *>(&m_notifier_data_to_user->iUsername),
+				m_notifier_data_to_user->iUsername.Size()); // Length in unicode characters
+	
+	  	CnvUtfConverter::ConvertFromUnicodeToUtf8( userNameUtf8, unicode_uname );
+	  	EAP_TRACE_DATA_DEBUG( m_am_tools, TRACE_FLAGS_DEFAULT, (
+	  		EAPL( "userNameUtf8" ),
+	  		userNameUtf8.Ptr(),
+	  		userNameUtf8.Size() ) );
+			}
+		if (m_notifier_data_to_user->iPassword.Size()>0)
+			{
+			const TPtrC16 unicode_pw(
+				reinterpret_cast<unsigned short *>(&m_notifier_data_to_user->iPassword),
+				m_notifier_data_to_user->iPassword.Size()); // Length in unicode characters
+	
+	  	CnvUtfConverter::ConvertFromUnicodeToUtf8( passwordUtf8, unicode_pw );   	
+  		}
+  	EAP_TRACE_DATA_DEBUG( m_am_tools, TRACE_FLAGS_DEFAULT, (
+  		EAPL( "passwordUtf8" ),
+  		passwordUtf8.Ptr(),
+  		passwordUtf8.Size() ) );
+
+    	CompleteQueryTtlsPapUserNameAndPassword(
+       	status, userNameUtf8, passwordUtf8 );  
+	  		
+			TTtlsPapDbInfo aInDbInfo;
+			aInDbInfo.iUsrPwdInfo.iPasswordPromptEnabled = m_notifier_data_to_user->iPasswordPromptEnabled;
+			aInDbInfo.iUsrPwdInfo.iUserName.Copy(userNameUtf8);
+			aInDbInfo.iUsrPwdInfo.iPassword.Copy(passwordUtf8);
+		
+			TRAPD(err1, WriteTtlsPapDbL( aInDbInfo));
+			if (err1)
+				{
+					// continue
+				}
+ 		}
+#ifdef USE_FAST_EAP_TYPE
+	else if ( m_state == EPasswordCancel ||
+		 m_state == EMasterkeyQuery ||
+		 m_state == EPasswordQuery ||
+		 m_state == EWrongPassword ||
+		 m_state == EFilePasswordQuery )
+		{
+		m_eap_fast_completion_status = m_partner->set_timer(
+				this,
+				KHandleReadPacstoreTimerID, 
+				&aStatus,
+				0);
+		return;
+		}
+#endif		
+		
+	}
+
+//--------------------------------------------------
+
 //
-
 void eap_am_type_tls_peap_symbian_c::RunL()
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);		
@@ -629,39 +755,18 @@
 #ifdef USE_FAST_EAP_TYPE
 	eap_status_e status(eap_status_ok);
 
-	if (m_notifier_complete)
-	{
-	
-		TRAPD(err, CompleteNotifierL());// Only for the notifiers.
-		if (err != KErrNone)
-			{
-			EAP_TRACE_ERROR(m_am_tools, 
-					TRACE_FLAGS_DEFAULT, (
-					EAPL("eap_am_type_tls_peap_symbian_c::RunL LEAVE from CompleteNotifierL, Error =%d \n"),
-					err));
-			}
-
-		m_notifier_complete = EFalse;
-	}
-
-	if ( m_state == EPasswordCancel ||
-		 m_state == EMasterkeyQuery ||
-		 m_state == EPasswordQuery ||
-		 m_state == EWrongPassword ||
-		 m_state == EFilePasswordQuery )
-		{
-		m_eap_fast_completion_status = m_partner->set_timer(
-				this,
-				KHandleReadPacstoreTimerID, 
-				&status,
-				0);
-		return;
-		}
+
 	if (m_state == ENone)
 		{
 		return;		
 		}
 
+		if ( m_state == EHandlingDeviceSeedQuery)
+			{
+		  CompleteCreateDeviceSeedL( iStatus.Int() );     
+
+		  return;
+			}
 #endif // #ifdef USE_FAST_EAP_TYPE
 
 	if (iStatus.Int() != KErrNone)
@@ -701,10 +806,11 @@
 				0, 
 				eap_status_process_general_error);			
 			return;
+			
 		default:
 			return;
 		}
-	}
+	} // (iStatus.Int() != KErrNone)
 
 	if (m_state == EHandlingIdentityQuery
 		|| m_state == EHandlingChainQuery)
@@ -723,7 +829,7 @@
 		
 		if(m_allowed_user_certs.Count() > 0)
 		{
-			m_own_certificate_info = m_allowed_user_certs[index];			
+			m_own_certificate_info = *m_allowed_user_certs[index];			
 		}
 		
 		TBool retrieve_chain;
@@ -742,7 +848,7 @@
 		
 		if(allowed_user_cert_count > 0)
 		{
-			TRAP(err, m_cert_if->ReadCertificateL(m_allowed_user_certs[index], retrieve_chain));			
+			TRAP(err, m_cert_if->ReadCertificateL(*m_allowed_user_certs[index], retrieve_chain));			
 		}
 		if (err != KErrNone || allowed_user_cert_count <= 0)
 		{
@@ -782,102 +888,124 @@
 			}
 		}
 	}
-	else if (m_state == EHandlingManualIdentityQuery)
-	{
-		// Convert to 8-bit text
-		TBuf8<KIdentityFieldLength> buf;
-		buf.Copy(m_identity_info->iUsername);
-		
-		eap_status_e status = m_manual_username.set_copy_of_buffer(
-			buf.Ptr(), 
-			buf.Size());
-
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("ERROR: EAP-TLS: EHandlingIdentityQuery: Cannot read manual username.\n")));
-
-			get_am_partner()->complete_eap_identity_query(
-				0, // 0 because identity query failed
-				&m_receive_network_id,
-				m_eap_identifier,
-				status,
-				false,
-				0,
-				false,
-				0);
-		}
-
-		buf.Copy(m_identity_info->iRealm);
-		status = m_manual_realm.set_copy_of_buffer(
-			buf.Ptr(), 
-			buf.Size());
-
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_DEBUG(
-				m_am_tools,
-				TRACE_FLAGS_DEFAULT,
-				(EAPL("ERROR: EAP-TLS: EHandlingIdentityQuery: Cannot read manual realm.\n")));
-
-			get_am_partner()->complete_eap_identity_query(
-				0, // 0 because identity query failed
-				&m_receive_network_id,
-				m_eap_identifier,
-				status,
-				false,
-				0,
-				false,
-				0);
-		}
-
-		// This must be true
-		m_use_manual_realm = true; 
-		
-		if (m_identity_info->iUseManualUsername)
-		{
-			m_use_manual_username = true;
-		}
-		else
-		{
-			m_use_manual_username = false;
-		}
-		
-		
-		get_am_partner()->complete_eap_identity_query(
-			0, // 0 because identity query failed
-			&m_receive_network_id,
-			m_eap_identifier,
-			eap_status_ok,
-			m_use_manual_username,
-			&m_manual_username,
-			m_use_manual_realm,
-			&m_manual_realm);
-		
-		TRAPD(err, SaveManualIdentityL( 
-				m_identity_info->iUseManualUsername,
-				m_identity_info->iUsername,
-				ETrue,
-				m_identity_info->iRealm));
-
-		(void)EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(err));
-
-		// Ignore return value on purpose. It's not fatal if saving fails.							
-					
-		delete m_identity_info; 
-		m_identity_info = 0;
-
-	}
 
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
 }
 
 //--------------------------------------------------
-
+#ifdef USE_FAST_EAP_TYPE
+//
+// ---------------------------------------------------------
+// eap_am_type_tls_peap_symbian_c::CreateDeviceSeedAsync()
+// ---------------------------------------------------------
 //
-
+eap_status_e eap_am_type_tls_peap_symbian_c::CreateDeviceSeedAsync()
+{   
+    EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+    EAP_TRACE_DEBUG_SYMBIAN(
+        (_L("eap_am_type_tls_peap_symbian_c::CreateDeviceSeedAsync-Start ActiveStatus=%d"),
+        IsActive()));       
+    
+    if ( IsActive() )
+    {
+        EAP_TRACE_DEBUG_SYMBIAN(
+            (_L("CreateDeviceSeedAsync: Already active when tried to create device seed")));       
+        
+        return eap_status_device_busy;
+    }
+
+    eap_status_e status(eap_status_ok); 
+    
+    m_state = EHandlingDeviceSeedQuery;
+        
+    // Create MMETEL connection.
+    TRAPD(error, CreateMMETelConnectionL());
+    if(error !=KErrNone)
+    {
+        return m_am_tools->convert_am_error_to_eapol_error(error);
+    }
+    
+    iPhone.GetPhoneId( iStatus, iDeviceId ); 
+
+    SetActive();
+    return status;
+} // eap_am_type_tls_peap_symbian_c::CreateDeviceSeedAsynch()
+
+//--------------------------------------------------
+
+void eap_am_type_tls_peap_symbian_c::CompleteCreateDeviceSeedL( TInt aStatus )
+{
+    EAP_TRACE_DEBUG_SYMBIAN(
+            (_L("eap_am_type_tls_peap_symbian_c::CompleteCreateDeviceSeedL aStatus=%d"),
+            iStatus.Int()));
+    if ( aStatus != KErrNone )
+        {
+        EAP_TRACE_DEBUG_SYMBIAN(
+                (_L("eap_am_type_tls_peap_symbian_c::CompleteCreateDeviceSeedL ERROR: aStatus=%d"),
+                iStatus.Int()));        
+        }
+    EAP_TRACE_DATA_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("Manufacturer"),
+        iDeviceId.iManufacturer.Ptr(),
+        iDeviceId.iManufacturer.Size()));
+    EAP_TRACE_DATA_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("Model"),
+        iDeviceId.iModel.Ptr(),
+        iDeviceId.iModel.Size()));
+    EAP_TRACE_DATA_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("Revision"),
+        iDeviceId.iRevision.Ptr(),
+        iDeviceId.iRevision.Size()));
+    EAP_TRACE_DATA_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("SerialNumber"),
+        iDeviceId.iSerialNumber.Ptr(),
+        iDeviceId.iSerialNumber.Size()));
+        
+    // Combine all the above four items.            
+    TBuf<KMaxDeviceSeedLength> deviceSeed16;    
+    deviceSeed16 += iDeviceId.iManufacturer;
+    deviceSeed16 += iDeviceId.iModel;
+    deviceSeed16 += iDeviceId.iSerialNumber;
+        
+    TBuf8<KMaxDeviceSeedSize> deviceSeed8;
+    deviceSeed8.Copy(deviceSeed16);     
+
+    if ( iPacStoreDeviceSeed == NULL )
+        {
+        iPacStoreDeviceSeed  = new  eap_variable_data_c(m_am_tools);
+        if ( iPacStoreDeviceSeed == NULL )
+            {
+            User::Leave( KErrNoMemory );
+            }
+        }
+
+#if defined(USE_EAP_CONFIGURATION_TO_SKIP_USER_INTERACTIONS)
+    const char DUMMY_SEED[]="empty";
+ 
+
+    if (m_skip_user_interactions == true)
+        {
+        iPacStoreDeviceSeed->set_copy_of_buffer(DUMMY_SEED, sizeof(DUMMY_SEED));
+        }
+    else
+#endif //#if defined(USE_EAP_CONFIGURATION_TO_SKIP_USER_INTERACTIONS)
+        {
+        
+        if ( iPacStoreDeviceSeed != NULL )
+            {
+            if( deviceSeed8.Size() > 0)
+                {
+                iPacStoreDeviceSeed->set_copy_of_buffer(
+                    deviceSeed8.Ptr(),
+                    deviceSeed8.Size());
+                }
+            }
+        }
+    DisconnectMMETel();
+    
+    ContinueInitializePacStore();
+
+} // eap_am_type_tls_peap_symbian_c::CompleteCreateDeviceSeedL()
+
+#endif
+//--------------------------------------------------
 
 void eap_am_type_tls_peap_symbian_c::DoCancel()
 {
@@ -889,18 +1017,12 @@
 	{
 		m_cert_if->Cancel();		
 	}
-
-	if ( iEapTtlsPapActive )
-		{
-		if ( iEapTtlsPapActive->IsActive() )
-			{
-			EAP_TRACE_DEBUG_SYMBIAN(
-				( _L( " eap_am_type_tls_peap_symbian_c::DoCancel() \
-				Cancelling iEapTtlsPapActive." ) ) );
-			iEapTtlsPapActive->Cancel();
-			}
-		}
-	
+	if (iEapAuthNotifier != 0)
+		{
+		iEapAuthNotifier->Cancel();
+		}
+
+
 #if defined(USE_FAST_EAP_TYPE)
 
 	m_partner->cancel_timer(
@@ -919,23 +1041,6 @@
 			this, 
 			KHandleReadPacstoreTimerID);
 
-	if( m_is_notifier_connected )
-	{
-		EAP_TRACE_DEBUG_SYMBIAN(
-			(_L(" eap_am_type_tls_peap_symbian_c::DoCancel - calling m_notifier.CancelNotifier")));
-		if(IsActive())
-			{
-			TInt error = m_notifier.CancelNotifier(KEapFastNotifierUid);
-			EAP_TRACE_DEBUG_SYMBIAN(
-				(_L("eap_am_type_tls_peap_symbian_c::DoCancel:CancelNotifier=%d"),
-				error));
-			}
-
-		m_notifier.Close(); // Call close only if it is connected.	
-			
-		m_is_notifier_connected = false;
-
-	} // End: if( m_is_notifier_connected )		
 
 #endif // #if defined(USE_FAST_EAP_TYPE)
 	
@@ -945,7 +1050,6 @@
 //--------------------------------------------------
 
 //
-
 eap_status_e eap_am_type_tls_peap_symbian_c::SaveManualIdentityL( 
 	const TBool use_manual_username,
 	TDesC& manual_username,
@@ -955,11 +1059,11 @@
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 	
 	// Validate length.
-	if(manual_username.Length() > KMaxManualUsernameLengthInDB
-		|| manual_realm.Length() > KMaxManualRealmLengthInDB)
+	if(manual_username.Length() > KMaxUsernameLengthInDB
+		|| manual_realm.Length() > KMaxRealmLengthInDB)
 	{
 		// Username or realm too long. Can not be stored in DB.
-		EAP_TRACE_DEBUG_SYMBIAN((_L("eap_am_type_tls_peap_symbian_c::SaveManualIdentityL: Too long username or realm. Length: UN=%d, Realm=%d\n"),
+		EAP_TRACE_DEBUG_SYMBIAN((_L("eap_am_type_tls_peap_symbian_c::SaveManualIdentityL: Too long username or realm. Length: manual_username=%d, manual_realm=%d\n"),
 		manual_username.Length(), manual_realm.Length()));
 		
 		User::Leave(KErrArgument);
@@ -970,10 +1074,19 @@
 
 	RDbView view;
 
-	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	
-	sqlStatement.Format(KSQL, &m_db_table_name, 
-		&KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	
+	sqlStatement.Format(
+		KSQL,
+		&m_db_table_name, 
+		&KServiceType,
+		m_index_type,
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType, 
+		m_tunneling_type.get_vendor_type());
 	
 	User::LeaveIfError(view.Prepare(m_database, TDbQuery(sqlStatement), TDbWindow::EUnlimited));	
 	CleanupClosePushL(view);
@@ -1051,9 +1164,10 @@
 //
 void eap_am_type_tls_peap_symbian_c::SendErrorNotification(
 	const eap_status_e aError )
-	{
+{
 	send_error_notification( aError );
-	}
+}
+
 //--------------------------------------------------
 
 #if defined(USE_FAST_EAP_TYPE)
@@ -1068,19 +1182,15 @@
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 }
 
-
-
-
 // ---------------------------------------------------------
 // eap_am_type_tls_peap_symbian_c::IsProvisioningMode()
 // ---------------------------------------------------------
 //
 TBool eap_am_type_tls_peap_symbian_c::IsProvisioningMode()
-	{
+{
 	return ( m_provisioning_mode ==
         eap_fast_completion_operation_server_authenticated_provisioning_mode ) ? ETrue : EFalse;
-	}
-
+}
 
 // ---------------------------------------------------------
 // eap_am_type_tls_peap_symbian_c::CompleteQueryUserPermissionForAid()
@@ -1089,7 +1199,7 @@
 eap_status_e
 eap_am_type_tls_peap_symbian_c::CompleteQueryUserPermissionForAid(
 	EEapFastNotifierUserAction aUserAction )
-	{
+{
 	EAP_TRACE_DEBUG_SYMBIAN(
 			(_L("eap_am_type_tls_peap_symbian_c::CompleteQueryUserPermissionForAid")));
 	if ( aUserAction == EEapFastNotifierUserActionOk )
@@ -1113,8 +1223,7 @@
   		        m_pending_operation );
   		} 
 	return m_eap_fast_completion_status;
-	}
-
+}
 
 #endif //#if defined(USE_FAST_EAP_TYPE)
 
@@ -1198,7 +1307,7 @@
 		{
 			EAP_TRACE_ERROR(m_am_tools, 
 				TRACE_FLAGS_DEFAULT, (
-				EAPL("eap_am_type_tls_peap_symbian_c::configure - ReadCertRowsToArrayL, User cert, Error =%d \n"),
+				EAPL("eap_am_type_tls_peap_symbian_c::configure(): ReadCertRowsToArrayL, User cert, Error =%d \n"),
 				err));
 		
 			// Convert the leave error code to EAPOL stack error code.
@@ -1224,7 +1333,7 @@
 		{
 			EAP_TRACE_ERROR(m_am_tools, 
 				TRACE_FLAGS_DEFAULT, (
-				EAPL("eap_am_type_tls_peap_symbian_c::configure - ReadCertRowsToArrayL, CA cert, Error =%d \n"),
+				EAPL("eap_am_type_tls_peap_symbian_c::configure(): ReadCertRowsToArrayL, CA cert, Error =%d \n"),
 				err));
 		
 			// Convert the leave error code to EAPOL stack error code.
@@ -1251,7 +1360,7 @@
 		{
 			EAP_TRACE_ERROR(m_am_tools, 
 				TRACE_FLAGS_DEFAULT, (
-				EAPL("eap_am_type_tls_peap_symbian_c::configure - ReadUintRowsToArrayL, CipherSuit, Error =%d \n"),
+				EAPL("eap_am_type_tls_peap_symbian_c::configure(): ReadUintRowsToArrayL, CipherSuit, Error =%d \n"),
 				err));
 
 			// Convert the leave error code to EAPOL stack error code.
@@ -1274,8 +1383,6 @@
 		
 		)
 	{
-#ifdef USE_EAP_EXPANDED_TYPES
-
 		TRAPD(err, EapTlsPeapUtils::GetTunnelingExpandedEapDataL(
 			m_database,
 			m_am_tools,
@@ -1285,24 +1392,12 @@
 			m_index,
 			m_tunneling_type,
 			m_current_eap_type));
-
-#else
-		TRAPD(err, EapTlsPeapUtils::GetEapDataL(
-			m_database,
-			m_am_tools,
-			m_iap_eap_array,
-			m_index_type,
-			m_index,
-			m_tunneling_type,
-			m_current_eap_type));
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
 	
 		if (err != KErrNone)
 		{
 			EAP_TRACE_ERROR(m_am_tools, 
 				TRACE_FLAGS_DEFAULT, (
-				EAPL("eap_am_type_tls_peap_symbian_c::configure - GetEapDataL or GetTunnelingExpandedEapDataL, Error =%d \n"),
+				EAPL("eap_am_type_tls_peap_symbian_c::configure(): GetEapDataL or GetTunnelingExpandedEapDataL, Error =%d \n"),
 				err));
 
 			// Convert the leave error code to EAPOL stack error code.
@@ -1367,6 +1462,28 @@
 
 	//----------------------------------------------------------
 
+	if (m_is_client == true)
+	{
+		eap_variable_data_c use_automatic_ca_certificate(m_am_tools);
+
+		eap_status_e status = m_partner->read_configure(
+			cf_str_EAP_TLS_PEAP_use_automatic_ca_certificate.get_field(),
+			&use_automatic_ca_certificate);
+		if (status == eap_status_ok
+			&& use_automatic_ca_certificate.get_is_valid_data() == true)
+		{
+			u32_t *use_automatic_ca_certificate_flag = reinterpret_cast<u32_t *>(
+				use_automatic_ca_certificate.get_data(sizeof(u32_t)));
+			if (use_automatic_ca_certificate_flag != 0
+				&& *use_automatic_ca_certificate_flag != 0)
+			{
+				m_use_automatic_ca_certificate = true;
+			}
+		}
+	}
+
+	//----------------------------------------------------------
+
 	// This is only for server
 	{
 		eap_variable_data_c cipher_suite(m_am_tools);
@@ -1388,75 +1505,6 @@
 	
 	//----------------------------------------------------------
 
-#ifndef USE_EAP_EXPANDED_TYPES // This is not needed it seems. Still keeping it for normal EAP types.
-								  // Intention of this is to get tunneled EAP types, but m_tunneled_type is not used
-								  // anywhere other than this place.
-
-	if (m_current_eap_type == eap_type_peap
-#if defined(USE_TTLS_EAP_TYPE)
-		|| m_current_eap_type == eap_type_ttls
-#endif // #if defined(USE_TTLS_EAP_TYPE)
-
-#if defined(USE_FAST_EAP_TYPE)
-		|| m_current_eap_type == eap_type_fast
-#endif
-	
-		
-		)
-	{
-		eap_variable_data_c tunneled_type(m_am_tools);
-
-		eap_status_e status = type_configure_read(
-			cf_str_PEAP_tunneled_eap_type_hex_data.get_field(),
-			&tunneled_type);
-		if (status == eap_status_illegal_configure_type)
-		{
-			status = m_partner->read_configure(
-				cf_str_PEAP_tunneled_eap_type_u32_t.get_field(),
-				&tunneled_type);
-		}
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-		else if (tunneled_type.get_is_valid_data() == true
-			&& tunneled_type.get_data_length() == sizeof(u32_t)
-			&& tunneled_type.get_data(sizeof(u32_t)) != 0)
-		{
-			m_tunneled_type = static_cast<eap_type_value_e>(
-				*reinterpret_cast<u32_t *>(tunneled_type.get_data(sizeof(u32_t))));
-		}
-		else if (tunneled_type.get_data_length()
-				 == eap_expanded_type_c::get_eap_expanded_type_size()
-				 && tunneled_type.get_data(tunneled_type.get_data_length()) != 0)
-		{
-			eap_expanded_type_c eap_type(eap_type_none);
-
-			status = eap_type.set_expanded_type_data(
-				m_am_tools,
-				&tunneled_type);
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);
-			}
-
-			status = eap_type.get_type_data(
-				m_am_tools,
-				&m_tunneled_type);
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);
-			}
-		}
-	}
-  
-#endif //#ifndef USE_EAP_EXPANDED_TYPES
-
-	//----------------------------------------------------------
-
 	{
 		eap_variable_data_c use_manual_username(m_am_tools);
 
@@ -1603,60 +1651,48 @@
 		
 		eap_status_e status(eap_status_ok);
 
-		switch (m_current_eap_vendor_type)
-		{
-		case eap_type_tls:
-			{
-				status = m_partner->read_configure(
-					cf_str_EAP_TLS_max_session_validity_time.get_field(),
-					&sessionTimeFromFile);
-			}
-			break;
-
-		case eap_type_peap:
-			{
-				status = m_partner->read_configure(
-					cf_str_EAP_PEAP_max_session_validity_time.get_field(),
-					&sessionTimeFromFile);
-			}
-			break;
-
-		case eap_type_ttls:
-			{
-				status = m_partner->read_configure(
-					cf_str_EAP_TTLS_max_session_validity_time.get_field(),
-					&sessionTimeFromFile);
-			}
-			break;
-
-		case eap_type_ttls_plain_pap:
-			{
+		if (m_current_eap_type == eap_type_tls)
+		{
+			status = m_partner->read_configure(
+				cf_str_EAP_TLS_max_session_validity_time.get_field(),
+				&sessionTimeFromFile);
+		}
+		else if (m_current_eap_type == eap_type_peap)
+		{
+			status = m_partner->read_configure(
+				cf_str_EAP_PEAP_max_session_validity_time.get_field(),
+				&sessionTimeFromFile);
+		}
+		else if (m_current_eap_type == eap_type_ttls)
+		{
+			status = m_partner->read_configure(
+				cf_str_EAP_TTLS_max_session_validity_time.get_field(),
+				&sessionTimeFromFile);
+		}
+		else if (m_current_eap_type == eap_type_ttls_plain_pap)
+		{
 			// read PAP session time
 			status = m_partner->read_configure(
 				cf_str_EAP_TLS_PEAP_ttls_pap_max_session_validity_time.get_field(),
 				&sessionTimeFromFile );
-			}
-			break;
-			
+		}
 #if defined(USE_FAST_EAP_TYPE)
-		case eap_type_fast:
-			{
-				status = m_partner->read_configure(
-					cf_str_EAP_FAST_max_session_validity_time.get_field(),
-					&sessionTimeFromFile);
-			}
-			break;
+		else if (m_current_eap_type == eap_type_fast)
+		{
+			status = m_partner->read_configure(
+				cf_str_EAP_FAST_max_session_validity_time.get_field(),
+				&sessionTimeFromFile);
+		}
 #endif
-			
-		default:
-			{
-				// Should never happen
-				EAP_TRACE_ERROR(m_am_tools, 
-					TRACE_FLAGS_DEFAULT, (
-					EAPL("eap_am_type_tls_peap_symbian_c::configure - Unsupported EAP type, m_current_eap_vendor_type=%d \n"),
-					m_current_eap_vendor_type));
-			}
-		}	
+		else
+		{
+			// Should never happen
+			EAP_TRACE_ERROR(m_am_tools, 
+				TRACE_FLAGS_DEFAULT, (
+				EAPL("eap_am_type_tls_peap_symbian_c::configure(): Unsupported EAP type, m_current_eap_vendor_type=0xfe%06x%08x\n"),
+				m_current_eap_type.get_vendor_id(),
+				m_current_eap_type.get_vendor_type()));
+		}
 
 		// set m_max_session_time
 		if (status == eap_status_ok
@@ -1757,88 +1793,130 @@
 	
 	status = eap_status_ok;
 
-	if (m_allowed_ca_certs.Count() == 0)
-	{		
-	// needed because of nonworking wrong settings
+	if (m_use_automatic_ca_certificate == false)
+	{
+		if (m_allowed_ca_certs.Count() == 0)
+		{
+			// needed because of nonworking wrong settings
 #if defined(USE_FAST_EAP_TYPE)
-		if(m_current_eap_type == eap_type_fast &&
-			m_serv_auth_prov_mode != true)
-		{
-			// In the case of EAP-FAST, CA cert is must if m_serv_auth_prov_mode is TRUE.
-			status = eap_status_ok;
-			
-			EAP_TRACE_DEBUG(m_am_tools, 
-				TRACE_FLAGS_DEFAULT, (
-				EAPL("eap_am_type_tls_peap_symbian_c::configure - No CA certificate but exception for EAP-FAST as m_serv_auth_prov_mode is FALSE and for all m_serv_unauth_prov_mode \n")));				
-		}
-		else	
+			if(m_current_eap_type == eap_type_fast
+				&& m_serv_auth_prov_mode != true)
+			{
+				// In the case of EAP-FAST, CA cert is must if m_serv_auth_prov_mode is TRUE.
+				status = eap_status_ok;
+				
+				EAP_TRACE_DEBUG(
+					m_am_tools, 
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("eap_am_type_tls_peap_symbian_c::configure(): No CA certificate but exception for EAP-FAST as m_serv_auth_prov_mode is FALSE and for all m_serv_unauth_prov_mode \n")));
+			}
+			else	
 #endif // #if defined(USE_FAST_EAP_TYPE)
-		{
-			EAP_TRACE_ERROR(m_am_tools, 
-				TRACE_FLAGS_DEFAULT, (
-				EAPL("eap_am_type_tls_peap_symbian_c::configure - Error - No CA certificate\n")));
-		
-			// No root certificate selected. Cannot continue.
-			status = eap_status_ca_certificate_unknown;
-			send_error_notification(status);
-		}			
-	}
-	
+			{
+				EAP_TRACE_ERROR(
+					m_am_tools, 
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("eap_am_type_tls_peap_symbian_c::configure(): Error - No CA certificate\n")));
+			
+				// No root certificate selected. Cannot continue.
+				status = eap_status_ca_certificate_unknown;
+				send_error_notification(status);
+			}			
+		}
+		else
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools, 
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("eap_am_type_tls_peap_symbian_c::configure(): %d CA certificates selected.\n"),
+				m_allowed_ca_certs.Count()));
+		}
+	}
+	else
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools, 
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_am_type_tls_peap_symbian_c::configure(): %d CA certificate selected in automatic CA selection.\n"),
+			m_allowed_ca_certs.Count()));
+	}
+	
+
 	if(m_allowed_user_certs.Count() == 0)
-		{
+	{
 #if defined(USE_FAST_EAP_TYPE)
 		if(m_current_eap_type == eap_type_fast)
-			{
+		{
 			m_use_manual_realm = true;
 
 			if (m_use_manual_username == false)
-				{
+			{
 				TRAPD(err, status=ConfigureL());
 				if (err != KErrNone)
-					{
+				{
 					EAP_TRACE_ERROR(m_am_tools, 
 							TRACE_FLAGS_DEFAULT, (
 							EAPL("eap_am_type_tls_peap_symbian_c::configure LEAVE from ConfigureL, Error =%d \n"),
 							err));
-					}
 				}
 			}
+		}
 #endif // #if defined(USE_FAST_EAP_TYPE)
-		}
+	}
+	else
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools, 
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_am_type_tls_peap_symbian_c::configure(): %d user certificates selected.\n"),
+			m_allowed_user_certs.Count()));
+	}
+
+
 	if (m_tls_peap_server_authenticates_client_policy_flag == true
 		&& m_allowed_user_certs.Count() == 0)
 	{
 #if defined(USE_FAST_EAP_TYPE)
-    if (m_current_eap_type == eap_type_fast)
-        {
-        EAP_TRACE_DEBUG(m_am_tools, 
-            TRACE_FLAGS_DEFAULT, 
-            (EAPL("eap_am_type_tls_peap_symbian_c::configure - No USER certificate, but in eap_fast it's not mandatory\n")));  
-    
-        }
-	else
+		if (m_current_eap_type == eap_type_fast)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools, 
+				TRACE_FLAGS_DEFAULT, 
+				(EAPL("eap_am_type_tls_peap_symbian_c::configure(): No USER certificate, but in eap_fast it's not mandatory\n")));
+		}
+		else
 #endif // #if defined(USE_FAST_EAP_TYPE)
 	    {
-	    EAP_TRACE_ERROR(m_am_tools, 
-			TRACE_FLAGS_DEFAULT, (
-			EAPL("eap_am_type_tls_peap_symbian_c::configure - Error - No USER certificate\n")));
-	
-		// No user certificate selected. Cannot continue.
-		status = eap_status_user_certificate_unknown;
-		send_error_notification(status);
+			EAP_TRACE_ERROR(
+				m_am_tools, 
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("eap_am_type_tls_peap_symbian_c::configure(): Error - No USER certificate\n")));
+		
+			// No user certificate selected. Cannot continue.
+			status = eap_status_user_certificate_unknown;
+			send_error_notification(status);
 	    }
 	}
 
 	if (m_allowed_cipher_suites.Count() == 0)
 	{
-		EAP_TRACE_ERROR(m_am_tools, 
-			TRACE_FLAGS_DEFAULT, (
-			EAPL("eap_am_type_tls_peap_symbian_c::configure - Error - No cipher suit\n")));
+		EAP_TRACE_ERROR(
+			m_am_tools, 
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_am_type_tls_peap_symbian_c::configure(): Error - No cipher suit\n")));
 
 		// No sipher suites selected. Cannot continue.
 		status = eap_status_illegal_cipher_suite;
 		send_error_notification(status);
 	}
+	else
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools, 
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_am_type_tls_peap_symbian_c::configure(): %d cipher suites selected.\n"),
+			m_allowed_cipher_suites.Count()));
+	}
 
 	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
@@ -1849,19 +1927,21 @@
 	
 	m_configured = true;
 	
-	EAP_TRACE_DEBUG(m_am_tools, 
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
 		TRACE_FLAGS_DEFAULT, 
-		(EAPL("eap_am_type_tls_peap_symbian_c::configure - END \n")));	
+		(EAPL("eap_am_type_tls_peap_symbian_c::configure(): END \n")));
 	
 
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
 
 //--------------------------------------------------
+
 #if defined(USE_FAST_EAP_TYPE)
 
 eap_status_e eap_am_type_tls_peap_symbian_c::ConfigureL()
-	{
+{
 	
 	eap_status_e status(eap_status_ok);
 	
@@ -1870,7 +1950,8 @@
 
 	TempUserName.Copy(KTempUserName);
 	
-	HBufC8* buf = HBufC8::NewLC(KIdentityFieldLength);
+  HBufC8* buf = HBufC8::NewLC(KMaxNotifItemLength);
+
 	TPtr8 bufPtr = buf->Des();
 
 	HBufC8* tempUserBuf8 = HBufC8::NewLC(KMacAddressLength);
@@ -1950,7 +2031,7 @@
 	m_use_manual_username = true;
 	
 	return status;
-	}
+}
 
 #endif // #if defined(USE_FAST_EAP_TYPE)
 
@@ -1990,6 +2071,8 @@
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
 
+//--------------------------------------------------
+
 void eap_am_type_tls_peap_symbian_c::authentication_finishedL(
 	const bool true_when_successful,
 	const tls_session_type_e tls_session_type)
@@ -2095,6 +2178,7 @@
 	// Get the own certificate only if it has already been retrieved
 	if (m_own_certificate == 0)
 	{
+		// Get the matching certificates. This function call is completed asyncronously by complete_get_matching_certificates() function call.
 		TRAPD(err, m_cert_if->GetMatchingCertificatesL(
 			m_allowed_user_certs, 
 			EFalse, 
@@ -2131,6 +2215,7 @@
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
 
+//--------------------------------------------------
 
 eap_status_e eap_am_type_tls_peap_symbian_c::complete_read_own_certificate(
 	const RPointerArray<CX509Certificate>& aCertChain, eap_status_e aStatus)
@@ -2393,6 +2478,8 @@
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
 
+//--------------------------------------------------
+
 eap_status_e eap_am_type_tls_peap_symbian_c::complete_read_ca_certificate(
 		const RPointerArray<CX509Certificate>& aCertChain, eap_status_e aStatus)
 {
@@ -2582,6 +2669,8 @@
 	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);	
 }
 
+//--------------------------------------------------
+
 void eap_am_type_tls_peap_symbian_c::get_identities_from_distinguished_namesL(
 	const CX509Certificate * const aCertificate, 
 	eap_variable_data_c * const aSubjectIdentity,
@@ -2685,6 +2774,8 @@
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 }
 
+//--------------------------------------------------
+
 void eap_am_type_tls_peap_symbian_c::get_identity_from_alternative_nameL(
 	const CX509Certificate * const aCertificate, 
 	eap_variable_data_c * const aIdentity)
@@ -2886,9 +2977,6 @@
 //--------------------------------------------------
 
 //
-//--------------------------------------------------
-
-//
 EAP_FUNC_EXPORT eap_status_e eap_am_type_tls_peap_symbian_c::timer_expired(
 	const u32_t id, void *data)
 {
@@ -3230,8 +3318,6 @@
 		{
 			// We are asked to return cf_str_PEAP_tunneled_eap_type_hex_data
 			
-#ifdef USE_EAP_EXPANDED_TYPES
-	
 			// We need to return here the next ENABLED tunneled EAP type we should try. 
 	
 			if (0 == m_enabled_tunneling_exp_eap_array.Count())
@@ -3249,108 +3335,35 @@
 			{
 				// Get the first enabled EAP type (tunneling).
 
-				TBuf8<KExpandedEAPTypeSize> tmpExpEAP(m_enabled_tunneling_exp_eap_array[0]->iExpandedEAPType); //first item.
-
 				EAP_TRACE_DATA_DEBUG(
 					m_am_tools,
 					TRACE_FLAGS_DEFAULT,
 					(EAPL("type_configure_read:Enabled expanded tunneling EAP type:"),
-					tmpExpEAP.Ptr(),
-					tmpExpEAP.Size()));
-					
-					status = data->set_copy_of_buffer(tmpExpEAP.Ptr(), KExpandedEAPTypeSize);
-					if (status != eap_status_ok)
-					{
-						EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-						return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);			
-					}
+					m_enabled_tunneling_exp_eap_array[0]->GetValue().Ptr(),
+					m_enabled_tunneling_exp_eap_array[0]->GetValue().Length()));
+					
+				status = data->set_copy_of_buffer(
+					m_enabled_tunneling_exp_eap_array[0]->GetValue().Ptr(),
+					m_enabled_tunneling_exp_eap_array[0]->GetValue().Length());
+				if (status != eap_status_ok)
+				{
+					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+					return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);			
+				}
 					
 				EAP_TRACE_DATA_DEBUG(
 					m_am_tools,
 					TRACE_FLAGS_DEFAULT,
 					(EAPL("EAP-PEAP or EAP-TTLS: Trying encapsulated EAP type:"),
-					tmpExpEAP.Ptr(),
-					tmpExpEAP.Size()));
-			}
-	
-#else // For normal EAP types.
-			
-			// We need to return here the next tunneled EAP type we should try. 
-			TInt i;
-
-			for (i = 0; i < m_iap_eap_array.Count(); i++)
-			{
-				// Find the first enabled EAP type (highest priority)
-				TEap *eapType = m_iap_eap_array[i];			
-				if (eapType->Enabled == 1)
-				{
-					// Convert the string to integer
-					TLex8 tmp(eapType->UID);
-					TInt val(0);
-					tmp.Val(val);
-					status = data->set_copy_of_buffer(reinterpret_cast<u8_t *>(&val), sizeof(TUint));
-					if (status != eap_status_ok)
-					{
-						EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-						return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);			
-					}
-					EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("EAP-PEAP: Trying encapsulated EAP type: %d.\n"), val));
-					break;
-				}
-			}		
-			if (i == m_iap_eap_array.Count())
-			{
-				// Not found
-				if (m_is_client)
-				{
-					EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: No configured encapsulated EAP types.\n")));
-				}
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_configure_field);
-			}
-			
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-					
+					m_enabled_tunneling_exp_eap_array[0]->GetValue().Ptr(),
+					m_enabled_tunneling_exp_eap_array[0]->GetValue().Length()));
+			}
+
 			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 			return EAP_STATUS_RETURN(m_am_tools, status);
 		
 		} // End of  if (!wanted_field.compare(&type_field))
 		
-#if !defined(USE_EAP_EXPANDED_TYPES)
-
-		// cf_str_PEAP_accepted_tunneled_client_types_hex_data is available only for expaned EAP types.
-		// cf_str_PEAP_accepted_tunneled_client_types_u32array should be used otherwise.
-		// So for cf_str_PEAP_accepted_tunneled_client_types_hex_data and eap_configure_type_hex_data
-		// we should return eap_status_illegal_configure_field.
-		// This is needed only if USE_EAP_EXPANDED_TYPES is not defined. Otherwise the field 
-		// cf_str_PEAP_accepted_tunneled_client_types_hex_data can be read from the database using
-		// type_configure_readL (let it fall through).
-
-		eap_variable_data_c tunneled_type_field(m_am_tools);
-
-		status = tunneled_type_field.set_buffer(
-			cf_str_PEAP_accepted_tunneled_client_types_hex_data.get_field()->get_field(),
-			cf_str_PEAP_accepted_tunneled_client_types_hex_data.get_field()->get_field_length(),
-			false,
-			false);
-		if (status != eap_status_ok)
-		{
-			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
-
-		if (!wanted_field.compare(&tunneled_type_field))
-		{
-			// Check if the type is eap_configure_type_hex_data.
-			
-			if( eap_configure_type_hex_data ==  field->get_type() )
-			{
-				// This field is used only for exapanded EAP types.
-				return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_configure_type);
-			}
-		}
-		
-#else // For expanded EAP type.
 
 		// cf_str_PEAP_accepted_tunneled_client_types_u32array is available only for normal EAP types.
 		// So for cf_str_PEAP_accepted_tunneled_client_types_u32array and eap_configure_type_u32array
@@ -3379,9 +3392,6 @@
 				return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_configure_type);
 			}
 		}
-		
-#endif // End of #if !defined(USE_EAP_EXPANDED_TYPES)
-		
 	} // End of if (m_current_eap_type == eap_type_peap
 	
 	TRAPD(err, type_configure_readL(
@@ -3407,6 +3417,7 @@
 }
 
 //--------------------------------------------------
+
 void eap_am_type_tls_peap_symbian_c::type_configure_readL(
 	eap_config_string field,
 	const u32_t field_length,
@@ -3437,7 +3448,7 @@
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 	
-	_LIT(KSQLQueryRow, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");	
+	_LIT(KSQLQueryRow, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");	
 	
 #if defined(USE_FAST_EAP_TYPE)
 	
@@ -3447,44 +3458,62 @@
 	if(m_current_eap_type == eap_type_fast
 	   && ((unicodeString.Compare(cf_str_EAP_FAST_allow_server_authenticated_provisioning_mode_literal) == 0)
 	   || (unicodeString.Compare(cf_str_EAP_FAST_allow_server_unauthenticated_provisioning_mode_ADHP_literal) == 0)
-	   || (unicodeString.Compare(cf_str_EAP_FAST_warn_ADHP_no_PAC_literal) == 0)
-	   || (unicodeString.Compare(cf_str_EAP_FAST_warn_ADHP_no_matching_PAC_literal) == 0)
-	   || (unicodeString.Compare(cf_str_EAP_FAST_warn_ADHP_not_default_server_literal) == 0)
+	   || (unicodeString.Compare(KFASTWarnADHPNoPAC) == 0)
+	   || (unicodeString.Compare(KFASTWarnADHPNoMatchingPAC) == 0)
+	   || (unicodeString.Compare(KFASTWarnNotDefaultServer) == 0)
 	   || (unicodeString.Compare(KFASTPACGroupImportReferenceCollection) == 0)
 	   || (unicodeString.Compare(KFASTPACGroupDBReferenceCollection) == 0)))
-	    {
-	    if (unicodeString.Compare(cf_str_EAP_FAST_warn_ADHP_no_matching_PAC_literal) == 0)
-	        {
-	        unicodeString.Copy(KFASTWarnADHPNoMatchingPAC);
-	        }
-        if (unicodeString.Compare(cf_str_EAP_FAST_warn_ADHP_no_PAC_literal) == 0)
-            {
-            unicodeString.Copy(KFASTWarnADHPNoPAC);
-            }
-        if (unicodeString.Compare(cf_str_EAP_FAST_warn_ADHP_not_default_server_literal) == 0)
-            {
-            unicodeString.Copy(KFASTWarnNotDefaultServer);
-            }
+	{
 		EAP_TRACE_DEBUG(m_am_tools, 
 			TRACE_FLAGS_DEFAULT, 
 			(EAPL("eap_am_type_tls_peap_symbian_c::type_configure_readL This field will be read from EAP-FAST's special table\n")));
 		
-		sqlStatement.Format(KSQLQueryRow, &unicodeString, &m_db_fast_special_table_name, 
-			&KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);		
-	    }
+		sqlStatement.Format(
+			KSQLQueryRow,
+			&unicodeString,
+			&m_db_fast_special_table_name, 
+			&KServiceType,
+			m_index_type,
+			&KServiceIndex,
+			m_index,
+			&KTunnelingTypeVendorId,
+			m_tunneling_type.get_vendor_id(),
+			&KTunnelingType, 
+			m_tunneling_type.get_vendor_type());
+	}
 	else
-	    {
-		sqlStatement.Format(KSQLQueryRow, &unicodeString, &m_db_table_name, 
-			&KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);		
-	    }
+	{
+		sqlStatement.Format(
+			KSQLQueryRow,
+			&unicodeString,
+			&m_db_table_name, 
+			&KServiceType,
+			m_index_type,
+			&KServiceIndex,
+			m_index,
+			&KTunnelingTypeVendorId,
+			m_tunneling_type.get_vendor_id(),
+			&KTunnelingType, 
+			m_tunneling_type.get_vendor_type());
+	}
 	
 #else
 
-	sqlStatement.Format(KSQLQueryRow, &unicodeString, &m_db_table_name, 
-		&KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+	sqlStatement.Format(
+		KSQLQueryRow,
+		&unicodeString,
+		&m_db_table_name, 
+		&KServiceType,
+		m_index_type,
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType, 
+		m_tunneling_type.get_vendor_type());
 		
 #endif // End: #if defined(USE_FAST_EAP_TYPE)
-	
+
 	RDbView view;
 	User::LeaveIfError(view.Prepare(m_database, TDbQuery(sqlStatement), TDbWindow::EUnlimited));
 	CleanupClosePushL(view);
@@ -3560,10 +3589,10 @@
 
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 }
+
 //--------------------------------------------------
 
 //
-
 EAP_FUNC_EXPORT eap_status_e eap_am_type_tls_peap_symbian_c::type_configure_write(
 	const eap_configuration_field_c * const field,
 	eap_variable_data_c * const data)
@@ -3600,9 +3629,21 @@
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 	
-	_LIT(KSQLInsert, "SELECT %s FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLInsert, field_name.PtrZ(), &m_db_table_name, 
-		&KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+	_LIT(KSQLInsert, "SELECT %s FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+
+	sqlStatement.Format(
+		KSQLInsert,
+		field_name.PtrZ(),
+		&m_db_table_name, 
+		&KServiceType,
+		m_index_type,
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType, 
+		m_tunneling_type.get_vendor_type());
+
 	// Evaluate view
 	RDbView view;
 	User::LeaveIfError(view.Prepare(m_database,TDbQuery(sqlStatement), TDbWindow::EUnlimited));
@@ -3630,6 +3671,8 @@
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
 }
 
+//--------------------------------------------------
+
 void eap_am_type_tls_peap_symbian_c::WriteIntParamL(
 	eap_config_string field,
 	const u32_t field_length,
@@ -3648,9 +3691,20 @@
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
-	_LIT(KSQLInsert, "SELECT %s FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLInsert, field_name.PtrZ(), &m_db_table_name, 
-		&KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+	_LIT(KSQLInsert, "SELECT %s FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+
+	sqlStatement.Format(
+		KSQLInsert,
+		field_name.PtrZ(),
+		&m_db_table_name, 
+		&KServiceType,
+		m_index_type,
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType, 
+		m_tunneling_type.get_vendor_type());
 	
 	// Evaluate view
 	RDbView view;
@@ -3678,6 +3732,8 @@
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 }
 
+//--------------------------------------------------
+
 void eap_am_type_tls_peap_symbian_c::WriteIntParamL(
 	eap_config_string field,
 	const u32_t field_length,
@@ -3696,9 +3752,20 @@
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
-	_LIT(KSQLInsert, "SELECT %s FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLInsert, field_name.PtrZ(), &m_db_table_name, 
-		&KServiceType, m_index_type, &KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+	_LIT(KSQLInsert, "SELECT %s FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+
+	sqlStatement.Format(
+		KSQLInsert,
+		field_name.PtrZ(),
+		&m_db_table_name, 
+		&KServiceType,
+		m_index_type,
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType, 
+		m_tunneling_type.get_vendor_type());
 	
 	// Evaluate view
 	RDbView view;
@@ -3788,7 +3855,6 @@
 
 //--------------------------------------------------
 
-
 EAP_FUNC_EXPORT eap_status_e eap_am_type_tls_peap_symbian_c::query_cipher_suites_and_previous_session()
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -3876,7 +3942,7 @@
 				{
 					m_state = EHandlingCipherSuiteQuery;
 					
-					TRAPD(err, m_cert_if->ReadCACertificateL(m_allowed_ca_certs[0]));
+					TRAPD(err, m_cert_if->ReadCACertificateL(*m_allowed_ca_certs[0]));
 					if (err != KErrNone)
 					{
 						// Error occurred. Just select all cipher suites.
@@ -3939,6 +4005,7 @@
 				return EAP_STATUS_RETURN(m_am_tools, status);
 			}
 		}
+
 		if (m_allowed_cipher_suites.Find(tls_cipher_suites_TLS_RSA_WITH_AES_128_CBC_SHA) != KErrNotFound
 			// AND the algorithm matches the certificates algorithm
 			&& (select_all_cipher_suites == true
@@ -3960,6 +4027,7 @@
 				return EAP_STATUS_RETURN(m_am_tools, status);
 			}
 		}
+
 		if (m_allowed_cipher_suites.Find(tls_cipher_suites_TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA) != KErrNotFound
 			// AND the algorithm matches the certificates algorithm
 			&& (select_all_cipher_suites == true
@@ -3981,6 +4049,7 @@
 				return EAP_STATUS_RETURN(m_am_tools, status);
 			}
 		}
+
 		if (m_allowed_cipher_suites.Find(tls_cipher_suites_TLS_DHE_DSS_WITH_AES_128_CBC_SHA) != KErrNotFound
 			// AND the algorithm matches the certificates algorithm
 			&& (select_all_cipher_suites == true
@@ -4002,6 +4071,7 @@
 				return EAP_STATUS_RETURN(m_am_tools, status);
 			}
 		}
+
 		if (m_allowed_cipher_suites.Find(tls_cipher_suites_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA) != KErrNotFound
 			// AND the algorithm matches the certificates algorithm
 			&& (select_all_cipher_suites == true
@@ -4023,6 +4093,7 @@
 				return EAP_STATUS_RETURN(m_am_tools, status);
 			}
 		}
+
 		if (m_allowed_cipher_suites.Find(tls_cipher_suites_TLS_DHE_RSA_WITH_AES_128_CBC_SHA) != KErrNotFound
 			// AND the algorithm matches the certificates algorithm
 			&& (select_all_cipher_suites == true
@@ -4044,6 +4115,7 @@
 				return EAP_STATUS_RETURN(m_am_tools, status);
 			}
 		}
+
 		if (m_allowed_cipher_suites.Find(tls_cipher_suites_TLS_RSA_WITH_RC4_128_MD5) != KErrNotFound
 			// AND the algorithm matches the certificates algorithm
 			&& (select_all_cipher_suites == true
@@ -4065,6 +4137,7 @@
 				return EAP_STATUS_RETURN(m_am_tools, status);
 			}
 		}
+
 		if (m_allowed_cipher_suites.Find(tls_cipher_suites_TLS_RSA_WITH_RC4_128_SHA) != KErrNotFound
 			// AND the algorithm matches the certificates algorithm
 			&& (select_all_cipher_suites == true
@@ -4444,9 +4517,11 @@
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 	EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("\n")));
-	EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("TLS: %s: message_function: verify_certificate_chain_and_query_public_key()\n"),
+	EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("TLS: %s: message_function: verify_certificate_chain()\n"),
 		(m_is_client == true ? "client": "server")));
 
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_type_tls_peap_symbian_c::verify_certificate_chain()");
+
 	EAP_ASSERT_ALWAYS(certificate_chain->get_object_count() > 0);
 
 	eap_status_e status(eap_status_ok);
@@ -4468,15 +4543,20 @@
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
 
+//--------------------------------------------------
+
 void eap_am_type_tls_peap_symbian_c::verify_certificate_chainL(
 	EAP_TEMPLATE_CONST eap_array_c<eap_variable_data_c> * const certificate_chain,
 	const tls_cipher_suites_e required_cipher_suite)
 {
-	EAP_TRACE_DEBUG(m_am_tools, 
-	TRACE_FLAGS_DEFAULT, 
-	(EAPL("eap_am_type_tls_peap_symbian_c::verify_certificate_chainL: Number of certificates in chain=%d\n"),
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("eap_am_type_tls_peap_symbian_c::verify_certificate_chainL(): Number of certificates in chain=%d\n"),
 		certificate_chain->get_object_count()));
 
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_type_tls_peap_symbian_c::verify_certificate_chainL()");
+
 	eap_status_e status(eap_status_process_general_error);
 	if (m_is_client)
 	{
@@ -4492,6 +4572,11 @@
 			|| (m_use_manual_realm == true
 				&& m_manual_realm.get_is_valid_data() == true)))
 	{
+		EAP_TRACE_DEBUG(
+			m_am_tools, 
+			TRACE_FLAGS_DEFAULT, 
+			(EAPL("eap_am_type_tls_peap_symbian_c::verify_certificate_chainL(): Does server certificate realm verification\n")));
+
 		eap_variable_data_c client_subject_realm(m_am_tools);
 		eap_variable_data_c manual_client_subject_realm(m_am_tools);
 		eap_variable_data_c client_issuer_realm(m_am_tools);
@@ -4705,10 +4790,29 @@
 				}
 			}
 		}
+
 		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("Server certificate realm verification OK.\n")));
 	}
-
-	HBufC8* chain = HBufC8::NewL(0);
+	else
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools, 
+			TRACE_FLAGS_DEFAULT, 
+			(EAPL("eap_am_type_tls_peap_symbian_c::verify_certificate_chainL(): No server certificate realm verification\n")));
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	HBufC8* chain = HBufC8::NewL(1);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("eap_am_type_tls_peap_symbian_c::verify_certificate_chainL(): Calls CleanupStack::PushL(chain)\n")));
+
+	CleanupStack::PushL(chain);
+	chain->Des().SetLength(0);
+
 	HBufC8* temp;
 	eap_variable_data_c* cert;
 	
@@ -4728,50 +4832,61 @@
 	
 #if defined(_DEBUG) || defined(DEBUG)
 
-		TPtr8 certPtr(
-			cert->get_data(cert->get_data_length()), 
-			cert->get_data_length(),
-			cert->get_data_length());
-		CX509Certificate* x509Cert = CX509Certificate::NewL(certPtr);
-
-		if( x509Cert != NULL )
-		{				
-			CleanupStack::PushL(x509Cert);
-
-			TKeyIdentifier KeyIdentifier = x509Cert->KeyIdentifierL();
-			
-			EAP_TRACE_DATA_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("Key identifier is"),
-				KeyIdentifier.Ptr(),
-				KeyIdentifier.Size()));
-								
-			// This is for subject key id.
-			const CX509CertExtension* certExt = x509Cert->Extension(KSubjectKeyId);
-			
-			if (certExt)
-			{
-				const CX509SubjectKeyIdExt* subKeyExt = CX509SubjectKeyIdExt::NewLC(certExt->Data());
-				EAP_UNREFERENCED_PARAMETER(subKeyExt);
-
-				EAP_TRACE_DATA_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("The Subject key Id is:"),
-					subKeyExt->KeyId().Ptr(),
-					subKeyExt->KeyId().Size()));					
+		{
+			TPtr8 certPtr(
+				cert->get_data(cert->get_data_length()), 
+				cert->get_data_length(),
+				cert->get_data_length());
+
+			CX509Certificate* x509Cert = CX509Certificate::NewL(certPtr);
+
+			if( x509Cert != NULL )
+			{				
+				CleanupStack::PushL(x509Cert);
+
+				TKeyIdentifier KeyIdentifier = x509Cert->KeyIdentifierL();
+				
+				EAP_TRACE_DATA_DEBUG(
+					m_am_tools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("Key identifier is"),
+					KeyIdentifier.Ptr(),
+					KeyIdentifier.Size()));
+									
+				// This is for subject key id.
+				const CX509CertExtension* certExt = x509Cert->Extension(KSubjectKeyId);
 				
-				CleanupStack::PopAndDestroy(); // subKeyExt					
-			}
-			else
-			{
-				EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: verify_certificate_chainL - No extension for this certificate\n")));			
-			}
-			
-			CleanupStack::PopAndDestroy(x509Cert);
-		}
-
+				if (certExt)
+				{
+					const CX509SubjectKeyIdExt* subKeyExt = CX509SubjectKeyIdExt::NewLC(certExt->Data());
+					EAP_UNREFERENCED_PARAMETER(subKeyExt);
+
+					EAP_TRACE_DATA_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("The Subject key Id is:"),
+						subKeyExt->KeyId().Ptr(),
+						subKeyExt->KeyId().Size()));					
+					
+					CleanupStack::PopAndDestroy();
+				}
+				else
+				{
+					EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: verify_certificate_chainL - No extension for this certificate\n")));			
+				}
+				
+				CleanupStack::PopAndDestroy();
+			}
+		}
 #endif
 
+		temp = chain->ReAllocL(chain->Length() + cert->get_data_length());
+
+		CleanupStack::Pop(chain);
+
+		chain = temp;
+
 		CleanupStack::PushL(chain);
-		temp = chain->ReAllocL(chain->Length() + cert->get_data_length());
-		chain = temp;
+
 		TPtr8 ptr = chain->Des();
+
 		ptr.Append(cert->get_data(cert->get_data_length()), cert->get_data_length());
 		if (i == 0)
 		{
@@ -4782,37 +4897,108 @@
 			}
 			m_peer_certificate = CX509Certificate::NewL(ptr);
 		}
-		CleanupStack::Pop();
-	}
-	CleanupStack::PushL(chain);
+
+	} // for()
+
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("eap_am_type_tls_peap_symbian_c::verify_certificate_chainL(): calls chain->Des()\n")));
+
 	TPtr8 certChain = chain->Des();
-	m_cert_if->ValidateChainL(certChain, m_allowed_ca_certs);
-	
-	CleanupStack::PopAndDestroy();
+	TBool aUseAutomaticCaCertificate = (m_use_automatic_ca_certificate == true) ? ETrue : EFalse;
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("eap_am_type_tls_peap_symbian_c::verify_certificate_chainL(): calls m_cert_if->ValidateChainL()\n")));
+
+	m_cert_if->ValidateChainL(certChain, m_allowed_ca_certs, aUseAutomaticCaCertificate);
+	
+	CleanupStack::PopAndDestroy(chain);
+
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+
 	// This returns eap_status_pending_request
 	User::Leave(KErrCompletion);
 
 }
 
+//--------------------------------------------------
+
+#if defined(USE_EAP_DEBUG_TRACE)
+
+static eap_const_string get_certificate_error_string(const enum TValidationError certificate_error)
+{
+#if defined(USE_EAP_TRACE_STRINGS)
+	EAP_IF_RETURN_STRING(certificate_error, EValidatedOK)
+	else EAP_IF_RETURN_STRING(certificate_error, EChainHasNoRoot)
+	else EAP_IF_RETURN_STRING(certificate_error, ESignatureInvalid)
+	else EAP_IF_RETURN_STRING(certificate_error, EDateOutOfRange)
+	else EAP_IF_RETURN_STRING(certificate_error, ENameIsExcluded)
+	else EAP_IF_RETURN_STRING(certificate_error, ENameNotPermitted)
+	else EAP_IF_RETURN_STRING(certificate_error, ENotCACert)
+	else EAP_IF_RETURN_STRING(certificate_error, ECertificateRevoked)
+	else EAP_IF_RETURN_STRING(certificate_error, EUnrecognizedCriticalExtension)
+	else EAP_IF_RETURN_STRING(certificate_error, ENoBasicConstraintInCACert)
+	else EAP_IF_RETURN_STRING(certificate_error, ENoAcceptablePolicy)
+	else EAP_IF_RETURN_STRING(certificate_error, EPathTooLong)
+	else EAP_IF_RETURN_STRING(certificate_error, ENegativePathLengthSpecified)
+	else EAP_IF_RETURN_STRING(certificate_error, ENamesDontChain)
+	else EAP_IF_RETURN_STRING(certificate_error, ERequiredPolicyNotFound)
+	else EAP_IF_RETURN_STRING(certificate_error, EBadKeyUsage)
+	else EAP_IF_RETURN_STRING(certificate_error, ERootCertNotSelfSigned)
+	else EAP_IF_RETURN_STRING(certificate_error, ECriticalExtendedKeyUsage)
+	else EAP_IF_RETURN_STRING(certificate_error, ECriticalCertPoliciesWithQualifiers)
+	else EAP_IF_RETURN_STRING(certificate_error, ECriticalPolicyMapping)
+	else EAP_IF_RETURN_STRING(certificate_error, ECriticalDeviceId)
+	else EAP_IF_RETURN_STRING(certificate_error, ECriticalSid)
+	else EAP_IF_RETURN_STRING(certificate_error, ECriticalVid)
+	else EAP_IF_RETURN_STRING(certificate_error, ECriticalCapabilities)
+#endif // #if defined(USE_EAP_TRACE_STRINGS)
+	{
+		EAP_UNREFERENCED_PARAMETER(certificate_error);
+		return EAPL("Unknown TValidationError");
+	}
+}
+
+#endif //#if defined(USE_EAP_DEBUG_TRACE)
+
+//--------------------------------------------------
 
 void eap_am_type_tls_peap_symbian_c::complete_validate_chain(
-	CPKIXValidationResult& aValidationResult, eap_status_e aStatus)
+	CPKIXValidationResult& aValidationResult,
+	eap_status_e aStatus)
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
 	
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("eap_am_type_tls_peap_symbian_c::complete_validate_chain(): Certificate chain validation reason=%d=%s, status=%d=%s\n"), 
+		aValidationResult.Error().iReason,
+		get_certificate_error_string(aValidationResult.Error().iReason),
+		aStatus,
+		eap_status_string_c::get_status_string(aStatus)));
+
 	if(aStatus != eap_status_ok)
 	{
 		get_tls_am_partner()->complete_verify_certificate_chain(aStatus);
 		return;
 	}
 	
-	eap_status_e result;	
+	eap_status_e result(eap_status_ok);
+
 	if (aValidationResult.Error().iReason == EValidatedOK) 
 	{
-		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, 
-			(EAPL("Certificate chain validation OK. Reason: %d\n"), 
-			aValidationResult.Error().iReason));
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT, 
+			(EAPL("Certificate chain validation OK. Reason: %d=%s\n"), 
+			aValidationResult.Error().iReason,
+			get_certificate_error_string(aValidationResult.Error().iReason)));
+
 		result = eap_status_ok;
 	}
 	else
@@ -4828,9 +5014,12 @@
 			// Ignore error on purpose			
 		}
 
-		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, 
-			(EAPL("ERROR: Certificate chain validation FAILED. Reason: %d\n"), 
-			aValidationResult.Error().iReason));
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT, 
+			(EAPL("ERROR: Certificate chain validation FAILED. Reason: %d=%s\n"), 
+			aValidationResult.Error().iReason,
+			get_certificate_error_string(aValidationResult.Error().iReason)));
 			
 		result = eap_status_illegal_certificate;
 	}
@@ -4851,203 +5040,63 @@
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 }
 
+//--------------------------------------------------
+
 #if defined(USE_FAST_EAP_TYPE)
 #if defined(USE_EAP_CONFIGURATION_TO_SKIP_USER_INTERACTIONS)
+
 eap_status_e eap_am_type_tls_peap_symbian_c::ReadFileConfig()
-    {
-        eap_status_e status = eap_status_ok;
-        
-        eap_am_file_input_symbian_c * const fileio = new eap_am_file_input_symbian_c(m_am_tools);
-
-        eap_automatic_variable_c<eap_am_file_input_symbian_c> automatic_fileio(m_am_tools, fileio);
-
-        if (fileio != 0
-            && fileio->get_is_valid() == true)
-        {
-            EAP_TRACE_DEBUG(
-                m_am_tools,
-                TRACE_FLAGS_DEFAULT,
-                (EAPL("Initialize file configuration.\n")));
-
-            eap_variable_data_c file_name_c_data(m_am_tools);
-
-             {
-                #if defined(EAPOL_SYMBIAN_VERSION_7_0_s)
-                    eap_const_string const FILECONFIG_FILENAME_C
-                        = "c:\\system\\data\\eap.conf";
-                #else
-                    eap_const_string const FILECONFIG_FILENAME_C
-                        = "c:\\private\\101F8EC5\\eap.conf";
-                #endif
-
-                status = file_name_c_data.set_copy_of_buffer(
-                    FILECONFIG_FILENAME_C,
-                    m_am_tools->strlen(FILECONFIG_FILENAME_C));
-                if (status != eap_status_ok)
-                {
-                    EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-                    return EAP_STATUS_RETURN(m_am_tools, status);
-                }
-
-                status = file_name_c_data.add_end_null();
-                if (status != eap_status_ok)
-                {
-                    EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-                    return EAP_STATUS_RETURN(m_am_tools, status);
-                }
-            }
-
-            eap_variable_data_c file_name_z_data(m_am_tools);
-
-            {
-                #if defined(EAPOL_SYMBIAN_VERSION_7_0_s)
-                    eap_const_string const FILECONFIG_FILENAME_Z
-                        = "z:\\system\\data\\eap.conf";
-                #else
-                    eap_const_string const FILECONFIG_FILENAME_Z
-                        = "z:\\private\\101F8EC5\\eap.conf";
-                #endif
-
-                status = file_name_z_data.set_copy_of_buffer(
-                    FILECONFIG_FILENAME_Z,
-                    m_am_tools->strlen(FILECONFIG_FILENAME_Z));
-                if (status != eap_status_ok)
-                {
-                    EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-                    return EAP_STATUS_RETURN(m_am_tools, status);
-                }
-
-                status = file_name_z_data.add_end_null();
-                if (status != eap_status_ok)
-                {
-                    EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-                    return EAP_STATUS_RETURN(m_am_tools, status);
-                }
-            }
-
-
-
-            if (status == eap_status_ok)
-            {
-                // First try open from C: disk.
-                status = fileio->file_open(
-                    &file_name_c_data,
-                    eap_file_io_direction_read);
-                if (status == eap_status_ok)
-                {
-                    EAP_TRACE_DEBUG(
-                        m_am_tools,
-                        TRACE_FLAGS_DEFAULT,
-                        (EAPL("Opens configure file %s\n"),
-                        file_name_c_data.get_data(file_name_c_data.get_data_length())));
-                }
-                else if (status != eap_status_ok)
-                {
-                    // Second try open from Z: disk.
-                    status = fileio->file_open(
-                        &file_name_z_data,
-                        eap_file_io_direction_read);
-                    if (status == eap_status_ok)
-                    {
-                        EAP_TRACE_DEBUG(
-                            m_am_tools,
-                            TRACE_FLAGS_DEFAULT,
-                            (EAPL("Opens configure file %s\n"),
-                             file_name_z_data.get_data(file_name_z_data.get_data_length())));
-                    }
-                }
-
-                if (status == eap_status_ok)
-                {
-                    // Some of the files were opened.
-
-                    m_fileconfig = new eap_file_config_c(m_am_tools);
-                    if (m_fileconfig != 0
-                        && m_fileconfig->get_is_valid() == true)
-                    {
-                        status = m_fileconfig->configure(fileio);
-                        if (status != eap_status_ok)
-                        {
-                            EAP_TRACE_DEBUG(
-                                m_am_tools,
-                                TRACE_FLAGS_DEFAULT,
-                                (EAPL("ERROR: Configure read from %s failed.\n"),
-                                file_name_c_data.get_data(file_name_c_data.get_data_length())));
-                        }
-                        else
-                        {
-                            EAP_TRACE_DEBUG(
-                                m_am_tools,
-                                TRACE_FLAGS_DEFAULT,
-                                (EAPL("Configure read from %s\n"),
-                                file_name_c_data.get_data(file_name_c_data.get_data_length())));
-                        }
-                    }
-                    else
-                    {
-                        // No file configuration.
-                        delete m_fileconfig;
-                        m_fileconfig = 0;
-
-                        EAP_TRACE_DEBUG(
-                            m_am_tools,
-                            TRACE_FLAGS_DEFAULT,
-                            (EAPL("ERROR: Cannot create configure object for file %s\n"),
-                            file_name_c_data.get_data(file_name_c_data.get_data_length())));
-                    }
-                }
-                else
-                {
-                    EAP_TRACE_DEBUG(
-                        m_am_tools,
-                        TRACE_FLAGS_DEFAULT,
-                        (EAPL("ERROR: Cannot open configure file neither %s nor %s\n"),
-                        file_name_c_data.get_data(file_name_c_data.get_data_length()),
-                        file_name_z_data.get_data(file_name_z_data.get_data_length())));
-                }
-            }
-        }
-        else
-        {
-            EAP_TRACE_DEBUG(
-                m_am_tools,
-                TRACE_FLAGS_DEFAULT,
-                (EAPL("Skips file configuration.\n")));
-        }
-
-    eap_variable_data_c skip_user_interactions(m_am_tools);
-
-    if (m_fileconfig != 0
-            && m_fileconfig->get_is_valid() == true)
-        {
-            // Here we could try the final configuration option.
-            status = m_fileconfig->read_configure(
-                    cf_str_EAP_skip_user_interactions_for_testing_purposes.get_field(),
-                    &skip_user_interactions);
-        }
-
-    if (status == eap_status_ok
-        && skip_user_interactions.get_is_valid_data() == true)
-    {
-        u32_t *skip_user_interactions_flag = reinterpret_cast<u32_t *>(
-            skip_user_interactions.get_data(sizeof(u32_t)));
-        if (skip_user_interactions_flag != 0)
-        {
-            if (*skip_user_interactions_flag != 0)
-            {
-                m_skip_user_interactions = true;
-            }
-            else
-            {
-                m_skip_user_interactions = false;
-            }
-        }
-    }
-
-    iPacStoreDb->SkipUserActions (m_skip_user_interactions);        
-    
-     return status;
-    }
+{
+	eap_status_e status = eap_status_ok;
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = EapConfigToolsSymbian::EapReadDefaultConfigFileSymbian(
+	m_am_tools,
+	&m_fileconfig);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+
+	eap_variable_data_c skip_user_interactions(m_am_tools);
+
+	if (m_fileconfig != 0
+	&& m_fileconfig->get_is_valid() == true)
+	{
+		// Here we could try the final configuration option.
+		status = m_fileconfig->read_configure(
+			cf_str_EAP_skip_user_interactions_for_testing_purposes.get_field(),
+			&skip_user_interactions);
+	}
+
+	if (status == eap_status_ok
+	&& skip_user_interactions.get_is_valid_data() == true)
+	{
+		u32_t *skip_user_interactions_flag = reinterpret_cast<u32_t *>(
+			skip_user_interactions.get_data(sizeof(u32_t)));
+		if (skip_user_interactions_flag != 0)
+		{
+			if (*skip_user_interactions_flag != 0)
+			{
+				m_skip_user_interactions = true;
+			}
+			else
+			{
+				m_skip_user_interactions = false;
+			}
+		}
+	}
+
+	iPacStoreDb->SkipUserActions(m_skip_user_interactions);        
+
+	return status;
+}
+
 #endif //#if defined(USE_EAP_CONFIGURATION_TO_SKIP_USER_INTERACTIONS)
 #endif
 
@@ -5072,7 +5121,8 @@
 
 	if (m_is_client)
 	{
-		// Get the matching certificates
+		// client
+		// Get the matching certificates. This function call is completed asyncronously by complete_get_matching_certificates() function call.
 		TRAPD(err, m_cert_if->GetMatchingCertificatesL(
 			m_allowed_user_certs, 
 			ETrue, 
@@ -5087,6 +5137,7 @@
 	else
 	{
 		// server
+		// Get the matching certificates. This function call is completed asyncronously by complete_get_matching_certificates() function call.
 		TRAPD(err, m_cert_if->GetMatchingCertificatesL(
 				m_allowed_user_certs, 
 				EFalse, 
@@ -5116,8 +5167,10 @@
 
 }
 
+//--------------------------------------------------
+
 void eap_am_type_tls_peap_symbian_c::complete_get_matching_certificates(
-	CArrayFixFlat<SCertEntry>& aMatchingCerts,
+	RPointerArray<EapCertificateEntry>& aMatchingCerts,
 	eap_status_e aStatus)
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -5138,17 +5191,39 @@
 
 		// Add found certs to allowed certificate list.
 		// This list is updated here because there might be certificates that have been removed.
-		m_allowed_user_certs.Reset();
-		for (TInt i = 0; i < aMatchingCerts.Count(); i++)
-		{
-			TRAPD(err, m_allowed_user_certs.AppendL(aMatchingCerts[i]));
-			if (err != KErrNone)
+		m_allowed_user_certs.ResetAndDestroy();
+
+		for (TInt i = 0; i < aMatchingCerts.Count() && aMatchingCerts[i] != 0; i++)
+		{
+			EapCertificateEntry * const entry = aMatchingCerts[i]->Copy();
+			if (entry == 0)
 			{
 				EAP_TRACE_DEBUG(
 					m_am_tools,
 					TRACE_FLAGS_DEFAULT,
-					(EAPL("ERROR: eap_am_type_tls_peap_symbian_c::complete_get_matching_certificates -EHandlingIdentityQuery- Error=%d\n"),
-					err));
+					(EAPL("ERROR: EAP-TLS: No memory.\n")));
+
+				get_am_partner()->complete_eap_identity_query(
+					0, // 0 because identity query failed
+					&m_receive_network_id,
+					m_eap_identifier,
+					eap_status_allocation_error, 
+					false, 
+					0, 
+					false, 
+					0);
+				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+				return;	
+			}
+
+			TInt error = m_allowed_user_certs.Append(entry->Copy());
+			if (error != KErrNone)
+			{
+				EAP_TRACE_DEBUG(
+					m_am_tools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("ERROR: eap_am_type_tls_peap_symbian_c::complete_get_matching_certificates(): -EHandlingIdentityQuery- Error=%d\n"),
+					error));
 			
 				get_am_partner()->complete_eap_identity_query(
 					0, // 0 because identity query failed
@@ -5200,35 +5275,60 @@
 				EAP_TRACE_DEBUG(
 					m_am_tools, 
 					TRACE_FLAGS_DEFAULT, 
-					(EAPL("eap_am_type_tls_peap_symbian_c: no manual realm - no user cert. Get realm from CA certificate.\n")));
+					(EAPL("eap_am_type_tls_peap_symbian_c::complete_get_matching_certificates(): no manual realm - no user cert. Get realm from CA certificate.\n")));
 				
 				TInt allowed_ca_cert_count = m_allowed_ca_certs.Count();
 				TInt err(KErrNone);
-				
+
 				if(allowed_ca_cert_count > 0)
 				{
-					TRAP(err, m_cert_if->ReadCACertificateL(m_allowed_ca_certs[0]));
+					TRAP(err, m_cert_if->ReadCACertificateL(*m_allowed_ca_certs[0]));
 				}
-				if (err != KErrNone || allowed_ca_cert_count <= 0)
+
+				if (err != KErrNone
+					|| allowed_ca_cert_count <= 0)
 				{
-					EAP_TRACE_DEBUG(
-					m_am_tools,
-					TRACE_FLAGS_DEFAULT,
-					(EAPL("ERROR: EAP-TLS: Cannot read user certificate or No CA cert configured, CA cert count=%d.\n"),
-					allowed_ca_cert_count));
-
-					get_am_partner()->complete_eap_identity_query(
-						0, // 0 because identity query failed
-						&m_receive_network_id,
-						m_eap_identifier,
-						eap_status_illegal_certificate, 
-						false, 
-						0, 
-						false, 
-						0);
-					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-					return;	
+					if (m_use_automatic_ca_certificate == false)
+					{
+						EAP_TRACE_DEBUG(
+							m_am_tools,
+							TRACE_FLAGS_DEFAULT,
+							(EAPL("ERROR: EAP-TLS: eap_am_type_tls_peap_symbian_c::complete_get_matching_certificates(): Cannot read user certificate and no CA cert configured, CA cert count=%d.\n"),
+							allowed_ca_cert_count));
+
+						get_am_partner()->complete_eap_identity_query(
+							0, // 0 because identity query failed
+							&m_receive_network_id,
+							m_eap_identifier,
+							eap_status_illegal_certificate, 
+							false, 
+							0, 
+							false, 
+							0);
+
+						EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+						return;
+					}
+					else
+					{
+						EAP_TRACE_DEBUG(
+							m_am_tools,
+							TRACE_FLAGS_DEFAULT,
+							(EAPL("WARNING: EAP-TLS: eap_am_type_tls_peap_symbian_c::complete_get_matching_certificates(): Cannot read user certificate and automatic CA cert configured, CA cert count=%d.\n"),
+							m_allowed_ca_certs.Count()));
+
+						get_am_partner()->complete_eap_identity_query(
+							0, // 0 because certificate query failed
+							&m_receive_network_id,
+							m_eap_identifier,
+							eap_status_ok, 
+							false, 
+							0, 
+							false, 
+							0);
+					}
 				}
+
 				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 				return;
 			}
@@ -5240,14 +5340,14 @@
 					(EAPL("EAP-TLS: Uses manual realm.\n")));
 
 				get_am_partner()->complete_eap_identity_query(
-						0, // 0 because certificate query failed
-						&m_receive_network_id,
-						m_eap_identifier,
-						eap_status_ok, 
-						m_use_manual_username, 
-						&m_manual_username, 
-						m_use_manual_realm, 
-						&m_manual_realm);
+					0, // 0 because certificate query failed
+					&m_receive_network_id,
+					m_eap_identifier,
+					eap_status_ok, 
+					m_use_manual_username, 
+					&m_manual_username, 
+					m_use_manual_realm, 
+					&m_manual_realm);
 
 			}
 			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
@@ -5265,20 +5365,31 @@
 		
 		if (aMatchingCerts.Count() > 0)
 		{
-				m_allowed_user_certs.Reset();
-			
-				for (TInt i = 0; i < aMatchingCerts.Count(); i++)
+			TInt error;
+
+			m_allowed_user_certs.ResetAndDestroy();
+		
+			for (TInt i = 0; i < aMatchingCerts.Count(); i++)
+			{
+				EapCertificateEntry * const entry = aMatchingCerts[i]->Copy();
+				if (entry != 0)
+				{
+					TRAP(error, m_allowed_user_certs.AppendL(entry));
+				}
+				else
 				{
-					TRAPD(err, m_allowed_user_certs.AppendL(aMatchingCerts[i]));
-					if (err != KErrNone)
-					{
-						EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("eap_am_type_tls_peap_symbian_c::complete_get_matching_certificates -EHandlingChainQuery- Error=%d\n"),
-						err));
-									
-						get_tls_am_partner()->complete_query_certificate_chain(0, eap_status_allocation_error);
-						EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);		
-						return;					
-					} 
+					error = KErrNoMemory;
+				}
+
+				if (error != KErrNone)
+				{
+					EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: eap_am_type_tls_peap_symbian_c::complete_get_matching_certificates -EHandlingChainQuery- Error=%d\n"),
+						error));
+								
+					get_tls_am_partner()->complete_query_certificate_chain(0, eap_status_allocation_error);
+					EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);		
+					return;					
+				} 
 			}	
 		}
 
@@ -5287,10 +5398,18 @@
 			// No matching or allowed certs and no pre-loaded cert.
 			// Could not find matching certificate
 
-			EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("EAP-TLS: Could not find proper user certificate.\n")));
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("EAP-TLS: Could not find proper user certificate.\n")));
 
 			if (m_tls_peap_server_authenticates_client_policy_flag == true)
 			{
+				EAP_TRACE_DEBUG(
+					m_am_tools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("ERROR: EAP-TLS: Could not find proper user certificate and anonymous cliet is not allowed.\n")));
+
 				send_error_notification(eap_status_user_certificate_unknown);
 			}
 
@@ -5313,10 +5432,12 @@
 	{
 		EAP_TRACE_ERROR(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("EAP-TLS: Illegal state in complete_get_matching_certs.\n")));
 	}
+
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);	
 	return;
 }
 
+//--------------------------------------------------
 
 EAP_FUNC_EXPORT eap_status_e eap_am_type_tls_peap_symbian_c::query_certificate_authorities_and_types()
 {
@@ -5558,7 +5679,6 @@
 
 //--------------------------------------------------
 
-
 EAP_FUNC_EXPORT eap_status_e eap_am_type_tls_peap_symbian_c::save_tls_session(
 	const eap_variable_data_c * const session_id,
 	const eap_variable_data_c * const master_secret,
@@ -5651,7 +5771,7 @@
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
 }
-//--------------------------------------------------
+
 //--------------------------------------------------
 
 EAP_FUNC_EXPORT eap_status_e eap_am_type_tls_peap_symbian_c::rsa_encrypt_with_public_key(
@@ -5731,7 +5851,7 @@
 	ptr.Copy(encrypted_premaster_secret->get_data(encrypted_premaster_secret->get_data_length()), 
 		encrypted_premaster_secret->get_data_length());
 
-	TRAP(err, m_cert_if->DecryptL(m_own_certificate_info.iSubjectKeyId, *data));
+	TRAP(err, m_cert_if->DecryptL(m_own_certificate_info.GetSubjectKeyId(), *data));
 
 	if (err != KErrNone)
 	{
@@ -5793,6 +5913,7 @@
 }
 
 //--------------------------------------------------
+
 EAP_FUNC_EXPORT eap_status_e eap_am_type_tls_peap_symbian_c::sign_with_private_key(
 	const eap_variable_data_c * const message_hash)
 {
@@ -5851,7 +5972,7 @@
 		signature_length = public_key_data.Size();
 	}
 
-	TRAP(err, m_cert_if->SignL(m_own_certificate_info.iSubjectKeyId, hash, signature_length));
+	TRAP(err, m_cert_if->SignL(m_own_certificate_info.GetSubjectKeyId(), hash, signature_length));
 	if (err != KErrNone)
 	{
 		status = m_am_tools->convert_am_error_to_eapol_error(err);
@@ -5867,7 +5988,9 @@
 	return EAP_STATUS_RETURN(m_am_tools, status);
 		
 }
-//--------------------------------------------------
+
+//--------------------------------------------------
+
 void eap_am_type_tls_peap_symbian_c::complete_sign(
 	const RInteger& aR, const RInteger& aS, eap_status_e aStatus)
 {
@@ -5888,6 +6011,8 @@
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 }
 
+//--------------------------------------------------
+
 void eap_am_type_tls_peap_symbian_c::complete_signL(
 	const RInteger& aR, const RInteger& aS, eap_status_e aStatus)
 {
@@ -6049,7 +6174,7 @@
 	}
 	else
 	{
-		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: Signing with private key failed.\n")));
+		EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("ERROR: Verify with private key failed.\n")));
 		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 		return EAP_STATUS_RETURN(m_am_tools, eap_status_not_supported);
 	}
@@ -6066,6 +6191,8 @@
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
 
+//--------------------------------------------------
+
 void eap_am_type_tls_peap_symbian_c::read_dsa_parametersL()
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT); 
@@ -6123,6 +6250,7 @@
 //--------------------------------------------------
 // MODULE HANDLING FUNCTIONS
 //--------------------------------------------------
+
 eap_status_e eap_am_type_tls_peap_symbian_c::load_module(
 		const eap_type_value_e /*type*/,
 		const eap_type_value_e /* tunneling_type */,
@@ -6144,31 +6272,32 @@
 	
 	eap_status_e status(eap_status_illegal_eap_type);
 	
-#ifdef USE_EAP_EXPANDED_TYPES
-
 	EAP_TRACE_DEBUG(m_am_tools, 
 		TRACE_FLAGS_DEFAULT, 
-		(EAPL("eap_am_type_tls_peap_symbian_c::check_is_valid_eap_type:Given EAP vendor ID=%x, type=%x\n"),
-		eap_type.get_vendor_id(), eap_type.get_vendor_type()));	
+		(EAPL("eap_am_type_tls_peap_symbian_c::check_is_valid_eap_type:Given EAP-type=0xfe%06x%08x\n"),
+		eap_type.get_vendor_id(),
+		eap_type.get_vendor_type()));	
 		
 	for (TInt i = 0; i < m_enabled_tunneling_exp_eap_array.Count(); i++)
 	{
 		eap_expanded_type_c expEAPTmp;
 		
-		// This will read the expanded EAP from enabledEAPTypes[i]->iExpandedEAPType to expEAPTmp.
-		// This makes easy to get the vendor type.
-		eap_expanded_type_c::read_type( m_am_tools,
-										0,
-										m_enabled_tunneling_exp_eap_array[i]->iExpandedEAPType.Ptr(),
-										KExpandedEAPTypeSize,
-										&expEAPTmp);
-		
+		TInt error = CEapConversion::ConvertExpandedEAPTypeToInternalType(
+			m_enabled_tunneling_exp_eap_array[i],
+			&expEAPTmp);
+
+		if (error != KErrNone)
+		{
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(error));
+		}
+
 		EAP_TRACE_DATA_DEBUG(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
 			(EAPL("check_is_valid_eap_type:Checking with EAP type:"),
-	 		m_enabled_tunneling_exp_eap_array[i]->iExpandedEAPType.Ptr(),
-	 		m_enabled_tunneling_exp_eap_array[i]->iExpandedEAPType.Size()));	 			
+	 		m_enabled_tunneling_exp_eap_array[i]->GetValue().Ptr(),
+	 		m_enabled_tunneling_exp_eap_array[i]->GetValue().Size()));	 			
 		
 		if (eap_type == expEAPTmp)
 		{
@@ -6178,35 +6307,7 @@
 		}
 	}
 
-#else // For normal EAP types.
-	
-	TEap *eapType = 0; 
-	
-	TInt i(0);
-		
-	for (i = 0; i < m_iap_eap_array.Count(); i++)
-	{
-		// Try next EAP type
-		eapType = m_iap_eap_array[i];
-		if (eapType->Enabled == 1)
-		{	
-			// Convert the string to integer
-			TLex8 tmp(eapType->UID);
-			TInt val(0);
-			tmp.Val(val);
-			if (val == eap_type)
-			{
-				// Allowed
-				status = eap_status_ok;
-				break;
-			}	
-		}
-	}
-	
-#endif //#ifdef USE_EAP_EXPANDED_TYPES	
-	
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-
 	return EAP_STATUS_RETURN(m_am_tools, status);
 }
 
@@ -6223,15 +6324,11 @@
 
 	eap_status_e status(eap_status_illegal_eap_type);
 
-#ifdef USE_EAP_EXPANDED_TYPES
-
 	// We need to return only the EAP types available as enabled types.
 	// It means only the ones available in m_enabled_tunneling_exp_eap_array.
 	
 	for (TInt i = 0; i < m_enabled_tunneling_exp_eap_array.Count(); i++)
 	{	
-		TBuf8<KExpandedEAPTypeSize> tmpExpEAP(m_enabled_tunneling_exp_eap_array[i]->iExpandedEAPType);
-
 		EAP_TRACE_DEBUG(
 			m_am_tools, 
 			TRACE_FLAGS_DEFAULT, 
@@ -6242,25 +6339,27 @@
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
 			(EAPL("Enabled expanded EAP type:"),
-			tmpExpEAP.Ptr(),
-			tmpExpEAP.Size()));
+			m_enabled_tunneling_exp_eap_array[i]->GetValue().Ptr(),
+			m_enabled_tunneling_exp_eap_array[i]->GetValue().Size()));
 
 		// This is for one expanded EAP type (for the above one).
 		eap_type_value_e * expandedEAPType = new eap_type_value_e();
-				
-		// Read the expanded EAP type details from an item in m_enabled_tunneling_exp_eap_array.
-		status = eap_type_value_e::read_type(m_am_tools,
-												0,
-												&tmpExpEAP,
-												tmpExpEAP.Length(),
-												expandedEAPType);
-		if (status != eap_status_ok)
-		{
-			delete expandedEAPType;
-			expandedEAPType = 0;
+		
+		eap_automatic_variable_c<eap_type_value_e> automatic_expandedEAPType(
+			m_am_tools,
+			expandedEAPType);
+
+		TInt error = CEapConversion::ConvertExpandedEAPTypeToInternalType(
+			m_enabled_tunneling_exp_eap_array[i],
+			expandedEAPType);
+
+		if (error != KErrNone)
+		{
 			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-			return EAP_STATUS_RETURN(m_am_tools, status);
-		}
+			return EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(error));
+		}
+
+		automatic_expandedEAPType.do_not_free_variable();
 
 		// Add EAP-type to list.		
 		status = eap_type_list->add_object(expandedEAPType, true);
@@ -6276,56 +6375,19 @@
 		EAP_TRACE_DEBUG(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
-			(EAPL("get_eap_type_list():added EAP-type=0x%08x=%s\n"),
+			(EAPL("get_eap_type_list():added EAP-type=0xfe%06x%08x=%s\n"),
+			expandedEAPType->get_vendor_id(),
 			expandedEAPType->get_vendor_type(),
-			eap_string.get_eap_type_string(*expandedEAPType)));			
+			eap_header_string_c::get_eap_type_string(*expandedEAPType)));			
 	
 	}// for()
 
-#else // for normal EAP types.
-
-	TEap *eapType = 0; 
-
-	status = eap_type_list->reset();
-	if (status != eap_status_ok)
-	{
-		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-		return EAP_STATUS_RETURN(m_am_tools, status);
-	}
-
-
-	for (TInt i = 0; i < m_iap_eap_array.Count(); i++)
-	{
-		// Check if type is enabled
-		eapType = m_iap_eap_array[i];
-		if (eapType->Enabled == 1)
-		{	
-			TLex8 tmp(eapType->UID);
-			TInt val(0);
-			tmp.Val(val);
-
-			eap_type_value_e * const eap_type = new eap_type_value_e(static_cast<eap_type_ietf_values_e>(val));
-			if (eap_type == 0)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
-			}
-
-			status = eap_type_list->add_object(eap_type, true);
-			if (status != eap_status_ok)
-			{
-				EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
-				return EAP_STATUS_RETURN(m_am_tools, status);
-			}
-		}
-	} // for()
-
-#endif // #ifdef USE_EAP_EXPANDED_TYPES
-
 	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 	return eap_status_ok;
 }
 
+//--------------------------------------------------
+
 eap_status_e eap_am_type_tls_peap_symbian_c::unload_module(const eap_type_value_e /*type*/)
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -6333,6 +6395,7 @@
 	return EAP_STATUS_RETURN(m_am_tools, eap_status_not_supported);
 }
 
+//--------------------------------------------------
 
 void eap_am_type_tls_peap_symbian_c::send_error_notification(const eap_status_e error)
 {
@@ -6371,11 +6434,15 @@
 	m_partner->state_notification(&notification);
 }
 
+//--------------------------------------------------
+
 eap_status_e eap_am_type_tls_peap_symbian_c::show_certificate_selection_dialog()
 {
 	return eap_status_ok;
 }
 
+//--------------------------------------------------
+
 eap_status_e eap_am_type_tls_peap_symbian_c::show_manual_identity_dialog()
 {
 	return eap_status_ok;
@@ -6384,6 +6451,7 @@
 //--------------------------------------------------
 // CANCELLATION FUNCTIONS
 //--------------------------------------------------
+
 EAP_FUNC_EXPORT eap_status_e eap_am_type_tls_peap_symbian_c::cancel_identity_query()
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -6399,6 +6467,8 @@
 	return eap_status_ok;
 }
 
+//--------------------------------------------------
+
 EAP_FUNC_EXPORT eap_status_e eap_am_type_tls_peap_symbian_c::cancel_query_cipher_suites_and_previous_session()
 {
 	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
@@ -6628,73 +6698,74 @@
 
 	EAP_TRACE_DEBUG(m_am_tools, 
 		TRACE_FLAGS_DEFAULT, (
-		EAPL("eap_am_type_tls_peap_symbian_c::is_session_valid - m_current_eap_vendor_type=%d \n"),
-		m_current_eap_vendor_type));
+		EAPL("eap_am_type_tls_peap_symbian_c::is_session_valid - m_current_eap_vendor_type=0xfe%06x%08x\n"),
+		m_current_eap_type.get_vendor_id(),
+		m_current_eap_type.get_vendor_type()));
 
 	TPtrC maxSessionTimeString;
 	TPtrC lastFullAuthTimeString;
 
-	switch (m_current_eap_vendor_type)
-	{
-	case eap_type_tls:
-		{
-			maxSessionTimeString.Set(cf_str_EAP_TLS_max_session_validity_time_literal);
-			lastFullAuthTimeString.Set(KTLSLastFullAuthTime);
-		}
-		break;
-
-	case eap_type_peap:
-		{
-			maxSessionTimeString.Set(cf_str_EAP_PEAP_max_session_validity_time_literal);
-			lastFullAuthTimeString.Set(KPEAPLastFullAuthTime);
-		}
-		break;
-	
-	case eap_type_ttls:
-		{
-			maxSessionTimeString.Set(cf_str_EAP_TTLS_max_session_validity_time_literal);
-			lastFullAuthTimeString.Set(KTTLSLastFullAuthTime);
-		}
-		break;
-
+	if (m_current_eap_type == eap_type_tls)
+	{
+		maxSessionTimeString.Set(cf_str_EAP_TLS_max_session_validity_time_literal);
+		lastFullAuthTimeString.Set(KTLSLastFullAuthTime);
+	}
+	else if (m_current_eap_type == eap_type_peap)
+	{
+		maxSessionTimeString.Set(cf_str_EAP_PEAP_max_session_validity_time_literal);
+		lastFullAuthTimeString.Set(KPEAPLastFullAuthTime);
+	}
+	else if (m_current_eap_type == eap_type_ttls)
+	{
+		maxSessionTimeString.Set(cf_str_EAP_TTLS_max_session_validity_time_literal);
+		lastFullAuthTimeString.Set(KTTLSLastFullAuthTime);
+	}
 #if defined(USE_FAST_EAP_TYPE)		
-	case eap_type_fast:
-		{
-			maxSessionTimeString.Set(cf_str_EAP_FAST_max_session_validity_time_literal);
-			lastFullAuthTimeString.Set(KFASTLastFullAuthTime);
-		}
-		break;
+	else if (m_current_eap_type == eap_type_fast)
+	{
+		maxSessionTimeString.Set(cf_str_EAP_FAST_max_session_validity_time_literal);
+		lastFullAuthTimeString.Set(KFASTLastFullAuthTime);
+	}
 #endif
-		
-	case eap_type_ttls_plain_pap:
-	    {
-	        // we should not come here, ttls pap has its own
-	        // method for checking session validity
-	        EAP_TRACE_ERROR( m_am_tools, TRACE_FLAGS_DEFAULT, (
-	            EAPL( "ERROR: wrong eap type.\n" ) ) );
-	        return false;
-	    }
-	    
-	default:
-		{
-			// Should never happen
-			EAP_TRACE_ERROR(m_am_tools, 
-				TRACE_FLAGS_DEFAULT, (
-				EAPL("Unsupported EAP type, m_current_eap_vendor_type=%d \n"),
-				m_current_eap_vendor_type));
-				
-			return false; // Treat this as Session invalid.
-		}
-	}	
+	else if (m_current_eap_type == eap_type_ttls_plain_pap)
+	{
+	    // we should not come here, ttls pap has its own
+	    // method for checking session validity
+	    EAP_TRACE_ERROR( m_am_tools, TRACE_FLAGS_DEFAULT, (
+	        EAPL( "ERROR: wrong eap type.\n" ) ) );
+	    return false;
+	}
+	else
+	{
+		// Should never happen
+		EAP_TRACE_ERROR(m_am_tools, 
+			TRACE_FLAGS_DEFAULT, (
+			EAPL("Unsupported EAP type, m_current_eap_vendor_type=0xfe%06x%08x\n"),
+			m_current_eap_type.get_vendor_id(),
+			m_current_eap_type.get_vendor_type()));
+			
+		return false; // Treat this as Session invalid.
+	}
 
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 	
 	// Query all the relevant parameters
-	_LIT(KSQLQuery, "SELECT %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLQuery, &maxSessionTimeString, &lastFullAuthTimeString, &m_db_table_name,
-						&KServiceType, m_index_type, 
-						&KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+	_LIT(KSQLQuery, "SELECT %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+
+	sqlStatement.Format(
+		KSQLQuery,
+		&maxSessionTimeString,
+		&lastFullAuthTimeString,
+		&m_db_table_name,
+		&KServiceType,
+		m_index_type, 
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType, 
+		m_tunneling_type.get_vendor_type());
 
 	RDbView view;
 	// Evaluate view
@@ -6806,65 +6877,68 @@
 	
 	EAP_TRACE_DEBUG(m_am_tools, 
 		TRACE_FLAGS_DEFAULT, 
-		(EAPL("eap_am_type_tls_peap_symbian_c::store_authentication_timeL, index type=%d, index=%d, tunneling type=%d, current eap type=%d\n"),
-		m_index_type, m_index, m_tunneling_vendor_type, m_current_eap_vendor_type));	
+		(EAPL("eap_am_type_tls_peap_symbian_c::store_authentication_timeL, index type=%d, index=%d, tunneling type=0xfe%06x%08x, current eap type=0xfe%06x%08x\n"),
+		m_index_type,
+		m_index,
+		m_tunneling_type.get_vendor_id(),
+		m_tunneling_type.get_vendor_type(),
+		m_current_eap_type.get_vendor_id(),
+		m_current_eap_type.get_vendor_type()));
 
 	TPtrC lastFullAuthTimeString;
 
-	switch (m_current_eap_vendor_type)
-	{
-	case eap_type_tls:
-		{
-			lastFullAuthTimeString.Set(KTLSLastFullAuthTime);
-		}
-		break;
-
-	case eap_type_peap:
-		{
-			lastFullAuthTimeString.Set(KPEAPLastFullAuthTime);
-		}
-		break;
-
-	case eap_type_ttls:
-		{
-			lastFullAuthTimeString.Set(KTTLSLastFullAuthTime);
-		}
-		break;
-		
-	case eap_type_ttls_plain_pap:
-		{
+	if (m_current_eap_type == eap_type_tls)
+	{
+		lastFullAuthTimeString.Set(KTLSLastFullAuthTime);
+	}
+	else if (m_current_eap_type == eap_type_peap)
+	{
+		lastFullAuthTimeString.Set(KPEAPLastFullAuthTime);
+	}
+	else if (m_current_eap_type == eap_type_ttls)
+	{
+		lastFullAuthTimeString.Set(KTTLSLastFullAuthTime);
+	}
+	else if (m_current_eap_type == eap_type_ttls_plain_pap)
+	{
 		lastFullAuthTimeString.Set( KTTLSPAPLastFullAuthTime );
-		}
-		break;
-
+	}
 #if defined(USE_FAST_EAP_TYPE)
-	case eap_type_fast:
-		{
-			lastFullAuthTimeString.Set(KFASTLastFullAuthTime);
-		}
-		break;
+	else if (m_current_eap_type == eap_type_fast)
+	{
+		lastFullAuthTimeString.Set(KFASTLastFullAuthTime);
+	}
 #endif
-		
-	default:
-		{
-			// Should never happen
-			EAP_TRACE_ERROR(m_am_tools, 
-				TRACE_FLAGS_DEFAULT, (
-				EAPL("Unsupported EAP type, m_current_eap_vendor_type=%d \n"),
-				m_current_eap_vendor_type));
-				
-			User::Leave(KErrNotSupported);
-		}
-	}	
+	else
+	{
+		// Should never happen
+		EAP_TRACE_ERROR(m_am_tools, 
+			TRACE_FLAGS_DEFAULT, (
+			EAPL("Unsupported EAP type, m_current_eap_vendor_type=0xfe%06x%08x\n"),
+			m_current_eap_type.get_vendor_id(),
+			m_current_eap_type.get_vendor_type()));
+			
+		User::Leave(KErrNotSupported);
+	}
 
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 	
 	// Query all the relevant parameters
-	_LIT(KSQLQuery, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	sqlStatement.Format(KSQLQuery, &lastFullAuthTimeString, &m_db_table_name,
-						&KServiceType, m_index_type, 
-						&KServiceIndex, m_index, &KTunnelingType, m_tunneling_vendor_type);
+	_LIT(KSQLQuery, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+
+	sqlStatement.Format(
+		KSQLQuery,
+		&lastFullAuthTimeString,
+		&m_db_table_name,
+		&KServiceType,
+		m_index_type, 
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType, 
+		m_tunneling_type.get_vendor_type());
 
 	RDbView view;
 	// Evaluate view
@@ -6989,8 +7063,8 @@
 }
 
 #endif //#if defined(USE_EAP_CORE_SERVER)
-//--------------------------------------------------
-
+
+//--------------------------------------------------
 
 // This is commented in eap_am_fast_pac_store_services_c::query_user_permission_for_A_ID().
 EAP_FUNC_EXPORT eap_status_e eap_am_type_tls_peap_symbian_c::query_user_permission_for_A_ID(
@@ -7046,7 +7120,7 @@
 eap_status_e eap_am_type_tls_peap_symbian_c::QueryUserPermissionForAIDL(
 		const eap_fast_variable_data_c * const in_pac_attribute_A_ID_info,
 		const eap_fast_variable_data_c * const in_pac_attribute_A_ID)
-	{
+{
 	eap_status_e status(eap_status_ok);
 	
 	HBufC8* A_ID_info8 = HBufC8::NewLC((in_pac_attribute_A_ID_info->get_data_length()));
@@ -7073,7 +7147,7 @@
 			(A_IDPtr.Ptr()),
 			(in_pac_attribute_A_ID->get_data_length())));
 
- 	if (A_ID_infoPtr.Size()>KMaxEapFastNotifierBufLength)
+ 	if (A_ID_infoPtr.Size()>=KMaxNotifItemLength)
 	{
   		CleanupStack::PopAndDestroy(3); // A_ID, A_ID_info
   		status = m_am_tools->convert_am_error_to_eapol_error(KErrArgument);
@@ -7083,39 +7157,42 @@
 	}
 
  	TBool startedOk = ETrue;
- 	
- 	if (!iEapFastActiveNotes)
-         {
-         TRAPD( err, iEapFastActiveNotes = CEapFastActive::NewL( this ) );
-         
-         if ( err != KErrNone )
-             {
-             status = eap_status_allocation_error;
-             }   
-        }
- 	if ( status == KErrNone )
- 		{
-	    //update buffer
- 		iEapFastActiveNotes->UpdateInputBuf( A_ID_infoPtr );
-        // start query install dialog
- 		// asynch. call, return immediately
- 		startedOk = iEapFastActiveNotes->Start(
- 		    CEapFastActive::EEapFastActiveInstallPacQueryDialog );
- 		if ( startedOk == EFalse )
- 			{
- 			status = eap_status_process_general_error;
- 			}
- 		}
- 	else
- 		{
- 		status = eap_status_process_general_error;	
- 		}
+ 
+    TEapExpandedType aEapType(*EapExpandedTypeFast.GetType());
+    
+    m_notifier_data_to_user->iPassword.Copy(A_ID_infoPtr);
+    
+    if (iEapAuthNotifier == 0)
+    	{
+    	TRAPD(err, iEapAuthNotifier = CEapAuthNotifier::NewL( *this ));
+	  	if (err)
+	  		{
+	  			return eap_status_process_general_error;
+	  		}
+    	}
+    else
+	   	{
+		 	TRAPD(err1, iEapAuthNotifier->Cancel());
+	  	if (err1)
+	  		{
+	  			return eap_status_process_general_error;
+	  		}
+     	}
+
+    TRAPD(err2, iEapAuthNotifier->StartL(CEapAuthNotifier::EEapNotifierTypeFastInstallPacQueryDialog, m_notifier_data_to_user, aEapType));
+  	if (err2)
+  		{
+  			return eap_status_process_general_error;
+  		}
+ 
+ 
 
  	CleanupStack::PopAndDestroy(3); // A_ID, A_ID_info
  	
  	return status;
-	}
-
+}
+
+//--------------------------------------------------
 
 EAP_FUNC_EXPORT eap_status_e eap_am_type_tls_peap_symbian_c::read_PAC_store_data(
 	const eap_fast_pac_store_pending_operation_e in_pending_operation,
@@ -7603,84 +7680,88 @@
 					}		
 				}
 				
-				TInt count = 0;
-				
-				m_info_array.Reset();
+				m_info_array.ResetAndDestroy();
 					
 				iPacStoreDb->GetPacStoreDataL(dbTableName, m_info_array);
 				
 				EAP_TRACE_DEBUG_SYMBIAN(
-				(_L("eap_am_type_tls_peap_symbian_c::ReadPACStoredataL:Number of entries in table %S=%d\n"),
-				&dbTableName, m_info_array.Count()));				
+					(_L("eap_am_type_tls_peap_symbian_c::ReadPACStoredataL:Number of entries in table %S=%d\n"),
+					&dbTableName, m_info_array.Count()));
 				
-				while (count < m_info_array.Count())
-					{
-					TPtr8 infoDataPtr = m_info_array[count].iData->Des();
-					TPtr8 infoRefPtr = m_info_array[count].iReference->Des();
-					
-					EAP_TRACE_DATA_DEBUG_SYMBIAN(
-						("eap_am_type_tls_peap_symbian_c::ReadPACStoredataL: BINARY value from PAC DB (reference)",
-						infoRefPtr.Ptr(),
-						infoRefPtr.Size()));
-					
-					EAP_TRACE_DATA_DEBUG_SYMBIAN(
-						("eap_am_type_tls_peap_symbian_c::ReadPACStoredataL: BINARY value from PAC DB (value)",
-						infoDataPtr.Ptr(),
-						infoDataPtr.Size()));					
-					
-					eap_fast_pac_store_data_c * const new_data = new eap_fast_pac_store_data_c(m_am_tools);
-
-					eap_automatic_variable_c<eap_fast_pac_store_data_c> automatic_new_data(
-						m_am_tools, new_data);
-
-					if (new_data == 0)
-					{
-						m_eap_fast_completion_status = eap_status_allocation_error;
-						(void) EAP_STATUS_RETURN(m_am_tools, m_eap_fast_completion_status);
-						break;
-					}
-
-					new_data->set_type(dataType);					
-
-					// Set the reference.
-					m_eap_fast_completion_status = new_data->get_writable_reference()->set_copy_of_buffer(infoRefPtr.Ptr(), infoRefPtr.Size());
-					if (m_eap_fast_completion_status != eap_status_ok)
-					{
-						(void) EAP_STATUS_RETURN(m_am_tools, m_eap_fast_completion_status);
-						delete m_info_array[count].iData;
-						delete m_info_array[count].iReference;
-						break;
-					}
-					
-					m_eap_fast_completion_status = new_data->get_writable_data()->set_copy_of_buffer(infoDataPtr.Ptr(),infoDataPtr.Size() );
-					if (m_eap_fast_completion_status != eap_status_ok)
-					{
-						(void) EAP_STATUS_RETURN(m_am_tools, m_eap_fast_completion_status);
-						delete m_info_array[count].iData;
-						delete m_info_array[count].iReference;
-						break;
-					}
-
-					automatic_new_data.do_not_free_variable();
-
-					m_eap_fast_completion_status = m_references_and_data_blocks.add_object(new_data, true);
-					if (m_eap_fast_completion_status != eap_status_ok)
-					{
-						(void) EAP_STATUS_RETURN(m_am_tools, m_eap_fast_completion_status);
-						delete m_info_array[count].iData;
-						delete m_info_array[count].iReference;
-						break;
-					}					
+				TInt first_index = 0;
+
+				while (m_info_array.Count() > 0)
+					{
+					if (m_info_array[first_index] != 0
+						&& m_info_array[first_index]->GetIsValid() != EFalse)
+						{
+						// Note this will get always the first object of array. After the first object is processed it is destryed and removed from array.
+						TPtr8 infoDataPtr = m_info_array[first_index]->GetData()->Des();
+						TPtr8 infoRefPtr = m_info_array[first_index]->GetReference()->Des();
+						
+						EAP_TRACE_DATA_DEBUG_SYMBIAN(
+							("eap_am_type_tls_peap_symbian_c::ReadPACStoredataL: BINARY value from PAC DB (reference)",
+							infoRefPtr.Ptr(),
+							infoRefPtr.Size()));
+						
+						EAP_TRACE_DATA_DEBUG_SYMBIAN(
+							("eap_am_type_tls_peap_symbian_c::ReadPACStoredataL: BINARY value from PAC DB (value)",
+							infoDataPtr.Ptr(),
+							infoDataPtr.Size()));					
+						
+						eap_fast_pac_store_data_c * const new_data = new eap_fast_pac_store_data_c(m_am_tools);
+
+						eap_automatic_variable_c<eap_fast_pac_store_data_c> automatic_new_data(
+							m_am_tools, new_data);
+
+						if (new_data == 0)
+						{
+							m_eap_fast_completion_status = eap_status_allocation_error;
+							(void) EAP_STATUS_RETURN(m_am_tools, m_eap_fast_completion_status);
+							break;
+						}
+
+						new_data->set_type(dataType);					
+
+						// Set the reference.
+						m_eap_fast_completion_status = new_data->get_writable_reference()->set_copy_of_buffer(infoRefPtr.Ptr(), infoRefPtr.Size());
+						if (m_eap_fast_completion_status != eap_status_ok)
+						{
+							(void) EAP_STATUS_RETURN(m_am_tools, m_eap_fast_completion_status);
+							delete m_info_array[first_index];
+							m_info_array.Remove(first_index);
+							break;
+						}
+						
+						m_eap_fast_completion_status = new_data->get_writable_data()->set_copy_of_buffer(infoDataPtr.Ptr(), infoDataPtr.Size());
+						if (m_eap_fast_completion_status != eap_status_ok)
+						{
+							(void) EAP_STATUS_RETURN(m_am_tools, m_eap_fast_completion_status);
+							delete m_info_array[first_index];
+							m_info_array.Remove(first_index);
+							break;
+						}
+
+						automatic_new_data.do_not_free_variable();
+
+						m_eap_fast_completion_status = m_references_and_data_blocks.add_object(new_data, true);
+						if (m_eap_fast_completion_status != eap_status_ok)
+						{
+							(void) EAP_STATUS_RETURN(m_am_tools, m_eap_fast_completion_status);
+							delete m_info_array[first_index];
+							m_info_array.Remove(first_index);
+							break;
+						}
+						EAP_TRACE_DATA_DEBUG_SYMBIAN(
+							("For GROUP, AID, PAC INFOs - added data",
+							(new_data->get_data())->get_data((new_data->get_data())->get_data_length()), 
+							(new_data->get_data())->get_data_length()));					
+						}
 							
-					delete m_info_array[count].iData;
-					delete m_info_array[count].iReference;
-					
-					EAP_TRACE_DATA_DEBUG_SYMBIAN(
-						("For GROUP, AID, PAC INFOs - added data",
-						(new_data->get_data())->get_data((new_data->get_data())->get_data_length()), 
-						(new_data->get_data())->get_data_length()));					
-		
-					count++;
+					delete m_info_array[first_index];
+					m_info_array.Remove(first_index);
+					
+		
 					} // End: while
 					
 				
@@ -7731,14 +7812,41 @@
 
 						if(iPacStoreDb->IsMasterKeyPresentL())
 							{
-							m_eap_fast_completion_status = ShowNotifierItemAndGetResponse(
-								EEapFastNotifierPacStorePwQuery, ETrue );
+				    TEapExpandedType aEapType(*EapExpandedTypeFast.GetType());
+				    
+				    m_notifier_data_to_user->iPassword.Zero();
+				    
+				    if (iEapAuthNotifier == 0)
+				    	{
+				    	iEapAuthNotifier = CEapAuthNotifier::NewL( *this );
+				    	}
+				    else
+					   	{
+						 	iEapAuthNotifier->Cancel();
+				     	}
+				
+				    iEapAuthNotifier->StartL(CEapAuthNotifier::EEapNotifierTypeFastPacStorePwQueryDialog, m_notifier_data_to_user, aEapType);
+
+
 							}
 						else
 							{
 							m_state =  EMasterkeyQuery; 
-				        	m_eap_fast_completion_status = ShowNotifierItemAndGetResponse(
-				        		EEapFastNotifierCreateMasterkeyQuery, ETrue );
+					    TEapExpandedType aEapType(*EapExpandedTypeFast.GetType());
+					    
+					    m_notifier_data_to_user->iPassword.Zero();
+					    
+					    if (iEapAuthNotifier == 0)
+					    	{
+					    	iEapAuthNotifier = CEapAuthNotifier::NewL( *this );
+					    	}
+					    else
+						   	{
+							 	iEapAuthNotifier->Cancel();
+					     	}
+					
+					    iEapAuthNotifier->StartL(CEapAuthNotifier::EEapNotifierTypeFastCreateMasterkeyQueryDialog, m_notifier_data_to_user, aEapType);
+
 							}
 
 						break;
@@ -7802,7 +7910,7 @@
 				
 				    eap_variable_data_c m_PAC_store_device_seed(m_am_tools);
 				    m_eap_fast_completion_status = m_PAC_store_device_seed.set_copy_of_buffer(
-				    	iPacStoreDb->GetSeed() );
+				    	iPacStoreDeviceSeed );
 					if ( m_eap_fast_completion_status != eap_status_ok )
 					    {
 					    EAP_TRACE_DEBUG_SYMBIAN(
@@ -8048,9 +8156,21 @@
 
 					m_both_asked++;
 
-					m_eap_fast_completion_status = ShowNotifierItemAndGetResponse(
-								EEapFastNotifierPacFilePwQuery, ETrue );
-					
+			    TEapExpandedType aEapType(*EapExpandedTypeFast.GetType());
+			    
+			    m_notifier_data_to_user->iPassword.Zero();
+			    
+			    if (iEapAuthNotifier == 0)
+			    	{
+			    	iEapAuthNotifier = CEapAuthNotifier::NewL( *this );
+			    	}
+			    else
+				   	{
+					 	iEapAuthNotifier->Cancel();
+			     	}
+			
+			    iEapAuthNotifier->StartL(CEapAuthNotifier::EEapNotifierTypeFastPacFilePwQueryDialog, m_notifier_data_to_user, aEapType);
+
 					if (m_eap_fast_completion_status != eap_status_ok)
 						{
 						(void) EAP_STATUS_RETURN(m_am_tools, m_eap_fast_completion_status);
@@ -8076,9 +8196,14 @@
 			} // End: switch(pacStoreDataRefType)			
 		}
 	} // for ()
+
 	if (m_both_asked)
+	{
 		m_eap_fast_completion_status = eap_status_pending_request;
-	m_info_array.Reset();
+	}
+
+	m_info_array.ResetAndDestroy();
+
 	EAP_TRACE_DEBUG_SYMBIAN(
 		(_L("eap_am_type_tls_peap_symbian_c::ReadPACStoredataL-End, m_eap_fast_completion_status=%d"),
 		m_eap_fast_completion_status));			
@@ -8479,10 +8604,12 @@
 	return EAP_STATUS_RETURN(m_am_tools, m_eap_fast_completion_status);
 }
 	
+//--------------------------------------------------
+
 void eap_am_type_tls_peap_symbian_c::CompleteAddImportedPACFileL(
 		const eap_variable_data_c * const in_imported_PAC_filename,
 		const eap_variable_data_c * const out_used_group_reference)
-	{
+{
 	RFs aFs;
 	aFs.Connect( KFileServerDefaultMessageSlots );
 
@@ -8555,21 +8682,32 @@
 				(_L("eap_am_type_tls_peap_symbian_c::complete_add_imported_PAC_file: NO GROUP REFERENCE !!!!")));	
 
 		}
-	
+
 	HBufC* FilePath = HBufC::NewLC(KMaxFileName); // must be defined to correct maxs dir length
 	TPtr FilePathPtr = FilePath->Des();
 	HBufC8* FilePath8 = HBufC8::NewLC(KMaxFileName); // must be defined to correct maxs dir length
 	TPtr8 FilePathPtr8 = FilePath8->Des();
-	
-	_LIT8(KPacStoreSourceDir, "c:\\private\\101f8ec5\\PACGroup\\"); // in dir are dirs where from files are read
+
 	FilePathPtr8.Zero();
-	FilePathPtr8.Append(KPacStoreSourceDir);
 	FilePathPtr8.Append(refPtr);
 	FilePathPtr8.Append(KSeparator);
 	FilePathPtr8.Append(bufPtr);
 
+	// Copy is the only function that takes TPtr8 type of parameter.
 	FilePathPtr.Copy(FilePathPtr8);
 
+	{
+		TFileName aPrivateDatabasePathName;
+
+		EapPluginTools::GetPrivatePathL(
+			aPrivateDatabasePathName);
+
+		aPrivateDatabasePathName.Append(KPacStoreSourceDir);
+		aPrivateDatabasePathName.Append(FilePathPtr);
+
+		FilePathPtr.Copy(aPrivateDatabasePathName);
+	}
+
 	EAP_TRACE_DATA_DEBUG(
    		m_am_tools,
    		TRACE_FLAGS_DEFAULT,
@@ -8595,7 +8733,7 @@
 	CleanupStack::PopAndDestroy(ref); 
 	CleanupStack::PopAndDestroy(buf); 
 	
-	}
+}
 
 
 // ---------------------------------------------------------
@@ -8603,8 +8741,7 @@
 // ---------------------------------------------------------
 //
 void eap_am_type_tls_peap_symbian_c::ContinueInitializePacStore()
-
-	{
+{
 	EAP_TRACE_DEBUG_SYMBIAN(
 			(_L("eap_am_type_tls_peap_symbian_c::ContinueInitializePacStore()")));
 
@@ -8638,7 +8775,7 @@
 			0,
 			1);
 
-	}
+}
 
 //--------------------------------------------------
 
@@ -8751,6 +8888,8 @@
 	return EAP_STATUS_RETURN(m_am_tools, m_eap_fast_completion_status);
 }
 
+//--------------------------------------------------
+
 // This is commented in eap_am_fast_pac_store_services_c::cancel_PAC_store_operations().
 EAP_FUNC_EXPORT eap_status_e eap_am_type_tls_peap_symbian_c::cancel_PAC_store_operations()
 {
@@ -8776,7 +8915,6 @@
 
 //--------------------------------------------------
 
-
 EAP_FUNC_EXPORT eap_status_e
 eap_am_type_tls_peap_symbian_c::initialize_PAC_store(
 	const eap_fast_completion_operation_e aCompletionOperation,
@@ -8819,7 +8957,7 @@
 		    	    }
         	    }
 		    // asynch. call, return immediately
-		    iPacStoreDb->CreateDeviceSeedAsynch();
+		    CreateDeviceSeedAsync();
 		    }
     	else
     		{
@@ -8854,61 +8992,53 @@
 	m_provisioning_mode = provisioning_mode; // save provis. mode
 	
 	TInt err = KErrNone;	
-	if ( !iEapFastActiveWaitNote )
-		{
-		TRAP( err, iEapFastActiveWaitNote = CEapFastActive::NewL( this ) );
-		}
-	if ( !iEapFastActiveNotes )
-		{
-		TRAP( err, iEapFastActiveNotes = CEapFastActive::NewL( this ) );
-		}
-	if ( err != KErrNone )
-		{
-		status = eap_status_allocation_error;
-		}	
-	/**
-	* The note is started in a separate active object.
-	* When user cancels waiting note,
-	* SendErrorNotification( eap_status_user_cancel_authentication )
-	* will be called in iEapFastActiveWaitNote->RunL().
-	* Otherwise note is stopped using iEapFastActiveWaitNote.Start() method.
-	*/
-	TBool startedOk = ETrue;
-	
+	
+
+    TEapExpandedType aEapType(*EapExpandedTypeFast.GetType());
+    
+    m_notifier_data_to_user->iPassword.Zero();
+    
+    if (iEapAuthNotifier == 0)
+    	{
+    	TRAPD(err, iEapAuthNotifier = CEapAuthNotifier::NewL( *this ));
+    	if (err)
+    		{
+    			return eap_status_process_general_error;
+    		}
+    	}
+    else
+	   	{
+		 	TRAPD(err1, iEapAuthNotifier->Cancel());
+    	if (err1)
+    		{
+    			return eap_status_process_general_error;
+    		}
+     	}
+
 	if ( pac_type == eap_fast_pac_type_tunnel_pac
-		 &&
-		 provisioning_mode ==
-		     eap_fast_completion_operation_server_authenticated_provisioning_mode
-		 &&
-		 status == eap_status_ok )
-		{
-		EAP_TRACE_DEBUG_SYMBIAN( ( _L("eap_am_type_tls_peap_symbian_c:: \
-				indicates_eap_fast_provisioning_starts Authenticated provisioning!")));			
-		startedOk = iEapFastActiveWaitNote->Start(
-			CEapFastActive::EEapFastActiveStartAuthProvWaitNote );
-		}
+		 && provisioning_mode == eap_fast_completion_operation_server_authenticated_provisioning_mode
+		 && status == eap_status_ok )
+				{
+    		TRAPD(err2, iEapAuthNotifier->StartL(CEapAuthNotifier::EEapNotifierTypeFastStartAuthProvWaitNote, m_notifier_data_to_user, aEapType));
+	    	if (err2)
+	    		{
+	    			return eap_status_process_general_error;
+	    		}
+				}
 	else if (
 		pac_type == eap_fast_pac_type_tunnel_pac
-		&&
-		provisioning_mode ==
-	        eap_fast_completion_operation_server_unauthenticated_provisioning_mode_ADHP
-	    &&
-	    status == eap_status_ok )
-		{
-		EAP_TRACE_DEBUG_SYMBIAN(  (_L("eap_am_type_tls_peap_symbian_c:: \
-			indicates_eap_fast_provisioning_starts UnAuthenticated provisioning!")));			
-		startedOk = iEapFastActiveWaitNote->Start(
-        	CEapFastActive::EEapFastActiveStartUnauthProvWaitNote );        
-		}
-	if ( startedOk == EFalse )
-        {
-        status = eap_status_process_general_error;
-        }
-	if ( status != eap_status_ok )
-		{
-	    EAP_TRACE_DEBUG_SYMBIAN( (_L("eap_am_type_tls_peap_symbian_c:: \
-            indicates_eap_fast_provisioning_starts ERROR: status=%d."), status ) );
-		}
+		&& provisioning_mode == eap_fast_completion_operation_server_unauthenticated_provisioning_mode_ADHP
+	  && status == eap_status_ok )
+				{
+    		TRAPD(err3, iEapAuthNotifier->StartL(CEapAuthNotifier::EEapNotifierTypeFastStartUnauthProvWaitNote, m_notifier_data_to_user, aEapType));
+	    	if (err3)
+	    		{
+	    			return eap_status_process_general_error;
+	    		}
+				}
+
+
+
 	return status;
 	}
 
@@ -8932,31 +9062,44 @@
 	if ( pac_type == eap_fast_pac_type_tunnel_pac )
 		{
 	    // stop wait note;
-		if ( iEapFastActiveWaitNote )
-			{
-			if ( iEapFastActiveWaitNote->IsActive() )
-				{
-				iEapFastActiveWaitNote->Cancel();
-				}
-			delete iEapFastActiveWaitNote;
-			iEapFastActiveWaitNote = NULL;
-			}
-
-	    if ( iEapFastActiveNotes )
-		    {	    
-            if( provisioning_successfull )
-		        {
-		        // synch. call
-		        iEapFastActiveNotes->Start( CEapFastActive::
-		            EEapFastActiveShowProvSuccessNote, ETrue );
-		        }
-            else
-      	        {
-      	        // synch. call
-      	        iEapFastActiveNotes->Start( CEapFastActive::
-      	            EapFastActiveShowProvNotSuccessNote, ETrue );
-      	        }
-		    }
+    TEapExpandedType aEapType(*EapExpandedTypeFast.GetType());
+    
+    m_notifier_data_to_user->iPassword.Zero();
+    
+    if (iEapAuthNotifier == 0)
+    	{
+    	TRAPD(err, iEapAuthNotifier = CEapAuthNotifier::NewL( *this ));
+    	if (err)
+    		{
+    			return eap_status_process_general_error;
+    		}
+    	}
+    else
+    	{
+    	TRAPD(err1, iEapAuthNotifier->Cancel());
+    	if (err1)
+    		{
+    			return eap_status_process_general_error;
+    		}
+    	}
+
+    if( provisioning_successfull )
+			{
+			TRAPD(err2, iEapAuthNotifier->StartL(CEapAuthNotifier::EEapNotifierTypeFastShowProvSuccessNote, m_notifier_data_to_user, aEapType));
+    	if (err2)
+    		{
+    			return eap_status_process_general_error;
+    		}
+			}
+		else
+			{
+			TRAPD(err3, iEapAuthNotifier->StartL(CEapAuthNotifier::EEapNotifierTypeFastShowProvNotSuccessNote, m_notifier_data_to_user, aEapType));
+    	if (err3)
+    		{
+    			return eap_status_process_general_error;
+    		}
+			}
+def 
 		} // if ( pac_type == eap_fast_pac_type_tunnel_pac )
 
 	return status;
@@ -8964,6 +9107,8 @@
 
 #endif //#if defined(USE_FAST_EAP_TYPE)
 
+//--------------------------------------------------
+
 #ifdef USE_PAC_STORE
 	
 void eap_am_type_tls_peap_symbian_c::GetPacStoreDbDataL(
@@ -9234,76 +9379,11 @@
 
 //--------------------------------------------------
 
-#if defined(USE_FAST_EAP_TYPE)
-
-eap_status_e eap_am_type_tls_peap_symbian_c::ShowNotifierItemAndGetResponse(
-	EEapFastNotifierUiItem aNotifierUiItem, TBool aSetActive )
-{
-	EAP_TRACE_DEBUG_SYMBIAN(
-		(_L("eap_am_type_tls_peap_symbian_c::ShowNotifierItem aNotifierUiItem=%d, ActiveStatus=%d "),
-		aNotifierUiItem, IsActive()));
-
-	if ( aSetActive && IsActive() )
-	{
-		EAP_TRACE_DEBUG_SYMBIAN(
-			(_L("ShowNotifierItemAndGetResponse: Already active when tried to show Notifier")));		
-		
-		return eap_status_device_busy;
-	}
-	
-	eap_status_e status( eap_status_ok );
-	
-	if( !m_is_notifier_connected )
-	{
-		TInt error = m_notifier.Connect();
-		
-		EAP_TRACE_DEBUG_SYMBIAN(
-			(_L("eap_am_type_tls_peap_symbian_c::ShowNotifierItem - m_notifier.Connect() returned error=%d\n"), error));
-		
-		if( error != KErrNone)
-		{
-			// Can not connect to notifier.
-			return m_am_tools->convert_am_error_to_eapol_error(error);		
-		}
-		
-		m_is_notifier_connected = ETrue; // Got connectted to notifier.
-	}
-	
-	// Update the values needed for notifier.
-	m_notifier_data_to_user->iEapFastNotifierUiItem = aNotifierUiItem;
-			
-	EAP_TRACE_DEBUG_SYMBIAN(
-		(_L("m_notifier_data_pckg_to_user"),
-		m_notifier_data_pckg_to_user->Ptr(),
-		m_notifier_data_pckg_to_user->Size()));
-			
-	m_notifier_data_from_user->iEapFastNotifierBuffer.Delete(0,KMaxEapFastNotifierBufLength);
-	
-	EAP_TRACE_DEBUG_SYMBIAN(
-		(_L("eap_am_type_tls_peap_symbian_c::ShowNotifierItem - StartNotifierAndGetResponse")));
-
-	m_notifier.StartNotifierAndGetResponse(
-		iStatus, 
-		KEapFastNotifierUid, 
-		*m_notifier_data_pckg_to_user, 
-		*m_notifier_data_pckg_from_user);
-	
-	if ( aSetActive )
-		{
-		m_notifier_complete = ETrue;
-		SetActive();
-		}
-	    
-	EAP_TRACE_DEBUG_SYMBIAN(
-		(_L("eap_am_type_tls_peap_symbian_c::ShowNotifierItem - End")));
-
-	return status;
-}
-
+#ifdef USE_FAST_EAP_TYPE
 //--------------------------------------------------
 
 eap_status_e eap_am_type_tls_peap_symbian_c::RemoveIAPReference()
-	{
+{
 	EAP_TRACE_DEBUG_SYMBIAN(
 		(_L("eap_am_type_tls_peap_symbian_c::RemoveIAPReference - Start")));
 	m_eap_fast_completion_status = eap_status_ok;	
@@ -9367,10 +9447,12 @@
 		(_L("eap_am_type_tls_peap_symbian_c::RemoveIAPReference - End")));
 		
 	return m_eap_fast_completion_status;
-	}
+}
+
+//--------------------------------------------------
 
 eap_status_e eap_am_type_tls_peap_symbian_c::ImportFilesL()
-	{
+{
 
 	EAP_TRACE_DEBUG_SYMBIAN(
 			(_L("eap_am_type_tls_peap_symbian_c::ImportFilesL - Start")));
@@ -9465,25 +9547,39 @@
 	TBool FileFound(EFalse);
 	
 	PathPtr8.Zero();
-	PathPtr8.Append(KPacStoreSourceDir);
 	PathPtr8.Append(group_referencePtr8);
 	PathPtr8.Append(KSeparator);
+
 	EAP_TRACE_DATA_DEBUG(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
 			(EAPL("eap_am_type_tls_peap_symbian_c::ImportFilesL: Path8"),
 			PathPtr8.Ptr(),
 			PathPtr8.Size()));
+
 	PathPtr.Zero();
+	// Copy is the only function that takes TPtr8 type of parameter.
 	PathPtr.Copy(PathPtr8);
 	
+	{
+		TFileName aPrivateDatabasePathName;
+
+		EapPluginTools::GetPrivatePathL(
+			aPrivateDatabasePathName);
+
+		aPrivateDatabasePathName.Append(KPacStoreSourceDir);
+		aPrivateDatabasePathName.Append(PathPtr);
+
+		PathPtr.Copy(aPrivateDatabasePathName);
+	}
+
 	EAP_TRACE_DATA_DEBUG(
 			m_am_tools,
 			TRACE_FLAGS_DEFAULT,
 			(EAPL("eap_am_type_tls_peap_symbian_c::ImportFilesL: Path"),
 			PathPtr.Ptr(),
 			PathPtr.Size()));
-			
+
 	EAP_TRACE_DEBUG_SYMBIAN(
 			(_L("eap_am_type_tls_peap_symbian_c::ImportFilesL: Check directory availability")));					
 
@@ -9556,23 +9652,44 @@
 			else if(directoryEmpty == false &&  directoryExists == true && FileFound != EFalse)
 				{
 				PathPtr8.Zero();
-				PathPtr8.Append(KPacStoreSourceDir);
 				PathPtr8.Append(group_referencePtr8);
 				PathPtr8.Append(KSeparator);
 				PathPtr8.Append(filenamePtr8);
+
 				EAP_TRACE_DATA_DEBUG(
 						m_am_tools,
 						TRACE_FLAGS_DEFAULT,
 						(EAPL("eap_am_type_tls_peap_symbian_c::ImportFilesL: Path8"),
 						PathPtr8.Ptr(),
 						PathPtr8.Size()));
+
 				PathPtr.Zero();
 				PathPtr.Copy(PathPtr8);
+
+				{
+					TFileName aPrivateDatabasePathName;
+
+					EapPluginTools::GetPrivatePathL(
+						aPrivateDatabasePathName);
+
+					aPrivateDatabasePathName.Append(KPacStoreSourceDir);
+					aPrivateDatabasePathName.Append(PathPtr);
+
+					PathPtr.Copy(aPrivateDatabasePathName);
+				}
 				
+				EAP_TRACE_DATA_DEBUG(
+						m_am_tools,
+						TRACE_FLAGS_DEFAULT,
+						(EAPL("eap_am_type_tls_peap_symbian_c::ImportFilesL: PathPtr"),
+						PathPtr.Ptr(),
+						PathPtr.Size()));
+
 				EAP_TRACE_DEBUG_SYMBIAN(
 						(_L("eap_am_type_tls_peap_symbian_c::ImportFilesL: Read file")));	
 				
 				RFile file;
+
 				if(file.Open(aFs, PathPtr, EFileRead)==KErrNone)
 					{
 					readData= HBufC8::NewLC(filesize); 
@@ -9689,7 +9806,7 @@
 	                this,
 	                KHandleCompletePacstoreNokTimerID, 
 	                &m_eap_fast_completion_status,
-	                1);
+	                0);
 			}
 		else
 			{
@@ -9697,18 +9814,19 @@
 		                this,
 		                KHandleCompletePacstoreOkTimerID, 
 		                &m_eap_fast_completion_status,
-		                1);
+		                0);
 			}
 		}
 	EAP_TRACE_DEBUG_SYMBIAN(
 			(_L("eap_am_type_tls_peap_symbian_c::ImportFilesL - End")));
 
 	return m_eap_fast_completion_status;
-	}
+}
 
 // ----------------------------------------------------------------------------
+
 eap_status_e eap_am_type_tls_peap_symbian_c::PasswordQueryL()
-	{
+{
 
 	EAP_TRACE_DEBUG_SYMBIAN(
 			(_L("eap_am_type_tls_peap_symbian_c::PasswordQueryL")));
@@ -9759,8 +9877,36 @@
 	    	{
 	    	CleanupStack::PopAndDestroy(m_pacStorePWBuf8);
 	    	
-	    	m_eap_fast_completion_status = ShowNotifierItemAndGetResponse(
-	    		EEapFastNotifierWrongPacStorePwNote, ETrue );
+    TEapExpandedType aEapType(*EapExpandedTypeFast.GetType());
+    
+    m_notifier_data_to_user->iPassword.Zero();
+    
+    if (iEapAuthNotifier == 0)
+    	{
+    	TRAPD(err, iEapAuthNotifier = CEapAuthNotifier::NewL( *this ));
+    	if (err)
+    		{
+    			return eap_status_process_general_error;
+    		}
+    	}
+    else
+    	{
+    	TRAPD(err1, iEapAuthNotifier->Cancel());
+    	if (err1)
+    		{
+    			return eap_status_process_general_error;
+    		}
+    	}
+
+		TRAPD(err2, iEapAuthNotifier->StartL(CEapAuthNotifier::EEapNotifierTypeFastWrongPacStorePwNote, m_notifier_data_to_user, aEapType));
+    	if (err2)
+    		{
+    			return eap_status_process_general_error;
+    		}
+		
+	
+
+
 			return m_eap_fast_completion_status;
 			 	    
 	    	}
@@ -9789,8 +9935,33 @@
     					m_verificationStatus));
        	pacStorePWPtr8.Zero();
        	if (m_verificationStatus == EFalse)
-			m_eap_fast_completion_status = ShowNotifierItemAndGetResponse(
-				EEapFastNotifierPacStorePwQuery, ETrue );
+					{
+    TEapExpandedType aEapType(*EapExpandedTypeFast.GetType());
+    if (iEapAuthNotifier == 0)
+    	{
+    	TRAPD(err3, iEapAuthNotifier = CEapAuthNotifier::NewL( *this ));
+    	if (err3)
+    		{
+    			return eap_status_process_general_error;
+    		}
+    	}
+    else
+    	{
+    	TRAPD(err4, iEapAuthNotifier->Cancel();
+    	if (err4)
+    		{
+    			return eap_status_process_general_error;
+    		}
+    	}
+
+		TRAPD(err5, iEapAuthNotifier->StartL(CEapAuthNotifier::EEapNotifierTypeFastPacStorePwQueryDialog, m_notifier_data_to_user, aEapType);
+  	if (err5)
+  		{
+  			return eap_status_process_general_error;
+  		}
+ 
+
+					}
 		else
 			m_eap_fast_completion_status = m_partner->set_timer(
 				this,
@@ -9812,19 +9983,44 @@
     		}
      	else // temporary before masterkey creation is done dynamically !!!
     		{
-        	m_eap_fast_completion_status = ShowNotifierItemAndGetResponse(
-        			EEapFastNotifierCreateMasterkeyQuery, ETrue );
-   		
-			}
+    TEapExpandedType aEapType(*EapExpandedTypeFast.GetType());
+    if (iEapAuthNotifier == 0)
+    	{
+    	TRAPD(err, iEapAuthNotifier = CEapAuthNotifier::NewL( *this ));
+	  	if (err)
+	  		{
+	  			return eap_status_process_general_error;
+	  		}
+    	}
+    else
+    	{
+    	TRAPD(err1, iEapAuthNotifier->Cancel());
+	  	if (err1)
+	  		{
+	  			return eap_status_process_general_error;
+	  		}
+    	}
+
+		TRAPD(err2, iEapAuthNotifier->StartL(CEapAuthNotifier::EEapNotifierTypeFastCreateMasterkeyQueryDialog, m_notifier_data_to_user, aEapType));
+  	if (err2)
+  		{
+  			return eap_status_process_general_error;
+  		}
+			
+
+
+				}
     	}
 
     CleanupStack::PopAndDestroy(m_pacStorePWBuf8);
     
 	return m_eap_fast_completion_status;
-	}
+}
+
+//--------------------------------------------------
 
 eap_status_e eap_am_type_tls_peap_symbian_c::CompletePasswordQueryL()
-	{
+{
 
 	EAP_TRACE_DEBUG_SYMBIAN(
 			(_L("eap_am_type_tls_peap_symbian_c::CompletePasswordQueryL")));
@@ -9897,10 +10093,12 @@
 	m_both_completed++;
 
 	return m_eap_fast_completion_status;
-	}
+}
+
+//--------------------------------------------------
 
 eap_status_e eap_am_type_tls_peap_symbian_c::FinalCompleteReadPACStoreDataL(eap_status_e status)
-	{
+{
 	EAP_TRACE_DEBUG_SYMBIAN(
 			(_L("eap_am_type_tls_peap_symbian_c::FinalCompleteReadPACStoreDataL")));
 	if (status == eap_status_ok && (m_new_references_and_data_blocks.get_object_count()>0))
@@ -9920,7 +10118,8 @@
 				EAP_TRACE_DEBUG_SYMBIAN(
 						(_L("eap_am_type_tls_peap_symbian_c::FinalCompleteReadPACStoreDataL:status nok")));
 				m_ready_references_and_data_blocks.reset();
-				eap_status_e status = m_tls_application->complete_read_PAC_store_data(
+				
+				status = m_tls_application->complete_read_PAC_store_data(
 					m_eap_fast_completion_status,
 					m_eap_fast_pac_store_pending_operation,
 					&m_references_and_data_blocks);
@@ -9938,7 +10137,8 @@
 				EAP_TRACE_DEBUG_SYMBIAN(
 						(_L("eap_am_type_tls_peap_symbian_c::FinalCompleteReadPACStoreDataL:status nok")));
 				m_ready_references_and_data_blocks.reset();
-				eap_status_e status = m_tls_application->complete_read_PAC_store_data(
+				
+				status = m_tls_application->complete_read_PAC_store_data(
 					m_eap_fast_completion_status,
 					m_eap_fast_pac_store_pending_operation,
 					&m_references_and_data_blocks);
@@ -9953,7 +10153,8 @@
 				EAP_TRACE_DEBUG_SYMBIAN(
 						(_L("eap_am_type_tls_peap_symbian_c::FinalCompleteReadPACStoreDataL:status nok")));
 				m_ready_references_and_data_blocks.reset();
-				eap_status_e status = m_tls_application->complete_read_PAC_store_data(
+				
+				status = m_tls_application->complete_read_PAC_store_data(
 					m_eap_fast_completion_status,
 					m_eap_fast_pac_store_pending_operation,
 					&m_references_and_data_blocks);
@@ -9970,7 +10171,8 @@
 				EAP_TRACE_DEBUG_SYMBIAN(
 						(_L("eap_am_type_tls_peap_symbian_c::FinalCompleteReadPACStoreDataL:status nok")));
 				m_ready_references_and_data_blocks.reset();
-				eap_status_e status = m_tls_application->complete_read_PAC_store_data(
+				
+				status = m_tls_application->complete_read_PAC_store_data(
 					m_eap_fast_completion_status,
 					m_eap_fast_pac_store_pending_operation,
 					&m_references_and_data_blocks);
@@ -9997,7 +10199,8 @@
 			EAP_TRACE_DEBUG_SYMBIAN(
 					(_L("eap_am_type_tls_peap_symbian_c::FinalCompleteReadPACStoreDataL:status nok")));
 			m_ready_references_and_data_blocks.reset();
-			eap_status_e status = m_tls_application->complete_read_PAC_store_data(
+			
+			status = m_tls_application->complete_read_PAC_store_data(
 				m_eap_fast_completion_status,
 				m_eap_fast_pac_store_pending_operation,
 				&m_references_and_data_blocks);
@@ -10015,7 +10218,8 @@
 			EAP_TRACE_DEBUG_SYMBIAN(
 					(_L("eap_am_type_tls_peap_symbian_c::FinalCompleteReadPACStoreDataL:status nok")));
 			m_ready_references_and_data_blocks.reset();
-			eap_status_e status = m_tls_application->complete_read_PAC_store_data(
+			
+			status = m_tls_application->complete_read_PAC_store_data(
 				m_eap_fast_completion_status,
 				m_eap_fast_pac_store_pending_operation,
 				&m_references_and_data_blocks);
@@ -10030,7 +10234,8 @@
 			EAP_TRACE_DEBUG_SYMBIAN(
 					(_L("eap_am_type_tls_peap_symbian_c::FinalCompleteReadPACStoreDataL:status nok")));
 			m_ready_references_and_data_blocks.reset();
-			eap_status_e status = m_tls_application->complete_read_PAC_store_data(
+			
+			status = m_tls_application->complete_read_PAC_store_data(
 				m_eap_fast_completion_status,
 				m_eap_fast_pac_store_pending_operation,
 				&m_references_and_data_blocks);
@@ -10047,7 +10252,8 @@
 			EAP_TRACE_DEBUG_SYMBIAN(
 					(_L("eap_am_type_tls_peap_symbian_c::FinalCompleteReadPACStoreDataL:status nok")));
 			m_ready_references_and_data_blocks.reset();
-			eap_status_e status = m_tls_application->complete_read_PAC_store_data(
+			
+			status = m_tls_application->complete_read_PAC_store_data(
 				m_eap_fast_completion_status,
 				m_eap_fast_pac_store_pending_operation,
 				&m_references_and_data_blocks);
@@ -10075,7 +10281,8 @@
 				EAP_TRACE_DEBUG_SYMBIAN(
 						(_L("eap_am_type_tls_peap_symbian_c::FinalCompleteReadPACStoreDataL:status nok")));
 				m_ready_references_and_data_blocks.reset();
-				eap_status_e status = m_tls_application->complete_read_PAC_store_data(
+				
+				status = m_tls_application->complete_read_PAC_store_data(
 					m_eap_fast_completion_status,
 					m_eap_fast_pac_store_pending_operation,
 					&m_references_and_data_blocks);
@@ -10093,7 +10300,8 @@
 				EAP_TRACE_DEBUG_SYMBIAN(
 						(_L("eap_am_type_tls_peap_symbian_c::FinalCompleteReadPACStoreDataL:status nok")));
 				m_ready_references_and_data_blocks.reset();
-				eap_status_e status = m_tls_application->complete_read_PAC_store_data(
+				
+				status = m_tls_application->complete_read_PAC_store_data(
 					m_eap_fast_completion_status,
 					m_eap_fast_pac_store_pending_operation,
 					&m_references_and_data_blocks);
@@ -10108,7 +10316,8 @@
 				EAP_TRACE_DEBUG_SYMBIAN(
 						(_L("eap_am_type_tls_peap_symbian_c::FinalCompleteReadPACStoreDataL:status nok")));
 				m_ready_references_and_data_blocks.reset();
-				eap_status_e status = m_tls_application->complete_read_PAC_store_data(
+				
+				status = m_tls_application->complete_read_PAC_store_data(
 					m_eap_fast_completion_status,
 					m_eap_fast_pac_store_pending_operation,
 					&m_references_and_data_blocks);
@@ -10125,7 +10334,8 @@
 				EAP_TRACE_DEBUG_SYMBIAN(
 						(_L("eap_am_type_tls_peap_symbian_c::FinalCompleteReadPACStoreDataL:status nok")));
 				m_ready_references_and_data_blocks.reset();
-				eap_status_e status = m_tls_application->complete_read_PAC_store_data(
+				
+				status = m_tls_application->complete_read_PAC_store_data(
 					m_eap_fast_completion_status,
 					m_eap_fast_pac_store_pending_operation,
 					&m_references_and_data_blocks);
@@ -10160,7 +10370,7 @@
 		EAP_TRACE_DEBUG_SYMBIAN(
 				(_L("eap_am_type_tls_peap_symbian_c::FinalCompleteReadPACStoreDataL Reset Done")));
 		
-		eap_status_e status = m_tls_application->complete_read_PAC_store_data(
+		status = m_tls_application->complete_read_PAC_store_data(
 			m_eap_fast_completion_status,
 			m_eap_fast_pac_store_pending_operation,
 			&m_ready_references_and_data_blocks);
@@ -10172,7 +10382,8 @@
 		m_eap_fast_completion_status = eap_status_user_cancel_authentication;
 		m_new_references_and_data_blocks.reset();
 		m_ready_references_and_data_blocks.reset();
-		eap_status_e status = m_tls_application->complete_read_PAC_store_data(
+		
+		status = m_tls_application->complete_read_PAC_store_data(
 			m_eap_fast_completion_status,
 			m_eap_fast_pac_store_pending_operation,
 			&m_references_and_data_blocks);
@@ -10185,7 +10396,8 @@
 	m_eap_fast_completion_status = eap_status_user_cancel_authentication;
 	m_new_references_and_data_blocks.reset();
 	m_ready_references_and_data_blocks.reset();
-	eap_status_e status = m_tls_application->complete_read_PAC_store_data(
+	
+	status = m_tls_application->complete_read_PAC_store_data(
 		m_eap_fast_completion_status,
 		m_eap_fast_pac_store_pending_operation,
 		&m_references_and_data_blocks);
@@ -10207,7 +10419,7 @@
 //--------------------------------------------------
 
 eap_status_e eap_am_type_tls_peap_symbian_c::CompleteFilePasswordQueryL()
-	{
+{
 	eap_fast_pac_store_data_c * const new_data = new eap_fast_pac_store_data_c(m_am_tools);
 
 	eap_automatic_variable_c<eap_fast_pac_store_data_c> automatic_new_data(
@@ -10269,14 +10481,14 @@
 	m_both_completed++;
 	return m_eap_fast_completion_status;
 
-	}
+}
 
 // ---------------------------------------------------------
 // eap_am_type_tls_peap_symbian_c::CompleteNotifier
 // ---------------------------------------------------------
 //    
 eap_status_e eap_am_type_tls_peap_symbian_c::CompleteNotifierL()
-	{
+{
 	eap_status_e status( eap_status_ok );
 	switch ( m_state )
 	    {
@@ -10286,54 +10498,9 @@
 	    case EFilePasswordQuery:
 	    case EMasterkeyQuery:
 	    	{
-	    	EAP_TRACE_DEBUG_SYMBIAN(
-	    			(_L("m_notifier_data_pckg_from_user"),
-	    			m_notifier_data_pckg_from_user->Ptr(),
-	    			m_notifier_data_pckg_from_user->Size()));	    		
-	    	if ( iStatus.Int() == KErrCancel )
-	    		{
-	    		EAP_TRACE_DEBUG_SYMBIAN(
-	    				(_L("eap_am_type_tls_peap_symbian_c::CompleteNotifierL - User cancelled the notifier item")));
-	    		m_userAction = EEapFastNotifierUserActionCancel;	
-	    		}		
-	    	else if( iStatus.Int() != KErrNone )
-	    		{
-	    		EAP_TRACE_DEBUG_SYMBIAN(
-	    			(_L("eap_am_type_tls_peap_symbian_c::CompleteNotifierL - ERROR: Notifier error=%d"),
-	    			iStatus.Int()));	
-	    		return m_am_tools->convert_am_error_to_eapol_error(iStatus.Int());		
-	    		}
-    		EAP_TRACE_DEBUG_SYMBIAN(
-    			(_L("CompleteNotifierL - Notifier return UiItem=%d, UserAction=%d"),
-    			m_notifier_data_from_user->iEapFastNotifierUiItem,
-    			m_notifier_data_from_user->iEapFastNotifierUserAction));
-	    		
-    		EAP_TRACE_DATA_DEBUG_SYMBIAN(
-    			("CompleteNotifierL:UserInput:",
-    			m_notifier_data_from_user->iEapFastNotifierBuffer.Ptr(), 
-    			m_notifier_data_from_user->iEapFastNotifierBuffer.Size()));
-	    			    		
-	    	if ( m_notifier_data_from_user->iEapFastNotifierBuffer.Size() > 0 )
-	    		{
-    			HBufC8* notifier_data8 = HBufC8::NewLC(m_notifier_data_from_user->iEapFastNotifierBuffer.Size());
-    			TPtr8 notifier_dataPtr8 = notifier_data8->Des();
-    			
-    			notifier_dataPtr8.Copy(m_notifier_data_from_user->iEapFastNotifierBuffer); // Unicode -> ascii.
-    			EAP_TRACE_DEBUG_SYMBIAN(
-   					(_L("eap_am_type_tls_peap_symbian_c::CompleteNotifierL ShowNotifierItem - Data copy done")));
-    		    
-    			EAP_TRACE_DATA_DEBUG_SYMBIAN(
-	    			("eap_am_type_tls_peap_symbian_c::CompleteNotifierL ShowNotifierItem:PW from UI (8bits)",
-   					notifier_dataPtr8.Ptr(), 
-   					notifier_dataPtr8.Size()));	    
-    		    
-    			status = m_userResponse.set_copy_of_buffer(
-   					notifier_dataPtr8.Ptr(),
-   					notifier_dataPtr8.Size());
-    			
-	    		CleanupStack::PopAndDestroy( notifier_data8 );
-	    		}
+
 	    	break;
+
 	    	}
 	    default:
 	    	{
@@ -10343,48 +10510,48 @@
 	    	}
 	    }
 	return status;
-	}
+}
 
 //--------------------------------------------------
 
 void eap_am_type_tls_peap_symbian_c::ConvertUnicodeToAsciiL(const TDesC16& aFromUnicode, TDes8& aToAscii)
-	{
-		EAP_TRACE_DATA_DEBUG_SYMBIAN(
-			("eap_am_type_tls_peap_symbian_c::ConvertUnicodeToAsciiL:From TEXT",
-			aFromUnicode.Ptr(), 
-			aFromUnicode.Size()));	
-		
-		if(aFromUnicode.Length() <= 0)
-		{
-			EAP_TRACE_DEBUG_SYMBIAN(
-			(_L("eap_am_type_tls_peap_symbian_c::ConvertUnicodeToAsciiL: Return: NOTHING TO CONVERT")));
-			
-			return;
-		}	
-		
+{
+	EAP_TRACE_DATA_DEBUG_SYMBIAN(
+		("eap_am_type_tls_peap_symbian_c::ConvertUnicodeToAsciiL:From TEXT",
+		aFromUnicode.Ptr(), 
+		aFromUnicode.Size()));	
+	
+	if(aFromUnicode.Length() <= 0)
+	{
 		EAP_TRACE_DEBUG_SYMBIAN(
-			(_L("eap_am_type_tls_peap_symbian_c::ConvertUnicodeToAsciiL, aFromUnicode.Length=%d, aFromUnicode.Size=%d"),
-			aFromUnicode.Length(), aFromUnicode.Size()));	
-		
-		// Convert from Unicode to ascii.
-		HBufC8* aFromUnicodeBuf8 = HBufC8::NewLC(aFromUnicode.Length()); // Half times size of source (or length) is enough here.
-		TPtr8 aFromUnicodePtr8 = aFromUnicodeBuf8->Des();
-		
-		EAP_TRACE_DEBUG_SYMBIAN(
-			(_L("eap_am_type_tls_peap_symbian_c::ConvertUnicodeToAsciiL, aFromUnicodePtr8.Length=%d, aFromUnicodePtr8.Size=%d, aFromUnicodePtr8.MaxLength=%d, aFromUnicodePtr8.MaxSize=%d"),
-			aFromUnicodePtr8.Length(), aFromUnicodePtr8.Size(), aFromUnicodePtr8.MaxLength(), aFromUnicodePtr8.MaxSize()));				
-		
-		aFromUnicodePtr8.Copy(aFromUnicode); // Unicode -> ascii.
-		
-		aToAscii = aFromUnicodePtr8;	
-
-		CleanupStack::PopAndDestroy(aFromUnicodeBuf8); // Delete aFromUnicodeBuf8.	
-
-		EAP_TRACE_DATA_DEBUG_SYMBIAN(
-			("eap_am_type_tls_peap_symbian_c::ConvertUnicodeToAsciiL:To ASCII",
-			aToAscii.Ptr(), 
-			aToAscii.Size()));	
-	}
+		(_L("eap_am_type_tls_peap_symbian_c::ConvertUnicodeToAsciiL: Return: NOTHING TO CONVERT")));
+		
+		return;
+	}	
+	
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("eap_am_type_tls_peap_symbian_c::ConvertUnicodeToAsciiL, aFromUnicode.Length=%d, aFromUnicode.Size=%d"),
+		aFromUnicode.Length(), aFromUnicode.Size()));	
+	
+	// Convert from Unicode to ascii.
+	HBufC8* aFromUnicodeBuf8 = HBufC8::NewLC(aFromUnicode.Length()); // Half times size of source (or length) is enough here.
+	TPtr8 aFromUnicodePtr8 = aFromUnicodeBuf8->Des();
+	
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("eap_am_type_tls_peap_symbian_c::ConvertUnicodeToAsciiL, aFromUnicodePtr8.Length=%d, aFromUnicodePtr8.Size=%d, aFromUnicodePtr8.MaxLength=%d, aFromUnicodePtr8.MaxSize=%d"),
+		aFromUnicodePtr8.Length(), aFromUnicodePtr8.Size(), aFromUnicodePtr8.MaxLength(), aFromUnicodePtr8.MaxSize()));				
+	
+	aFromUnicodePtr8.Copy(aFromUnicode); // Unicode -> ascii.
+	
+	aToAscii = aFromUnicodePtr8;	
+
+	CleanupStack::PopAndDestroy(aFromUnicodeBuf8); // Delete aFromUnicodeBuf8.	
+
+	EAP_TRACE_DATA_DEBUG_SYMBIAN(
+		("eap_am_type_tls_peap_symbian_c::ConvertUnicodeToAsciiL:To ASCII",
+		aToAscii.Ptr(), 
+		aToAscii.Size()));	
+}
 
 
 // ---------------------------------------------------------
@@ -10392,7 +10559,7 @@
 // ---------------------------------------------------------
 //
 void eap_am_type_tls_peap_symbian_c::CheckPasswordTimeValidityL()
-	{
+{
 	/* Check validity of password against timelimit */
 	
 	EAP_TRACE_DEBUG(m_am_tools, 
@@ -10405,14 +10572,22 @@
     // get max session time
 	HBufC* buf = HBufC::NewLC( KMaxSqlQueryLength );
 	TPtr sqlStatement = buf->Des();	
-	_LIT( KSqlQuery, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d" );
+
+	_LIT( KSqlQuery, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d" );
+
 	sqlStatement.Format(
 		KSqlQuery,
 		&cf_str_EAP_FAST_max_session_validity_time_literal,
 		&KFastGeneralSettingsDBTableName,
-		&KServiceType, m_index_type, 
-		&KServiceIndex, m_index,
-		&KTunnelingType, m_tunneling_vendor_type );	
+		&KServiceType,
+		m_index_type, 
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType, 
+		m_tunneling_type.get_vendor_type());
+
 	TRAPD( err,  maxSessionTime =  ReadIntDbValueL(
 		m_database,
 		cf_str_EAP_FAST_max_session_validity_time_literal,
@@ -10586,7 +10761,7 @@
 			}
 		}
 	
-	} // eap_am_type_tls_peap_symbian_c::CheckPasswordTimeValidityL()
+} // eap_am_type_tls_peap_symbian_c::CheckPasswordTimeValidityL()
 
 
 // ---------------------------------------------------------
@@ -10599,7 +10774,7 @@
 	const TDesC& aTableName,
 	const TDesC& aColumnName,
 	const TDesC& aColumnDef )
-	{
+{
 	EAP_TRACE_DEBUG( m_am_tools, TRACE_FLAGS_DEFAULT, ( EAPL(
 		"eap_am_type_tls_peap_symbian_c::AlterTableL() IN\n" ) ) );
 	
@@ -10675,7 +10850,7 @@
 	EAP_TRACE_DEBUG( m_am_tools, TRACE_FLAGS_DEFAULT, ( EAPL(
 	    "eap_am_type_tls_peap_symbian_c::AlterTableL() OUT\n" ) ) );
 
-	} // eap_am_type_tls_peap_symbian_c::AlterTableL()
+} // eap_am_type_tls_peap_symbian_c::AlterTableL()
 
 
 // ---------------------------------------------------------
@@ -10683,7 +10858,7 @@
 // ---------------------------------------------------------
 //
 void eap_am_type_tls_peap_symbian_c::FixOldTablesForPwdIdentityTimeL()
-	{
+{
 	EAP_TRACE_DEBUG( m_am_tools, TRACE_FLAGS_DEFAULT, ( EAPL(
 	    "eap_am_type_tls_peap_symbian_c::FixOldTablesForPwdIdentityTimeL() IN" ) ) );	
 	
@@ -10716,7 +10891,7 @@
 	EAP_TRACE_DEBUG( m_am_tools, TRACE_FLAGS_DEFAULT, ( EAPL(
 	    "eap_am_type_tls_peap_symbian_c::FixOldTablesForPwdIdentityTimeL() OUT" ) ) );
 	
-	} // eap_am_type_tls_peap_symbian_c::FixOldTablesForPwdIdentityTimeL()
+} // eap_am_type_tls_peap_symbian_c::FixOldTablesForPwdIdentityTimeL()
 
 
 // ---------------------------------------------------------
@@ -10724,7 +10899,7 @@
 // ---------------------------------------------------------
 //
 void eap_am_type_tls_peap_symbian_c::FixOldTableForPacStoreInitL()
-	{
+{
 	EAP_TRACE_DEBUG( m_am_tools, TRACE_FLAGS_DEFAULT, ( EAPL(
 		"eap_am_type_tls_peap_symbian_c::FixOldTableForPacStoreInitL() IN\n" ) ) );
 	
@@ -10752,7 +10927,7 @@
 	EAP_TRACE_DEBUG( m_am_tools, TRACE_FLAGS_DEFAULT, ( EAPL(
 	    "eap_am_type_tls_peap_symbian_c::FixOldTableForPacStoreInitL() OUT\n" ) ) );
 
-	} // eap_am_type_tls_peap_symbian_c::FixOldTableForPacStoreInitL()
+} // eap_am_type_tls_peap_symbian_c::FixOldTableForPacStoreInitL()
 
 
 // ---------------------------------------------------------
@@ -10763,7 +10938,7 @@
 	RDbNamedDatabase& aDb,
 	const TDesC& aColumnName,
 	const TDesC& aSqlStatement )
-    {
+{
 	EAP_TRACE_DEBUG( m_am_tools, TRACE_FLAGS_DEFAULT, (
 			EAPL( "eap_am_type_tls_peap_symbian_c::ReadIntDbValueL()\n" ) ) );
     TPtrC columnName;    
@@ -10792,7 +10967,7 @@
 	CleanupStack::PopAndDestroy( &view ); // Close view.
 
 	return retVal;
-    } // eap_am_type_tls_peap_symbian_c::ReadIntDbValueL
+} // eap_am_type_tls_peap_symbian_c::ReadIntDbValueL
 
 
 // ---------------------------------------------------------
@@ -10800,7 +10975,7 @@
 // ---------------------------------------------------------
 //
 void eap_am_type_tls_peap_symbian_c::UpdatePasswordTimeL()
-	{
+{
 	/* update last password time */
 	TPtrC lastFullPasswordTimeString;
 	
@@ -10886,11 +11061,12 @@
 	
 	/* update end */	
 	
-	} // eap_am_type_tls_peap_symbian_c::UpdatePasswordTimeL()
-
+} // eap_am_type_tls_peap_symbian_c::UpdatePasswordTimeL()
+
+//--------------------------------------------------
 
 eap_status_e eap_am_type_tls_peap_symbian_c::CreateMasterkeyL()
-	{
+{
 	HBufC8* password = HBufC8::NewLC(m_userResponse.get_data_length());
 	TPtr8 passwordPtr = password->Des();
 	m_PAC_store_password.set_copy_of_buffer(&m_userResponse);
@@ -10898,7 +11074,8 @@
 	m_eap_fast_completion_status = m_am_tools->convert_am_error_to_eapol_error(iPacStoreDb->CreateAndSaveMasterKeyL(passwordPtr));
 	CleanupStack::PopAndDestroy(password);
 	return m_eap_fast_completion_status;
-	}
+}
+
 #endif //#if defined(USE_FAST_EAP_TYPE)
 
 
@@ -10909,10 +11086,9 @@
 // eap_am_type_tls_peap_symbian_c::is_ttls_pap_session_valid()
 // ------------------------------------------------------------------------
 //
-EAP_FUNC_EXPORT
-bool eap_am_type_tls_peap_symbian_c::is_ttls_pap_session_valid()
-	{
-    DEBUG( "eap_am_type_tls_peap_symbian_c::is_ttls_pap_session_valid()" );    
+EAP_FUNC_EXPORT bool eap_am_type_tls_peap_symbian_c::is_ttls_pap_session_valid()
+{
+    EAP_TRACE_DEBUG_SYMBIAN((_L( "eap_am_type_tls_peap_symbian_c::is_ttls_pap_session_valid()" )));    
 
     TBool isValid = EFalse;
     TInt err = KErrNone;
@@ -10921,8 +11097,7 @@
     TRAP( err, isValid = IsTtlsPapSessionValidL() );
     if ( err != KErrNone )
 	    {
-	    DEBUG1( "eap_am_type_tls_peap_symbian_c::is_ttls_pap_session_valid() ERROR: \
-	        Leave, err==%d.", err );
+	    EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: eap_am_type_tls_peap_symbian_c::is_ttls_pap_session_valid(): Leave, err==%d."), err ));
 	    retVal = false;
 	    }
     else
@@ -10930,48 +11105,105 @@
     	retVal = ( isValid ) ? true : false;
     	}
     return retVal;
-	}
+}
 
 // ------------------------------------------------------------------------
 // eap_am_type_tls_peap_symbian_c::query_ttls_pap_username_and_password()
 // ------------------------------------------------------------------------
 //    
-EAP_FUNC_EXPORT eap_status_e
-eap_am_type_tls_peap_symbian_c::query_ttls_pap_username_and_password(
+EAP_FUNC_EXPORT eap_status_e eap_am_type_tls_peap_symbian_c::query_ttls_pap_username_and_password(
 	const eap_variable_data_c * const aInSrvChallengeUtf8 )
-    {
-    DEBUG( "eap_am_type_tls_peap_symbian_c::query_ttls_pap_username_and_password()" );    
+{
+    EAP_TRACE_DEBUG_SYMBIAN((_L( "eap_am_type_tls_peap_symbian_c::query_ttls_pap_username_and_password()" )));    
 	
     eap_status_e status( eap_status_pending_request );
-
-    if ( !iEapTtlsPapActive )
-    	{
-    	TRAPD( err, iEapTtlsPapActive = CEapTtlsPapActive::NewL(
-    		this, m_am_tools ) );
-    	if ( err != KErrNone )
-    		{
-            DEBUG1( "eap_am_type_tls_peap_symbian_c::query_ttls_pap_username_and_password() \
-            	ERROR: CEapTtlsPapActive::NewL(), err=%d.", err );    
-    	    return ConvertAmErrorToEapolError( err );
-    		}
-    	}
-    if ( aInSrvChallengeUtf8 != NULL )
+    TEapExpandedType aEapType(*EapExpandedTypeTtlsPap.GetType());
+    
+    m_notifier_data_to_user->iUsername.Zero();
+    m_notifier_data_to_user->iPassword.Zero();
+    m_notifier_data_to_user->iUidata.Zero();
+    
+    if (aInSrvChallengeUtf8 != NULL)
     	{
-        iEapTtlsPapActive->UpdateSrvChallenge( *aInSrvChallengeUtf8 );
-    	}
-    TBool startedOk = iEapTtlsPapActive->Start(
-    	CEapTtlsPapActive::EEapTtlsPapActiveQueryUserNameAndPassword );
-	if ( !startedOk )
-        {
-        status = eap_status_process_general_error;
-        }
-	if ( status != eap_status_pending_request )
-		{
-        DEBUG( "eap_am_type_tls_peap_symbian_c::query_ttls_pap_username_and_password() \
-        	ERROR: status != eap_status_pending_request" );    
-		}
+			const TPtrC8 utf8(
+				aInSrvChallengeUtf8->get_data(), aInSrvChallengeUtf8->get_data_length()*2); // Length in bytes
+		
+			TPtr16 unicode(reinterpret_cast<unsigned short *>(&m_notifier_data_to_user->iUidata), m_notifier_data_to_user->iUidata.Size());
+			CnvUtfConverter::ConvertToUnicodeFromUtf8(unicode, utf8);
+
+			m_state = EPapChallenge;
+	    TEapExpandedType aEapType(*EapExpandedTypeTtlsPap.GetType());
+	    
+	    if (iEapAuthNotifier == 0)
+	    	{
+	    	TRAPD(err, iEapAuthNotifier = CEapAuthNotifier::NewL( *this ));
+		  	if (err)
+		  		{
+		  			return eap_status_process_general_error;
+		  		}
+	    	}
+	    TRAPD(err1, iEapAuthNotifier->StartL(CEapAuthNotifier::EEapNotifierTypePapChallengeReplyQueryDialog, m_notifier_data_to_user, aEapType));
+	  	if (err1)
+	  		{
+	  			return eap_status_process_general_error;
+	  		}
+	   	}
+		else
+			{
+			m_state = EPapUserNameAndPassword;
+		
+			TTtlsPapDbInfo aInDbInfo;
+			TRAPD(err2, ReadTtlsPapDbL(aInDbInfo));
+	  	if (err2)
+	  		{
+	  			return eap_status_process_general_error;
+	  		}
+
+	    m_notifier_data_to_user->iPasswordPromptEnabled = aInDbInfo.iUsrPwdInfo.iPasswordPromptEnabled;
+			if (m_notifier_data_to_user->iPasswordPromptEnabled ||
+				 (aInDbInfo.iUsrPwdInfo.iUserName.Size() == 0 &&
+				  aInDbInfo.iUsrPwdInfo.iPassword.Size() == 0))
+				{
+	  	  m_notifier_data_to_user->iUsername.Zero();
+	   		m_notifier_data_to_user->iPassword.Zero();
+	   		TRAPD(err3,SetTtlsPapColumnToNullL( cf_str_EAP_TLS_PEAP_ttls_pap_password_literal ));
+		  	if (err3)
+		  		{
+		  			return eap_status_process_general_error;
+		  		}
+	   		
+		    if (iEapAuthNotifier == 0)
+		    	{
+		    	TRAPD(err4, iEapAuthNotifier = CEapAuthNotifier::NewL( *this ));
+			  	if (err4)
+			  		{
+			  			return eap_status_process_general_error;
+			  		}
+		    	}
+		    else
+		    	{
+		    	TRAPD(err5,iEapAuthNotifier->Cancel());
+			  	if (err5)
+			  		{
+			  			return eap_status_process_general_error;
+			  		}
+		    	}
+				TRAPD(err6, iEapAuthNotifier->StartL(CEapAuthNotifier::EEapNotifierTypePapAuthQueryDialog, m_notifier_data_to_user, aEapType));
+		  	if (err6)
+		  		{
+		  			return eap_status_process_general_error;
+		  		}
+				}
+			else
+				{
+		    m_notifier_data_to_user->iUsername = aInDbInfo.iUsrPwdInfo.iUserName;
+	  	  m_notifier_data_to_user->iPassword = aInDbInfo.iUsrPwdInfo.iPassword;
+				DlgComplete(KErrNone);
+				}
+			}
+
 	return status;
-    }
+}
 
 // ================= TTLS-PAP public not exported =======================
 
@@ -10979,14 +11211,13 @@
 // eap_am_type_tls_peap_symbian_c::verify_ttls_pap_username_and_password()
 // ------------------------------------------------------------------------
 //    
-eap_status_e
-eap_am_type_tls_peap_symbian_c::verify_ttls_pap_username_and_password(
+eap_status_e eap_am_type_tls_peap_symbian_c::verify_ttls_pap_username_and_password(
 	const eap_variable_data_c * const /*aUserName*/,
 	const eap_variable_data_c * const /*aUserPassword*/ )
-	{
-	DEBUG( "eap_am_type_tls_peap_symbian_c::verify_ttls_pap_username_and_password()" );
+{
+	EAP_TRACE_DEBUG_SYMBIAN((_L( "eap_am_type_tls_peap_symbian_c::verify_ttls_pap_username_and_password()" )));
 	return eap_status_not_supported;
-	}
+}
 
 // ================= TTLS-PAP public new =======================
 
@@ -10994,13 +11225,12 @@
 // eap_am_type_tls_peap_symbian_c::CompleteQueryTtlsPapUserNameAndPassword()
 // ------------------------------------------------------------------------
 //    
-eap_status_e
-eap_am_type_tls_peap_symbian_c::CompleteQueryTtlsPapUserNameAndPassword(
+eap_status_e eap_am_type_tls_peap_symbian_c::CompleteQueryTtlsPapUserNameAndPassword(
 	eap_status_e aStatus,
 	const TDesC8& aUserNameUtf8,
 	const TDesC8& aPasswordUtf8 )
-	{
-	DEBUG( "eap_am_type_tls_peap_symbian_c::CompleteQueryTtlsPapUserNameAndPassword()" );
+{
+	EAP_TRACE_DEBUG_SYMBIAN((_L( "eap_am_type_tls_peap_symbian_c::CompleteQueryTtlsPapUserNameAndPassword()" )));
 	
 	eap_status_e retStatus = aStatus;
 	eap_status_e tmpStatus = eap_status_ok;
@@ -11022,15 +11252,14 @@
 		}
 	if ( m_tls_am_partner == NULL )
 		{
-		DEBUG( "eap_am_type_tls_peap_symbian_c::CompleteQueryTtlsPapUserNameAndPassword() \
-			ERROR: m_tls_am_partner is NULL." );
+		EAP_TRACE_DEBUG_SYMBIAN((_L( "ERROR: eap_am_type_tls_peap_symbian_c::CompleteQueryTtlsPapUserNameAndPassword(): m_tls_am_partner is NULL." )));
         return eap_status_process_general_error;
 		}
 	retStatus = m_tls_am_partner->
 	    complete_query_ttls_pap_username_and_password(
 		    &userNameUtf8, &passwordUtf8, retStatus );	
 	return retStatus;
-	} // eap_am_type_tls_peap_symbian_c::CompleteQueryTtlsPapUserNameAndPassword(
+} // eap_am_type_tls_peap_symbian_c::CompleteQueryTtlsPapUserNameAndPassword(
 
 
 // ------------------------------------------------------------------------
@@ -11039,14 +11268,14 @@
 //    
 eap_status_e
 eap_am_type_tls_peap_symbian_c::ConvertAmErrorToEapolError( TInt aErr )
-	{
-	DEBUG( "eap_am_type_tls_peap_symbian_c::ConvertAmErrorToEapolError()" );
+{
+	EAP_TRACE_DEBUG_SYMBIAN((_L( "eap_am_type_tls_peap_symbian_c::ConvertAmErrorToEapolError()" )));
     if ( m_am_tools )
     	{
     	return m_am_tools->convert_am_error_to_eapol_error( aErr );
     	}
 	return eap_status_process_general_error;
-	}
+}
 
 
 // ------------------------------------------------------------------------
@@ -11060,8 +11289,8 @@
 //| EAP_TLS_PEAP_ttls_pap_last_full_authentication_time	| BIGINT		   	| KTTLSPAPLastFullAuthTime	                             |//
 void eap_am_type_tls_peap_symbian_c::ReadTtlsPapDbL(
 	TTtlsPapDbInfo& aOutDbInfo )
-	{
-	DEBUG( "eap_am_type_tls_peap_symbian_c::ReadTtlsPapDbL()" );
+{
+	EAP_TRACE_DEBUG_SYMBIAN((_L( "eap_am_type_tls_peap_symbian_c::ReadTtlsPapDbL()" )));
 	
 	HBufC* buf = HBufC::NewLC( KMaxSqlQueryLength );
 	TPtr sqlStatement = buf->Des();
@@ -11116,7 +11345,7 @@
 	CleanupStack::PopAndDestroy( &view ); // Close view.
 	CleanupStack::PopAndDestroy( buf ); // Delete buf.
 	
-	} // eap_am_type_tls_peap_symbian_c::ReadTtlsPapDbL()
+} // eap_am_type_tls_peap_symbian_c::ReadTtlsPapDbL()
 
 
 // ------------------------------------------------------------------------
@@ -11130,8 +11359,8 @@
 //| EAP_TLS_PEAP_ttls_pap_last_full_authentication_time	| BIGINT		   	| KTTLSPAPLastFullAuthTime	                             |//
 void eap_am_type_tls_peap_symbian_c::WriteTtlsPapDbL(
 	const TTtlsPapDbInfo& aInDbInfo )
-	{
-	DEBUG( "eap_am_type_tls_peap_symbian_c::WriteTtlsPapDbL()" );
+{
+	EAP_TRACE_DEBUG_SYMBIAN((_L( "eap_am_type_tls_peap_symbian_c::WriteTtlsPapDbL()" )));
 	
 	
 	HBufC* buf = HBufC::NewLC( KMaxSqlQueryLength );
@@ -11139,17 +11368,24 @@
 	
 	// Query all the relevant parameters
 	_LIT( KSQLQuery,
-		"SELECT %S, %S, %S, %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d" );
-	sqlStatement.Format( KSQLQuery,
+		"SELECT %S, %S, %S, %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d" );
+
+	sqlStatement.Format(
+		KSQLQuery,
 		&cf_str_EAP_TLS_PEAP_ttls_pap_password_prompt_literal,           // select´
 		&cf_str_EAP_TLS_PEAP_ttls_pap_username_literal,                  // select
 		&cf_str_EAP_TLS_PEAP_ttls_pap_password_literal,                  // select
 		&cf_str_EAP_TLS_PEAP_ttls_pap_max_session_validity_time_literal, // select
 		&KTTLSPAPLastFullAuthTime,                                       // select
 		&KTtlsDatabaseTableName,                                         // from
-		&KServiceType, m_index_type,                                     // where %S=%d
-		&KServiceIndex, m_index,                                         // where %S=%d
-		&KTunnelingType, m_tunneling_vendor_type );                      // where %S=%d
+		&KServiceType,
+		m_index_type,
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType,
+		m_tunneling_type.get_vendor_type());
 	
 	RDbView view;
 	// Evaluate view
@@ -11195,7 +11431,7 @@
 	CleanupStack::PopAndDestroy( &view ); // Close view.
 	CleanupStack::PopAndDestroy( buf ); // Delete buf.
 	
-	} // eap_am_type_tls_peap_symbian_c::WriteTtlsPapDbL()
+} // eap_am_type_tls_peap_symbian_c::WriteTtlsPapDbL()
 
 
 // ------------------------------------------------------------------------
@@ -11203,21 +11439,28 @@
 // ------------------------------------------------------------------------
 //
 void eap_am_type_tls_peap_symbian_c::SetTtlsPapColumnToNullL( const TDesC& aColName )
-	{
-	DEBUG( "eap_am_type_tls_peap_symbian_c::SetColumnNullL()" );
+{
+	EAP_TRACE_DEBUG_SYMBIAN((_L( "eap_am_type_tls_peap_symbian_c::SetColumnNullL()" )));
 
 	HBufC* buf = HBufC::NewLC( KMaxSqlQueryLength );
 	TPtr sqlStatement = buf->Des();
 	
 	// Query all the relevant parameters
 	_LIT( KSQLQuery,
-		"SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d" );
-	sqlStatement.Format( KSQLQuery,
+		"SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d" );
+
+	sqlStatement.Format(
+		KSQLQuery,
 		&aColName,                                  // select´
 		&KTtlsDatabaseTableName,                    // from
-		&KServiceType, m_index_type,                // where %S=%d
-		&KServiceIndex, m_index,                    // where %S=%d
-		&KTunnelingType, m_tunneling_vendor_type ); // where %S=%d
+		&KServiceType,
+		m_index_type,
+		&KServiceIndex,
+		m_index,
+		&KTunnelingTypeVendorId,
+		m_tunneling_type.get_vendor_id(),
+		&KTunnelingType,
+		m_tunneling_type.get_vendor_type());
 	
 	RDbView view;
 	// Evaluate view
@@ -11245,7 +11488,7 @@
 	CleanupStack::PopAndDestroy( &view ); // Close view.
 	CleanupStack::PopAndDestroy( buf ); // Delete buf.
 	
-	} // eap_am_type_tls_peap_symbian_c::SetTtlsPapColumnToNullL()
+} // eap_am_type_tls_peap_symbian_c::SetTtlsPapColumnToNullL()
 
 
 // ================= TTLS-PAP private =======================
@@ -11255,8 +11498,8 @@
 // ------------------------------------------------------------------------
 //
 TBool eap_am_type_tls_peap_symbian_c::IsTtlsPapSessionValidL()
-	{
-	DEBUG( "eap_am_type_tls_peap_symbian_c::IsTtlsPapSessionValidL()" );
+{
+	EAP_TRACE_DEBUG_SYMBIAN((_L( "eap_am_type_tls_peap_symbian_c::IsTtlsPapSessionValidL()" )));
 
 	TTtlsPapDbInfo dbInfo;
 	TInt err = KErrNone;
@@ -11266,8 +11509,7 @@
 	
     if 	( err != KErrNone )
         {
-        DEBUG1( "eap_am_type_tls_peap_symbian_c::IsTtlsPapSessionValidL() ERROR: \
-        	Leave happened, err=%d.", err );
+        EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: eap_am_type_tls_peap_symbian_c::IsTtlsPapSessionValidL(): Leave happened, err=%d."), err ));
         retValue = EFalse;
         }
     else
@@ -11278,8 +11520,7 @@
 			// one read from configuration file.
 		    if( dbInfo.iMaxSessionTime == 0 )
 	            {
-	            DEBUG( "eap_am_type_tls_peap_symbian_c::IsTtlsPapSessionValidL() \
-	                	Using max TTLS PAP session validity time from config file." );
+	            EAP_TRACE_DEBUG_SYMBIAN((_L( "eap_am_type_tls_peap_symbian_c::IsTtlsPapSessionValidL() Using max TTLS PAP session validity time from config file." )));
 			
 				// use value from config file
 				dbInfo.iMaxSessionTime = iEapTtlsPapMaxSessionConfigTime;
@@ -11290,7 +11531,7 @@
 		    }
     	}	
 	return retValue;
-	}  // eap_am_type_tls_peap_symbian_c::IsTtlsPapSessionValidL()
+}  // eap_am_type_tls_peap_symbian_c::IsTtlsPapSessionValidL()
 
 
 // ------------------------------------------------------------------------
@@ -11300,8 +11541,8 @@
 TBool eap_am_type_tls_peap_symbian_c::CheckTtlsPapSessionValidity(
 	const TInt64& aInMaxSessionTime,
 	const TInt64& aInLastFullAuthTime )
-	{
-	DEBUG( "eap_am_type_tls_peap_symbian_c::CheckTtlsPapSessionValidity()" );
+{
+	EAP_TRACE_DEBUG_SYMBIAN((_L( "eap_am_type_tls_peap_symbian_c::CheckTtlsPapSessionValidity()" )));
 	
 	// Get the current time.
 	TTime currentTime;
@@ -11371,7 +11612,93 @@
 		
 		return EFalse;	
 	    }
-	} // eap_am_type_tls_peap_symbian_c::CheckTtlsPapSessionValidity
-
+} // eap_am_type_tls_peap_symbian_c::CheckTtlsPapSessionValidity
+
+//--------------------------------------------------
+#if defined(USE_FAST_EAP_TYPE)
+
+TInt eap_am_type_tls_peap_symbian_c::CreateMMETelConnectionL()
+{
+    EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+    EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("Creating MMETel connection.\n")));
+
+    TInt errorCode = KErrNone;
+    
+    // MMETel need to be connected only once.    
+    if( !iMMETELConnectionStatus )
+    {
+        RTelServer::TPhoneInfo phoneInfo;
+        TInt phoneCount = 0;
+
+        // Connect to ETel server
+        User::LeaveIfError( iServer.Connect() );    
+        
+        EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("Connected to ETel server.\n")));    
+
+        // This function loads an ETel TSY module, mmtsy.
+        errorCode = iServer.LoadPhoneModule( KMmTsyModuleName );    
+        
+        EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("Loaded phone module.\n")));     
+        
+        if ( errorCode != KErrNone && errorCode != KErrAlreadyExists )
+        {
+            User::Leave( errorCode );
+        }
+
+        iServer.SetExtendedErrorGranularity( RTelServer::EErrorExtended );
+
+        // This function retrieves the total number of phones supported by all 
+        // the currently loaded ETel (TSY) modules.
+        User::LeaveIfError( iServer.EnumeratePhones( phoneCount ) );    
+        
+        EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("Number of phones supported by the loaded ETel = %d.\n"), phoneCount));
+        
+        // This function retrieves information associated with the specified phone
+        while ( ( phoneCount-- ) && ( phoneInfo.iName != KMmTsyPhoneName ) ) 
+        { 
+            User::LeaveIfError( iServer.GetPhoneInfo( phoneCount, phoneInfo ) );        
+            
+            EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("Got phone info.\n")));
+        } 
+
+        // This function opens a phone subsession by name. ("DefaultPhone").
+        User::LeaveIfError( iPhone.Open( iServer, phoneInfo.iName ) );  
+        
+        EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("Opened phone subsession.\n")));
+        
+        // MMETel connected and the phone module loaded fine.   
+        iMMETELConnectionStatus = ETrue;    
+    }
+    else
+    {
+        // MMETel already connected.
+        EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("MMETel connected once already.\n")));
+    }
+        
+    EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+    
+    return errorCode;   
+}
+
+//--------------------------------------------------
+
+void eap_am_type_tls_peap_symbian_c::DisconnectMMETel()
+{
+    if( iMMETELConnectionStatus )
+    {
+        EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("Closing RMobilePhone and MMETEL.\n")));
+        
+        iPhone.Close();
+        iServer.Close(); // Phone module is unloaded automatically when RTelServer session is closed
+        
+        iMMETELConnectionStatus = EFalse;
+    }
+    else
+    {
+        EAP_TRACE_DEBUG(m_am_tools, TRACE_FLAGS_DEFAULT, (EAPL("RMobilePhone and MMETEL already closed.\n")));      
+    }   
+}
+#endif
+//--------------------------------------------------
 
 // End of file.
--- a/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/inc/EapTlsPeap.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/inc/EapTlsPeap.h	Mon May 24 20:32:47 2010 +0300
@@ -16,21 +16,23 @@
 */
 
 /*
-* %version: 17.1.2 %
+* %version: 27 %
 */
 
 #ifndef _EAPTLSPEAP_H_
 #define _EAPTLSPEAP_H_
 
 // INCLUDES
-#include <EapType.h>
+#include <EapTypePlugin.h>
 #include "eap_header.h"
-
+#if defined(USE_FAST_EAP_TYPE)
+#include "tls_application_eap_fast.h"
+#endif
 // CLASS DECLARATION
 /**
 * Class that implements the generic EAP type interface. Implements EAP TLS protocol.
 */
-class CEapTlsPeap : public CEapType
+class CEapTlsPeap : public CEapTypePlugin
 {
 public:		
 
@@ -120,16 +122,13 @@
 	
 #endif // #ifdef USE_EAP_SIMPLE_CONFIG
 	
-	/**
-	* Invokes the configuration UI.
-	**/
-	TInt InvokeUiL();
+
 	
 	/**
 	* Gets information about EAP type. 
 	* @return Pointer to a class that contains the EAP type information. Also pushed to cleanup stack.
 	*/
-	CEapTypeInfo* GetInfoLC();
+	CEapTypeInfo* GetInfoL();
 	
 	/**
 	* Deletes EAP type configuration
@@ -151,7 +150,7 @@
 	* EAP type. 
 	* @param aTunnelingType Type number for the tunneling type
 	*/	
-	void SetTunnelingType(const TInt aTunnelingType);
+	void SetTunnelingType(const TEapExpandedType aTunnelingType);
 
 	/**
 	* Changes the index of the saved parameters.
@@ -186,7 +185,12 @@
 	* Constructor initialises member variables.
 	*/
 	CEapTlsPeap(const TIndexType aIndexType, const TInt aIndex, const eap_type_value_e aEapType);
-	
+
+#if defined(USE_FAST_EAP_TYPE)
+	tls_application_eap_fast_c* GetTlsInterfaceL(abs_eap_am_tools_c* const aTools, 
+											   const bool is_client_when_true,
+											   const eap_am_network_id_c * const receive_network_id);	
+#endif
 private:
 
 #ifdef USE_PAC_STORE
@@ -213,6 +217,16 @@
 	
 	// EAP array for deleting and changing index
 	RImplInfoPtrArray iEapArray;
+	
+#if defined(USE_FAST_EAP_TYPE)
+	tls_application_eap_fast_c* iApplication;
+#endif	
+		/// This is pointer to the tools class.
+	abs_eap_am_tools_c * const m_am_tools;
+	
+	eap_base_type_c* iType;
+
+
 };
 
 #endif // _EAPTLSPEAP_H_
--- a/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/inc/EapTlsPeapCertFetcher.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/inc/EapTlsPeapCertFetcher.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 13.1.2 %
+* %version: %
 */
 
 #ifndef _EAPTLSPEAPCERTFETCHER_H_
@@ -29,14 +29,16 @@
 #include "EapTlsPeapUtils.h"
 
 
-class CEapTlsPeapUiCertificates;
+class CAbsEapCertificateFetcher;
 
 // CLASS DECLARATION
 class CEapTlsPeapCertFetcher 
 : public CActive
 {
+
 public:
-	static CEapTlsPeapCertFetcher* NewL(CEapTlsPeapUiCertificates* const aParent);	
+
+	static CEapTlsPeapCertFetcher* NewL(CAbsEapCertificateFetcher* const aParent);
 	
 	virtual ~CEapTlsPeapCertFetcher();	
 	
@@ -44,11 +46,11 @@
 
 	// DON'T USE THESE. ONLY USED FOR EapTlsPeapUtils.
 	static CEapTlsPeapCertFetcher* NewL();	
-	void GetSymbianSubjectKeyIdL( TDes8& aSubjectKeyId, CertificateEntry aCertEntry );
+	void GetSymbianSubjectKeyIdL( TDes8& aSubjectKeyId, EapCertificateEntry aCertEntry );
 	
 protected:
 	
-	CEapTlsPeapCertFetcher(CEapTlsPeapUiCertificates* const aParent);
+	CEapTlsPeapCertFetcher(CAbsEapCertificateFetcher* const aParent);
 	
 	void ConstructL();
 	
@@ -61,19 +63,23 @@
 	// DON'T USE THIS. ONLY USED FOR EapTlsPeapUtils.
 	CEapTlsPeapCertFetcher();	
 
+	void InitializeQuery();
+
 private:
 
 	enum TState
 	{
+		EGetCertificatesNone,
 		EGetCertificatesInitStore,
 		EGetCertificatesGetCertList,
+		EGetCertificatesGetUserCertList,
 		EGetCertificatesRetrieveCert,
 		EGetSymbianSubjectKeyId // DON'T USE THIS. ONLY USED FOR EapTlsPeapUtils.		
 	};
 	
 	TState iState;
 	
-	CEapTlsPeapUiCertificates* const iParent;
+	CAbsEapCertificateFetcher* const iParent;
 
 	RMPointerArray<CCTCertInfo> iCertInfos;
 	
@@ -83,16 +89,15 @@
 
 	CCertAttributeFilter* iCertFilter;
 
-	RArray<SCertEntry> iUserCerts;
-	
-	RArray<SCertEntry> iCACerts;
+	RPointerArray<EapCertificateEntry> iUserCerts;
 	
-    // For wrapping asynchronous calls.
-    CActiveSchedulerWait iWait;
-    
+	RPointerArray<EapCertificateEntry> iCACerts;
+	
 	HBufC8* iEncodedCertificate;
 	TPtr8 iCertPtr;
 
+	TCertificateOwnerType iOwnertype;
+	TInt iCertInfoIndex;
 	
 }; 
 
--- a/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/inc/EapTlsPeapDbDefaults.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/inc/EapTlsPeapDbDefaults.h	Mon May 24 20:32:47 2010 +0300
@@ -16,82 +16,19 @@
 */
 
 /*
-* %version: 39 %
+* %version: 36.1.6 %
 */
 
 #if !defined(_EAPTLSPEAPDBDEFAULTS_H_)
 #define _EAPTLSPEAPDBDEFAULTS_H_
 
-enum TTLSPEAPUseManualRealm 
-{
-	ETLSPEAPUseManualRealmNo,		// False. Don't use Manual Realm.
-	ETLSPEAPUseManualRealmYes,		// True. Use Manual Realm.
-};
-
-enum TTLSPEAPUseManualUsername 
-{
-	ETLSPEAPUseManualUsernameNo,		// False. Don't use Manual Username.
-	ETLSPEAPUseManualUsernameYes,		// True. Use Manual Username.
-};
-
-enum TTLSPEAPVerifyCertRealm 
-{
-	ETLSPEAPVerifyCertRealmNo,		// False. Don't Verify Certificate Realm.
-	ETLSPEAPVerifyCertRealmYes,		// True. Verify Certificate Realm.
-};
-
-enum TTLSPEAPServerAuthenticatesClientPolicy
-{
-	ETLSPEAPServerAuthenticatesClientPolicyNo,		// False.
-	ETLSPEAPServerAuthenticatesClientPolicyYes,		// True.
-};
-
-enum TTLSPEAPTLSPrivacy
-{
-	ETLSPEAPTLSPrivacyNo,		// False. TLS Privacy OFF.
-	ETLSPEAPTLSPrivacyYes,		// True. TLS Privacy ON.
-};
-
-#ifdef USE_FAST_EAP_TYPE		
-
-enum TFASTAuthProvModeAllowed
-{
-	EFASTAuthProvModeAllowedNo,			// False. Authenticated provisioning mode NOT allowed.
-	EFASTAuthProvModeAllowedYes,		// True. Authenticated provisioning mode allowed.
-};
-
-enum TFASTUnauthProvModeAllowed
-{
-	EFASTUnauthProvModeAllowedNo,		// False. Unauthenticated provisioning mode NOT allowed.
-	EFASTUnauthProvModeAllowedYes,		// True. Unauthenticated provisioning mode allowed.
-};
-
-enum TFASTWarnADHPNoPAC
-{
-	EFASTWarnADHPNoPACNo,		// False. Warnings or prompts NOT allowed.
-	EFASTWarnADHPNoPACYes,		// True. Warnings or prompts allowed.
-};
-
-enum TFASTWarnADHPNoMatchingPAC
-{
-	EFASTWarnADHPNoMatchingPACNo,		// False. Warnings or prompts NOT allowed.
-	EFASTWarnADHPNoMatchingPACYes,		// True. Warnings or prompts allowed.
-};
-
-enum TFASTWarnNotDefaultServer
-{
-	EFASTWarnNotDefaultServerNo,		// False. Warnings or prompts NOT allowed.
-	EFASTWarnNotDefaultServerYes,		// True. Warnings or prompts allowed.
-};
-
-#endif //#ifdef USE_FAST_EAP_TYPE
+#include "EapPluginDbDefaults.h"
+#include "tls_peap_types.h"
 
 // LOCAL CONSTANTS
-const TInt default_EAP_TLS_PEAP_use_manual_realm = ETLSPEAPUseManualRealmNo;
-_LIT(default_EAP_TLS_PEAP_manual_realm, "");
+const TInt default_EAP_TLS_PEAP_use_manual_realm = EEapDbFalse;
 
-const TInt default_EAP_TLS_PEAP_use_manual_username = ETLSPEAPUseManualUsernameNo;
-_LIT(default_EAP_TLS_PEAP_manual_username, "");
+const TInt default_EAP_TLS_PEAP_use_manual_username = EEapDbFalse;
 
 const TInt default_EAP_TLS_PEAP_cipher_suite = tls_cipher_suites_TLS_RSA_WITH_3DES_EDE_CBC_SHA;
 
@@ -103,23 +40,22 @@
 const TInt default_EAP_TLS_server_authenticates_client = 1;
 const TInt default_EAP_PEAP_TTLS_server_authenticates_client = 0;
 
-_LIT(default_CA_cert_label, "rsaca.eapsim.foo");
-_LIT(default_client_cert_label, "rsaclient@eapsim.foo");
+_LIT(default_CA_cert_label, "");
+_LIT(default_client_cert_label, "");
 
 const TInt default_EAP_TLS_PEAP_verify_certificate_realm = 0;
 
-const TUint default_EAP_TLS_PEAP_TLS_Privacy = ETLSPEAPTLSPrivacyNo;
+const TUint default_EAP_TLS_PEAP_TLS_Privacy = EEapDbFalse;
 
-const TInt64 default_MaxSessionTime = 0; // 0 means read from configuration file.
-const TInt64 default_FullAuthTime = 0;
+const TUint default_EAP_TLS_PEAP_use_automatic_ca_certificate = EEapDbFalse;
 
 // Defaults for EAP-FAST specific items
 #ifdef USE_FAST_EAP_TYPE
-const TUint default_EAP_FAST_Auth_Prov_Mode_Allowed = EFASTAuthProvModeAllowedNo; // Default is NO
-const TUint default_EAP_FAST_Unauth_Prov_Mode_Allowed = EFASTUnauthProvModeAllowedNo; // Default is NO
-const TUint default_EAP_FAST_Warn_ADHP_No_PAC = EFASTWarnADHPNoPACNo; // Default is NO
-const TUint default_EAP_FAST_Warn_ADHP_No_Matching_PAC = EFASTWarnADHPNoMatchingPACNo; // Default is NO
-const TUint default_EAP_FAST_Warn_Not_Default_Server = EFASTWarnNotDefaultServerNo; // Default is NO
+const TUint default_EAP_FAST_Auth_Prov_Mode_Allowed = EEapDbFalse; // Default is NO
+const TUint default_EAP_FAST_Unauth_Prov_Mode_Allowed = EEapDbFalse; // Default is NO
+const TUint default_EAP_FAST_Warn_ADHP_No_PAC = EEapDbTrue; // Default is YES
+const TUint default_EAP_FAST_Warn_ADHP_No_Matching_PAC = EEapDbTrue; // Default is YES
+const TUint default_EAP_FAST_Warn_Not_Default_Server = EEapDbTrue; // Default is YES
 #endif //#ifdef USE_FAST_EAP_TYPE
 
 // Add here the cipher suites you want to be allowed by default. Note that the last
@@ -146,8 +82,6 @@
 	0
 };
 
-const TUint KMaxManualUsernameLengthInDB = 255;
-const TUint KMaxManualRealmLengthInDB = 255;
 const TUint KMaxCertLabelLengthInDB = 255;
 const TUint KMaxSubjectKeyIdLengthInDB = 255; // Not using KKeyIdentifierLength (EapSettings.h) as this is
 											 // Symbian's subjectkey id (hash of actual subjectkey id), though the lengths are same.
--- a/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/inc/EapTlsPeapDbParameterNames.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/inc/EapTlsPeapDbParameterNames.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 23 %
+* %version: %
 */
 
 #if !defined(_EAPTLAPEAPDBPARAMETERNAMES_H_)
@@ -28,6 +28,7 @@
 
 _LIT(KServiceType, "ServiceType");
 _LIT(KServiceIndex, "ServiceIndex");
+_LIT(KTunnelingTypeVendorId, "TunnelingTypeVendorId");
 _LIT(KTunnelingType, "TunnelingType");
 _LIT(KCACertLabelOld, "CA_cert_label");
 _LIT(KClientCertLabel, "client_cert_label");
--- a/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/inc/EapTlsPeapGlobal.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/inc/EapTlsPeapGlobal.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8 %
+* %version: %
 */
 
 #ifndef _EAPTLSPEAPGLOBAL_H_
@@ -27,9 +27,9 @@
 
 // LOCAL CONSTANTS
 
-_LIT(KReleaseDate, "20040829:");
+_LIT(KReleaseDate, "");
 _LIT(KEapTypeVersion, "1.0");
-_LIT(KManufacturer, "Nokia");
+_LIT(KManufacturer, "");
 _LIT(KNokiaSignature, "");
 _LIT(KExtraInfo1, "");
 _LIT(KExtraInfo2, "");
--- a/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/inc/EapTlsPeapUtils.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/inc/EapTlsPeapUtils.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 22.1.2 %
+* %version: 36 %
 */
 
 #ifndef _EAPTLSPEAPUTILS_H_
@@ -26,58 +26,24 @@
 #include <d32dbms.h>
 #include <EapType.h>
 #include "eap_am_tools_symbian.h"
-#include <CertEntry.h>
+#include <EapSettings.h>
 
 #include <unifiedcertstore.h>
 #include <mctwritablecertstore.h>
 
-#ifndef USE_EAP_EXPANDED_TYPES
-// This dependencay is needed only for non-expanded EAP types.
-#include <wdbifwlansettings.h>
-#endif //#ifndef USE_EAP_EXPANDED_TYPES
-
 #include "eap_type_tls_peap_types.h"
 #include "eap_header.h"
 
 // LOCAL CONSTANTS
 
-#ifdef USE_EAP_EXPANDED_TYPES
-
-// Size of Expanded EAP Type
-const TUint8 KExpandedEAPTypeSize = 8;
-
-struct SExpandedEAPType
-{
-	// Unique ID for an expanded EAp type.
-	// This includes, Type (1 byte), Vendor-Id (3bytes) and Vendor-Type (4bytes).
-	TBuf8<KExpandedEAPTypeSize>    iExpandedEAPType;
-};
-
-typedef RPointerArray<SExpandedEAPType> RExpandedEapTypePtrArray;
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
+// For EAP-TLS, EAP-PEAP, EAP-TTLS, EAP-FAST private database. Database will be in the private folder of EAP-server (20026FCB).
+// The maximum length of database name is 0x40 (KDbMaxName), which is defined in d32dbms.h.
 
-#ifdef SYMBIAN_SECURE_DBMS
-// For EAP TLS, PEAP, TTLS, FAST secure databases.
-// Full path is not needed. The database eaptls.dat will be saved in the 
-// data cage path for DBMS. So it will be in "\private\100012a5\eaptls.dat" in C: drive.
-// The maximum length of database name is 0x40 (KDbMaxName) , which is defined in d32dbms.h.
-
-_LIT(KTlsDatabaseName, "c:eaptls.dat");
-_LIT(KPeapDatabaseName, "c:eappeap.dat");
-_LIT(KTtlsDatabaseName, "c:eapttls.dat");
-_LIT(KFastDatabaseName, "c:eapfast.dat");
+_LIT(KTlsDatabaseName, "eaptls.dat");
+_LIT(KPeapDatabaseName, "eappeap.dat");
+_LIT(KTtlsDatabaseName, "eapttls.dat");
+_LIT(KFastDatabaseName, "eapfast.dat");
 
-_LIT(KSecureUIDFormat, "SECURE[102072e9]"); // For the security policy.
-
-#else
-
-_LIT(KTlsDatabaseName, "c:\\system\\data\\eaptls.dat");
-_LIT(KPeapDatabaseName, "c:\\system\\data\\eappeap.dat");
-_LIT(KTtlsDatabaseName, "c:\\system\\data\\eapttls.dat");
-_LIT(KFastDatabaseName, "c:\\system\\data\\eapfast.dat");
-
-#endif // #ifdef SYMBIAN_SECURE_DBMS
 
 // For TLS.
 _LIT(KTlsDatabaseTableName, "eaptls");
@@ -106,18 +72,20 @@
 
 enum TAlterTableCmd
 {
-EAddColumn,
-ERemoveColumn
+	EAddColumn,
+	ERemoveColumn
 };
 
 // CLASS DECLARATION
 class EapTlsPeapUtils 
 {
+
 public:	
+
 	static void OpenDatabaseL(
-		RDbNamedDatabase& aDatabase, 
-		RDbs& aSession, 
-		const TIndexType aIndexType, 
+		RDbNamedDatabase& aDatabase,
+		RFs& aFileServerSession,
+		const TIndexType aIndexType,
 		const TInt aIndex,
 		const eap_type_value_e aTunnelingType,
 		eap_type_value_e aEapType);
@@ -174,7 +142,7 @@
 		const TIndexType aIndexType,
 		const TInt aIndex,
 		const eap_type_value_e aTunnelingType,
-		RArray<SCertEntry>& aArray);
+		RPointerArray<EapCertificateEntry>& aArray);
 
 	static void ReadUintRowsToArrayL(
 		RDbNamedDatabase& aDatabase,
@@ -186,14 +154,12 @@
 		const eap_type_value_e aTunnelingType,
 		RArray<TUint>& aArray);
 
-#ifdef USE_EAP_EXPANDED_TYPES
-	
 	// Stores the tunneled EAP type (expanded) to the database.
 	static void SetTunnelingExpandedEapDataL(
 		RDbNamedDatabase& aDatabase,
 		eap_am_tools_symbian_c * const aTools,
-		RExpandedEapTypePtrArray &aEnabledEAPArrary,
-		RExpandedEapTypePtrArray &aDisabledEAPArrary,
+		RPointerArray<TEapExpandedType> &aEnabledEAPArrary,
+		RPointerArray<TEapExpandedType> &aDisabledEAPArrary,
 		const TIndexType aIndexType,
 		const TInt aIndex,
 		const eap_type_value_e aTunnelingType,
@@ -203,42 +169,18 @@
 	static void GetTunnelingExpandedEapDataL(
 		RDbNamedDatabase& aDatabase,
 		eap_am_tools_symbian_c * const aTools,
-		RExpandedEapTypePtrArray &aEnabledEAPArrary,
-		RExpandedEapTypePtrArray &aDisabledEAPArrary,
+		RPointerArray<TEapExpandedType> &aEnabledEAPArrary,
+		RPointerArray<TEapExpandedType> &aDisabledEAPArrary,
 		const TIndexType aIndexType,
 		const TInt aIndex,
 		const eap_type_value_e aTunnelingType,
 		const eap_type_value_e aEapType);
 
-#else // For normal EAP types.
-
-	// This sets only the tunneling EAP types.
-	static void SetEapDataL(
-		RDbNamedDatabase& aDatabase,
-		eap_am_tools_symbian_c * const aTools,
-		TEapArray &aEaps,
-		const TIndexType aIndexType,
-		const TInt aIndex,
-		const eap_type_value_e aTunnelingType,
-		const eap_type_value_e aEapType);
-	
-	// This gets only the tunneling EAP types.	
-	static void GetEapDataL(
-		RDbNamedDatabase& aDatabase,
-		eap_am_tools_symbian_c * const aTools,
-		TEapArray &aEaps,
-		const TIndexType aIndexType,
-		const TInt aIndex,
-		const eap_type_value_e aTunnelingType,
-		const eap_type_value_e aEapType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
 	static TBool CompareTCertLabels(
 		const TCertLabel& item1, 
 		const TCertLabel& item2);
 
-	static TBool CompareSCertEntries(const SCertEntry& item1, const SCertEntry& item2);
+	static TBool CompareSCertEntries(const EapCertificateEntry& item1, const EapCertificateEntry& item2);
 
 	static TBool CipherSuiteUseRSAKeys(tls_cipher_suites_e aCipherSuite);
 
@@ -265,35 +207,38 @@
 		const eap_variable_data_c * const aDbColumnValue);		
 
 private:
+
 	static void OpenTlsDatabaseL(
-		RDbNamedDatabase& aDatabase, 
-		RDbs& aSession, 
-		const TIndexType aIndexType, 
+		RDbNamedDatabase& aDatabase,
+		RFs& aFileServerSession,
+		const TIndexType aIndexType,
 		const TInt aIndex,
 		const eap_type_value_e aTunnelingType);
 
 	static void OpenPeapDatabaseL(
-		RDbNamedDatabase& aDatabase, 
-		RDbs& aSession, 
-		const TIndexType aIndexType, 
+		RDbNamedDatabase& aDatabase,
+		RFs& aFileServerSession,
+		const TIndexType aIndexType,
 		const TInt aIndex,
 		const eap_type_value_e aTunnelingType);
 
 #if defined(USE_TTLS_EAP_TYPE)
+
 	static void OpenTtlsDatabaseL(
-		RDbNamedDatabase& aDatabase, 
-		RDbs& aSession, 
-		const TIndexType aIndexType, 
+		RDbNamedDatabase& aDatabase,
+		RFs& aFileServerSession,
+		const TIndexType aIndexType,
 		const TInt aIndex,
 		const eap_type_value_e aTunnelingType);
+
 #endif // #if defined(USE_TTLS_EAP_TYPE)
 
 #if defined(USE_FAST_EAP_TYPE)
 
 	static void OpenFastDatabaseL(
-		RDbNamedDatabase& aDatabase, 
-		RDbs& aSession, 
-		const TIndexType aIndexType, 
+		RDbNamedDatabase& aDatabase,
+		RFs& aFileServerSession,
+		const TIndexType aIndexType,
 		const TInt aIndex,
 		const eap_type_value_e aTunnelingType);
 
@@ -303,6 +248,10 @@
 		RDbNamedDatabase& aDatabase, 
 		TDesC& aTableName);	
 
+	static TInt FilterEapMethods(
+		RPointerArray<TEapExpandedType> * const aEAPTypes,
+		RPointerArray<TEapExpandedType> * const aPlugins);
+
 private:
 
 	static void AlterTableL(
@@ -311,7 +260,6 @@
 			const TDesC& aTableName,
 			const TDesC& aColumnName,
 			const TDesC& aColumnDef );
-
 };
 
 #endif // _EAPTLSPEAPUTILS_H_
--- a/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/src/101f8e4c.rss	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/src/101f8e4c.rss	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 22 %
+* %version: 19.1.2 %
 */
 
 //  INCLUDES
--- a/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/src/EapTlsPeap.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/src/EapTlsPeap.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 35.1.4 %
+* %version: 61 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -35,7 +35,6 @@
 #include "EapTlsPeapGlobal.h"
 #include <EapTypeInfo.h>
 
-
 #if defined(USE_FAST_EAP_TYPE)
 #include "tls_application_eap_fast.h"
 #endif 
@@ -43,21 +42,27 @@
 #include "eap_am_type_tls_peap_symbian.h"
 #include "eap_type_tls_peap.h"
 #include "tls_record.h"
+#include "dummy_eap_core.h"
 #include "eap_core.h"
 #include "tls_application_eap_core.h"
 #include "eap_am_tools_symbian.h"
-#include "eap_am_trace_symbian.h"
+#include "EapTraceSymbian.h"
+#include "EapConversion.h"
+#include "EapExpandedType.h"
 
 #ifdef USE_PAC_STORE
 #include "pac_store_db_symbian.h"
 #endif
 
+#include "eapol_key_types.h"
 
 // LOCAL CONSTANTS
 
 // The version number of this interface. At the moment this version number is
 // common for all three plug-in interfaces.
 const TUint KInterfaceVersion = 1;
+const u8_t EAP_RAS_SOURCE[] = "ras_src";
+const u8_t EAP_RAS_DESTINATION[] = "ras_des";
 
 
 // ================= MEMBER FUNCTIONS =======================
@@ -70,14 +75,80 @@
 , iIndex(aIndex)
 , iEapType(aEapType)
 , iTunnelingType(eap_type_none)
+#if defined(USE_FAST_EAP_TYPE)
+, iApplication(NULL)
+#endif
+, m_am_tools(abs_eap_am_tools_c::new_abs_eap_am_tools_c())
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeap::CEapTlsPeap()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeap::CEapTlsPeap()\n"));
 
-#ifdef USE_EAP_EXPANDED_TYPES
+	if (m_am_tools == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return;
+	}
 
 	ASSERT(iEapType.get_vendor_id() == eap_type_vendor_id_ietf);
 	ASSERT(iTunnelingType.get_vendor_id() == eap_type_vendor_id_ietf);
 
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
+#if defined(USE_FAST_EAP_TYPE)
+	if(iEapType == eap_type_fast)
+	{
+		eap_variable_data_c source(m_am_tools);
+
+		eap_status_e status = source.set_copy_of_buffer(
+			EAP_RAS_SOURCE,
+			sizeof(EAP_RAS_SOURCE));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: CEapTlsPeap::CEapTlsPeap(): status = %s\n"),
+				eap_status_string_c::get_status_string(status)));
+			return;
+		}
+
+		eap_variable_data_c destination(m_am_tools);
+
+		status = destination.set_copy_of_buffer(
+			EAP_RAS_DESTINATION,
+			sizeof(EAP_RAS_DESTINATION));
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: CEapTlsPeap::CEapTlsPeap(): status = %s\n"),
+				eap_status_string_c::get_status_string(status)));
+			return;
+		}
+
+		eap_am_network_id_c dummy_id(m_am_tools, &source, &destination, eapol_ethernet_type_pae);
+	
+		if (dummy_id.get_is_valid() == false)
+		{
+			EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: CEapTlsPeap::NewPeapL() dummy_id not valid\n")));
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return;
+		}
+	
+		if (dummy_id.get_is_valid_data() == false)
+		{
+			EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: CEapTlsPeap::NewPeapL() dummy_id data not valid\n")));
+			EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+			return;
+		}
+	
+		
+		TRAPD(err, iApplication = GetTlsInterfaceL(
+			m_am_tools, 
+			true,
+			&dummy_id));
+		if (err)
+		{
+			EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: CEapTlsPeap::NewPeapL() iApplication couldn't be created\n")));
+				
+		}
+	}
+#endif //#if defined(USE_FAST_EAP_TYPE)
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
 
 }
 
@@ -85,6 +156,9 @@
 
 CEapTlsPeap* CEapTlsPeap::NewTlsL(SIapInfo *aIapInfo)
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeap::NewTlsL()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeap::NewTlsL()\n"));
+
 	return new (ELeave) CEapTlsPeap(aIapInfo->indexType, aIapInfo->index, eap_type_tls);
 }
 
@@ -92,6 +166,9 @@
 
 CEapTlsPeap* CEapTlsPeap::NewPeapL(SIapInfo *aIapInfo)
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeap::NewPeapL()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeap::NewPeapL()\n"));
+
 	return new (ELeave) CEapTlsPeap(aIapInfo->indexType, aIapInfo->index, eap_type_peap);
 }
 
@@ -101,6 +178,9 @@
 
 CEapTlsPeap* CEapTlsPeap::NewTtlsL(SIapInfo *aIapInfo)
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeap::NewTtlsL()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeap::NewTtlsL()\n"));
+
 	return new (ELeave) CEapTlsPeap(aIapInfo->indexType, aIapInfo->index, eap_type_ttls);
 }
 
@@ -116,6 +196,9 @@
 
 CEapTlsPeap* CEapTlsPeap::NewTtlsPapL( SIapInfo* aIapInfo )
     {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeap::NewTtlsPapL()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeap::NewTtlsPapL()\n"));
+
 	return new (ELeave) CEapTlsPeap(
 		aIapInfo->indexType, aIapInfo->index, eap_type_ttls_plain_pap );    
     }
@@ -127,6 +210,9 @@
 
 CEapTlsPeap* CEapTlsPeap::NewFastL(SIapInfo *aIapInfo)
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeap::NewFastL()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeap::NewFastL()\n"));
+
 	return new (ELeave) CEapTlsPeap(aIapInfo->indexType, aIapInfo->index, eap_type_fast);
 }
 
@@ -136,9 +222,211 @@
 
 CEapTlsPeap::~CEapTlsPeap()
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeap::~CEapTlsPeap()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeap::~CEapTlsPeap()\n"));
+
 	iEapArray.ResetAndDestroy();
+	
+	if (iType != NULL)
+		{
+		iType->shutdown();
+		// type deletes all
+		delete iType;
+		iType = NULL;
+		}
+		
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeap::~CEapTlsPeap() iType deleted\n")));
+
+#if defined(USE_FAST_EAP_TYPE)
+	if (iApplication != NULL)
+		{
+//		iApplication->shutdown();
+//		delete iApplication;
+		iApplication = NULL;
+		}
+#endif //#if defined(USE_FAST_EAP_TYPE)
+		
+	abs_eap_am_tools_c::delete_abs_eap_am_tools_c(m_am_tools);
 }
 
+#if defined(USE_FAST_EAP_TYPE)
+// ----------------------------------------------------------
+tls_application_eap_fast_c* CEapTlsPeap::GetTlsInterfaceL(abs_eap_am_tools_c* const aTools, 
+											   const bool is_client_when_true,
+											   const eap_am_network_id_c * const receive_network_id)
+{
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeap::GetTlsInterfaceL()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeap::GetTlsInterfaceL()\n"));
+
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("CEapTlsPeap::GetTlsInterfaceL -Start- iIndexType=%d, iIndex=%d, Tunneling vendor type=%d, Eap vendor type=%d \n"),
+		iIndexType,iIndex, iTunnelingType.get_vendor_type(), iEapType.get_vendor_type()));
+
+	// Create adaptation layer
+	eap_am_type_tls_peap_symbian_c* amEapType;
+	tls_record_c* record;
+
+	eap_core_c* const eap_core = reinterpret_cast<eap_core_c *> (new dummy_eap_core_c(
+		aTools,
+		0,
+		is_client_when_true,
+		receive_network_id,
+		true));
+	if (eap_core == 0)
+	{
+		// Out of memory
+		User::Leave(KErrNoMemory);
+	} 
+	else if (eap_core->get_is_valid() == false)
+	{
+		// Out of memory
+		eap_core->shutdown();
+		delete eap_core;
+		User::Leave(KErrGeneral);
+	}
+	
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("CEapTlsPeap::GetTlsInterfaceL - created eap_core_c \n")));
+
+	amEapType = eap_am_type_tls_peap_symbian_c::NewL(
+		aTools,
+		eap_core,
+		iIndexType,
+		iIndex,
+		iTunnelingType,
+		iEapType,
+		is_client_when_true,
+		receive_network_id);
+	if (amEapType->get_is_valid() == false)
+	{
+		amEapType->shutdown();
+		delete amEapType;
+		User::Leave(KErrGeneral);
+	}
+	
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("CEapTlsPeap::GetTlsInterfaceL - created eap_am_type_tls_peap_symbian_c \n")));
+
+	tls_application_eap_fast_c* application = 0;
+		
+	if(iEapType == eap_type_fast)
+	{
+		application = new tls_application_eap_fast_c(
+			aTools,
+			eap_core,
+			true,
+			is_client_when_true,
+			iEapType,
+			receive_network_id,
+			amEapType);
+		
+		EAP_TRACE_DEBUG_SYMBIAN(
+			(_L("CEapTlsPeap::GetTlsInterfaceL - created tls_application_eap_fast_c \n")));			
+		application->start_initialize_PAC_store();
+	}
+
+	
+	/*
+	{
+		// PEAP, TTLS and FAST.
+
+		eap_core_c* eap_core = new eap_core_c(
+			aTools,
+			0,
+			is_client_when_true,
+			receive_network_id,
+			true);
+		if (eap_core == 0)
+		{
+			// Out of memory
+			amEapType->shutdown();
+			delete amEapType;
+			User::Leave(KErrNoMemory);
+		} 
+		else if (eap_core->get_is_valid() == false)
+		{
+			// Out of memory
+			eap_core->shutdown();
+			delete eap_core;
+			amEapType->shutdown();
+			delete amEapType;
+			User::Leave(KErrGeneral);
+		}
+		
+		EAP_TRACE_DEBUG_SYMBIAN(
+			(_L("CEapTlsPeap::GetTlsInterfaceL - created eap_core_c \n")));
+		*/
+
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("CEapTlsPeap::GetTlsInterfaceL - Creating tls_record_c \n")));
+
+	record = new tls_record_c(
+		aTools,
+		amEapType,
+		false,
+		application,
+		true,
+		is_client_when_true,
+		iEapType,
+		receive_network_id);		
+	if (record == 0)
+	{
+		// Out of memory
+		// application takes care of eap_core_c deletion
+		application->shutdown();
+		delete application;
+		amEapType->shutdown();
+		delete amEapType;
+		User::Leave(KErrGeneral);		
+	}
+	else if (record->get_is_valid() == false)
+	{
+		// Out of memory
+		// record takes care of application deletion
+		record->shutdown();
+		delete record;
+		amEapType->shutdown();
+		delete amEapType;
+		User::Leave(KErrGeneral);					
+	}	
+
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("CEapTlsPeap::GetTlsInterfaceL - Creating the OS independent portion - eap_type_tls_peap_c \n")));
+	
+	// Create the OS independent portion
+	
+	iType = new eap_type_tls_peap_c(
+		aTools, 
+		eap_core, 
+		amEapType, 
+		true, 
+		record, 
+		true, 
+		is_client_when_true, 
+		iEapType, 
+		receive_network_id);	
+	if (iType == 0)
+	{
+		// Out of memory
+		// record takes care of application deletion
+		record->shutdown();
+		delete record;
+		amEapType->shutdown();
+		delete amEapType;
+		User::Leave(KErrNoMemory);							
+	}
+	else if(iType->get_is_valid() == false)
+	{
+		iType->shutdown();
+		// type deletes all
+		delete iType;
+		iType = NULL;
+		User::Leave(KErrGeneral);		
+	}
+	
+	return application;
+}
+#endif
 // ----------------------------------------------------------
 
 #ifdef USE_EAP_SIMPLE_CONFIG
@@ -158,19 +446,12 @@
 	
 #endif // #ifdef USE_EAP_SIMPLE_CONFIG
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-	
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeap::GetStackInterfaceL()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeap::GetStackInterfaceL()\n"));
+
 	EAP_TRACE_DEBUG_SYMBIAN(
 		(_L("CEapTlsPeap::GetStackInterfaceL -Start- iIndexType=%d, iIndex=%d, Tunneling vendor type=%d, Eap vendor type=%d \n"),
 		iIndexType,iIndex, iTunnelingType.get_vendor_type(), iEapType.get_vendor_type()));
-	
-#else
-	
-	EAP_TRACE_DEBUG_SYMBIAN(
-		(_L("CEapTlsPeap::GetStackInterfaceL -Start- iIndexType=%d, iIndex=%d, iTunnelingType=%d, iEapType=%d \n"),
-		iIndexType, iIndex, iTunnelingType, iEapType));
-	
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
 
 	// Create adaptation layer
 	eap_am_type_tls_peap_symbian_c* amEapType;
@@ -377,17 +658,15 @@
 }
 
 // ----------------------------------------------------------
-TInt CEapTlsPeap::InvokeUiL()
+
+CEapTypeInfo* CEapTlsPeap::GetInfoL()
 {
-	TInt buttonId(0);
-	return buttonId;
-}
-// ----------------------------------------------------------
-CEapTypeInfo* CEapTlsPeap::GetInfoLC()
-{
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeap::GetInfoL()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeap::GetInfoL()\n"));
+
 	CEapTypeInfo* info = new(ELeave) CEapTypeInfo((TDesC&)KReleaseDate, (TDesC&)KEapTypeVersion,
 												   (TDesC&)KManufacturer);
-	CleanupStack::PushL(info);
+
 	return info;
 }
 
@@ -395,17 +674,11 @@
 
 void CEapTlsPeap::DeleteConfigurationL()
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-	
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeap::DeleteConfigurationL()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeap::DeleteConfigurationL()\n"));
+
 	TUint aTunnelingVendorType = iTunnelingType.get_vendor_type();
 	TUint aEapVendorType = iEapType.get_vendor_type();
-	
-#else
-	
-	TUint aTunnelingVendorType = static_cast<TUint>(iTunnelingType);
-	TUint aEapVendorType = static_cast<TUint>(iEapType);
-	
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
 
 	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeap::DeleteConfigurationL:Start:iIndexType=%d,iIndex=%d,TunnelingType=%d,EapType=%d"),
 			iIndexType, iIndex, aTunnelingVendorType, aEapVendorType));
@@ -431,14 +704,14 @@
 			
 		for (TInt i = 0; i < iEapArray.Count(); i++)
 		{
-			if ((iEapType == eap_type_peap && !CEapType::IsDisallowedInsidePEAP(*iEapArray[i])) 
-				|| (iEapType == eap_type_ttls && !CEapType::IsDisallowedInsideTTLS(*iEapArray[i]))
+			if ((iEapType == eap_type_peap && !CEapTypePlugin::IsDisallowedInsidePEAP(*iEapArray[i])) 
+				|| (iEapType == eap_type_ttls && !CEapTypePlugin::IsDisallowedInsideTTLS(*iEapArray[i]))
 				
 #ifdef USE_FAST_EAP_TYPE
-				|| (iEapType == eap_type_fast && !CEapType::IsDisallowedInsidePEAP(*iEapArray[i]))
+				|| (iEapType == eap_type_fast && !CEapTypePlugin::IsDisallowedInsidePEAP(*iEapArray[i]))
 #endif						
 
-				|| (iEapType == eap_type_ttls_plain_pap && !CEapType::IsDisallowedInsidePEAP(*iEapArray[i]))
+				|| (iEapType == eap_type_ttls_plain_pap && !CEapTypePlugin::IsDisallowedInsidePEAP(*iEapArray[i]))
 					
 
 			)
@@ -448,16 +721,14 @@
 				EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeap::DeleteConfigurationL: Deleting encapsulated types for EAP type=%d"),
 						aEapVendorType));
 			
-				CEapType* eapType;
+				CEapTypePlugin* eapType;
 			
-#ifdef USE_EAP_EXPANDED_TYPES		
-			
-				TBuf8<KExpandedEAPTypeSize> expandedCue = iEapArray[i]->DataType();
+				TEapExpandedType expandedCue = iEapArray[i]->DataType();
 			
 				EAP_TRACE_DATA_DEBUG_SYMBIAN(("CEapTlsPeap::DeleteConfigurationL: Expanded cue:",
-				expandedCue.Ptr(), expandedCue.Size()));
+					expandedCue.GetValue().Ptr(), expandedCue.GetValue().Size()));
 			
-				eapType = CEapType::NewL(expandedCue, iIndexType, iIndex);
+				eapType = CEapTypePlugin::NewL(expandedCue.GetValue(), iIndexType, iIndex);
 				
 				if(eapType == NULL)
 				{
@@ -465,7 +736,14 @@
 					User::Leave(KErrNotFound);
 				}
 				
-				eapType->SetTunnelingType(iEapType.get_vendor_type());						
+//				eapType->SetTunnelingType(iEapType.get_vendor_type());						
+			    TEapExpandedType aExpandedType;
+			    
+                TInt err = CEapConversion::ConvertInternalTypeToExpandedEAPType(
+			            &iEapType,
+			            &aExpandedType);
+
+			    eapType->SetTunnelingType(aExpandedType);
 
 #ifdef USE_FAST_EAP_TYPE
 				
@@ -496,29 +774,7 @@
 				}
 				
 #endif // #ifdef USE_FAST_EAP_TYPE
-#endif // USE_EAP_EXPANDED_TYPES		
 	
-
-#ifndef USE_EAP_EXPANDED_TYPES		
-//#else // For normal EAP types.
-			
-				TBuf8<3> cue = iEapArray[i]->DataType();
-
-				EAP_TRACE_DATA_DEBUG_SYMBIAN(("CEapTlsPeap::DeleteConfigurationL: cue:",
-						cue.Ptr(), cue.Size()));
-
-				eapType = CEapType::NewL(cue, iIndexType, iIndex);	
-
-				if(eapType == NULL)
-					{
-						EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeap::DeleteConfigurationL: Ecom Error - No specified EAP plugin")) );
-						User::Leave(KErrNotFound);
-					}
-				
-				eapType->SetTunnelingType(iEapType);					
-
-#endif //#ifndef USE_EAP_EXPANDED_TYPES
-								
 				EAP_TRACE_DEBUG_SYMBIAN(
 						(_L("CEapTlsPeap::DeleteConfigurationL: PushL(...)")));	
 				
@@ -541,41 +797,43 @@
 
 TUint CEapTlsPeap::GetInterfaceVersion()
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeap::GetInterfaceVersion()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeap::GetInterfaceVersion()\n"));
+
 	return KInterfaceVersion;
 }
 
 // ----------------------------------------------------------
 
-void CEapTlsPeap::SetTunnelingType(const TInt aTunnelingType)
-{
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	// Vendor id is eap_type_vendor_id_ietf always in this plugin.
-	iTunnelingType.set_eap_type_values(eap_type_vendor_id_ietf, aTunnelingType);
+void CEapTlsPeap::SetTunnelingType(const TEapExpandedType aTunnelingType)
+    {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeap::SetTunnelingType()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeap::SetTunnelingType()\n"));
 
-#else
-
-	iTunnelingType = static_cast<eap_type_value_e>(aTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-}
+    EAP_TRACE_DATA_DEBUG_SYMBIAN(
+        (EAPL("CEapTlsPeap::SetTunnelingType - tunneling type"),
+        aTunnelingType.GetValue().Ptr(), aTunnelingType.GetValue().Length()));
+    
+    eap_type_value_e aInternalType;
+    
+    TInt err = CEapConversion::ConvertExpandedEAPTypeToInternalType(
+            &aTunnelingType,
+            &aInternalType);
+    
+    iTunnelingType = aInternalType;
+    }
 
 // ----------------------------------------------------------
+
 void CEapTlsPeap::SetIndexL(
 		const TIndexType aIndexType, 
 		const TInt aIndex)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-	
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeap::SetIndexL()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeap::SetIndexL()\n"));
+
 	TUint aTunnelingVendorType = iTunnelingType.get_vendor_type();
 	TUint aEapVendorType = iEapType.get_vendor_type();
-	
-#else
-	
-	TUint aTunnelingVendorType = static_cast<TUint>(iTunnelingType);
-	TUint aEapVendorType = static_cast<TUint>(iEapType);
-	
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
 
 	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeap::SetIndexL:Start: Old: iIndexType=%d,iIndex=%d,TunnelingType=%d,EapType=%d"),
 			iIndexType, iIndex, aTunnelingVendorType, aEapVendorType));
@@ -600,7 +858,7 @@
 	
 	RDbNamedDatabase db;
 
-	RDbs session;
+	RFs session;
 
     EapTlsPeapUtils::OpenDatabaseL(db, session, iIndexType, iIndex, iTunnelingType, iEapType);
 	
@@ -616,68 +874,49 @@
 	TPtrC fastSpecialSettings;
 #endif
 	
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	switch (iEapType.get_vendor_type())
-	
-#else
-
-	switch (iEapType)
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
+	if (iEapType == eap_type_tls)
 	{
-	case eap_type_tls:
-		{
-			settings.Set(KTlsDatabaseTableName);
-			usercerts.Set(KTlsAllowedUserCertsDatabaseTableName);
-			cacerts.Set(KTlsAllowedCACertsDatabaseTableName);
-			ciphersuites.Set(KTlsAllowedCipherSuitesDatabaseTableName);
-		}
-		break;
-
-	case eap_type_peap:
-		{
-			settings.Set(KPeapDatabaseTableName);
-			usercerts.Set(KPeapAllowedUserCertsDatabaseTableName);
-			cacerts.Set(KPeapAllowedCACertsDatabaseTableName);
-			ciphersuites.Set(KPeapAllowedCipherSuitesDatabaseTableName);
-		}
-		break;
-
+		settings.Set(KTlsDatabaseTableName);
+		usercerts.Set(KTlsAllowedUserCertsDatabaseTableName);
+		cacerts.Set(KTlsAllowedCACertsDatabaseTableName);
+		ciphersuites.Set(KTlsAllowedCipherSuitesDatabaseTableName);
+	}
+	else if (iEapType == eap_type_peap)
+	{
+		settings.Set(KPeapDatabaseTableName);
+		usercerts.Set(KPeapAllowedUserCertsDatabaseTableName);
+		cacerts.Set(KPeapAllowedCACertsDatabaseTableName);
+		ciphersuites.Set(KPeapAllowedCipherSuitesDatabaseTableName);
+	}
 #if defined (USE_TTLS_EAP_TYPE)
-	case eap_type_ttls:
-		{
-			settings.Set(KTtlsDatabaseTableName);
-			usercerts.Set(KTtlsAllowedUserCertsDatabaseTableName);
-			cacerts.Set(KTtlsAllowedCACertsDatabaseTableName);
-			ciphersuites.Set(KTtlsAllowedCipherSuitesDatabaseTableName);
-		}
-		break;
+	else if (iEapType == eap_type_ttls)
+	{
+		settings.Set(KTtlsDatabaseTableName);
+		usercerts.Set(KTtlsAllowedUserCertsDatabaseTableName);
+		cacerts.Set(KTtlsAllowedCACertsDatabaseTableName);
+		ciphersuites.Set(KTtlsAllowedCipherSuitesDatabaseTableName);
+	}
 #endif
-
 #ifdef USE_FAST_EAP_TYPE
-	case eap_type_fast:
-		{
-			settings.Set(KFastGeneralSettingsDBTableName); // This is general settings for FAST.
-			fastSpecialSettings.Set(KFastSpecialSettingsDBTableName);
-			
-			usercerts.Set(KFastAllowedUserCertsDatabaseTableName);
-			cacerts.Set(KFastAllowedCACertsDatabaseTableName);
-			ciphersuites.Set(KFastAllowedCipherSuitesDatabaseTableName);			
-		}
-		break;
+	else if (iEapType == eap_type_fast)
+	{
+		settings.Set(KFastGeneralSettingsDBTableName); // This is general settings for FAST.
+		fastSpecialSettings.Set(KFastSpecialSettingsDBTableName);
+		
+		usercerts.Set(KFastAllowedUserCertsDatabaseTableName);
+		cacerts.Set(KFastAllowedCACertsDatabaseTableName);
+		ciphersuites.Set(KFastAllowedCipherSuitesDatabaseTableName);			
+	}
 #endif		
-
-	case eap_type_ttls_plain_pap:
-		{
-			settings.Set(KTtlsDatabaseTableName);
-			usercerts.Set(KTtlsAllowedUserCertsDatabaseTableName);
-			cacerts.Set(KTtlsAllowedCACertsDatabaseTableName);
-			ciphersuites.Set(KTtlsAllowedCipherSuitesDatabaseTableName);
-		}
-		break;
-		
-	default:
+	else if (iEapType == eap_type_ttls_plain_pap)
+	{
+		settings.Set(KTtlsDatabaseTableName);
+		usercerts.Set(KTtlsAllowedUserCertsDatabaseTableName);
+		cacerts.Set(KTtlsAllowedCACertsDatabaseTableName);
+		ciphersuites.Set(KTtlsAllowedCipherSuitesDatabaseTableName);
+	}
+	else
+	{
 		// Should never happen
 		User::Leave(KErrArgument);
 	}	
@@ -763,7 +1002,8 @@
 #endif // End: #ifdef USE_FAST_EAP_TYPE
 		
 	db.Close();
-	CleanupStack::PopAndDestroy(2); // db, session.
+	CleanupStack::PopAndDestroy(&db);
+	CleanupStack::PopAndDestroy(&session);
 	
 	//////// Encapsulated types
 
@@ -784,14 +1024,14 @@
 				
 		for (TInt i = 0; i < iEapArray.Count(); i++)
 		{
-			if ((iEapType == eap_type_peap && !CEapType::IsDisallowedInsidePEAP(*iEapArray[i])) 
-				|| (iEapType == eap_type_ttls && !CEapType::IsDisallowedInsideTTLS(*iEapArray[i]))
+			if ((iEapType == eap_type_peap && !CEapTypePlugin::IsDisallowedInsidePEAP(*iEapArray[i])) 
+				|| (iEapType == eap_type_ttls && !CEapTypePlugin::IsDisallowedInsideTTLS(*iEapArray[i]))
 
 #ifdef USE_FAST_EAP_TYPE
-				|| (iEapType == eap_type_fast && !CEapType::IsDisallowedInsidePEAP(*iEapArray[i]))
+				|| (iEapType == eap_type_fast && !CEapTypePlugin::IsDisallowedInsidePEAP(*iEapArray[i]))
 #endif										
 
-				|| (iEapType == eap_type_ttls_plain_pap && !CEapType::IsDisallowedInsidePEAP(*iEapArray[i]))
+				|| (iEapType == eap_type_ttls_plain_pap && !CEapTypePlugin::IsDisallowedInsidePEAP(*iEapArray[i]))
 										
 
 			)
@@ -802,16 +1042,14 @@
 				EAP_TRACE_DEBUG_SYMBIAN(
 		    		(_L("EapTlsPeapUtils::SetIndexL - Setting the index to encapsulated EAP types\n")));	
 				
-				CEapType* eapType;
+				CEapTypePlugin* eapType;
 			
-#ifdef USE_EAP_EXPANDED_TYPES		
-			
-				TBuf8<KExpandedEAPTypeSize> expandedCue = iEapArray[i]->DataType();
+				TEapExpandedType expandedCue = iEapArray[i]->DataType();
 			
 				EAP_TRACE_DATA_DEBUG_SYMBIAN(("CEapTlsPeap::SetIndexL: Expanded cue:",
-				expandedCue.Ptr(), expandedCue.Size()));
+					expandedCue.GetValue().Ptr(), expandedCue.GetValue().Size()));
 			
-				eapType = CEapType::NewL(expandedCue, iIndexType, iIndex);
+				eapType = CEapTypePlugin::NewL(expandedCue.GetValue(), iIndexType, iIndex);
 
 				if(eapType == NULL)
 				{
@@ -819,17 +1057,14 @@
 					User::Leave(KErrNotFound);
 				}				
 				
-				eapType->SetTunnelingType(iEapType.get_vendor_type());						
+			    TEapExpandedType aExpandedType;
+			    
+			    eap_type_value_e value = iEapType;//.get_vendor_type();
+			    TInt err = CEapConversion::ConvertInternalTypeToExpandedEAPType(
+			            &value,
+			            &aExpandedType);
 
-#else // For normal EAP types.
-			
-				TBuf8<3> cue = iEapArray[i]->DataType();
-			
-				eapType = CEapType::NewL(cue, iIndexType, iIndex);	
-				
-				eapType->SetTunnelingType(iEapType);					
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
+			    eapType->SetTunnelingType(aExpandedType);						
 
 				CleanupStack::PushL(eapType);
 				
@@ -849,11 +1084,16 @@
 		(_L("EapTlsPeapUtils::SetIndexL - End\n")));		
 }
 
+// ----------------------------------------------------------
+
 void CEapTlsPeap::SetConfigurationL(const EAPSettings& aSettings)
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeap::SetConfigurationL()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeap::SetConfigurationL()\n"));
+
 	RDbNamedDatabase db;
 
-	RDbs session;	
+	RFs session;
 	
 	// This also creates the IAP entry if it doesn't exist
 	EapTlsPeapUtils::OpenDatabaseL(db, session, iIndexType, iIndex, iTunnelingType, iEapType);
@@ -869,14 +1109,20 @@
 		iTunnelingType,
 		iEapType);		
 		
-	CleanupStack::PopAndDestroy(2); // db, session
+	CleanupStack::PopAndDestroy(&db);
+	CleanupStack::PopAndDestroy(&session);
 }
 
+// ----------------------------------------------------------
+
 void CEapTlsPeap::GetConfigurationL(EAPSettings& aSettings)
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeap::GetConfigurationL()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeap::GetConfigurationL()\n"));
+
 	RDbNamedDatabase db;
 
-	RDbs session;
+	RFs session;
 	
 	// This also creates the IAP entry if it doesn't exist
 	EapTlsPeapUtils::OpenDatabaseL(db, session, iIndexType, iIndex, iTunnelingType, iEapType);
@@ -893,24 +1139,21 @@
 		iEapType);
 		
 	db.Close();
-	CleanupStack::PopAndDestroy(2); // db, session
+	CleanupStack::PopAndDestroy(&db);
+	CleanupStack::PopAndDestroy(&session);
 }
 
+// ----------------------------------------------------------
+
 void CEapTlsPeap::CopySettingsL(
 	const TIndexType aDestinationIndexType,
 	const TInt aDestinationIndex)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-	
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeap::CopySettingsL()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeap::CopySettingsL()\n"));
+
 	TUint aTunnelingVendorType = iTunnelingType.get_vendor_type();
 	TUint aEapVendorType = iEapType.get_vendor_type();
-	
-#else
-	
-	TUint aTunnelingVendorType = static_cast<TUint>(iTunnelingType);
-	TUint aEapVendorType = static_cast<TUint>(iEapType);
-	
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
 
 	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeap::CopySettingsL:Start:iIndexType=%d,iIndex=%d,TunnelingType=%d,EapType=%d"),
 			iIndexType, iIndex, aTunnelingVendorType, aEapVendorType));
@@ -931,7 +1174,7 @@
 	
 	RDbNamedDatabase db;
 
-	RDbs session;
+	RFs session;
 	
 	EapTlsPeapUtils::OpenDatabaseL(db, session, iIndexType, iIndex, iTunnelingType, iEapType);
 	
@@ -947,68 +1190,49 @@
 	TPtrC fastSpecialSettings;
 #endif
 	
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	switch (iEapType.get_vendor_type())
-	
-#else
-
-	switch (iEapType)
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
+	if (iEapType == eap_type_tls)
 	{
-	case eap_type_tls:
-		{
-			settings.Set(KTlsDatabaseTableName);
-			usercerts.Set(KTlsAllowedUserCertsDatabaseTableName);
-			cacerts.Set(KTlsAllowedCACertsDatabaseTableName);
-			ciphersuites.Set(KTlsAllowedCipherSuitesDatabaseTableName);
-		}
-		break;
-
-	case eap_type_peap:
-		{
-			settings.Set(KPeapDatabaseTableName);
-			usercerts.Set(KPeapAllowedUserCertsDatabaseTableName);
-			cacerts.Set(KPeapAllowedCACertsDatabaseTableName);
-			ciphersuites.Set(KPeapAllowedCipherSuitesDatabaseTableName);
-		}
-		break;
-
+		settings.Set(KTlsDatabaseTableName);
+		usercerts.Set(KTlsAllowedUserCertsDatabaseTableName);
+		cacerts.Set(KTlsAllowedCACertsDatabaseTableName);
+		ciphersuites.Set(KTlsAllowedCipherSuitesDatabaseTableName);
+	}
+	else if (iEapType == eap_type_peap)
+	{
+		settings.Set(KPeapDatabaseTableName);
+		usercerts.Set(KPeapAllowedUserCertsDatabaseTableName);
+		cacerts.Set(KPeapAllowedCACertsDatabaseTableName);
+		ciphersuites.Set(KPeapAllowedCipherSuitesDatabaseTableName);
+	}
 #if defined (USE_TTLS_EAP_TYPE)
-	case eap_type_ttls:
-		{
-			settings.Set(KTtlsDatabaseTableName);
-			usercerts.Set(KTtlsAllowedUserCertsDatabaseTableName);
-			cacerts.Set(KTtlsAllowedCACertsDatabaseTableName);
-			ciphersuites.Set(KTtlsAllowedCipherSuitesDatabaseTableName);
-		}
-		break;
+	else if (iEapType == eap_type_ttls)
+	{
+		settings.Set(KTtlsDatabaseTableName);
+		usercerts.Set(KTtlsAllowedUserCertsDatabaseTableName);
+		cacerts.Set(KTtlsAllowedCACertsDatabaseTableName);
+		ciphersuites.Set(KTtlsAllowedCipherSuitesDatabaseTableName);
+	}
 #endif
-
-	case eap_type_ttls_plain_pap:
-		{
-			settings.Set(KTtlsDatabaseTableName);
-			usercerts.Set(KTtlsAllowedUserCertsDatabaseTableName);
-			cacerts.Set(KTtlsAllowedCACertsDatabaseTableName);
-			ciphersuites.Set(KTtlsAllowedCipherSuitesDatabaseTableName);
-		}
-		break;
-		
+	else if (iEapType == eap_type_ttls_plain_pap)
+	{
+		settings.Set(KTtlsDatabaseTableName);
+		usercerts.Set(KTtlsAllowedUserCertsDatabaseTableName);
+		cacerts.Set(KTtlsAllowedCACertsDatabaseTableName);
+		ciphersuites.Set(KTtlsAllowedCipherSuitesDatabaseTableName);
+	}
 #ifdef USE_FAST_EAP_TYPE
-	case eap_type_fast:
-		{
-			settings.Set(KFastGeneralSettingsDBTableName); // This is general settings for FAST.
-			fastSpecialSettings.Set(KFastSpecialSettingsDBTableName);
-			
-			usercerts.Set(KFastAllowedUserCertsDatabaseTableName);
-			cacerts.Set(KFastAllowedCACertsDatabaseTableName);
-			ciphersuites.Set(KFastAllowedCipherSuitesDatabaseTableName);			
-		}
-		break;
+	else if (iEapType == eap_type_fast)
+	{
+		settings.Set(KFastGeneralSettingsDBTableName); // This is general settings for FAST.
+		fastSpecialSettings.Set(KFastSpecialSettingsDBTableName);
+		
+		usercerts.Set(KFastAllowedUserCertsDatabaseTableName);
+		cacerts.Set(KFastAllowedCACertsDatabaseTableName);
+		ciphersuites.Set(KFastAllowedCipherSuitesDatabaseTableName);			
+	}
 #endif		
-
-	default:
+	else
+	{
 		// Should never happen
 		User::Leave(KErrArgument);
 	}	
@@ -1094,7 +1318,8 @@
 #endif // End: #ifdef USE_FAST_EAP_TYPE	
 	
 	db.Close();
-	CleanupStack::PopAndDestroy(2); // db, session
+	CleanupStack::PopAndDestroy(&db);
+	CleanupStack::PopAndDestroy(&session);
 	
 	//////// Copy Encapsulated types
 	
@@ -1119,29 +1344,27 @@
 				
 		for (TInt i = 0; i < iEapArray.Count(); i++)
 		{
-			if ((iEapType == eap_type_peap && !CEapType::IsDisallowedInsidePEAP(*iEapArray[i])) 
-				|| (iEapType == eap_type_ttls && !CEapType::IsDisallowedInsideTTLS(*iEapArray[i]))
+			if ((iEapType == eap_type_peap && !CEapTypePlugin::IsDisallowedInsidePEAP(*iEapArray[i])) 
+				|| (iEapType == eap_type_ttls && !CEapTypePlugin::IsDisallowedInsideTTLS(*iEapArray[i]))
 
 #ifdef USE_FAST_EAP_TYPE
-				|| (iEapType == eap_type_fast && !CEapType::IsDisallowedInsidePEAP(*iEapArray[i]))
+				|| (iEapType == eap_type_fast && !CEapTypePlugin::IsDisallowedInsidePEAP(*iEapArray[i]))
 #endif										
 
-				|| (iEapType == eap_type_ttls_plain_pap && !CEapType::IsDisallowedInsidePEAP(*iEapArray[i]))
+				|| (iEapType == eap_type_ttls_plain_pap && !CEapTypePlugin::IsDisallowedInsidePEAP(*iEapArray[i]))
 									
 			)
 			{
 				// Copying the settings of encapsulated EAP type configurations possible inside PEAP and TTLS.
 			
-				CEapType* eapType;
+				CEapTypePlugin* eapType;
 			
-#ifdef USE_EAP_EXPANDED_TYPES		
-			
-				TBuf8<KExpandedEAPTypeSize> expandedCue = iEapArray[i]->DataType();
+				TEapExpandedType expandedCue = iEapArray[i]->DataType();
 			
 				EAP_TRACE_DATA_DEBUG_SYMBIAN(("CEapTlsPeap::CopySettingsL: Expanded cue:",
-				expandedCue.Ptr(), expandedCue.Size()));
+					expandedCue.GetValue().Ptr(), expandedCue.GetValue().Size()));
 			
-				eapType = CEapType::NewL(expandedCue, iIndexType, iIndex);
+				eapType = CEapTypePlugin::NewL(expandedCue.GetValue(), iIndexType, iIndex);
 				
 				if(eapType == NULL)
 				{
@@ -1149,18 +1372,16 @@
 					User::Leave(KErrNotFound);
 				}
 				
-				eapType->SetTunnelingType(iEapType.get_vendor_type());						
+                TEapExpandedType aExpandedType;
+                
+                TInt err = CEapConversion::ConvertInternalTypeToExpandedEAPType(
+                        &iEapType,
+                        &aExpandedType);
 
-#else // For normal EAP types.
-			
-				TBuf8<3> cue = iEapArray[i]->DataType();
-			
-				eapType = CEapType::NewL(cue, iIndexType, iIndex);	
-				
-				eapType->SetTunnelingType(iEapType);					
+                eapType->SetTunnelingType(aExpandedType);
 
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-				
+                //eapType->SetTunnelingType(iEapType.get_vendor_type());						
+
 				CleanupStack::PushL(eapType);
 				
 				eapType->CopySettingsL(aDestinationIndexType, aDestinationIndex);
@@ -1178,12 +1399,17 @@
 
 }
 
+// ----------------------------------------------------------
+
 #ifdef USE_PAC_STORE
 
 void CEapTlsPeap::UpdatePacStoreCleanupTableL(const TIndexType aIndexType,
 	const TInt aIndex, 
 	const eap_type_value_e aTunnelingType)
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeap::UpdatePacStoreCleanupTableL()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeap::UpdatePacStoreCleanupTableL()\n"));
+
 	EAP_TRACE_DEBUG_SYMBIAN(
 	(_L("CEapTlsPeap::UpdatePacStoreCleanupTableL: Start")));
 	
@@ -1212,10 +1438,11 @@
 			
 	EAP_TRACE_DEBUG_SYMBIAN(
 	(_L("CEapTlsPeap::UpdatePacStoreCleanupTableL: End")));	
-	User::Leave(KErrNone);
+
 }
 
 #endif // #ifdef USE_PAC_STORE
 
+// ----------------------------------------------------------
 // End of file
 
--- a/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/src/EapTlsPeapCertFetcher.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/src/EapTlsPeapCertFetcher.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 31 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -32,7 +32,8 @@
 
 #include "EapTlsPeapCertFetcher.h"
 #include <EapTlsPeapUiCertificates.h>
-#include "eap_am_trace_symbian.h"
+#include <EapTraceSymbian.h>
+#include <AbsEapCertificateFetcher.h>
 
 #include <x509cert.h>
 #include <X509CertNameParser.h>
@@ -41,8 +42,11 @@
 
 // ================= MEMBER FUNCTIONS =======================
 
-CEapTlsPeapCertFetcher* CEapTlsPeapCertFetcher::NewL(CEapTlsPeapUiCertificates* const aParent)
+CEapTlsPeapCertFetcher* CEapTlsPeapCertFetcher::NewL(CAbsEapCertificateFetcher* const aParent)
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapCertFetcher::NewL(CAbsEapCertificateFetcher)\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapCertFetcher::NewL(CAbsEapCertificateFetcher)\n"));
+
 	CEapTlsPeapCertFetcher* self = new(ELeave) CEapTlsPeapCertFetcher(aParent);
 	CleanupStack::PushL(self);
 	self->ConstructL();
@@ -55,6 +59,9 @@
 // DON'T USE THIS FUNCTION. THIS IS ONLY FOR EapTlsPeapUtils. 	
 CEapTlsPeapCertFetcher* CEapTlsPeapCertFetcher::NewL()
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapCertFetcher::NewL()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapCertFetcher::NewL()\n"));
+
 	CEapTlsPeapCertFetcher* self = new(ELeave) CEapTlsPeapCertFetcher();
 	CleanupStack::PushL(self);
 
@@ -83,12 +90,18 @@
 
 //--------------------------------------------------
 
-CEapTlsPeapCertFetcher::CEapTlsPeapCertFetcher(CEapTlsPeapUiCertificates* const aParent)
+CEapTlsPeapCertFetcher::CEapTlsPeapCertFetcher(CAbsEapCertificateFetcher* const aParent)
 : CActive(CActive::EPriorityStandard)
+, iState(EGetCertificatesNone)
 , iParent(aParent)
 , iEncodedCertificate(0)
 , iCertPtr(0,0)
+, iOwnertype(EUserCertificate)
+, iCertInfoIndex(0)
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapCertFetcher::CEapTlsPeapCertFetcher(CAbsEapCertificateFetcher)\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapCertFetcher::CEapTlsPeapCertFetcher(CAbsEapCertificateFetcher)\n"));
+
 }
 
 //--------------------------------------------------
@@ -96,16 +109,25 @@
 // DON'T USE THIS FUNCTION. THIS IS ONLY FOR EapTlsPeapUtils. 	
 CEapTlsPeapCertFetcher::CEapTlsPeapCertFetcher()
 : CActive(CActive::EPriorityStandard)
+, iState(EGetCertificatesNone)
 , iParent(NULL)
 , iEncodedCertificate(0)
 , iCertPtr(0,0)
+, iOwnertype(EUserCertificate)
+, iCertInfoIndex(0)
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapCertFetcher::CEapTlsPeapCertFetcher()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapCertFetcher::CEapTlsPeapCertFetcher()\n"));
+
 }
 
 //--------------------------------------------------
 
 void CEapTlsPeapCertFetcher::ConstructL()
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapCertFetcher::ConstructL()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapCertFetcher::ConstructL()\n"));
+
 	User::LeaveIfError(iFs.Connect());
 
 	CActiveScheduler::Add(this);
@@ -119,6 +141,9 @@
 
 CEapTlsPeapCertFetcher::~CEapTlsPeapCertFetcher()
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapCertFetcher::~CEapTlsPeapCertFetcher()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapCertFetcher::~CEapTlsPeapCertFetcher()\n"));
+
 	// Delete iCertInfos
 	for (TInt i = 0; i < iCertInfos.Count(); i++)
 	{
@@ -126,16 +151,19 @@
 	}
 	iCertInfos.Reset();
 
-	iCACerts.Reset();
+	iCACerts.ResetAndDestroy();
 
-	iUserCerts.Reset();
-		
+	iUserCerts.ResetAndDestroy();
+
 	delete iCertFilter;
-	
+	iCertFilter = 0;
+
 	delete iCertStore;
-	
-	delete iEncodedCertificate;	
-	
+	iCertStore = 0;
+
+	delete iEncodedCertificate;
+	iEncodedCertificate = 0;
+
 	iFs.Close();
 
 	if(IsActive())
@@ -148,6 +176,13 @@
 
 void CEapTlsPeapCertFetcher::GetCertificatesL()
 {	
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapCertFetcher::GetCertificatesL()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapCertFetcher::GetCertificatesL()\n"));
+
+	iCACerts.ResetAndDestroy();
+
+	iUserCerts.ResetAndDestroy();
+
 	iState = EGetCertificatesInitStore;
 	if (iCertStore == 0)
 	{
@@ -162,149 +197,145 @@
 	SetActive();
 }
 
+//--------------------------------------------------
 
 void CEapTlsPeapCertFetcher::DoCancel()
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapCertFetcher::DoCancel()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapCertFetcher::DoCancel()\n"));
+
+}
+
+//--------------------------------------------------
+
+void CEapTlsPeapCertFetcher::InitializeQuery()
+{
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapCertFetcher::InitializeQuery(): iOwnertype=%d\n"),
+		iOwnertype));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapCertFetcher::InitializeQuery()\n"));
+
+	// Delete iCertInfos
+	for (TInt i = 0; i < iCertInfos.Count(); i++)
+	{
+		iCertInfos[i]->Release();
+	}
+	iCertInfos.Reset();
+
+	delete iCertFilter;
+	iCertFilter = 0;
+
+	TRAPD(error, iCertFilter = CCertAttributeFilter::NewL());
+	if (error != KErrNone)
+	{
+		// Complete with empty lists
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: CEapTlsPeapCertFetcher::InitializeQuery() -  Complete with empty lists Error:%d, iUserCerts.Count()=%d, iCACerts.Count()=%d\n"),
+			error,
+			iUserCerts.Count(),
+			iCACerts.Count()) );
+		TRAP(error, iParent->CompleteReadCertificatesL(iUserCerts, iCACerts));
+		return;
+	}
+	iCertFilter->SetFormat(EX509Certificate);
+
+	iCertFilter->SetOwnerType(iOwnertype);
+
+	iCertInfoIndex = 0;
+
+	iState = EGetCertificatesGetCertList;
+
+	iCertStore->List(
+		iCertInfos,
+		*iCertFilter, 
+		iStatus);
+
+	SetActive();		
 }
 
 //--------------------------------------------------
 
 void CEapTlsPeapCertFetcher::RunL()
 {	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapCertFetcher::RunL - iStatus.Int()=%d, iState=%d \n"),
-	iStatus.Int() , iState));
-	if( iState == EGetSymbianSubjectKeyId )
-	{
-		// Only for GetSymbianSubjectKeyIdL.
-		iWait.AsyncStop(); // This is needed to continue the execution after Wait.Start()
-		return; // No need to proceed further.
-	}
-	
-	if( iState == EGetCertificatesRetrieveCert)
-	{
-		// This is executed when certificate details are being retrieved.
-		iWait.AsyncStop(); // This is needed to continue the execution after Wait.Start()
-		return; // No need to proceed further.
-	}
-	
-	int i;
-	TInt err(KErrNone);
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapCertFetcher::RunL(): - iStatus.Int()=%d, iState=%d \n"),
+		iStatus.Int() , iState));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapCertFetcher::RunL()\n"));
+
+	//int i;
+	TInt error(KErrNone);
 		
 	// This causes panic if leaves
 	if (iStatus.Int() != KErrNone)
 	{
-RDebug::Print(_L("CEapTlsPeapCertFetcher::RunL() -- don't leave..."));
+		EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapCertFetcher::RunL() -- don't leave...")));
 	}
 	
 	switch (iState)
 	{
 	case EGetCertificatesInitStore:
 		{
-			// Delete iCertInfos
-			for (TInt i = 0; i < iCertInfos.Count(); i++)
-			{
-				iCertInfos[i]->Release();
-			}
-			iCertInfos.Reset();
-		
-			delete iCertFilter;
-			iCertFilter = 0;
-		
-			TRAP(err, iCertFilter = CCertAttributeFilter::NewL());
-			if (err != KErrNone)
-			{
-				// Complete with empty lists
-				TInt err(KErrNone);
-				TRAP(err, iParent->CompleteReadCertificatesL(iUserCerts, iCACerts));
-				break;
-			}
-			iCertFilter->SetFormat(EX509Certificate);
+			EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapCertFetcher::RunL(): - EGetCertificatesInitStore\n")));
 
-			iState = EGetCertificatesGetCertList;
-			iCertStore->List(
-				iCertInfos,
-				*iCertFilter, 
-				iStatus);
-			SetActive();		
+			// First get the User certificates.
+			iOwnertype = EUserCertificate;
+			InitializeQuery();
 		}
 		break;
 
-	case EGetCertificatesGetCertList:
+	case EGetCertificatesRetrieveCert:
 		{			
-			EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapCertFetcher::RunL - EGetCertificatesGetCertList - Symbian cert store found %d certs in device\n"),
-			iCertInfos.Count()));
-		
-			if(0 == iCertInfos.Count())
+			EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapCertFetcher::RunL(): - EGetCertificatesRetrieveCert - Symbian cert store found %d certs in device\n"),
+				iCertInfos.Count()));
+
+			EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapCertFetcher::RunL() - iWait.Start() returned, iStatus.Int()=%d \n"),iStatus.Int() ) );
+
+			CCTCertInfo* CertInfo = iCertInfos[iCertInfoIndex];
+			CCertificate* cert = NULL;
+
+			if ( iStatus.Int() == KErrNone )
 			{
-				EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR : CEapTlsPeapCertFetcher::RunL - SERIOUS PROBLEM - Symbian cert store couldn't find any certs in device\n")));				
-			}
-		
-			for (i = 0; i < iCertInfos.Count(); i++)
-			{				
-			    CCTCertInfo* CertInfo;
-				CertInfo = iCertInfos[i];
-				iEncodedCertificate->Des().SetLength(0);
-				
-				TRAPD(err, iEncodedCertificate = iEncodedCertificate->ReAllocL(iCertInfos[i]->Size()));
-				if (err != KErrNone)
+				switch ( CertInfo->CertificateFormat() )
 				{
-					EAP_TRACE_DEBUG_SYMBIAN((_L("\nCEapTlsPeapCertFetcher::RunL() -  EGetCertificatesGetCertList - leave from iEncodedCertificate->ReAllocL Error:%d\n"), err ) );
-				}		
-				iCertPtr.Set(iEncodedCertificate->Des());
-
-				EAP_TRACE_DEBUG_SYMBIAN((_L("\nCEapTlsPeapCertFetcher::RunL() - EGetCertificatesGetCertList - Retreiving cert %d\n"), i ) );
-				
-			    iCertStore->Retrieve( *CertInfo, iCertPtr, iStatus);
-			    
-			    iState = EGetCertificatesRetrieveCert;
-
-			    SetActive();
-			    iWait.Start();
-			 	
-				EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapCertFetcher::RunL() - iWait.Start() returned, iStatus.Int()=%d \n"),iStatus.Int() ) );
-
-			 	CCertificate* cert = NULL;
+				case EX509Certificate:
+					{
+						TRAPD(error, cert = CX509Certificate::NewL( iCertPtr ));
+						if (error != KErrNone)
+						{
+							EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: CEapTlsPeapCertFetcher::RunL() - EGetCertificatesGetCertList - leave from CX509Certificate::NewL Label:%S Error:%d\n"),
+							&(CertInfo->Label()),
+							error ) );
 
-			    if ( iStatus.Int() == KErrNone )
-		        {
-			        switch ( CertInfo->CertificateFormat() )
-		            {
-		            case EX509Certificate:
-		                {
-		                TRAPD(err, cert = CX509Certificate::NewL( iCertPtr ));
-			            if (err != KErrNone)
-			               	EAP_TRACE_DEBUG_SYMBIAN((_L("\nCEapTlsPeapCertFetcher::RunL() - EGetCertificatesGetCertList - leave from CX509Certificate::NewL Label:%S Error:%d\n"),&(CertInfo->Label()), err ) );
-			            break;
-		                }
-		            default:
-		                {
-		                	// Only  X509 type of certificates are supported at the moment.
-		                	// This won't be happening ever since we have used a filter while getting the certificate list.
-							EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapCertFetcher::RunL() - Unsupported Certificate - Not X509\n") ) );
-							
-			                break;
-		                }
-		            }
-		        }
-		        else
-		        {
-					EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapCertFetcher::RunL() - Error from Certificate retrieve, iStatus.Int()=%d\n"), iStatus.Int() ) );
-		        }
+							cert = NULL;
+						}
+					break;
+					}
+				default:
+					{
+		                // Only  X509 type of certificates are supported at the moment.
+		                // This won't be happening ever since we have used a filter while getting the certificate list.
+						EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: CEapTlsPeapCertFetcher::RunL() - Unsupported Certificate - Not X509\n") ) );
+						
+						cert = NULL;
+					}
+				}
+			}
+			else
+			{
+				EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: CEapTlsPeapCertFetcher::RunL() - Error from Certificate retrieve, iStatus.Int()=%d\n"), iStatus.Int() ) );
+			}
 
-				if( cert == NULL )
-				{
-					// Some problem above. Skip the below and go for the next certificate.
-					continue;
-				}							
+			if( cert != NULL )
+			{
+				HBufC* pri = NULL;
+				HBufC* sec = NULL;
 			
-                HBufC* pri = NULL;
-                HBufC* sec = NULL;
-			
-				CleanupStack::PushL( cert );
+				CleanupStack::PushL(cert);
 				
-                X509CertNameParser::PrimaryAndSecondaryNameL( *((CX509Certificate*)cert), pri, sec, CertInfo->Label());
+				X509CertNameParser::PrimaryAndSecondaryNameL( *((CX509Certificate*)cert), pri, sec, CertInfo->Label());
 	
-				CleanupStack::PopAndDestroy(); // cert		
+				CleanupStack::PopAndDestroy(cert);
+
+				CleanupStack::PushL(pri);
+				CleanupStack::PushL(sec);
+
 
 				EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapCertFetcher::RunL() - Label=%S, Pri name=%S,Length=%d, Sec name=%S,Length=%d\n"),
 					 &(CertInfo->Label()), pri, pri->Length(), sec, sec->Length() ) );
@@ -312,45 +343,120 @@
 				EAP_TRACE_DATA_DEBUG_SYMBIAN( ( "CEapTlsPeapCertFetcher::RunL() - Sub Key Id:", (CertInfo->SubjectKeyId().Ptr()), 
 						(CertInfo->SubjectKeyId().Size()) ) );
 
-				SCertEntry certEntry;
-							
-				certEntry.iLabel.Copy(iCertInfos[i]->Label());
-				certEntry.iSubjectKeyId.Copy(iCertInfos[i]->SubjectKeyId());
-				
+				EapCertificateEntry * const certEntry = new EapCertificateEntry;
+				if (certEntry == 0)
+				{
+					User::Leave(KErrNoMemory);
+				}
+				CleanupStack::PushL(certEntry);
+
+				certEntry->SetLabel(CertInfo->Label());
+				certEntry->SetSubjectKeyId(CertInfo->SubjectKeyId());
+
 				// Copy the new fields. Primary and secondary name.				
-				certEntry.iPrimaryName.Copy( pri->Des().Left(KMaxNameLength ) );
-				certEntry.iSecondaryName.Copy( sec->Des().Left(KMaxNameLength ) );
-				
-				delete pri;
-				delete sec;
-				
-				if (iCertInfos[i]->CertificateOwnerType() == ECACertificate)
+				certEntry->SetPrimaryName(pri->Des().Left(KMaxCertNameLength));
+				certEntry->SetSecondaryName(sec->Des().Left(KMaxCertNameLength));
+
+				if (CertInfo->CertificateOwnerType() == ECACertificate)
+				{
+					EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapCertFetcher::RunL(): - CA certificate\n")));
+
+					certEntry->SetCertType(EapCertificateEntry::ECA);
+					error = iCACerts.Append(certEntry);	
+				}
+				else if (CertInfo->CertificateOwnerType() == EUserCertificate)
 				{
-					iCACerts.Append(certEntry);	
+					EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapCertFetcher::RunL(): - User certificate\n")));
+
+					certEntry->SetCertType(EapCertificateEntry::EUser);
+					error = iUserCerts.Append(certEntry);
+				}
+				else
+				{
+					EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapCertFetcher::RunL(): - Unknown certificate\n")));
+				}
+
+				if (error == KErrNone)
+				{
+					CleanupStack::Pop(certEntry);
+				}
+				else
+				{
+					CleanupStack::PopAndDestroy(certEntry);
 				}
-				else if (iCertInfos[i]->CertificateOwnerType() == EUserCertificate)
+
+				CleanupStack::PopAndDestroy(sec);
+				CleanupStack::PopAndDestroy(pri);
+
+			}
+
+			++iCertInfoIndex;
+		}
+
+		// Here MUST NOT be break. State EGetCertificatesGetCertList is run after the state EGetCertificatesRetrieveCert.
+
+	case EGetCertificatesGetCertList:
+		{			
+			EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapCertFetcher::RunL(): - EGetCertificatesGetCertList - Symbian cert store found %d certs in device, iCertInfoIndex=%d\n"),
+				iCertInfos.Count(),
+				iCertInfoIndex));
+		
+			if (iCertInfoIndex < iCertInfos.Count())
+			{				
+				CCTCertInfo* CertInfo = iCertInfos[iCertInfoIndex];
+
+				iEncodedCertificate->Des().SetLength(0);
+				
+				TRAPD(error, iEncodedCertificate = iEncodedCertificate->ReAllocL(CertInfo->Size()));
+				if (error != KErrNone)
 				{
-					iUserCerts.Append(certEntry);
-				}				
-			}
-			delete iCertFilter;
-			iCertFilter = 0;
+					EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: CEapTlsPeapCertFetcher::RunL() -  EGetCertificatesGetCertList - leave from iEncodedCertificate->ReAllocL Error:%d\n"), error ) );
+				}		
+				iCertPtr.Set(iEncodedCertificate->Des());
 
-			// Delete iCertInfos
-			for (TInt i = 0; i < iCertInfos.Count(); i++)
+				EAP_TRACE_DEBUG_SYMBIAN((_L("\nCEapTlsPeapCertFetcher::RunL() - EGetCertificatesGetCertList - Retreiving cert %d\n"), iCertInfoIndex ) );
+				
+				iState = EGetCertificatesRetrieveCert;
+
+				iCertStore->Retrieve( *CertInfo, iCertPtr, iStatus);
+
+				SetActive();
+			}
+			else if (iOwnertype == EUserCertificate)
+			{
+				// Next get the CA certificates.
+				iOwnertype = ECACertificate;
+				InitializeQuery();
+				return;
+			}
+			else
 			{
-				iCertInfos[i]->Release();
+				delete iCertFilter;
+				iCertFilter = 0;
+
+				// Delete iCertInfos
+				for (TInt i = 0; i < iCertInfos.Count(); i++)
+				{
+					iCertInfos[i]->Release();
+				}
+				iCertInfos.Reset();
+
+				EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapCertFetcher::RunL() -  EGetCertificatesGetCertList - Complete list, iUserCerts.Count()=%d, iCACerts.Count()=%d\n"),
+					iUserCerts.Count(),
+					iCACerts.Count()) );
+
+				TRAP(error, iParent->CompleteReadCertificatesL(iUserCerts, iCACerts));
+				// Ignore error on purpose.			
 			}
-			iCertInfos.Reset();
-			TRAP(err, iParent->CompleteReadCertificatesL(iUserCerts, iCACerts));
-			// Ignore error on purpose.			
 		}
 		break;
 	
 	default:
+		EAP_TRACE_DEBUG_SYMBIAN((_L("WARNING: CEapTlsPeapCertFetcher::RunL(): - default\n")));
 		break;
 	}
 	return;
 }
 
+//--------------------------------------------------
 // End of file
--- a/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/src/EapTlsPeapProxy.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/src/EapTlsPeapProxy.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 17 %
+* %version: 14.1.2 %
 */
 
 // This is enumeration of EAPOL source code.
--- a/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/src/EapTlsPeapUiCertificates.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/src/EapTlsPeapUiCertificates.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 18.1.2 %
+* %version: 52 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -28,22 +28,24 @@
 #endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
 
 #include <e32base.h>
-#include "EapTlsPeapUtils.h"
+//#include "EapTlsPeapUtils.h"
 #include "EapTlsPeapDbDefaults.h"
 #include "EapTlsPeapDbParameterNames.h"
 #include <EapTlsPeapUiConnection.h>
 #include <EapTlsPeapUiCertificates.h>
-#include <EapTlsPeapUiCertificate.h>
-#include "EapTlsPeapCertFetcher.h"
+#include <EapGeneralSettings.h>
 #include <AbsEapTlsPeapUiCertificates.h>
-#include "eap_am_trace_symbian.h"
+#include <EapTraceSymbian.h>
+#include "EapConversion.h"
+#include <EapType.h>
 
 #include <unifiedcertstore.h>
 #include <mctwritablecertstore.h>
 
-const TUint KMaxSqlQueryLength = 256;
 const TUint KCertArrayGranularity = 16;
 
+// ----------------------------------------------------------
+
 CEapTlsPeapUiCertificates::CEapTlsPeapUiCertificates(
 	CEapTlsPeapUiConnection * const aUiConn,
 	MEapTlsPeapUiCertificates * const aParent)
@@ -51,83 +53,117 @@
 , iUiConn(aUiConn)
 , iUserCerts(0)
 , iCACerts(0)
+, iEapGeneralSettings(0)
 , iParent(aParent)
+, iEapTypeConnection(0)
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCertificates::CEapTlsPeapUiCertificates()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiCertificates::CEapTlsPeapUiCertificates()\n"));
+
 }
 
+// ----------------------------------------------------------
 
 CEapTlsPeapUiCertificates::~CEapTlsPeapUiCertificates()
 {
-    if (iUiConn)
-    {
-        Close();
-        iUiConn = NULL;
-    }
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCertificates::~CEapTlsPeapUiCertificates()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiCertificates::~CEapTlsPeapUiCertificates()\n"));
+
+	Close();
 }
 
+// ----------------------------------------------------------
 
 TInt CEapTlsPeapUiCertificates::Open()
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCertificates::Open()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiCertificates::Open()\n"));
+
     if (iIsOpened)
     {
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: CEapTlsPeapUiCertificates::Open(): KErrAlreadyExists\n")));
         return KErrAlreadyExists;
     }
 
-    TInt err = iUiConn->GetDatabase(iDatabase);
-    if (err != KErrNone)
-    {
-        return err;
-    }
+	TEapExpandedType aEapType(iUiConn->GetEapType());
 
-	TRAP(err, iCertFetcher = CEapTlsPeapCertFetcher::NewL(this));
-	if (err != KErrNone)
+	TRAPD(error, iEapTypeConnection = CEapType::NewL(iUiConn->GetIndexType(), iUiConn->GetIndex(), aEapType));
+	if (error != KErrNone)
 	{
-		return err;
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: CEapTlsPeapUiCertificates::Open(): CEapType::NewL() error=%d\n"),error));
+		return error;
 	}
+    
+    iEapTypeConnection->SetTunnelingType(iUiConn->GetTunnelingType());
+
+    TRAP(error, iEapGeneralSettings = CEapGeneralSettings::NewL(iUiConn->GetIndexType(), iUiConn->GetIndex()));
+    if (error != KErrNone)
+        {
+        EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCertificates::Open(): CEapGeneralSettings::NewL() error=%d\n"),error));
+        return error;
+        }
 
     iIsOpened = ETrue;
 
     return KErrNone;
 }
 
+// ----------------------------------------------------------
 
 TInt CEapTlsPeapUiCertificates::Close()
 {
-    if (iIsOpened == EFalse)
-    {
-        return KErrNone;
-    }
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCertificates::Close()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiCertificates::Close()\n"));
+
+	if (iIsOpened == EFalse)
+	{
+		return KErrNone;
+	}
+
+	delete iUserCerts;
+	iUserCerts = 0;
 
-    delete iUserCerts;
-    iUserCerts = 0;
-    
-    delete iCACerts;
-    iCACerts = 0;
-    
-    delete iCertFetcher;
-	iCertFetcher = 0;
-	    
-    iUiConn = NULL;
-    return KErrNone;
+	delete iCACerts;
+	iCACerts = 0;
+
+	delete iEapGeneralSettings;
+	iEapGeneralSettings = 0;
+
+	iUiConn = NULL;
+
+	iIsOpened = EFalse;
+
+	return KErrNone;
 }
 
-TInt CEapTlsPeapUiCertificates::GetCertificates(CArrayFixFlat<TEapTlsPeapUiCertificate> ** aUserCerts,
-					CArrayFixFlat<TEapTlsPeapUiCertificate> ** aCACerts)
+// ----------------------------------------------------------
+
+TInt CEapTlsPeapUiCertificates::GetCertificates(
+	RPointerArray<EapCertificateEntry> ** aUserCerts,
+	RPointerArray<EapCertificateEntry> ** aCACerts)
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCertificates::GetCertificates()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiCertificates::GetCertificates()\n"));
+
 	if (aUserCerts == NULL
 		|| aCACerts == NULL)
     {
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: CEapTlsPeapUiCertificates::GetCertificates(): KErrArgument\n")));
         return KErrArgument;
     }
+
     if (iIsOpened == EFalse)
     {
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: CEapTlsPeapUiCertificates::GetCertificates(): KErrSessionClosed\n")));
         return KErrSessionClosed;
     }
+
     if (iUserCerts == 0)
     {
-    	iUserCerts = new CArrayFixFlat<TEapTlsPeapUiCertificate>(KCertArrayGranularity);
+    	iUserCerts = new RPointerArray<EapCertificateEntry>(KCertArrayGranularity);
     	if (!iUserCerts)
     	{
+			EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: CEapTlsPeapUiCertificates::GetCertificates(): iUserCerts, KErrNoMemory\n")));
 	        return KErrNoMemory;
 	    }	
     }
@@ -136,460 +172,236 @@
     
     if (iCACerts == 0)
     {
-	    iCACerts = new CArrayFixFlat<TEapTlsPeapUiCertificate>(KCertArrayGranularity);
+	    iCACerts = new RPointerArray<EapCertificateEntry>(KCertArrayGranularity);
 	    if (!iUserCerts)
 	    {
+			EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: CEapTlsPeapUiCertificates::GetCertificates(): iCACerts, KErrNoMemory\n")));
 	        return KErrNoMemory;
 	    }
     }
     *aCACerts = iCACerts;
     
-	TRAPD(err, iCertFetcher->GetCertificatesL());
+	TInt error(KErrNone);
+
+	error = iEapGeneralSettings->GetCertificateLists(
+		*iUserCerts,
+		*iCACerts);
+
+	if (error != KErrNone)
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: CEapTlsPeapUiCertificates::GetCertificates(): GetCertificateLists() error=%d\n"),
+			error));
+		iParent->CompleteReadCertificates(error);
+	    return error;
+	}
+
+	TRAP(error, SelectActiveCertificatesL());
 	
-	return err;
+	return error;
 }
-						 
+
+// ----------------------------------------------------------
+
+void CEapTlsPeapUiCertificates::SelectCertificatesL(
+	const EapCertificateEntry::TCertType aCertType,
+	const EAPSettings & aSettings,
+	RPointerArray<EapCertificateEntry>& aAvailableCerts)
+{
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCertificates::SelectCertificatesL(): - Available cert count in device aAvailableCerts.Count()=%d, aSettings.iCertificates.Count()=%d\n"),
+		aAvailableCerts.Count(),
+		aSettings.iCertificates.Count()));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiCertificates::SelectCertificatesL()\n"));
+
+	// Loop through available certs
+	TInt avail_ind(0);
+
+	for (avail_ind = 0; avail_ind < aAvailableCerts.Count(); ++avail_ind)
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCertificates::SelectCertificatesL(): loops aAvailableCerts avail_ind=%d, aAvailableCerts.Count()=%d, aSettings.iCertificates.Count()=%d\n"),
+			avail_ind,
+			aAvailableCerts.Count(),
+			aSettings.iCertificates.Count()) );
 
-void CEapTlsPeapUiCertificates::CompleteReadCertificatesL(
-		const RArray<SCertEntry>& aAvailableUserCerts, 
-		const RArray<SCertEntry>& aAvailableCACerts)
+		EapCertificateEntry * const avail_cert = aAvailableCerts[avail_ind];
+
+		EAP_TRACE_SETTINGS(avail_cert);
+
+		avail_cert->SetIsEnabled(EFalse);
+
+		if (aSettings.iCertificatesPresent)
+		{
+			TInt select_ind(0);
+
+			for (select_ind = 0; select_ind < aSettings.iCertificates.Count(); ++select_ind)
+			{
+				EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCertificates::SelectCertificatesL(): loops aSettings.iCertificates select_ind=%d\n"),
+					select_ind ) );
+
+				EapCertificateEntry * const conf_cert = aSettings.iCertificates[select_ind];
+
+				EAP_TRACE_SETTINGS(conf_cert);
+
+				if (aCertType == conf_cert->GetCertType()
+					&& avail_cert->GetSubjectKeyId() == conf_cert->GetSubjectKeyId())
+				{
+					avail_cert->SetIsEnabled(ETrue);
+
+					EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCertificates::SelectCertificatesL(): - Reading certificate details from the DB - Label=%S \n"),
+						avail_cert->GetLabel() ) );
+
+					EAP_TRACE_DATA_DEBUG_SYMBIAN(("Subject Key Id:",
+						avail_cert->GetSubjectKeyId().Ptr(),
+						avail_cert->GetSubjectKeyId().Length()));
+				}
+			}
+		}
+	}
+}
+
+// ----------------------------------------------------------
+
+void CEapTlsPeapUiCertificates::SelectActiveCertificatesL()
 {
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCertificates::CompleteReadCertificatesL - Available cert count in device - USER=%d, CA=%d \n"),
-	aAvailableUserCerts.Count(), aAvailableCACerts.Count()));
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCertificates::SelectActiveCertificatesL(): - Available cert count in device - USER=%d, CA=%d \n"),
+		iUserCerts->Count(), iCACerts->Count()));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiCertificates::SelectActiveCertificatesL()\n"));
 
 	// Now all available certificates have been read.
-	// Get the allowed certs from the database and set their iIsEnabled flag -> ETrue.
-    TInt err(KErrNone);
-	if (iUiConn->GetEapType() == eap_type_tls)
-	{
-		TRAP(err, FetchDataL(KTlsAllowedUserCertsDatabaseTableName, aAvailableUserCerts, iUserCerts));
-		if (err != KErrNone)
-		{
-			EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCertificates::CompleteReadCertificatesL -TLS- USER cert - LEAVE from FetchDataL err=%d\n"),
-			err));
-		
-			iParent->CompleteReadCertificates(err);
-			return;
-		}
-		TRAP(err, FetchDataL(KTlsAllowedCACertsDatabaseTableName, aAvailableCACerts, iCACerts));
-		if (err != KErrNone)
-		{
-			EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCertificates::CompleteReadCertificatesL -TLS- CA cert - LEAVE from FetchDataL err=%d\n"),
-			err));
+	// Get the allowed certs from the server and set their iIsEnabled flag -> ETrue.
 
-			iParent->CompleteReadCertificates(err);
-			return;
-		}
-		
-	}
-	else if (iUiConn->GetEapType() == eap_type_peap)
-	{	
-	
-		TRAP(err, FetchDataL(KPeapAllowedUserCertsDatabaseTableName, aAvailableUserCerts, iUserCerts));
-		if (err != KErrNone)
-		{
-			EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCertificates::CompleteReadCertificatesL -PEAP- USER cert - LEAVE from FetchDataL err=%d\n"),
-			err));
-		
-			iParent->CompleteReadCertificates(err);
-			return;
-		}
-		TRAP(err, FetchDataL(KPeapAllowedCACertsDatabaseTableName, aAvailableCACerts, iCACerts));
-		if (err != KErrNone)
-		{
-			EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCertificates::CompleteReadCertificatesL -PEAP- CA cert - LEAVE from FetchDataL err=%d\n"),
-			err));
-		
-			iParent->CompleteReadCertificates(err);
-			return;
-		}
+    EAPSettings aSettings;
+    
+	TRAPD(error, iEapTypeConnection->GetConfigurationL(aSettings));
+	if (error)
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: CEapTlsPeapUiCertificates::SelectActiveCertificatesL(): GetConfigurationL(): failed %d\n"), error));
+		iParent->CompleteReadCertificates(error);
+		User::Leave(error);
 	}
-	else if (iUiConn->GetEapType() == eap_type_ttls || iUiConn->GetEapType() == eap_type_ttls_plain_pap)
-	{	
-	
-		TRAP(err, FetchDataL(KTtlsAllowedUserCertsDatabaseTableName, aAvailableUserCerts, iUserCerts));
-		if (err != KErrNone)
-		{
-			EAP_TRACE_DEBUG_SYMBIAN((_L(
-			"CEapTlsPeapUiCertificates::CompleteReadCertificatesL -TTLS- USER cert - LEAVE from FetchDataL err=%d\n"),
-			err));
-		
-			iParent->CompleteReadCertificates(err);
-			return;
-		}
-		TRAP(err, FetchDataL(KTtlsAllowedCACertsDatabaseTableName, aAvailableCACerts, iCACerts));
-		if (err != KErrNone)
-		{
-			EAP_TRACE_DEBUG_SYMBIAN((_L(
-			"CEapTlsPeapUiCertificates::CompleteReadCertificatesL -TTLS- CA cert - LEAVE from FetchDataL err=%d\n"),
-			err));
-		
-			iParent->CompleteReadCertificates(err);
-			return;
-		}
+
+	TRAP(error, SelectCertificatesL(EapCertificateEntry::EUser, aSettings, *iUserCerts));
+	if (error)
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: CEapTlsPeapUiCertificates::SelectActiveCertificatesL(): SelectCertificatesL(iUserCerts): failed %d\n"), error));
+		iParent->CompleteReadCertificates(error);
+		User::Leave(error);
 	}
-	
-#ifdef USE_FAST_EAP_TYPE
-	else if (iUiConn->GetEapType() == eap_type_fast)
-	{	
-	
-		TRAP(err, FetchDataL(KFastAllowedUserCertsDatabaseTableName, aAvailableUserCerts, iUserCerts));
-		if (err != KErrNone)
-		{
-			EAP_TRACE_DEBUG_SYMBIAN((_L(
-			"CEapTlsPeapUiCertificates::CompleteReadCertificatesL -FAST- USER cert - LEAVE from FetchDataL err=%d\n"),
-			err));
-		
-			iParent->CompleteReadCertificates(err);
-			return;
-		}
-		TRAP(err, FetchDataL(KFastAllowedCACertsDatabaseTableName, aAvailableCACerts, iCACerts));
-		if (err != KErrNone)
-		{
-			EAP_TRACE_DEBUG_SYMBIAN((_L(
-			"CEapTlsPeapUiCertificates::CompleteReadCertificatesL -FAST- CA cert - LEAVE from FetchDataL err=%d\n"),
-			err));
-		
-			iParent->CompleteReadCertificates(err);
-			return;
-		}
+
+	TRAP(error, SelectCertificatesL(EapCertificateEntry::ECA, aSettings, *iCACerts));
+	if (error)
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: CEapTlsPeapUiCertificates::SelectActiveCertificatesL(): SelectCertificatesL(iCACerts): failed %d\n"), error));
+		iParent->CompleteReadCertificates(error);
+		User::Leave(error);
 	}
-#endif //#ifdef USE_FAST_EAP_TYPE
-	
-	else 
-	{
-		iParent->CompleteReadCertificates(KErrNotSupported);
-		return;
-	}
-	
+
 	// Operation was successful
 	iParent->CompleteReadCertificates(KErrNone);
 }
 
-void CEapTlsPeapUiCertificates::FetchDataL(
-	const TDesC& aTableName,
-	const RArray<SCertEntry>& aAvailableCerts,
-	CArrayFixFlat<TEapTlsPeapUiCertificate>* const aArray)
+// ----------------------------------------------------------
+
+void CEapTlsPeapUiCertificates::SaveCertificatesL(
+	const EapCertificateEntry::TCertType /* aCertType */,
+	const RPointerArray<EapCertificateEntry>* const aAvailableCerts,
+	EAPSettings & aSettings)
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCertificates::SaveCertificatesL(): - Available cert count %d \n"),
+		aAvailableCerts->Count()));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiCertificates::SaveCertificatesL()\n"));
 
-	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCertificates::FetchDataL - Fetching & comparing cert details from table:%S\n"),
-	&aTableName));
+	TInt avail_ind(0);
+	for (avail_ind = 0; avail_ind < aAvailableCerts->Count(); avail_ind++)
+	{
+		if ((*aAvailableCerts)[avail_ind]->GetIsEnabled())
+		{
+			EAP_TRACE_SETTINGS((*aAvailableCerts)[avail_ind]);
 
-	aArray->Reset();
-	
-	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
-	TPtr sqlStatement = buf->Des();
+			// Validate data lengths.
+			if((*aAvailableCerts)[avail_ind]->GetLabel()->Length() > KMaxCertLabelLengthInDB 
+				|| (*aAvailableCerts)[avail_ind]->GetSubjectKeyId().Length() > KMaxSubjectKeyIdLengthInDB)
+			{
+				// Too long data. Can not be stored in DB.
 
-	// Form the query. Query everything.
-	_LIT(KSQLQuery, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
+				EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: CEapTlsPeapUiCertificates::UpdateL(): User : Too long Label or SubjectKeyId. Length: Label=%d, SubjectKeyId=%d \n"),
+					(*aAvailableCerts)[avail_ind]->GetLabel()->Length(),
+					(*aAvailableCerts)[avail_ind]->GetSubjectKeyId().Length()));
+								
+				User::Leave(KErrArgument);
+			}
+
+#if 1
 
-	sqlStatement.Format(KSQLQuery,						
-						&aTableName,
-						&KServiceType,
-						iUiConn->GetIndexType(),
-						&KServiceIndex,
-						iUiConn->GetIndex(),
-						&KTunnelingType, 
-						iUiConn->GetTunnelingType());
-	
-	// Evaluate view
-	RDbView view;
-	User::LeaveIfError(view.Prepare(iDatabase, TDbQuery(sqlStatement)));
-	CleanupClosePushL(view);
-	User::LeaveIfError(view.EvaluateAll());	
-	
-	// Get column set so we get the correct column numbers
-	CDbColSet* colSet = view.ColSetL();
-	CleanupStack::PushL(colSet);
-	
-	TEapTlsPeapUiCertificate tmp;
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCertificates::FetchDataL - Available certs=%d\n"),
-	aAvailableCerts.Count()));
-	
-	// Loop through available certs
-	TInt i(0);
-	for (i = 0; i < aAvailableCerts.Count(); i++)
-	{
-		SCertEntry cert = aAvailableCerts[i];
-		
-		tmp.iCertEntry = cert;
-		tmp.iIsEnabled = EFalse;
-		
-		// Try to find the cert from the database rows
-		if (view.FirstL())
-		{
-			do 
+			EapCertificateEntry * const aCertEntry = (*aAvailableCerts)[avail_ind]->Copy();
+			if (aCertEntry == 0)
+			{
+				User::Leave(KErrNoMemory);
+			}
+			CleanupStack::PushL(aCertEntry);
+
+#else
+
+			EapCertificateEntry * const aCertEntry = new EapCertificateEntry;
+			if (aCertEntry == 0)
 			{
-				view.GetL();
-				if ((view.ColDes(colSet->ColNo(KCertLabel)) == cert.iLabel 
-					|| view.IsColNull(colSet->ColNo(KCertLabel)))
-					&& view.ColDes8(colSet->ColNo(KSubjectKeyIdentifier)) == cert.iSubjectKeyId)
-				{
-					tmp.iIsEnabled = ETrue;
-					
-					EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCertificates::FetchDataL - Reading certificate details from the DB - Label=%S \n"),
-					&(cert.iLabel) ) );
-					
-					EAP_TRACE_DATA_DEBUG_SYMBIAN( ( "Subject Key Id:", cert.iSubjectKeyId.Ptr(), 
-																cert.iSubjectKeyId.Size() ) );					
-					break;
-				}
-			} while (view.NextL() != EFalse);
+				User::Leave(KErrNoMemory);
+			}
+			CleanupStack::PushL(aCertEntry);
+
+			aCertEntry->SetCertType(aCertType);
+			aCertEntry->GetSubjectKeyIdWritable()->Copy(*((*aAvailableCerts)[avail_ind]->GetSubjectKeyId()));
+
+#endif
+
+			EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCertificates::UpdateL(): - Wrote User cert details to the DB - Label=%S \n"),
+				aCertEntry->GetLabel() ) );
+			
+			EAP_TRACE_DATA_DEBUG_SYMBIAN( ( "Subject Key Id:",
+				aCertEntry->GetSubjectKeyId().Ptr(),
+				aCertEntry->GetSubjectKeyId().Length() ) );
+
+			EAP_TRACE_SETTINGS(aCertEntry);
+
+			aSettings.iCertificates.AppendL(aCertEntry);
+
+			aSettings.iCertificatesPresent = ETrue;
+
+			CleanupStack::Pop(aCertEntry);
 		}
-		
-		aArray->AppendL(tmp);
 	}
-	CleanupStack::PopAndDestroy(); // colset
-	CleanupStack::PopAndDestroy(); // view
-    CleanupStack::PopAndDestroy(buf);
 }
 
+// ----------------------------------------------------------
+
 TInt CEapTlsPeapUiCertificates::Update()
 {
-	TRAPD(err, UpdateL());
-	
-	if(KErrNone != err)
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCertificates::Update()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiCertificates::Update()\n"));
+
+    EAPSettings aSettings;
+    
+	TRAPD(error, SaveCertificatesL(EapCertificateEntry::EUser, iUserCerts, aSettings));
+	if (error)
 	{
-		EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCertificates::Update - UpdateL LEAVES with error =%d \n"),
-		err));		
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: CEapTlsPeapUiCertificates::Update() SaveCertificatesL(iUserCerts): failed %d\n"), error));
+		iParent->CompleteReadCertificates(error);
+		return error;
 	}
 
-	return err;
+	TRAP(error, SaveCertificatesL(EapCertificateEntry::ECA, iCACerts, aSettings));
+	if (error)
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: CEapTlsPeapUiCertificates::Update() SaveCertificatesL(iCACerts): failed %d\n"), error));
+		iParent->CompleteReadCertificates(error);
+		return error;
+	}
+
+	TRAP(error,iEapTypeConnection->SetConfigurationL(aSettings));
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCertificates::Update(): error = %d\n"),error));
+
+	return error;
 }
 
-
-void CEapTlsPeapUiCertificates::UpdateL()
-{
-	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
-	TPtr sqlStatement = buf->Des();
-
-	// USER CERTIFICATES
-	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	
-	if (iUiConn->GetEapType() == eap_type_tls)
-	{
-		sqlStatement.Format(
-			KSQL, 
-			&KTlsAllowedUserCertsDatabaseTableName, 
-			&KServiceType, 
-			iUiConn->GetIndexType(), 
-			&KServiceIndex,
-			iUiConn->GetIndex(), 
-			&KTunnelingType, 
-			iUiConn->GetTunnelingType());
-	}
-	else if (iUiConn->GetEapType() == eap_type_peap)
-	{
-		sqlStatement.Format(
-			KSQL, 
-			&KPeapAllowedUserCertsDatabaseTableName, 
-			&KServiceType, 
-			iUiConn->GetIndexType(), 
-			&KServiceIndex,
-			iUiConn->GetIndex(), 
-			&KTunnelingType, 
-			iUiConn->GetTunnelingType());
-	}	
-	else if (iUiConn->GetEapType() == eap_type_ttls || iUiConn->GetEapType() == eap_type_ttls_plain_pap)
-	{
-		sqlStatement.Format(
-			KSQL, 
-			&KTtlsAllowedUserCertsDatabaseTableName, 
-			&KServiceType, 
-			iUiConn->GetIndexType(), 
-			&KServiceIndex,
-			iUiConn->GetIndex(), 
-			&KTunnelingType, 
-			iUiConn->GetTunnelingType());
-	}
-	
-#ifdef USE_FAST_EAP_TYPE	
-	else if (iUiConn->GetEapType() == eap_type_fast)
-	{
-		sqlStatement.Format(
-			KSQL, 
-			&KFastAllowedUserCertsDatabaseTableName, 
-			&KServiceType, 
-			iUiConn->GetIndexType(), 
-			&KServiceIndex,
-			iUiConn->GetIndex(), 
-			&KTunnelingType, 
-			iUiConn->GetTunnelingType());
-	}
-#endif //#ifdef USE_FAST_EAP_TYPE	
-
-	RDbView view;	
-	User::LeaveIfError(view.Prepare(iDatabase, TDbQuery(sqlStatement), TDbWindow::EUnlimited));	
-	CleanupClosePushL(view);
-	User::LeaveIfError(view.EvaluateAll());
-
-	// Get column set so we get the correct column numbers
-	CDbColSet* colSet;
-	colSet = view.ColSetL();
-	CleanupStack::PushL(colSet);
-
-	// Delete old rows
-	if (view.FirstL())
-	{		
-		do {
-			view.DeleteL();
-		} while (view.NextL() != EFalse);
-	}
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCertificates::UpdateL - About to update cert details in the DB - User cert count=%d \n"),
-	iUserCerts->Count()));
-	
-	TInt i(0);
-	for (i = 0; i < iUserCerts->Count(); i++)
-	{
-		if ((*iUserCerts)[i].iIsEnabled)
-		{
-			// Validate data lengths.
-			if((*iUserCerts)[i].iCertEntry.iLabel.Length() > KMaxCertLabelLengthInDB 
-				|| (*iUserCerts)[i].iCertEntry.iSubjectKeyId.Length() > KMaxSubjectKeyIdLengthInDB)
-			{
-				// Too long data. Can not be stored in DB.
-
-				EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCertificates::UpdateL: User : Too long Label or SubjectKeyId. Length: Label=%d, SubjectKeyId=%d \n"),
-				(*iUserCerts)[i].iCertEntry.iLabel.Length(), (*iUserCerts)[i].iCertEntry.iSubjectKeyId.Length()));
-								
-				User::Leave(KErrArgument);
-			}
-						
-			view.InsertL();
-			// Set the default values. The other three tables (certs, ca certs & cipher suites) are empty by default.
-			view.SetColL(colSet->ColNo(KServiceType), static_cast<TUint>(iUiConn->GetIndexType()));
-			view.SetColL(colSet->ColNo(KServiceIndex), static_cast<TUint>(iUiConn->GetIndex()));
-			view.SetColL(colSet->ColNo(KTunnelingType), static_cast<TUint>(iUiConn->GetTunnelingType()));
-			view.SetColL(colSet->ColNo(KCertLabel), (*iUserCerts)[i].iCertEntry.iLabel);
-			view.SetColL(colSet->ColNo(KSubjectKeyIdentifier), (*iUserCerts)[i].iCertEntry.iSubjectKeyId);
-			view.SetColL(colSet->ColNo(KActualSubjectKeyIdentifier), (*iUserCerts)[i].iCertEntry.iSubjectKeyId);
-			view.PutL();
-			
-			EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCertificates::UpdateL - Wrote User cert details to the DB - Label=%S \n"),
-			&((*iUserCerts)[i].iCertEntry.iLabel) ) );
-			
-			EAP_TRACE_DATA_DEBUG_SYMBIAN( ( "Subject Key Id:", (*iUserCerts)[i].iCertEntry.iSubjectKeyId.Ptr(), 
-			(*iUserCerts)[i].iCertEntry.iSubjectKeyId.Size() ) );			
-		}
-	}
-	
-	CleanupStack::PopAndDestroy(colSet);
-	CleanupStack::PopAndDestroy(); // view	
-	
-	// CA CERTIFICATES
-	_LIT(KSQL2, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	
-	if (iUiConn->GetEapType() == eap_type_tls)
-	{
-		sqlStatement.Format(
-			KSQL2, 
-			&KTlsAllowedCACertsDatabaseTableName, 
-			&KServiceType, 
-			iUiConn->GetIndexType(), 
-			&KServiceIndex,
-			iUiConn->GetIndex(), 
-			&KTunnelingType, 
-			iUiConn->GetTunnelingType());
-	}
-	else if (iUiConn->GetEapType() == eap_type_peap)
-	{
-		sqlStatement.Format(
-			KSQL2, 
-			&KPeapAllowedCACertsDatabaseTableName, 
-			&KServiceType, 
-			iUiConn->GetIndexType(), 
-			&KServiceIndex,
-			iUiConn->GetIndex(), 
-			&KTunnelingType, 
-			iUiConn->GetTunnelingType());
-	}	
-	else if (iUiConn->GetEapType() == eap_type_ttls || iUiConn->GetEapType() == eap_type_ttls_plain_pap)
-	{
-		sqlStatement.Format(
-			KSQL2, 
-			&KTtlsAllowedCACertsDatabaseTableName, 
-			&KServiceType, 
-			iUiConn->GetIndexType(), 
-			&KServiceIndex,
-			iUiConn->GetIndex(), 
-			&KTunnelingType, 
-			iUiConn->GetTunnelingType());
-	}
-
-#ifdef USE_FAST_EAP_TYPE
-	else if (iUiConn->GetEapType() == eap_type_fast)
-	{
-		sqlStatement.Format(
-			KSQL2, 
-			&KFastAllowedCACertsDatabaseTableName, 
-			&KServiceType, 
-			iUiConn->GetIndexType(), 
-			&KServiceIndex,
-			iUiConn->GetIndex(), 
-			&KTunnelingType, 
-			iUiConn->GetTunnelingType());
-	}	
-#endif // #ifdef USE_FAST_EAP_TYPE	
-			
-	User::LeaveIfError(view.Prepare(iDatabase, TDbQuery(sqlStatement), TDbWindow::EUnlimited));	
-	CleanupClosePushL(view);
-	User::LeaveIfError(view.EvaluateAll());
-
-	// Get column set so we get the correct column numbers
-	colSet = view.ColSetL();
-	CleanupStack::PushL(colSet);
-
-	// Delete old rows
-	if (view.FirstL())
-	{		
-		do {
-			view.DeleteL();
-		} while (view.NextL() != EFalse);
-	}
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCertificates::UpdateL - About to update cert details in the DB - CA cert count=%d \n"),
-	iCACerts->Count()));
-	
-	for (i = 0; i < iCACerts->Count(); i++)
-	{
-		if ((*iCACerts)[i].iIsEnabled)
-		{
-			// Validate data lengths.
-			if((*iCACerts)[i].iCertEntry.iLabel.Length() > KMaxCertLabelLengthInDB 
-				|| (*iCACerts)[i].iCertEntry.iSubjectKeyId.Length() > KMaxSubjectKeyIdLengthInDB)
-			{
-				// Too long data. Can not be stored in DB.
-
-				EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCertificates::UpdateL: CA : Too long Label or SubjectKeyId. Length: Label=%d, SubjectKeyId=%d \n"),
-				(*iCACerts)[i].iCertEntry.iLabel.Length(), (*iCACerts)[i].iCertEntry.iSubjectKeyId.Length()));
-				
-				User::Leave(KErrArgument);
-			}
-		
-			view.InsertL();
-			// Set the default values. The other three tables (certs, ca certs & cipher suites) are empty by default.
-			view.SetColL(colSet->ColNo(KServiceType), static_cast<TUint>(iUiConn->GetIndexType()));
-			view.SetColL(colSet->ColNo(KServiceIndex), static_cast<TUint>(iUiConn->GetIndex()));
-			view.SetColL(colSet->ColNo(KTunnelingType), static_cast<TUint>(iUiConn->GetTunnelingType()));
-			view.SetColL(colSet->ColNo(KCertLabel), (*iCACerts)[i].iCertEntry.iLabel);
-			view.SetColL(colSet->ColNo(KSubjectKeyIdentifier), (*iCACerts)[i].iCertEntry.iSubjectKeyId);			
-			view.SetColL(colSet->ColNo(KActualSubjectKeyIdentifier), (*iCACerts)[i].iCertEntry.iSubjectKeyId);
-			view.PutL();
-
-			EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCertificates::UpdateL - Wrote CA cert details to the DB - Label=%S \n"),
-			&((*iCACerts)[i].iCertEntry.iLabel) ) );
-			
-			EAP_TRACE_DATA_DEBUG_SYMBIAN( ( "Subject Key Id:", (*iCACerts)[i].iCertEntry.iSubjectKeyId.Ptr(), 
-			(*iCACerts)[i].iCertEntry.iSubjectKeyId.Size() ) );
-		}
-	}
-	CleanupStack::PopAndDestroy(colSet);
-	CleanupStack::PopAndDestroy(); // view
-	
-	CleanupStack::PopAndDestroy(buf);
-}
-
+// ----------------------------------------------------------
 // End of file
--- a/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/src/EapTlsPeapUiCipherSuites.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/src/EapTlsPeapUiCipherSuites.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 13.1.2 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -30,26 +30,33 @@
 
 // INCLUDE FILES
 #include <e32base.h>
-#include "EapTlsPeapUtils.h"
+//#include "EapTlsPeapUtils.h"
 #include "EapTlsPeapDbParameterNames.h"
 #include "EapTlsPeapDbDefaults.h"
 #include <EapTlsPeapUiConnection.h>
 #include <EapTlsPeapUiCipherSuites.h>
 #include <EapTlsPeapUiCipherSuite.h>
+#include <EapTraceSymbian.h>
+#include <EapType.h>
 
-const TUint KMaxSqlQueryLength = 256;
+//const TUint KMaxSqlQueryLength = 256;
 
 CEapTlsPeapUiCipherSuites::CEapTlsPeapUiCipherSuites(CEapTlsPeapUiConnection * const aUiConn)
 : iIsOpened(EFalse)
 , iUiConn(aUiConn)
 , iDataPtr(NULL)
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCipherSuites::CEapTlsPeapUiCipherSuites()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiCipherSuites::CEapTlsPeapUiCipherSuites()\n"));
 }
 
 
 CEapTlsPeapUiCipherSuites::~CEapTlsPeapUiCipherSuites()
 {
-    if (iUiConn)
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCipherSuites::~CEapTlsPeapUiCipherSuites()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiCipherSuites::~CEapTlsPeapUiCipherSuites()\n"));
+
+	if (iUiConn)
     {
         Close();
         iUiConn = NULL;
@@ -59,16 +66,24 @@
 
 TInt CEapTlsPeapUiCipherSuites::Open()
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCipherSuites::Open()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiCipherSuites::Open()\n"));
+
     if (iIsOpened)
     {
         return KErrAlreadyExists;
     }
 
-    TInt err = iUiConn->GetDatabase(iDatabase);
+	TEapExpandedType aEapType(iUiConn->GetEapType());
+
+    TRAPD(err, iEapTypeConnection = CEapType::NewL(iUiConn->GetIndexType(), iUiConn->GetIndex(), aEapType));
     if (err != KErrNone)
-    {
+        {
+        EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: CEapTlsPeapUiCipherSuites::Open() CEapType::NewL err=%d\n"),err));
         return err;
-    }
+        }
+    
+    iEapTypeConnection->SetTunnelingType(iUiConn->GetTunnelingType());
 
     iIsOpened = ETrue;
 
@@ -76,8 +91,11 @@
 }
 
 
-TInt CEapTlsPeapUiCipherSuites::GetCipherSuites(CArrayFixFlat<TEapTlsPeapUiCipherSuite> ** aDataPtr)
+TInt CEapTlsPeapUiCipherSuites::GetCipherSuites(RPointerArray<TEapTlsPeapUiCipherSuite> ** aDataPtr)
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCipherSuites::GetCipherSuites()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiCipherSuites::GetCipherSuites()\n"));
+
     if (aDataPtr == NULL)
     {
         return KErrArgument;
@@ -91,19 +109,25 @@
     {
     	*aDataPtr = iDataPtr;
     	return KErrNone;
-    }
-    iDataPtr = new CArrayFixFlat<TEapTlsPeapUiCipherSuite>(8);
+	}
+
+    iDataPtr = new RPointerArray<TEapTlsPeapUiCipherSuite>(8);
     if (!iDataPtr)
     {
         return KErrNoMemory;
     }
     
-    TInt i(0);
-	while (available_cipher_suites[i] != 0)
+    TInt i_ind(0);
+	while (available_cipher_suites[i_ind] != 0)
 	{		
-		TEapTlsPeapUiCipherSuite tmp;
-		tmp.iCipherSuite = available_cipher_suites[i];
-		tmp.iIsEnabled = EFalse;
+		TEapTlsPeapUiCipherSuite * const tmp = new TEapTlsPeapUiCipherSuite;
+		if (tmp == 0)
+		{
+	        return KErrNoMemory;
+		}
+
+		tmp->SetCipherSuite(available_cipher_suites[i_ind]);
+		tmp->SetIsEnabled(EFalse);
 
 		TRAPD(err, iDataPtr->AppendL(tmp));
 		if (err != KErrNone)
@@ -111,19 +135,38 @@
 			return err;
 		}
 
-		i++;
+		i_ind++;
 	}
 		
-    
-
-    TRAPD(err, FetchDataL());
+    EAPSettings aSettings;
     
-    if (err != KErrNone)
-    {
-        delete iDataPtr;
-        return err;
-    }
+	TRAPD(error,iEapTypeConnection->GetConfigurationL(aSettings));
+	if (error)
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: CEapTlsPeapUiCipherSuites::GetCipherSuites() GetConfigurationL(): failed %d\n"), error));
+		return error;
+	}
+
+	if (aSettings.iCipherSuitesPresent)
+	{
+		TInt i_ind(0);
 
+		for (i_ind = 0; i_ind < aSettings.iCipherSuites.Count(); ++i_ind)
+		{
+			TUint aCipherSuite = aSettings.iCipherSuites[i_ind];
+			TInt j_ind(0);
+
+			for (j_ind = 0; j_ind < iDataPtr->Count(); j_ind++)
+			{
+				if ((*iDataPtr)[j_ind]->GetCipherSuite() == aCipherSuite)
+				{
+					(*iDataPtr)[j_ind]->SetIsEnabled(ETrue);
+					break;
+				}
+			}
+		}
+	}
+    
    	*aDataPtr = iDataPtr;
 
     return KErrNone;
@@ -132,105 +175,41 @@
 
 TInt CEapTlsPeapUiCipherSuites::Update()
 {
-	TRAPD(err, UpdateL());
-	return err;
-}
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCipherSuites::Update()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiCipherSuites::Update()\n"));
+
+	EAPSettings aSettings;
 
-void CEapTlsPeapUiCipherSuites::UpdateL()
-{
-	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
-	TPtr sqlStatement = buf->Des();
+	aSettings.iCipherSuitesPresent = ETrue;
 
-	// Form the query. Query everything.
-	_LIT(KSQLQuery, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-
-	if (iUiConn->GetEapType() == eap_type_tls)
+	TInt i_ind(0);
+	
+	for (i_ind = 0; i_ind < iDataPtr->Count(); i_ind++)
 	{
-		sqlStatement.Format(KSQLQuery,
-							&KTlsAllowedCipherSuitesDatabaseTableName,
-							&KServiceType,
-							iUiConn->GetIndexType(),
-							&KServiceIndex,
-							iUiConn->GetIndex(),
-							&KTunnelingType, 
-							iUiConn->GetTunnelingType());
-	}
-	else if (iUiConn->GetEapType() == eap_type_peap)
-	{
-		sqlStatement.Format(KSQLQuery,
-							&KPeapAllowedCipherSuitesDatabaseTableName,
-							&KServiceType,
-							iUiConn->GetIndexType(),
-							&KServiceIndex,
-							iUiConn->GetIndex(),
-							&KTunnelingType, 
-							iUiConn->GetTunnelingType());
-	}
-	else if (iUiConn->GetEapType() == eap_type_ttls || iUiConn->GetEapType() == eap_type_ttls_plain_pap)
-	{
-		sqlStatement.Format(KSQLQuery,
-							&KTtlsAllowedCipherSuitesDatabaseTableName,
-							&KServiceType,
-							iUiConn->GetIndexType(),
-							&KServiceIndex,
-							iUiConn->GetIndex(),
-							&KTunnelingType, 
-							iUiConn->GetTunnelingType());
+		if ((*iDataPtr)[i_ind]->GetIsEnabled())
+		{
+			TInt error = aSettings.iCipherSuites.Append((*iDataPtr)[i_ind]->GetCipherSuite());
+			if (error != KErrNone)
+			{
+				return error;
+			}
+		}
 	}
 
-#ifdef USE_FAST_EAP_TYPE
-	else if (iUiConn->GetEapType() == eap_type_fast)
-	{
-		sqlStatement.Format(KSQLQuery,
-							&KFastAllowedCipherSuitesDatabaseTableName,
-							&KServiceType,
-							iUiConn->GetIndexType(),
-							&KServiceIndex,
-							iUiConn->GetIndex(),
-							&KTunnelingType, 
-							iUiConn->GetTunnelingType());
-	}
-#endif //#ifdef USE_FAST_EAP_TYPE
-	
-	// Evaluate view
-	RDbView view;
-	User::LeaveIfError(view.Prepare(iDatabase, TDbQuery(sqlStatement)));
-	CleanupClosePushL(view);
-	User::LeaveIfError(view.EvaluateAll());	
+	TRAPD(error,iEapTypeConnection->SetConfigurationL(aSettings));
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiDataConnection::Update(): error = %d\n"),error));
 
-	// Delete old rows
-	if (view.FirstL())
-	{		
-		do {
-			view.DeleteL();
-		} while (view.NextL() != EFalse);
-	}	
+	return error;
+}
 
-	// Get column set so we get the correct column numbers
-	CDbColSet* colSet = view.ColSetL();
-	CleanupStack::PushL(colSet);
-	
-	TInt i(0);
-	
-	for (i = 0; i < iDataPtr->Count(); i++)
-	{
-		if (iDataPtr->At(i).iIsEnabled)
-		{
-			view.InsertL();			
-			view.SetColL(colSet->ColNo(KServiceType), static_cast<TUint>(iUiConn->GetIndexType()));
-			view.SetColL(colSet->ColNo(KServiceIndex), static_cast<TUint>(iUiConn->GetIndex()));
-			view.SetColL(colSet->ColNo(KTunnelingType), static_cast<TUint>(iUiConn->GetTunnelingType()));
-			view.SetColL(colSet->ColNo(KCipherSuite), static_cast<TUint>(iDataPtr->At(i).iCipherSuite));
-			view.PutL();
-		}
-	}
-	CleanupStack::PopAndDestroy(colSet);
-	CleanupStack::PopAndDestroy(); // view
-	CleanupStack::PopAndDestroy(buf);    
-}
+
 
 TInt CEapTlsPeapUiCipherSuites::Close()
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiCipherSuites::Close()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiCipherSuites::Close()\n"));
+
     if (iIsOpened == EFalse)
     {
         return KErrNone;
@@ -243,109 +222,4 @@
     return KErrNone;
 }
 
-
-void CEapTlsPeapUiCipherSuites::FetchDataL()
-{
-	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
-	TPtr sqlStatement = buf->Des();
-
-	// Form the query. Query everything.
-	_LIT(KSQLQuery, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-
-	if (iUiConn->GetEapType() == eap_type_tls)
-	{
-		sqlStatement.Format(KSQLQuery,
-							&KCipherSuite,
-							&KTlsAllowedCipherSuitesDatabaseTableName,
-							&KServiceType,
-							iUiConn->GetIndexType(),
-							&KServiceIndex,
-							iUiConn->GetIndex(),
-							&KTunnelingType, 
-							iUiConn->GetTunnelingType());
-	}
-	else if (iUiConn->GetEapType() == eap_type_peap)
-	{
-		sqlStatement.Format(KSQLQuery,
-							&KCipherSuite,
-							&KPeapAllowedCipherSuitesDatabaseTableName,
-							&KServiceType,
-							iUiConn->GetIndexType(),
-							&KServiceIndex,
-							iUiConn->GetIndex(),
-							&KTunnelingType, 
-							iUiConn->GetTunnelingType());
-	}
-	else if (iUiConn->GetEapType() == eap_type_ttls || iUiConn->GetEapType() == eap_type_ttls_plain_pap)
-	{
-		sqlStatement.Format(KSQLQuery,
-							&KCipherSuite,
-							&KTtlsAllowedCipherSuitesDatabaseTableName,
-							&KServiceType,
-							iUiConn->GetIndexType(),
-							&KServiceIndex,
-							iUiConn->GetIndex(),
-							&KTunnelingType, 
-							iUiConn->GetTunnelingType());
-	}
-
-#ifdef USE_FAST_EAP_TYPE
-	else if (iUiConn->GetEapType() == eap_type_fast)
-	{
-		sqlStatement.Format(KSQLQuery,
-							&KCipherSuite,
-							&KFastAllowedCipherSuitesDatabaseTableName,
-							&KServiceType,
-							iUiConn->GetIndexType(),
-							&KServiceIndex,
-							iUiConn->GetIndex(),
-							&KTunnelingType, 
-							iUiConn->GetTunnelingType());
-	}
-#endif //#ifdef USE_FAST_EAP_TYPE
-	
-	// Evaluate view
-	RDbView view;
-	User::LeaveIfError(view.Prepare(iDatabase, TDbQuery(sqlStatement)));
-	CleanupClosePushL(view);
-	User::LeaveIfError(view.EvaluateAll());	
-	
-	// Get column set so we get the correct column numbers
-	CDbColSet* colSet = view.ColSetL();
-	CleanupStack::PushL(colSet);
-
-	if (view.FirstL())
-	{		
-		do {
-			view.GetL();
-
-			switch (view.ColType(colSet->ColNo(KCipherSuite)))
-			{
-			case EDbColUint32:
-				{
-					// Find the corresponding cipher suite in the list
-					TInt j(0);
-					TUint id = view.ColUint(colSet->ColNo(KCipherSuite));
-					for (j = 0; j < iDataPtr->Count(); j++)
-					{
-						if (iDataPtr->At(j).iCipherSuite == id)
-						{
-							iDataPtr->At(j).iIsEnabled = ETrue;
-							break;
-						}
-					}
-				}
-				break;
-			default:
-				User::Leave(KErrArgument);
-			}
-		} while (view.NextL() != EFalse);
-	}
-	
-	CleanupStack::PopAndDestroy(colSet);					
-	
-	CleanupStack::PopAndDestroy(); // view
-    CleanupStack::PopAndDestroy(buf);
-}
-
 // End of file
--- a/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/src/EapTlsPeapUiConnection.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/src/EapTlsPeapUiConnection.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 24.1.2 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -27,137 +27,136 @@
 	#define EAP_FILE_NUMBER_DATE 1127594498 
 #endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
 
-#include "EapTlsPeapUtils.h"
+//#include "EapTlsPeapUtils.h"
 #include <EapTlsPeapUiConnection.h>
 #include <EapTlsPeapUiDataConnection.h>
 #include <EapTlsPeapUiCipherSuites.h>
 #include <EapTlsPeapUiEapTypes.h>
 #include <EapTlsPeapUiCertificates.h>
 #include <AbsEapTlsPeapUiCertificates.h>
-#include "eap_am_trace_symbian.h"
+#include "EapTraceSymbian.h"
 
 #ifdef USE_PAC_STORE
-#include "pac_store_db_symbian.h"
+#include "EapFastPacStore.h"
 #endif
 
+// ----------------------------------------------------------
+
 CEapTlsPeapUiConnection::CEapTlsPeapUiConnection(
     const TIndexType aIndexType,
     const TInt aIndex,
-    const TInt aTunnelingType,
-	const TInt aEapType)
+    const TEapExpandedType aTunnelingType,
+	const TEapExpandedType aEapType)
     : iIndexType(aIndexType)
     , iIndex(aIndex)
     , iTunnelingType(aTunnelingType)
     , iEapType(aEapType)
-    , iIsConnected(EFalse)
     , iDataConn(NULL)
     , iCipherSuites(NULL)
     , iEapTypes(NULL)
     , iCertificates(NULL)
     , iPacStoreDb(NULL)
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiConnection::CEapTlsPeapUiConnection()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiConnection::CEapTlsPeapUiConnection()\n"));
+
 }
 
+// ----------------------------------------------------------
 
 CEapTlsPeapUiConnection::~CEapTlsPeapUiConnection()
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiConnection::~CEapTlsPeapUiConnection()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiConnection::~CEapTlsPeapUiConnection()\n"));
+
 #ifdef USE_PAC_STORE
 	delete iPacStoreDb;
 #endif
 }
 
+// ----------------------------------------------------------
+
 TInt CEapTlsPeapUiConnection::Connect()
 {
-	if(iIsConnected)
-	{
-		// Already connected.
-		return KErrNone;
-	}
-	
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiConnection::Connect()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiConnection::Connect()\n"));
+
 	TRAPD(err, ConnectL());
 	if(err == KErrNone)
 	{
-		iIsConnected = ETrue;
 	}
 	
 	return err;
 }
 
+// ----------------------------------------------------------
+
 void CEapTlsPeapUiConnection::ConnectL()
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	eap_type_value_e tunnelingType(static_cast<eap_type_ietf_values_e>(iTunnelingType));
-	eap_type_value_e eapType(static_cast<eap_type_ietf_values_e>(iEapType));
-
-#else
-
-	eap_type_value_e tunnelingType = static_cast<eap_type_value_e>(iTunnelingType);
-	eap_type_value_e eapType = static_cast<eap_type_value_e>(iEapType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiConnection::ConnectL()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiConnection::ConnectL()\n"));
 
 #ifdef USE_PAC_STORE
 #ifdef USE_FAST_EAP_TYPE
 	
-	if(iEapType == eap_type_fast && iPacStoreDb == NULL)
+	if(iEapType == *EapExpandedTypeFast.GetType() && iPacStoreDb == NULL)
 	{
-		iPacStoreDb = CPacStoreDatabase::NewL();
+		EAP_TRACE_DEBUG_SYMBIAN(
+			(_L("CEapTlsPeapUiConnection::ConnectL() CEapFastPacStore::NewL()")));	
+		iPacStoreDb = CEapFastPacStore::NewL();
 		User::LeaveIfNull(iPacStoreDb);
 		
 		EAP_TRACE_DEBUG_SYMBIAN(
 			(_L("CEapTlsPeapUiConnection::Connect Created PAC store")));	
 		
 		iPacStoreDb->OpenPacStoreL();
-		iPacStoreDb->CreateDeviceSeed( NULL );
+
 		EAP_TRACE_DEBUG_SYMBIAN(
 			(_L("CEapTlsPeapUiConnection::Connect Opened PAC store")));	
+
+		iPacStoreDb->CreateDeviceSeedL();
+
+		EAP_TRACE_DEBUG_SYMBIAN(
+			(_L("CEapTlsPeapUiConnection::Connect Created device seed")));	
 	}
 	
 #endif	// End: #ifdef USE_FAST_EAP_TYPE
 #endif // End: 	#ifdef USE_PAC_STORE
 
-	// Open or create the databse where all the settings are stored.
-	EapTlsPeapUtils::OpenDatabaseL(
-		iDbNamedDatabase, 
-		iDbs, 
-		iIndexType,
-		iIndex, 
-		tunnelingType, 
-		eapType);
 }
 
+// ----------------------------------------------------------
 
 TInt CEapTlsPeapUiConnection::Close()
 {
-    if (iIsConnected)
-    {    	
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiConnection::Close()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiConnection::Close()\n"));
 
 #ifdef USE_PAC_STORE    	
 
 #ifdef USE_FAST_EAP_TYPE
 	
-		if(iEapType == eap_type_fast && iPacStoreDb != NULL)
-		{
-			iPacStoreDb->Close();
-		}
+	if(iEapType == *EapExpandedTypeFast.GetType()
+		&& iPacStoreDb != NULL)
+	{
+		delete iPacStoreDb;
+		iPacStoreDb = NULL;
+	}
+
 #endif	// End: #ifdef USE_FAST_EAP_TYPE		
 	
 #endif	// End: #ifdef USE_PAC_STORE
-	
-        iDbNamedDatabase.Close();
-        
-        iDbs.Close(); // Both the Dbs are closed and server can be closed now.
-    }
     
-    iIsConnected = EFalse;
-
     return KErrNone;
 }
 
+// ----------------------------------------------------------
 
 CEapTlsPeapUiDataConnection * CEapTlsPeapUiConnection::GetDataConnection()
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiConnection::GetDataConnection()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiConnection::GetDataConnection()\n"));
+
     if (!iDataConn)
     {
         iDataConn = new CEapTlsPeapUiDataConnection(this);
@@ -166,9 +165,13 @@
     return iDataConn;
 }
 
+// ----------------------------------------------------------
 
 CEapTlsPeapUiCipherSuites * CEapTlsPeapUiConnection::GetCipherSuiteConnection()
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiConnection::GetCipherSuiteConnection()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiConnection::GetCipherSuiteConnection()\n"));
+
     if (!iCipherSuites)
     {
         iCipherSuites = new CEapTlsPeapUiCipherSuites(this);
@@ -177,9 +180,13 @@
     return iCipherSuites;
 }
 	
-	
+// ----------------------------------------------------------
+
 CEapTlsPeapUiCertificates * CEapTlsPeapUiConnection::GetCertificateConnection(MEapTlsPeapUiCertificates * const aParent)
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiConnection::GetCertificateConnection()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiConnection::GetCertificateConnection()\n"));
+
     if (!iCertificates)
     {
         iCertificates = new CEapTlsPeapUiCertificates(this, aParent);
@@ -188,9 +195,14 @@
     return iCertificates;
 }
 	
-	
+// ----------------------------------------------------------
+
+
 CEapTlsPeapUiEapTypes * CEapTlsPeapUiConnection::GetEapTypeConnection()
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiConnection::GetEapTypeConnection()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiConnection::GetEapTypeConnection()\n"));
+
     if (!iEapTypes)
     {
         iEapTypes = new CEapTlsPeapUiEapTypes(this);
@@ -199,50 +211,60 @@
     return iEapTypes;
 }
 	
-	
-TInt CEapTlsPeapUiConnection::GetDatabase(RDbNamedDatabase & aDatabase)
-{
-    if (iIsConnected == EFalse)
-    {
-        return KErrSessionClosed;
-    }
-
-    aDatabase = iDbNamedDatabase;
-    return KErrNone;
-}
-
+// ----------------------------------------------------------
 
 TIndexType CEapTlsPeapUiConnection::GetIndexType()
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiConnection::GetIndexType()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiConnection::GetIndexType()\n"));
+
     return iIndexType;
 }
 
+// ----------------------------------------------------------
 
 TInt CEapTlsPeapUiConnection::GetIndex()
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiConnection::GetIndex()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiConnection::GetIndex()\n"));
+
     return iIndex;
 }
 
-TInt CEapTlsPeapUiConnection::GetTunnelingType()
+// ----------------------------------------------------------
+
+TEapExpandedType CEapTlsPeapUiConnection::GetTunnelingType()
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiConnection::GetTunnelingType()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiConnection::GetTunnelingType()\n"));
+
     return iTunnelingType;
 }
 
-TInt CEapTlsPeapUiConnection::GetEapType()
+// ----------------------------------------------------------
+
+TEapExpandedType CEapTlsPeapUiConnection::GetEapType()
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiConnection::GetEapType()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiConnection::GetEapType()\n"));
+
     return iEapType;
 }
 
+// ----------------------------------------------------------
 
 TBool CEapTlsPeapUiConnection::IsPacStoreMasterKeyPresentL()
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiConnection::IsPacStoreMasterKeyPresentL()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiConnection::IsPacStoreMasterKeyPresentL()\n"));
+
 	TBool status(EFalse);
 		
 #ifdef USE_FAST_EAP_TYPE	
 	
-	if(iEapType == eap_type_fast)
+	if(iEapType == *EapExpandedTypeFast.GetType())
 	{
-	    if (iIsConnected == EFalse)
+	    if (iPacStoreDb == 0)
 	    {
 	        User::Leave(KErrSessionClosed);
 	    }
@@ -266,13 +288,18 @@
 	return status;
 }
 
+// ----------------------------------------------------------
+
 TInt CEapTlsPeapUiConnection::DestroyPacStore()
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiConnection::DestroyPacStore()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiConnection::DestroyPacStore()\n"));
+
 #ifdef USE_FAST_EAP_TYPE
 	
-	if(iEapType == eap_type_fast)
+	if(iEapType == *EapExpandedTypeFast.GetType())
 	{
-	    if (iIsConnected == EFalse)
+	    if (iPacStoreDb == 0)
 	    {
 	        return KErrSessionClosed;
 	    }
@@ -288,13 +315,18 @@
 	}	
 }
 	
+// ----------------------------------------------------------
+
 TBool CEapTlsPeapUiConnection::VerifyPacStorePasswordL(
 	const TDesC& aPacStorePw)
 {
-	if(aPacStorePw.Size() <= 0)	
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiConnection::VerifyPacStorePasswordL()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiConnection::VerifyPacStorePasswordL()\n"));
+
+	if(aPacStorePw.Length() <= 0)	
 	{
 		EAP_TRACE_DEBUG_SYMBIAN(
-			(_L("CEapTlsPeapUiConnection::VerifyPacStorePasswordL: PAC store PW can not be EMPTY!")));				
+			(_L("ERROR: CEapTlsPeapUiConnection::VerifyPacStorePasswordL(): PAC store PW can not be EMPTY!")));				
 		
 		User::Leave(KErrArgument);
 	}
@@ -303,15 +335,15 @@
 		
 #ifdef USE_FAST_EAP_TYPE	
 	
-	if(iEapType == eap_type_fast)
+	if(iEapType == *EapExpandedTypeFast.GetType())
 	{
-	    if (iIsConnected == EFalse)
+	    if (iPacStoreDb == 0)
 	    {
 	        User::Leave(KErrSessionClosed);
 	    }
 	    
 		EAP_TRACE_DATA_DEBUG_SYMBIAN(
-		("CEapTlsPeapUiConnection::VerifyPacStorePasswordL:PW from caller (16bits)",
+		("CEapTlsPeapUiConnection::VerifyPacStorePasswordL(): PW from caller (16bits)",
 		aPacStorePw.Ptr(), 
 		aPacStorePw.Size()));
 		
@@ -320,7 +352,7 @@
 		pacStorePWPtr8.Copy(aPacStorePw);
 	    
 		EAP_TRACE_DATA_DEBUG_SYMBIAN(
-		("CEapTlsPeapUiConnection::VerifyPacStorePasswordL:PW used for masterkey verification (8bits)",
+		("CEapTlsPeapUiConnection::VerifyPacStorePasswordL(): PW used for masterkey verification (8bits)",
 		pacStorePWPtr8.Ptr(), 
 		pacStorePWPtr8.Size()));	    
 	    
@@ -333,7 +365,7 @@
 			// Password and master key are matching.
 			// Means, This is the password used to create the master key.
 			EAP_TRACE_DEBUG_SYMBIAN(
-				(_L("CEapTlsPeapUiConnection::VerifyPacStorePasswordL PAC store PW verified OK (true) \n")));				
+				(_L("CEapTlsPeapUiConnection::VerifyPacStorePasswordL(): PAC store PW verified OK (true) \n")));				
 		}
 	}
 	else
@@ -345,39 +377,44 @@
 	return status;
 }
 
+// ----------------------------------------------------------
+
 TInt CEapTlsPeapUiConnection::CreatePacStoreMasterKey(
 	const TDesC& aPacStorePw)
 {
-	if(aPacStorePw.Size() <= 0)	
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiConnection::CreatePacStoreMasterKey()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiConnection::CreatePacStoreMasterKey()\n"));
+
+	if(aPacStorePw.Length() <= 0)	
 	{
 		EAP_TRACE_DEBUG_SYMBIAN(
-			(_L("CEapTlsPeapUiConnection::CreatePacStoreMasterKey PAC store PW can not be EMPTY!")));				
+			(_L("ERROR: CEapTlsPeapUiConnection::CreatePacStoreMasterKey(): PAC store PW can not be EMPTY!")));				
 		
 		return KErrArgument;
 	}
 		
 #ifdef USE_FAST_EAP_TYPE	
 	
-	if(iEapType == eap_type_fast)
+	if(iEapType == *EapExpandedTypeFast.GetType())
 	{
-	    if (iIsConnected == EFalse)
+	    if (iPacStoreDb == 0)
 	    {
 	        return KErrSessionClosed;
 	    }
 	    
-	  TInt creationStatus(KErrNone);
+		TInt creationStatus(KErrNone);
 	  	  
 		EAP_TRACE_DATA_DEBUG_SYMBIAN(
-		("CEapTlsPeapUiConnection::CreatePacStoreMasterKey:PW from caller (16bits)",
-		aPacStorePw.Ptr(), 
-		aPacStorePw.Size()));
+			("CEapTlsPeapUiConnection::CreatePacStoreMasterKey(): PW from caller (16bits)",
+			aPacStorePw.Ptr(), 
+			aPacStorePw.Size()));
 		
 		HBufC8* pacStorePWBuf8 = NULL;
 		TRAPD(err, pacStorePWBuf8 = HBufC8::NewL(aPacStorePw.Size()));
 		if (err != KErrNone)
 		{
 			EAP_TRACE_DEBUG_SYMBIAN(
-				(_L("CEapTlsPeapUiConnection::CreatePacStoreMasterKey:Allocation failed\n")));
+				(_L("CEapTlsPeapUiConnection::CreatePacStoreMasterKey(): Allocation failed\n")));
 			return KErrNoMemory;
 		}
 		
@@ -385,24 +422,24 @@
 		pacStorePWPtr8.Copy(aPacStorePw);
 	    
 		EAP_TRACE_DATA_DEBUG_SYMBIAN(
-		("CEapTlsPeapUiConnection::CreatePacStoreMasterKey:PW used for masterkey creation (8bits)",
-		pacStorePWPtr8.Ptr(), 
-		pacStorePWPtr8.Size()));
+			("CEapTlsPeapUiConnection::CreatePacStoreMasterKey(): PW used for masterkey creation (8bits)",
+			pacStorePWPtr8.Ptr(), 
+			pacStorePWPtr8.Size()));
 		
-		TRAPD(err1, creationStatus = iPacStoreDb->CreateAndSaveMasterKeyL(pacStorePWPtr8));
+		TRAPD(error, creationStatus = iPacStoreDb->CreateAndSaveMasterKeyL(pacStorePWPtr8));
 	    
 		delete pacStorePWBuf8;
 		
-		if(err1 != KErrNone)
+		if(error != KErrNone)
 		{
 			EAP_TRACE_DEBUG_SYMBIAN(
-				(_L("CEapTlsPeapUiConnection::CreatePacStoreMasterKey:Creation failed %d\n"), err1));
+				(_L("CEapTlsPeapUiConnection::CreatePacStoreMasterKey(): Creation failed %d\n"), error));
 		}
 				
 		if (creationStatus == KErrNone)
 		{
 			EAP_TRACE_DEBUG_SYMBIAN(
-				(_L("CEapTlsPeapUiConnection::CreatePacStoreMasterKey Master key created OK\n")));				
+				(_L("CEapTlsPeapUiConnection::CreatePacStoreMasterKey(): Master key created OK\n")));				
 		}
 		return creationStatus;
 	}
@@ -413,19 +450,54 @@
 	}
 }
 
-CPacStoreDatabase * CEapTlsPeapUiConnection::GetPacStoreDb()
+// ----------------------------------------------------------
+
+void CEapTlsPeapUiConnection::GetPacStorePasswordL(
+	TDes8 & aPassword8)
 {
-#ifdef USE_FAST_EAP_TYPE
-	
-	if(iEapType == eap_type_fast)
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiConnection::GetPacStorePasswordL()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiConnection::GetPacStorePasswordL()\n"));
+
+#ifdef USE_FAST_EAP_TYPE	
+	if(iEapType == *EapExpandedTypeFast.GetType())
 	{
-	    return iPacStoreDb;
+		//iPacStoreDb->GetPacStorePasswordL(aPassword8);
 	}
 	else
 #endif	// End: #ifdef USE_FAST_EAP_TYPE		
 	{
-		return NULL;
-	}	
+		User::Leave(KErrNotSupported);
+	}
 }
 
+// ----------------------------------------------------------
+
+void CEapTlsPeapUiConnection::SetPacStorePasswordL(
+	const TDesC8 & aPassword8)
+{
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiConnection::SetPacStorePasswordL()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiConnection::SetPacStorePasswordL()\n"));
+
+	if(aPassword8.Length() <= 0)	
+	{
+		EAP_TRACE_DEBUG_SYMBIAN(
+			(_L("ERROR: CEapTlsPeapUiConnection::SetPacStorePasswordL(): PAC store PW can not be EMPTY!")));				
+		return;
+		//User::Leave(KErrArgument);
+	}
+
+#ifdef USE_FAST_EAP_TYPE	
+	if(iEapType == *EapExpandedTypeFast.GetType())
+	{
+		iPacStoreDb->SetPacStorePasswordL(aPassword8);
+	}
+	else
+#endif	// End: #ifdef USE_FAST_EAP_TYPE		
+	{
+		User::Leave(KErrNotSupported);
+	}
+}
+
+
+// ----------------------------------------------------------
 // End of file
--- a/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/src/EapTlsPeapUiDataConnection.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/src/EapTlsPeapUiDataConnection.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 36.1.2 %
+* %version: 54 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -28,19 +28,20 @@
 #endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
 
 #include <e32base.h>
-#include "EapTlsPeapUtils.h"
+//#include "EapTlsPeapUtils.h"
 #include "EapTlsPeapDbParameterNames.h"
 #include "EapTlsPeapDbDefaults.h"
 #include <EapTlsPeapUiConnection.h>
 #include <EapTlsPeapUiDataConnection.h>
 #include <EapTlsPeapUiTlsPeapData.h>
-#include "eap_am_trace_symbian.h"
+#include <EapTraceSymbian.h>
+#include <EapType.h>
 
 #ifdef USE_PAC_STORE
 #include "pac_store_db_symbian.h"
 #endif
 
-const TUint KMaxSqlQueryLength = 256;
+//const TUint KMaxSqlQueryLength = 256;
 
 // ---------------------------------------------------------
 // CEapTlsPeapUiDataConnection::CEapTlsPeapUiDataConnection()
@@ -49,10 +50,12 @@
 CEapTlsPeapUiDataConnection::CEapTlsPeapUiDataConnection(CEapTlsPeapUiConnection * aUiConn)
 : iIsOpened(EFalse)
 , iUiConn(aUiConn)
-, iColSet(NULL)
 , iDataPtr(NULL)
 , iFastSpecificColSet(NULL)
+, iEapTypeConnection(NULL)
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiDataConnection::CEapTlsPeapUiDataConnection()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiDataConnection::CEapTlsPeapUiDataConnection()\n"));
 }
 
 
@@ -62,11 +65,17 @@
 // 
 CEapTlsPeapUiDataConnection::~CEapTlsPeapUiDataConnection()
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiDataConnection::~CEapTlsPeapUiDataConnection()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiDataConnection::~CEapTlsPeapUiDataConnection()\n"));
+
     if (iUiConn)
     {
         Close();
         iUiConn = NULL;
     }
+
+	delete iEapTypeConnection;
+	iEapTypeConnection = 0;
 }
 
 
@@ -76,24 +85,29 @@
 // 
 TInt CEapTlsPeapUiDataConnection::Open()
 {
-	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiDataConnection::Open: Start EAP-Type=%d\n"),
-		iUiConn->GetEapType()));
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiDataConnection::Open(): Start EAP-Type=0xfe%06x%08x\n"),
+		iUiConn->GetEapType().GetVendorId(),
+		iUiConn->GetEapType().GetVendorType()));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiDataConnection::Open()\n"));
 
     if (iIsOpened)
     {
         return KErrAlreadyExists;
     }
 
-    TInt err = iUiConn->GetDatabase(iDatabase);
-    if (err != KErrNone)
-    {
-        return err;
-    }
+	TEapExpandedType aEapType(iUiConn->GetEapType());
+
+    TRAPD(error, iEapTypeConnection = CEapType::NewL(iUiConn->GetIndexType(), iUiConn->GetIndex(), aEapType));
+    if (error != KErrNone)
+        {
+        EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: CEapLeapUiDataConnection::Open() CEapType::NewL() error=%d\n"),error));
+        return error;
+        }
+    
+    iEapTypeConnection->SetTunnelingType(iUiConn->GetTunnelingType());
     
     iIsOpened = ETrue;
 
-	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiDataConnection::Open: End\n")));
-	
     return KErrNone;
 }
 
@@ -104,8 +118,10 @@
 // 
 TInt CEapTlsPeapUiDataConnection::GetData(CEapTlsPeapUiTlsPeapData ** aDataPtr)
 {
-	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiDataConnection::GetData: Start EAP-Type=%d\n"),
-		iUiConn->GetEapType()));
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiDataConnection::GetData(): Start EAP-Type=0xfe%06x%08x\n"),
+		iUiConn->GetEapType().GetVendorId(),
+		iUiConn->GetEapType().GetVendorType()));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiDataConnection::GetData()\n"));
 
     if (aDataPtr == NULL)
     {
@@ -115,7 +131,7 @@
     if (iIsOpened == EFalse)
     {
 		EAP_TRACE_DEBUG_SYMBIAN(
-			(_L("CEapTlsPeapUiDataConnection::GetData: Data Connection not opened\n")));
+			(_L("ERROR: CEapTlsPeapUiDataConnection::GetData(): Data Connection not opened\n")));
     
         return KErrSessionClosed;
     }
@@ -130,33 +146,191 @@
     if (!iDataPtr)
     {
 		EAP_TRACE_DEBUG_SYMBIAN(
-			(_L("CEapTlsPeapUiDataConnection::GetData: ERROR: NO MEMORY!\n")));    	
+			(_L("ERROR: CEapTlsPeapUiDataConnection::GetData(): NO MEMORY!\n")));
 		
         return KErrNoMemory;
     }
 
-    TRAPD(err, FetchDataL());
-    if (err != KErrNone)
-    {
-        delete iDataPtr;
-        iDataPtr = NULL;
-        
-        delete iColSet;
-        iColSet = NULL;
-        
-		delete iFastSpecificColSet;
-		iFastSpecificColSet = NULL;
-        
-        iView.Close();
-        iFastSpecificView.Close();
-        
-        return err;
-    }
+    EAPSettings aSettings;
+    
+	TRAPD(error,iEapTypeConnection->GetConfigurationL(aSettings));
+	if (error)
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: CEapTlsPeapUiDataConnection::GetData() GetConfigurationL(): failed %d\n"), error));
+		return error;
+	}
+
+	/**************** only for TTLS PAP ****************/
+
+	if ( iUiConn->GetEapType() == *EapExpandedTypeTtlsPap.GetType() )
+	{
+		if (aSettings.iShowPassWordPromptPresent)
+		{
+			if (aSettings.iShowPassWordPrompt)
+			{
+				*( iDataPtr->GetPapPasswordPrompt() ) = ETrue;
+			}
+			else
+			{
+				*( iDataPtr->GetPapPasswordPrompt() ) = EFalse;
+			}
+		}
+
+		if (aSettings.iUsernamePresent)
+		{
+			iDataPtr->GetPapUserName().Copy(aSettings.iUsername);
+		}
+
+		if (aSettings.iPasswordPresent)
+		{
+			iDataPtr->GetPapPassword().Copy(aSettings.iPassword);
+		}
+
+		return KErrNone;
+	}
+
+	// Get use manual username
+	if (aSettings.iUsernamePresent)
+	{
+	    *(iDataPtr->GetUseManualUsername()) = ETrue;
+		iDataPtr->GetManualUsername().Copy(aSettings.iUsername);
+	}
+	else
+	{
+		*(iDataPtr->GetUseManualUsername()) = EFalse;
+	}
+
+	// Get use manual realm
+	if (aSettings.iRealmPresent)
+	{
+	    *(iDataPtr->GetUseManualRealm()) = ETrue;
+		iDataPtr->GetManualRealm().Copy(aSettings.iRealm);
+	}
+	else
+	{
+		*(iDataPtr->GetUseManualRealm()) = EFalse;
+	}
+
+	// Get PEAP/TTLS versions
+	if (iUiConn->GetEapType() == *EapExpandedTypePeap.GetType()
+		|| iUiConn->GetEapType() == *EapExpandedTypeTtls.GetType()
+#ifdef USE_FAST_EAP_TYPE
+		|| iUiConn->GetEapType() == *EapExpandedTypeFast.GetType()
+#endif
+		)
+	{
+		if (aSettings.iPEAPVersionsPresent)
+		{
+			if (aSettings.iPEAPv0Allowed)
+			{
+				*(iDataPtr->GetAllowVersion0()) = ETrue;
+			}
+
+			if (aSettings.iPEAPv1Allowed)
+			{
+				*(iDataPtr->GetAllowVersion1()) = ETrue;
+			}
+
+			if (aSettings.iPEAPv2Allowed)
+			{
+				*(iDataPtr->GetAllowVersion2()) = ETrue;
+			}
+		}
+	}
+
+	if (aSettings.iUseIdentityPrivacyPresent)
+	{
+		if (aSettings.iUseIdentityPrivacy)
+		{
+			*(iDataPtr->GetTlsPrivacy()) = ETrue;
+		}
+		else
+		{
+			*(iDataPtr->GetTlsPrivacy()) = EFalse;
+		}
+	}
+
+#ifdef USE_FAST_EAP_TYPE
+	
+	EAP_TRACE_DEBUG_SYMBIAN((_L("Fetching EAP-FAST specific Special settings!\n")));
+
+	if(iUiConn->GetEapType() == *EapExpandedTypeFast.GetType())
+	{
+		// Get provisioning modes
+		if (aSettings.iAuthProvModeAllowedPresent)
+		{
+			if (aSettings.iAuthProvModeAllowed)
+			{
+				*(iDataPtr->GetAuthProvModeAllowed()) = ETrue;
+			}
+			else
+			{
+				*(iDataPtr->GetAuthProvModeAllowed()) = EFalse;
+			}
+		}
+
+		if (aSettings.iUnauthProvModeAllowedPresent)
+		{
+			if (aSettings.iUnauthProvModeAllowed)
+			{
+				*(iDataPtr->GetUnauthProvModeAllowed()) = ETrue;
+			}
+			else
+			{
+				*(iDataPtr->GetUnauthProvModeAllowed()) = EFalse;
+			}
+		}
+
+		if (aSettings.iShowPassWordPromptPresent)
+		{
+			if (aSettings.iShowPassWordPrompt)
+			{
+				*( iDataPtr->GetUsePacStorePasswordPrompt() ) = ETrue;
+			}
+			else
+			{
+				*( iDataPtr->GetUsePacStorePasswordPrompt() ) = EFalse;
+			}
+		}
+
+#ifdef USE_PAC_STORE
+
+		{
+			// Get PAC store Password
+			// PAC store password is in a different database, pac store db.
+			// We can use the PacStoreDbUtils to get the PAC store password.
+			
+			TBuf8<KMaxPasswordLengthInDB> tmpPacStorePw8;
+
+			TRAPD(err, iUiConn->GetPacStorePasswordL(tmpPacStorePw8));
+			if (err)
+				{
+				EAP_TRACE_DEBUG_SYMBIAN((_L("couldn't get GetPacStorePasswordL!\n")));
+				}	    	
+			
+			EAP_TRACE_DATA_DEBUG_SYMBIAN(
+				("CEapTlsPeapUiDataConnection::FetchDataL: PW from PAC store DB(8 bits)",
+				tmpPacStorePw8.Ptr(), 
+				tmpPacStorePw8.Size()));
+			
+			/***** Convert the 8 bit password to 16 bits for the UI ***************/	    
+			
+			iDataPtr->GetPacStorePassword().Copy(tmpPacStorePw8);  // This takes care of the conversion automatically.
+			
+			EAP_TRACE_DATA_DEBUG_SYMBIAN(
+				("CEapTlsPeapUiDataConnection::FetchDataL: PW to UI (16 bits)",
+				iDataPtr->GetPacStorePassword().Ptr(), 
+				iDataPtr->GetPacStorePassword().Size()));
+		}
+
+#endif // End: #ifdef USE_PAC_STORE
+
+	} // End: if(iUiConn->GetEapType() == *EapExpandedTypeFast.GetType())
+
+#endif // End: #ifdef USE_FAST_EAP_TYPE	
 
     *aDataPtr = iDataPtr;
 
-	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiDataConnection::GetData: End\n")));
-	
     return KErrNone;
 } // CEapTlsPeapUiDataConnection::GetData()
 
@@ -167,17 +341,19 @@
 // 
 TInt CEapTlsPeapUiDataConnection::Update()
 {
-	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiDataConnection::Update: Start EAP-Type=%d\n"),
-		iUiConn->GetEapType()));
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiDataConnection::Update(): Start EAP-Type=0xfe%06x%08x\n"),
+		iUiConn->GetEapType().GetVendorId(),
+		iUiConn->GetEapType().GetVendorType()));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiDataConnection::Update()\n"));
     
     // Do the length checks first.
 	// Check if length of username and realm are less than the max length possible in DB.
-	if(iDataPtr->GetManualUsername().Length() > KMaxManualUsernameLengthInDB
-		|| iDataPtr->GetManualRealm().Length() > KMaxManualRealmLengthInDB)
+	if(iDataPtr->GetManualUsername().Length() > KMaxUsernameLengthInDB
+		|| iDataPtr->GetManualRealm().Length() > KMaxRealmLengthInDB)
 	{
 		// Username or realm too long. Can not be stored in DB.
 		EAP_TRACE_DEBUG_SYMBIAN(
-			(_L("CEapTlsPeapUiDataConnection::Update: Too long username or realm. Length: UN=%d, Realm=%d\n"),
+			(_L("ERROR: CEapTlsPeapUiDataConnection::Update(): Too long username or realm. Length: UN=%d, Realm=%d\n"),
 			iDataPtr->GetManualUsername().Length(),
 			iDataPtr->GetManualRealm().Length()));
 		
@@ -185,26 +361,176 @@
 	}
 
 #ifdef USE_FAST_EAP_TYPE	
+
 	// Check the length of PAC store password.
-
 	if(iDataPtr->GetPacStorePassword().Size() > KMaxPasswordLengthInDB)
 	{
 		// PAC store password too long. Can not be stored in DB.
 		EAP_TRACE_DEBUG_SYMBIAN(
-			(_L("CEapTlsPeapUiDataConnection::Update: Too long PAC store PW. Size:%d\n"),
+			(_L("ERROR: CEapTlsPeapUiDataConnection::Update(): Too long PAC store PW. Size:%d\n"),
 			iDataPtr->GetPacStorePassword().Size()));
 		
 		return KErrOverflow;
 	}
 
 #endif 
+
+	EAPSettings aSettings;
+
+	if( iUiConn->GetEapType() == *EapExpandedTypeTtlsPap.GetType() )
+	{
+		/************** only for TTLS PAP **************/
+
+		aSettings.iShowPassWordPromptPresent = ETrue;
+
+		if (*(iDataPtr->GetPapPasswordPrompt()))
+		{
+			aSettings.iShowPassWordPrompt = ETrue;
+		}
+		else
+		{
+			aSettings.iShowPassWordPrompt = EFalse;
+		}
+
+		aSettings.iUsernamePresent = ETrue;
+		aSettings.iUsername.Copy(iDataPtr->GetPapUserName());
+
+		aSettings.iPasswordPresent = ETrue;
+		aSettings.iPassword.Copy(iDataPtr->GetPapPassword());
+
+	} // if( iUiConn->GetEapType() == *EapExpandedTypeTtlsPap.GetType() )
+	else
+	{
+		if (*(iDataPtr->GetUseManualUsername()))
+		{
+			aSettings.iUsernamePresent = ETrue;
+			aSettings.iUsername = iDataPtr->GetManualUsername();
+		}
+		else
+		{
+			aSettings.iUsernamePresent = EFalse;
+		}
+	}
+
+    if (*(iDataPtr->GetUseManualRealm()))
+    {
+		aSettings.iRealmPresent = ETrue;
+		aSettings.iRealm = iDataPtr->GetManualRealm();
+    }
+    else
+    {
+		aSettings.iRealmPresent = EFalse;
+    }
 	
-    TRAPD(err, UpdateDataL());
+	// PEAP/TTLS versions
+	if (iUiConn->GetEapType() == *EapExpandedTypePeap.GetType()
+		|| iUiConn->GetEapType() == *EapExpandedTypeTtls.GetType()
+#ifdef USE_FAST_EAP_TYPE	
+		|| iUiConn->GetEapType() == *EapExpandedTypeFast.GetType()
+#endif		
+		)
+	{
+		if (*(iDataPtr->GetAllowVersion0()))
+		{
+			aSettings.iPEAPv0Allowed = ETrue;
+		}
+
+		if (*(iDataPtr->GetAllowVersion1()))
+		{
+			aSettings.iPEAPv1Allowed = ETrue;
+		}
+
+		if (*(iDataPtr->GetAllowVersion2()))
+		{
+			aSettings.iPEAPv2Allowed = ETrue;
+		}
+	}	
+
+
+	// Update TLS Privacy
+	aSettings.iUseIdentityPrivacyPresent = ETrue;
 
-	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiDataConnection::Update: End, err=%d\n"),
-		err));    
+	if (*(iDataPtr->GetTlsPrivacy()))
+	{
+		aSettings.iUseIdentityPrivacy = ETrue;
+	}
+	else
+	{
+		aSettings.iUseIdentityPrivacy = EFalse;
+	}
+
+
+#ifdef USE_FAST_EAP_TYPE
+
+	if(iUiConn->GetEapType() == *EapExpandedTypeFast.GetType())
+	{
+		// Update Authentication modes
+		aSettings.iAuthProvModeAllowedPresent = ETrue;
+
+		if (*(iDataPtr->GetAuthProvModeAllowed()))
+		{
+			aSettings.iAuthProvModeAllowed = ETrue;
+		}
+		else
+		{
+			aSettings.iAuthProvModeAllowed = EFalse;
+		}
+
+		aSettings.iUnauthProvModeAllowedPresent = ETrue;
+
+		if (*(iDataPtr->GetUnauthProvModeAllowed()))
+		{
+			aSettings.iUnauthProvModeAllowed = ETrue;
+		}
+		else
+		{
+			aSettings.iUnauthProvModeAllowed = EFalse;
+		}
 
-	return err;
+		if (*(iDataPtr->GetUsePacStorePasswordPrompt()))
+		{
+			aSettings.iShowPassWordPrompt = ETrue;
+		}
+		else
+		{
+			aSettings.iShowPassWordPrompt = EFalse;
+		}
+
+#ifdef USE_PAC_STORE
+	    
+		// Update PAC store password.
+	    // PAC store password should be stored in a different database, pac store db.
+	    // We can use the UI connection to save the PAC store password.
+
+		EAP_TRACE_DATA_DEBUG_SYMBIAN(
+			("CEapTlsPeapUiDataConnection::UpdateDataL: PW from UI(16 bits)",
+			iDataPtr->GetPacStorePassword().Ptr(), 
+			iDataPtr->GetPacStorePassword().Size()));
+		
+		TBuf8<KMaxPasswordLengthInDB> tmpSetPacStorePw8;
+		tmpSetPacStorePw8.Copy(iDataPtr->GetPacStorePassword());		
+		
+		EAP_TRACE_DATA_DEBUG_SYMBIAN(
+			("CEapTlsPeapUiDataConnection::UpdateDataL: PW to PAC store DB(8 bits)",
+			tmpSetPacStorePw8.Ptr(), 
+			tmpSetPacStorePw8.Size()));
+
+	  TRAPD(err, iUiConn->SetPacStorePasswordL(tmpSetPacStorePw8));
+	  	  	    
+	  EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiDataConnection::Update(): SetPacStorePassword error = %d\n"),error));
+			    
+#endif // End: #ifdef USE_PAC_STORE	    
+	    
+	} // End: if(iUiConn->GetEapType() == *EapExpandedTypeFast.GetType())    
+    
+#endif // End: #ifdef USE_FAST_EAP_TYPE
+
+	TRAPD(error,iEapTypeConnection->SetConfigurationL(aSettings));
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiDataConnection::Update(): SetConfiguration error = %d\n"),error));
+
+	return error;
+
 } // CEapTlsPeapUiDataConnection::Update()
 
 
@@ -214,6 +540,9 @@
 // 
 TInt CEapTlsPeapUiDataConnection::Close()
 {
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiDataConnection::Close()\n")));
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapTlsPeapUiDataConnection::Close()\n"));
+
     if (iIsOpened == EFalse)
     {
         return KErrNone;
@@ -222,610 +551,13 @@
     delete iDataPtr;
     iDataPtr = NULL;
     
-    delete iColSet;
-    iColSet = NULL;
-
     delete iFastSpecificColSet;
     iFastSpecificColSet = NULL;
     
-    iView.Close();    
-    
-    iFastSpecificView.Close();
-
     iUiConn = NULL;
     
     return KErrNone;
 } // CEapTlsPeapUiDataConnection::Close()
 
-
 // ---------------------------------------------------------
-// CEapTlsPeapUiDataConnection::FetchDataL()
-// ---------------------------------------------------------
-// 
-void CEapTlsPeapUiDataConnection::FetchDataL()
-{
-	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiDataConnection::FetchDataL: Start EAP-Type=%d\n"),
-		iUiConn->GetEapType()));
-
-	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
-	TPtr sqlStatement = buf->Des();
-
-	// Form the general query for TLS, PEAP, TTLS and FAST. Query everything.
-	_LIT(KSQLQuery, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-
-	if (iUiConn->GetEapType() == eap_type_tls)
-	{
-		sqlStatement.Format(KSQLQuery,
-							&KTlsDatabaseTableName,
-							&KServiceType,
-							iUiConn->GetIndexType(),
-							&KServiceIndex,
-							iUiConn->GetIndex(),
-							&KTunnelingType, 
-							iUiConn->GetTunnelingType());
-	}
-	else if (iUiConn->GetEapType() == eap_type_peap)
-	{
-		sqlStatement.Format(KSQLQuery,
-							&KPeapDatabaseTableName,
-							&KServiceType,
-							iUiConn->GetIndexType(),
-							&KServiceIndex,
-							iUiConn->GetIndex(),
-							&KTunnelingType, 
-							iUiConn->GetTunnelingType());
-	}
-	else if (iUiConn->GetEapType() == eap_type_ttls || iUiConn->GetEapType() == eap_type_ttls_plain_pap)
-	{
-		sqlStatement.Format(KSQLQuery,
-							&KTtlsDatabaseTableName,
-							&KServiceType,
-							iUiConn->GetIndexType(),
-							&KServiceIndex,
-							iUiConn->GetIndex(),
-							&KTunnelingType, 
-							iUiConn->GetTunnelingType());
-	}
-	
-#ifdef USE_FAST_EAP_TYPE	
-	else if (iUiConn->GetEapType() == eap_type_fast)
-	{
-		// Unlike other EAP types, EAP-FAST has two settings tables. 
-		// General settings and special settings
-		
-		// This is for the General settings. The special settings are read below.
-		
-		sqlStatement.Format(KSQLQuery,
-							&KFastGeneralSettingsDBTableName,
-							&KServiceType,
-							iUiConn->GetIndexType(),
-							&KServiceIndex,
-							iUiConn->GetIndex(),
-							&KTunnelingType, 
-							iUiConn->GetTunnelingType());							
-	}	
-#endif
-	else
-	{
-		// Unknown EAP type
-		EAP_TRACE_DEBUG_SYMBIAN((_L("EAP-Type=%d - ERROR: Unknown EAP type!\n"),
-			iUiConn->GetEapType()));
-			
-		User::Leave(KErrNotSupported);
-	}	
-		
-	// Evaluate view
-	User::LeaveIfError(iView.Prepare(iDatabase, TDbQuery(sqlStatement)));
-	User::LeaveIfError(iView.EvaluateAll());
-		
-	// Get the first (and only) row
-	iView.FirstL();
-	iView.GetL();
-	
-	// Get column set so we get the correct column numbers
-	delete iColSet;
-	iColSet = NULL;
-	iColSet = iView.ColSetL();
-
-	// Start fetching the values
-
-	
-	/**************** only for TTLS PAP ****************/
-	
-	if ( iUiConn->GetEapType() == eap_type_ttls_plain_pap )
-		{
-		// Prompt password
-		TUint intValue = iView.ColUint( iColSet->ColNo(
-			cf_str_EAP_TLS_PEAP_ttls_pap_password_prompt_literal ) );
-	    if ( intValue == 0 )
-	        {
-	        *( iDataPtr->GetPapPasswordPrompt() ) = EFalse;
-	        }
-	    else
-	        {
-	        *( iDataPtr->GetPapPasswordPrompt() ) = ETrue;
-	        }
-
-		// username
-	    iDataPtr->GetPapUserName().Copy( iView.ColDes16( iColSet->ColNo(
-	    	cf_str_EAP_TLS_PEAP_ttls_pap_username_literal ) ) );
-
-		// password
-		iDataPtr->GetPapPassword().Copy( iView.ColDes16( iColSet->ColNo(
-			cf_str_EAP_TLS_PEAP_ttls_pap_password_literal ) ) );
-
-	    CleanupStack::PopAndDestroy(buf);
-
-		EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiDataConnection::FetchDataL: Return\n")));
-        return;
-		}
-		
-	// Get use manual username
-	TUint intValue = iView.ColUint(iColSet->ColNo(cf_str_EAP_TLS_PEAP_use_manual_username_literal));
-    if (intValue == 0)
-    {
-        *(iDataPtr->GetUseManualUsername()) = EFalse;
-    }
-    else
-    {
-        *(iDataPtr->GetUseManualUsername()) = ETrue;
-    }
-
-	// Get use manual realm
-	intValue = iView.ColUint(iColSet->ColNo(cf_str_EAP_TLS_PEAP_use_manual_realm_literal));
-    if (intValue == 0)
-    {
-        *(iDataPtr->GetUseManualRealm()) = EFalse;
-    }
-    else
-    {
-        *(iDataPtr->GetUseManualRealm()) = ETrue;
-    }
-
-	// Get Username
-    iDataPtr->GetManualUsername().Copy(iView.ColDes16(iColSet->ColNo(cf_str_EAP_TLS_PEAP_manual_username_literal)));
-
-	// Get Realm
-    iDataPtr->GetManualRealm().Copy(iView.ColDes16(iColSet->ColNo(cf_str_EAP_TLS_PEAP_manual_realm_literal)));
-
-	// Get PEAP/TTLS versions
-	if (iUiConn->GetEapType() == eap_type_peap
-		|| iUiConn->GetEapType() == eap_type_ttls
-#ifdef USE_FAST_EAP_TYPE
-		|| iUiConn->GetEapType() == eap_type_fast
-#endif
-		)
-	{
-		TPtrC8 binaryValue = iView.ColDes8(iColSet->ColNo(cf_str_EAP_TLS_PEAP_accepted_PEAP_versions_literal));
-	
-		const TInt* allowedVersions = reinterpret_cast<const TInt *>(binaryValue.Ptr());
-
-		TInt i;
-		for (i = 0; i < static_cast<TInt>(binaryValue.Length() / sizeof(TInt)); i++)
-		{
-			switch(allowedVersions[i])
-			{
-			case 0:
-				*(iDataPtr->GetAllowVersion0()) = ETrue;
-				break;
-			case 1:
-				*(iDataPtr->GetAllowVersion1()) = ETrue;
-				break;
-			case 2:
-				*(iDataPtr->GetAllowVersion2()) = ETrue;
-				break;		
-			}
-		}
-	}
-
-
-	intValue = iView.ColUint(iColSet->ColNo(cf_str_EAP_TLS_PEAP_use_identity_privacy_literal));
-
-    if (intValue == 0)
-    {
-        *(iDataPtr->GetTlsPrivacy()) = EFalse;
-    }
-    else
-    {
-        *(iDataPtr->GetTlsPrivacy()) = ETrue;
-    }
-
-	
-#ifdef USE_FAST_EAP_TYPE
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("Fetching EAP-FAST specific Special settings!\n")));
-
-	if(iUiConn->GetEapType() == eap_type_fast)
-	{		
-		// This is for the EAP-FAST specific Special settings.
-		
-		sqlStatement.Format(KSQLQuery,
-							&KFastSpecialSettingsDBTableName,
-							&KServiceType,
-							iUiConn->GetIndexType(),
-							&KServiceIndex,
-							iUiConn->GetIndex(),
-							&KTunnelingType, 
-							iUiConn->GetTunnelingType());
-							
-		// Evaluate view
-		User::LeaveIfError(iFastSpecificView.Prepare(iDatabase, TDbQuery(sqlStatement)));
-		User::LeaveIfError(iFastSpecificView.EvaluateAll());
-			
-		// Get the first (and only) row
-		iFastSpecificView.FirstL();
-		iFastSpecificView.GetL();
-		
-		// Get column set so we get the correct column numbers
-		delete iFastSpecificColSet;
-		iFastSpecificColSet = NULL;
-		iFastSpecificColSet = iFastSpecificView.ColSetL();
-
-		// Start fetching the values							
-	    // The below uses EAP-FAST Specific settings table. So use the specific view and colset.
-		
-		// Get provisioning modes
-		intValue = iFastSpecificView.ColUint(iFastSpecificColSet->ColNo(cf_str_EAP_FAST_allow_server_authenticated_provisioning_mode_literal));
-	    if (intValue == 0)
-	    {
-	        *(iDataPtr->GetAuthProvModeAllowed()) = EFalse;
-	    }
-	    else
-	    {
-	        *(iDataPtr->GetAuthProvModeAllowed()) = ETrue;
-	    }
-	
-		intValue = iFastSpecificView.ColUint(iFastSpecificColSet->ColNo(cf_str_EAP_FAST_allow_server_unauthenticated_provisioning_mode_ADHP_literal));
-	    if (intValue == 0)
-	    {
-	        *(iDataPtr->GetUnauthProvModeAllowed()) = EFalse;
-	    }
-	    else
-	    {
-	        *(iDataPtr->GetUnauthProvModeAllowed()) = ETrue;
-	    } 
-
-#ifdef USE_PAC_STORE	    
-		// Get PAC store Password
-	    // PAC store password is in a different database, pac store db.
-	    // We can use the PacStoreDbUtils to get the PAC store password.
-	    
-	    TBuf8<KMaxPasswordLengthInDB> tmpPacStorePw8;
-
-	    iUiConn->GetPacStoreDb()->GetPacStoreDataL(
-	    		cf_str_EAP_FAST_PAC_store_password_literal(),
-	    		tmpPacStorePw8);	    	
-	    
-		EAP_TRACE_DATA_DEBUG_SYMBIAN(
-		("CEapTlsPeapUiDataConnection::FetchDataL: PW from PAC store DB(8 bits)",
-		tmpPacStorePw8.Ptr(), 
-		tmpPacStorePw8.Size()));
-	    
-	    /***** Convert the 8 bit password to 16 bits for the UI ***************/	    
-	    
-		iDataPtr->GetPacStorePassword().Copy(tmpPacStorePw8);  // This takes care of the conversion automatically.
-		
-		EAP_TRACE_DATA_DEBUG_SYMBIAN(
-		("CEapTlsPeapUiDataConnection::FetchDataL: PW to UI (16 bits)",
-		iDataPtr->GetPacStorePassword().Ptr(), 
-		iDataPtr->GetPacStorePassword().Size()));
-		
-		/*****************TEST*************/
-
-#endif // End: #ifdef USE_PAC_STORE
-	    
-	} // End: if(iUiConn->GetEapType() == eap_type_fast)
-    
-#endif // End: #ifdef USE_FAST_EAP_TYPE	
-	
-    CleanupStack::PopAndDestroy(buf);
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiDataConnection::FetchDataL: End\n")));
-
-} // CEapTlsPeapUiDataConnection::FetchDataL()
-
-
-// ---------------------------------------------------------
-// CEapTlsPeapUiDataConnection::UpdateDataL()
-// ---------------------------------------------------------
-// 
-void CEapTlsPeapUiDataConnection::UpdateDataL()
-{
-	EAP_TRACE_DEBUG_SYMBIAN(
-		(_L("CEapTlsPeapUiDataConnection::UpdateDataL: Start\n")));
-	
-    iView.UpdateL();
-	
-    iView.SetColL(
-    	iColSet->ColNo(cf_str_EAP_TLS_PEAP_manual_username_literal),
-    	iDataPtr->GetManualUsername());
-
-    iView.SetColL(
-    	iColSet->ColNo(cf_str_EAP_TLS_PEAP_manual_realm_literal),
-    	iDataPtr->GetManualRealm());
-
-    if (*(iDataPtr->GetUseManualUsername()))
-    {
-        iView.SetColL(
-        	iColSet->ColNo(cf_str_EAP_TLS_PEAP_use_manual_username_literal),
-        	ETLSPEAPUseManualUsernameYes);
-    }
-    else
-    {
-        iView.SetColL(
-        	iColSet->ColNo(cf_str_EAP_TLS_PEAP_use_manual_username_literal),
-        	ETLSPEAPUseManualUsernameNo);
-    }
-	
-    if (*(iDataPtr->GetUseManualRealm()))
-    {
-        iView.SetColL(
-        	iColSet->ColNo(cf_str_EAP_TLS_PEAP_use_manual_realm_literal),
-        	ETLSPEAPUseManualRealmYes);
-    }
-    else
-    {
-        iView.SetColL(
-        	iColSet->ColNo(cf_str_EAP_TLS_PEAP_use_manual_realm_literal),
-        	ETLSPEAPUseManualRealmNo);
-    }
-	
-	// PEAP/TTLS versions
-	if (iUiConn->GetEapType() == eap_type_peap
-		|| iUiConn->GetEapType() == eap_type_ttls
-#ifdef USE_FAST_EAP_TYPE	
-		|| iUiConn->GetEapType() == eap_type_fast
-#endif		
-		)
-	{
-		TBuf8<KMaxPEAPVersionsStringLengthInDB> acceptedVersions;
-		
-		if (*(iDataPtr->GetAllowVersion0()))
-		{
-			TInt tmp(0);
-			acceptedVersions.Append(reinterpret_cast<const TUint8*>(&tmp), sizeof(TInt));
-		}
-		if (*(iDataPtr->GetAllowVersion1()))
-		{
-			TInt tmp(1);
-			acceptedVersions.Append(reinterpret_cast<const TUint8*>(&tmp), sizeof(TInt));
-		}
-		if (*(iDataPtr->GetAllowVersion2()))
-		{
-			TInt tmp(2);
-			acceptedVersions.Append(reinterpret_cast<const TUint8*>(&tmp), sizeof(TInt));
-		}
-
-		iView.SetColL(
-			iColSet->ColNo(cf_str_EAP_TLS_PEAP_accepted_PEAP_versions_literal),
-			acceptedVersions);
-	}	
-
-	// Last full authentication time should be made zero when EAP configurations are modified.
-	// This makes sure that the next authentication with this EAP would be full authentication
-	// instead of reauthentication even if the session is still valid.
-	
-	TPtrC lastFullAuthTimeString;
-
-	switch (iUiConn->GetEapType())
-	{
-	case eap_type_tls:
-		{
-			lastFullAuthTimeString.Set(KTLSLastFullAuthTime);
-		}
-		break;
-
-	case eap_type_peap:
-		{
-			lastFullAuthTimeString.Set(KPEAPLastFullAuthTime);
-		}
-		break;
-
-	case eap_type_ttls:
-		{
-			lastFullAuthTimeString.Set(KTTLSLastFullAuthTime);
-		}
-		break;
-
-#ifdef USE_FAST_EAP_TYPE	
-	case eap_type_fast:
-		{
-			lastFullAuthTimeString.Set(KFASTLastFullAuthTime);
-		}
-		break;
-#endif		
-
-	case eap_type_ttls_plain_pap:
-		{
-			lastFullAuthTimeString.Set( KTTLSPAPLastFullAuthTime );
-		}
-		break;
-
-	default:
-		{
-			// Should never happen. Don't return error here as this is just to reset the auth time only.
-			EAP_TRACE_DEBUG_SYMBIAN(
-				(_L("Session Validity: EAP-Type=%d - ERROR: Unknown EAP type!\n"),
-				iUiConn->GetEapType() ));
-		}
-	}
-	
-	iView.SetColL(
-		iColSet->ColNo(lastFullAuthTimeString),
-		default_FullAuthTime);
-
-	EAP_TRACE_DEBUG_SYMBIAN(
-		(_L("Session Validity: EAP-Type=%d, Resetting Full Auth Time since settings are modified\n"),
-		iUiConn->GetEapType() ));
-	
-
-	// Update TLS Privacy
-    if (*(iDataPtr->GetTlsPrivacy()))
-    	{
-    	iView.SetColL(
-    	iColSet->ColNo(cf_str_EAP_TLS_PEAP_use_identity_privacy_literal),
-        ETLSPEAPTLSPrivacyYes);
-        }
-        else
-        {
-        iView.SetColL(
-        iColSet->ColNo(cf_str_EAP_TLS_PEAP_use_identity_privacy_literal),
-        ETLSPEAPTLSPrivacyNo);
-        }
-	
-	
-
-	
-	/************** only for TTLS PAP **************/
-	
-	if( iUiConn->GetEapType() == eap_type_ttls_plain_pap )
-		{
-        // PAP user name
-        iView.SetColL( iColSet->ColNo( cf_str_EAP_TLS_PEAP_ttls_pap_username_literal ),
-        	iDataPtr->GetPapUserName() );
-        // PAP password
-        iView.SetColL( iColSet->ColNo( cf_str_EAP_TLS_PEAP_ttls_pap_password_literal ),
-        	iDataPtr->GetPapPassword() );
-        // PAP password prompt
-        if ( *( iDataPtr->GetPapPasswordPrompt() ) )
-            {
-            iView.SetColL( iColSet->ColNo( cf_str_EAP_TLS_PEAP_ttls_pap_password_prompt_literal ),
-            	EPapPasswordPromptOn );
-            }
-        else
-            {
-            iView.SetColL( iColSet->ColNo( cf_str_EAP_TLS_PEAP_ttls_pap_password_prompt_literal ),
-            	EPapPasswordPromptOff );
-            }
-    
-		} // if( iUiConn->GetEapType() == eap_type_ttls_plain_pap )
-
-	
-	
-	// Now put all the updated values in DB table.
-	iView.PutL();	
-
-#ifdef USE_FAST_EAP_TYPE
-
-	if(iUiConn->GetEapType() == eap_type_fast)
-	{
-		// Make the view ready for updation. This is important!
-	    iFastSpecificView.UpdateL();
-   	
-		// Update Authentication modes
-	    if (*(iDataPtr->GetAuthProvModeAllowed()))
-        {
-            iFastSpecificView.SetColL(
-            	iFastSpecificColSet->ColNo(cf_str_EAP_FAST_allow_server_authenticated_provisioning_mode_literal),
-            	EFASTAuthProvModeAllowedYes);
-        }
-        else
-        {
-            iFastSpecificView.SetColL(
-            	iFastSpecificColSet->ColNo(cf_str_EAP_FAST_allow_server_authenticated_provisioning_mode_literal),
-            	EFASTAuthProvModeAllowedNo);
-        }
-	    
-	    if (*(iDataPtr->GetUnauthProvModeAllowed()))
-        {
-            iFastSpecificView.SetColL(
-            	iFastSpecificColSet->ColNo(cf_str_EAP_FAST_allow_server_unauthenticated_provisioning_mode_ADHP_literal),
-            	EFASTUnauthProvModeAllowedYes);
-        }
-        else
-        {
-            iFastSpecificView.SetColL(
-            	iFastSpecificColSet->ColNo(cf_str_EAP_FAST_allow_server_unauthenticated_provisioning_mode_ADHP_literal),
-            	EFASTUnauthProvModeAllowedNo);
-        }
-	    
-	   	// Now put all the updated values in DB table.
-		iFastSpecificView.PutL();	    
-	
-	    
-#ifdef USE_PAC_STORE
-	    
-		// Update PAC store password.
-	    // PAC store password should be stored in a different database, pac store db.
-	    // We can use the UI connection to save the PAC store password.
-
-		EAP_TRACE_DATA_DEBUG_SYMBIAN(
-		("CEapTlsPeapUiDataConnection::UpdateDataL: PW from UI(16 bits)",
-		iDataPtr->GetPacStorePassword().Ptr(), 
-		iDataPtr->GetPacStorePassword().Size()));
-		
-		TBuf8<KMaxPasswordLengthInDB> tmpSetPacStorePw8;
-		tmpSetPacStorePw8.Copy(iDataPtr->GetPacStorePassword());		
-		
-		EAP_TRACE_DATA_DEBUG_SYMBIAN(
-		("CEapTlsPeapUiDataConnection::UpdateDataL: PW to PAC store DB(8 bits)",
-		tmpSetPacStorePw8.Ptr(), 
-		tmpSetPacStorePw8.Size()));
-
-	    iUiConn->GetPacStoreDb()->SetPacStoreDataL(
-	    	cf_str_EAP_FAST_PAC_store_password_literal(),
-	    	tmpSetPacStorePw8);	    
-			    
-/*****************TEST*************/
-	    
-#ifdef   PAC_STORE_DATA_HACK
-
-		TBuf<4> tmpSetPacStoreData1;
-		TBuf<4> tmpSetPacStoreData2;
-		TBuf<4> tmpSetPacStoreData3;
-		TBuf<4> tmpSetPacStoreData4;
-		TBuf<4> tmpSetPacStoreData5;
-		TBuf<4> tmpSetPacStoreData6;
-		RArray<SInfoEntry> infoarray1;
-		RArray<SInfoEntry> infoarray2;
-
-		tmpSetPacStoreData1.Copy(iDataPtr->GetUsePAC_Store_Group_Reference());		
-		tmpSetPacStoreData2.Copy(iDataPtr->GetUsePAC_Store_Group_Value());		
-		tmpSetPacStoreData3.Copy(iDataPtr->GetUsePAC_Store_AID_Reference());		
-		tmpSetPacStoreData4.Copy(iDataPtr->GetUsePAC_Store_AID_Value());		
-		tmpSetPacStoreData6.Copy(iDataPtr->GetUsePAC_Store_PAC_Reference());		
-		tmpSetPacStoreData6.Copy(iDataPtr->GetUsePAC_Store_PAC_Value());		
-		
-			EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiDataConnection::UpdateDataL: tmpSetPacStoreData=%S\n"),
-					&tmpSetPacStorePw));
-
-	    iUiConn->GetPacStoreDb()->SetPacStoreDataL(
-	    		KPacStoreGroupReference,
-	    		tmpSetPacStoreData1,
-	    		KPacStoreGroupReference);	    
-	    iUiConn->GetPacStoreDb()->SetPacStoreDataL(
-	    		KPacStoreGroupValue,
-	    		tmpSetPacStoreData2,
-	    		KPacStoreGroupReference);	    
-	    iUiConn->GetPacStoreDb()->SetPacStoreDataL(
-	    		KPacStoreAIDReference,
-	    		tmpSetPacStoreData3,
-	    		KPacStoreAIDReference);	    
-	    iUiConn->GetPacStoreDb()->SetPacStoreDataL(
-	    		KPacStoreAIDValue,
-	    		tmpSetPacStoreData4,
-	    		KPacStoreAIDReference);	    
-	    iUiConn->GetPacStoreDb()->SetPacStoreDataL(
-	    		KPacStorePACReference,
-	    		tmpSetPacStoreData5,
-	    		KPacStorePACValue);	    
-	    iUiConn->GetPacStoreDb()->SetPacStoreDataL(
-	    		KPacStorePACValue,
-	    		tmpSetPacStoreData6,
-	    		KPacStorePACReference);	    
-		
-#endif
-	    
-		/*****************TEST*************/	    
-	    
-#endif // End: #ifdef USE_PAC_STORE	    
-	    
-	} // End: if(iUiConn->GetEapType() == eap_type_fast)    
-    
-#endif // End: #ifdef USE_FAST_EAP_TYPE
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiDataConnection::UpdateDataL: End\n")));    
-
-} // CEapTlsPeapUiDataConnection::UpdateDataL()
-
 // End of file
--- a/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/src/EapTlsPeapUiEapTypes.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/src/EapTlsPeapUiEapTypes.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 16 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -30,11 +30,13 @@
 
 // INCLUDE FILES
 #include <e32base.h>
-#include "EapTlsPeapUtils.h"
+//#include "EapTlsPeapUtils.h"
 #include <EapTlsPeapUiConnection.h>
 #include <EapTlsPeapUiEapTypes.h>
 #include <EapTlsPeapUiEapType.h>
-#include "eap_am_trace_symbian.h"
+#include <EapTraceSymbian.h>
+#include "EapConversion.h"
+#include <EapType.h>
 
 const TUint KNumberOfSupportedEAPTypes = 10; //Now 10, including EAP-FAST & TTLS-PAP
 
@@ -42,17 +44,14 @@
 : iIsOpened(EFalse)
 , iUiConn(aUiConn)
 , iDataPtr(NULL)
+, iEapTypeConnection(NULL)
 {
 }
 
 
 CEapTlsPeapUiEapTypes::~CEapTlsPeapUiEapTypes()
 {
-    if (iUiConn)
-    {
-        Close();
-        iUiConn = NULL;
-    }
+    Close();
 }
 
 
@@ -63,49 +62,48 @@
         return KErrAlreadyExists;
     }
 
-    TInt err = iUiConn->GetDatabase(iDatabase);
-    if (err != KErrNone)
-    {
-        return err;
-    }
+	TEapExpandedType aEapType(iUiConn->GetEapType());
 
+	TRAPD(error, iEapTypeConnection = CEapType::NewL(iUiConn->GetIndexType(), iUiConn->GetIndex(), aEapType));
+	if (error != KErrNone)
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: CEapTlsPeapUiEapTypes::Open() CEapType::NewL() error=%d\n"),error));
+		return error;
+	}
+    
+    iEapTypeConnection->SetTunnelingType(iUiConn->GetTunnelingType());
+    
     iIsOpened = ETrue;
 
     return KErrNone;
 }
 
 
-TInt CEapTlsPeapUiEapTypes::GetEapTypes(CArrayFixFlat<TEapTlsPeapUiEapType> ** aDataPtr)
+TInt CEapTlsPeapUiEapTypes::GetEapTypes(RPointerArray<TEapTlsPeapUiEapType> ** aDataPtr)
 {
     if (aDataPtr == NULL)
     {
         return KErrArgument;
     }
-    if (iIsOpened == EFalse)
+
+	if (iIsOpened == EFalse)
     {
         return KErrSessionClosed;
     }
+
     if (iDataPtr != 0)
     {
     	*aDataPtr = iDataPtr;
     	return KErrNone;
     }
-    iDataPtr = new CArrayFixFlat<TEapTlsPeapUiEapType>(KNumberOfSupportedEAPTypes);
+
+    iDataPtr = new RPointerArray<TEapTlsPeapUiEapType>(KNumberOfSupportedEAPTypes);
     if (!iDataPtr)
     {
         return KErrNoMemory;
     }
 
-#ifdef USE_EAP_EXPANDED_TYPES
-
     TRAPD(err, FetchExpandedDataL());
-
-#else
-
-    TRAPD(err, FetchDataL());
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-        
     if (err != KErrNone)
     {
         delete iDataPtr;
@@ -121,56 +119,11 @@
 TInt CEapTlsPeapUiEapTypes::Update()
 {
 
-#ifdef USE_EAP_EXPANDED_TYPES
-
 	TRAPD(err, UpdateExpandedDataL());
 
-#else
-
-	TRAPD(err, UpdateL());
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
 	return err;
 }
 
-#ifndef USE_EAP_EXPANDED_TYPES
-
-void CEapTlsPeapUiEapTypes::UpdateL()
-{
-	TEapArray eapTypes;
-	TEap* eapTmp; 	
-	
-	TInt i(0);
-	
-	for(i = 0; i < iDataPtr->Count(); i++)
-	{
-		eapTmp = new (ELeave) TEap;
-		CleanupStack::PushL(eapTmp);
-		eapTmp->Enabled	= iDataPtr->At(i).iIsEnabled;
-		eapTmp->UID.Copy(iDataPtr->At(i).iEapType);
-		User::LeaveIfError(eapTypes.Append(eapTmp));
-		CleanupStack::Pop(eapTmp);
-	}	
-
-	TRAPD(err, EapTlsPeapUtils::SetEapDataL(
-			iDatabase, 
-			0, 
-			eapTypes, 
-			iUiConn->GetIndexType(),
-			iUiConn->GetIndex(),
-			static_cast<eap_type_value_e>(iUiConn->GetTunnelingType()),
-			static_cast<eap_type_value_e>(iUiConn->GetEapType())));
-
-	eapTypes.ResetAndDestroy();	
-	if (err != KErrNone)
-	{
-		User::Leave(err);
-	}
-}
-#endif // #ifndef USE_EAP_EXPANDED_TYPES
-
-
 TInt CEapTlsPeapUiEapTypes::Close()
 {
     if (iIsOpened == EFalse)
@@ -182,217 +135,158 @@
     iDataPtr = 0;
 		
     iUiConn = NULL;
+
+	if (iEapTypeConnection)
+	{
+		delete iEapTypeConnection;
+		iEapTypeConnection = 0;
+	}
+
+	iIsOpened = EFalse;
+
     return KErrNone;
 }
 
-#ifndef USE_EAP_EXPANDED_TYPES
-
-void CEapTlsPeapUiEapTypes::FetchDataL()
-{		
-	TEapArray eapTypes;
-	
-	TRAPD(err, EapTlsPeapUtils::GetEapDataL(
-			iDatabase, 
-			0, 
-			eapTypes, 
-			iUiConn->GetIndexType(), 
-			iUiConn->GetIndex(), 
-			static_cast<eap_type_value_e>(iUiConn->GetTunnelingType()),
-			static_cast<eap_type_value_e>(iUiConn->GetEapType())));
-
-	if (err != KErrNone)
-	{
-		eapTypes.ResetAndDestroy();
-		User::Leave(err);
-	}
-	
-	TInt i(0);
-	for	(i = 0; i < eapTypes.Count(); i++)	
-	{
-		TEapTlsPeapUiEapType tmp;
-
-		tmp.iIsEnabled = eapTypes[i]->Enabled;
-		
-		tmp.iEapType.Copy(eapTypes[i]->UID);
-		
-		TRAPD(err, iDataPtr->AppendL(tmp));
-		if (err != KErrNone)
-		{
-			eapTypes.ResetAndDestroy();
-			User::Leave(err);
-		}
-	}
-	eapTypes.ResetAndDestroy();	
-}
-#endif // #ifndef USE_EAP_EXPANDED_TYPES
-
-#ifdef USE_EAP_EXPANDED_TYPES
-
 void CEapTlsPeapUiEapTypes::FetchExpandedDataL()
 {
 	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiEapTypes::FetchExpandedDataL: Start\n")));
 
-	RExpandedEapTypePtrArray enabledEAPTypes;
-	RExpandedEapTypePtrArray disabledEAPTypes;
-
-	eap_type_value_e tunnelingType(static_cast<eap_type_ietf_values_e>(iUiConn->GetTunnelingType()));
-	eap_type_value_e eapType(static_cast<eap_type_ietf_values_e>(iUiConn->GetEapType()));
-
-	TRAPD(err, EapTlsPeapUtils::GetTunnelingExpandedEapDataL(
-			iDatabase, 
-			0, 
-			enabledEAPTypes,
-			disabledEAPTypes, 
-			iUiConn->GetIndexType(), 
-			iUiConn->GetIndex(), 
-			tunnelingType,
-			eapType));
-
-	if (err != KErrNone)
+    EAPSettings aSettings;
+    
+	TRAPD(error,iEapTypeConnection->GetConfigurationL(aSettings));
+	if (error)
 	{
-		enabledEAPTypes.ResetAndDestroy();
-		disabledEAPTypes.ResetAndDestroy();
-		
-		EAP_TRACE_DEBUG_SYMBIAN(
-			(_L("CEapTlsPeapUiEapTypes::FetchExpandedDataL: Error from GetTunnelingExpandedEapDataL:%d\n"),
-			err));		
-		
-		User::Leave(err);
-	}
-	
-	EAP_TRACE_DEBUG_SYMBIAN(
-		(_L("CEapTlsPeapUiEapTypes::FetchExpandedDataL: Got tunneling EAPs from DB: enabled=%d,disabled=%d\n"),
-		enabledEAPTypes.Count(), disabledEAPTypes.Count()));		
-	
-	TInt i(0);
-	
-	// First fill the enabled EAP types.	
-	for	(i = 0; i < enabledEAPTypes.Count(); i++)	
-	{
-		TEapTlsPeapUiEapType tmpEAP;
-
-		tmpEAP.iIsEnabled = ETrue; // All EAP types here are enabled.
-		
-		tmpEAP.iEapType.Copy(enabledEAPTypes[i]->iExpandedEAPType);
-		
-		TRAPD(err, iDataPtr->AppendL(tmpEAP));
-		if (err != KErrNone)
-		{
-			enabledEAPTypes.ResetAndDestroy();
-			User::Leave(err);
-		}
-		
-		EAP_TRACE_DATA_DEBUG_SYMBIAN(("CEapTlsPeapUiEapTypes::FetchExpandedDataL:Appended ENABLED EAP type:",
-			tmpEAP.iEapType.Ptr(), 
-			tmpEAP.iEapType.Size() ) );		
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: CEapTlsPeapUiEapTypes::FetchExpandedDataL(): GetConfigurationL() failed %d\n"), error));
+		User::Leave(error);
 	}
 
-	// Now fill the disabled EAP types.	
-	for	(i = 0; i < disabledEAPTypes.Count(); i++)	
-	{
-		TEapTlsPeapUiEapType tmpEAP;
+	TInt i(0);
 
-		tmpEAP.iIsEnabled = EFalse; // All EAP types here are disabled.
-		
-		tmpEAP.iEapType.Copy(disabledEAPTypes[i]->iExpandedEAPType);
-		
-		TRAPD(err, iDataPtr->AppendL(tmpEAP));
-		if (err != KErrNone)
+	{
+		TEapExpandedType enabledEAPType(*EapExpandedTypeNone.GetType());
+
+		if (aSettings.iEnabledEncapsulatedEAPExpandedTypesPresent)
 		{
-			disabledEAPTypes.ResetAndDestroy();
-			User::Leave(err);
+			// First fill the enabled EAP types.	
+			for	(i = 0; i < aSettings.iEnabledEncapsulatedEAPExpandedTypes.Count(); i++)	
+			{
+				TEapTlsPeapUiEapType * tmpEAP = new (ELeave) TEapTlsPeapUiEapType;
+				if (tmpEAP == 0)
+				{
+					User::Leave(KErrNoMemory);
+				}
+
+				tmpEAP->SetIsEnabled(ETrue); // All EAP types here are enabled.
+				
+				tmpEAP->SetEapType(aSettings.iEnabledEncapsulatedEAPExpandedTypes[i]);
+				
+				TRAPD(err, iDataPtr->AppendL(tmpEAP));
+				if (err != KErrNone)
+				{
+					User::Leave(err);
+				}
+				
+				EAP_TRACE_DATA_DEBUG_SYMBIAN(("CEapTlsPeapUiEapTypes::FetchExpandedDataL(): Appended ENABLED EAP type:",
+					tmpEAP->GetEapType().GetValue().Ptr(), 
+					tmpEAP->GetEapType().GetValue().Length() ) );		
+			}
 		}
-		
-		EAP_TRACE_DATA_DEBUG_SYMBIAN(("CEapTlsPeapUiEapTypes::FetchExpandedDataL:Appended DISABLED EAP type:",
-			tmpEAP.iEapType.Ptr(), 
-			tmpEAP.iEapType.Size() ) );		
 	}
-	
-	enabledEAPTypes.ResetAndDestroy();		
-	disabledEAPTypes.ResetAndDestroy();
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiEapTypes::FetchExpandedDataL: End\n")));	
+
+	{
+		TEapExpandedType disabledEAPType(*EapExpandedTypeNone.GetType());
+
+		if (aSettings.iDisabledEncapsulatedEAPExpandedTypesPresent)
+		{
+			// Now fill the disabled EAP types.	
+			for	(i = 0; i < aSettings.iDisabledEncapsulatedEAPExpandedTypes.Count(); i++)	
+			{
+				TEapTlsPeapUiEapType * tmpEAP = new (ELeave) TEapTlsPeapUiEapType;
+				if (tmpEAP == 0)
+				{
+					User::Leave(KErrNoMemory);
+				}
+
+				tmpEAP->SetIsEnabled(EFalse); // All EAP types here are disabled.
+				
+				tmpEAP->SetEapType(aSettings.iDisabledEncapsulatedEAPExpandedTypes[i]);
+				
+				TRAPD(err, iDataPtr->AppendL(tmpEAP));
+				if (err != KErrNone)
+				{
+					User::Leave(err);
+				}
+				
+				EAP_TRACE_DATA_DEBUG_SYMBIAN(("CEapTlsPeapUiEapTypes::FetchExpandedDataL(): Appended DISABLED EAP type:",
+					tmpEAP->GetEapType().GetValue().Ptr(), 
+					tmpEAP->GetEapType().GetValue().Length() ) );		
+			}
+		}
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiEapTypes::FetchExpandedDataL(): End\n")));	
 }
 
 void CEapTlsPeapUiEapTypes::UpdateExpandedDataL()
 {
-	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiEapTypes::UpdateExpandedDataL: Start\n")));
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiEapTypes::UpdateExpandedDataL(): Start\n")));
 
-	RExpandedEapTypePtrArray enabledEAPTypes;
-	RExpandedEapTypePtrArray disabledEAPTypes;
-	SExpandedEAPType* expandedEAPTmp;
-	
+	if (iDataPtr == 0)
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiEapTypes::UpdateExpandedDataL(): iDataPtr == 0\n")));
+		User::Leave(KErrArgument);
+	}
+
+    EAPSettings aSettings;
+
 	for(TInt i=0 ; i < iDataPtr->Count(); i++)
 	{
-		expandedEAPTmp = new (ELeave) SExpandedEAPType;
-		CleanupStack::PushL(expandedEAPTmp);
-		
-		expandedEAPTmp->iExpandedEAPType.Copy(iDataPtr->At(i).iEapType);
-		
-		if(iDataPtr->At(i).iIsEnabled)
+		if ((*iDataPtr)[i] != 0)
 		{
-			// Enabled
-			TInt error = enabledEAPTypes.Append(expandedEAPTmp);
-
-			if (error != KErrNone)
+			TEapExpandedType expandedEAPTmp = (*iDataPtr)[i]->GetEapType();
+			
+			if((*iDataPtr)[i]->GetIsEnabled())
 			{
-				enabledEAPTypes.ResetAndDestroy();
-				disabledEAPTypes.ResetAndDestroy();
-				User::LeaveIfError(error);
-			}
-		
-			EAP_TRACE_DATA_DEBUG_SYMBIAN(("CEapTlsPeapUiEapTypes::UpdateExpandedDataL:Appended ENABLED EAP type:",
-				expandedEAPTmp->iExpandedEAPType.Ptr(), 
-				expandedEAPTmp->iExpandedEAPType.Size() ) );
-		}
-		else
-		{
-			// Disabled
-			TInt error = disabledEAPTypes.Append(expandedEAPTmp);
+				// Enabled
+				TInt error = aSettings.iEnabledEncapsulatedEAPExpandedTypes.Append(expandedEAPTmp);
 
-			if (error != KErrNone)
-			{
-				enabledEAPTypes.ResetAndDestroy();
-				disabledEAPTypes.ResetAndDestroy();
-				User::LeaveIfError(error);
-			}
+				if (error != KErrNone)
+				{
+					User::LeaveIfError(error);
+				}
+			
+				aSettings.iEnabledEncapsulatedEAPExpandedTypesPresent = ETrue;
 
-			EAP_TRACE_DATA_DEBUG_SYMBIAN(("CEapTlsPeapUiEapTypes::UpdateExpandedDataL:Appended DISABLED EAP type:",
-				expandedEAPTmp->iExpandedEAPType.Ptr(), 
-				expandedEAPTmp->iExpandedEAPType.Size() ) );
-		}
-		
-		CleanupStack::Pop(expandedEAPTmp);	
-	}	
+				EAP_TRACE_DATA_DEBUG_SYMBIAN(("CEapTlsPeapUiEapTypes::UpdateExpandedDataL(): Appended ENABLED EAP type:",
+					expandedEAPTmp.GetValue().Ptr(), 
+					expandedEAPTmp.GetValue().Size() ) );
+			}
+			else
+			{
+				// Disabled
+				TInt error = aSettings.iDisabledEncapsulatedEAPExpandedTypes.Append(expandedEAPTmp);
 
-	eap_type_value_e tunnelingType(static_cast<eap_type_ietf_values_e>(iUiConn->GetTunnelingType()));
-	eap_type_value_e eapType(static_cast<eap_type_ietf_values_e>(iUiConn->GetEapType()));
+				if (error != KErrNone)
+				{
+					User::LeaveIfError(error);
+				}
+
+				aSettings.iDisabledEncapsulatedEAPExpandedTypesPresent = ETrue;
 
-	TRAPD(err, EapTlsPeapUtils::SetTunnelingExpandedEapDataL(
-			iDatabase, 
-			0, 
-			enabledEAPTypes,
-			disabledEAPTypes, 
-			iUiConn->GetIndexType(),
-			iUiConn->GetIndex(),
-			tunnelingType,
-			eapType));
+				EAP_TRACE_DATA_DEBUG_SYMBIAN(("CEapTlsPeapUiEapTypes::UpdateExpandedDataL(): Appended DISABLED EAP type:",
+					expandedEAPTmp.GetValue().Ptr(), 
+					expandedEAPTmp.GetValue().Size() ) );
+			}
+		}
+	} // for()
 
-	enabledEAPTypes.ResetAndDestroy();
-	disabledEAPTypes.ResetAndDestroy();
-		
-	if (err != KErrNone)
-	{
-		EAP_TRACE_DEBUG_SYMBIAN(
-			(_L("CEapTlsPeapUiEapTypes::UpdateExpandedDataL: Error from SetTunnelingExpandedEapDataL:%d\n"),
-			err));		
+	TRAPD(error,iEapTypeConnection->SetConfigurationL(aSettings));
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiEapTypes::UpdateExpandedDataL(): error = %d\n"),error));
+
+	User::LeaveIfError(error);
 	
-		User::Leave(err);
-	}
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiEapTypes::UpdateExpandedDataL: End\n")));	
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapTlsPeapUiEapTypes::UpdateExpandedDataL(): End\n")));	
 }
-    
-#endif // #ifdef USE_EAP_EXPANDED_TYPES
 
 // End of file
--- a/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/src/EapTlsPeapUiTlsPeapData.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/src/EapTlsPeapUiTlsPeapData.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 14 %
+* %version: %
 */
 
 // This is enumeration of EAPOL source code.
@@ -34,7 +34,8 @@
 : iAllowVersion0(EFalse),
 iAllowVersion1(EFalse),
 iAllowVersion2(EFalse),
-iPapPasswordPrompt( ETrue )
+iPapPasswordPrompt( ETrue ),
+iPasswordPrompt(ETrue)
 {
 }
 
@@ -100,6 +101,11 @@
 	return iPacStorePassword;
 }
 
+TBool* CEapTlsPeapUiTlsPeapData::GetUsePacStorePasswordPrompt()
+{
+	return &iPasswordPrompt;
+}
+
 
 // ---------------------------------------------------------
 // CEapTlsPeapUiTlsPeapData::GetPapUserName()
--- a/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/src/EapTlsPeapUtils.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/type/tls_peap/symbian/plugin/src/EapTlsPeapUtils.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 76.1.1.1.5 %
+* %version: 125 %
 */
 
 // This is enumeration of EAPOL source code.
@@ -35,67 +35,69 @@
 #include <x500dn.h>
 #include <x509cert.h>
 #include <x509certext.h>
+#include <EapAutomatic.h>
+#include <EapPluginTools.h>
+#include "EapConversion.h"
 
 #ifdef USE_FAST_EAP_TYPE
 #include "pac_store_db_parameters.h"
 #endif //#ifdef USE_FAST_EAP_TYPE
 
-#include "eap_am_trace_symbian.h"
+#include <EapTraceSymbian.h>
+#include <EapPluginTools.h>
+
 #include "EapTlsPeapCertFetcher.h"
 
 const TUint KMaxSqlQueryLength = 2048;
 const TInt	KMicroSecsInAMinute = 60000000; // 60000000 micro seconds is 1 minute.
 const TInt	KDefaultColumnInView_One = 1; // For DB view.
 const TInt 	KMaxEapDbTableNameLength = 64;
+
 // ================= MEMBER FUNCTIONS =======================
 
 void EapTlsPeapUtils::OpenDatabaseL(
-	RDbNamedDatabase& aDatabase, 
-	RDbs& aSession, 
+	RDbNamedDatabase& aDatabase,
+	RFs& aFileServerSession,
 	const TIndexType aIndexType,
-	const TInt aIndex, 
+	const TInt aIndex,
 	const eap_type_value_e aTunnelingType,
 	eap_type_value_e aEapType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
 	EAP_TRACE_DEBUG_SYMBIAN(
-		(_L("EapTlsPeapUtils::OpenDatabaseL -Start- aIndexType=%d, aIndex=%d, Tunneling vendor type=%d, Eap vendor type=%d \n"),
-		aIndexType,aIndex, aTunnelingType.get_vendor_type(), aEapType.get_vendor_type()));
-#else
-
-	EAP_TRACE_DEBUG_SYMBIAN(
-		(_L("EapTlsPeapUtils::OpenDatabaseL -Start- aIndexType=%d, aIndex=%d, aTunnelingType=%d, aEapType=%d \n"),
-		aIndexType,aIndex, aTunnelingType, aEapType));
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
+		(_L("EapTlsPeapUtils::OpenDatabaseL(): - Start - aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x, aEapType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type(),
+		aEapType.get_vendor_id(),
+		aEapType.get_vendor_type()));
+
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapTlsPeapUtils::OpenDatabaseL()\n"));
 
 	if (aEapType == eap_type_tls)
 	{
-		OpenTlsDatabaseL(aDatabase, aSession, aIndexType, aIndex, aTunnelingType);
+		OpenTlsDatabaseL(aDatabase, aFileServerSession, aIndexType, aIndex, aTunnelingType);
 	} 
 	else if (aEapType == eap_type_peap)
 	{
-		OpenPeapDatabaseL(aDatabase, aSession, aIndexType, aIndex, aTunnelingType);
+		OpenPeapDatabaseL(aDatabase, aFileServerSession, aIndexType, aIndex, aTunnelingType);
 	} 
 #if defined(USE_TTLS_EAP_TYPE)
 	else if (aEapType == eap_type_ttls)
 	{
-		OpenTtlsDatabaseL(aDatabase, aSession, aIndexType, aIndex, aTunnelingType);
+		OpenTtlsDatabaseL(aDatabase, aFileServerSession, aIndexType, aIndex, aTunnelingType);
 	} 
 #endif // #if defined(USE_TTLS_EAP_TYPE)
 #if defined(USE_FAST_EAP_TYPE)
 	else if (aEapType == eap_type_fast)
 	{
-		OpenFastDatabaseL(aDatabase, aSession, aIndexType, aIndex, aTunnelingType);
+		OpenFastDatabaseL(aDatabase, aFileServerSession, aIndexType, aIndex, aTunnelingType);
 	} 
 #endif // #if defined(USE_FAST_EAP_TYPE)
-	
 	else if ( aEapType == eap_type_ttls_plain_pap )
-		{
-		OpenTtlsDatabaseL( aDatabase, aSession, aIndexType, aIndex, aTunnelingType);
-		}
-	
+	{
+		OpenTtlsDatabaseL( aDatabase, aFileServerSession, aIndexType, aIndex, aTunnelingType);
+	}
 	else
 	{
 		// Unsupported EAP type
@@ -103,141 +105,115 @@
 	}	
 } // EapTlsPeapUtils::OpenDatabaseL()
 
+// ---------------------------------------------------------
+
 void EapTlsPeapUtils::OpenTlsDatabaseL(
-		RDbNamedDatabase& aDatabase, 
-		RDbs& aSession, 
-		const TIndexType aIndexType, 
-		const TInt aIndex,
-		const eap_type_value_e aTunnelingType)
+	RDbNamedDatabase& aDatabase,
+	RFs& aFileServerSession,
+	const TIndexType aIndexType,
+	const TInt aIndex,
+	const eap_type_value_e aTunnelingType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
-
-#else
-
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
 	EAP_TRACE_DEBUG_SYMBIAN(
-		(_L("EapTlsPeapUtils::OpenTlsDatabaseL -Start- aIndexType=%d, aIndex=%d, Tunneling vendor type=%d \n"),
-		aIndexType,aIndex, aTunnelingVendorType));
+		(_L("EapTlsPeapUtils::OpenTlsDatabaseL(): - Start - aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type()));
+
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapTlsPeapUtils::OpenTlsDatabaseL()\n"));
 
 	// 1. Open/create a database	
 	
-	// Connect to the DBMS server.
-	User::LeaveIfError(aSession.Connect());		
-	CleanupClosePushL(aSession);	
-	// aSession and aDatabase are pushed to the cleanup stack even though they may be member
-	// variables of the calling class and would be closed in the destructor anyway. This ensures
-	// that if they are not member variables they will be closed. Closing the handle twice
-	// does no harm.	
-	
-#ifdef SYMBIAN_SECURE_DBMS
-	
-	// Create the secure shared database with the specified secure policy.
-	// Database will be created in the data caging path for DBMS (C:\private\100012a5).
-	
-	TInt err = aDatabase.Create(aSession, KTlsDatabaseName, KSecureUIDFormat);
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTlsDatabaseL - Created Secure DB for eaptls.dat. err=%d\n"), err) );
-	
-	if(err == KErrNone)
+	TInt error(KErrNone);
+	TFileName aPrivateDatabasePathName;
+
+	EapPluginTools::CreateDatabaseLC(
+		aDatabase,
+		aFileServerSession,
+		error,
+		KTlsDatabaseName,
+		aPrivateDatabasePathName);
+
+	if(error == KErrNone)
 	{
 		aDatabase.Close();
-		
-	} else if (err != KErrAlreadyExists) 
+	}
+	else if (error != KErrAlreadyExists) 
 	{
-		User::LeaveIfError(err);
+		User::LeaveIfError(error);
 	}
 	
-	User::LeaveIfError(aDatabase.Open(aSession, KTlsDatabaseName, KSecureUIDFormat));
-	CleanupClosePushL(aDatabase);		
-		
-#else
-	// For non-secured database. The database will be created in the old location (c:\system\data).
-	
-	RFs fsSession;		
-	User::LeaveIfError(fsSession.Connect());
-	CleanupClosePushL(fsSession);	
-	TInt err = aDatabase.Create(fsSession, KTlsDatabaseName);
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTlsDatabaseL - Created Non-Secure DB for eaptls.dat. err=%d\n"), err) );
-	
-	if(err == KErrNone)
-	{
-		aDatabase.Close();
-		
-	} else if (err != KErrAlreadyExists) 
-	{
-		User::LeaveIfError(err);
-	}
-	
-	User::LeaveIfError(aDatabase.Open(fsSession, KTlsDatabaseName));
-	
-	CleanupStack::PopAndDestroy(); // close fsSession
-	
-	CleanupClosePushL(aDatabase);		
-	    
-#endif // #ifdef SYMBIAN_SECURE_DBMS
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTlsDatabaseL(): - calls aDatabase.Open()\n")));
+
+	error = aDatabase.Open(aFileServerSession, aPrivateDatabasePathName);
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTlsDatabaseL(): - Opened private DB for EAP-TLS. error=%d\n"), error));
+
+	User::LeaveIfError(error);
 
 	// 2. Create the eaptls table to database (ignore error if exists)
 	
-// Table columns:
-//// NAME ////////////////////////////////////////// TYPE //////////// Constant ////////////////////
-//| ServiceType									| UNSIGNED INTEGER | KServiceType         |//
-//| ServiceIndex								| UNSIGNED INTEGER | KServiceIndex        |//
-//| TunnelingType								| UNSIGNED INTEGER | KTunnelingType		|//
-//| EAP_TLS_PEAP_use_manual_realm				| UNSIGNED INTEGER | cf_str_EAP_TLS_PEAP_use_manual_realm_literal      |//
-//| EAP_TLS_PEAP_manual_realm					| VARCHAR(255)     | cf_str_EAP_TLS_PEAP_manual_realm_literal				|//
-//| EAP_TLS_PEAP_use_manual_username			| UNSIGNED INTEGER | cf_str_EAP_TLS_PEAP_use_manual_username_literal   |//
-//| EAP_TLS_PEAP_manual_username				| VARCHAR(255)     | cf_str_EAP_TLS_PEAP_manual_username_literal			|//
-//| EAP_TLS_PEAP_cipher_suite					| UNSIGNED INTEGER | cf_str_EAP_TLS_PEAP_cipher_suite_literal	    |//
-//| EAP_TLS_server_authenticates_client			| UNSIGNED INTEGER | cf_str_TLS_server_authenticates_client_policy_in_client_literal |//
-//| CA_cert_label								| VARCHAR(255)     | KCACertLabelOld	    |//
-//| client_cert_label							| VARCHAR(255)     | KClientCertLabel	    |//
-//| EAP_TLS_PEAP_saved_session_id				| BINARY(32)       | cf_str_EAP_TLS_PEAP_saved_session_id_literal		    |//
-//| EAP_TLS_PEAP_saved_master_secret			| BINARY(48)       | cf_str_EAP_TLS_PEAP_saved_master_secret_literal	    |//
-//| EAP_TLS_PEAP_saved_cipher_suite				| UNSIGNED INTEGER | cf_str_EAP_TLS_PEAP_saved_cipher_suite_literal    |//
-//| EAP_TLS_PEAP_verify_certificate_realm		| UNSIGNED INTEGER | cf_str_EAP_TLS_PEAP_verify_certificate_realm_literal		    |//
-//| EAP_TLS_max_session_validity_time			| BIGINT	   	 	| cf_str_EAP_TLS_max_session_validity_time_literal   |//
-//| EAP_TLS_last_full_authentication_time		| BIGINT	   		| KTLSLastFullAuthTime	   	|//	
-//| EAP_TLS_PEAP_use_identity_privacy	    	| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_use_identity_privacy_literal|//
-///////////////////////////////////////////////////////////////////////////////////////////////////////////////	
+	// Table columns:
+	//// NAME ////////////////////////////////////////// TYPE //////////// Constant ////////////////////
+	//| ServiceType									| UNSIGNED INTEGER | KServiceType         |//
+	//| ServiceIndex								| UNSIGNED INTEGER | KServiceIndex        |//
+	//| TunnelingTypeVendorId                       | UNSIGNED INTEGER | KTunnelingTypeVendorId    |//
+	//| TunnelingType								| UNSIGNED INTEGER | KTunnelingType		|//
+	//| EAP_TLS_PEAP_use_manual_realm				| UNSIGNED INTEGER | cf_str_EAP_TLS_PEAP_use_manual_realm_literal      |//
+	//| EAP_TLS_PEAP_manual_realm					| VARCHAR(255)     | cf_str_EAP_TLS_PEAP_manual_realm_literal				|//
+	//| EAP_TLS_PEAP_use_manual_username			| UNSIGNED INTEGER | cf_str_EAP_TLS_PEAP_use_manual_username_literal   |//
+	//| EAP_TLS_PEAP_manual_username				| VARCHAR(255)     | cf_str_EAP_TLS_PEAP_manual_username_literal			|//
+	//| EAP_TLS_PEAP_cipher_suite					| UNSIGNED INTEGER | cf_str_EAP_TLS_PEAP_cipher_suite_literal	    |//
+	//| EAP_TLS_server_authenticates_client			| UNSIGNED INTEGER | cf_str_TLS_server_authenticates_client_policy_in_client_literal |//
+	//| CA_cert_label								| VARCHAR(255)     | KCACertLabelOld	    |//
+	//| client_cert_label							| VARCHAR(255)     | KClientCertLabel	    |//
+	//| EAP_TLS_PEAP_saved_session_id				| BINARY(32)       | cf_str_EAP_TLS_PEAP_saved_session_id_literal		    |//
+	//| EAP_TLS_PEAP_saved_master_secret			| BINARY(48)       | cf_str_EAP_TLS_PEAP_saved_master_secret_literal	    |//
+	//| EAP_TLS_PEAP_saved_cipher_suite				| UNSIGNED INTEGER | cf_str_EAP_TLS_PEAP_saved_cipher_suite_literal    |//
+	//| EAP_TLS_PEAP_verify_certificate_realm		| UNSIGNED INTEGER | cf_str_EAP_TLS_PEAP_verify_certificate_realm_literal		    |//
+	//| EAP_TLS_max_session_validity_time			| BIGINT           | cf_str_EAP_TLS_max_session_validity_time_literal   |//
+	//| EAP_TLS_last_full_authentication_time		| BIGINT           | KTLSLastFullAuthTime	   	|//	
+	//| EAP_TLS_PEAP_use_identity_privacy	    	| UNSIGNED INTEGER | cf_str_EAP_TLS_PEAP_use_identity_privacy_literal|//
+	//| EAP_TLS_PEAP_use_automatic_ca_certificate	| UNSIGNED INTEGER | cf_str_EAP_TLS_PEAP_use_automatic_ca_certificate_literal|//
+	///////////////////////////////////////////////////////////////////////////////////////////////////////////////	
 
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 	
 	// Table creation is divided into two parts because otherwise the SQL string would get too long
-	_LIT(KSQLCreateTable1, "CREATE TABLE %S (%S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S VARCHAR(%d),     \
-											 %S UNSIGNED INTEGER, \
-											 %S VARCHAR(%d),     \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S VARCHAR(%d),	  \
-											 %S VARCHAR(%d),     \
-											 %S BINARY(%d),		  \
-											 %S BINARY(%d),		  \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S BIGINT, \
-											 %S BIGINT, \
-											 %S UNSIGNED INTEGER)");
+	_LIT(KSQLCreateTable1, "CREATE TABLE %S \
+		(%S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S VARCHAR(%d),     \
+		 %S UNSIGNED INTEGER, \
+		 %S VARCHAR(%d),     \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S VARCHAR(%d),	  \
+		 %S VARCHAR(%d),     \
+		 %S BINARY(%d),		  \
+		 %S BINARY(%d),		  \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S BIGINT, \
+		 %S BIGINT, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER)");
 											 
 	sqlStatement.Format(KSQLCreateTable1,
 		&KTlsDatabaseTableName,
 		&KServiceType,
 		&KServiceIndex,
+		&KTunnelingTypeVendorId,
 		&KTunnelingType,
 		&cf_str_EAP_TLS_PEAP_use_manual_realm_literal,
-		&cf_str_EAP_TLS_PEAP_manual_realm_literal, KMaxManualRealmLengthInDB,
+		&cf_str_EAP_TLS_PEAP_manual_realm_literal, KMaxRealmLengthInDB,
 		&cf_str_EAP_TLS_PEAP_use_manual_username_literal,
-		&cf_str_EAP_TLS_PEAP_manual_username_literal, KMaxManualUsernameLengthInDB,
+		&cf_str_EAP_TLS_PEAP_manual_username_literal, KMaxUsernameLengthInDB,
 		&cf_str_EAP_TLS_PEAP_cipher_suite_literal, 
 		&cf_str_TLS_server_authenticates_client_policy_in_client_literal,
 		&KCACertLabelOld, KMaxCertLabelLengthInDB,
@@ -248,50 +224,56 @@
 		&cf_str_EAP_TLS_PEAP_verify_certificate_realm_literal,		
 		&cf_str_EAP_TLS_max_session_validity_time_literal,
 		&KTLSLastFullAuthTime,
-		&cf_str_EAP_TLS_PEAP_use_identity_privacy_literal);	
-	
-	err = aDatabase.Execute(sqlStatement);
-	if (err == KErrAlreadyExists)
+		&cf_str_EAP_TLS_PEAP_use_identity_privacy_literal,
+		&cf_str_EAP_TLS_PEAP_use_automatic_ca_certificate_literal);	
+	
+	error = aDatabase.Execute(sqlStatement);
+	if (error == KErrAlreadyExists)
 	{
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTlsDatabaseL - Alter Table err=%d\n"), err) );
-	_LIT( KColumnDef, "UNSIGNED INTEGER" );
-	AlterTableL( aDatabase, EAddColumn , KTlsDatabaseTableName,
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTlsDatabaseL - Alter Table error=%d\n"), error) );
+		_LIT( KColumnDef, "UNSIGNED INTEGER" );
+		AlterTableL( aDatabase, EAddColumn , KTlsDatabaseTableName,
 			cf_str_EAP_TLS_PEAP_use_identity_privacy_literal, KColumnDef);
 	}
-	else if (err != KErrNone)
-		{
-		User::Leave(err);
-		}
+	else if (error != KErrNone)
+	{
+		User::Leave(error);
+	}
 
 	// Create table for _allowed_ user certificates
 	
-//// NAME ////////////////// TYPE ////////////// Constant ///////////
-//| ServiceType			| UNSIGNED INTEGER | KServiceType        |//
-//| ServiceIndex		| UNSIGNED INTEGER | KServiceIndex       |//
-//| TunnelingType		| UNSIGNED INTEGER | KTunnelingType		|//
-//| CertLabel			| VARCHAR(255)     | KCertLabel        |//	
-//| SubjectKeyId		| BINARY(20)	   | KSubjectKeyIdentifier |// This is Symbian subjectkey id
-//| ActualSubjectKeyId  | BINARY(20)	   | KActualSubjectKeyIdentifier |// This is the actual subjectkeyid present in the certificate.
-//| SubjectName			| VARCHAR(255)     | KSubjectName        |//	
-//| IssuerName			| VARCHAR(255)     | KIssuerName        |//	
-//| SerialNumber		| VARCHAR(255)     | KSerialNumber        |//	
-//| Thumbprint			| BINARY(64)	   | KThumbprint        |//	
-//////////////////////////////////////////////////////////////////////////////////////////////////////	
-	
-	_LIT(KSQLCreateTable2, "CREATE TABLE %S (%S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S VARCHAR(%d), \
-											 %S BINARY(%d), \
-											 %S BINARY(%d), \
-											 %S VARCHAR(%d), \
-											 %S VARCHAR(%d), \
-											 %S VARCHAR(%d), \
-											 %S BINARY(%d))");											 
-											 
-	sqlStatement.Format(KSQLCreateTable2, &KTlsAllowedUserCertsDatabaseTableName, 
+	//// NAME ////////////////// TYPE ////////////// Constant ///////////
+	//| ServiceType			  | UNSIGNED INTEGER | KServiceType        |//
+	//| ServiceIndex		  | UNSIGNED INTEGER | KServiceIndex       |//
+	//| TunnelingTypeVendorId | UNSIGNED INTEGER | KTunnelingTypeVendorId    |//
+	//| TunnelingType		  | UNSIGNED INTEGER | KTunnelingType		|//
+	//| CertLabel			  | VARCHAR(255)     | KCertLabel        |//	
+	//| SubjectKeyId		  | BINARY(20)       | KSubjectKeyIdentifier |// This is Symbian subjectkey id
+	//| ActualSubjectKeyId    | BINARY(20)       | KActualSubjectKeyIdentifier |// This is the actual subjectkeyid present in the certificate.
+	//| SubjectName			  | VARCHAR(255)     | KSubjectName        |//	
+	//| IssuerName			  | VARCHAR(255)     | KIssuerName        |//	
+	//| SerialNumber		  | VARCHAR(255)     | KSerialNumber        |//	
+	//| Thumbprint			  | BINARY(64)       | KThumbprint        |//	
+	//////////////////////////////////////////////////////////////////////////////////////////////////////	
+	
+	_LIT(KSQLCreateTable2, "CREATE TABLE %S \
+		(%S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S VARCHAR(%d), \
+		 %S BINARY(%d), \
+		 %S BINARY(%d), \
+		 %S VARCHAR(%d), \
+		 %S VARCHAR(%d), \
+		 %S VARCHAR(%d), \
+		 %S BINARY(%d))");
+
+	sqlStatement.Format(KSQLCreateTable2,
+		&KTlsAllowedUserCertsDatabaseTableName, 
 		&KServiceType, 
 		&KServiceIndex, 
+		&KTunnelingTypeVendorId,
 		&KTunnelingType, 
 		&KCertLabel, KMaxCertLabelLengthInDB,
 		&KSubjectKeyIdentifier, KMaxSubjectKeyIdLengthInDB,
@@ -301,41 +283,46 @@
 		&KSerialNumber, KGeneralStringMaxLength,
 		&KThumbprint, KThumbprintMaxLength);
 				
-	err = aDatabase.Execute(sqlStatement);
-	if (err != KErrNone && err != KErrAlreadyExists)
+	error = aDatabase.Execute(sqlStatement);
+	if (error != KErrNone && error != KErrAlreadyExists)
 	{
-		User::Leave(err);
+		User::Leave(error);
 	}
 
 	// Create table for _allowed_ CA certs
 
-//// NAME ////////////////// TYPE ////////////// Constant ///////////
-//| ServiceType		    | UNSIGNED INTEGER | KServiceType        |//
-//| ServiceIndex		| UNSIGNED INTEGER | KServiceIndex       |//
-//| TunnelingType		| UNSIGNED INTEGER | KTunnelingType		|//
-//| CertLabel			| VARCHAR(255)     | KCACertLabel        |//	
-//| SubjectKeyId		| BINARY(255)	   | KSubjectKeyIdentifier |// This is Symbian subjectkey id
-//| ActualSubjectKeyId  | BINARY(20)	   | KActualSubjectKeyIdentifier |// This is the actual subjectkeyid present in the certificate.
-//| SubjectName			| VARCHAR(255)     | KSubjectName        |//	
-//| IssuerName			| VARCHAR(255)     | KIssuerName        |//	
-//| SerialNumber		| VARCHAR(255)     | KSerialNumber        |//	
-//| Thumbprint			| BINARY(64)	   | KThumbprint        |//	
-//////////////////////////////////////////////////////////////////////////////////////////////////////	
-
-	_LIT(KSQLCreateTable3, "CREATE TABLE %S (%S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S VARCHAR(%d), \
-											 %S BINARY(%d), \
-											 %S BINARY(%d), \
-											 %S VARCHAR(%d), \
-											 %S VARCHAR(%d), \
-											 %S VARCHAR(%d), \
-											 %S BINARY(%d))");											 
-											 
-	sqlStatement.Format(KSQLCreateTable3, &KTlsAllowedCACertsDatabaseTableName, 
+	//// NAME ////////////////// TYPE ////////////// Constant ///////////
+	//| ServiceType		      | UNSIGNED INTEGER | KServiceType        |//
+	//| ServiceIndex		  | UNSIGNED INTEGER | KServiceIndex       |//
+	//| TunnelingTypeVendorId | UNSIGNED INTEGER | KTunnelingTypeVendorId    |//
+	//| TunnelingType		  | UNSIGNED INTEGER | KTunnelingType		|//
+	//| CertLabel			  | VARCHAR(255)     | KCACertLabel        |//	
+	//| SubjectKeyId		  | BINARY(255)	     | KSubjectKeyIdentifier |// This is Symbian subjectkey id
+	//| ActualSubjectKeyId    | BINARY(20)	     | KActualSubjectKeyIdentifier |// This is the actual subjectkeyid present in the certificate.
+	//| SubjectName			  | VARCHAR(255)     | KSubjectName        |//	
+	//| IssuerName			  | VARCHAR(255)     | KIssuerName        |//	
+	//| SerialNumber		  | VARCHAR(255)     | KSerialNumber        |//	
+	//| Thumbprint			  | BINARY(64)	     | KThumbprint        |//	
+	//////////////////////////////////////////////////////////////////////////////////////////////////////	
+
+	_LIT(KSQLCreateTable3, "CREATE TABLE %S \
+		(%S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S VARCHAR(%d), \
+		 %S BINARY(%d), \
+		 %S BINARY(%d), \
+		 %S VARCHAR(%d), \
+		 %S VARCHAR(%d), \
+		 %S VARCHAR(%d), \
+		 %S BINARY(%d))");
+
+	sqlStatement.Format(KSQLCreateTable3,
+		&KTlsAllowedCACertsDatabaseTableName, 
 		&KServiceType, 
-		&KServiceIndex, 
+		&KServiceIndex,
+		&KTunnelingTypeVendorId,
 		&KTunnelingType, 
 		&KCertLabel, KMaxCertLabelLengthInDB,
 		&KSubjectKeyIdentifier, KMaxSubjectKeyIdLengthInDB,
@@ -345,44 +332,58 @@
 		&KSerialNumber, KGeneralStringMaxLength,
 		&KThumbprint, KThumbprintMaxLength);
 		
-	err = aDatabase.Execute(sqlStatement);
-	if (err != KErrNone && err != KErrAlreadyExists)
+	error = aDatabase.Execute(sqlStatement);
+	if (error != KErrNone && error != KErrAlreadyExists)
 	{
-		User::Leave(err);
+		User::Leave(error);
 	}
 
 	// Create table for allowed cipher suites
 
-//// NAME ///////////////// TYPE ////////////// Constant ///////////
-//| ServiceType			| UNSIGNED INTEGER | KServiceType        |//
-//| ServiceIndex		| UNSIGNED INTEGER | KServiceIndex       |//
-//| TunnelingType		| UNSIGNED INTEGER | KTunnelingType		|//
-//| CipherSuite			| UNSIGNED INTEGER | KCipherSuite        |//	
-//////////////////////////////////////////////////////////////////////////////////////////////////////	
-	
-	_LIT(KSQLCreateTable4, "CREATE TABLE %S (%S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER)");
-
-	sqlStatement.Format(KSQLCreateTable4, &KTlsAllowedCipherSuitesDatabaseTableName, 
+	//// NAME ///////////////// TYPE ////////////// Constant ///////////
+	//| ServiceType			  | UNSIGNED INTEGER | KServiceType        |//
+	//| ServiceIndex		  | UNSIGNED INTEGER | KServiceIndex       |//
+	//| TunnelingTypeVendorId | UNSIGNED INTEGER | KTunnelingTypeVendorId    |//
+	//| TunnelingType		  | UNSIGNED INTEGER | KTunnelingType		|//
+	//| CipherSuite			  | UNSIGNED INTEGER | KCipherSuite        |//	
+	//////////////////////////////////////////////////////////////////////////////////////////////////////	
+	
+	_LIT(KSQLCreateTable4, "CREATE TABLE %S \
+		(%S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER)");
+
+	sqlStatement.Format(KSQLCreateTable4,
+		&KTlsAllowedCipherSuitesDatabaseTableName, 
 		&KServiceType, 
-		&KServiceIndex, 
+		&KServiceIndex,
+		&KTunnelingTypeVendorId,
 		&KTunnelingType, 
 		&KCipherSuite);
-		
-	err = aDatabase.Execute(sqlStatement);
-	if (err != KErrNone && err != KErrAlreadyExists)
+
+	error = aDatabase.Execute(sqlStatement);
+	if (error != KErrNone && error != KErrAlreadyExists)
 	{
-		User::Leave(err);
+		User::Leave(error);
 	}
 	
 	// 4. Check if database table contains a row for this service type and id 
 		
-	_LIT(KSQLQueryRow, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	
-	sqlStatement.Format(KSQLQueryRow, &cf_str_EAP_TLS_PEAP_cipher_suite_literal, &KTlsDatabaseTableName, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);	
+	_LIT(KSQLQueryRow, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	
+	sqlStatement.Format(KSQLQueryRow,
+		&cf_str_EAP_TLS_PEAP_cipher_suite_literal,
+		&KTlsDatabaseTableName, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());	
 	
 	RDbView view;
 	User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement), TDbWindow::EUnlimited));
@@ -410,13 +411,14 @@
 		// Set the default values. The other three tables (certs, ca certs & cipher suites) are empty by default.
 		view.SetColL(colSet->ColNo(KServiceType), static_cast<TInt>(aIndexType));
 		view.SetColL(colSet->ColNo(KServiceIndex), aIndex);
-		view.SetColL(colSet->ColNo(KTunnelingType), aTunnelingVendorType);
+		view.SetColL(colSet->ColNo(KTunnelingTypeVendorId), aTunnelingType.get_vendor_id());
+		view.SetColL(colSet->ColNo(KTunnelingType), aTunnelingType.get_vendor_type());
 		
 		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_use_manual_realm_literal), default_EAP_TLS_PEAP_use_manual_realm);
-		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_manual_realm_literal), default_EAP_TLS_PEAP_manual_realm);
+		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_manual_realm_literal), default_EAP_realm);
 		
 		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_use_manual_username_literal), default_EAP_TLS_PEAP_use_manual_username);
-		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_manual_username_literal), default_EAP_TLS_PEAP_manual_username);
+		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_manual_username_literal), default_EAP_username);
 		
 		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_cipher_suite_literal), default_EAP_TLS_PEAP_cipher_suite);
 		
@@ -432,10 +434,13 @@
 		view.SetColL(colSet->ColNo(KTLSLastFullAuthTime), default_FullAuthTime);		
 
 		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_use_identity_privacy_literal), default_EAP_TLS_PEAP_TLS_Privacy);		
+
+		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_use_automatic_ca_certificate_literal), default_EAP_TLS_PEAP_use_automatic_ca_certificate);
+
 		view.PutL();
 
-		CleanupStack::PopAndDestroy( colSet ); // Delete colSet.		
-		CleanupStack::PopAndDestroy( &view ); // Close view.
+		CleanupStack::PopAndDestroy( colSet );
+		CleanupStack::PopAndDestroy( &view );
 		
 		// Add default disabled cipher suites
 		_LIT(KSQLInsert2, "SELECT * FROM %S");
@@ -453,7 +458,8 @@
 			view.InsertL();
 			view.SetColL(colSet->ColNo(KServiceType), static_cast<TInt>(aIndexType));
 			view.SetColL(colSet->ColNo(KServiceIndex), aIndex);			
-			view.SetColL(colSet->ColNo(KTunnelingType), aTunnelingVendorType);
+			view.SetColL(colSet->ColNo(KTunnelingTypeVendorId), aTunnelingType.get_vendor_id());
+			view.SetColL(colSet->ColNo(KTunnelingType), aTunnelingType.get_vendor_type());
 			view.SetColL(colSet->ColNo(KCipherSuite), default_allowed_cipher_suites[i]);
 			view.PutL();
 			i++;
@@ -476,156 +482,132 @@
 	tableName = KTlsAllowedCACertsDatabaseTableName;	
 	AddExtraCertColumnsL(aDatabase,tableName);
 	
-	CleanupStack::PopAndDestroy( buf ); // Delete buf or sqlStatement	
-	CleanupStack::Pop( &aDatabase );	
-	CleanupStack::Pop( &aSession );	
-	
+
 	aDatabase.Compact();
+
+	CleanupStack::PopAndDestroy( buf );
+	CleanupStack::Pop( &aDatabase );
+	CleanupStack::Pop( &aFileServerSession );
 }
 
+// ---------------------------------------------------------
+
 void EapTlsPeapUtils::OpenPeapDatabaseL(
-		RDbNamedDatabase& aDatabase, 
-		RDbs& aSession, 
-		const TIndexType aIndexType, 
-		const TInt aIndex,
-		const eap_type_value_e aTunnelingType)
+	RDbNamedDatabase& aDatabase,
+	RFs& aFileServerSession,
+	const TIndexType aIndexType,
+	const TInt aIndex,
+	const eap_type_value_e aTunnelingType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
-
-#else
-
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
 	EAP_TRACE_DEBUG_SYMBIAN(
-		(_L("EapTlsPeapUtils::OpenPeapDatabaseL -Start- aIndexType=%d, aIndex=%d, Tunneling vendor type=%d \n"),
-		aIndexType,aIndex, aTunnelingVendorType));
+		(_L("EapTlsPeapUtils::OpenPeapDatabaseL(): - Start - aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type()));
+
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapTlsPeapUtils::OpenPeapDatabaseL()\n"));
 
 	// 1. Open/create a database	
-	
-	// Connect to the DBMS server.
-	User::LeaveIfError(aSession.Connect());		
-	CleanupClosePushL(aSession);	
-	// aSession and aDatabase are pushed to the cleanup stack even though they may be member
-	// variables of the calling class and would be closed in the destructor anyway. This ensures
-	// that if they are not member variables they will be closed. Closing the handle twice
-	// does no harm.	
-	
-#ifdef SYMBIAN_SECURE_DBMS
-	
-	// Create the secure shared database with the specified secure policy.
-	// Database will be created in the data caging path for DBMS (C:\private\100012a5).
-	
-	TInt err = aDatabase.Create(aSession, KPeapDatabaseName, KSecureUIDFormat);
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenPeapDatabaseL - Created Secure DB for eappeap.dat. err=%d\n"), err) );
-	
-	if(err == KErrNone)
+
+	TInt error(KErrNone);
+	TFileName aPrivateDatabasePathName;
+
+	EapPluginTools::CreateDatabaseLC(
+		aDatabase,
+		aFileServerSession,
+		error,
+		KPeapDatabaseName,
+		aPrivateDatabasePathName);
+
+	if(error == KErrNone)
 	{
 		aDatabase.Close();
-		
-	} else if (err != KErrAlreadyExists) 
+	}
+	else if (error != KErrAlreadyExists) 
 	{
-		User::LeaveIfError(err);
+		User::LeaveIfError(error);
 	}
 	
-	User::LeaveIfError(aDatabase.Open(aSession, KPeapDatabaseName, KSecureUIDFormat));
-	CleanupClosePushL(aDatabase);		
-		
-#else
-	// For non-secured database. The database will be created in the old location (c:\system\data).
-	
-	RFs fsSession;		
-	User::LeaveIfError(fsSession.Connect());
-	CleanupClosePushL(fsSession);	
-	TInt err = aDatabase.Create(fsSession, KPeapDatabaseName);
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenPeapDatabaseL - Created Non-Secure DB for eappeap.dat. err=%d\n"), err) );
-	
-	if(err == KErrNone)
-	{
-		aDatabase.Close();
-		
-	} else if (err != KErrAlreadyExists) 
-	{
-		User::LeaveIfError(err);
-	}
-	
-	User::LeaveIfError(aDatabase.Open(fsSession, KPeapDatabaseName));
-	
-	CleanupStack::PopAndDestroy(); // close fsSession
-	
-	CleanupClosePushL(aDatabase);		
-	    
-#endif // #ifdef SYMBIAN_SECURE_DBMS
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenPeapDatabaseL(): - calls aDatabase.Open()\n")));
+
+	error = aDatabase.Open(aFileServerSession, aPrivateDatabasePathName);
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenPeapDatabaseL(): - Opened private DB for EAP-PEAP. error=%d\n"), error));
+
+	User::LeaveIfError(error);
 
 	// 2. Create the eappeap table to database (ignore error if exists)
 	
-// Table columns:
-//// NAME /////////////////////////////////////////////// TYPE ////////////// Constant ///////////////////
-//| ServiceType										| UNSIGNED INTEGER 	| KServiceType        |//
-//| ServiceIndex									| UNSIGNED INTEGER 	| KServiceIndex       |//
-//| TunnelingType									| UNSIGNED INTEGER 	| KTunnelingType		|//
-//| EAP_TLS_PEAP_use_manual_realm					| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_use_manual_realm_literal      |//
-//| EAP_TLS_PEAP_manual_realm						| VARCHAR(255)     	| cf_str_EAP_TLS_PEAP_manual_realm_literal				|//
-//| EAP_TLS_PEAP_use_manual_username				| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_use_manual_username_literal   |//
-//| EAP_TLS_PEAP_manual_username					| VARCHAR(255)     	| cf_str_EAP_TLS_PEAP_manual_username_literal			|//
-//| EAP_TLS_PEAP_max_count_of_session_resumes		| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_max_count_of_session_resumes_literal    |//
-//| EAP_TLS_PEAP_cipher_suite						| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_cipher_suite_literal	   |//
-//| EAP_TLS_PEAP_used_PEAP_version					| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_used_PEAP_version_literal		    |//
-//| EAP_TLS_PEAP_accepted_PEAP_versions				| BINARY(12)	    | cf_str_EAP_TLS_PEAP_accepted_PEAP_versions_literal|//
-//| PEAP_accepted_tunneled_client_types			   	| VARBINARY(240) 	| cf_str_PEAP_accepted_tunneled_client_types_hex_data_literal      |//
-//| PEAP_unaccepted_tunneled_client_types		   	| VARBINARY(240) 	| cf_str_PEAP_unaccepted_tunneled_client_types_hex_data_literal      |//
-//| EAP_TLS_server_authenticates_client		        | UNSIGNED INTEGER 	| cf_str_TLS_server_authenticates_client_policy_in_client_literal|//
-//| CA_cert_label								    | VARCHAR(255)     	| KCACertLabelOld	   |//
-//| client_cert_label							    | VARCHAR(255)     	| KClientCertLabel	   |//
-//| EAP_TLS_PEAP_saved_session_id				    | BINARY(32)       	| cf_str_EAP_TLS_PEAP_saved_session_id_literal		   |//
-//| EAP_TLS_PEAP_saved_master_secret			    | BINARY(48)       	| cf_str_EAP_TLS_PEAP_saved_master_secret_literal	   |//
-//| EAP_TLS_PEAP_saved_cipher_suite				    | UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_saved_cipher_suite_literal   |//
-//| EAP_TLS_PEAP_verify_certificate_realm			| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_verify_certificate_realm_literal		   |//
-//| EAP_PEAP_max_session_validity_time				| BIGINT	   		| cf_str_EAP_PEAP_max_session_validity_time_literal   |//
-//| EAP_PEAP_last_full_authentication_time			| BIGINT	   		| KPEAPLastFullAuthTime	   	|//	
-//| EAP_TLS_PEAP_use_identity_privacy	    	    | UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_use_identity_privacy_literal|//
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////	
+	// Table columns:
+	//// NAME /////////////////////////////////////////////// TYPE ////////////// Constant ///////////////////
+	//| ServiceType										| UNSIGNED INTEGER 	| KServiceType        |//
+	//| ServiceIndex									| UNSIGNED INTEGER 	| KServiceIndex       |//
+	//| TunnelingTypeVendorId							| UNSIGNED INTEGER  | KTunnelingTypeVendorId    |//
+	//| TunnelingType									| UNSIGNED INTEGER 	| KTunnelingType		|//
+	//| EAP_TLS_PEAP_use_manual_realm					| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_use_manual_realm_literal      |//
+	//| EAP_TLS_PEAP_manual_realm						| VARCHAR(255)     	| cf_str_EAP_TLS_PEAP_manual_realm_literal				|//
+	//| EAP_TLS_PEAP_use_manual_username				| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_use_manual_username_literal   |//
+	//| EAP_TLS_PEAP_manual_username					| VARCHAR(255)     	| cf_str_EAP_TLS_PEAP_manual_username_literal			|//
+	//| EAP_TLS_PEAP_max_count_of_session_resumes		| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_max_count_of_session_resumes_literal    |//
+	//| EAP_TLS_PEAP_cipher_suite						| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_cipher_suite_literal	   |//
+	//| EAP_TLS_PEAP_used_PEAP_version					| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_used_PEAP_version_literal		    |//
+	//| EAP_TLS_PEAP_accepted_PEAP_versions				| BINARY(12)	    | cf_str_EAP_TLS_PEAP_accepted_PEAP_versions_literal|//
+	//| PEAP_accepted_tunneled_client_types			   	| VARBINARY(240) 	| cf_str_PEAP_accepted_tunneled_client_types_hex_data_literal      |//
+	//| PEAP_unaccepted_tunneled_client_types		   	| VARBINARY(240) 	| cf_str_PEAP_unaccepted_tunneled_client_types_hex_data_literal      |//
+	//| EAP_TLS_server_authenticates_client		        | UNSIGNED INTEGER 	| cf_str_TLS_server_authenticates_client_policy_in_client_literal|//
+	//| CA_cert_label								    | VARCHAR(255)     	| KCACertLabelOld	   |//
+	//| client_cert_label							    | VARCHAR(255)     	| KClientCertLabel	   |//
+	//| EAP_TLS_PEAP_saved_session_id				    | BINARY(32)       	| cf_str_EAP_TLS_PEAP_saved_session_id_literal		   |//
+	//| EAP_TLS_PEAP_saved_master_secret			    | BINARY(48)       	| cf_str_EAP_TLS_PEAP_saved_master_secret_literal	   |//
+	//| EAP_TLS_PEAP_saved_cipher_suite				    | UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_saved_cipher_suite_literal   |//
+	//| EAP_TLS_PEAP_verify_certificate_realm			| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_verify_certificate_realm_literal		   |//
+	//| EAP_PEAP_max_session_validity_time				| BIGINT	   		| cf_str_EAP_PEAP_max_session_validity_time_literal   |//
+	//| EAP_PEAP_last_full_authentication_time			| BIGINT	   		| KPEAPLastFullAuthTime	   	|//	
+	//| EAP_TLS_PEAP_use_identity_privacy	    		| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_use_identity_privacy_literal|//
+	//| EAP_TLS_PEAP_use_automatic_ca_certificate		| UNSIGNED INTEGER  | cf_str_EAP_TLS_PEAP_use_automatic_ca_certificate_literal|//
+	//////////////////////////////////////////////////////////////////////////////////////////////////////////////	
 
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
 	// Table creation is divided into two parts because otherwise the SQL string would get too long
-	_LIT(KSQLCreateTable1, "CREATE TABLE %S (%S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S VARCHAR(%d),     \
-											 %S UNSIGNED INTEGER, \
-											 %S VARCHAR(%d),     \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S BINARY(%d),		  \
-											 %S VARBINARY(%d),	  \
-											 %S VARBINARY(%d),	  \
-											 %S UNSIGNED INTEGER, \
-											 %S VARCHAR(%d),	  \
-											 %S VARCHAR(%d),     \
-											 %S BINARY(%d),		  \
-											 %S BINARY(%d),		  \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S BIGINT, \
-											 %S BIGINT, \
-											 %S UNSIGNED INTEGER)");
+	_LIT(KSQLCreateTable1, "CREATE TABLE %S \
+		(%S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S VARCHAR(%d),     \
+		 %S UNSIGNED INTEGER, \
+		 %S VARCHAR(%d),     \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S BINARY(%d),		  \
+		 %S VARBINARY(%d),	  \
+		 %S VARBINARY(%d),	  \
+		 %S UNSIGNED INTEGER, \
+		 %S VARCHAR(%d),	  \
+		 %S VARCHAR(%d),     \
+		 %S BINARY(%d),		  \
+		 %S BINARY(%d),		  \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S BIGINT, \
+		 %S BIGINT, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER)");
+
 	sqlStatement.Format(KSQLCreateTable1,
 		&KPeapDatabaseTableName,
 		&KServiceType,
 		&KServiceIndex,
+		&KTunnelingTypeVendorId,
 		&KTunnelingType,
 		&cf_str_EAP_TLS_PEAP_use_manual_realm_literal,
-		&cf_str_EAP_TLS_PEAP_manual_realm_literal, KMaxManualRealmLengthInDB,
+		&cf_str_EAP_TLS_PEAP_manual_realm_literal, KMaxRealmLengthInDB,
 		&cf_str_EAP_TLS_PEAP_use_manual_username_literal,
-		&cf_str_EAP_TLS_PEAP_manual_username_literal, KMaxManualUsernameLengthInDB,
+		&cf_str_EAP_TLS_PEAP_manual_username_literal, KMaxUsernameLengthInDB,
 		&cf_str_EAP_TLS_PEAP_cipher_suite_literal,
 		&cf_str_EAP_TLS_PEAP_used_PEAP_version_literal,
 		&cf_str_EAP_TLS_PEAP_accepted_PEAP_versions_literal, KMaxPEAPVersionsStringLengthInDB,
@@ -640,50 +622,56 @@
 		&cf_str_EAP_TLS_PEAP_verify_certificate_realm_literal,
 		&cf_str_EAP_PEAP_max_session_validity_time_literal,
 		&KPEAPLastFullAuthTime,	
-		&cf_str_EAP_TLS_PEAP_use_identity_privacy_literal);		
+		&cf_str_EAP_TLS_PEAP_use_identity_privacy_literal,
+		&cf_str_EAP_TLS_PEAP_use_automatic_ca_certificate_literal);		
 					
-	err = aDatabase.Execute(sqlStatement);
-	if (err == KErrAlreadyExists)
+	error = aDatabase.Execute(sqlStatement);
+	if (error == KErrAlreadyExists)
 		{
-		EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenPeapDatabaseL - Alter Table err=%d\n"), err) );
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenPeapDatabaseL - Alter Table error=%d\n"), error) );
 		_LIT( KColumnDef, "UNSIGNED INTEGER" );
 		AlterTableL( aDatabase, EAddColumn , KPeapDatabaseTableName,
 				cf_str_EAP_TLS_PEAP_use_identity_privacy_literal, KColumnDef);
 		}
-		else if (err != KErrNone)
+		else if (error != KErrNone)
 			{
-			User::Leave(err);
+			User::Leave(error);
 			}
 
 	// Create table for _allowed_ user certificates
 	
-//// NAME ////////////////// TYPE ////////////// Constant ///////////
-//| ServiceType			| UNSIGNED INTEGER | KServiceType        |//
-//| ServiceIndex		| UNSIGNED INTEGER | KServiceIndex       |//
-//| TunnelingType		| UNSIGNED INTEGER | KTunnelingType		|//
-//| CertLabel			| VARCHAR(255)     | KCACertLabel        |//	
-//| SubjectKeyId		| BINARY(20)	   | KSubjectKeyIdentifier |// This is Symbian subjectkey id
-//| ActualSubjectKeyId  | BINARY(20)	   | KActualSubjectKeyIdentifier |// This is the actual subjectkeyid present in the certificate.
-//| SubjectName			| VARCHAR(255)     | KSubjectName        |//	
-//| IssuerName			| VARCHAR(255)     | KIssuerName        |//	
-//| SerialNumber		| VARCHAR(255)     | KSerialNumber        |//	
-//| Thumbprint			| BINARY(64)	   | KThumbprint        |//	
-//////////////////////////////////////////////////////////////////////////////////////////////////////	
-	
-	_LIT(KSQLCreateTable2, "CREATE TABLE %S (%S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S VARCHAR(%d), \
-											 %S BINARY(%d), \
-											 %S BINARY(%d), \
-											 %S VARCHAR(%d), \
-											 %S VARCHAR(%d), \
-											 %S VARCHAR(%d), \
-											 %S BINARY(%d))");											 
-											 
-	sqlStatement.Format(KSQLCreateTable2, &KPeapAllowedUserCertsDatabaseTableName, 
+	//// NAME ////////////////// TYPE ////////////// Constant ///////////
+	//| ServiceType				| UNSIGNED INTEGER | KServiceType        |//
+	//| ServiceIndex			| UNSIGNED INTEGER | KServiceIndex       |//
+	//| TunnelingTypeVendorId	| UNSIGNED INTEGER | KTunnelingTypeVendorId    |//
+	//| TunnelingType			| UNSIGNED INTEGER | KTunnelingType		|//
+	//| CertLabel				| VARCHAR(255)     | KCACertLabel        |//	
+	//| SubjectKeyId			| BINARY(20)	   | KSubjectKeyIdentifier |// This is Symbian subjectkey id
+	//| ActualSubjectKeyId		| BINARY(20)	   | KActualSubjectKeyIdentifier |// This is the actual subjectkeyid present in the certificate.
+	//| SubjectName				| VARCHAR(255)     | KSubjectName        |//	
+	//| IssuerName				| VARCHAR(255)     | KIssuerName        |//	
+	//| SerialNumber			| VARCHAR(255)     | KSerialNumber        |//	
+	//| Thumbprint				| BINARY(64)	   | KThumbprint        |//	
+	//////////////////////////////////////////////////////////////////////////////////////////////////////	
+	
+	_LIT(KSQLCreateTable2, "CREATE TABLE %S \
+		(%S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S VARCHAR(%d), \
+		 %S BINARY(%d), \
+		 %S BINARY(%d), \
+		 %S VARCHAR(%d), \
+		 %S VARCHAR(%d), \
+		 %S VARCHAR(%d), \
+		 %S BINARY(%d))");
+
+	sqlStatement.Format(KSQLCreateTable2,
+		&KPeapAllowedUserCertsDatabaseTableName, 
 		&KServiceType, 
 		&KServiceIndex, 
+		&KTunnelingTypeVendorId,
 		&KTunnelingType, 
 		&KCertLabel, KMaxCertLabelLengthInDB,
 		&KSubjectKeyIdentifier, KMaxSubjectKeyIdLengthInDB,
@@ -693,41 +681,46 @@
 		&KSerialNumber, KGeneralStringMaxLength,
 		&KThumbprint, KThumbprintMaxLength);
 		
-	err = aDatabase.Execute(sqlStatement);
-	if (err != KErrNone && err != KErrAlreadyExists)
+	error = aDatabase.Execute(sqlStatement);
+	if (error != KErrNone && error != KErrAlreadyExists)
 	{
-		User::Leave(err);
+		User::Leave(error);
 	}	
 
 	// Create table for _allowed_ CA certs
 
-//// NAME ////////////////// TYPE ////////////// Constant ///////////
-//| ServiceType			| UNSIGNED INTEGER | KServiceType        |//
-//| ServiceIndex		| UNSIGNED INTEGER | KServiceIndex       |//
-//| TunnelingType		| UNSIGNED INTEGER | KTunnelingType		|//
-//| CACertLabel			| VARCHAR(255)     | KCACertLabel        |//	
-//| SubjectKeyId		| BINARY(20)	   | KSubjectKeyIdentifier |// This is Symbian subjectkey id
-//| ActualSubjectKeyId  | BINARY(20)	   | KActualSubjectKeyIdentifier |// This is the actual subjectkeyid present in the certificate.
-//| SubjectName			| VARCHAR(255)     | KSubjectName        |//	
-//| IssuerName			| VARCHAR(255)     | KIssuerName        |//	
-//| SerialNumber		| VARCHAR(255)     | KSerialNumber        |//	
-//| Thumbprint			| BINARY(64)	   | KThumbprint        |//	
-//////////////////////////////////////////////////////////////////////////////////////////////////////	
-
-	_LIT(KSQLCreateTable3, "CREATE TABLE %S (%S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S VARCHAR(%d), \
-											 %S BINARY(%d), \
-											 %S BINARY(%d), \
-											 %S VARCHAR(%d), \
-											 %S VARCHAR(%d), \
-											 %S VARCHAR(%d), \
-											 %S BINARY(%d))");
+	//// NAME ////////////////// TYPE ////////////// Constant ///////////
+	//| ServiceType				| UNSIGNED INTEGER | KServiceType        |//
+	//| ServiceIndex			| UNSIGNED INTEGER | KServiceIndex       |//
+	//| TunnelingTypeVendorId	| UNSIGNED INTEGER | KTunnelingTypeVendorId    |//
+	//| TunnelingType			| UNSIGNED INTEGER | KTunnelingType		|//
+	//| CACertLabel				| VARCHAR(255)     | KCACertLabel        |//	
+	//| SubjectKeyId			| BINARY(20)	   | KSubjectKeyIdentifier |// This is Symbian subjectkey id
+	//| ActualSubjectKeyId		| BINARY(20)	   | KActualSubjectKeyIdentifier |// This is the actual subjectkeyid present in the certificate.
+	//| SubjectName				| VARCHAR(255)     | KSubjectName        |//	
+	//| IssuerName				| VARCHAR(255)     | KIssuerName        |//	
+	//| SerialNumber			| VARCHAR(255)     | KSerialNumber        |//	
+	//| Thumbprint				| BINARY(64)	   | KThumbprint        |//	
+	//////////////////////////////////////////////////////////////////////////////////////////////////////	
+
+	_LIT(KSQLCreateTable3, "CREATE TABLE %S \
+		(%S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S VARCHAR(%d), \
+		 %S BINARY(%d), \
+		 %S BINARY(%d), \
+		 %S VARCHAR(%d), \
+		 %S VARCHAR(%d), \
+		 %S VARCHAR(%d), \
+		 %S BINARY(%d))");
 											 											 
-	sqlStatement.Format(KSQLCreateTable3, &KPeapAllowedCACertsDatabaseTableName, 
+	sqlStatement.Format(KSQLCreateTable3,
+		&KPeapAllowedCACertsDatabaseTableName, 
 		&KServiceType, 
-		&KServiceIndex, 
+		&KServiceIndex,
+		&KTunnelingTypeVendorId,
 		&KTunnelingType, 
 		&KCertLabel, KMaxCertLabelLengthInDB,
 		&KSubjectKeyIdentifier, KMaxSubjectKeyIdLengthInDB,
@@ -737,49 +730,66 @@
 		&KSerialNumber, KGeneralStringMaxLength,
 		&KThumbprint, KThumbprintMaxLength);
 		
-	err = aDatabase.Execute(sqlStatement);
-	if (err != KErrNone && err != KErrAlreadyExists)
+	error = aDatabase.Execute(sqlStatement);
+	if (error != KErrNone && error != KErrAlreadyExists)
 	{
-		User::Leave(err);
+		User::Leave(error);
 	}
 
 	// Create table for _allowed_ cipher suites
 
-//// NAME ///////////////// TYPE ////////////// Constant ///////////
-//| ServiceType			| UNSIGNED INTEGER | KServiceType        |//
-//| ServiceIndex		| UNSIGNED INTEGER | KServiceIndex       |//
-//| TunnelingType		| UNSIGNED INTEGER | KTunnelingType		|//
-//| CipherSuite			| UNSIGNED INTEGER | KCipherSuite        |//	
-//////////////////////////////////////////////////////////////////////////////////////////////////////	
-	
-	_LIT(KSQLCreateTable4, "CREATE TABLE %S (%S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER)");
-
-	sqlStatement.Format(KSQLCreateTable4, &KPeapAllowedCipherSuitesDatabaseTableName, 
-		&KServiceType, &KServiceIndex, &KTunnelingType, &KCipherSuite);
-	err = aDatabase.Execute(sqlStatement);
-	if (err != KErrNone && err != KErrAlreadyExists)
+	//// NAME ///////////////////// TYPE ////////////// Constant ///////////
+	//| ServiceType				| UNSIGNED INTEGER | KServiceType        |//
+	//| ServiceIndex			| UNSIGNED INTEGER | KServiceIndex       |//
+	//| TunnelingTypeVendorId	| UNSIGNED INTEGER | KTunnelingTypeVendorId    |//
+	//| TunnelingType			| UNSIGNED INTEGER | KTunnelingType		|//
+	//| CipherSuite				| UNSIGNED INTEGER | KCipherSuite        |//	
+	//////////////////////////////////////////////////////////////////////////////////////////////////////	
+	
+	_LIT(KSQLCreateTable4, "CREATE TABLE %S \
+		(%S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER)");
+
+	sqlStatement.Format(KSQLCreateTable4,
+		&KPeapAllowedCipherSuitesDatabaseTableName, 
+		&KServiceType,
+		&KServiceIndex,
+		&KTunnelingTypeVendorId,
+		&KTunnelingType,
+		&KCipherSuite);
+
+	error = aDatabase.Execute(sqlStatement);
+	if (error != KErrNone && error != KErrAlreadyExists)
 	{
-		User::Leave(err);
+		User::Leave(error);
 	}
 
 	// 4. Check if database table contains a row for this service type and id 
 	 	
-	_LIT(KSQLQueryRow, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	
-	sqlStatement.Format(KSQLQueryRow, &KPeapDatabaseTableName, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
-			
+	_LIT(KSQLQueryRow, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	
+	sqlStatement.Format(KSQLQueryRow,
+		&KPeapDatabaseTableName, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());
+
 	RDbView view;
 	User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement), TDbWindow::EUnlimited));
 	// View must be closed when no longer needed
 	CleanupClosePushL(view);
 	User::LeaveIfError(view.EvaluateAll());
-	
+
 	// 5. If row is not found then add it
-	
+
 	TInt rows = view.CountL();
 	CleanupStack::PopAndDestroy(); // view
 	if (rows == 0)
@@ -798,13 +808,14 @@
 		// Set the default values. The other three tables (certs, ca certs & cipher suites) are empty by default.
 		view.SetColL(colSet->ColNo(KServiceType), static_cast<TInt>(aIndexType));
 		view.SetColL(colSet->ColNo(KServiceIndex), aIndex);
-		view.SetColL(colSet->ColNo(KTunnelingType), aTunnelingVendorType);
+		view.SetColL(colSet->ColNo(KTunnelingTypeVendorId), aTunnelingType.get_vendor_id());
+		view.SetColL(colSet->ColNo(KTunnelingType), aTunnelingType.get_vendor_type());
 		
 		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_use_manual_realm_literal), default_EAP_TLS_PEAP_use_manual_realm);
-		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_manual_realm_literal), default_EAP_TLS_PEAP_manual_realm);
+		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_manual_realm_literal), default_EAP_realm);
 		
 		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_use_manual_username_literal), default_EAP_TLS_PEAP_use_manual_username);
-		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_manual_username_literal), default_EAP_TLS_PEAP_manual_username);
+		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_manual_username_literal), default_EAP_username);
 		
 		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_cipher_suite_literal), default_EAP_TLS_PEAP_cipher_suite);
 		
@@ -838,6 +849,8 @@
 
 		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_use_identity_privacy_literal), default_EAP_TLS_PEAP_TLS_Privacy);						
 
+		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_use_automatic_ca_certificate_literal), default_EAP_TLS_PEAP_use_automatic_ca_certificate);
+
 		view.PutL();
 		
 		CleanupStack::PopAndDestroy(colSet); 
@@ -859,14 +872,15 @@
 			view.InsertL();
 			view.SetColL(colSet->ColNo(KServiceType), static_cast<TInt>(aIndexType));
 			view.SetColL(colSet->ColNo(KServiceIndex), aIndex);
-			view.SetColL(colSet->ColNo(KTunnelingType), aTunnelingVendorType);
+			view.SetColL(colSet->ColNo(KTunnelingTypeVendorId), aTunnelingType.get_vendor_id());
+			view.SetColL(colSet->ColNo(KTunnelingType), aTunnelingType.get_vendor_type());
 			view.SetColL(colSet->ColNo(KCipherSuite), default_allowed_cipher_suites[i]);
 			view.PutL();
 			i++;
 		}
 		
-		CleanupStack::PopAndDestroy( colSet ); // Delete colSet.		
-		CleanupStack::PopAndDestroy( &view ); // Close view.
+		CleanupStack::PopAndDestroy( colSet );
+		CleanupStack::PopAndDestroy( &view );
 	} 
 	
 	// 6. Do the altering of tables here. 
@@ -882,11 +896,11 @@
 	tableName = KPeapAllowedCACertsDatabaseTableName;	
 	AddExtraCertColumnsL(aDatabase,tableName);
 
-	CleanupStack::PopAndDestroy( buf ); // Delete buf or sqlStatement
-	CleanupStack::Pop( &aDatabase );	
-	CleanupStack::Pop( &aSession );	
-	
 	aDatabase.Compact();
+
+	CleanupStack::PopAndDestroy( buf );
+	CleanupStack::Pop( &aDatabase );
+	CleanupStack::Pop( &aFileServerSession );
 }
 
 #if defined(USE_TTLS_EAP_TYPE)
@@ -896,163 +910,136 @@
 // ---------------------------------------------------------
 //
 void EapTlsPeapUtils::OpenTtlsDatabaseL(
-		RDbNamedDatabase& aDatabase, 
-		RDbs& aSession, 
-		const TIndexType aIndexType, 
-		const TInt aIndex,
-		const eap_type_value_e aTunnelingType)
+	RDbNamedDatabase& aDatabase,
+	RFs& aFileServerSession,
+	const TIndexType aIndexType,
+	const TInt aIndex,
+	const eap_type_value_e aTunnelingType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
-
-#else
-
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
 	EAP_TRACE_DEBUG_SYMBIAN(
-		(_L("EapTlsPeapUtils::OpenTtlsDatabaseL -Start- aIndexType=%d, aIndex=%d, Tunneling vendor type=%d \n"),
-		aIndexType,aIndex, aTunnelingVendorType));
+		(_L("EapTlsPeapUtils::OpenTtlsDatabaseL(): - Start - aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type()));
+
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapTlsPeapUtils::OpenTtlsDatabaseL()\n"));
 
 	// 1. Open/create a database	
-	
-	// Connect to the DBMS server.
-	User::LeaveIfError(aSession.Connect());		
-	CleanupClosePushL(aSession);	
-	// aSession and aDatabase are pushed to the cleanup stack even though they may be member
-	// variables of the calling class and would be closed in the destructor anyway. This ensures
-	// that if they are not member variables they will be closed. Closing the handle twice
-	// does no harm.	
-	
-#ifdef SYMBIAN_SECURE_DBMS
-	
-	// Create the secure shared database with the specified secure policy.
-	// Database will be created in the data caging path for DBMS (C:\private\100012a5).
-	
-	TInt err = aDatabase.Create(aSession, KTtlsDatabaseName, KSecureUIDFormat);
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTtlsDatabaseL - Created Secure DB for eapttls.dat. err=%d\n"), err) );
-	
-	if(err == KErrNone)
+
+	TInt error(KErrNone);
+	TFileName aPrivateDatabasePathName;
+
+	EapPluginTools::CreateDatabaseLC(
+		aDatabase,
+		aFileServerSession,
+		error,
+		KTtlsDatabaseName,
+		aPrivateDatabasePathName);
+
+	if(error == KErrNone)
 	{
 		aDatabase.Close();
-		
-	} else if (err != KErrAlreadyExists) 
+	}
+	else if (error != KErrAlreadyExists) 
 	{
-		User::LeaveIfError(err);
+		User::LeaveIfError(error);
 	}
 	
-	User::LeaveIfError(aDatabase.Open(aSession, KTtlsDatabaseName, KSecureUIDFormat));
-	CleanupClosePushL(aDatabase);		
-		
-#else
-	// For non-secured database. The database will be created in the old location (c:\system\data).
-	
-	RFs fsSession;		
-	User::LeaveIfError(fsSession.Connect());
-	CleanupClosePushL(fsSession);	
-	TInt err = aDatabase.Create(fsSession, KTtlsDatabaseName);
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTtlsDatabaseL - Created Non-Secure DB for eapttls.dat. err=%d\n"), err) );
-	
-	if(err == KErrNone)
-	{
-		aDatabase.Close();
-		
-	} else if (err != KErrAlreadyExists) 
-	{
-		User::LeaveIfError(err);
-	}
-	
-	User::LeaveIfError(aDatabase.Open(fsSession, KTtlsDatabaseName));
-	
-	CleanupStack::PopAndDestroy(); // close fsSession
-	
-	CleanupClosePushL(aDatabase);		
-	    
-#endif // #ifdef SYMBIAN_SECURE_DBMS
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTtlsDatabaseL(): - calls aDatabase.Open()\n")));
+
+	error = aDatabase.Open(aFileServerSession, aPrivateDatabasePathName);
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTtlsDatabaseL(): - Opened private DB for EAP-TTLS. error=%d\n"), error));
+
+	User::LeaveIfError(error);
+
 
 	// 2. Create the eapttls table to database (ignore error if exists)
 	
-// Table columns:
-//// NAME //////////////////////////////////////////// TYPE ////////////// Constant ///////////////////
-//| ServiceType									| UNSIGNED INTEGER 	| KServiceType        |//
-//| ServiceIndex								| UNSIGNED INTEGER 	| KServiceIndex       |//
-//| TunnelingType								| UNSIGNED INTEGER 	| KTunnelingType		|//
-//| EAP_TLS_PEAP_use_manual_realm				| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_use_manual_realm_literal      |//
-//| EAP_TLS_PEAP_manual_realm					| VARCHAR(255)     	| cf_str_EAP_TLS_PEAP_manual_realm_literal				|//
-//| EAP_TLS_PEAP_use_manual_username			| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_use_manual_username_literal   |//
-//| EAP_TLS_PEAP_manual_username				| VARCHAR(255)     	| cf_str_EAP_TLS_PEAP_manual_username_literal			|//
-//| EAP_TLS_PEAP_cipher_suite					| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_cipher_suite_literal	   |//
-//| EAP_TLS_PEAP_used_PEAP_version				| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_used_PEAP_version_literal		    |//
-//| EAP_TLS_PEAP_accepted_PEAP_versions			| BINARY(12)	    | cf_str_EAP_TLS_PEAP_accepted_PEAP_versions_literal|//
-//| PEAP_accepted_tunneled_client_types			| VARBINARY(240) 	| cf_str_PEAP_accepted_tunneled_client_types_hex_data_literal      |//
-//| PEAP_unaccepted_tunneled_client_types		| VARBINARY(240) 	| cf_str_PEAP_unaccepted_tunneled_client_types_hex_data_literal      |//
-//| EAP_TLS_server_authenticates_client		    | UNSIGNED INTEGER 	| cf_str_TLS_server_authenticates_client_policy_in_client_literal|//
-//| CA_cert_label								| VARCHAR(255)     	| KCACertLabelOld	   |//
-//| client_cert_label							| VARCHAR(255)     	| KClientCertLabel	   |//
-//| EAP_TLS_PEAP_saved_session_id				| BINARY(32)       	| cf_str_EAP_TLS_PEAP_saved_session_id_literal		   |//
-//| EAP_TLS_PEAP_saved_master_secret			| BINARY(48)       	| cf_str_EAP_TLS_PEAP_saved_master_secret_literal	   |//
-//| EAP_TLS_PEAP_saved_cipher_suite				| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_saved_cipher_suite_literal   |//
-//| EAP_TLS_PEAP_verify_certificate_realm		| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_verify_certificate_realm_literal		   |//
-//| EAP_TTLS_max_session_validity_time			| BIGINT	   		| cf_str_EAP_TTLS_max_session_validity_time_literal   |//
-//| EAP_TTLS_last_full_authentication_time		| BIGINT	   		| KTTLSLastFullAuthTime	   	|//	
-//| EAP_TLS_PEAP_use_identity_privacy			| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_use_identity_privacy_literal		   |//
-
-
-//| EAP_TLS_PEAP_ttls_pap_password_prompt               | UNSIGNED INTEGER  | cf_str_EAP_TLS_PEAP_ttls_pap_password_prompt_literal           |//
-//| EAP_TLS_PEAP_ttls_pap_username                      | VARCHAR(253)      | cf_str_EAP_TLS_PEAP_ttls_pap_username_literal                  |//
-//| EAP_TLS_PEAP_ttls_pap_password                      | VARCHAR(128)      | cf_str_EAP_TLS_PEAP_ttls_pap_password_literal                  |//
-//| EAP_TLS_PEAP_ttls_pap_max_session_validity_time		| BIGINT		   	| cf_str_EAP_TLS_PEAP_ttls_pap_max_session_validity_time_literal |//
-//| EAP_TLS_PEAP_ttls_pap_last_full_authentication_time	| BIGINT		   	| KTTLSPAPLastFullAuthTime	                             |//
-
-
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////	
+	// Table columns:
+	//// NAME //////////////////////////////////////////// TYPE ////////////// Constant ///////////////////
+	//| ServiceType									| UNSIGNED INTEGER 	| KServiceType        |//
+	//| ServiceIndex								| UNSIGNED INTEGER 	| KServiceIndex       |//
+	//| TunnelingTypeVendorId                       | UNSIGNED INTEGER  | KTunnelingTypeVendorId    |//
+	//| TunnelingType								| UNSIGNED INTEGER 	| KTunnelingType		|//
+	//| EAP_TLS_PEAP_use_manual_realm				| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_use_manual_realm_literal      |//
+	//| EAP_TLS_PEAP_manual_realm					| VARCHAR(255)     	| cf_str_EAP_TLS_PEAP_manual_realm_literal				|//
+	//| EAP_TLS_PEAP_use_manual_username			| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_use_manual_username_literal   |//
+	//| EAP_TLS_PEAP_manual_username				| VARCHAR(255)     	| cf_str_EAP_TLS_PEAP_manual_username_literal			|//
+	//| EAP_TLS_PEAP_cipher_suite					| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_cipher_suite_literal	   |//
+	//| EAP_TLS_PEAP_used_PEAP_version				| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_used_PEAP_version_literal		    |//
+	//| EAP_TLS_PEAP_accepted_PEAP_versions			| BINARY(12)	    | cf_str_EAP_TLS_PEAP_accepted_PEAP_versions_literal|//
+	//| PEAP_accepted_tunneled_client_types			| VARBINARY(240) 	| cf_str_PEAP_accepted_tunneled_client_types_hex_data_literal      |//
+	//| PEAP_unaccepted_tunneled_client_types		| VARBINARY(240) 	| cf_str_PEAP_unaccepted_tunneled_client_types_hex_data_literal      |//
+	//| EAP_TLS_server_authenticates_client		    | UNSIGNED INTEGER 	| cf_str_TLS_server_authenticates_client_policy_in_client_literal|//
+	//| CA_cert_label								| VARCHAR(255)     	| KCACertLabelOld	   |//
+	//| client_cert_label							| VARCHAR(255)     	| KClientCertLabel	   |//
+	//| EAP_TLS_PEAP_saved_session_id				| BINARY(32)       	| cf_str_EAP_TLS_PEAP_saved_session_id_literal		   |//
+	//| EAP_TLS_PEAP_saved_master_secret			| BINARY(48)       	| cf_str_EAP_TLS_PEAP_saved_master_secret_literal	   |//
+	//| EAP_TLS_PEAP_saved_cipher_suite				| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_saved_cipher_suite_literal   |//
+	//| EAP_TLS_PEAP_verify_certificate_realm		| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_verify_certificate_realm_literal		   |//
+	//| EAP_TTLS_max_session_validity_time			| BIGINT	   		| cf_str_EAP_TTLS_max_session_validity_time_literal   |//
+	//| EAP_TTLS_last_full_authentication_time		| BIGINT	   		| KTTLSLastFullAuthTime	   	|//	
+	//| EAP_TLS_PEAP_use_identity_privacy			| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_use_identity_privacy_literal		   |//
+
+
+	//| EAP_TLS_PEAP_ttls_pap_password_prompt               | UNSIGNED INTEGER  | cf_str_EAP_TLS_PEAP_ttls_pap_password_prompt_literal           |//
+	//| EAP_TLS_PEAP_ttls_pap_username                      | VARCHAR(253)      | cf_str_EAP_TLS_PEAP_ttls_pap_username_literal                  |//
+	//| EAP_TLS_PEAP_ttls_pap_password                      | VARCHAR(128)      | cf_str_EAP_TLS_PEAP_ttls_pap_password_literal                  |//
+	//| EAP_TLS_PEAP_ttls_pap_max_session_validity_time		| BIGINT		   	| cf_str_EAP_TLS_PEAP_ttls_pap_max_session_validity_time_literal |//
+	//| EAP_TLS_PEAP_ttls_pap_last_full_authentication_time	| BIGINT		   	| KTTLSPAPLastFullAuthTime	                             |//
+
+	//| EAP_TLS_PEAP_use_automatic_ca_certificate		| UNSIGNED INTEGER  | cf_str_EAP_TLS_PEAP_use_automatic_ca_certificate_literal|//
+
+	//////////////////////////////////////////////////////////////////////////////////////////////////////////////	
 	
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 	
-// Table creation is divided into two parts because otherwise the SQL string would get too long
-	_LIT(KSQLCreateTable1,
-		"CREATE TABLE %S (%S UNSIGNED INTEGER, \
-			              %S UNSIGNED INTEGER, \
-			              %S UNSIGNED INTEGER, \
-			              %S UNSIGNED INTEGER, \
-			              %S VARCHAR(%d),     \
-			              %S UNSIGNED INTEGER, \
-			              %S VARCHAR(%d),     \
-			              %S UNSIGNED INTEGER, \
-			              %S UNSIGNED INTEGER, \
-			              %S BINARY(%d),		  \
-			              %S VARBINARY(%d),	  \
-			              %S VARBINARY(%d),	  \
-			              %S UNSIGNED INTEGER, \
-			              %S VARCHAR(%d),	  \
-			              %S VARCHAR(%d),     \
-			              %S BINARY(%d),		  \
-			              %S BINARY(%d),		  \
-			              %S UNSIGNED INTEGER, \
-			              %S UNSIGNED INTEGER, \
-			              %S BIGINT, \
-			              %S BIGINT, \
-				      			%S UNSIGNED INTEGER, \
-			              %S UNSIGNED INTEGER, \
-			              %S VARCHAR(%d), \
-			              %S VARCHAR(%d), \
-                    %S BIGINT, \
-                    %S BIGINT)");
+	// Table creation is divided into two parts because otherwise the SQL string would get too long
+	_LIT(KSQLCreateTable1, "CREATE TABLE %S \
+		(%S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S VARCHAR(%d),     \
+		 %S UNSIGNED INTEGER, \
+		 %S VARCHAR(%d),     \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S BINARY(%d),		  \
+		 %S VARBINARY(%d),	  \
+		 %S VARBINARY(%d),	  \
+		 %S UNSIGNED INTEGER, \
+		 %S VARCHAR(%d),	  \
+		 %S VARCHAR(%d),     \
+		 %S BINARY(%d),		  \
+		 %S BINARY(%d),		  \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S BIGINT, \
+		 %S BIGINT, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S VARCHAR(%d), \
+		 %S VARCHAR(%d), \
+         %S BIGINT, \
+         %S BIGINT)");
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTtlsDatabaseL(): sqlStatement.Format(KSQLCreateTable1)\n")) );
 
     sqlStatement.Format( KSQLCreateTable1,
         &KTtlsDatabaseTableName,
         &KServiceType,
         &KServiceIndex,
+		&KTunnelingTypeVendorId,
         &KTunnelingType,
         &cf_str_EAP_TLS_PEAP_use_manual_realm_literal,
-        &cf_str_EAP_TLS_PEAP_manual_realm_literal, KMaxManualRealmLengthInDB,
+        &cf_str_EAP_TLS_PEAP_manual_realm_literal, KMaxRealmLengthInDB,
         &cf_str_EAP_TLS_PEAP_use_manual_username_literal,
-        &cf_str_EAP_TLS_PEAP_manual_username_literal, KMaxManualUsernameLengthInDB,
+        &cf_str_EAP_TLS_PEAP_manual_username_literal, KMaxUsernameLengthInDB,
         &cf_str_EAP_TLS_PEAP_cipher_suite_literal,
         &cf_str_EAP_TLS_PEAP_used_PEAP_version_literal,
         &cf_str_EAP_TLS_PEAP_accepted_PEAP_versions_literal, KMaxPEAPVersionsStringLengthInDB,
@@ -1072,14 +1059,25 @@
         &cf_str_EAP_TLS_PEAP_ttls_pap_username_literal, KMaxPapUserNameLengthInDb,
         &cf_str_EAP_TLS_PEAP_ttls_pap_password_literal, KMaxPapPasswordLengthInDb,
         &cf_str_EAP_TLS_PEAP_ttls_pap_max_session_validity_time_literal,
-        &KTTLSPAPLastFullAuthTime );	
-
-
-	
-	err = aDatabase.Execute(sqlStatement);
-	if (err == KErrAlreadyExists)
+        &KTTLSPAPLastFullAuthTime);	
+
+
+	
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTtlsDatabaseL(): aDatabase.Execute()\n")) );
+
+	error = aDatabase.Execute(sqlStatement);
+	if (error == KErrNone)
 		{
-		EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTtlsDatabaseL - Alter Table err=%d\n"), err) );
+		// SQL command will be too long if this is included to KSQLCreateTable1.
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTtlsDatabaseL(): OK, Alter Table error=%d\n"), error) );
+		
+		_LIT( KColumnDef6, "UNSIGNED INTEGER" );
+		AlterTableL( aDatabase, EAddColumn , KTtlsDatabaseTableName,
+				cf_str_EAP_TLS_PEAP_use_automatic_ca_certificate_literal, KColumnDef6);
+		}
+	else if (error == KErrAlreadyExists)
+		{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTtlsDatabaseL(): Alter Table error=%d\n"), error) );
 		
 		_LIT( KColumnDef, "UNSIGNED INTEGER" );
 		AlterTableL( aDatabase, EAddColumn , KTtlsDatabaseTableName,
@@ -1114,41 +1112,107 @@
 		AlterTableL( aDatabase, EAddColumn , KTtlsDatabaseTableName,
 				KTTLSPAPLastFullAuthTime, KColumnDef5);
 				
+		_LIT( KColumnDef6, "UNSIGNED INTEGER" );
+		AlterTableL( aDatabase, EAddColumn , KTtlsDatabaseTableName,
+				cf_str_EAP_TLS_PEAP_use_automatic_ca_certificate_literal, KColumnDef6);
+				
 		}
-	else if (err != KErrNone)
+	else if (error != KErrNone)
 		{
-		User::Leave(err);
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapTlsPeapUtils::OpenTtlsDatabaseL(): aDatabase.Execute() failed error=%d\n"), error) );
+		
+		User::Leave(error);
 		}
 
 	// Create table for _allowed_ user certificates
 	
-//// NAME ////////////////// TYPE ////////////// Constant ///////////
-//| ServiceType		  	| UNSIGNED INTEGER | KServiceType        |//
-//| ServiceIndex		| UNSIGNED INTEGER | KServiceIndex       |//
-//| TunnelingType		| UNSIGNED INTEGER | KTunnelingType		|//
-//| CertLabel			| VARCHAR(255)     | KCACertLabel        |//	
-//| SubjectKeyId		| BINARY(20)	   | KSubjectKeyIdentifier |// This is Symbian subjectkey id
-//| ActualSubjectKeyId  | BINARY(20)	   | KActualSubjectKeyIdentifier |// This is the actual subjectkeyid present in the certificate.
-//| SubjectName			| VARCHAR(255)     | KSubjectName        |//	
-//| IssuerName			| VARCHAR(255)     | KIssuerName        |//	
-//| SerialNumber		| VARCHAR(255)     | KSerialNumber        |//	
-//| Thumbprint			| BINARY(64)	   | KThumbprint        |//	
-//////////////////////////////////////////////////////////////////////////////////////////////////////	
-	
-	_LIT(KSQLCreateTable2, "CREATE TABLE %S (%S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S VARCHAR(%d), \
-											 %S BINARY(%d), \
-											 %S BINARY(%d), \
-											 %S VARCHAR(%d), \
-											 %S VARCHAR(%d), \
-											 %S VARCHAR(%d), \
-											 %S BINARY(%d))");											 
+	//// NAME ////////////////// TYPE ////////////// Constant ///////////
+	//| ServiceType		  		| UNSIGNED INTEGER | KServiceType        |//
+	//| ServiceIndex			| UNSIGNED INTEGER | KServiceIndex       |//
+	//| TunnelingTypeVendorId	| UNSIGNED INTEGER  | KTunnelingTypeVendorId    |//
+	//| TunnelingType			| UNSIGNED INTEGER | KTunnelingType		|//
+	//| CertLabel				| VARCHAR(255)     | KCACertLabel        |//	
+	//| SubjectKeyId			| BINARY(20)	   | KSubjectKeyIdentifier |// This is Symbian subjectkey id
+	//| ActualSubjectKeyId		| BINARY(20)	   | KActualSubjectKeyIdentifier |// This is the actual subjectkeyid present in the certificate.
+	//| SubjectName				| VARCHAR(255)     | KSubjectName        |//	
+	//| IssuerName				| VARCHAR(255)     | KIssuerName        |//	
+	//| SerialNumber			| VARCHAR(255)     | KSerialNumber        |//	
+	//| Thumbprint				| BINARY(64)	   | KThumbprint        |//	
+	//////////////////////////////////////////////////////////////////////////////////////////////////////	
+	
+	_LIT(KSQLCreateTable2, "CREATE TABLE %S \
+		(%S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S VARCHAR(%d), \
+		 %S BINARY(%d), \
+		 %S BINARY(%d), \
+		 %S VARCHAR(%d), \
+		 %S VARCHAR(%d), \
+		 %S VARCHAR(%d), \
+		 %S BINARY(%d))");
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTtlsDatabaseL(): sqlStatement.Format(KSQLCreateTable2)\n")) );
+
+	sqlStatement.Format(KSQLCreateTable2,
+		&KTtlsAllowedUserCertsDatabaseTableName, 
+		&KServiceType, 
+		&KServiceIndex,
+		&KTunnelingTypeVendorId,
+		&KTunnelingType, 
+		&KCertLabel, KMaxCertLabelLengthInDB,
+		&KSubjectKeyIdentifier, KMaxSubjectKeyIdLengthInDB,
+		&KActualSubjectKeyIdentifier, KKeyIdentifierLength,
+		&KSubjectName, KGeneralStringMaxLength,
+		&KIssuerName, KGeneralStringMaxLength,
+		&KSerialNumber, KGeneralStringMaxLength,
+		&KThumbprint, KThumbprintMaxLength);
+		
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTtlsDatabaseL(): aDatabase.Execute()\n")) );
+
+	error = aDatabase.Execute(sqlStatement);
+	if (error != KErrNone && error != KErrAlreadyExists)
+	{
+		User::Leave(error);
+	}	
+
+	// Create table for _allowed_ CA certs
+
+	//// NAME ////////////////// TYPE ////////////// Constant ///////////
+	//| ServiceType				| UNSIGNED INTEGER | KServiceType        |//
+	//| ServiceIndex			| UNSIGNED INTEGER | KServiceIndex       |//
+	//| TunnelingTypeVendorId	| UNSIGNED INTEGER | KTunnelingTypeVendorId    |//
+	//| TunnelingType			| UNSIGNED INTEGER | KTunnelingType		|//
+	//| CACertLabel				| VARCHAR(255)     | KCACertLabel        |//	
+	//| SubjectKeyId			| BINARY(20)	   | KSubjectKeyIdentifier |// This is Symbian subjectkey id
+	//| ActualSubjectKeyId		| BINARY(20)	   | KActualSubjectKeyIdentifier |// This is the actual subjectkeyid present in the certificate.
+	//| SubjectName				| VARCHAR(255)     | KSubjectName        |//	
+	//| IssuerName				| VARCHAR(255)     | KIssuerName        |//	
+	//| SerialNumber			| VARCHAR(255)     | KSerialNumber        |//	
+	//| Thumbprint				| BINARY(64)	   | KThumbprint        |//	
+	//////////////////////////////////////////////////////////////////////////////////////////////////////	
+
+	_LIT(KSQLCreateTable3, "CREATE TABLE %S \
+		(%S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S VARCHAR(%d), \
+		 %S BINARY(%d), \
+		 %S BINARY(%d), \
+		 %S VARCHAR(%d), \
+		 %S VARCHAR(%d), \
+		 %S VARCHAR(%d), \
+		 %S BINARY(%d))");
 											 
-	sqlStatement.Format(KSQLCreateTable2, &KTtlsAllowedUserCertsDatabaseTableName, 
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTtlsDatabaseL(): sqlStatement.Format(KSQLCreateTable3)\n")) );
+
+	sqlStatement.Format(KSQLCreateTable3,
+		&KTtlsAllowedCACertsDatabaseTableName, 
 		&KServiceType, 
-		&KServiceIndex, 
+		&KServiceIndex,
+		&KTunnelingTypeVendorId,
 		&KTunnelingType, 
 		&KCertLabel, KMaxCertLabelLengthInDB,
 		&KSubjectKeyIdentifier, KMaxSubjectKeyIdLengthInDB,
@@ -1158,102 +1222,101 @@
 		&KSerialNumber, KGeneralStringMaxLength,
 		&KThumbprint, KThumbprintMaxLength);
 		
-	err = aDatabase.Execute(sqlStatement);
-	if (err != KErrNone && err != KErrAlreadyExists)
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTtlsDatabaseL(): aDatabase.Execute()\n")) );
+
+	error = aDatabase.Execute(sqlStatement);
+	if (error != KErrNone && error != KErrAlreadyExists)
 	{
-		User::Leave(err);
-	}	
-
-	// Create table for _allowed_ CA certs
-
-//// NAME ////////////////// TYPE ////////////// Constant ///////////
-//| ServiceType			| UNSIGNED INTEGER | KServiceType        |//
-//| ServiceIndex		| UNSIGNED INTEGER | KServiceIndex       |//
-//| TunnelingType		| UNSIGNED INTEGER | KTunnelingType		|//
-//| CACertLabel			| VARCHAR(255)     | KCACertLabel        |//	
-//| SubjectKeyId		| BINARY(20)	   | KSubjectKeyIdentifier |// This is Symbian subjectkey id
-//| ActualSubjectKeyId  | BINARY(20)	   | KActualSubjectKeyIdentifier |// This is the actual subjectkeyid present in the certificate.
-//| SubjectName			| VARCHAR(255)     | KSubjectName        |//	
-//| IssuerName			| VARCHAR(255)     | KIssuerName        |//	
-//| SerialNumber		| VARCHAR(255)     | KSerialNumber        |//	
-//| Thumbprint			| BINARY(64)	   | KThumbprint        |//	
-//////////////////////////////////////////////////////////////////////////////////////////////////////	
-
-	_LIT(KSQLCreateTable3, "CREATE TABLE %S (%S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S VARCHAR(%d), \
-											 %S BINARY(%d), \
-											 %S BINARY(%d), \
-											 %S VARCHAR(%d), \
-											 %S VARCHAR(%d), \
-											 %S VARCHAR(%d), \
-											 %S BINARY(%d))");
-											 
-	sqlStatement.Format(KSQLCreateTable3, &KTtlsAllowedCACertsDatabaseTableName, 
-		&KServiceType, 
-		&KServiceIndex, 
-		&KTunnelingType, 
-		&KCertLabel, KMaxCertLabelLengthInDB,
-		&KSubjectKeyIdentifier, KMaxSubjectKeyIdLengthInDB,
-		&KActualSubjectKeyIdentifier, KKeyIdentifierLength,
-		&KSubjectName, KGeneralStringMaxLength,
-		&KIssuerName, KGeneralStringMaxLength,
-		&KSerialNumber, KGeneralStringMaxLength,
-		&KThumbprint, KThumbprintMaxLength);
-		
-	err = aDatabase.Execute(sqlStatement);
-	if (err != KErrNone && err != KErrAlreadyExists)
-	{
-		User::Leave(err);
+		User::Leave(error);
 	}
 
 	// Create table for _allowed_ cipher suites
 
-//// NAME ///////////////// TYPE ////////////// Constant ///////////
-//| ServiceType			| UNSIGNED INTEGER | KServiceType        |//
-//| ServiceIndex		| UNSIGNED INTEGER | KServiceIndex       |//
-//| TunnelingType		| UNSIGNED INTEGER | KTunnelingType		|//
-//| CipherSuite			| UNSIGNED INTEGER | KCipherSuite        |//	
-//////////////////////////////////////////////////////////////////////////////////////////////////////	
-	
-	_LIT(KSQLCreateTable4, "CREATE TABLE %S (%S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER)");
-
-	sqlStatement.Format(KSQLCreateTable4, &KTtlsAllowedCipherSuitesDatabaseTableName, 
-		&KServiceType, &KServiceIndex, &KTunnelingType, &KCipherSuite);
-	err = aDatabase.Execute(sqlStatement);
-	if (err != KErrNone && err != KErrAlreadyExists)
+	//// NAME ///////////////// TYPE ////////////// Constant ///////////
+	//| ServiceType				| UNSIGNED INTEGER | KServiceType        |//
+	//| ServiceIndex			| UNSIGNED INTEGER | KServiceIndex       |//
+	//| TunnelingTypeVendorId	| UNSIGNED INTEGER | KTunnelingTypeVendorId    |//
+	//| TunnelingType			| UNSIGNED INTEGER | KTunnelingType		|//
+	//| CipherSuite				| UNSIGNED INTEGER | KCipherSuite        |//	
+	//////////////////////////////////////////////////////////////////////////////////////////////////////	
+	
+	_LIT(KSQLCreateTable4, "CREATE TABLE %S \
+		(%S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER)");
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTtlsDatabaseL(): sqlStatement.Format(KSQLCreateTable4)\n")) );
+
+	sqlStatement.Format(KSQLCreateTable4,
+		&KTtlsAllowedCipherSuitesDatabaseTableName, 
+		&KServiceType,
+		&KServiceIndex,
+		&KTunnelingTypeVendorId,
+		&KTunnelingType,
+		&KCipherSuite);
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTtlsDatabaseL(): aDatabase.Execute()\n")) );
+
+	error = aDatabase.Execute(sqlStatement);
+	if (error != KErrNone && error != KErrAlreadyExists)
 	{
-		User::Leave(err);
+		User::Leave(error);
 	}
 
 	// 4. Check if database table contains a row for this service type and id  	
 	
-	_LIT(KSQLQueryRow, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-
-	sqlStatement.Format(KSQLQueryRow, &KTtlsDatabaseTableName, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);	
+	_LIT(KSQLQueryRow, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTtlsDatabaseL(): sqlStatement.Format(KSQLQueryRow)\n")) );
+
+	sqlStatement.Format(KSQLQueryRow,
+		&KTtlsDatabaseTableName, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());	
 			
 	RDbView view;
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTtlsDatabaseL(): view.Prepare()\n")) );
+
 	User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement), TDbWindow::EUnlimited));
 	// View must be closed when no longer needed
 	CleanupClosePushL(view);
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTtlsDatabaseL(): view.EvaluateAll()\n")) );
+
 	User::LeaveIfError(view.EvaluateAll());
 	
 	// 5. If row is not found then add it
 	
 	TInt rows = view.CountL();
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTtlsDatabaseL(): view.CountL()=%d\n"),
+		rows));
+
 	CleanupStack::PopAndDestroy(); // view
 	if (rows == 0)
 	{
 		_LIT(KSQLInsert, "SELECT * FROM %S");
+
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTtlsDatabaseL(): sqlStatement.Format(KSQLInsert)\n")) );
+
 		sqlStatement.Format(KSQLInsert, &KTtlsDatabaseTableName);	
 
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTtlsDatabaseL(): view.Prepare()\n")) );
+
 		User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement), TDbWindow::EUnlimited, RDbView::EInsertOnly));
 		CleanupClosePushL(view);
+
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTtlsDatabaseL(): view.InsertL()\n")) );
+
 		view.InsertL();
 
 		// Get column set so we get the correct column numbers
@@ -1263,13 +1326,14 @@
 		// Set the default values. The other three tables (certs, ca certs & cipher suites) are empty by default.
 		view.SetColL(colSet->ColNo(KServiceType), static_cast<TInt>(aIndexType));
 		view.SetColL(colSet->ColNo(KServiceIndex), aIndex);		
-		view.SetColL(colSet->ColNo(KTunnelingType), aTunnelingVendorType);
+		view.SetColL(colSet->ColNo(KTunnelingTypeVendorId), aTunnelingType.get_vendor_id());
+		view.SetColL(colSet->ColNo(KTunnelingType), aTunnelingType.get_vendor_type());
 		
 		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_use_manual_realm_literal), default_EAP_TLS_PEAP_use_manual_realm);
-		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_manual_realm_literal), default_EAP_TLS_PEAP_manual_realm);
+		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_manual_realm_literal), default_EAP_realm);
 		
 		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_use_manual_username_literal), default_EAP_TLS_PEAP_use_manual_username);
-		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_manual_username_literal), default_EAP_TLS_PEAP_manual_username);
+		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_manual_username_literal), default_EAP_username);
 		
 		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_cipher_suite_literal), default_EAP_TLS_PEAP_cipher_suite);
 
@@ -1325,15 +1389,26 @@
 			colSet->ColNo( KTTLSPAPLastFullAuthTime ),
 			KDefaultFullPapAuthTime );		
 
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTtlsDatabaseL(): view.SetColL(cf_str_EAP_TLS_PEAP_use_automatic_ca_certificate_literal)\n")) );
+
+		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_use_automatic_ca_certificate_literal), default_EAP_TLS_PEAP_use_automatic_ca_certificate);
 		
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTtlsDatabaseL(): view.PutL()\n")) );
+
 		view.PutL();
 		
 		CleanupStack::PopAndDestroy(colSet); 
-		CleanupStack::PopAndDestroy( &view ); // Close view.
+		CleanupStack::PopAndDestroy( &view );
 
 		// Add default disabled cipher suites
 		_LIT(KSQLInsert2, "SELECT * FROM %S");
+
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTtlsDatabaseL(): sqlStatement.Format(KSQLInsert2)\n")) );
+
 		sqlStatement.Format(KSQLInsert2, &KTtlsAllowedCipherSuitesDatabaseTableName);
+
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTtlsDatabaseL(): view.Prepare()\n")) );
+
 		User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement), TDbWindow::EUnlimited, RDbView::EInsertOnly));
 		CleanupClosePushL(view);
 
@@ -1347,14 +1422,15 @@
 			view.InsertL();
 			view.SetColL(colSet->ColNo(KServiceType), static_cast<TInt>(aIndexType));
 			view.SetColL(colSet->ColNo(KServiceIndex), aIndex);		
-			view.SetColL(colSet->ColNo(KTunnelingType), aTunnelingVendorType);			
+			view.SetColL(colSet->ColNo(KTunnelingTypeVendorId), aTunnelingType.get_vendor_id());
+			view.SetColL(colSet->ColNo(KTunnelingType), aTunnelingType.get_vendor_type());
 			view.SetColL(colSet->ColNo(KCipherSuite), default_allowed_cipher_suites[i]);
 			view.PutL();
 			i++;
 		}
 		
-		CleanupStack::PopAndDestroy( colSet ); // Delete colSet.		
-		CleanupStack::PopAndDestroy( &view ); // Close view.
+		CleanupStack::PopAndDestroy( colSet );
+		CleanupStack::PopAndDestroy( &view );
 	}
 	 
 	// 6. Do the altering of tables here. 
@@ -1364,18 +1440,21 @@
 
 	// For the table _allowed_ USER certificates
 	tableName = KTtlsAllowedUserCertsDatabaseTableName;	
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTtlsDatabaseL(): AddExtraCertColumnsL()\n")) );
 	AddExtraCertColumnsL(aDatabase,tableName);
 	
 	// For the table _allowed_ CA certificates	
 	tableName = KTtlsAllowedCACertsDatabaseTableName;	
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTtlsDatabaseL(): AddExtraCertColumnsL()\n")) );
 	AddExtraCertColumnsL(aDatabase,tableName);
 
-	CleanupStack::PopAndDestroy( buf ); // Delete buf or sqlStatement
-	CleanupStack::Pop( &aDatabase );	
-	CleanupStack::Pop( &aSession );
-	
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenTtlsDatabaseL(): aDatabase.Compact()\n")) );
 	aDatabase.Compact();
-	
+
+	CleanupStack::PopAndDestroy( buf );
+	CleanupStack::Pop( &aDatabase );
+	CleanupStack::Pop( &aFileServerSession );
+
 } // EapTlsPeapUtils::OpenTtlsDatabaseL()
 
 #endif // #if defined(USE_TTLS_EAP_TYPE)
@@ -1387,117 +1466,83 @@
 // ---------------------------------------------------------
 //
 void EapTlsPeapUtils::OpenFastDatabaseL(
-	RDbNamedDatabase& aDatabase, 
-	RDbs& aSession, 
-	const TIndexType aIndexType, 
+	RDbNamedDatabase& aDatabase,
+	RFs& aFileServerSession,
+	const TIndexType aIndexType,
 	const TInt aIndex,
 	const eap_type_value_e aTunnelingType)
-    {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
-
-#else
-
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
+{
 	EAP_TRACE_DEBUG_SYMBIAN(
-		(_L("EapTlsPeapUtils::OpenFastDatabaseL -Start- aIndexType=%d, aIndex=%d, Tunneling vendor type=%d \n"),
-		aIndexType,aIndex, aTunnelingVendorType));
+		(_L("EapTlsPeapUtils::OpenFastDatabaseL(): - Start - aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type()));
+
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapTlsPeapUtils::OpenFastDatabaseL()\n"));
 
 	// 1. Open/create a database	
-	
-	// Connect to the DBMS server.
-	User::LeaveIfError(aSession.Connect());		
-	CleanupClosePushL(aSession);	
-	// aSession and aDatabase are pushed to the cleanup stack even though they may be member
-	// variables of the calling class and would be closed in the destructor anyway. This ensures
-	// that if they are not member variables they will be closed. Closing the handle twice
-	// does no harm.	
-	
-#ifdef SYMBIAN_SECURE_DBMS
-	
-	// Create the secure shared database with the specified secure policy.
-	// Database will be created in the data caging path for DBMS (C:\private\100012a5).
-	
-	TInt err = aDatabase.Create(aSession, KFastDatabaseName, KSecureUIDFormat);
-
-	EAP_TRACE_DEBUG_SYMBIAN(
-		(_L("EapTlsPeapUtils::OpenFastDatabaseL - Created Secure DB for eapfast.dat. err=%d (-11=DB created before)\n"),
-		err) );
-	
-	if(err == KErrNone)
+
+	TInt error(KErrNone);
+	TFileName aPrivateDatabasePathName;
+
+	EapPluginTools::CreateDatabaseLC(
+		aDatabase,
+		aFileServerSession,
+		error,
+		KFastDatabaseName,
+		aPrivateDatabasePathName);
+
+	if(error == KErrNone)
 	{
 		aDatabase.Close();
-		
-	} else if (err != KErrAlreadyExists) 
+	}
+	else if (error != KErrAlreadyExists) 
 	{
-		User::LeaveIfError(err);
+		User::LeaveIfError(error);
 	}
 	
-	User::LeaveIfError(aDatabase.Open(aSession, KFastDatabaseName, KSecureUIDFormat));
-	CleanupClosePushL(aDatabase);		
-		
-#else
-	// For non-secured database. The database will be created in the old location (c:\system\data).
-	
-	RFs fsSession;		
-	User::LeaveIfError(fsSession.Connect());
-	CleanupClosePushL(fsSession);	
-	TInt err = aDatabase.Create(fsSession, KFastDatabaseName);
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenFastDatabaseL - Created Non-Secure DB for eapfast.dat. err=%d\n"), err) );
-	
-	if(err == KErrNone)
-	{
-		aDatabase.Close();
-		
-	} else if (err != KErrAlreadyExists) 
-	{
-		User::LeaveIfError(err);
-	}
-	
-	User::LeaveIfError(aDatabase.Open(fsSession, KFastDatabaseName));
-	
-	CleanupStack::PopAndDestroy(); // close fsSession
-	
-	CleanupClosePushL(aDatabase);		
-	    
-#endif // #ifdef SYMBIAN_SECURE_DBMS
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenFastDatabaseL(): - calls aDatabase.Open()\n")));
+
+	error = aDatabase.Open(aFileServerSession, aPrivateDatabasePathName);
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::OpenFastDatabaseL(): - Opened private DB for EAP-FAST. error=%d\n"), error));
+
+	User::LeaveIfError(error);
 
 	// 2. Create the eapfast tables to database (ignore error if exists)
 	
 	// Table 1: Create table for general settings of EAP-FAST.
 	
-// Table columns:
-//// NAME //////////////////////////////////////////// TYPE ////////////// Constant ///////////////////
-//| ServiceType									| UNSIGNED INTEGER 	| KServiceType        |//
-//| ServiceIndex								| UNSIGNED INTEGER 	| KServiceIndex       |//
-//| TunnelingType								| UNSIGNED INTEGER 	| KTunnelingType		|//
-//| EAP_TLS_PEAP_use_manual_realm				| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_use_manual_realm_literal      |//
-//| EAP_TLS_PEAP_manual_realm					| VARCHAR(255)     	| cf_str_EAP_TLS_PEAP_manual_realm_literal				|//
-//| EAP_TLS_PEAP_use_manual_username			| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_use_manual_username_literal   |//
-//| EAP_TLS_PEAP_manual_username				| VARCHAR(255)     	| cf_str_EAP_TLS_PEAP_manual_username_literal			|//
-//| EAP_TLS_PEAP_cipher_suite					| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_cipher_suite_literal	   |//
-//| EAP_TLS_PEAP_used_PEAP_version				| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_used_PEAP_version_literal		    |//
-//| EAP_TLS_PEAP_accepted_PEAP_versions			| BINARY(12)	    | cf_str_EAP_TLS_PEAP_accepted_PEAP_versions_literal|//
-//| PEAP_accepted_tunneled_client_types			| VARBINARY(240) 	| cf_str_PEAP_accepted_tunneled_client_types_hex_data_literal      |//
-//| PEAP_unaccepted_tunneled_client_types		| VARBINARY(240) 	| cf_str_PEAP_unaccepted_tunneled_client_types_hex_data_literal      |//
-//| EAP_TLS_server_authenticates_client		    | UNSIGNED INTEGER 	| cf_str_TLS_server_authenticates_client_policy_in_client_literal|//
-//| EAP_TLS_PEAP_saved_session_id				| BINARY(32)       	| cf_str_EAP_TLS_PEAP_saved_session_id_literal		   |//
-//| EAP_TLS_PEAP_saved_master_secret			| BINARY(48)       	| cf_str_EAP_TLS_PEAP_saved_master_secret_literal	   |//
-//| EAP_TLS_PEAP_saved_cipher_suite				| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_saved_cipher_suite_literal   |//
-//| EAP_TLS_PEAP_verify_certificate_realm		| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_verify_certificate_realm_literal		   |//
-//| EAP_FAST_max_session_validity_time			| BIGINT	   		| cf_str_EAP_FAST_max_session_validity_time_literal   |//
-//| EAP_FAST_last_full_authentication_time		| BIGINT	   		| KFASTLastFullAuthTime	   	|//	
-//| EAP_TLS_PEAP_use_identity_privacy			| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_use_identity_privacy_literal		   |//
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////	
-
-/** moved to PAC store db, because time is the same for all IAPs **/	
-//| EAP_FAST_last_password_identity_time	| BIGINT	   		| KFASTLastPasswordIdentityTime	   	|//	
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////		
+	// Table columns:
+	//// NAME //////////////////////////////////////////// TYPE ////////////// Constant ///////////////////
+	//| ServiceType									| UNSIGNED INTEGER 	| KServiceType        |//
+	//| ServiceIndex								| UNSIGNED INTEGER 	| KServiceIndex       |//
+	//| TunnelingTypeVendorId                       | UNSIGNED INTEGER  | KTunnelingTypeVendorId    |//
+	//| TunnelingType								| UNSIGNED INTEGER 	| KTunnelingType		|//
+	//| EAP_TLS_PEAP_use_manual_realm				| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_use_manual_realm_literal      |//
+	//| EAP_TLS_PEAP_manual_realm					| VARCHAR(255)     	| cf_str_EAP_TLS_PEAP_manual_realm_literal				|//
+	//| EAP_TLS_PEAP_use_manual_username			| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_use_manual_username_literal   |//
+	//| EAP_TLS_PEAP_manual_username				| VARCHAR(255)     	| cf_str_EAP_TLS_PEAP_manual_username_literal			|//
+	//| EAP_TLS_PEAP_cipher_suite					| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_cipher_suite_literal	   |//
+	//| EAP_TLS_PEAP_used_PEAP_version				| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_used_PEAP_version_literal		    |//
+	//| EAP_TLS_PEAP_accepted_PEAP_versions			| BINARY(12)	    | cf_str_EAP_TLS_PEAP_accepted_PEAP_versions_literal|//
+	//| PEAP_accepted_tunneled_client_types			| VARBINARY(240) 	| cf_str_PEAP_accepted_tunneled_client_types_hex_data_literal      |//
+	//| PEAP_unaccepted_tunneled_client_types		| VARBINARY(240) 	| cf_str_PEAP_unaccepted_tunneled_client_types_hex_data_literal      |//
+	//| EAP_TLS_server_authenticates_client		    | UNSIGNED INTEGER 	| cf_str_TLS_server_authenticates_client_policy_in_client_literal|//
+	//| EAP_TLS_PEAP_saved_session_id				| BINARY(32)       	| cf_str_EAP_TLS_PEAP_saved_session_id_literal		   |//
+	//| EAP_TLS_PEAP_saved_master_secret			| BINARY(48)       	| cf_str_EAP_TLS_PEAP_saved_master_secret_literal	   |//
+	//| EAP_TLS_PEAP_saved_cipher_suite				| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_saved_cipher_suite_literal   |//
+	//| EAP_TLS_PEAP_verify_certificate_realm		| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_verify_certificate_realm_literal		   |//
+	//| EAP_FAST_max_session_validity_time			| BIGINT	   		| cf_str_EAP_FAST_max_session_validity_time_literal   |//
+	//| EAP_FAST_last_full_authentication_time		| BIGINT	   		| KFASTLastFullAuthTime	   	|//	
+	//| EAP_TLS_PEAP_use_identity_privacy			| UNSIGNED INTEGER 	| cf_str_EAP_TLS_PEAP_use_identity_privacy_literal		   |//
+	//| EAP_TLS_PEAP_use_automatic_ca_certificate	| UNSIGNED INTEGER  | cf_str_EAP_TLS_PEAP_use_automatic_ca_certificate_literal|//
+	//////////////////////////////////////////////////////////////////////////////////////////////////////////////	
+
+	/** moved to PAC store db, because time is the same for all IAPs **/	
+	//| EAP_FAST_last_password_identity_time	| BIGINT	   		| KFASTLastPasswordIdentityTime	   	|//	
+	//////////////////////////////////////////////////////////////////////////////////////////////////////////////		
 	
 	
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
@@ -1506,35 +1551,40 @@
 	EAP_TRACE_DEBUG_SYMBIAN(
 		(_L("EapTlsPeapUtils::OpenFastDatabaseL - Creating the tables for EAP-FAST\n")));
 	
-	_LIT(KSQLCreateTable1, "CREATE TABLE %S (%S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S VARCHAR(%d),     \
-											 %S UNSIGNED INTEGER, \
-											 %S VARCHAR(%d),     \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S BINARY(%d),		  \
-											 %S VARBINARY(%d),	  \
-											 %S VARBINARY(%d),	  \
-											 %S UNSIGNED INTEGER, \
-											 %S BINARY(%d),		  \
-											 %S BINARY(%d),		  \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S BIGINT, \
-											 %S BIGINT, \
-											 %S UNSIGNED INTEGER)");
-	
-	sqlStatement.Format(KSQLCreateTable1, &KFastGeneralSettingsDBTableName,
+	_LIT(KSQLCreateTable1, "CREATE TABLE %S \
+		(%S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S VARCHAR(%d),     \
+		 %S UNSIGNED INTEGER, \
+		 %S VARCHAR(%d),     \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S BINARY(%d),		  \
+		 %S VARBINARY(%d),	  \
+		 %S VARBINARY(%d),	  \
+		 %S UNSIGNED INTEGER, \
+		 %S BINARY(%d),		  \
+		 %S BINARY(%d),		  \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S BIGINT, \
+		 %S BIGINT, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER)");
+
+	sqlStatement.Format(KSQLCreateTable1,
+		&KFastGeneralSettingsDBTableName,
 		&KServiceType,
 		&KServiceIndex,
+		&KTunnelingTypeVendorId,
 		&KTunnelingType,
 		&cf_str_EAP_TLS_PEAP_use_manual_realm_literal,
-		&cf_str_EAP_TLS_PEAP_manual_realm_literal, KMaxManualRealmLengthInDB,
+		&cf_str_EAP_TLS_PEAP_manual_realm_literal, KMaxRealmLengthInDB,
 		&cf_str_EAP_TLS_PEAP_use_manual_username_literal,
-		&cf_str_EAP_TLS_PEAP_manual_username_literal, KMaxManualUsernameLengthInDB,
+		&cf_str_EAP_TLS_PEAP_manual_username_literal, KMaxUsernameLengthInDB,
 		&cf_str_EAP_TLS_PEAP_cipher_suite_literal,
 		&cf_str_EAP_TLS_PEAP_used_PEAP_version_literal,
 		&cf_str_EAP_TLS_PEAP_accepted_PEAP_versions_literal, KMaxPEAPVersionsStringLengthInDB,
@@ -1547,15 +1597,16 @@
 		&cf_str_EAP_TLS_PEAP_verify_certificate_realm_literal,
 		&cf_str_EAP_FAST_max_session_validity_time_literal,
 		&KFASTLastFullAuthTime,
-		&cf_str_EAP_TLS_PEAP_use_identity_privacy_literal);		
-	
+		&cf_str_EAP_TLS_PEAP_use_identity_privacy_literal,
+		&cf_str_EAP_TLS_PEAP_use_automatic_ca_certificate_literal);
+
 	EAP_TRACE_DEBUG_SYMBIAN(
 		(_L("EapTlsPeapUtils::OpenFastDatabaseL - SQL query formated OK\n")));
 	
-	err = aDatabase.Execute(sqlStatement);
-	if (err != KErrNone && err != KErrAlreadyExists)
+	error = aDatabase.Execute(sqlStatement);
+	if (error != KErrNone && error != KErrAlreadyExists)
 	{
-		User::Leave(err);
+		User::Leave(error);
 	}
 
 	EAP_TRACE_DEBUG_SYMBIAN(
@@ -1563,35 +1614,40 @@
 
 	// Table 2: Create table for Special settings of EAP-FAST.
 	
-// Table columns:
-//// NAME //////////////////////////////////////////// TYPE ////////////// Constant ///////////////////
-//| ServiceType									| UNSIGNED INTEGER 	| KServiceType        |//
-//| ServiceIndex								| UNSIGNED INTEGER 	| KServiceIndex       |//
-//| TunnelingType								| UNSIGNED INTEGER 	| KTunnelingType		|//
-//| EAP_FAST_allow_server_authenticated_provisioning_mode| UNSIGNED INTEGER	| cf_str_EAP_FAST_allow_server_authenticated_provisioning_mode_literal	   	|//	
-//| EAP_FAST_allow_server_unauthenticated_provisioning_mode_ADHP| UNSIGNED INTEGER	| cf_str_EAP_FAST_allow_server_unauthenticated_provisioning_mode_ADHP_literal	   	|//	
-//| EAP_FAST_Warn_ADHP_No_PAC					| UNSIGNED INTEGER	| KFASTWarnADHPNoPACP|//	
-//| EAP_FAST_Warn_ADHP_No_Matching_PAC			| UNSIGNED INTEGER	| KFASTWarnADHPNoMatchingPAC|//	
-//| EAP_FAST_Warn_Not_Default_Server			| UNSIGNED INTEGER	| KFASTWarnNotDefaultServer|//	
-//| EAP_FAST_PAC_Group_Import_Reference_Collection| VARCHAR(255)	| KFASTPACGroupImportReferenceCollection	   	|//	
-//| EAP_FAST_PAC_Group_DB_Reference_Collection	| BINARY(255)		| KFASTPACGroupDBReferenceCollection	   	|//		
-//////////////////////////////////////////////////////////////////////////////////////////////////////////////	
-
-	
-	_LIT(KSQLCreateTable2, "CREATE TABLE %S (%S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S VARCHAR(%d),     \
-											 %S BINARY(%d)		  )");
+	// Table columns:
+	//// NAME //////////////////////////////////////////// TYPE ////////////// Constant ///////////////////
+	//| ServiceType									| UNSIGNED INTEGER 	| KServiceType        |//
+	//| ServiceIndex								| UNSIGNED INTEGER 	| KServiceIndex       |//
+	//| TunnelingTypeVendorId                       | UNSIGNED INTEGER  | KTunnelingTypeVendorId    |//
+	//| TunnelingType								| UNSIGNED INTEGER 	| KTunnelingType		|//
+	//| EAP_FAST_allow_server_authenticated_provisioning_mode| UNSIGNED INTEGER	| cf_str_EAP_FAST_allow_server_authenticated_provisioning_mode_literal	   	|//	
+	//| EAP_FAST_allow_server_unauthenticated_provisioning_mode_ADHP| UNSIGNED INTEGER	| cf_str_EAP_FAST_allow_server_unauthenticated_provisioning_mode_ADHP_literal	   	|//	
+	//| EAP_FAST_Warn_ADHP_No_PAC					| UNSIGNED INTEGER	| KFASTWarnADHPNoPAC|//
+	//| EAP_FAST_Warn_ADHP_No_Matching_PAC			| UNSIGNED INTEGER	| KFASTWarnADHPNoMatchingPAC|//	
+	//| EAP_FAST_Warn_Not_Default_Server			| UNSIGNED INTEGER	| KFASTWarnNotDefaultServer|//	
+	//| EAP_FAST_PAC_Group_Import_Reference_Collection| VARCHAR(255)	| KFASTPACGroupImportReferenceCollection	   	|//	
+	//| EAP_FAST_PAC_Group_DB_Reference_Collection	| BINARY(255)		| KFASTPACGroupDBReferenceCollection	   	|//		
+	//////////////////////////////////////////////////////////////////////////////////////////////////////////////	
+
+	
+	_LIT(KSQLCreateTable2, "CREATE TABLE %S \
+		(%S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S VARCHAR(%d),     \
+		 %S BINARY(%d)		  )");
 											 
-	sqlStatement.Format(KSQLCreateTable2, &KFastSpecialSettingsDBTableName,
+	sqlStatement.Format(KSQLCreateTable2,
+		&KFastSpecialSettingsDBTableName,
 		&KServiceType,
 		&KServiceIndex,
+		&KTunnelingTypeVendorId,
 		&KTunnelingType,
 		&cf_str_EAP_FAST_allow_server_authenticated_provisioning_mode_literal,
 		&cf_str_EAP_FAST_allow_server_unauthenticated_provisioning_mode_ADHP_literal,
@@ -1604,10 +1660,10 @@
 	EAP_TRACE_DEBUG_SYMBIAN(
 		(_L("EapTlsPeapUtils::OpenFastDatabaseL - SQL query formated OK\n")));
 	
-	err = aDatabase.Execute(sqlStatement);
-	if (err != KErrNone && err != KErrAlreadyExists)
+	error = aDatabase.Execute(sqlStatement);
+	if (error != KErrNone && error != KErrAlreadyExists)
 	{
-		User::Leave(err);
+		User::Leave(error);
 	}
 
 	EAP_TRACE_DEBUG_SYMBIAN(
@@ -1615,33 +1671,38 @@
 	
 	// Table 3: Create table for _allowed_ user certificates
 	
-//// NAME ////////////////// TYPE ////////////// Constant ///////////
-//| ServiceType		  	| UNSIGNED INTEGER | KServiceType        |//
-//| ServiceIndex		| UNSIGNED INTEGER | KServiceIndex       |//
-//| TunnelingType		| UNSIGNED INTEGER | KTunnelingType		|//
-//| CertLabel			| VARCHAR(255)     | KCACertLabel        |//	
-//| SubjectKeyId		| BINARY(20)	   | KSubjectKeyIdentifier |// This is Symbian subjectkey id
-//| ActualSubjectKeyId  | BINARY(20)	   | KActualSubjectKeyIdentifier |// This is the actual subjectkeyid present in the certificate.
-//| SubjectName			| VARCHAR(255)     | KSubjectName        |//	
-//| IssuerName			| VARCHAR(255)     | KIssuerName        |//	
-//| SerialNumber		| VARCHAR(255)     | KSerialNumber        |//	
-//| Thumbprint			| BINARY(64)	   | KThumbprint        |//	
-//////////////////////////////////////////////////////////////////////////////////////////////////////	
-	
-	_LIT(KSQLCreateTable3, "CREATE TABLE %S (%S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S VARCHAR(%d), \
-											 %S BINARY(%d), \
-											 %S BINARY(%d), \
-											 %S VARCHAR(%d), \
-											 %S VARCHAR(%d), \
-											 %S VARCHAR(%d), \
-											 %S BINARY(%d))");											 
+	//// NAME ////////////////// TYPE ////////////// Constant ///////////
+	//| ServiceType		  		| UNSIGNED INTEGER | KServiceType        |//
+	//| ServiceIndex			| UNSIGNED INTEGER | KServiceIndex       |//
+	//| TunnelingTypeVendorId	| UNSIGNED INTEGER  | KTunnelingTypeVendorId    |//
+	//| TunnelingType			| UNSIGNED INTEGER | KTunnelingType		|//
+	//| CertLabel				| VARCHAR(255)     | KCACertLabel        |//	
+	//| SubjectKeyId			| BINARY(20)	   | KSubjectKeyIdentifier |// This is Symbian subjectkey id
+	//| ActualSubjectKeyId		| BINARY(20)	   | KActualSubjectKeyIdentifier |// This is the actual subjectkeyid present in the certificate.
+	//| SubjectName				| VARCHAR(255)     | KSubjectName        |//	
+	//| IssuerName				| VARCHAR(255)     | KIssuerName        |//	
+	//| SerialNumber			| VARCHAR(255)     | KSerialNumber        |//	
+	//| Thumbprint				| BINARY(64)	   | KThumbprint        |//	
+	//////////////////////////////////////////////////////////////////////////////////////////////////////	
+	
+	_LIT(KSQLCreateTable3, "CREATE TABLE %S \
+		(%S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S VARCHAR(%d), \
+		 %S BINARY(%d), \
+		 %S BINARY(%d), \
+		 %S VARCHAR(%d), \
+		 %S VARCHAR(%d), \
+		 %S VARCHAR(%d), \
+		 %S BINARY(%d))");											 
 											 
-	sqlStatement.Format(KSQLCreateTable3, &KFastAllowedUserCertsDatabaseTableName, 
+	sqlStatement.Format(KSQLCreateTable3,
+		&KFastAllowedUserCertsDatabaseTableName, 
 		&KServiceType, 
-		&KServiceIndex, 
+		&KServiceIndex,
+		&KTunnelingTypeVendorId,
 		&KTunnelingType, 
 		&KCertLabel, KMaxCertLabelLengthInDB,
 		&KSubjectKeyIdentifier, KMaxSubjectKeyIdLengthInDB,
@@ -1654,10 +1715,10 @@
 	EAP_TRACE_DEBUG_SYMBIAN(
 		(_L("EapTlsPeapUtils::OpenFastDatabaseL - SQL query formated OK\n")));
 	
-	err = aDatabase.Execute(sqlStatement);
-	if (err != KErrNone && err != KErrAlreadyExists)
+	error = aDatabase.Execute(sqlStatement);
+	if (error != KErrNone && error != KErrAlreadyExists)
 	{
-		User::Leave(err);
+		User::Leave(error);
 	}	
 
 	EAP_TRACE_DEBUG_SYMBIAN(
@@ -1665,33 +1726,38 @@
 	
 	// Table 4: Create table for _allowed_ CA certs
 
-//// NAME ////////////////// TYPE ////////////// Constant ///////////
-//| ServiceType			| UNSIGNED INTEGER | KServiceType        |//
-//| ServiceIndex		| UNSIGNED INTEGER | KServiceIndex       |//
-//| TunnelingType		| UNSIGNED INTEGER | KTunnelingType		|//
-//| CACertLabel			| VARCHAR(255)     | KCACertLabel        |//	
-//| SubjectKeyId		| BINARY(20)	   | KSubjectKeyIdentifier |// This is Symbian subjectkey id
-//| ActualSubjectKeyId  | BINARY(20)	   | KActualSubjectKeyIdentifier |// This is the actual subjectkeyid present in the certificate.
-//| SubjectName			| VARCHAR(255)     | KSubjectName        |//	
-//| IssuerName			| VARCHAR(255)     | KIssuerName        |//	
-//| SerialNumber		| VARCHAR(255)     | KSerialNumber        |//	
-//| Thumbprint			| BINARY(64)	   | KThumbprint        |//	
-//////////////////////////////////////////////////////////////////////////////////////////////////////	
-
-	_LIT(KSQLCreateTable4, "CREATE TABLE %S (%S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S VARCHAR(%d), \
-											 %S BINARY(%d), \
-											 %S BINARY(%d), \
-											 %S VARCHAR(%d), \
-											 %S VARCHAR(%d), \
-											 %S VARCHAR(%d), \
-											 %S BINARY(%d))");
+	//// NAME ////////////////// TYPE ////////////// Constant ///////////
+	//| ServiceType				| UNSIGNED INTEGER | KServiceType        |//
+	//| ServiceIndex			| UNSIGNED INTEGER | KServiceIndex       |//
+	//| TunnelingTypeVendorId	| UNSIGNED INTEGER  | KTunnelingTypeVendorId    |//
+	//| TunnelingType			| UNSIGNED INTEGER | KTunnelingType		|//
+	//| CACertLabel				| VARCHAR(255)     | KCACertLabel        |//	
+	//| SubjectKeyId			| BINARY(20)	   | KSubjectKeyIdentifier |// This is Symbian subjectkey id
+	//| ActualSubjectKeyId		| BINARY(20)	   | KActualSubjectKeyIdentifier |// This is the actual subjectkeyid present in the certificate.
+	//| SubjectName				| VARCHAR(255)     | KSubjectName        |//	
+	//| IssuerName				| VARCHAR(255)     | KIssuerName        |//	
+	//| SerialNumber			| VARCHAR(255)     | KSerialNumber        |//	
+	//| Thumbprint				| BINARY(64)	   | KThumbprint        |//	
+	//////////////////////////////////////////////////////////////////////////////////////////////////////	
+
+	_LIT(KSQLCreateTable4, "CREATE TABLE %S \
+		(%S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S VARCHAR(%d), \
+		 %S BINARY(%d), \
+		 %S BINARY(%d), \
+		 %S VARCHAR(%d), \
+		 %S VARCHAR(%d), \
+		 %S VARCHAR(%d), \
+		 %S BINARY(%d))");
 											 
-	sqlStatement.Format(KSQLCreateTable4, &KFastAllowedCACertsDatabaseTableName, 
+	sqlStatement.Format(KSQLCreateTable4,
+		&KFastAllowedCACertsDatabaseTableName, 
 		&KServiceType, 
-		&KServiceIndex, 
+		&KServiceIndex,
+		&KTunnelingTypeVendorId,
 		&KTunnelingType, 
 		&KCertLabel, KMaxCertLabelLengthInDB,
 		&KSubjectKeyIdentifier, KMaxSubjectKeyIdLengthInDB,
@@ -1704,10 +1770,10 @@
 	EAP_TRACE_DEBUG_SYMBIAN(
 		(_L("EapTlsPeapUtils::OpenFastDatabaseL - SQL query formated OK\n")));
 		
-	err = aDatabase.Execute(sqlStatement);
-	if (err != KErrNone && err != KErrAlreadyExists)
+	error = aDatabase.Execute(sqlStatement);
+	if (error != KErrNone && error != KErrAlreadyExists)
 	{
-		User::Leave(err);
+		User::Leave(error);
 	}
 
 	EAP_TRACE_DEBUG_SYMBIAN(
@@ -1715,24 +1781,33 @@
 	
 	// Table 5: Create table for _allowed_ cipher suites
 
-//// NAME ///////////////// TYPE ////////////// Constant ///////////
-//| ServiceType			| UNSIGNED INTEGER | KServiceType        |//
-//| ServiceIndex		| UNSIGNED INTEGER | KServiceIndex       |//
-//| TunnelingType		| UNSIGNED INTEGER | KTunnelingType		|//
-//| CipherSuite			| UNSIGNED INTEGER | KCipherSuite        |//	
-//////////////////////////////////////////////////////////////////////////////////////////////////////	
-	
-	_LIT(KSQLCreateTable5, "CREATE TABLE %S (%S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER, \
-											 %S UNSIGNED INTEGER)");
-
-	sqlStatement.Format(KSQLCreateTable5, &KFastAllowedCipherSuitesDatabaseTableName, 
-		&KServiceType, &KServiceIndex, &KTunnelingType, &KCipherSuite);
-	err = aDatabase.Execute(sqlStatement);
-	if (err != KErrNone && err != KErrAlreadyExists)
+	//// NAME ///////////////// TYPE ////////////// Constant ///////////
+	//| ServiceType				| UNSIGNED INTEGER | KServiceType        |//
+	//| ServiceIndex			| UNSIGNED INTEGER | KServiceIndex       |//
+	//| TunnelingTypeVendorId	| UNSIGNED INTEGER  | KTunnelingTypeVendorId    |//
+	//| TunnelingType			| UNSIGNED INTEGER | KTunnelingType		|//
+	//| CipherSuite				| UNSIGNED INTEGER | KCipherSuite        |//	
+	//////////////////////////////////////////////////////////////////////////////////////////////////////	
+	
+	_LIT(KSQLCreateTable5, "CREATE TABLE %S \
+		(%S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER, \
+		 %S UNSIGNED INTEGER)");
+
+	sqlStatement.Format(KSQLCreateTable5,
+		&KFastAllowedCipherSuitesDatabaseTableName, 
+		&KServiceType,
+		&KServiceIndex,
+		&KTunnelingTypeVendorId,
+		&KTunnelingType,
+		&KCipherSuite);
+
+	error = aDatabase.Execute(sqlStatement);
+	if (error != KErrNone && error != KErrAlreadyExists)
 	{
-		User::Leave(err);
+		User::Leave(error);
 	}
 
 	EAP_TRACE_DEBUG_SYMBIAN(
@@ -1740,10 +1815,18 @@
 	
 	// 4. Check if database table contains a row for this service type and id  	
 	
-	_LIT(KSQLQueryRow, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-
-	sqlStatement.Format(KSQLQueryRow, &KFastGeneralSettingsDBTableName, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);	
+	_LIT(KSQLQueryRow, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+
+	sqlStatement.Format(KSQLQueryRow,
+		&KFastGeneralSettingsDBTableName, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());	
 			
 	RDbView view;
 	User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement), TDbWindow::EUnlimited));
@@ -1772,13 +1855,14 @@
 		// Set the default values. The other three tables (certs, ca certs & cipher suites) are empty by default.
 		view.SetColL(colSet->ColNo(KServiceType), static_cast<TInt>(aIndexType));
 		view.SetColL(colSet->ColNo(KServiceIndex), aIndex);		
-		view.SetColL(colSet->ColNo(KTunnelingType), aTunnelingVendorType);
+		view.SetColL(colSet->ColNo(KTunnelingTypeVendorId), aTunnelingType.get_vendor_id());
+		view.SetColL(colSet->ColNo(KTunnelingType), aTunnelingType.get_vendor_type());
 		
 		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_use_manual_realm_literal), default_EAP_TLS_PEAP_use_manual_realm);
-		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_manual_realm_literal), default_EAP_TLS_PEAP_manual_realm);
+		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_manual_realm_literal), default_EAP_realm);
 		
 		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_use_manual_username_literal), default_EAP_TLS_PEAP_use_manual_username);
-		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_manual_username_literal), default_EAP_TLS_PEAP_manual_username);
+		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_manual_username_literal), default_EAP_username);
 		
 		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_cipher_suite_literal), default_EAP_TLS_PEAP_cipher_suite);
 
@@ -1810,6 +1894,8 @@
 		
 		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_use_identity_privacy_literal), default_EAP_TLS_PEAP_TLS_Privacy);		
 
+		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_use_automatic_ca_certificate_literal), default_EAP_TLS_PEAP_use_automatic_ca_certificate);
+
 		view.PutL();
 		
 		CleanupStack::PopAndDestroy(colSet); 
@@ -1832,28 +1918,18 @@
 		// Set the default values.
 		view.SetColL(colSet->ColNo(KServiceType), static_cast<TInt>(aIndexType));
 		view.SetColL(colSet->ColNo(KServiceIndex), aIndex);		
-		view.SetColL(colSet->ColNo(KTunnelingType), aTunnelingVendorType);
+		view.SetColL(colSet->ColNo(KTunnelingTypeVendorId), aTunnelingType.get_vendor_id());
+		view.SetColL(colSet->ColNo(KTunnelingType), aTunnelingType.get_vendor_type());
 
 		view.SetColL(colSet->ColNo(cf_str_EAP_FAST_allow_server_authenticated_provisioning_mode_literal),
 				default_EAP_FAST_Auth_Prov_Mode_Allowed);		
 	 	view.SetColL(colSet->ColNo(cf_str_EAP_FAST_allow_server_unauthenticated_provisioning_mode_ADHP_literal),
 	 			default_EAP_FAST_Unauth_Prov_Mode_Allowed);
-	 	
-        view.SetColL(colSet->ColNo(KFASTWarnADHPNoPAC),
-                default_EAP_FAST_Warn_ADHP_No_PAC);
-
-        view.SetColL(colSet->ColNo(KFASTWarnADHPNoMatchingPAC),
-                default_EAP_FAST_Warn_ADHP_No_Matching_PAC);
-
-        view.SetColL(colSet->ColNo(KFASTWarnNotDefaultServer),
-                default_EAP_FAST_Warn_Not_Default_Server);
-
-	 	
 							
 		view.PutL();
 		
 		CleanupStack::PopAndDestroy(colSet); 
-		CleanupStack::PopAndDestroy( &view ); // Close view.		
+		CleanupStack::PopAndDestroy( &view );
 		
 		//--------------------------------------------------------//
 		
@@ -1873,26 +1949,29 @@
 			view.InsertL();
 			view.SetColL(colSet->ColNo(KServiceType), static_cast<TInt>(aIndexType));
 			view.SetColL(colSet->ColNo(KServiceIndex), aIndex);		
-			view.SetColL(colSet->ColNo(KTunnelingType), aTunnelingVendorType);			
+			view.SetColL(colSet->ColNo(KTunnelingTypeVendorId), aTunnelingType.get_vendor_id());
+			view.SetColL(colSet->ColNo(KTunnelingType), aTunnelingType.get_vendor_type());
 			view.SetColL(colSet->ColNo(KCipherSuite), default_allowed_cipher_suites[i]);
 			view.PutL();
 			i++;
 		}
 		
-		CleanupStack::PopAndDestroy( colSet ); // Delete colSet.		
-		CleanupStack::PopAndDestroy( &view ); // Close view.
+		CleanupStack::PopAndDestroy( colSet );
+		CleanupStack::PopAndDestroy( &view );
 	}
-	
-	CleanupStack::PopAndDestroy( buf ); // Delete buf or sqlStatement
-	CleanupStack::Pop( &aDatabase );	
-	CleanupStack::Pop( &aSession );
-	
+
 	aDatabase.Compact();
-	
-    } // EapTlsPeapUtils::OpenFastDatabaseL()
+
+	CleanupStack::PopAndDestroy( buf );
+	CleanupStack::Pop( &aDatabase );
+	CleanupStack::Pop( &aFileServerSession );
+	
+} // EapTlsPeapUtils::OpenFastDatabaseL()
 
 #endif // #if defined(USE_FAST_EAP_TYPE)
 
+// ---------------------------------------------------------
+
 void EapTlsPeapUtils::SetIndexL(
 	RDbNamedDatabase& aDatabase,
 	const TDesC& aTableName,
@@ -1903,34 +1982,40 @@
 	const TInt aNewIndex,
 	const eap_type_value_e aNewTunnelingType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
-	TUint aNewTunnelingVendorType = aNewTunnelingType.get_vendor_type();
-
-#else
-
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-	TUint aNewTunnelingVendorType = static_cast<TUint>(aNewTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
 	EAP_TRACE_DEBUG_SYMBIAN(
-		(_L("EapTlsPeapUtils::SetIndexL -Start- aIndexType=%d, aIndex=%d, Tunneling vendor type=%d \n"),
-		aIndexType, aIndex, aTunnelingVendorType));
+		(_L("EapTlsPeapUtils::SetIndexL(): -Start- aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x, aNewTunnelingType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type(),
+		aNewTunnelingType.get_vendor_id(),
+		aNewTunnelingType.get_vendor_type()));
 	
 	EAP_TRACE_DEBUG_SYMBIAN(
-		(_L("EapTlsPeapUtils::SetIndexL -Start- aNewIndexType=%d, aNewIndex=%d, New Tunneling vendor type=%d \n"),
-		aNewIndexType, aNewIndex, aNewTunnelingVendorType));
+		(_L("EapTlsPeapUtils::SetIndexL(): -Start- aNewIndexType=%d, aNewIndex=%d, aNewTunnelingType=%d \n"),
+		aNewIndexType,
+		aNewIndex,
+		aNewTunnelingType.get_vendor_id(),
+		aNewTunnelingType.get_vendor_type()));
+
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapTlsPeapUtils::SetIndexL()\n"));
 
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
 	// First delete the target
-	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-
-	sqlStatement.Format(KSQL, &aTableName, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);		
+	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+
+	sqlStatement.Format(KSQL,
+		&aTableName, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());		
 
 	RDbView view;
 	
@@ -1953,19 +2038,22 @@
 				view.UpdateL();
 				
 			    view.SetColL(colSet->ColNo(KServiceType), static_cast<TUint>(aNewIndexType));
-    
     			view.SetColL(colSet->ColNo(KServiceIndex), static_cast<TUint>(aNewIndex));
-
-    			view.SetColL(colSet->ColNo(KTunnelingType), aNewTunnelingVendorType);
+				view.SetColL(colSet->ColNo(KTunnelingTypeVendorId), aNewTunnelingType.get_vendor_id());
+				view.SetColL(colSet->ColNo(KTunnelingType), aNewTunnelingType.get_vendor_type());
 				
 				view.PutL();
 			}
 		} while (view.NextL() != EFalse);
 	}
 			
-    CleanupStack::PopAndDestroy(3); // view, colset
+	CleanupStack::PopAndDestroy(colSet);
+	CleanupStack::PopAndDestroy(&view);
+	CleanupStack::PopAndDestroy(buf);
 }
 
+// ---------------------------------------------------------
+
 void EapTlsPeapUtils::ReadCertRowsToArrayL(
 	RDbNamedDatabase& aDatabase,
 	eap_am_tools_symbian_c * const /*aTools*/,
@@ -1973,27 +2061,34 @@
 	const TIndexType aIndexType,
 	const TInt aIndex,
 	const eap_type_value_e aTunnelingType,
-	RArray<SCertEntry>& aArray)
+	RPointerArray<EapCertificateEntry>& aArray)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
-
-#else
-
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::ReadCertRowsToArrayL -Start")) );
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapTlsPeapUtils::ReadCertRowsToArrayL(): - Start - aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type()));
+
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapTlsPeapUtils::ReadCertRowsToArrayL()\n"));
+
+	CleanupClosePushL( aArray );
 
 	HBufC* buf = HBufC::NewLC(512);
 	TPtr sqlStatement = buf->Des();
 	
-	_LIT(KSQLQueryRow, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	
-	sqlStatement.Format(KSQLQueryRow, &aTableName, &KServiceType, 
-		aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+	_LIT(KSQLQueryRow, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	
+	sqlStatement.Format(KSQLQueryRow,
+		&aTableName,
+		&KServiceType, 
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());
 	
 	RDbView view;
 	User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement), TDbWindow::EUnlimited));
@@ -2011,32 +2106,43 @@
 			view.GetL();
 			
 			{
-				SCertEntry certInfo;
+				EapCertificateEntry * const certInfo = new EapCertificateEntry;
+				if (certInfo == 0)
+				{
+					EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapTlsPeapUtils::ReadCertRowsToArrayL(): No memory\n")));
+					User::Leave(KErrNoMemory);
+				}
+
 				// Store the line
 				TPtrC ptr = view.ColDes(colSet->ColNo(KCertLabel));
 	
-				certInfo.iLabel.Copy(ptr);
+				certInfo->SetLabel(ptr);
 				
 				TPtrC8 ptr2 = view.ColDes8(colSet->ColNo(KSubjectKeyIdentifier)); // This is for authentication and uses Symbian subjectkey id.
-				certInfo.iSubjectKeyId.Copy(ptr2);
+				certInfo->SetSubjectKeyId(ptr2);
 
 				aArray.Append(certInfo);
 				
 				EAP_TRACE_DEBUG_SYMBIAN((_L("ReadCertRowsToArrayL - Appended Cert with label=%S\n"),
-				&(certInfo.iLabel)));
+					certInfo->GetLabel()));
 				
 				EAP_TRACE_DATA_DEBUG_SYMBIAN(("ReadCertRowsToArrayL - Appended Cert's SubjectKeyID:",
-					certInfo.iSubjectKeyId.Ptr(), certInfo.iSubjectKeyId.Size()));
+					certInfo->GetSubjectKeyId().Ptr(),
+					certInfo->GetSubjectKeyId().Length()));
 			}	
 
 		} while (view.NextL() != EFalse);		
 	}
 
 	// Close database
-	CleanupStack::PopAndDestroy(colSet); 
-	CleanupStack::PopAndDestroy(2); // view, buf
+	CleanupStack::PopAndDestroy(colSet);
+	CleanupStack::PopAndDestroy(&view);
+	CleanupStack::PopAndDestroy(buf);
+	CleanupStack::Pop( &aArray );
 }
 
+// ---------------------------------------------------------
+
 void EapTlsPeapUtils::ReadUintRowsToArrayL(
 	RDbNamedDatabase& aDatabase,
 	eap_am_tools_symbian_c * const /*aTools*/,
@@ -2047,30 +2153,38 @@
 	const eap_type_value_e aTunnelingType,
 	RArray<TUint>& aArray)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
-
-#else
-
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::ReadUintRowsToArrayL -Start")) );
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapTlsPeapUtils::ReadUintRowsToArrayL(): - Start - aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type()));
+
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapTlsPeapUtils::ReadUintRowsToArrayL()\n"));
+
+	CleanupClosePushL( aArray );
 
 	HBufC* buf = HBufC::NewLC(512);
 	TPtr sqlStatement = buf->Des();
 	
-	_LIT(KSQLQueryRow, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	
-	sqlStatement.Format(KSQLQueryRow, &aColumnName, &aTableName, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+	_LIT(KSQLQueryRow, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	
+	sqlStatement.Format(KSQLQueryRow,
+		&aColumnName,
+		&aTableName, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType,
+		aTunnelingType.get_vendor_type());
 	
 	RDbView view;
 	User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement), TDbWindow::EUnlimited));
 	CleanupClosePushL(view);
-	User::LeaveIfError(view.EvaluateAll());	
+	User::LeaveIfError(view.EvaluateAll());
 	
 	if (view.FirstL())
 	{		
@@ -2082,7 +2196,7 @@
 			case EDbColUint32:
 				{
 					// Store the line
-					TUint tmp = view.ColUint(KDefaultColumnInView_One);				
+					TUint tmp = view.ColUint(KDefaultColumnInView_One);
 					aArray.Append(tmp);
 				}
 				break;
@@ -2094,15 +2208,24 @@
 	}
 
 	// Close database
-	CleanupStack::PopAndDestroy(2); // view, buf
+	CleanupStack::PopAndDestroy(&view);
+	CleanupStack::PopAndDestroy(buf);
+	CleanupStack::Pop( &aArray );
 }
 
+// ---------------------------------------------------------
+
 // Don't use this finction as Label is not saved for certificates saved by SetConfigurationL().
 // Provisioning (OMA DM etc) use SetConfigurationL() to save certificate details.
 
 TBool EapTlsPeapUtils::CompareTCertLabels(const TCertLabel& item1, const TCertLabel& item2)
 {
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::CompareTCertLabels-Start")) );
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapTlsPeapUtils::CompareTCertLabels(): item1=\"%S\", item2=\"%S\"\n"),
+		&item1,
+		&item2));
+
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapTlsPeapUtils::CompareTCertLabels()\n"));
 
 	if (item1 == item2)
 	{
@@ -2114,22 +2237,36 @@
 	}
 }
 
-TBool EapTlsPeapUtils::CompareSCertEntries(const SCertEntry& item1, const SCertEntry& item2)
+// ---------------------------------------------------------
+
+TBool EapTlsPeapUtils::CompareSCertEntries(const EapCertificateEntry& item1, const EapCertificateEntry& item2)
 {
-	EAP_TRACE_DEBUG_SYMBIAN((_L("\nEapTlsPeapUtils::CompareSCertEntries, Label_1=%S, Label_2=%S"),
-	&(item1.iLabel), &(item2.iLabel)));
-
-	EAP_TRACE_DATA_DEBUG_SYMBIAN(("EapTlsPeapUtils::CompareSCertEntries, SubjectKeyID_1:",
-		item1.iSubjectKeyId.Ptr(), item1.iSubjectKeyId.Size()));
-
-	EAP_TRACE_DATA_DEBUG_SYMBIAN(("EapTlsPeapUtils::CompareSCertEntries, SubjectKeyID_2:",
-		item2.iSubjectKeyId.Ptr(), item2.iSubjectKeyId.Size()));
-
-	if (item1.iLabel == item2.iLabel ||
-		item1.iLabel.Length() == 0 ||
-		item2.iLabel.Length() == 0 ) // Label is not saved when certs are saved using OMA DM.
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapTlsPeapUtils::CompareSCertEntries(): item1.Label=\"%S\", item2.Label=\"%S\"\n"),
+		item1.GetLabel(),
+		item2.GetLabel()));
+
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapTlsPeapUtils::CompareSCertEntries(): item1.Label=\"%S\", item2.Label=\"%S\"\n"),
+		item1.GetLabel(),
+		item2.GetLabel()));
+
+	EAP_TRACE_DATA_DEBUG_SYMBIAN(("EapTlsPeapUtils::CompareSCertEntries(): SubjectKeyID_1:",
+		item1.GetSubjectKeyId().Ptr(),
+		item1.GetSubjectKeyId().Length()));
+
+	EAP_TRACE_DATA_DEBUG_SYMBIAN(("EapTlsPeapUtils::CompareSCertEntries(): SubjectKeyID_2:",
+		item2.GetSubjectKeyId().Ptr(),
+		item2.GetSubjectKeyId().Length()));
+
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapTlsPeapUtils::CompareSCertEntries()\n"));
+
+
+	if (*(item1.GetLabel()) == *(item2.GetLabel())
+		|| item1.GetLabel()->Length() == 0
+		|| item2.GetLabel()->Length() == 0 ) // Label is not saved when certs are saved using OMA DM.
 	{
-		if (item1.iSubjectKeyId == item2.iSubjectKeyId)
+		if (item1.GetSubjectKeyId() == item2.GetSubjectKeyId())
 		{
 			EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::CompareSCertEntries, Certs matched\n")));
 		
@@ -2140,414 +2277,111 @@
 	return EFalse;
 }
 
-
-#ifndef USE_EAP_EXPANDED_TYPES 
-// There are separate functions (SetTunnelingExpandedEapDataL and GetTunnelingExpandedEapDataL) if USE_EAP_EXPANDED_TYPES is defined.
-
-/**
-* Sets EAP data to a binary string record in commsdat.
-* The old format (NOT USED NOW) is "+123,- 34", + means enabled, - disabled, then id, id is always 3 characters for easy parsing.
-* In the new format each EAP type is saved as an unsigned integer of 32 bits ( TUint).
-* There is separate binary strings for accepted (enabled) and unaccepted (disabled) tunneled EAP types.
-*/
- 
-void EapTlsPeapUtils::SetEapDataL(
+//--------------------------------------------------
+
+// Stores the tunneled EAP type (expanded) to the database.
+void EapTlsPeapUtils::SetTunnelingExpandedEapDataL(
 	RDbNamedDatabase& aDatabase,
 	eap_am_tools_symbian_c * const /*aTools*/,
-	TEapArray &aEaps,
-	const TIndexType aIndexType,
-	const TInt aIndex,
-	const eap_type_value_e aTunnelingType,
-	const eap_type_value_e aEapType)
-{
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
-	TUint aEapVendorType = aEapType.get_vendor_type();
-
-#else
-
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-	TUint aEapVendorType = static_cast<TUint>(aEapType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
-	EAP_TRACE_DEBUG_SYMBIAN(
-		(_L("EapTlsPeapUtils::SetEapDataL aIndexType=%d, aIndex=%d, Tunneling vendor type=%d, Eap vendor type=%d, No: of tunneled EAP types=%d \n"),
-		aIndexType,aIndex, aTunnelingVendorType, aEapVendorType, aEaps.Count()) );
-
-	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
-	TPtr sqlStatement = buf->Des();
-	
-	_LIT(KSQLQueryRow, "SELECT %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	
-	if (aEapType == eap_type_peap)
-	{
-		sqlStatement.Format(KSQLQueryRow, &cf_str_PEAP_accepted_tunneled_client_types_hex_data_literal,
-			&cf_str_PEAP_unaccepted_tunneled_client_types_hex_data_literal,
-			&KPeapDatabaseTableName, &KServiceType, aIndexType, &KServiceIndex, aIndex, 
-			&KTunnelingType, aTunnelingVendorType);		
-	} 
-#if defined(USE_TTLS_EAP_TYPE)
-	else if (aEapType == eap_type_ttls)
-	{
-		sqlStatement.Format(KSQLQueryRow, &cf_str_PEAP_accepted_tunneled_client_types_hex_data_literal, 
-			&cf_str_PEAP_unaccepted_tunneled_client_types_hex_data_literal,
-			&KTtlsDatabaseTableName, &KServiceType, aIndexType, &KServiceIndex, aIndex, 
-			&KTunnelingType, aTunnelingVendorType);		
-	} 
-#endif
-
-	else if (aEapType == eap_type_ttls_plain_pap)
-	{
-		sqlStatement.Format(KSQLQueryRow, &cf_str_PEAP_accepted_tunneled_client_types_hex_data_literal, 
-			&cf_str_PEAP_unaccepted_tunneled_client_types_hex_data_literal,
-			&KTtlsDatabaseTableName, &KServiceType, aIndexType, &KServiceIndex, aIndex, 
-			&KTunnelingType, aTunnelingVendorType);		
-	} 
-
-#if defined(USE_FAST_EAP_TYPE)
-	else if (aEapType == eap_type_fast)
-	{
-		sqlStatement.Format(KSQLQueryRow, &cf_str_PEAP_accepted_tunneled_client_types_hex_data_literal, 
-			&cf_str_PEAP_unaccepted_tunneled_client_types_hex_data_literal,
-			&KFastGeneralSettingsDBTableName, &KServiceType, aIndexType, &KServiceIndex, aIndex, 
-			&KTunnelingType, aTunnelingVendorType);		
-	} 
-#endif
-	else
-	{
-		EAP_TRACE_DEBUG_SYMBIAN(
-			(_L("EapTlsPeapUtils::SetEapDataL - Unsupported EAP type =%d \n"),
-			 aEapVendorType));
-			 
-		// Unsupported EAP type
-		User::Leave(KErrNotSupported);
-	}	
-			
-	RDbView view;
-	User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement), TDbWindow::EUnlimited));
-	CleanupClosePushL(view);
-	User::LeaveIfError(view.EvaluateAll());	
-	User::LeaveIfError(view.FirstL());	
-	view.UpdateL();
-
-	TInt eapCount = aEaps.Count();
-	
-	HBufC8 *acceptedDbText = HBufC8::NewLC( (sizeof(TUint)) * eapCount ); // 4 bytes (32 bits) for an EAP type, Need to save as TUInt (4 bytes).
-	HBufC8 *unacceptedDbText = HBufC8::NewLC( (sizeof(TUint)) * eapCount ); // 4 bytes (32 bits) for an EAP type, Need to save as TUInt (4 bytes).
-	
-	TPtr8 acceptedPtr(acceptedDbText->Des());
-	TPtr8 unacceptedPtr(unacceptedDbText->Des());
-	
-	TBuf8<3> UidTmp;
-		
-	for(TInt i = 0 ; i< eapCount; i++)
-	{
-		UidTmp.Copy(aEaps[i]->UID);
-		
-		TLex8 eapUidLex( UidTmp.Right(2) ); // Only last two characters determines the EAP type.
-		TUint eapTypeUint = 0;
-		
-		User::LeaveIfError( eapUidLex.Val(eapTypeUint, EDecimal) );	
-		
-		TPtrC8 tempEAPtype( reinterpret_cast<TUint8*>(&eapTypeUint), sizeof(TUint) );
-		
-		if( aEaps[i]->Enabled )
-		{
-			// Fill in accepted tunneled type.
-			acceptedPtr.Append( tempEAPtype );			
-		}
-		else
-		{
-			// Fill in unaccepted tunneled type.
-			unacceptedPtr.Append( tempEAPtype);			
-		}			
-	}
-	
-	// Save the strings in the DB.
-	
-	// Get column set so we get the correct column numbers
-	CDbColSet* colSet = view.ColSetL();
-	CleanupStack::PushL(colSet);			
-	
-	// Validate length of strings
-	if(acceptedPtr.Length() > KMaxTunneledTypeStringLengthInDB 
-		|| unacceptedPtr.Length() > KMaxTunneledTypeStringLengthInDB)
-	{
-		EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::SetEapDataL - Too long Tunneled EAP type string \n") ) );
-
-		User::Leave(KErrArgument);		
-	}
-	
-	view.SetColL(colSet->ColNo(cf_str_PEAP_accepted_tunneled_client_types_hex_data_literal), acceptedPtr);
-	view.SetColL(colSet->ColNo(cf_str_PEAP_unaccepted_tunneled_client_types_hex_data_literal), unacceptedPtr);	
-
-	CleanupStack::PopAndDestroy( colSet ); // Delete colSet.	
-
-	view.PutL();
-
-	EAP_TRACE_DATA_DEBUG_SYMBIAN(("EapTlsPeapUtils::SetEapDataL- Enabled extended EAP type data added to DB:",
-		acceptedPtr.Ptr(), 
-		acceptedPtr.Size() ) );
-
-	EAP_TRACE_DATA_DEBUG_SYMBIAN(("EapTlsPeapUtils::SetEapDataL- Disabled extended EAP type data added to DB:",
-		unacceptedPtr.Ptr(), 
-		unacceptedPtr.Size() ) );
-
-	CleanupStack::PopAndDestroy(unacceptedDbText); // Delete unacceptedDbText
-	CleanupStack::PopAndDestroy(acceptedDbText); // Delete acceptedDbText	
-	CleanupStack::PopAndDestroy(&view); // Close view
-	CleanupStack::PopAndDestroy(buf); // Delete buf
-}
-
-/**
-* Gets Eapdata from corresponding table in commdb
-* see format in SetEapDAtaL
-*/
-void EapTlsPeapUtils::GetEapDataL(
-	RDbNamedDatabase& aDatabase,
-	eap_am_tools_symbian_c * const /*aTools*/,
-	TEapArray &aEaps, 
+	RPointerArray<TEapExpandedType> &aEnabledEAPArrary,
+	RPointerArray<TEapExpandedType> &aDisabledEAPArrary,
 	const TIndexType aIndexType,
 	const TInt aIndex,
 	const eap_type_value_e aTunnelingType,
 	const eap_type_value_e aEapType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
-	TUint aEapVendorType = aEapType.get_vendor_type();
-
-#else
-
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-	TUint aEapVendorType = static_cast<TUint>(aEapType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-	
 	EAP_TRACE_DEBUG_SYMBIAN(
-		(_L("EapTlsPeapUtils::GetEapDataL aIndexType=%d, aIndex=%d, Tunneling vendor type=%d, Eap vendor type=%d \n"),
-		aIndexType,aIndex, aTunnelingVendorType, aEapVendorType));
+		(_L("EapTlsPeapUtils::SetTunnelingExpandedEapDataL(): - Start - aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x, aEapType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type(),
+		aEapType.get_vendor_id(),
+		aEapType.get_vendor_type()));
+
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("Number of Tunneled EAP types: Enabled=%d, Disabled=%d\n"),
+		aEnabledEAPArrary.Count(),
+		aDisabledEAPArrary.Count()));
+
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapTlsPeapUtils::SetTunnelingExpandedEapDataL()\n"));
 
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 	
-	_LIT(KSQLQueryRow, "SELECT %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-
+	_LIT(KSQLQueryRow, "SELECT %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+	
 	if (aEapType == eap_type_peap)
 	{
-		sqlStatement.Format(KSQLQueryRow, &cf_str_PEAP_accepted_tunneled_client_types_hex_data_literal, 
+		sqlStatement.Format(KSQLQueryRow,
+			&cf_str_PEAP_accepted_tunneled_client_types_hex_data_literal,
 			&cf_str_PEAP_unaccepted_tunneled_client_types_hex_data_literal,
-			&KPeapDatabaseTableName, &KServiceType, aIndexType, &KServiceIndex, aIndex, 
-			&KTunnelingType, aTunnelingVendorType);		
+			&KPeapDatabaseTableName,
+			&KServiceType,
+			aIndexType,
+			&KServiceIndex,
+			aIndex, 
+			&KTunnelingTypeVendorId,
+			aTunnelingType.get_vendor_id(),
+			&KTunnelingType, 
+			aTunnelingType.get_vendor_type());		
 	} 
 #if defined(USE_TTLS_EAP_TYPE)
 	else if (aEapType == eap_type_ttls)
 	{
-		sqlStatement.Format(KSQLQueryRow, &cf_str_PEAP_accepted_tunneled_client_types_hex_data_literal, 
-			&cf_str_PEAP_unaccepted_tunneled_client_types_hex_data_literal,
-			&KTtlsDatabaseTableName, &KServiceType, aIndexType, &KServiceIndex, aIndex, 
-			&KTunnelingType, aTunnelingVendorType);		
-	} 
-#endif
-
-	else if (aEapType == eap_type_ttls_plain_pap)
-	{
-		sqlStatement.Format(KSQLQueryRow, &cf_str_PEAP_accepted_tunneled_client_types_hex_data_literal, 
-			&cf_str_PEAP_unaccepted_tunneled_client_types_hex_data_literal,
-			&KTtlsDatabaseTableName, &KServiceType, aIndexType, &KServiceIndex, aIndex, 
-			&KTunnelingType, aTunnelingVendorType);		
-	} 
-	
-#if defined(USE_FAST_EAP_TYPE)
-	else if (aEapType == eap_type_fast)
-	{
-		sqlStatement.Format(KSQLQueryRow, &cf_str_PEAP_accepted_tunneled_client_types_hex_data_literal, 
+		sqlStatement.Format(KSQLQueryRow,
+			&cf_str_PEAP_accepted_tunneled_client_types_hex_data_literal, 
 			&cf_str_PEAP_unaccepted_tunneled_client_types_hex_data_literal,
-			&KFastGeneralSettingsDBTableName, &KServiceType, aIndexType, &KServiceIndex, aIndex, 
-			&KTunnelingType, aTunnelingVendorType);		
-	} 
-#endif
-	else
-	{
-		EAP_TRACE_DEBUG_SYMBIAN(
-			(_L("EapTlsPeapUtils::GetEapDataL - Unsupported EAP type=%d \n"),
-			 aEapVendorType));
-			 
-		// Unsupported EAP type
-		User::Leave(KErrNotSupported);
-	}	
-	
-	RDbView view;
-	User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement), TDbWindow::EUnlimited));
-	CleanupClosePushL(view);
-	User::LeaveIfError(view.EvaluateAll());	
-	
-	User::LeaveIfError(view.FirstL());
-	
-	view.GetL();
-	
-	// Get column set so we get the correct column numbers
-	CDbColSet* colSet = view.ColSetL();
-	CleanupStack::PushL(colSet);			
-	
-	TPtrC8 acceptedEAPData = view.ColDes8(colSet->ColNo(cf_str_PEAP_accepted_tunneled_client_types_hex_data_literal));
-	TPtrC8 unacceptedEAPData = view.ColDes8(colSet->ColNo(cf_str_PEAP_unaccepted_tunneled_client_types_hex_data_literal));
-	
-	CleanupStack::PopAndDestroy( colSet ); // Delete colSet.	
-
-	EAP_TRACE_DATA_DEBUG_SYMBIAN(("EapTlsPeapUtils::GetEapDataL- Enabled extended EAP type data from DB:",
-		acceptedEAPData.Ptr(), 
-		acceptedEAPData.Size() ) );
-	
-	EAP_TRACE_DATA_DEBUG_SYMBIAN(("EapTlsPeapUtils::GetEapDataL- Disabled extended EAP type data from DB:",
-		unacceptedEAPData.Ptr(), 
-		unacceptedEAPData.Size() ) );
-	
-	aEaps.ResetAndDestroy();
-		
-	TUint acceptedLength = acceptedEAPData.Length();
-	TUint unacceptedLength = unacceptedEAPData.Length();
-	
-	TEap *eapTmp;
-
-	TUint index = 0;
-	
-	_LIT8(KUIDFormat,"%u");
-	
-	// For accepted or enabled tunneled EAP types. 	
-	while(index < acceptedLength)
-	{		
-		eapTmp = new (ELeave)TEap;
-
-		eapTmp->Enabled=ETrue; // All EAP types in here are enabled.
-		
-		eapTmp->UID.Zero();
-
-		// Get the UID from data from the DB.				
-		TPtrC8 tempEAPtype( acceptedEAPData.Mid(index, sizeof(TUint)) );
-		
-		EAP_TRACE_DATA_DEBUG_SYMBIAN(("EapTlsPeapUtils::GetEapDataL- extracted EAP type:",
-			tempEAPtype.Ptr(), 
-			tempEAPtype.Size() ) );
-						
-		TUint eapTypeUint = *(tempEAPtype.Ptr()); // All EAP types are saved as TUInt. 
-		
-		eapTmp->UID.Format(KUIDFormat,eapTypeUint);
-				
-		aEaps.Append(eapTmp);
-
-		index = index + sizeof(TUint);
-		
-		EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::GetEapDataL - Appended enabled-EAP type=%s \n"),eapTmp->UID.Ptr()) );
-	}
-	
-	index = 0;
-	
-	// For unaccepted or disabled tunneled EAP types. 	
-	while(index < unacceptedLength)
-	{		
-		eapTmp = new (ELeave)TEap;
-
-		eapTmp->Enabled=EFalse; // All EAP types in here are disabled.
-		
-		eapTmp->UID.Zero();
-
-		// Get the UID from data from the DB.				
-		TPtrC8 tempEAPtype( unacceptedEAPData.Mid(index, sizeof(TUint)) );
-		
-		EAP_TRACE_DATA_DEBUG_SYMBIAN(("EapTlsPeapUtils::GetEapDataL- extracted EAP type:",
-			tempEAPtype.Ptr(), 
-			tempEAPtype.Size() ) );
-						
-		TUint eapTypeUint = *(tempEAPtype.Ptr()); // All EAP types are saved as TUint. 
-		
-		eapTmp->UID.Format(KUIDFormat,eapTypeUint);
-				
-		aEaps.Append(eapTmp);
-
-		index = index + sizeof(TUint);
-		
-		EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::GetEapDataL - Appended disabled-EAP type=%s \n"),eapTmp->UID.Ptr()) );
-	}
-	
-	CleanupStack::PopAndDestroy(&view); // Close view
-	CleanupStack::PopAndDestroy(buf); // Delete buf	
-}
-
-#endif // #ifndef USE_EAP_EXPANDED_TYPES
-
-//--------------------------------------------------
-
-#ifdef USE_EAP_EXPANDED_TYPES
-
-// Stores the tunneled EAP type (expanded) to the database.
-void EapTlsPeapUtils::SetTunnelingExpandedEapDataL(
-	RDbNamedDatabase& aDatabase,
-	eap_am_tools_symbian_c * const /*aTools*/,
-	RExpandedEapTypePtrArray &aEnabledEAPArrary,
-	RExpandedEapTypePtrArray &aDisabledEAPArrary,
-	const TIndexType aIndexType,
-	const TInt aIndex,
-	const eap_type_value_e aTunnelingType,
-	const eap_type_value_e aEapType)
-{
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
-	TUint aEapVendorType = aEapType.get_vendor_type();
-
-	EAP_TRACE_DEBUG_SYMBIAN(
-		(_L("EapTlsPeapUtils::SetTunnelingExpandedEapDataL:aIndexType=%d, aIndex=%d, Tunneling vendor type=%d, Eap vendor type=%d\n"),
-		aIndexType,aIndex, aTunnelingVendorType, aEapVendorType));
-
-	EAP_TRACE_DEBUG_SYMBIAN(
-		(_L("Number of Tunneled EAP types: Enabled=%d, Disabled=%d\n"),
-		aEnabledEAPArrary.Count(), aDisabledEAPArrary.Count()));
-
-	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
-	TPtr sqlStatement = buf->Des();
-	
-	_LIT(KSQLQueryRow, "SELECT %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-	
-	if (aEapType == eap_type_peap)
-	{
-		sqlStatement.Format(KSQLQueryRow, &cf_str_PEAP_accepted_tunneled_client_types_hex_data_literal,
-			&cf_str_PEAP_unaccepted_tunneled_client_types_hex_data_literal,
-			&KPeapDatabaseTableName, &KServiceType, aIndexType, &KServiceIndex, aIndex, 
-			&KTunnelingType, aTunnelingVendorType);		
-	} 
-#if defined(USE_TTLS_EAP_TYPE)
-	else if (aEapType == eap_type_ttls)
-	{
-		sqlStatement.Format(KSQLQueryRow, &cf_str_PEAP_accepted_tunneled_client_types_hex_data_literal, 
-			&cf_str_PEAP_unaccepted_tunneled_client_types_hex_data_literal,
-			&KTtlsDatabaseTableName, &KServiceType, aIndexType, &KServiceIndex, aIndex, 
-			&KTunnelingType, aTunnelingVendorType);		
+			&KTtlsDatabaseTableName,
+			&KServiceType,
+			aIndexType,
+			&KServiceIndex,
+			aIndex, 
+			&KTunnelingTypeVendorId,
+			aTunnelingType.get_vendor_id(),
+			&KTunnelingType, 
+			aTunnelingType.get_vendor_type());		
 	} 
 #endif
 #if defined(USE_FAST_EAP_TYPE)
 	else if (aEapType == eap_type_fast)
 	{
-		sqlStatement.Format(KSQLQueryRow, &cf_str_PEAP_accepted_tunneled_client_types_hex_data_literal, 
+		sqlStatement.Format(KSQLQueryRow,
+			&cf_str_PEAP_accepted_tunneled_client_types_hex_data_literal, 
 			&cf_str_PEAP_unaccepted_tunneled_client_types_hex_data_literal,
-			&KFastGeneralSettingsDBTableName, &KServiceType, aIndexType, &KServiceIndex, aIndex, 
-			&KTunnelingType, aTunnelingVendorType);		
+			&KFastGeneralSettingsDBTableName,
+			&KServiceType,
+			aIndexType,
+			&KServiceIndex,
+			aIndex, 
+			&KTunnelingTypeVendorId,
+			aTunnelingType.get_vendor_id(),
+			&KTunnelingType, 
+			aTunnelingType.get_vendor_type());		
 	} 
 #endif
 
 	else if ( aEapType == eap_type_ttls_plain_pap )
 	{
-		sqlStatement.Format(KSQLQueryRow, &cf_str_PEAP_accepted_tunneled_client_types_hex_data_literal, 
+		sqlStatement.Format(KSQLQueryRow,
+			&cf_str_PEAP_accepted_tunneled_client_types_hex_data_literal, 
 			&cf_str_PEAP_unaccepted_tunneled_client_types_hex_data_literal,
-			&KTtlsDatabaseTableName, &KServiceType, aIndexType, &KServiceIndex, aIndex, 
-			&KTunnelingType, aTunnelingVendorType);		
+			&KTtlsDatabaseTableName,
+			&KServiceType,
+			aIndexType,
+			&KServiceIndex,
+			aIndex, 
+			&KTunnelingTypeVendorId,
+			aTunnelingType.get_vendor_id(),
+			&KTunnelingType, 
+			aTunnelingType.get_vendor_type());		
 	} 
 
 	else
 	{
-		EAP_TRACE_DEBUG_SYMBIAN(
-			(_L("EapTlsPeapUtils::SetTunnelingExpandedEapDataL - Unsupported EAP type =%d \n"),
-			 aEapVendorType));
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::SetTunnelingExpandedEapDataL - Unsupported EAP-type=0xfe%06x%08x\n"),
+			aEapType.get_vendor_id(),
+			aEapType.get_vendor_type()));
 			 
 		// Unsupported EAP type
 		User::Leave(KErrNotSupported);
@@ -2563,8 +2397,8 @@
 	TInt enabledEAPCount = aEnabledEAPArrary.Count();
 	TInt disabledEAPCount = aDisabledEAPArrary.Count();
 	
-	HBufC8 *acceptedDbText = HBufC8::NewLC( KExpandedEAPTypeSize * enabledEAPCount ); // 8 bytes (64 bits) for an EAP type.
-	HBufC8 *unacceptedDbText = HBufC8::NewLC( KExpandedEAPTypeSize * disabledEAPCount ); // 8 bytes (64 bits) for an EAP type.
+	HBufC8 *acceptedDbText = HBufC8::NewLC( KEapExpandedTypeLength * enabledEAPCount ); // 8 bytes (64 bits) for an EAP type.
+	HBufC8 *unacceptedDbText = HBufC8::NewLC( KEapExpandedTypeLength * disabledEAPCount ); // 8 bytes (64 bits) for an EAP type.
 	
 	TPtr8 acceptedPtr(acceptedDbText->Des());
 	TPtr8 unacceptedPtr(unacceptedDbText->Des());
@@ -2572,13 +2406,23 @@
 	// Fill in accepted tunneled type.		
 	for(TInt i = 0 ; i< enabledEAPCount; i++)
 	{
-		acceptedPtr.Append(aEnabledEAPArrary[i]->iExpandedEAPType);					
+		EAP_TRACE_DEBUG_SYMBIAN(
+			(_L("EapTlsPeapUtils::SetTunnelingExpandedEapDataL():  enabled EAP-type=0xfe%06x%08x\n"),
+			aEnabledEAPArrary[i]->GetVendorId(),
+			aEnabledEAPArrary[i]->GetVendorType()));
+
+		acceptedPtr.Append(aEnabledEAPArrary[i]->GetValue());					
 	}
 	
 	// Fill in unaccepted tunneled type.		
 	for(TInt i = 0 ; i< disabledEAPCount; i++)
 	{
-		unacceptedPtr.Append(aDisabledEAPArrary[i]->iExpandedEAPType);					
+		EAP_TRACE_DEBUG_SYMBIAN(
+			(_L("EapTlsPeapUtils::SetTunnelingExpandedEapDataL(): disabled EAP-type=0xfe%06x%08x\n"),
+			aDisabledEAPArrary[i]->GetVendorId(),
+			aDisabledEAPArrary[i]->GetVendorType()));
+
+		unacceptedPtr.Append(aDisabledEAPArrary[i]->GetValue());					
 	}
 	
 	// Save the strings in the DB.
@@ -2591,7 +2435,7 @@
 	if(acceptedPtr.Length() > KMaxTunneledTypeStringLengthInDB 
 		|| unacceptedPtr.Length() > KMaxTunneledTypeStringLengthInDB)
 	{
-		EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::SetTunnelingExpandedEapDataL - Too long Tunneled EAP type string \n") ) );
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapTlsPeapUtils::SetTunnelingExpandedEapDataL - Too long Tunneled EAP type string \n") ) );
 
 		User::Leave(KErrArgument);		
 	}
@@ -2617,68 +2461,106 @@
 	CleanupStack::PopAndDestroy(buf); // Delete buf	
 }
 
+// ---------------------------------------------------------
+
 // Retrieves the tunneled EAP type (expanded) from the database	.
 void EapTlsPeapUtils::GetTunnelingExpandedEapDataL(
 	RDbNamedDatabase& aDatabase,
 	eap_am_tools_symbian_c * const /*aTools*/,
-	RExpandedEapTypePtrArray &aEnabledEAPArrary,
-	RExpandedEapTypePtrArray &aDisabledEAPArrary,
+	RPointerArray<TEapExpandedType> &aEnabledEAPArrary,
+	RPointerArray<TEapExpandedType> &aDisabledEAPArrary,
 	const TIndexType aIndexType,
 	const TInt aIndex,
 	const eap_type_value_e aTunnelingType,
 	const eap_type_value_e aEapType)
 {
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
-	TUint aEapVendorType = aEapType.get_vendor_type();
-	
 	EAP_TRACE_DEBUG_SYMBIAN(
-		(_L("EapTlsPeapUtils::GetTunnelingExpandedEapDataL aIndexType=%d, aIndex=%d, Tunneling vendor type=%d, Eap vendor type=%d \n"),
-		aIndexType,aIndex, aTunnelingVendorType, aEapVendorType));
+		(_L("EapTlsPeapUtils::GetTunnelingExpandedEapDataL(): - Start - aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x, aEapType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type(),
+		aEapType.get_vendor_id(),
+		aEapType.get_vendor_type()));
+
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapTlsPeapUtils::GetTunnelingExpandedEapDataL()\n"));
 
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 	
-	_LIT(KSQLQueryRow, "SELECT %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
+	_LIT(KSQLQueryRow, "SELECT %S, %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
 
 	if (aEapType == eap_type_peap)
 	{
-		sqlStatement.Format(KSQLQueryRow, &cf_str_PEAP_accepted_tunneled_client_types_hex_data_literal, 
+		sqlStatement.Format(KSQLQueryRow,
+			&cf_str_PEAP_accepted_tunneled_client_types_hex_data_literal, 
 			&cf_str_PEAP_unaccepted_tunneled_client_types_hex_data_literal,
-			&KPeapDatabaseTableName, &KServiceType, aIndexType, &KServiceIndex, aIndex, 
-			&KTunnelingType, aTunnelingVendorType);		
+			&KPeapDatabaseTableName,
+			&KServiceType,
+			aIndexType,
+			&KServiceIndex,
+			aIndex, 
+			&KTunnelingTypeVendorId,
+			aTunnelingType.get_vendor_id(),
+			&KTunnelingType, 
+			aTunnelingType.get_vendor_type());		
 	} 
 #if defined(USE_TTLS_EAP_TYPE)
 	else if (aEapType == eap_type_ttls)
 	{
-		sqlStatement.Format(KSQLQueryRow, &cf_str_PEAP_accepted_tunneled_client_types_hex_data_literal, 
+		sqlStatement.Format(KSQLQueryRow,
+			&cf_str_PEAP_accepted_tunneled_client_types_hex_data_literal, 
 			&cf_str_PEAP_unaccepted_tunneled_client_types_hex_data_literal,
-			&KTtlsDatabaseTableName, &KServiceType, aIndexType, &KServiceIndex, aIndex, 
-			&KTunnelingType, aTunnelingVendorType);		
+			&KTtlsDatabaseTableName,
+			&KServiceType,
+			aIndexType,
+			&KServiceIndex,
+			aIndex, 
+			&KTunnelingTypeVendorId,
+			aTunnelingType.get_vendor_id(),
+			&KTunnelingType, 
+			aTunnelingType.get_vendor_type());		
 	} 
 #endif
 #if defined(USE_FAST_EAP_TYPE)
 	else if (aEapType == eap_type_fast)
 	{
-		sqlStatement.Format(KSQLQueryRow, &cf_str_PEAP_accepted_tunneled_client_types_hex_data_literal, 
+		sqlStatement.Format(KSQLQueryRow,
+			&cf_str_PEAP_accepted_tunneled_client_types_hex_data_literal, 
 			&cf_str_PEAP_unaccepted_tunneled_client_types_hex_data_literal,
-			&KFastGeneralSettingsDBTableName, &KServiceType, aIndexType, &KServiceIndex, aIndex, 
-			&KTunnelingType, aTunnelingVendorType);		
+			&KFastGeneralSettingsDBTableName,
+			&KServiceType,
+			aIndexType,
+			&KServiceIndex,
+			aIndex, 
+			&KTunnelingTypeVendorId,
+			aTunnelingType.get_vendor_id(),
+			&KTunnelingType, 
+			aTunnelingType.get_vendor_type());		
 	} 
 #endif
 
 	else if (aEapType == eap_type_ttls_plain_pap )
 	{
-		sqlStatement.Format(KSQLQueryRow, &cf_str_PEAP_accepted_tunneled_client_types_hex_data_literal, 
+		sqlStatement.Format(KSQLQueryRow,
+			&cf_str_PEAP_accepted_tunneled_client_types_hex_data_literal, 
 			&cf_str_PEAP_unaccepted_tunneled_client_types_hex_data_literal,
-			&KTtlsDatabaseTableName, &KServiceType, aIndexType, &KServiceIndex, aIndex, 
-			&KTunnelingType, aTunnelingVendorType);		
+			&KTtlsDatabaseTableName,
+			&KServiceType,
+			aIndexType,
+			&KServiceIndex,
+			aIndex, 
+			&KTunnelingTypeVendorId,
+			aTunnelingType.get_vendor_id(),
+			&KTunnelingType, 
+			aTunnelingType.get_vendor_type());		
 	} 
 
 	else
 	{
-		EAP_TRACE_DEBUG_SYMBIAN(
-			(_L("EapTlsPeapUtils::GetTunnelingExpandedEapDataL - Unsupported EAP type=%d \n"),
-			 aEapVendorType));
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapTlsPeapUtils::GetTunnelingExpandedEapDataL(): - Unsupported EAP-type=0xfe%06x%08x\n"),
+			aEapType.get_vendor_id(),
+			aEapType.get_vendor_type()));
 			 
 		// Unsupported EAP type
 		User::Leave(KErrNotSupported);
@@ -2716,13 +2598,13 @@
 	TUint acceptedLength = acceptedEAPData.Length();
 	TUint unacceptedLength = unacceptedEAPData.Length();
 	
-	SExpandedEAPType *expandedEAPTmp = 0;
+	TEapExpandedType *expandedEAPTmp = 0;
 	TUint index = 0;
 	
 	// For accepted or enabled tunneled EAP types. 	
 	while(index < acceptedLength)
 	{		
-		expandedEAPTmp = new SExpandedEAPType;
+		expandedEAPTmp = new TEapExpandedType;
 
 		if (expandedEAPTmp == 0)
 		{
@@ -2731,15 +2613,16 @@
 			User::LeaveIfError(KErrNoMemory);
 		}
 
-		expandedEAPTmp->iExpandedEAPType = acceptedEAPData.Mid(index, KExpandedEAPTypeSize);
+		*expandedEAPTmp = acceptedEAPData.Mid(index, KEapExpandedTypeLength);
 						
-		EAP_TRACE_DATA_DEBUG_SYMBIAN(("Extracted EAP type:",
-			expandedEAPTmp->iExpandedEAPType.Ptr(), 
-			expandedEAPTmp->iExpandedEAPType.Size() ) );
+		EAP_TRACE_DEBUG_SYMBIAN(
+			(_L("EapTlsPeapUtils::GetTunnelingExpandedEapDataL():  enabled EAP-type=0xfe%06x%08x\n"),
+			expandedEAPTmp->GetVendorId(),
+			expandedEAPTmp->GetVendorType()));
 
 		aEnabledEAPArrary.Append(expandedEAPTmp);
 
-		index = index + KExpandedEAPTypeSize;
+		index = index + KEapExpandedTypeLength;
 	}
 	
 	index = 0;
@@ -2747,7 +2630,7 @@
 	// For unaccepted or disabled tunneled EAP types.
 	while(index < unacceptedLength)
 	{		
-		expandedEAPTmp = new SExpandedEAPType;
+		expandedEAPTmp = new TEapExpandedType;
 
 		if (expandedEAPTmp == 0)
 		{
@@ -2756,27 +2639,31 @@
 			User::LeaveIfError(KErrNoMemory);
 		}
 
-		expandedEAPTmp->iExpandedEAPType = unacceptedEAPData.Mid(index, KExpandedEAPTypeSize);
+		*expandedEAPTmp = unacceptedEAPData.Mid(index, KEapExpandedTypeLength);
 						
-		EAP_TRACE_DATA_DEBUG_SYMBIAN(("Extracted EAP type:",
-			expandedEAPTmp->iExpandedEAPType.Ptr(), 
-			expandedEAPTmp->iExpandedEAPType.Size() ) );
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::SetTunnelingExpandedEapDataL(): disabled EAP-type=0xfe%06x%08x\n"),
+			expandedEAPTmp->GetVendorId(),
+			expandedEAPTmp->GetVendorType()));
 
 		aDisabledEAPArrary.Append(expandedEAPTmp);
 
-		index = index + KExpandedEAPTypeSize;
+		index = index + KEapExpandedTypeLength;
 	}
 
 	CleanupStack::PopAndDestroy(&view); // Close view
 	CleanupStack::PopAndDestroy(buf); // Delete buf
 }
 
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
 //--------------------------------------------------
 
 TBool EapTlsPeapUtils::CipherSuiteUseRSAKeys(tls_cipher_suites_e aCipherSuite)
 {
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapTlsPeapUtils::CipherSuiteUseRSAKeys(): aCipherSuite=%d\n"),
+		aCipherSuite));
+
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapTlsPeapUtils::CipherSuiteUseRSAKeys()\n"));
+
 	if (aCipherSuite == tls_cipher_suites_TLS_RSA_WITH_3DES_EDE_CBC_SHA
 		|| aCipherSuite == tls_cipher_suites_TLS_RSA_WITH_AES_128_CBC_SHA
 		|| aCipherSuite == tls_cipher_suites_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
@@ -2795,6 +2682,12 @@
 
 TBool EapTlsPeapUtils::CipherSuiteUseDSAKeys(tls_cipher_suites_e aCipherSuite)
 {
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapTlsPeapUtils::CipherSuiteUseDSAKeys(): aCipherSuite=%d\n"),
+		aCipherSuite));
+
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapTlsPeapUtils::CipherSuiteUseDSAKeys()\n"));
+
 	if (aCipherSuite == tls_cipher_suites_TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA
 		|| aCipherSuite == tls_cipher_suites_TLS_DHE_DSS_WITH_AES_128_CBC_SHA)
 	{
@@ -2808,6 +2701,12 @@
 
 TBool EapTlsPeapUtils::CipherSuiteIsEphemeralDHKeyExchange(tls_cipher_suites_e aCipherSuite)
 {
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapTlsPeapUtils::CipherSuiteIsEphemeralDHKeyExchange(): aCipherSuite=%d\n"),
+		aCipherSuite));
+
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapTlsPeapUtils::CipherSuiteIsEphemeralDHKeyExchange()\n"));
+
 	if (aCipherSuite == tls_cipher_suites_TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA
 		|| aCipherSuite == tls_cipher_suites_TLS_DHE_DSS_WITH_AES_128_CBC_SHA
 		|| aCipherSuite == tls_cipher_suites_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA
@@ -2832,149 +2731,67 @@
 	const eap_type_value_e aTunnelingType,
 	const eap_type_value_e aEapType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
-	TUint aEapVendorType = aEapType.get_vendor_type();
-
-#else
-
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-	TUint aEapVendorType = static_cast<TUint>(aEapType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
-// The current values for TTLS-PAP:
-// TTLS: aEapVendorType = TTLS, aTunnelingVendorType = None
-// TTLS/plain-PAP: aEapVendorType = ttls_plain_pap, aTunnelingVendorType = TTLS
-	
 	EAP_TRACE_DEBUG_SYMBIAN(
-		(_L("EapTlsPeapUtils::SetConfigurationL -Start- aIndexType=%d, aIndex=%d, Tunneling vendor type=%d, Eap vendor type=%d \n"),
-		aIndexType,aIndex, aTunnelingVendorType, aEapVendorType));
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("*************************** SetConfigurationL - Set the below values: ***************************\n")) );
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - Set these values for EAPType=%d"),aSettings.iEAPType) );
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, Username=%S"),aSettings.iUsernamePresent, &(aSettings.iUsername)) );
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, Password=%S"),aSettings.iPasswordPresent, &(aSettings.iPassword)) );
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, Realm=%S"),aSettings.iRealmPresent, &(aSettings.iRealm)) );
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, UsePseudonyms=%d"),aSettings.iUsePseudonymsPresent, aSettings.iUsePseudonyms) );
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, VerifyServerRealm=%d"),
-						aSettings.iVerifyServerRealmPresent, aSettings.iVerifyServerRealm) );
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, RequireClientAuthentication=%d"),
-						aSettings.iRequireClientAuthenticationPresent, aSettings.iRequireClientAuthentication) );
-						
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, SessionValidityTime=%d minutes"),
-						aSettings.iSessionValidityTimePresent, aSettings.iSessionValidityTime) );
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, CipherSuites Count=%d"),
-						aSettings.iCipherSuitesPresent, aSettings.iCipherSuites.Count()) );
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, PEAPv0Allowed=%d, PEAPv1Allowed=%d, PEAPv2Allowed=%d"),
-						aSettings.iPEAPVersionsPresent, aSettings.iPEAPv0Allowed,aSettings.iPEAPv1Allowed, aSettings.iPEAPv2Allowed ) );
-	
+		(_L("EapTlsPeapUtils::SetConfigurationL(): -Start- aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x, aEapType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type(),
+		aEapType.get_vendor_id(),
+		aEapType.get_vendor_type()));
+
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapTlsPeapUtils::SetConfigurationL()\n"));
+	
+	EAP_TRACE_DEBUG_SYMBIAN((_L("*************************** EapTlsPeapUtils::SetConfigurationL(): Set the below values: ***************************\n")) );
+
+	EAP_TRACE_SETTINGS(&aSettings);
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("*************************** EapTlsPeapUtils::SetConfigurationL(): Set the above values: ***************************\n")) );
+
+
 	// Validate length of inputs.
-	if(aSettings.iUsername.Length() > KMaxManualUsernameLengthInDB
-		|| aSettings.iRealm.Length() > KMaxManualRealmLengthInDB )
+	if(aSettings.iUsername.Length() > KMaxUsernameLengthInDB
+		|| aSettings.iRealm.Length() > KMaxRealmLengthInDB )
 	{
 		// Some inputs are too long. Can not be stored in DB.
 		
-		EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::SetConfigurationL: Too long arguments\n")));
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapTlsPeapUtils::SetConfigurationL(): Too long arguments\n")));
 		
 		User::Leave(KErrArgument);
 	}
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, Certificates Count=%d"),
-						aSettings.iCertificatesPresent, aSettings.iCertificates.Count()) );
-						
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - Certificate details below: \n")) );
-	
-	for( TInt n=0; n < aSettings.iCertificates.Count(); n++ )
-	{
-		EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - Certificate type:%d \n"), aSettings.iCertificates[n].iCertType) );
-		
-		EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - certificates - present=%d, SubjectName=%S"),
-						aSettings.iCertificates[n].iSubjectNamePresent, &(aSettings.iCertificates[n].iSubjectName) ) );
-						
-		EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - certificates - present=%d, IssuerName=%S"),
-						aSettings.iCertificates[n].iIssuerNamePresent, &(aSettings.iCertificates[n].iIssuerName) ) );
-						
-		EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - certificates - present=%d, SerialNumber=%S"),
-						aSettings.iCertificates[n].iSerialNumberPresent, &(aSettings.iCertificates[n].iSerialNumber) ) );
-						
-		EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - certificates - SubjectKeyID present=%d"),
-						aSettings.iCertificates[n].iSubjectKeyIDPresent ) );						
-						
-		EAP_TRACE_DATA_DEBUG_SYMBIAN( ( "SubjectKeyID:", aSettings.iCertificates[n].iSubjectKeyID.Ptr(), 
-													aSettings.iCertificates[n].iSubjectKeyID.Size() ) );
-
-		EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - certificates - Thumbprint present=%d"),
-						aSettings.iCertificates[n].iThumbprintPresent ) );						
-						
-		EAP_TRACE_DATA_DEBUG_SYMBIAN( ( "Thumbprint:", aSettings.iCertificates[n].iThumbprint.Ptr(), 
-													aSettings.iCertificates[n].iThumbprint.Size() ) );
-	}						
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, EncapsulatedEAPTypes Count=%d"),
-						aSettings.iEncapsulatedEAPTypesPresent, aSettings.iEncapsulatedEAPTypes.Count()) );
-	
-	for( TInt m=0; m < aSettings.iEncapsulatedEAPTypes.Count(); m++ )
-	{	
-		EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - EncapsulatedEAPTypes=%d"),
-						aSettings.iEncapsulatedEAPTypes[m]) );
-	}						
-
-#ifdef USE_FAST_EAP_TYPE		
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, AuthProvModeAllowed=%d"),
-						aSettings.iAuthProvModeAllowedPresent, aSettings.iAuthProvModeAllowed) );
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, UnauthProvModeAllowed=%d"),
-						aSettings.iUnauthProvModeAllowedPresent, aSettings.iUnauthProvModeAllowed) );
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, WarnADHPNoPAC=%d"),
-			aSettings.iWarnADHPNoPACPresent, aSettings.iWarnADHPNoPAC) );
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, WarnADHPNoMatchingPAC=%d"),
-			aSettings.iWarnADHPNoMatchingPACPresent, aSettings.iWarnADHPNoMatchingPAC) );
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, WarnNotDefaultServer=%d"),
-			aSettings.iWarnNotDefaultServerPresent, aSettings.iWarnNotDefaultServer) );
-	
+
+#ifdef USE_FAST_EAP_TYPE
+
 	// Validate length of PAC Group Ref.
 	if(aSettings.iPACGroupReference.Length() > KMaxPACGroupRefCollectionLengthInDB)
 	{
 		// Too long PAC Group Reference. Can not be stored in DB.
 		
-		EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::SetConfigurationL: Too long PAC Group Ref!\n")));
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapTlsPeapUtils::SetConfigurationL(): Too long PAC Group Ref!\n")));
 		
 		User::Leave(KErrArgument);
 	}
 
-	EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - present=%d, PAC Group Ref=%S"),
-						aSettings.iPACGroupReferencePresent, &(aSettings.iPACGroupReference)) );
-
 #endif //#ifdef USE_FAST_EAP_TYPE		
 
-	EAP_TRACE_DEBUG_SYMBIAN((_L("*************************** SetConfigurationL - Set the above values: ***************************\n")) );
-
-
 	// Check if the settings are for the correct type
-	if ((aSettings.iEAPType != EAPSettings::EEapTls
-		&& aSettings.iEAPType != EAPSettings::EEapPeap
-		&& aSettings.iEAPType != EAPSettings::EEapTtls
-#ifdef USE_FAST_EAP_TYPE		
-		&& aSettings.iEAPType != EAPSettings::EEapFast
-#endif	
-		&& aSettings.iEAPType != EAPSettings::ETtlsPlainPap
+	if (aSettings.iEAPExpandedType != (*EapExpandedTypeTls.GetType())
+		&& aSettings.iEAPExpandedType != (*EapExpandedTypePeap.GetType())
+		&& aSettings.iEAPExpandedType != (*EapExpandedTypeTtls.GetType())
+#ifdef USE_FAST_EAP_TYPE
+		&& aSettings.iEAPExpandedType != (*EapExpandedTypeFast.GetType())
+#else
+#warning USE_FAST_EAP_TYPE not defined
+#endif
+	
+		&& aSettings.iEAPExpandedType != (*EapExpandedTypeTtlsPap.GetType())
 		)
-		|| static_cast<TUint>(aSettings.iEAPType) != aEapVendorType)
 	{
-		EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - LEAVE - Unsupported EAP type\n")) );
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapTlsPeapUtils::SetConfigurationL(): LEAVE - Unsupported EAP type\n")) );
 		
 		User::Leave(KErrNotSupported);
 	}
-		
+
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();	
 
@@ -2989,86 +2806,81 @@
 	TPtrC fastSpecialSettings;		
 #endif
 	
-	switch (aEapVendorType)
+	if (aEapType == eap_type_tls)
+	{
+		settings.Set(KTlsDatabaseTableName);
+		usercerts.Set(KTlsAllowedUserCertsDatabaseTableName);
+		cacerts.Set(KTlsAllowedCACertsDatabaseTableName);
+		ciphersuites.Set(KTlsAllowedCipherSuitesDatabaseTableName);
+		maxSessionTime.Set(cf_str_EAP_TLS_max_session_validity_time_literal);
+		lastFullAuthTime.Set(KTLSLastFullAuthTime);
+	}
+	else if (aEapType == eap_type_peap)
 	{
-	case eap_type_tls:
-		{
-			settings.Set(KTlsDatabaseTableName);
-			usercerts.Set(KTlsAllowedUserCertsDatabaseTableName);
-			cacerts.Set(KTlsAllowedCACertsDatabaseTableName);
-			ciphersuites.Set(KTlsAllowedCipherSuitesDatabaseTableName);
-			maxSessionTime.Set(cf_str_EAP_TLS_max_session_validity_time_literal);
-			lastFullAuthTime.Set(KTLSLastFullAuthTime);
-		}
-		break;
-
-	case eap_type_peap:
-		{
-			settings.Set(KPeapDatabaseTableName);
-			usercerts.Set(KPeapAllowedUserCertsDatabaseTableName);
-			cacerts.Set(KPeapAllowedCACertsDatabaseTableName);
-			ciphersuites.Set(KPeapAllowedCipherSuitesDatabaseTableName);
-			maxSessionTime.Set(cf_str_EAP_PEAP_max_session_validity_time_literal);
-			lastFullAuthTime.Set(KPEAPLastFullAuthTime);
-		}
-		break;
-
-	case eap_type_ttls:
-		{
-			settings.Set(KTtlsDatabaseTableName);
-			usercerts.Set(KTtlsAllowedUserCertsDatabaseTableName);
-			cacerts.Set(KTtlsAllowedCACertsDatabaseTableName);
-			ciphersuites.Set(KTtlsAllowedCipherSuitesDatabaseTableName);
-			maxSessionTime.Set(cf_str_EAP_TTLS_max_session_validity_time_literal);
-			lastFullAuthTime.Set(KTTLSLastFullAuthTime);
-		}
-		break;
-
+		settings.Set(KPeapDatabaseTableName);
+		usercerts.Set(KPeapAllowedUserCertsDatabaseTableName);
+		cacerts.Set(KPeapAllowedCACertsDatabaseTableName);
+		ciphersuites.Set(KPeapAllowedCipherSuitesDatabaseTableName);
+		maxSessionTime.Set(cf_str_EAP_PEAP_max_session_validity_time_literal);
+		lastFullAuthTime.Set(KPEAPLastFullAuthTime);
+	}
+	else if (aEapType == eap_type_ttls)
+	{
+		settings.Set(KTtlsDatabaseTableName);
+		usercerts.Set(KTtlsAllowedUserCertsDatabaseTableName);
+		cacerts.Set(KTtlsAllowedCACertsDatabaseTableName);
+		ciphersuites.Set(KTtlsAllowedCipherSuitesDatabaseTableName);
+		maxSessionTime.Set(cf_str_EAP_TTLS_max_session_validity_time_literal);
+		lastFullAuthTime.Set(KTTLSLastFullAuthTime);
+	}
 #ifdef USE_FAST_EAP_TYPE		
-	case eap_type_fast:
-		{
-			settings.Set(KFastGeneralSettingsDBTableName); // This is general settings for FAST.
-			fastSpecialSettings.Set(KFastSpecialSettingsDBTableName);
-			
-			usercerts.Set(KFastAllowedUserCertsDatabaseTableName);
-			cacerts.Set(KFastAllowedCACertsDatabaseTableName);
-			ciphersuites.Set(KFastAllowedCipherSuitesDatabaseTableName);
-			maxSessionTime.Set(cf_str_EAP_FAST_max_session_validity_time_literal);
-			lastFullAuthTime.Set(KFASTLastFullAuthTime);
-		}
-		break;
+	else if (aEapType == eap_type_fast)
+	{
+		settings.Set(KFastGeneralSettingsDBTableName); // This is general settings for FAST.
+		fastSpecialSettings.Set(KFastSpecialSettingsDBTableName);
+		
+		usercerts.Set(KFastAllowedUserCertsDatabaseTableName);
+		cacerts.Set(KFastAllowedCACertsDatabaseTableName);
+		ciphersuites.Set(KFastAllowedCipherSuitesDatabaseTableName);
+		maxSessionTime.Set(cf_str_EAP_FAST_max_session_validity_time_literal);
+		lastFullAuthTime.Set(KFASTLastFullAuthTime);
+	}
 #endif
-
-	case eap_type_ttls_plain_pap:
-		{
-			settings.Set( KTtlsDatabaseTableName );
-			maxSessionTime.Set( cf_str_EAP_TLS_PEAP_ttls_pap_max_session_validity_time_literal );
-			lastFullAuthTime.Set( KTTLSPAPLastFullAuthTime );
-		}
-		break;
-
-	default:
-		{
-			EAP_TRACE_DEBUG_SYMBIAN((_L("SetConfigurationL - LEAVE - Unsupported EAP type =%d\n"),
-				aEapVendorType) );
-
-			// Should never happen
-			User::Leave(KErrArgument);
-		}
-	}	
-	
+	else if (aEapType == eap_type_ttls_plain_pap)
+	{
+		settings.Set( KTtlsDatabaseTableName );
+		maxSessionTime.Set( cf_str_EAP_TLS_PEAP_ttls_pap_max_session_validity_time_literal );
+		lastFullAuthTime.Set( KTTLSPAPLastFullAuthTime );
+	}
+	else
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: SetConfigurationL(): LEAVE - Unsupported EAP-type=0xfe%06x%08x\n"),
+			aEapType.get_vendor_id(),
+			aEapType.get_vendor_type()) );
+
+		// Should never happen
+		User::Leave(KErrArgument);
+	}
+
 	RDbView view;
 
-	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
+	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
 	
 	//////////////////////////////////////////
 	// This is for settings for all EAP types.
 	// For EAP-FAST it is General settings.
 	//////////////////////////////////////////
 	
-	sqlStatement.Format( KSQL, &settings, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex,
-		&KTunnelingType, aTunnelingVendorType );		
+	sqlStatement.Format(KSQL,
+		&settings, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());		
 		
 	// Evaluate view
 	User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement)));
@@ -3091,131 +2903,209 @@
 	//////////////////////////////////////////
 	// This is only for plain PAP settings. //
 	//////////////////////////////////////////
-	if ( aEapVendorType == eap_type_ttls_plain_pap )
-		{
+	if ( aEapType == eap_type_ttls_plain_pap )
+	{
 		// Username
 		if ( aSettings.iUsernamePresent )
-		    {
+		{
 			// Validate length.
 			if( aSettings.iUsername.Length() > KMaxPapUserNameLengthInDb )
-			    {
+		    {
 				// Username too long. Can not be stored in DB.				
-				EAP_TRACE_DEBUG_SYMBIAN( ( _L( 
-					"EapTlsPeapUtils::SetConfigurationL: Too long Username. Length=%d \n" ),
-				aSettings.iUsername.Length() ) );
-				CleanupStack::PopAndDestroy( 3 ); // colset, view, buf
+				EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapTlsPeapUtils::SetConfigurationL: Too long Username. Length=%d, max length=%d \n" ),
+					aSettings.iUsername.Length(),
+					KMaxPapUserNameLengthInDb) );
+
+				CleanupStack::PopAndDestroy(colSet);
+				CleanupStack::PopAndDestroy(&view);
+				CleanupStack::PopAndDestroy(buf);
 				User::Leave( KErrArgument );
-			    }
+		    }
 			
 			// Length is ok. Set the value in DB.
 			view.SetColL( colSet->ColNo( cf_str_EAP_TLS_PEAP_ttls_pap_username_literal ),
 				aSettings.iUsername);		
-		    }
+		}
+
+		// Password existence.
+		if (aSettings.iPasswordExistPresent
+			&& !aSettings.iPasswordExist)
+		{
+			// Clear password from database.
+			view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_ttls_pap_password_literal), KNullPasswordData);
+			view.PutL();
+			view.SetColNullL(colSet->ColNo(cf_str_EAP_TLS_PEAP_ttls_pap_password_literal));
+		}
+
 		// Password
 		if ( aSettings.iPasswordPresent )
-		    {
+	    {
 			// Validate length.
 			if ( aSettings.iPassword.Length() > KMaxPapPasswordLengthInDb )
-			    {
+		    {
 				// Password too long. Can not be stored in DB.				
-				EAP_TRACE_DEBUG_SYMBIAN( ( _L(
-					"EapTlsPeapUtils::SetConfigurationL: Too long Password. Length=%d \n" ),
-				aSettings.iPassword.Length() ) );
-				CleanupStack::PopAndDestroy( 3 ); // colset, view, buf
+				EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapTlsPeapUtils::SetConfigurationL: Too long Password. Length=%d, max length=%d\n" ),
+					aSettings.iPassword.Length(),
+					KMaxPapPasswordLengthInDb) );
+
+				CleanupStack::PopAndDestroy(colSet);
+				CleanupStack::PopAndDestroy(&view);
+				CleanupStack::PopAndDestroy(buf);
 				User::Leave( KErrArgument );
-			    }
+		    }
 						
 			// Length is ok. Set the value in DB.	
 			view.SetColL( colSet->ColNo(
 				cf_str_EAP_TLS_PEAP_ttls_pap_password_literal ),
 				aSettings.iPassword );
-			
-			// If password was supplied set password prompting off
-			view.SetColL( colSet->ColNo(
-				cf_str_EAP_TLS_PEAP_ttls_pap_password_prompt_literal ),
-				EPapPasswordPromptOff );
-		    }
+	    }
+
+		// Password prompt
+		if ( aSettings.iShowPassWordPromptPresent )
+	    {
+			if ( aSettings.iShowPassWordPrompt )
+			{
+				view.SetColL( colSet->ColNo(
+					cf_str_EAP_TLS_PEAP_ttls_pap_password_prompt_literal ),
+					EPapPasswordPromptOn );
+			}
+			else
+			{
+				view.SetColL( colSet->ColNo(
+					cf_str_EAP_TLS_PEAP_ttls_pap_password_prompt_literal ),
+					EPapPasswordPromptOff );
+			}
+	    }
 				
 		// Session validity time
 		if ( aSettings.iSessionValidityTimePresent )
-		    {
+	    {
 			// User or device management wants to store the session validity time.
 			// Convert the time to micro seconds and save.			
-			TInt64 validityInMicro =
-			    ( aSettings.iSessionValidityTime )
-			    *
-			    KMicroSecsInAMinute;			
+			TInt64 validityInMicro = (aSettings.iSessionValidityTime) * KMicroSecsInAMinute;
 			view.SetColL( colSet->ColNo( maxSessionTime ), validityInMicro );
-			
+
 			// If max session validity time is supplied and non-zero, set password prompting ON.
 			// It doesn't matter even if the password is supplied. If max session validity is supplied,
 			// it means user needs to provide a password hence prompt should appear.			
 			if( validityInMicro != 0)
-			    {
+		    {
 				view.SetColL( colSet->ColNo(
 					cf_str_EAP_TLS_PEAP_ttls_pap_password_prompt_literal ),
 					EPapPasswordPromptOn );
-			    }		
-		    }
+		    }		
+	    }
 		
 		// Last full authentication time should be made zero when EAP configurations are modified.
 		// This makes sure that the next authentication with this EAP would be full authentication
 		// instead of reauthentication even if the session is still valid.		
 		view.SetColL( colSet->ColNo( lastFullAuthTime ), default_FullAuthTime );
-		EAP_TRACE_DEBUG_SYMBIAN( ( _L(
-			"Session Validity: EAP-Type=%d, Resetting Full Auth Time since settings are modified\n" ),
-			aSettings.iEAPType ));
+
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils: Session Validity: Resetting Full Auth Time since settings are modified\n")));
 	    
 		view.PutL();		
-		CleanupStack::PopAndDestroy( 3 ); // colset, view, buf
+
+		CleanupStack::PopAndDestroy(colSet);
+		CleanupStack::PopAndDestroy(&view);
+		CleanupStack::PopAndDestroy(buf);
 		
-	    EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::SetConfigurationL - Return \n") ) );		
+	    EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::SetConfigurationL(): Return PAP\n") ) );		
 	    return; 
-        } // if ( aEapVendorType == eap_type_ttls_plain_pap )
-	
-	// Manual username
+	} // if ( aEapVendorType == eap_type_ttls_plain_pap )
+
+
+	if (aSettings.iUseAutomaticCACertificatePresent)
 	{
-		// Set the value in DB. Value could be empty. It doesn't matter.
-		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_manual_username_literal), aSettings.iUsername);
+		// This is to set the automatic or manual status.
+		TUint useAutomaticCACertificateStatus;
 		
+		if (aSettings.iUseAutomaticCACertificate)
+		{
+			useAutomaticCACertificateStatus = EEapDbTrue;
+		}
+		else
+		{
+			useAutomaticCACertificateStatus = EEapDbFalse;
+		}
+		
+		// Set the value.
+		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_use_automatic_ca_certificate_literal), useAutomaticCACertificateStatus);
+	}
+
+
+	if (aSettings.iUseAutomaticUsernamePresent)
+	{
 		// This is to set the automatic or manual status.
 		TUint useManualUsernameStatus;
 		
-		if (aSettings.iUsernamePresent)
+		if (aSettings.iUseAutomaticUsername)
+		{
+			useManualUsernameStatus = EEapDbFalse;
+		}
+		else
 		{
-			useManualUsernameStatus = ETLSPEAPUseManualUsernameYes;
+			useManualUsernameStatus = EEapDbTrue;
+		}
+		
+		// Set the value.
+		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_use_manual_username_literal), useManualUsernameStatus);
+	}
+
+
+	if (aSettings.iUseAutomaticRealmPresent)
+	{
+		// This is to set the automatic or manual status.
+		TUint useManualRealmStatus;
+		
+		if (aSettings.iUseAutomaticRealm)
+		{
+			useManualRealmStatus = EEapDbFalse;
 		}
 		else
 		{
-			useManualUsernameStatus = ETLSPEAPUseManualUsernameNo;
+			useManualRealmStatus = EEapDbTrue;
 		}
-		
+
 		// Set the value.
-		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_use_manual_username_literal), 
-			useManualUsernameStatus);
+		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_use_manual_realm_literal), useManualRealmStatus);
+	}
+
+
+	// Manual username
+	if (aSettings.iUsernamePresent)
+	{
+		// Check if length of username is less than the max length.
+		if(aSettings.iUsername.Length() > KMaxUsernameLengthInDB)
+		{
+			// Username too long. Can not be stored in DB.
+			
+			EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapTlsPeapUtils::SetConfigurationL(): Too long Username. Length=%d \n"),
+				aSettings.iUsername.Length()));
+			
+			User::Leave(KErrArgument);
+		}
+
+		// Set the value in DB. Value could be empty. It doesn't matter.
+		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_manual_username_literal), aSettings.iUsername);
 		
 	}
 		
 	// Manual realm
+	if (aSettings.iRealmPresent)
 	{
+		// Check if length of realm is less than the max length.
+		if(aSettings.iRealm.Length() > KMaxRealmLengthInDB)
+		{
+			// Realm too long. Can not be stored in DB.
+
+			EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapTlsPeapUtils::SetConfigurationL(): Too long Realm. Length=%d \n"),
+				aSettings.iRealm.Length()));
+			
+			User::Leave(KErrArgument);
+		}
+
 		// Set the value in DB. Value could be empty. It doesn't matter.
 		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_manual_realm_literal), aSettings.iRealm);
-
-		// This is to set the automatic or manual status.
-		TUint useManualRealmStatus;
-		
-		if (aSettings.iRealmPresent)
-		{
-			useManualRealmStatus = ETLSPEAPUseManualRealmYes;
-		}
-		else
-		{
-			useManualRealmStatus = ETLSPEAPUseManualRealmNo;
-		}
-		
-		// Set the value.
-		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_use_manual_realm_literal),
-			useManualRealmStatus);	
 	}
 	
 	// Verify server realm
@@ -3224,12 +3114,12 @@
 		if (aSettings.iVerifyServerRealm)
 		{
 			view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_verify_certificate_realm_literal), 
-				ETLSPEAPVerifyCertRealmYes);
+				EEapDbTrue);
 		}
 		else
 		{			
 			view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_verify_certificate_realm_literal), 
-				ETLSPEAPVerifyCertRealmNo);
+				EEapDbFalse);
 		}
 	}
 	
@@ -3239,12 +3129,12 @@
 		if (aSettings.iRequireClientAuthentication)
 		{
 			view.SetColL(colSet->ColNo(cf_str_TLS_server_authenticates_client_policy_in_client_literal),
-				ETLSPEAPServerAuthenticatesClientPolicyYes);
+				EEapDbTrue);
 		}
 		else
 		{			
 			view.SetColL(colSet->ColNo(cf_str_TLS_server_authenticates_client_policy_in_client_literal),
-				ETLSPEAPServerAuthenticatesClientPolicyNo);
+				EEapDbFalse);
 		}
 	}
 	
@@ -3265,8 +3155,7 @@
 	
 	view.SetColL(colSet->ColNo(lastFullAuthTime), default_FullAuthTime);
 
-	EAP_TRACE_DEBUG_SYMBIAN((_L("Session Validity: EAP-Type=%d, Resetting Full Auth Time since settings are modified\n"),
-								aSettings.iEAPType ));	
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils: Session Validity: Resetting Full Auth Time since settings are modified\n")));	
 	
 	// PEAP versions
 		
@@ -3297,10 +3186,28 @@
 		}
 		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_accepted_PEAP_versions_literal), acceptedPEAPVersions); 	
 	}
+
+	if (aSettings.iUseIdentityPrivacyPresent)
+	{
+		// This is to set the automatic or manual status.
+		TUint UseIdentityPrivacy = 0ul;
+		
+		if (aSettings.iUseIdentityPrivacy)
+		{
+			UseIdentityPrivacy = EEapDbTrue;
+		}
+		else
+		{
+			UseIdentityPrivacy = EEapDbFalse;
+		}
+
+		view.SetColL(colSet->ColNo(cf_str_EAP_TLS_PEAP_use_identity_privacy_literal), UseIdentityPrivacy); 	
+	}
 	
 	view.PutL();
 	
-	CleanupStack::PopAndDestroy(2); // view, colset	
+	CleanupStack::PopAndDestroy(colSet);
+	CleanupStack::PopAndDestroy(&view);
 	
 #ifdef USE_FAST_EAP_TYPE		
 
@@ -3310,8 +3217,16 @@
 	
 	if(aEapType == eap_type_fast)
 	{
-		sqlStatement.Format(KSQL, &fastSpecialSettings, 
-			&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+		sqlStatement.Format(KSQL,
+			&fastSpecialSettings, 
+			&KServiceType,
+			aIndexType,
+			&KServiceIndex,
+			aIndex,
+			&KTunnelingTypeVendorId,
+			aTunnelingType.get_vendor_id(),
+			&KTunnelingType, 
+			aTunnelingType.get_vendor_type());
 		
 		User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement)));
 		
@@ -3335,12 +3250,12 @@
 			if (aSettings.iAuthProvModeAllowed)
 			{
 				view.SetColL(colSet->ColNo(cf_str_EAP_FAST_allow_server_authenticated_provisioning_mode_literal), 
-					EFASTAuthProvModeAllowedYes);
+					EEapDbTrue);
 			}
 			else
 			{			
 				view.SetColL(colSet->ColNo(cf_str_EAP_FAST_allow_server_authenticated_provisioning_mode_literal), 
-					EFASTAuthProvModeAllowedNo);
+					EEapDbFalse);
 			}
 		}
 		
@@ -3349,12 +3264,12 @@
 			if (aSettings.iUnauthProvModeAllowed)
 			{
 				view.SetColL(colSet->ColNo(cf_str_EAP_FAST_allow_server_unauthenticated_provisioning_mode_ADHP_literal), 
-					EFASTUnauthProvModeAllowedYes);
+					EEapDbTrue);
 			}
 			else
 			{			
 				view.SetColL(colSet->ColNo(cf_str_EAP_FAST_allow_server_unauthenticated_provisioning_mode_ADHP_literal), 
-					EFASTUnauthProvModeAllowedNo);
+					EEapDbFalse);
 			}
 		}
 		
@@ -3364,12 +3279,12 @@
 			if (aSettings.iWarnADHPNoPAC)
 			{
 				view.SetColL(colSet->ColNo(KFASTWarnADHPNoPAC), 
-						EFASTWarnADHPNoPACYes);
+						EEapDbTrue);
 			}
 			else
 			{			
 				view.SetColL(colSet->ColNo(KFASTWarnADHPNoPAC), 
-						EFASTWarnADHPNoPACNo);
+						EEapDbFalse);
 			}
 		}	
 		
@@ -3378,12 +3293,12 @@
 			if (aSettings.iWarnADHPNoMatchingPAC)
 			{
 				view.SetColL(colSet->ColNo(KFASTWarnADHPNoMatchingPAC), 
-						EFASTWarnADHPNoMatchingPACYes);
+						EEapDbTrue);
 			}
 			else
 			{			
 				view.SetColL(colSet->ColNo(KFASTWarnADHPNoMatchingPAC), 
-						EFASTWarnADHPNoMatchingPACNo);
+						EEapDbFalse);
 			}
 		}	
 		
@@ -3392,12 +3307,12 @@
 			if (aSettings.iWarnADHPNoMatchingPAC)
 			{
 				view.SetColL(colSet->ColNo(KFASTWarnNotDefaultServer), 
-						EFASTWarnNotDefaultServerYes);
+						EEapDbTrue);
 			}
 			else
 			{			
 				view.SetColL(colSet->ColNo(KFASTWarnNotDefaultServer), 
-						EFASTWarnNotDefaultServerNo);
+						EEapDbFalse);
 			}
 		}	
 		
@@ -3412,7 +3327,8 @@
 		
 		view.PutL();
 		
-		CleanupStack::PopAndDestroy(2); // view, colset			
+		CleanupStack::PopAndDestroy(colSet);
+		CleanupStack::PopAndDestroy(&view);
 	
 	} // End: if(aEapType == eap_type_fast)
 	
@@ -3424,8 +3340,16 @@
 	
 	if (aSettings.iCipherSuitesPresent)
 	{
-		sqlStatement.Format(KSQL, &ciphersuites, 
-			&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+		sqlStatement.Format(KSQL,
+			&ciphersuites, 
+			&KServiceType,
+			aIndexType,
+			&KServiceIndex,
+			aIndex,
+			&KTunnelingTypeVendorId,
+			aTunnelingType.get_vendor_id(),
+			&KTunnelingType, 
+			aTunnelingType.get_vendor_type());
 		
 		User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement)));
 		
@@ -3452,31 +3376,41 @@
 			view.InsertL();			
 			view.SetColL(colSet->ColNo(KServiceType), static_cast<TUint>(aIndexType));
 			view.SetColL(colSet->ColNo(KServiceIndex), static_cast<TUint>(aIndex));			
-			view.SetColL(colSet->ColNo(KTunnelingType), aTunnelingVendorType);
+			view.SetColL(colSet->ColNo(KTunnelingTypeVendorId), aTunnelingType.get_vendor_id());
+			view.SetColL(colSet->ColNo(KTunnelingType), aTunnelingType.get_vendor_type());
 			view.SetColL(colSet->ColNo(KCipherSuite), aSettings.iCipherSuites[i]);
 			view.PutL();	
 		}
 		
-		CleanupStack::PopAndDestroy(2); // view, colset
+		CleanupStack::PopAndDestroy(colSet);
+		CleanupStack::PopAndDestroy(&view);
 	}
 	
 	/////////////////////////
 	// User + CA Certificates
 	/////////////////////////
 	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::SetConfigurationL - aSettings.iCertificatesPresent=%d \n"), aSettings.iCertificatesPresent ) );
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::SetConfigurationL(): aSettings.iCertificatesPresent=%d \n"), aSettings.iCertificatesPresent ) );
 	
 	if (aSettings.iCertificatesPresent)
 	{
 		// Needed for getting the Symbian's subject key id.
-		CEapTlsPeapCertFetcher* certFetcher = CEapTlsPeapCertFetcher::NewL();
-		CleanupStack::PushL(certFetcher);
+		//CEapTlsPeapCertFetcher* certFetcher = CEapTlsPeapCertFetcher::NewL();
+		//CleanupStack::PushL(certFetcher);
 				
 		TBuf8<KKeyIdentifierLength> symbianSubjectKeyID;		
 		
 		// For USER certificate.		
-		sqlStatement.Format(KSQL, &usercerts, 
-			&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+		sqlStatement.Format(KSQL,
+			&usercerts, 
+			&KServiceType,
+			aIndexType,
+			&KServiceIndex,
+			aIndex,
+			&KTunnelingTypeVendorId,
+			aTunnelingType.get_vendor_id(),
+			&KTunnelingType, 
+			aTunnelingType.get_vendor_type());
 			
 		User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement)));
 	
@@ -3500,18 +3434,20 @@
 		
 		TInt i(0);
 		
-		EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::SetConfigurationL - aSettings.iCertificates.Count()=%d \n"), aSettings.iCertificates.Count() ) );
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::SetConfigurationL(): aSettings.iCertificates.Count()=%d \n"), aSettings.iCertificates.Count() ) );
 
 		for (i = 0; i < aSettings.iCertificates.Count(); i++)
 		{
-			if (aSettings.iCertificates[i].iCertType == CertificateEntry::EUser)
+			if (aSettings.iCertificates[i]->GetIsEnabledPresent()
+				&& aSettings.iCertificates[i]->GetIsEnabled()
+				&& aSettings.iCertificates[i]->GetCertType() == EapCertificateEntry::EUser)
 			{	
 				// Validate the length and save other certificate details to the DB.
-				if(aSettings.iCertificates[i].iSubjectName.Length() > KKeyIdentifierLength
-				   || aSettings.iCertificates[i].iIssuerName.Length() > KGeneralStringMaxLength
-				   || aSettings.iCertificates[i].iSerialNumber.Length() > KGeneralStringMaxLength
-				   || aSettings.iCertificates[i].iSubjectKeyID.Length() > KGeneralStringMaxLength
-				   || aSettings.iCertificates[i].iThumbprint.Length() > KThumbprintMaxLength)
+				if(aSettings.iCertificates[i]->GetSubjectName()->Length() > KKeyIdentifierLength
+				   || aSettings.iCertificates[i]->GetIssuerName()->Length() > KGeneralStringMaxLength
+				   || aSettings.iCertificates[i]->GetSerialNumber()->Length() > KGeneralStringMaxLength
+				   || aSettings.iCertificates[i]->GetSubjectKeyId().Length() > KGeneralStringMaxLength
+				   || aSettings.iCertificates[i]->GetThumbprint()->Length() > KThumbprintMaxLength)
 				{
 					// Too long data. Can not be stored in DB.
 
@@ -3521,36 +3457,48 @@
 				}					
 						
 				EAP_TRACE_DATA_DEBUG_SYMBIAN(("THIS IS SubjectKeyID:",
-						aSettings.iCertificates[i].iSubjectKeyID.Ptr(), aSettings.iCertificates[i].iSubjectKeyID.Size()));
+						aSettings.iCertificates[i]->GetSubjectKeyId().Ptr(),
+						aSettings.iCertificates[i]->GetSubjectKeyId().Length()));
 
 				// The cert label column is left empty
 
 				view.InsertL();			
 				view.SetColL(colSet->ColNo(KServiceType), static_cast<TUint>(aIndexType));
 				view.SetColL(colSet->ColNo(KServiceIndex), static_cast<TUint>(aIndex));
-				view.SetColL(colSet->ColNo(KTunnelingType), aTunnelingVendorType);				
+				view.SetColL(colSet->ColNo(KTunnelingTypeVendorId), aTunnelingType.get_vendor_id());
+				view.SetColL(colSet->ColNo(KTunnelingType), aTunnelingType.get_vendor_type());
 																
-				view.SetColL(colSet->ColNo(KSubjectName), aSettings.iCertificates[i].iSubjectName);
-				view.SetColL(colSet->ColNo(KIssuerName), aSettings.iCertificates[i].iIssuerName);
-				view.SetColL(colSet->ColNo(KSerialNumber), aSettings.iCertificates[i].iSerialNumber);
-				view.SetColL(colSet->ColNo(KActualSubjectKeyIdentifier), aSettings.iCertificates[i].iSubjectKeyID);					
+				view.SetColL(colSet->ColNo(KSubjectName), *(aSettings.iCertificates[i]->GetSubjectName()));
+				view.SetColL(colSet->ColNo(KIssuerName), *(aSettings.iCertificates[i]->GetIssuerName()));
+				view.SetColL(colSet->ColNo(KSerialNumber), *(aSettings.iCertificates[i]->GetSerialNumber()));
+				view.SetColL(colSet->ColNo(KActualSubjectKeyIdentifier), aSettings.iCertificates[i]->GetSubjectKeyId());
 				
 				// Special for thumb print (finger print). Need to convert it to 8 bits before storing in DB
 				TBuf8<KThumbprintMaxLength> thumbPrint8Bit;
-				thumbPrint8Bit.Copy(aSettings.iCertificates[i].iThumbprint);
+				thumbPrint8Bit.Copy(*(aSettings.iCertificates[i]->GetThumbprint()));
 				
 				view.SetColL(colSet->ColNo(KThumbprint), thumbPrint8Bit);
 				
-				view.SetColL(colSet->ColNo(KSubjectKeyIdentifier), aSettings.iCertificates[i].iSubjectKeyID);
+				view.SetColL(colSet->ColNo(KSubjectKeyIdentifier), aSettings.iCertificates[i]->GetSubjectKeyId());
 			
 				view.PutL();	
-				}
+			}
 		}
-		CleanupStack::PopAndDestroy(2); // view, colset			
+
+		CleanupStack::PopAndDestroy(colSet);
+		CleanupStack::PopAndDestroy(&view);
 
 		// Do the same for CA certificates.		
-		sqlStatement.Format(KSQL, &cacerts, 
-			&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+		sqlStatement.Format(KSQL,
+			&cacerts, 
+			&KServiceType,
+			aIndexType,
+			&KServiceIndex,
+			aIndex,
+			&KTunnelingTypeVendorId,
+			aTunnelingType.get_vendor_id(),
+			&KTunnelingType, 
+			aTunnelingType.get_vendor_type());
 		
 		User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement)));
 		
@@ -3572,14 +3520,16 @@
 
 		for (i = 0; i < aSettings.iCertificates.Count(); i++)
 		{
-			if (aSettings.iCertificates[i].iCertType == CertificateEntry::ECA)
+			if (aSettings.iCertificates[i]->GetIsEnabledPresent()
+				&& aSettings.iCertificates[i]->GetIsEnabled()
+				&& aSettings.iCertificates[i]->GetCertType() == EapCertificateEntry::ECA)
 			{
 				// Validate the length and save other certificate details to the DB.
-				if(aSettings.iCertificates[i].iSubjectName.Length() > KKeyIdentifierLength
-				   || aSettings.iCertificates[i].iIssuerName.Length() > KGeneralStringMaxLength
-				   || aSettings.iCertificates[i].iSerialNumber.Length() > KGeneralStringMaxLength
-				   || aSettings.iCertificates[i].iSubjectKeyID.Length() > KGeneralStringMaxLength
-				   || aSettings.iCertificates[i].iThumbprint.Length() > KThumbprintMaxLength)
+				if(aSettings.iCertificates[i]->GetSubjectName()->Length() > KKeyIdentifierLength
+				   || aSettings.iCertificates[i]->GetIssuerName()->Length() > KGeneralStringMaxLength
+				   || aSettings.iCertificates[i]->GetSerialNumber()->Length() > KGeneralStringMaxLength
+				   || aSettings.iCertificates[i]->GetSubjectKeyId().Length() > KGeneralStringMaxLength
+				   || aSettings.iCertificates[i]->GetThumbprint()->Length() > KThumbprintMaxLength)
 				{
 					// Too long data. Can not be stored in DB.
 
@@ -3593,47 +3543,52 @@
 				view.InsertL();			
 				view.SetColL(colSet->ColNo(KServiceType), static_cast<TUint>(aIndexType));
 				view.SetColL(colSet->ColNo(KServiceIndex), static_cast<TUint>(aIndex));				
-				view.SetColL(colSet->ColNo(KTunnelingType),aTunnelingVendorType);
+				view.SetColL(colSet->ColNo(KTunnelingTypeVendorId), aTunnelingType.get_vendor_id());
+				view.SetColL(colSet->ColNo(KTunnelingType), aTunnelingType.get_vendor_type());
 								
-				view.SetColL(colSet->ColNo(KSubjectName), aSettings.iCertificates[i].iSubjectName);
-				view.SetColL(colSet->ColNo(KIssuerName), aSettings.iCertificates[i].iIssuerName);
-				view.SetColL(colSet->ColNo(KSerialNumber), aSettings.iCertificates[i].iSerialNumber);
-				view.SetColL(colSet->ColNo(KActualSubjectKeyIdentifier), aSettings.iCertificates[i].iSubjectKeyID);					
+				view.SetColL(colSet->ColNo(KSubjectName), *(aSettings.iCertificates[i]->GetSubjectName()));
+				view.SetColL(colSet->ColNo(KIssuerName), *(aSettings.iCertificates[i]->GetIssuerName()));
+				view.SetColL(colSet->ColNo(KSerialNumber), *(aSettings.iCertificates[i]->GetSerialNumber()));
+				view.SetColL(colSet->ColNo(KActualSubjectKeyIdentifier), aSettings.iCertificates[i]->GetSubjectKeyId());
 				
 				// Special for thumb print (finger print). Need to convert it to 8 bits before storing in DB
 				TBuf8<KThumbprintMaxLength> thumbPrint8Bit;
-				thumbPrint8Bit.Copy(aSettings.iCertificates[i].iThumbprint);
+				thumbPrint8Bit.Copy(*(aSettings.iCertificates[i]->GetThumbprint()));
 				
 				view.SetColL(colSet->ColNo(KThumbprint), thumbPrint8Bit);
 				
 				// Get the "symbian's subject key id" using symbian API.
 				// We use this subject key id for authentication.
 
-				view.SetColL(colSet->ColNo(KSubjectKeyIdentifier), aSettings.iCertificates[i].iSubjectKeyID);
-
-				EAP_TRACE_DATA_DEBUG_SYMBIAN( ( "EapTlsPeapUtils::SetConfigurationL - Adding CA cert to DB, Supplied (Actual) SubjectKeyID:",
-					aSettings.iCertificates[i].iSubjectKeyID.Ptr(), aSettings.iCertificates[i].iSubjectKeyID.Size() ) );				
+				view.SetColL(colSet->ColNo(KSubjectKeyIdentifier), aSettings.iCertificates[i]->GetSubjectKeyId());
+
+				EAP_TRACE_DATA_DEBUG_SYMBIAN( ( "EapTlsPeapUtils::SetConfigurationL(): Adding CA cert to DB, Supplied (Actual) SubjectKeyID:",
+					aSettings.iCertificates[i]->GetSubjectKeyId().Ptr(),
+					aSettings.iCertificates[i]->GetSubjectKeyId().Length() ) );
 				
+				EAP_TRACE_SETTINGS(aSettings.iCertificates[i]);
+
 				view.PutL();
 				}
 		}
 		
-		CleanupStack::PopAndDestroy(2); // view, colset	
+		CleanupStack::PopAndDestroy(colSet);
+		CleanupStack::PopAndDestroy(&view);
 		
-		CleanupStack::PopAndDestroy(certFetcher);
+		//CleanupStack::PopAndDestroy(certFetcher);
 		
 	} // End of if (aSettings.iCertificatesPresent)
 	
-	CleanupStack::PopAndDestroy(); // buf
+	CleanupStack::PopAndDestroy(buf);
 		
 	/////////////////////
 	// Encapsulated types
 	/////////////////////
 	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::SetConfigurationL - aSettings.iEncapsulatedEAPTypesPresent=%d \n"), aSettings.iEncapsulatedEAPTypesPresent ) );
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::SetConfigurationL(): aSettings.iEnabledEncapsulatedEAPExpandedTypesPresent=%d \n"), aSettings.iEnabledEncapsulatedEAPExpandedTypesPresent ) );
 
 	// Encapsulated types are only for EAP-PEAP, EAP-TTLS and EAP-FAST. Not for EAP-TLS.
-	// This is just to be on safe side. In case if iEncapsulatedEAPTypesPresent is set true for EAP-TLS by the caller.
+	// This is just to be on safe side. In case if iEnabledEncapsulatedEAPExpandedTypesPresent is set true for EAP-TLS by the caller.
 	if ( aEapType != eap_type_peap 
 		 && aEapType != eap_type_ttls
 #ifdef USE_FAST_EAP_TYPE
@@ -3641,25 +3596,23 @@
 #endif		  		 
 		  )
 	{
-		EAP_TRACE_DEBUG_SYMBIAN(
-			(_L("EapTlsPeapUtils::SetConfigurationL - End - Since no encapsulated type for the EAPType =%d \n"),
-			aEapVendorType  ) );
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::SetConfigurationL(): End - Since no encapsulated type for the EAP-type=0xfe%06x%08x\n"),
+			aEapType.get_vendor_id(),
+			aEapType.get_vendor_type()  ) );
 			
 		return; // No need to proceed. No encapsulated type for EAP-TLS..
 	}
 	
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	if (aSettings.iEncapsulatedEAPTypesPresent)
+	if (aSettings.iEnabledEncapsulatedEAPExpandedTypesPresent)
 	{
-		RExpandedEapTypePtrArray enabledEAPTypes;
+		RPointerArray<TEapExpandedType> enabledEAPTypes;
 		// This is just for dummy. All EAP types available here are enabled as default.
-		RExpandedEapTypePtrArray disabledEAPTypes;
-		SExpandedEAPType* expandedEAPTmp = 0;
-	
-		for (TInt i = 0; i < aSettings.iEncapsulatedEAPTypes.Count(); i++)
+		RPointerArray<TEapExpandedType> disabledEAPTypes;
+		TEapExpandedType* expandedEAPTmp = 0;
+	
+		for (TInt i = 0; i < aSettings.iEnabledEncapsulatedEAPExpandedTypes.Count(); i++)
 		{
-			expandedEAPTmp = new SExpandedEAPType;
+			expandedEAPTmp = new TEapExpandedType;
 
 			if (expandedEAPTmp == 0)
 			{
@@ -3669,50 +3622,24 @@
 				disabledEAPTypes.Close();
 				User::Leave(KErrNoMemory);				
 			}
-			
-			// This fills the needed values for vendor id etc.
-			eap_expanded_type_c tmpExpEAP(static_cast <eap_type_ietf_values_e> (aSettings.iEncapsulatedEAPTypes[i]));
-			
-			// This is only for plain-MSCHAPv2 as long as we are using the value 99 for it.
-			if(aSettings.iEncapsulatedEAPTypes[i] == EAPSettings::EPlainMschapv2)
+
+			// Now copy the 8 byte string to expandedEAPTmp.
+			*expandedEAPTmp = aSettings.iEnabledEncapsulatedEAPExpandedTypes[i].GetValue();
+
+			EAP_TRACE_DATA_DEBUG_SYMBIAN(
+				("EapTlsPeapUtils::SetConfigurationL: Expanded EAP type string",
+				expandedEAPTmp->GetValue().Ptr(), 
+				expandedEAPTmp->GetValue().Size() ) );						
+
+			TInt error = enabledEAPTypes.Append(expandedEAPTmp);
+			if (error != KErrNone)
 			{
-				tmpExpEAP.set_eap_type_values(
-					eap_type_vendor_id_hack,
-					eap_type_vendor_type_plain_MSCHAPv2_hack);
-			}
-			
-			// And this is for TTLS-PAP as long as we are using the value 98 for it.
-			if(aSettings.iEncapsulatedEAPTypes[i] == EAPSettings::ETtlsPlainPap)
-			{
-				tmpExpEAP.set_eap_type_values(
-					eap_type_vendor_id_hack,
-					eap_type_vendor_type_ttls_plain_pap_hack);
+				delete expandedEAPTmp;
+				expandedEAPTmp = 0;
 			}
-			
-			// Some indirect way of forming the 8 byte string of an EAP type is needed here.
-			TUint8 tmpExpBuffer[KExpandedEAPTypeSize]; // This is for the eap_expanded_type_c::write_type
-			
-			// This copies the 8 byte string of EAP type to tmpExpBuffer. 
-			eap_status_e status = eap_expanded_type_c::write_type(0,
-											0, // index should be zero here.
-											tmpExpBuffer,
-											KExpandedEAPTypeSize,
-											true,
-											tmpExpEAP);
-											
-			// Now copy the 8 byte string to expandedEAPTmp.
-			expandedEAPTmp->iExpandedEAPType.Copy(tmpExpBuffer, KExpandedEAPTypeSize);
-			
-			EAP_TRACE_DATA_DEBUG_SYMBIAN(
-				("EapTlsPeapUtils::SetConfigurationL: Expanded EAp type string",
-				expandedEAPTmp->iExpandedEAPType.Ptr(), 
-				expandedEAPTmp->iExpandedEAPType.Size() ) );						
-														
-
-			enabledEAPTypes.Append(expandedEAPTmp);
 		}	
-	
-	TRAPD(error, SetTunnelingExpandedEapDataL(
+
+		TRAPD(error, SetTunnelingExpandedEapDataL(
 			aDatabase, 
 			0, 
 			enabledEAPTypes,
@@ -3724,7 +3651,7 @@
 			
 		if( error != KErrNone )
 		{
-			EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::SetConfigurationL - ########### Setting Expanded Tunneling types in the DB failed ############ \n") ) );
+			EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::SetConfigurationL(): ########### Setting Expanded Tunneling types in the DB failed ############ \n") ) );
 
 			enabledEAPTypes.ResetAndDestroy();
 			disabledEAPTypes.ResetAndDestroy();
@@ -3740,60 +3667,87 @@
 		disabledEAPTypes.Close();
 
 	}
-
-#else // For normal unexpanded EAP type.
-	
-	if (aSettings.iEncapsulatedEAPTypesPresent)
-	{
-		TEapArray eapArray;
-		
-		TEap *eap;
-		for (TInt i = 0; i < aSettings.iEncapsulatedEAPTypes.Count(); i++)
-		{
-			eap = new TEap;
-			if (eap == 0)
-			{
-				eapArray.ResetAndDestroy();
-				eapArray.Close();
-				User::Leave(KErrNoMemory);				
-			}
-			
-			eap->UID.NumFixedWidth(aSettings.iEncapsulatedEAPTypes[i], EDecimal, 2);
-			eap->Enabled = ETrue;
-			eapArray.Append(eap);
-		}	
-	
-		TInt err(KErrNone);
-		TRAP(err, SetEapDataL(
-			aDatabase,
-			0,
-			eapArray,
-			aIndexType,
-			aIndex,
-			aTunnelingType,
-			aEapType));
-
-		if( err != KErrNone )
-		{
-			EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::SetConfigurationL - ########### Setting Tunneling types in the DB failed ############ \n") ) );
-
-			eapArray.ResetAndDestroy();
-			eapArray.Close();			
-
-			User::Leave(KErrArgument); // There could be some problem in the encapsulated EAP type argument.
-		}
-
-		eapArray.ResetAndDestroy();
-		eapArray.Close();			
-	}
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::SetConfigurationL - End \n") ) );		
+	
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::SetConfigurationL(): End \n") ) );		
 
 } // EapTlsPeapUtils::SetConfigurationL()
 
 
+// ----------------------------------------------------------------------
+
+TInt EapTlsPeapUtils::FilterEapMethods(
+	RPointerArray<TEapExpandedType> * const aEAPTypes,
+	RPointerArray<TEapExpandedType> * const aPlugins)
+{
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::FilterEapMethods(): aEAPTypes->Count()=%d, aPlugins->Count()=%d\n"),
+		aEAPTypes->Count(),
+		aPlugins->Count()));
+
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapTlsPeapUtils::FilterEapMethods()\n"));
+
+	for (TInt act_ind = 0; act_ind < aEAPTypes->Count(); ++act_ind)
+	{
+		const TEapExpandedType * eap_type = (*aEAPTypes)[act_ind];
+		if (eap_type == 0)
+		{
+			return KErrNoMemory;
+		}
+
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::FilterEapMethods(): aEAPTypes[%d] EAP-type=0xfe%06x%08x\n"),
+			act_ind,
+			eap_type->GetVendorId(),
+			eap_type->GetVendorType()));
+
+		bool exists(false);
+
+		for (TInt plugin_ind = 0; plugin_ind < aPlugins->Count(); ++plugin_ind)
+		{
+			const TEapExpandedType * plugin_type = (*aPlugins)[plugin_ind];
+			if (plugin_type == 0)
+			{
+				return KErrNoMemory;
+			}
+
+			EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::FilterEapMethods(): aPlugins[%d] EAP-type=0xfe%06x%08x\n"),
+				plugin_ind,
+				plugin_type->GetVendorId(),
+				plugin_type->GetVendorType()));
+
+			if (*eap_type == *plugin_type)
+			{
+				// OK, this active EAP-method have implementation.
+				exists = true;
+
+				EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::FilterEapMethods(): Removes from aPlugins EAP-type=0xfe%06x%08x\n"),
+					eap_type->GetVendorId(),
+					eap_type->GetVendorType()));
+
+				// Remove this plugin EAP-method because it is in the list of EAP-methods.
+				delete (*aPlugins)[plugin_ind];
+				aPlugins->Remove(plugin_ind);
+
+				break;
+			}
+		} // for()
+
+		if (exists == false)
+		{
+			// Remove this EAP-method because there are no implementation.
+
+			EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::FilterEapMethods(): Removes from aEAPTypes EAP-type=0xfe%06x%08x\n"),
+				eap_type->GetVendorId(),
+				eap_type->GetVendorType()));
+
+			delete (*aEAPTypes)[act_ind];
+			aEAPTypes->Remove(act_ind);
+
+			--act_ind;
+		}
+	} // for()
+
+	return KErrNone;
+}
+
 // ---------------------------------------------------------
 // EapTlsPeapUtils::GetConfigurationL()
 // ---------------------------------------------------------
@@ -3806,21 +3760,16 @@
 	const eap_type_value_e aTunnelingType,
 	const eap_type_value_e aEapType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
-	TUint aEapVendorType = aEapType.get_vendor_type();
-
-#else
-
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-	TUint aEapVendorType = static_cast<TUint>(aEapType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-		
 	EAP_TRACE_DEBUG_SYMBIAN(
-		(_L("EapTlsPeapUtils::GetConfigurationL aIndexType=%d, aIndex=%d, Tunneling vendor type=%d, Eap vendor type=%d \n"),
-		aIndexType,aIndex, aTunnelingVendorType, aEapVendorType));
+		(_L("EapTlsPeapUtils::GetConfigurationL(): -Start- aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x, aEapType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type(),
+		aEapType.get_vendor_id(),
+		aEapType.get_vendor_type()));
+
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapTlsPeapUtils::GetConfigurationL()\n"));
 
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();	
@@ -3835,61 +3784,49 @@
 	TPtrC fastSpecialSettings;		
 #endif
 	
-	switch (aEapVendorType)
+	if (aEapType == eap_type_tls)
+	{
+		settings.Set(KTlsDatabaseTableName);
+		usercerts.Set(KTlsAllowedUserCertsDatabaseTableName);
+		cacerts.Set(KTlsAllowedCACertsDatabaseTableName);
+		ciphersuites.Set(KTlsAllowedCipherSuitesDatabaseTableName);
+		maxSessionTime.Set(cf_str_EAP_TLS_max_session_validity_time_literal);
+	}
+	else if (aEapType == eap_type_peap)
+	{
+		settings.Set(KPeapDatabaseTableName);
+		usercerts.Set(KPeapAllowedUserCertsDatabaseTableName);
+		cacerts.Set(KPeapAllowedCACertsDatabaseTableName);
+		ciphersuites.Set(KPeapAllowedCipherSuitesDatabaseTableName);
+		maxSessionTime.Set(cf_str_EAP_PEAP_max_session_validity_time_literal);
+	}
+	else if (aEapType == eap_type_ttls)
 	{
-	case eap_type_tls:
-		{
-			settings.Set(KTlsDatabaseTableName);
-			usercerts.Set(KTlsAllowedUserCertsDatabaseTableName);
-			cacerts.Set(KTlsAllowedCACertsDatabaseTableName);
-			ciphersuites.Set(KTlsAllowedCipherSuitesDatabaseTableName);
-			maxSessionTime.Set(cf_str_EAP_TLS_max_session_validity_time_literal);
-		}
-		break;
-
-	case eap_type_peap:
-		{
-			settings.Set(KPeapDatabaseTableName);
-			usercerts.Set(KPeapAllowedUserCertsDatabaseTableName);
-			cacerts.Set(KPeapAllowedCACertsDatabaseTableName);
-			ciphersuites.Set(KPeapAllowedCipherSuitesDatabaseTableName);
-			maxSessionTime.Set(cf_str_EAP_PEAP_max_session_validity_time_literal);
-		}
-		break;
-
-	case eap_type_ttls:
-		{
-			settings.Set(KTtlsDatabaseTableName);
-			usercerts.Set(KTtlsAllowedUserCertsDatabaseTableName);
-			cacerts.Set(KTtlsAllowedCACertsDatabaseTableName);
-			ciphersuites.Set(KTtlsAllowedCipherSuitesDatabaseTableName);
-			maxSessionTime.Set(cf_str_EAP_TTLS_max_session_validity_time_literal);
-		}
-		break;
-
+		settings.Set(KTtlsDatabaseTableName);
+		usercerts.Set(KTtlsAllowedUserCertsDatabaseTableName);
+		cacerts.Set(KTtlsAllowedCACertsDatabaseTableName);
+		ciphersuites.Set(KTtlsAllowedCipherSuitesDatabaseTableName);
+		maxSessionTime.Set(cf_str_EAP_TTLS_max_session_validity_time_literal);
+	}
 #ifdef USE_FAST_EAP_TYPE
-	case eap_type_fast:
-		{
-			settings.Set(KFastGeneralSettingsDBTableName); // This is general settings for FAST.
-			fastSpecialSettings.Set(KFastSpecialSettingsDBTableName);
-			
-			usercerts.Set(KFastAllowedUserCertsDatabaseTableName);
-			cacerts.Set(KFastAllowedCACertsDatabaseTableName);
-			ciphersuites.Set(KFastAllowedCipherSuitesDatabaseTableName);
-			maxSessionTime.Set(cf_str_EAP_FAST_max_session_validity_time_literal);
-		}
-		break;
+	else if (aEapType == eap_type_fast)
+	{
+		settings.Set(KFastGeneralSettingsDBTableName); // This is general settings for FAST.
+		fastSpecialSettings.Set(KFastSpecialSettingsDBTableName);
+		
+		usercerts.Set(KFastAllowedUserCertsDatabaseTableName);
+		cacerts.Set(KFastAllowedCACertsDatabaseTableName);
+		ciphersuites.Set(KFastAllowedCipherSuitesDatabaseTableName);
+		maxSessionTime.Set(cf_str_EAP_FAST_max_session_validity_time_literal);
+	}
 #endif
-
-
-	case eap_type_ttls_plain_pap:
-		{
+	else if (aEapType == eap_type_ttls_plain_pap)
+	{
 		settings.Set( KTtlsDatabaseTableName );
 		maxSessionTime.Set( cf_str_EAP_TLS_PEAP_ttls_pap_max_session_validity_time_literal );
-		}
-		break;
-		
-	default:
+	}
+	else
+	{
 		// Should never happen
 		User::Leave(KErrArgument);
 	}	
@@ -3897,15 +3834,23 @@
 	RDbView view;
 
 	// Form the query
-	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
+	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
 	
 	//////////////////////////////////////////
 	// This is for settings for all EAP types.
 	// For EAP-FAST it is General settings.
 	//////////////////////////////////////////
 	
-	sqlStatement.Format(KSQL, &settings, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+	sqlStatement.Format(KSQL,
+		&settings, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());
 
 	// Evaluate view
 	User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement)));
@@ -3922,26 +3867,39 @@
 	CDbColSet* colSet = view.ColSetL();
 	CleanupStack::PushL(colSet);
 
-	aSettings.iEAPType = static_cast<EAPSettings::TEapType>(aEapVendorType);
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::GetConfigurationL - aSettings.iEAPType=%d \n"),aSettings.iEAPType) );
-	
+	aSettings.iEAPExpandedType.SetValue(
+		aEapType.get_vendor_id(),
+		aEapType.get_vendor_type());
+
+	EAP_TRACE_DATA_DEBUG_SYMBIAN(
+		(EAPL("EapTlsPeapUtils::GetConfigurationL(): aSettings.iEAPExpandedType"),
+		aSettings.iEAPExpandedType.GetValue().Ptr(),
+		aSettings.iEAPExpandedType.GetValue().Length()));
+
 	//////////////////////////////////////////
 	// This is only for plain PAP settings. //
 	//////////////////////////////////////////
 	if ( aEapType == eap_type_ttls_plain_pap )
-		{		
+	{		
 	    // Username
 	    TPtrC username = view.ColDes( colSet->ColNo(
 	   		cf_str_EAP_TLS_PEAP_ttls_pap_username_literal ) );
 	    aSettings.iUsername.Copy( username );
 	    aSettings.iUsernamePresent = ETrue;
-	
+
+		// Password existence.
+		aSettings.iPasswordExistPresent = ETrue;
+		aSettings.iPasswordExist = ! view.IsColNull(colSet->ColNo(cf_str_EAP_TLS_PEAP_ttls_pap_password_literal));
+
+#if defined(USE_EAP_PASSWORD_READ_FROM_DATABASE)
         // Password
 	    TPtrC password = view.ColDes( colSet->ColNo(
     		cf_str_EAP_TLS_PEAP_ttls_pap_password_literal ) );
 	    aSettings.iPassword.Copy( password );
 	    aSettings.iPasswordPresent = ETrue;
+#else
+		EAP_TRACE_DEBUG_SYMBIAN((_L("WARNING: EapTlsPeapUtils::GetConfigurationL(): Password read is disabled\n")));
+#endif //#if defined(USE_EAP_PASSWORD_READ_FROM_DATABASE)
 
 	    // Session validity time	
 	    TInt64 maxSessionTimeMicro = view.ColInt64( colSet->ColNo(
@@ -3956,75 +3914,117 @@
 	    CleanupStack::PopAndDestroy(3); // view, colset, buf
 
 		return;
+	}
+
+
+	{
+		// For manual or automatic CA-certificate.
+		TUint useAutomaticCACertificate = view.ColUint(colSet->ColNo(cf_str_EAP_TLS_PEAP_use_automatic_ca_certificate_literal));
+
+		aSettings.iUseAutomaticCACertificatePresent = ETrue;
+
+		if(useAutomaticCACertificate == EEapDbTrue)
+		{
+			aSettings.iUseAutomaticCACertificate = ETrue;
 		}
-
-	
-	// Username
-	TPtrC username = view.ColDes(colSet->ColNo(cf_str_EAP_TLS_PEAP_manual_username_literal));
-	aSettings.iUsername.Copy(username);
-
-	// For manual or automatic status.
-	TUint useUsername = view.ColUint(colSet->ColNo(cf_str_EAP_TLS_PEAP_use_manual_username_literal));
-	if(useUsername == ETLSPEAPUseManualUsernameNo)
-	{
-		aSettings.iUsernamePresent = EFalse;		
-	}
-	else
-	{
-		aSettings.iUsernamePresent = ETrue;		
+		else
+		{
+			aSettings.iUseAutomaticCACertificate = EFalse;
+		}
 	}
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::GetConfigurationL - Settings.iUsername=%S \n"), &(aSettings.iUsername) ) );
-		
-	// Realm
-	TPtrC realm = view.ColDes(colSet->ColNo(cf_str_EAP_TLS_PEAP_manual_realm_literal));
-	aSettings.iRealm.Copy(realm);
-
-	// For manual or automatic status.
-	TUint useRealm = view.ColUint(colSet->ColNo(cf_str_EAP_TLS_PEAP_use_manual_realm_literal));
-	if(useRealm == ETLSPEAPUseManualRealmNo)
+
 	{
-		aSettings.iRealmPresent = EFalse;
+		// For manual or automatic username.
+		TUint useUsername = view.ColUint(colSet->ColNo(cf_str_EAP_TLS_PEAP_use_manual_username_literal));
+
+		aSettings.iUseAutomaticUsernamePresent = ETrue;
+
+		if(useUsername == EEapDbTrue)
+		{
+			aSettings.iUseAutomaticUsername = EFalse;		
+		}
+		else
+		{
+			aSettings.iUseAutomaticUsername = ETrue;		
+		}
 	}
-	else
+
 	{
-		aSettings.iRealmPresent = ETrue;
+		// For manual or automatic realm.
+		TUint useRealm = view.ColUint(colSet->ColNo(cf_str_EAP_TLS_PEAP_use_manual_realm_literal));
+
+		aSettings.iUseAutomaticRealmPresent = ETrue;
+
+		if(useRealm == EEapDbTrue)
+		{
+			aSettings.iUseAutomaticRealm = EFalse;
+		}
+		else
+		{
+			aSettings.iUseAutomaticRealm = ETrue;
+		}
 	}
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::GetConfigurationL - aSettings.iRealm=%S \n"),&(aSettings.iRealm)) );
-
-	// Verify server realm	
-	TInt verifyrealm = view.ColUint(colSet->ColNo(cf_str_EAP_TLS_PEAP_verify_certificate_realm_literal));
-	if (verifyrealm == 0)
+
 	{
-		aSettings.iVerifyServerRealm = EFalse;
+		// Username
+		TPtrC username = view.ColDes(colSet->ColNo(cf_str_EAP_TLS_PEAP_manual_username_literal));
+
+		aSettings.iUsernamePresent = ETrue;
+
+		aSettings.iUsername.Copy(username);
 	}
-	else
+	
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::GetConfigurationL(): Settings.iUsername=%S \n"), &(aSettings.iUsername) ) );
+
 	{
-		aSettings.iVerifyServerRealm = ETrue;
+		// Realm
+		TPtrC realm = view.ColDes(colSet->ColNo(cf_str_EAP_TLS_PEAP_manual_realm_literal));
+
+		aSettings.iRealmPresent = ETrue;
+
+		aSettings.iRealm.Copy(realm);
 	}
-	aSettings.iVerifyServerRealmPresent = ETrue;
-	
-	// Require client authentication
-	TInt requireclientauth = view.ColUint(colSet->ColNo(cf_str_TLS_server_authenticates_client_policy_in_client_literal));
-	if (requireclientauth == 0)
+	
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::GetConfigurationL(): aSettings.iRealm=%S \n"),&(aSettings.iRealm)) );
+
 	{
-		aSettings.iRequireClientAuthentication = EFalse;
+		// Verify server realm	
+		TInt verifyrealm = view.ColUint(colSet->ColNo(cf_str_EAP_TLS_PEAP_verify_certificate_realm_literal));
+		if (verifyrealm == 0)
+		{
+			aSettings.iVerifyServerRealm = EFalse;
+		}
+		else
+		{
+			aSettings.iVerifyServerRealm = ETrue;
+		}
+		aSettings.iVerifyServerRealmPresent = ETrue;
 	}
-	else
+	
 	{
-		aSettings.iRequireClientAuthentication = ETrue;
+		// Require client authentication
+		TInt requireclientauth = view.ColUint(colSet->ColNo(cf_str_TLS_server_authenticates_client_policy_in_client_literal));
+		if (requireclientauth == 0)
+		{
+			aSettings.iRequireClientAuthentication = EFalse;
+		}
+		else
+		{
+			aSettings.iRequireClientAuthentication = ETrue;
+		}
+		aSettings.iRequireClientAuthenticationPresent = ETrue;
 	}
-	aSettings.iRequireClientAuthenticationPresent = ETrue;
-
-	// Session validity time	
-	TInt64 maxSessionTimeMicro = view.ColInt64(colSet->ColNo(maxSessionTime));
-	
-	// Convert the time to minutes.	
-	TInt64 maxSessionTimeMin = maxSessionTimeMicro / KMicroSecsInAMinute;
-	
-	aSettings.iSessionValidityTime = static_cast<TUint>(maxSessionTimeMin);
-	aSettings.iSessionValidityTimePresent = ETrue;
+
+	{
+		// Session validity time	
+		TInt64 maxSessionTimeMicro = view.ColInt64(colSet->ColNo(maxSessionTime));
+		
+		// Convert the time to minutes.	
+		TInt64 maxSessionTimeMin = maxSessionTimeMicro / KMicroSecsInAMinute;
+		
+		aSettings.iSessionValidityTime = static_cast<TUint>(maxSessionTimeMin);
+		aSettings.iSessionValidityTimePresent = ETrue;
+	}
 
 	// PEAP versions
 	if (aEapType == eap_type_peap
@@ -4058,7 +4058,22 @@
 		aSettings.iPEAPVersionsPresent = ETrue;
 	}
 	
-	CleanupStack::PopAndDestroy(2); // view, colset
+	{
+		// Require client authentication
+		TInt UseIdentityPrivacy = view.ColUint(colSet->ColNo(cf_str_EAP_TLS_PEAP_use_identity_privacy_literal));
+		if (UseIdentityPrivacy == 0)
+		{
+			aSettings.iUseIdentityPrivacy = EFalse;
+		}
+		else
+		{
+			aSettings.iUseIdentityPrivacy = ETrue;
+		}
+		aSettings.iUseIdentityPrivacyPresent = ETrue;
+	}
+
+	CleanupStack::PopAndDestroy(colSet);
+	CleanupStack::PopAndDestroy(&view);
 	
 #ifdef USE_FAST_EAP_TYPE		
 
@@ -4068,8 +4083,16 @@
 	
 	if(aEapType == eap_type_fast)
 	{
-		sqlStatement.Format(KSQL, &fastSpecialSettings, 
-			&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+		sqlStatement.Format(KSQL,
+			&fastSpecialSettings, 
+			&KServiceType,
+			aIndexType,
+			&KServiceIndex,
+			aIndex,
+			&KTunnelingTypeVendorId,
+			aTunnelingType.get_vendor_id(),
+			&KTunnelingType, 
+			aTunnelingType.get_vendor_type());
 	
 		// Evaluate view
 		User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement)));
@@ -4088,7 +4111,7 @@
 	
 		// For provisioning modes.
 		TUint authProvMode = view.ColUint(colSet->ColNo(cf_str_EAP_FAST_allow_server_authenticated_provisioning_mode_literal));
-		if(authProvMode == EFASTAuthProvModeAllowedNo)
+		if(authProvMode == EEapDbFalse)
 		{
 			aSettings.iAuthProvModeAllowed = EFalse;
 		}
@@ -4100,7 +4123,7 @@
 		aSettings.iAuthProvModeAllowedPresent = ETrue;
 
 		TUint unauthProvMode = view.ColUint(colSet->ColNo(cf_str_EAP_FAST_allow_server_unauthenticated_provisioning_mode_ADHP_literal));
-		if(unauthProvMode == EFASTUnauthProvModeAllowedNo)
+		if(unauthProvMode == EEapDbFalse)
 		{
 			aSettings.iUnauthProvModeAllowed = EFalse;
 		}
@@ -4113,7 +4136,7 @@
 		
 		// For no PAC warning	
 		TUint warn = view.ColUint(colSet->ColNo(KFASTWarnADHPNoPAC));
-		if(warn == EFASTWarnADHPNoPACNo)
+		if(warn == EEapDbFalse)
 		{
 			aSettings.iWarnADHPNoPAC = EFalse;
 		}
@@ -4126,7 +4149,7 @@
 		
 		// For no matching PAC warning		
 		warn = view.ColUint(colSet->ColNo(KFASTWarnADHPNoMatchingPAC));
-		if(warn == EFASTWarnADHPNoMatchingPACNo)
+		if(warn == EEapDbFalse)
 		{
 			aSettings.iWarnADHPNoMatchingPAC = EFalse;
 		}
@@ -4139,7 +4162,7 @@
 		
 		// For no default server warning
 		warn = view.ColUint(colSet->ColNo(KFASTWarnNotDefaultServer));
-		if(warn == EFASTWarnNotDefaultServerNo)
+		if(warn == EEapDbFalse)
 		{
 			aSettings.iWarnNotDefaultServer = EFalse;
 		}
@@ -4159,7 +4182,8 @@
 			aSettings.iPACGroupReferencePresent = ETrue;
 		}
 		
-		CleanupStack::PopAndDestroy(2); // view, colset		
+		CleanupStack::PopAndDestroy(colSet);
+		CleanupStack::PopAndDestroy(&view);
 				
 	} // End: if(aEapType == eap_type_fast) 
 
@@ -4170,8 +4194,16 @@
 	// Cipher suites
 	//////////////////
 	
-	sqlStatement.Format(KSQL, &ciphersuites, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+	sqlStatement.Format(KSQL,
+		&ciphersuites, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());
 	
 	User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement)));
 	
@@ -4193,18 +4225,27 @@
 		} while (view.NextL() != EFalse);
 	}
 	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::GetConfigurationL - Total cipher suites appended=%d \n"),aSettings.iCipherSuites.Count()) );
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::GetConfigurationL(): Total cipher suites appended=%d \n"), aSettings.iCipherSuites.Count()) );
 	
 	aSettings.iCipherSuitesPresent = ETrue;
 	
-	CleanupStack::PopAndDestroy(2); // view, colset
+	CleanupStack::PopAndDestroy(colSet);
+	CleanupStack::PopAndDestroy(&view);
 	
 	/////////////////
 	// User Certificates
 	/////////////////
 
-	sqlStatement.Format(KSQL, &usercerts, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+	sqlStatement.Format(KSQL,
+		&usercerts, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());
 	
 	User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement)));
 	
@@ -4222,59 +4263,73 @@
 			view.GetL();
 			{
 				// This is big object.
-				CertificateEntry * certEntry = new (ELeave) CertificateEntry;
+				EapCertificateEntry * certEntry = new (ELeave) EapCertificateEntry;
 				CleanupStack::PushL(certEntry);
 
-				certEntry->iCertType = CertificateEntry::EUser;
+				certEntry->SetCertType(EapCertificateEntry::EUser);
 				
-				certEntry->iSubjectName.Copy(view.ColDes(colSet->ColNo(KSubjectName)));
-				if(certEntry->iSubjectName.Length())
+				certEntry->GetSubjectNameWritable()->Copy(view.ColDes(colSet->ColNo(KSubjectName)));
+				if(certEntry->GetSubjectName()->Length())
 				{
-					certEntry->iSubjectNamePresent = ETrue;
+					certEntry->SetSubjectNamePresent();
 				}
 				
-				certEntry->iIssuerName.Copy(view.ColDes(colSet->ColNo(KIssuerName)));
-				if(certEntry->iIssuerName.Length())
+				certEntry->GetIssuerNameWritable()->Copy(view.ColDes(colSet->ColNo(KIssuerName)));
+				if(certEntry->GetIssuerName()->Length())
 				{
-					certEntry->iIssuerNamePresent = ETrue;
+					certEntry->SetIssuerNamePresent();
 				}
 
-				certEntry->iSerialNumber.Copy(view.ColDes(colSet->ColNo(KSerialNumber)));
-				if(certEntry->iSerialNumber.Length())
+				certEntry->GetSerialNumberWritable()->Copy(view.ColDes(colSet->ColNo(KSerialNumber)));
+				if(certEntry->GetSerialNumber()->Length())
 				{
-					certEntry->iSerialNumberPresent = ETrue;
+					certEntry->SetSerialNumberPresent();
 				}
 
-				certEntry->iSubjectKeyID.Copy(view.ColDes8(colSet->ColNo(KActualSubjectKeyIdentifier))); // This is the subjectkey id we got in SetConfigurationL
-				if(certEntry->iSubjectKeyID.Length())
+				certEntry->GetSubjectKeyIdWritable()->Copy(view.ColDes8(colSet->ColNo(KActualSubjectKeyIdentifier))); // This is the subjectkey id we got in SetConfigurationL
+				if(certEntry->GetSubjectKeyId().Length())
 				{
-					certEntry->iSubjectKeyIDPresent = ETrue;
+					certEntry->SetSubjectKeyIdPresent();
 				}
 
-				certEntry->iThumbprint.Copy(view.ColDes8(colSet->ColNo(KThumbprint)));				
-				if(certEntry->iThumbprint.Length())
+				certEntry->GetThumbprintWritable()->Copy(view.ColDes8(colSet->ColNo(KThumbprint)));				
+				if(certEntry->GetThumbprint()->Length())
 				{
-					certEntry->iThumbprintPresent = ETrue;
+					certEntry->SetThumbprintPresent();
 				}
 
-				aSettings.iCertificates.AppendL(*certEntry);
-
-				EAP_TRACE_DATA_DEBUG_SYMBIAN( ( "EapTlsPeapUtils::GetConfigurationL - Filling User cert entry, SubjectKeyID:",
-					certEntry->iSubjectKeyID.Ptr(), certEntry->iSubjectKeyID.Size() ) );
-
-				CleanupStack::PopAndDestroy(certEntry);
+				certEntry->SetIsEnabledPresent();
+				certEntry->SetIsEnabled(ETrue);
+
+				aSettings.iCertificates.AppendL(certEntry);
+				aSettings.iCertificatesPresent = ETrue;
+
+				EAP_TRACE_DATA_DEBUG_SYMBIAN( ( "EapTlsPeapUtils::GetConfigurationL(): Filling User cert entry, SubjectKeyID:",
+					certEntry->GetSubjectKeyId().Ptr(),
+					certEntry->GetSubjectKeyId().Length() ) );
+
+				CleanupStack::Pop(certEntry);
 			}
 		} while (view.NextL() != EFalse);
 	}
 	
-	CleanupStack::PopAndDestroy(2); // view, colset
+	CleanupStack::PopAndDestroy(colSet);
+	CleanupStack::PopAndDestroy(&view);
 	
 	/////////////////
 	// CA Certificates
 	/////////////////
 
-	sqlStatement.Format(KSQL, &cacerts, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+	sqlStatement.Format(KSQL,
+		&cacerts, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());
 	
 	User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement)));
 	
@@ -4292,131 +4347,62 @@
 			view.GetL();
 			{	
 				// This is big object.
-				CertificateEntry * certEntry = new (ELeave) CertificateEntry;
+				EapCertificateEntry * certEntry = new (ELeave) EapCertificateEntry;
 				CleanupStack::PushL(certEntry);
 
-				certEntry->iCertType = CertificateEntry::ECA;
+				certEntry->SetCertType(EapCertificateEntry::ECA);
 				
-				certEntry->iSubjectName.Copy(view.ColDes(colSet->ColNo(KSubjectName)));
-				if(certEntry->iSubjectName.Length())
+				certEntry->GetSubjectNameWritable()->Copy(view.ColDes(colSet->ColNo(KSubjectName)));
+				if(certEntry->GetSubjectName()->Length())
 				{
-					certEntry->iSubjectNamePresent = ETrue;
+					certEntry->SetSubjectNamePresent();
 				}
 				
-				certEntry->iIssuerName.Copy(view.ColDes(colSet->ColNo(KIssuerName)));
-				if(certEntry->iIssuerName.Length())
+				certEntry->GetIssuerNameWritable()->Copy(view.ColDes(colSet->ColNo(KIssuerName)));
+				if(certEntry->GetIssuerName()->Length())
 				{
-					certEntry->iIssuerNamePresent = ETrue;
+					certEntry->SetIssuerNamePresent();
 				}
 
-				certEntry->iSerialNumber.Copy(view.ColDes(colSet->ColNo(KSerialNumber)));
-				if(certEntry->iSerialNumber.Length())
+				certEntry->GetSerialNumberWritable()->Copy(view.ColDes(colSet->ColNo(KSerialNumber)));
+				if(certEntry->GetSerialNumber()->Length())
 				{
-					certEntry->iSerialNumberPresent = ETrue;
+					certEntry->SetSerialNumberPresent();
 				}
 
-				certEntry->iSubjectKeyID.Copy(view.ColDes8(colSet->ColNo(KActualSubjectKeyIdentifier))); // This is the subjectkey id we got in SetConfigurationL
-				if(certEntry->iSubjectKeyID.Length())
+				certEntry->GetSubjectKeyIdWritable()->Copy(view.ColDes8(colSet->ColNo(KActualSubjectKeyIdentifier))); // This is the subjectkey id we got in SetConfigurationL
+				if(certEntry->GetSubjectKeyId().Length())
 				{
-					certEntry->iSubjectKeyIDPresent = ETrue;
+					certEntry->SetSubjectKeyIdPresent();
 				}
 
-				certEntry->iThumbprint.Copy(view.ColDes8(colSet->ColNo(KThumbprint)));				
-				if(certEntry->iThumbprint.Length())
+				certEntry->GetThumbprintWritable()->Copy(view.ColDes8(colSet->ColNo(KThumbprint)));				
+				if(certEntry->GetThumbprint()->Length())
 				{
-					certEntry->iThumbprintPresent = ETrue;
+					certEntry->SetThumbprintPresent();
 				}
 				
-				aSettings.iCertificates.AppendL(*certEntry);
-
-				EAP_TRACE_DATA_DEBUG_SYMBIAN( ( "EapTlsPeapUtils::GetConfigurationL - Filling CA cert entry, SubjectKeyID:",
-					certEntry->iSubjectKeyID.Ptr(), certEntry->iSubjectKeyID.Size() ) );
-
-				CleanupStack::PopAndDestroy(certEntry);
+				certEntry->SetIsEnabledPresent();
+				certEntry->SetIsEnabled(ETrue);
+
+				aSettings.iCertificates.AppendL(certEntry);
+				aSettings.iCertificatesPresent = ETrue;
+
+				EAP_TRACE_DATA_DEBUG_SYMBIAN( ( "EapTlsPeapUtils::GetConfigurationL(): Filling CA cert entry, SubjectKeyID:",
+					certEntry->GetSubjectKeyId().Ptr(),
+					certEntry->GetSubjectKeyId().Length() ) );
+
+				EAP_TRACE_SETTINGS(certEntry);
+
+				CleanupStack::Pop(certEntry);
 			}
 		} while (view.NextL() != EFalse);
 	}
 	
-	CleanupStack::PopAndDestroy(3); // view, colset, buf
-	
-	aSettings.iCertificatesPresent = ETrue;
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("**************** GetConfigurationL - Returning the below values: ***************\n")) );
-	EAP_TRACE_DEBUG_SYMBIAN((_L("GetConfigurationL - Return these values for EAPType=%d"),aSettings.iEAPType) );
-	EAP_TRACE_DEBUG_SYMBIAN((_L("GetConfigurationL - present=%d, Username=%S"),aSettings.iUsernamePresent, &(aSettings.iUsername)) );
-	EAP_TRACE_DEBUG_SYMBIAN((_L("GetConfigurationL - present=%d, Password=%S"),aSettings.iPasswordPresent, &(aSettings.iPassword)) );
-	EAP_TRACE_DEBUG_SYMBIAN((_L("GetConfigurationL - present=%d, Realm=%S"),aSettings.iRealmPresent, &(aSettings.iRealm)) );
-	EAP_TRACE_DEBUG_SYMBIAN((_L("GetConfigurationL - present=%d, UsePseudonyms=%d"),aSettings.iUsePseudonymsPresent, aSettings.iUsePseudonyms) );
-	EAP_TRACE_DEBUG_SYMBIAN((_L("GetConfigurationL - present=%d, VerifyServerRealm=%d"),
-						aSettings.iVerifyServerRealmPresent, aSettings.iVerifyServerRealm) );
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("GetConfigurationL - present=%d, RequireClientAuthentication=%d"),
-						aSettings.iRequireClientAuthenticationPresent, aSettings.iRequireClientAuthentication) );
-						
-	EAP_TRACE_DEBUG_SYMBIAN((_L("GetConfigurationL - present=%d, SessionValidityTime=%d minutes"),
-						aSettings.iSessionValidityTimePresent, aSettings.iSessionValidityTime) );
-						
-	EAP_TRACE_DEBUG_SYMBIAN((_L("GetConfigurationL - present=%d, CipherSuites Count=%d"),
-						aSettings.iCipherSuitesPresent, aSettings.iCipherSuites.Count()) );
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("GetConfigurationL - present=%d, PEAPv0Allowed=%d, PEAPv1Allowed=%d, PEAPv2Allowed=%d"),
-						aSettings.iPEAPVersionsPresent, aSettings.iPEAPv0Allowed,aSettings.iPEAPv1Allowed, aSettings.iPEAPv2Allowed ) );
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("GetConfigurationL - present=%d, Certificates Count=%d"),
-						aSettings.iCertificatesPresent, aSettings.iCertificates.Count()) );
-						
-	EAP_TRACE_DEBUG_SYMBIAN((_L("GetConfigurationL - Certificate details below: \n")) );
-	for( TInt n=0; n < aSettings.iCertificates.Count(); n++ )
-	{
-		EAP_TRACE_DEBUG_SYMBIAN((_L("GetConfigurationL - Certificate type:%d \n"), aSettings.iCertificates[n].iCertType) );
-		
-		EAP_TRACE_DEBUG_SYMBIAN((_L("GetConfigurationL - certificates - present=%d, SubjectName=%S"),
-						aSettings.iCertificates[n].iSubjectNamePresent, &(aSettings.iCertificates[n].iSubjectName)) );
-						
-		EAP_TRACE_DEBUG_SYMBIAN((_L("GetConfigurationL - certificates - present=%d, IssuerName=%S"),
-						aSettings.iCertificates[n].iIssuerNamePresent, &(aSettings.iCertificates[n].iIssuerName)) );
-						
-		EAP_TRACE_DEBUG_SYMBIAN((_L("GetConfigurationL - certificates - present=%d, SerialNumber=%S"),
-						aSettings.iCertificates[n].iSerialNumberPresent, &(aSettings.iCertificates[n].iSerialNumber)) );
-						
-		EAP_TRACE_DEBUG_SYMBIAN((_L("GetConfigurationL - certificates - SubjectKeyID present=%d"),
-						aSettings.iCertificates[n].iSubjectKeyIDPresent ) );
-						
-		EAP_TRACE_DATA_DEBUG_SYMBIAN( ( "SubjectKeyID:", aSettings.iCertificates[n].iSubjectKeyID.Ptr(), 
-													aSettings.iCertificates[n].iSubjectKeyID.Size() ) );						
-
-		EAP_TRACE_DEBUG_SYMBIAN((_L("GetConfigurationL - certificates - Thumbprint present=%d"),
-						aSettings.iCertificates[n].iThumbprintPresent ) );
-						
-		EAP_TRACE_DATA_DEBUG_SYMBIAN( ( "Thumbprint:", aSettings.iCertificates[n].iThumbprint.Ptr(), 
-													aSettings.iCertificates[n].iThumbprint.Size() ) );						
-	}
-	
-#ifdef USE_FAST_EAP_TYPE		
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("GetConfigurationL - present=%d, AuthProvModeAllowed=%d"),
-						aSettings.iAuthProvModeAllowedPresent, aSettings.iAuthProvModeAllowed) );
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("GetConfigurationL - present=%d, UnauthProvModeAllowed=%d"),
-						aSettings.iUnauthProvModeAllowedPresent, aSettings.iUnauthProvModeAllowed) );
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("GetConfigurationL - present=%d, WarnADHPNoPAC=%d"),
-			aSettings.iWarnADHPNoPACPresent, aSettings.iWarnADHPNoPAC) );
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("GetConfigurationL - present=%d, WarnADHPNoMatchingPAC=%d"),
-			aSettings.iWarnADHPNoMatchingPACPresent, aSettings.iWarnADHPNoMatchingPAC) );
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("GetConfigurationL - present=%d, WarnNotDefaultServer=%d"),
-			aSettings.iWarnNotDefaultServerPresent, aSettings.iWarnNotDefaultServer) );
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("GetConfigurationL - present=%d, PAC Group Ref=%S"),
-						aSettings.iPACGroupReferencePresent, &(aSettings.iPACGroupReference)) );
-
-#endif //#ifdef USE_FAST_EAP_TYPE		
-					
-	EAP_TRACE_DEBUG_SYMBIAN((_L("**************** GetConfigurationL - Returning the above values: ***************\n")) );
-
-	
+	CleanupStack::PopAndDestroy(colSet);
+	CleanupStack::PopAndDestroy(&view);
+	CleanupStack::PopAndDestroy(buf);
+
 	//////////////////////	
 	// Encapsulated types
 	//////////////////////
@@ -4429,19 +4415,17 @@
 #endif		 
 		 )
 	{
-		aSettings.iEncapsulatedEAPTypesPresent = EFalse;
+		aSettings.iEnabledEncapsulatedEAPExpandedTypesPresent = EFalse;
 		
-		EAP_TRACE_DEBUG_SYMBIAN(
-			(_L("EapTlsPeapUtils::GetConfigurationL - End - Since no encapsulated type for the EAPType =%d \n"),
-			aEapVendorType));
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::GetConfigurationL(): End - Since no encapsulated type for the EAP-type=0xfe%06x%08x\n"),
+			aEapType.get_vendor_id(),
+			aEapType.get_vendor_type()));
 		
 		return; // No need to proceed. Nothing more to provide.
 	}
-		
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	RExpandedEapTypePtrArray enabledEAPTypes;
-	RExpandedEapTypePtrArray disabledEAPTypes;
+
+	RPointerArray<TEapExpandedType> enabledEAPTypes;
+	RPointerArray<TEapExpandedType> disabledEAPTypes;
 	
 	TRAPD(error, GetTunnelingExpandedEapDataL(
 			aDatabase, 
@@ -4453,278 +4437,222 @@
 			aTunnelingType,
 			aEapType));
 			
-		if( error != KErrNone )
-		{
-			EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::GetConfigurationL - ########### Getting Expanded Tunneling types from the DB failed ############ \n") ) );
-
-			enabledEAPTypes.ResetAndDestroy();
-			disabledEAPTypes.ResetAndDestroy();
-			enabledEAPTypes.Close();
-			disabledEAPTypes.Close();
-
-			User::Leave(KErrGeneral);
-		}
-
-	// There should be some enabled EAP types (atleast one).
-	if (enabledEAPTypes.Count() == 0)
+	if( error != KErrNone )
+	{
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapTlsPeapUtils::GetConfigurationL(): ########### Getting Expanded Tunneling types from the DB failed ############ \n") ) );
+
+		enabledEAPTypes.ResetAndDestroy();
+		disabledEAPTypes.ResetAndDestroy();
+		enabledEAPTypes.Close();
+		disabledEAPTypes.Close();
+
+		User::Leave(KErrGeneral);
+	}
+
+
 	{
-		// Nothing enabled. Some problem. 
-		// We should get all the available EAP plugins on the device and make them enabled as default.
-		
-		RImplInfoPtrArray eapImplArray;
-
-		TRAP(error, REComSession::ListImplementationsL(KEapTypeInterfaceUid, eapImplArray));
-		if (error != KErrNone)
+		RPointerArray<TEapExpandedType> aPlugins;
+
+		// This works if we do not leave from the block.
+		PointerArrayResetAndDestroy<TEapExpandedType> aAutomaticPlugins(&aPlugins, EFalse);
+
+		EapPluginTools aPluginTool;
+
+		TEapExpandedType aSymbTunnelingType;
+    
+		error = CEapConversion::ConvertInternalTypeToExpandedEAPType(
+			&aEapType,
+			&aSymbTunnelingType);
+
+		if (error == KErrNone)
 		{
-			EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::GetConfigurationL - ########### Getting Expanded Tunneling types - Listing ECOM plugins failed ############ \n") ) );
-
-			enabledEAPTypes.ResetAndDestroy();
-			disabledEAPTypes.ResetAndDestroy();
-			enabledEAPTypes.Close();
-			disabledEAPTypes.Close();
-
-			User::Leave(KErrNotFound);
-		}
-		
-		EAP_TRACE_DEBUG_SYMBIAN(
-			(_L("GetConfigurationL - ListImplementationsL - No: of available EAP plugin implementations=%d \n"),
-		 	eapImplArray.Count() ) );
-		
-		SExpandedEAPType* expandedEAPTmp;
-		
-		// Add the EAP types to enabledEAPTypes array now.
-		
-		for (TInt i = 0; i < eapImplArray.Count(); i++)
-		{		
-			if (aEapType == eap_type_peap)
+			TRAP(error, (aPluginTool.ListAllEapPluginsL(aSymbTunnelingType, aPlugins)));
+			if (error != KErrNone)
 			{
-				// Some EAP types are not allowed inside EAP-PEAP.
-				if (CEapType::IsDisallowedInsidePEAP(*eapImplArray[i]))
-				{			
-					continue;	
-				}
-				
-				expandedEAPTmp = new SExpandedEAPType;
-				if (expandedEAPTmp == 0)
-				{
-					enabledEAPTypes.ResetAndDestroy();
-					disabledEAPTypes.ResetAndDestroy();
-					enabledEAPTypes.Close();
-					disabledEAPTypes.Close();
-
-					eapImplArray.ResetAndDestroy();
-					eapImplArray.Close();				
-
-					User::Leave(KErrNoMemory);				
-				}
-				
-				CleanupStack::PushL(expandedEAPTmp);
-				
-				expandedEAPTmp->iExpandedEAPType.Copy(eapImplArray[i]->DataType());
-
-				enabledEAPTypes.Append(expandedEAPTmp);				
-				
-				CleanupStack::Pop(expandedEAPTmp);
+				EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapTlsPeapUtils::GetConfigurationL(): aPluginTool.ListAllEapPluginsL() failed, EAP-type=0xfe%06x%08x, index_type=%d, index=%d, error=%d.\n"),
+					aEapType.get_vendor_id(),
+					aEapType.get_vendor_type(),
+					aIndexType,
+					aIndex,
+					error));
 			}
-
-			if (aEapType == eap_type_ttls)
-			{
-				// Some EAP types are not allowed inside EAP-TTLS.
-				if (CEapType::IsDisallowedInsideTTLS(*eapImplArray[i]))
-				{			
-					continue;	
-				}
-				
-				expandedEAPTmp = new SExpandedEAPType;
-				if (expandedEAPTmp == 0)
-				{
-					enabledEAPTypes.ResetAndDestroy();
-					disabledEAPTypes.ResetAndDestroy();
-					enabledEAPTypes.Close();
-					disabledEAPTypes.Close();
-
-					eapImplArray.ResetAndDestroy();
-					eapImplArray.Close();				
-
-					User::Leave(KErrNoMemory);				
-				}
-				
-				CleanupStack::PushL(expandedEAPTmp);
-				
-				expandedEAPTmp->iExpandedEAPType.Copy(eapImplArray[i]->DataType());
-
-				enabledEAPTypes.Append(expandedEAPTmp);				
-				
-				CleanupStack::Pop(expandedEAPTmp);
-			}
-
-#ifdef USE_FAST_EAP_TYPE
-
-			if (aEapType == eap_type_fast)
+		}
+
+		EAP_TRACE_DEBUG_SYMBIAN(
+			(_L("EapTlsPeapUtils::GetConfigurationL(): ListImplementationsL(): No: of available EAP plugin implementations=%d, enabledEAPTypes.Count()=%d, disabledEAPTypes.Count()=%d\n"),
+		 	aPlugins.Count(),
+			enabledEAPTypes.Count(),
+			disabledEAPTypes.Count()));
+
+		if (error == KErrNone)
+		{
+			// Filter out unimplemented enabled EAP-methods.
+			error = FilterEapMethods(
+				&enabledEAPTypes,
+				&aPlugins);
+		}
+
+		if (error == KErrNone)
+		{
+			// Filter out unimplemented disabled EAP-methods.
+			error = FilterEapMethods(
+				&disabledEAPTypes,
+				&aPlugins);
+		}
+
+		if (error == KErrNone)
+		{
+			// Add rest of the implemented EAP-methods to array of disabled EAP-methods.
+			EAP_TRACE_DEBUG_SYMBIAN(
+				(_L("EapTlsPeapUtils::GetConfigurationL(): ListImplementationsL(): Before adding disabled, No: of available EAP plugin implementations=%d, enabledEAPTypes.Count()=%d, disabledEAPTypes.Count()=%d\n"),
+		 		aPlugins.Count(),
+				enabledEAPTypes.Count(),
+				disabledEAPTypes.Count()));
+
+			for (TInt plugin_ind = 0; plugin_ind < aPlugins.Count(); ++plugin_ind)
 			{
-				// Some EAP types are not allowed inside EAP-FAST.
-				if (CEapType::IsDisallowedInsidePEAP(*eapImplArray[i]))
-				{			
-					continue;	
+				const TEapExpandedType * const plugin_type = aPlugins[plugin_ind];
+				if (plugin_type == 0)
+				{
+					error = KErrNoMemory;
+					break;
 				}
-				
-				expandedEAPTmp = new SExpandedEAPType;
-				if (expandedEAPTmp == 0)
+
+				TEapExpandedType * const disabled_eap_type = new TEapExpandedType;
+				if (disabled_eap_type != 0)
 				{
-					enabledEAPTypes.ResetAndDestroy();
-					disabledEAPTypes.ResetAndDestroy();
-					enabledEAPTypes.Close();
-					disabledEAPTypes.Close();
-
-					eapImplArray.ResetAndDestroy();
-					eapImplArray.Close();				
-
-					User::Leave(KErrNoMemory);				
+					*disabled_eap_type = *plugin_type;
+
+					EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::GetConfigurationL(): Adds disabled EAP-type=0xfe%06x%08x\n"),
+						disabled_eap_type->GetVendorId(),
+						disabled_eap_type->GetVendorType()));
+
+					error = disabledEAPTypes.Append( disabled_eap_type );
+					if (error != KErrNone)
+					{
+						break;
+					}
 				}
-				
-				CleanupStack::PushL(expandedEAPTmp);
-				
-				expandedEAPTmp->iExpandedEAPType.Copy(eapImplArray[i]->DataType());
-
-				enabledEAPTypes.Append(expandedEAPTmp);				
-				
-				CleanupStack::Pop(expandedEAPTmp);
-			}
-#endif // #ifdef USE_FAST_EAP_TYPE
-
-		} // End: for (TInt i = 0; i < eapImplArray.Count(); i++)
-		
-		eapImplArray.ResetAndDestroy();
-		eapImplArray.Close();
-							
-	} // End: if (enabledEAPTypes.Count() == 0)
-
-	EAP_TRACE_DEBUG_SYMBIAN(
-		(_L("EapTlsPeapUtils::GetConfigurationL - No: of available tunneled types for this EAP=%d \n"),
+			} // for()
+
+		}
+
+		EAP_TRACE_DEBUG_SYMBIAN(
+			(_L("EapTlsPeapUtils::GetConfigurationL(): ListImplementationsL(): After adding disabled, No: of available EAP plugin implementations=%d, enabledEAPTypes.Count()=%d, disabledEAPTypes.Count()=%d\n"),
+		 	aPlugins.Count(),
+			enabledEAPTypes.Count(),
+			disabledEAPTypes.Count()));
+
+	}
+
+	// This leave must be outside the previous block.
+	User::LeaveIfError(error);
+
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::GetConfigurationL(): No: of available tunneled types for this EAP=%d \n"),
 		enabledEAPTypes.Count()));
 
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::GetConfigurationL(): No: of disabled tunneled types for this EAP=%d \n"),
+		disabledEAPTypes.Count()));
+
 	// enabledEAPTypes contains the EAP types now (expanded).
-	// Fill aSettings.iEncapsulatedEAPTypes here.
-	
-	for (TInt i = 0; i < enabledEAPTypes.Count(); i++)
+	// Fill aSettings.iEnabledEncapsulatedEAPExpandedTypes here.
+
 	{
-		eap_expanded_type_c expEAPTmp;
+		TEapExpandedType EapType;
+
+		for (TInt i = 0; i < enabledEAPTypes.Count(); i++)
+		{
+			error = EapType.SetValue(
+				enabledEAPTypes[i]->GetValue().Ptr(),
+				enabledEAPTypes[i]->GetValue().Length());
+			if (error != KErrNone)
+			{
+				enabledEAPTypes.ResetAndDestroy();
+				disabledEAPTypes.ResetAndDestroy();
+				enabledEAPTypes.Close();
+				disabledEAPTypes.Close();
+
+				User::Leave(KErrNoMemory);				
+			}
+
+			error = aSettings.iEnabledEncapsulatedEAPExpandedTypes.Append(EapType);
+			if (error != KErrNone)
+			{
+				enabledEAPTypes.ResetAndDestroy();
+				disabledEAPTypes.ResetAndDestroy();
+				enabledEAPTypes.Close();
+				disabledEAPTypes.Close();
+
+				User::Leave(KErrNoMemory);				
+			}
+
+			EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::GetConfigurationL(): enabled EAP-type=0xfe%06x%08x\n"),
+				EapType.GetVendorId(),
+				EapType.GetVendorType()));
+		}
+
+		EAP_TRACE_DEBUG_SYMBIAN(
+			(_L("EapTlsPeapUtils::GetConfigurationL(): aSettings.iEnabledEncapsulatedEAPExpandedTypes.Count()=%d \n"),
+			aSettings.iEnabledEncapsulatedEAPExpandedTypes.Count()));
+
+		aSettings.iEnabledEncapsulatedEAPExpandedTypesPresent = ETrue;
 		
-		// This will read the expanded EAP from enabledEAPTypes[i]->iExpandedEAPType to expEAPTmp.
-		// This makes easy to get the vendor type.
-		eap_expanded_type_c::read_type( 0,
-										0,
-										enabledEAPTypes[i]->iExpandedEAPType.Ptr(),
-										KExpandedEAPTypeSize,
-										&expEAPTmp);
-	
-		// We need to fill only the vendor type to aSettings.iEncapsulatedEAPTypes
-		aSettings.iEncapsulatedEAPTypes.Append(expEAPTmp.get_vendor_type());
+	}
+
+	{
+		TEapExpandedType EapType;
+
+		for (TInt i = 0; i < disabledEAPTypes.Count(); i++)
+		{
+			error = EapType.SetValue(
+				disabledEAPTypes[i]->GetValue().Ptr(),
+				disabledEAPTypes[i]->GetValue().Length());
+			if (error != KErrNone)
+			{
+				enabledEAPTypes.ResetAndDestroy();
+				disabledEAPTypes.ResetAndDestroy();
+				enabledEAPTypes.Close();
+				disabledEAPTypes.Close();
+
+				User::Leave(KErrNoMemory);				
+			}
+
+			error = aSettings.iDisabledEncapsulatedEAPExpandedTypes.Append(EapType);
+			if (error != KErrNone)
+			{
+				enabledEAPTypes.ResetAndDestroy();
+				disabledEAPTypes.ResetAndDestroy();
+				enabledEAPTypes.Close();
+				disabledEAPTypes.Close();
+
+				User::Leave(KErrNoMemory);				
+			}
+
+			EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::GetConfigurationL(): disabled EAP-type=0xfe%06x%08x\n"),
+				EapType.GetVendorId(),
+				EapType.GetVendorType()));
+		}
+
+		EAP_TRACE_DEBUG_SYMBIAN(
+			(_L("EapTlsPeapUtils::GetConfigurationL(): aSettings.iDisabledEncapsulatedEAPExpandedTypes.Count()=%d \n"),
+			aSettings.iDisabledEncapsulatedEAPExpandedTypes.Count()));
+
+		aSettings.iDisabledEncapsulatedEAPExpandedTypesPresent = ETrue;
 		
-		EAP_TRACE_DEBUG_SYMBIAN(
-			(_L("EapTlsPeapUtils::GetConfigurationL - Available encapsulated type for this EAP(%d)=%d\n"),
-			aEapVendorType, expEAPTmp.get_vendor_type()));
 	}
-	
-	EAP_TRACE_DEBUG_SYMBIAN(
-		(_L("EapTlsPeapUtils::GetConfigurationL - aSettings.iEncapsulatedEAPTypes.Count()=%d \n"),
-		aSettings.iEncapsulatedEAPTypes.Count()));
+
+	EAP_TRACE_SETTINGS(&aSettings);
 
 	enabledEAPTypes.ResetAndDestroy();
 	disabledEAPTypes.ResetAndDestroy();
 	enabledEAPTypes.Close();
 	disabledEAPTypes.Close();
 
-	aSettings.iEncapsulatedEAPTypesPresent = ETrue;
-
-#else // for Normal EAP types.
-			
-	TEapArray eapArray;
-		
-	TRAPD(err, GetEapDataL(
-		aDatabase,
-		0,
-		eapArray, 
-		aIndexType,
-		aIndex,
-		aTunnelingType,	
-		aEapType));
-	if (err != KErrNone)
-	{
-		eapArray.ResetAndDestroy();
-		eapArray.Close();
-		User::Leave(KErrGeneral);
-	}
-	
-	RImplInfoPtrArray eapImplArray;
-	
-	if (eapArray.Count() == 0)
-	{
-		// The array was empty. By default all types are enabled.
-		TRAP(err, REComSession::ListImplementationsL(KEapTypeInterfaceUid, eapImplArray));
-		if (err != KErrNone)
-		{
-			eapArray.ResetAndDestroy();
-			eapArray.Close();
-			User::Leave(KErrGeneral);
-		}
-		
-		EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::GetConfigurationL - ListImplementationsL - No: of available implementations=%d \n"), eapImplArray.Count() ) );
-		
-		TEap *eap;
-		for (TInt i = 0; i < eapImplArray.Count(); i++)
-		{
-			if (CEapType::IsDisallowedInsidePEAP(*eapImplArray[i]))
-			{			
-				continue;	
-			}
-			
-			eap = new TEap;
-			if (eap == 0)
-			{
-				eapArray.ResetAndDestroy();
-				eapArray.Close();
-				eapImplArray.ResetAndDestroy();
-				eapImplArray.Close();				
-				User::Leave(KErrGeneral);				
-			}
-			eap->UID.Copy(eapImplArray[i]->DataType());
-			eap->Enabled = ETrue;
-			eapArray.Append(eap);
-		}	
-	}
-
-	TInt i(0);
-
-	for (i = 0; i < eapArray.Count(); i++)
-	{
-		if (eapArray[i]->Enabled)
-		{
-			TLex8 tmp(eapArray[i]->UID);
-			TUint val(0);
-			tmp.Val(val);
-			aSettings.iEncapsulatedEAPTypes.Append(val);
-
-			EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::GetConfigurationL - Available encapsulated type for this EAP =%d \n"), val ) );
-		}	
-	}
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::GetConfigurationL - eapArray.Count()=%d \n"),eapArray.Count() ) );
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::GetConfigurationL - aSettings.iEncapsulatedEAPTypes.Count()=%d \n"),aSettings.iEncapsulatedEAPTypes.Count() ) );	
-
-	eapArray.ResetAndDestroy();
-	eapArray.Close();
-	eapImplArray.ResetAndDestroy();
-	eapImplArray.Close();				
-		
-	aSettings.iEncapsulatedEAPTypesPresent = ETrue;
-	
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::GetConfigurationL - End \n") ) );	
 
 } // EapTlsPeapUtils::GetConfigurationL()
 
+// ---------------------------------------------------------
 
 void EapTlsPeapUtils::CopySettingsL(
 	RDbNamedDatabase& aDatabase,
@@ -4736,29 +4664,37 @@
 	const TInt aDestIndex,
 	const eap_type_value_e aDestTunnelingType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aSrcTunnelingVendorType = aSrcTunnelingType.get_vendor_type();
-	TUint aDestTunnelingVendorType = aDestTunnelingType.get_vendor_type();
-
-#else
-
-	TUint aSrcTunnelingVendorType = static_cast<TUint>(aSrcTunnelingType);
-	TUint aDestTunnelingVendorType = static_cast<TUint>(aDestTunnelingType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
-    EAP_TRACE_DEBUG_SYMBIAN(
-        (_L("EapTlsPeapUtils::CopySettingsL table=%s, aSrcIndexType=%d, aDestIndexType=%d, aSrcIndex=%d, aDestIndex=%d, SrcTunneling vendor type=%d, DestTunneling vendor type=%d \n"),
-                aTableName.Ptr(), aSrcIndexType, aDestIndexType, aSrcIndex, aDestIndex, aSrcTunnelingVendorType, aDestTunnelingVendorType));
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapTlsPeapUtils::CopySettingsL(): -Start- aSrcIndexType=%d, aSrcIndex=%d, aSrcTunnelingType=0xfe%06x%08x\n"),
+		aSrcIndexType,
+		aSrcIndex,
+		aSrcTunnelingType.get_vendor_id(),
+		aSrcTunnelingType.get_vendor_type()));
+	
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapTlsPeapUtils::CopySettingsL(): -Start- aDestIndexType=%d, aDestTunnelingType=0xfe%06x%08x\n"),
+		aDestIndexType,
+		aDestIndex,
+		aDestTunnelingType.get_vendor_id(),
+		aDestTunnelingType.get_vendor_type()));
+
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapTlsPeapUtils::CopySettingsL()\n"));
 
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 
-	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
-
-	sqlStatement.Format(KSQL, &aTableName, 
-		&KServiceType, aDestIndexType, &KServiceIndex, aDestIndex, &KTunnelingType, aDestTunnelingVendorType);
+	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
+
+	sqlStatement.Format(KSQL,
+		&aTableName, 
+		&KServiceType,
+		aDestIndexType,
+		&KServiceIndex,
+		aDestIndex,
+		&KTunnelingTypeVendorId,
+		aSrcTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aSrcTunnelingType.get_vendor_type());
 	
 	RDbView view;
 	
@@ -4780,7 +4716,8 @@
   		view.GetL();
 			if (view.ColUint(colSet->ColNo(KServiceType)) == static_cast<TUint>(aDestIndexType)
 				&& view.ColUint(colSet->ColNo(KServiceIndex)) == static_cast<TUint>(aDestIndex)
-				&& view.ColUint(colSet->ColNo(KTunnelingType)) == aDestTunnelingVendorType)
+				&& view.ColUint(colSet->ColNo(KTunnelingTypeVendorId)) == aDestTunnelingType.get_vendor_id()
+				&& view.ColUint(colSet->ColNo(KTunnelingType)) == aDestTunnelingType.get_vendor_type())
 				{  		
       			EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::CopySettingsL - Delete old records\n") ) );
       			view.DeleteL();
@@ -4791,8 +4728,16 @@
 	view.Close();
 	CleanupStack::PopAndDestroy(2); // view, colset
 	
-  	sqlStatement.Format(KSQL, &aTableName, 
-        &KServiceType, aSrcIndexType, &KServiceIndex, aSrcIndex, &KTunnelingType, aSrcTunnelingVendorType);
+  	sqlStatement.Format(KSQL,
+		&aTableName, 
+        &KServiceType,
+		aSrcIndexType,
+		&KServiceIndex,
+		aSrcIndex,
+		&KTunnelingTypeVendorId,
+		aSrcTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aSrcTunnelingType.get_vendor_type());
 
   	User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement), TDbWindow::EUnlimited , RDbView::EUpdatable));
 
@@ -4816,17 +4761,17 @@
 			// Check if it was already copied			
 			if (view.ColUint(colSet->ColNo(KServiceType)) != static_cast<TUint>(aDestIndexType)
 				|| view.ColUint(colSet->ColNo(KServiceIndex)) != static_cast<TUint>(aDestIndex)
-				|| view.ColUint(colSet->ColNo(KTunnelingType)) != aDestTunnelingVendorType)
+				|| view.ColUint(colSet->ColNo(KTunnelingTypeVendorId)) != aDestTunnelingType.get_vendor_id()
+				|| view.ColUint(colSet->ColNo(KTunnelingType)) != aDestTunnelingType.get_vendor_type())
 			{
 				bookmark = view.Bookmark();
 				
 				view.InsertCopyL();
 				
 				view.SetColL(colSet->ColNo(KServiceType), static_cast<TUint>(aDestIndexType));
-    
 	    		view.SetColL(colSet->ColNo(KServiceIndex), static_cast<TUint>(aDestIndex));
-
-	    		view.SetColL(colSet->ColNo(KTunnelingType), aDestTunnelingVendorType);
+				view.SetColL(colSet->ColNo(KTunnelingTypeVendorId), aDestTunnelingType.get_vendor_id());
+				view.SetColL(colSet->ColNo(KTunnelingType), aDestTunnelingType.get_vendor_type());
 				
 				view.PutL();
 			
@@ -4843,7 +4788,9 @@
 	
 	view.Close();
 	
-	CleanupStack::PopAndDestroy(3); // view, colset, buf
+	CleanupStack::PopAndDestroy(colSet);
+	CleanupStack::PopAndDestroy(&view);
+	CleanupStack::PopAndDestroy(buf);
 
 } // EapTlsPeapUtils::CopySettingsL()
 
@@ -4858,20 +4805,16 @@
 	const eap_type_value_e aTunnelingType,
 	const eap_type_value_e aEapType)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
-	TUint aEapVendorType = aEapType.get_vendor_type();
-
-#else
-
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-	TUint aEapVendorType = static_cast<TUint>(aEapType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::DeleteConfigurationL:Start:aIndexType=%d,aIndex=%d,aTunnelingVendorType=%d,aEapVendorType=%d"),
-			aIndexType, aIndex, aTunnelingVendorType, aEapVendorType));
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapTlsPeapUtils::DeleteConfigurationL(): -Start- aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x, aEapType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type(),
+		aEapType.get_vendor_id(),
+		aEapType.get_vendor_type()));
+
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapTlsPeapUtils::DeleteConfigurationL()\n"));
 	
 	TPtrC dbname;
 	TPtrC settings;
@@ -4883,123 +4826,89 @@
 	TPtrC fastSpecialSettings;
 #endif
 	
-	switch (aEapVendorType)
+	if (aEapType == eap_type_tls)
+	{
+		dbname.Set(KTlsDatabaseName);
+		settings.Set(KTlsDatabaseTableName);
+		usercerts.Set(KTlsAllowedUserCertsDatabaseTableName);
+		cacerts.Set(KTlsAllowedCACertsDatabaseTableName);
+		ciphersuites.Set(KTlsAllowedCipherSuitesDatabaseTableName);
+	}
+	else if (aEapType == eap_type_peap)
+	{
+		dbname.Set(KPeapDatabaseName);
+		settings.Set(KPeapDatabaseTableName);
+		usercerts.Set(KPeapAllowedUserCertsDatabaseTableName);
+		cacerts.Set(KPeapAllowedCACertsDatabaseTableName);
+		ciphersuites.Set(KPeapAllowedCipherSuitesDatabaseTableName);
+	}
+	else if (aEapType == eap_type_ttls)
 	{
-	case eap_type_tls:
-		{
-			dbname.Set(KTlsDatabaseName);
-			settings.Set(KTlsDatabaseTableName);
-			usercerts.Set(KTlsAllowedUserCertsDatabaseTableName);
-			cacerts.Set(KTlsAllowedCACertsDatabaseTableName);
-			ciphersuites.Set(KTlsAllowedCipherSuitesDatabaseTableName);
-		}
-		break;
-
-	case eap_type_peap:
-		{
-			dbname.Set(KPeapDatabaseName);
-			settings.Set(KPeapDatabaseTableName);
-			usercerts.Set(KPeapAllowedUserCertsDatabaseTableName);
-			cacerts.Set(KPeapAllowedCACertsDatabaseTableName);
-			ciphersuites.Set(KPeapAllowedCipherSuitesDatabaseTableName);
-		}
-		break;
-
-	case eap_type_ttls:
-		{
-			dbname.Set(KTtlsDatabaseName);
-			settings.Set(KTtlsDatabaseTableName);
-			usercerts.Set(KTtlsAllowedUserCertsDatabaseTableName);
-			cacerts.Set(KTtlsAllowedCACertsDatabaseTableName);
-			ciphersuites.Set(KTtlsAllowedCipherSuitesDatabaseTableName);
-		}
-		break;
-
+		dbname.Set(KTtlsDatabaseName);
+		settings.Set(KTtlsDatabaseTableName);
+		usercerts.Set(KTtlsAllowedUserCertsDatabaseTableName);
+		cacerts.Set(KTtlsAllowedCACertsDatabaseTableName);
+		ciphersuites.Set(KTtlsAllowedCipherSuitesDatabaseTableName);
+	}
 #ifdef USE_FAST_EAP_TYPE
-
-	case eap_type_fast:
-		{
-			dbname.Set(KFastDatabaseName);
-			settings.Set(KFastGeneralSettingsDBTableName); // This is general settings for FAST.
-			fastSpecialSettings.Set(KFastSpecialSettingsDBTableName);
-			
-			usercerts.Set(KFastAllowedUserCertsDatabaseTableName);
-			cacerts.Set(KFastAllowedCACertsDatabaseTableName);
-			ciphersuites.Set(KFastAllowedCipherSuitesDatabaseTableName);
-		}
-		break;
+	else if (aEapType == eap_type_fast)
+	{
+		dbname.Set(KFastDatabaseName);
+		settings.Set(KFastGeneralSettingsDBTableName); // This is general settings for FAST.
+		fastSpecialSettings.Set(KFastSpecialSettingsDBTableName);
+		
+		usercerts.Set(KFastAllowedUserCertsDatabaseTableName);
+		cacerts.Set(KFastAllowedCACertsDatabaseTableName);
+		ciphersuites.Set(KFastAllowedCipherSuitesDatabaseTableName);
+	}
 #endif
-
-	case eap_type_ttls_plain_pap:
-		{
-			dbname.Set( KTtlsDatabaseName );
-			settings.Set( KTtlsDatabaseTableName );
-		}
-	break;
-	
-	default:
+	else if (aEapType == eap_type_ttls_plain_pap)
+	{
+		dbname.Set( KTtlsDatabaseName );
+		settings.Set( KTtlsDatabaseTableName );
+	}
+	else
+	{
 		// Should never happen
 		User::Leave(KErrArgument);
 	}	
 
-	RDbs session;
-	RDbNamedDatabase database;
-	
-	// Connect to the DBMS server.
-	User::LeaveIfError(session.Connect());
-	CleanupClosePushL(session);	
-		
-#ifdef SYMBIAN_SECURE_DBMS
-	
-	// Create the secure shared database with the specified secure policy.
-	// Database will be created in the data caging path for DBMS (C:\private\100012a5).
-	
-	TInt err = database.Create(session, dbname, KSecureUIDFormat);
-	
-	if(err == KErrNone)
+	RDbNamedDatabase aDatabase;
+	RFs aFileServerSession;
+
+	TInt error(KErrNone);
+	TFileName aPrivateDatabasePathName;
+	
+	EapPluginTools::CreateDatabaseLC(
+		aDatabase,
+		aFileServerSession,
+		error,
+		dbname,
+		aPrivateDatabasePathName);
+
+	if(error == KErrNone)
 	{
 		// Database was created so it was empty. No need for further actions.
-		database.Destroy();
-		CleanupStack::PopAndDestroy();
+		aDatabase.Destroy();
+		CleanupStack::PopAndDestroy(&aDatabase);
+		CleanupStack::PopAndDestroy(&aFileServerSession);
 		return;
-		
-	} 
-	else if (err != KErrAlreadyExists) 
+	}
+	else if (error != KErrAlreadyExists) 
 	{
-		User::LeaveIfError(err);
+		User::LeaveIfError(error);
 	}
 	
-	// Database existed, open it.
-	User::LeaveIfError(database.Open(session, dbname, KSecureUIDFormat));
-	CleanupClosePushL(database);
-		
-#else
-	// For non-secured database. The database will be created in the old location (c:\system\data).
-	
-	RFs fsSession;		
-	User::LeaveIfError(fsSession.Connect());
-	CleanupClosePushL(fsSession);	
-	TInt err = database.Create(fsSession, dbname);
-
-	if(err == KErrNone)
-	{
-		// Database was created so it was empty. No need for further actions.
-		database.Destroy();
-		CleanupStack::PopAndDestroy(2); // fsSession, database session
-		return;
-		
-	} 
-	else if (err != KErrAlreadyExists) 
-	{
-		User::LeaveIfError(err);
-	}
-	
-	CleanupStack::PopAndDestroy(); // close fsSession
-	
-	User::LeaveIfError(database.Open(session, dbname));
-	CleanupClosePushL(database);		
-	    
-#endif // #ifdef SYMBIAN_SECURE_DBMS
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapLeapDbUtils::DeleteConfigurationL(): - calls aDatabase.Open()\n")));
+
+	error = aDatabase.Open(aFileServerSession, aPrivateDatabasePathName);
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapLeapDbUtils::DeleteConfigurationL(): - Opened private DB for %S. error=%d\n"),
+		&dbname,
+		error));
+
+	User::LeaveIfError(error);
+
 
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
@@ -5007,19 +4916,27 @@
 	EAP_TRACE_DEBUG_SYMBIAN(
 		(_L("EapTlsPeapUtils::DeleteConfigurationL - Deleting the tables\n")));
 
-	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d");
+	_LIT(KSQL, "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");
 	
 	//--------------------- Deletion 1 ----------------------------//
 	
 	// For all EAPs delete the settings table. 
 	// For EAP-FAST, this is delting the general settings table.
 	
-	sqlStatement.Format(KSQL, &settings, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+	sqlStatement.Format(KSQL,
+		&settings, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());
 	
 	// Evaluate view
 	RDbView view;
-	User::LeaveIfError(view.Prepare(database,TDbQuery(sqlStatement), TDbWindow::EUnlimited));
+	User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement), TDbWindow::EUnlimited));
 	CleanupClosePushL(view);
 	User::LeaveIfError(view.EvaluateAll());
 
@@ -5031,33 +4948,43 @@
 		} while (view.NextL() != EFalse);
 	}
 	
-	CleanupStack::PopAndDestroy(); // view
-	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::DeleteConfigurationL: Deleted %s (general) settings table"), settings.Ptr()));	
+	CleanupStack::PopAndDestroy(&view);
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::DeleteConfigurationL(): Deleted %s (general) settings table"), settings.Ptr()));	
 
 	//////////////////////////////////////////
 	// This is only for plain PAP settings. //
 	//////////////////////////////////////////
-	if ( aEapVendorType == eap_type_ttls_plain_pap )
-		{
-        CleanupStack::PopAndDestroy(3); // buf, database, session
-        EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::DeleteConfigurationL: Return")));	
+	if ( aEapType == eap_type_ttls_plain_pap )
+	{
+		CleanupStack::PopAndDestroy(buf);
+		CleanupStack::PopAndDestroy(&aDatabase);
+		CleanupStack::PopAndDestroy(&aFileServerSession);
+        EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::DeleteConfigurationL(): Return PAP")));	
         // we return here in case of pap because there is nothing to do else.
         return;
-		}
+	}
 	
 	//--------------------- Deletion 2 ----------------------------//
 	
-	// For all EAPs delte the User cert table
+	// For all EAPs delete the User cert table
 
 //	KSQL2 is "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d"
 	
-	sqlStatement.Format(KSQL, &usercerts, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+	sqlStatement.Format(KSQL,
+		&usercerts, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());
 
 	// Evaluate view
 	
-	User::LeaveIfError(view.Prepare(database,TDbQuery(sqlStatement), TDbWindow::EUnlimited));
+	User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement), TDbWindow::EUnlimited));
 	CleanupClosePushL(view);
 	User::LeaveIfError(view.EvaluateAll());
 	
@@ -5068,22 +4995,30 @@
 		} while (view.NextL() != EFalse);
 	}
 
-	CleanupStack::PopAndDestroy(); // view
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::DeleteConfigurationL: Deleted USER certs table")));	
+	CleanupStack::PopAndDestroy(&view);
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::DeleteConfigurationL(): Deleted USER certs table")));	
 
 	//--------------------- Deletion 3 ----------------------------//
 	
 	// For all EAPs delete the CA cert table
 
-//	KSQL3 is "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d"
-	
-	sqlStatement.Format(KSQL, &cacerts, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+	//	KSQL3 is "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d"
+	
+	sqlStatement.Format(KSQL,
+		&cacerts, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());
 	
 	// Evaluate view
 	
-	User::LeaveIfError(view.Prepare(database,TDbQuery(sqlStatement), TDbWindow::EUnlimited));
+	User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement), TDbWindow::EUnlimited));
 	CleanupClosePushL(view);
 	User::LeaveIfError(view.EvaluateAll());
 	
@@ -5094,22 +5029,30 @@
 		} while (view.NextL() != EFalse);
 	}
 
-	CleanupStack::PopAndDestroy(); // view
-
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::DeleteConfigurationL: Deleted CA certs table")));
+	CleanupStack::PopAndDestroy(&view);
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::DeleteConfigurationL(): Deleted CA certs table")));
 
 	//--------------------- Deletion 4 ----------------------------//
 	
 	// For all EAPs delete the Cipher suite table
 
-//	KSQL4 is "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d"
-	
-	sqlStatement.Format(KSQL, &ciphersuites, 
-		&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+	//	KSQL4 is "SELECT * FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d"
+	
+	sqlStatement.Format(KSQL,
+		&ciphersuites, 
+		&KServiceType,
+		aIndexType,
+		&KServiceIndex,
+		aIndex,
+		&KTunnelingTypeVendorId,
+		aTunnelingType.get_vendor_id(),
+		&KTunnelingType, 
+		aTunnelingType.get_vendor_type());
 
 	// Evaluate view
 	
-	User::LeaveIfError(view.Prepare(database,TDbQuery(sqlStatement), TDbWindow::EUnlimited));
+	User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement), TDbWindow::EUnlimited));
 	CleanupClosePushL(view);
 	User::LeaveIfError(view.EvaluateAll());
 	
@@ -5120,25 +5063,33 @@
 		} while (view.NextL() != EFalse);
 	}
 	
-	CleanupStack::PopAndDestroy(&view); // Close view
+	CleanupStack::PopAndDestroy(&view);
 		
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::DeleteConfigurationL: Deleted cipher suits table")));	
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::DeleteConfigurationL(): Deleted cipher suits table")));	
 
 	
 #ifdef USE_FAST_EAP_TYPE	
 
-	if(aEapVendorType == eap_type_fast)
+	if(aEapType == eap_type_fast)
 	{
 		//--------------------- Deletion 5 ----------------------------//
 		
 		// For EAP-FAST, delete the special settings table
 		
-		sqlStatement.Format(KSQL, &fastSpecialSettings, 
-			&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);
+		sqlStatement.Format(KSQL,
+			&fastSpecialSettings, 
+			&KServiceType,
+			aIndexType,
+			&KServiceIndex,
+			aIndex,
+			&KTunnelingTypeVendorId,
+			aTunnelingType.get_vendor_id(),
+			&KTunnelingType, 
+			aTunnelingType.get_vendor_type());
 	
 		// Evaluate view
 		
-		User::LeaveIfError(view.Prepare(database,TDbQuery(sqlStatement), TDbWindow::EUnlimited));
+		User::LeaveIfError(view.Prepare(aDatabase, TDbQuery(sqlStatement), TDbWindow::EUnlimited));
 		CleanupClosePushL(view);
 		User::LeaveIfError(view.EvaluateAll());
 		
@@ -5149,18 +5100,20 @@
 			} while (view.NextL() != EFalse);
 		}
 		
-		CleanupStack::PopAndDestroy(&view); // Close view
+		CleanupStack::PopAndDestroy(&view);
 			
-		EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::DeleteConfigurationL: Deleted EAP-FAST Special settings table")));	
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::DeleteConfigurationL(): Deleted EAP-FAST Special settings table")));	
 				
 	} // End: if(aEapVendorType == eap_type_fast)
 
 #endif // End: #ifdef USE_FAST_EAP_TYPE	
-	
+
 	// Close database
-	CleanupStack::PopAndDestroy(3); // buf, database, session
-	
-EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::DeleteConfigurationL: End")));	
+	CleanupStack::PopAndDestroy(buf);
+	CleanupStack::PopAndDestroy(&aDatabase);
+	CleanupStack::PopAndDestroy(&aFileServerSession);
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::DeleteConfigurationL: End")));	
 
 } // EapTlsPeapUtils::DeleteConfigurationL()
 
@@ -5173,14 +5126,21 @@
 	RDbNamedDatabase& aDatabase, 
 	TDesC& aTableName)
 {
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapTlsPeapUtils::AddExtraCertColumnsL(): -Start- aTableName=\"%S\"\n"),
+		&aTableName));
+
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapTlsPeapUtils::AddExtraCertColumnsL()\n"));
+	
 	// Check if the EXTRA cert columns are already in the table.
 	
 	CDbColSet* colSetCertTable = aDatabase.ColSetL(aTableName);
 	User::LeaveIfNull(colSetCertTable);
 	CleanupStack::PushL(colSetCertTable);	
 	
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::AddExtraCertColumnsL - Number of columns in %S table before addition=%d\n"),
-	&aTableName, colSetCertTable->Count()));
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::AddExtraCertColumnsL(): - Number of columns in %S table before addition=%d\n"),
+		&aTableName,
+		colSetCertTable->Count()));
 		
 	// Check if there is a column for Serial Number, for example.
 	if(colSetCertTable->ColNo(KSerialNumber) == KDbNullColNo)
@@ -5196,53 +5156,65 @@
 		//| Thumbprint			| BINARY(64)	| KThumbprint        |//	
 		//////////////////////////////////////////////////////////////////////////////
 			
-		EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::AddExtraCertColumnsL - EXTRA cert columns missing from the table %S. Adding now.\n"),
-		&aTableName));			
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::AddExtraCertColumnsL(): - EXTRA cert columns missing from the table %S. Adding now.\n"),
+			&aTableName));			
 
 		HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 		TPtr sqlStatement = buf->Des();
 		
 		_LIT(KSQLAlterTableForBin, "ALTER TABLE %S ADD %S BINARY(%d)");											 
 	
-		sqlStatement.Format(KSQLAlterTableForBin, &aTableName, 
-			&KActualSubjectKeyIdentifier, KKeyIdentifierLength);
+		sqlStatement.Format(KSQLAlterTableForBin,
+			&aTableName, 
+			&KActualSubjectKeyIdentifier,
+			KKeyIdentifierLength);
 			
 		User::LeaveIfError( aDatabase.Execute(sqlStatement));
 
 		_LIT(KSQLAlterTableForVarChar, "ALTER TABLE %S ADD %S VARCHAR(%d)");											 
 	
-		sqlStatement.Format(KSQLAlterTableForVarChar, &aTableName, 
-			&KSubjectName, KGeneralStringMaxLength);
+		sqlStatement.Format(KSQLAlterTableForVarChar,
+			&aTableName, 
+			&KSubjectName,
+			KGeneralStringMaxLength);
 			
 		User::LeaveIfError( aDatabase.Execute(sqlStatement));
 
-		sqlStatement.Format(KSQLAlterTableForVarChar, &aTableName, 
-			&KIssuerName, KGeneralStringMaxLength);
+		sqlStatement.Format(KSQLAlterTableForVarChar,
+			&aTableName, 
+			&KIssuerName,
+			KGeneralStringMaxLength);
 			
 		User::LeaveIfError( aDatabase.Execute(sqlStatement));
 	
-		sqlStatement.Format(KSQLAlterTableForVarChar, &aTableName, 
-			&KSerialNumber, KGeneralStringMaxLength);
+		sqlStatement.Format(KSQLAlterTableForVarChar,
+			&aTableName, 
+			&KSerialNumber,
+			KGeneralStringMaxLength);
 			
 		User::LeaveIfError( aDatabase.Execute(sqlStatement));
 	
-		sqlStatement.Format(KSQLAlterTableForBin, &aTableName, 
-			&KThumbprint, KThumbprintMaxLength);
+		sqlStatement.Format(KSQLAlterTableForBin,
+			&aTableName, 
+			&KThumbprint,
+			KThumbprintMaxLength);
 			
 		User::LeaveIfError( aDatabase.Execute(sqlStatement));
 	
-		CleanupStack::PopAndDestroy( buf ); // Delete buf or sqlStatement
+		CleanupStack::PopAndDestroy(buf);
 	}
 
-	CleanupStack::PopAndDestroy( colSetCertTable ); // Delete colSetCertTable.
+	CleanupStack::PopAndDestroy(colSetCertTable);
 
 	CDbColSet* colSetCertTableAfterAdd = aDatabase.ColSetL(aTableName);
 	User::LeaveIfNull(colSetCertTableAfterAdd);
 
-	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::AddExtraCertColumnsL - Number of columns in %S table after addition=%d\n"),
-	&aTableName, colSetCertTableAfterAdd->Count()));
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::AddExtraCertColumnsL(): - Number of columns in %S table after addition=%d\n"),
+		&aTableName,
+		colSetCertTableAfterAdd->Count()));
 	
 	delete colSetCertTableAfterAdd;
+
 } // EapTlsPeapUtils::AddExtraCertColumnsL()
 
 	
@@ -5259,26 +5231,19 @@
 	const TDesC& aDbColumnName,
 	eap_variable_data_c * const aDbColumnValue)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
-	TUint aEapVendorType = aEapType.get_vendor_type();
-
-#else
-
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-	TUint aEapVendorType = static_cast<TUint>(aEapType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-
-	
 	EAP_TRACE_DEBUG_SYMBIAN(
-	(_L("EapTlsPeapUtils::GetEapSettingsDataL-Start- aIndexType=%d, aIndex=%d, Tunneling vendor type=%d, Eap vendor type=%d \n"),
-	aIndexType,aIndex, aTunnelingVendorType, aEapVendorType));
-	
-	EAP_TRACE_DEBUG_SYMBIAN(
-	(_L("EapTlsPeapUtils::GetEapSettingsDataL Get Column Name:%S \n"),
-	&aDbColumnName));	
+		(_L("EapTlsPeapUtils::GetEapSettingsDataL(): -Start- aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x, aEapType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type(),
+		aEapType.get_vendor_id(),
+		aEapType.get_vendor_type()));
+
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapTlsPeapUtils::GetEapSettingsDataL()\n"));
+	
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::GetEapSettingsDataL Get Column Name:%S \n"),
+		&aDbColumnName));	
 
 	TBufC<KMaxEapDbTableNameLength> generalSettingsTableName;
 	
@@ -5287,45 +5252,41 @@
 #endif
 
 	// Set the database table name based on the type
-	switch (aEapVendorType)
+	if (aEapType == eap_type_tls)
+	{
+		generalSettingsTableName = KTlsDatabaseTableName;
+	}
+	else if (aEapType == eap_type_peap)
 	{
-		case eap_type_tls:
-			generalSettingsTableName = KTlsDatabaseTableName;
-			break;
-		
-		case eap_type_peap:
-			generalSettingsTableName = KPeapDatabaseTableName;	
-			break;
-				
-		case eap_type_ttls:
-		case eap_type_ttls_plain_pap:
-			generalSettingsTableName = KTtlsDatabaseTableName;
-			break;
-			
+		generalSettingsTableName = KPeapDatabaseTableName;	
+	}
+	else if (aEapType == eap_type_ttls
+		|| aEapType == eap_type_ttls_plain_pap)
+	{
+		generalSettingsTableName = KTtlsDatabaseTableName;
+	}
 #if defined (USE_FAST_EAP_TYPE)
-		case eap_type_fast:
-			generalSettingsTableName = KFastGeneralSettingsDBTableName; // General settings
-			specialSettingsTableName = KFastSpecialSettingsDBTableName; // Special settings  for only FAST
-			break;
+	else if (aEapType == eap_type_fast)
+	{
+		generalSettingsTableName = KFastGeneralSettingsDBTableName; // General settings
+		specialSettingsTableName = KFastSpecialSettingsDBTableName; // Special settings  for only FAST
+	}
 #endif // #if defined (USE_FAST_EAP_TYPE)
-
-		default:
-			{
-				// Unsupported EAP type		
-				// Should never happen
-				
-				EAP_TRACE_DEBUG_SYMBIAN(
-					(_L("EapTlsPeapUtils::GetEapSettingsDataL: ERROR: Unsupported EAP type=%d"),
-					aEapVendorType));
-
-				User::Leave(KErrArgument);
-			}
+	else
+	{
+		// Unsupported EAP type		
+		// Should never happen
+		
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapTlsPeapUtils::GetEapSettingsDataL(): Unsupported EAP type=0xfe%06x%08x"),
+			aEapType.get_vendor_id(),
+			aEapType.get_vendor_type()));
+
+		User::Leave(KErrArgument);
 	}
 	
 	if(aDbColumnName.Size() <= 0)	
 	{
-		EAP_TRACE_DEBUG_SYMBIAN(
-			(_L("EapTlsPeapUtils::GetEapSettingsDataL: ERROR: No Column Name!\n")));
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapTlsPeapUtils::GetEapSettingsDataL(): No Column Name!\n")));
 		
 		User::Leave(KErrArgument);
 	}
@@ -5334,7 +5295,7 @@
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 	
-	_LIT(KSQLQueryRow, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");	
+	_LIT(KSQLQueryRow, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");	
 	
 #if defined(USE_FAST_EAP_TYPE)
 	
@@ -5353,26 +5314,52 @@
 		EAP_TRACE_DEBUG_SYMBIAN(
 			(_L("EapTlsPeapUtils::GetEapSettingsDataL: This field will be read from EAP-FAST's special table")));
 
-		sqlStatement.Format(KSQLQueryRow, &aDbColumnName, &specialSettingsTableName, 
-			&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);		
+		sqlStatement.Format(KSQLQueryRow,
+			&aDbColumnName,
+			&specialSettingsTableName, 
+			&KServiceType,
+			aIndexType,
+			&KServiceIndex,
+			aIndex,
+			&KTunnelingTypeVendorId,
+			aTunnelingType.get_vendor_id(),
+			&KTunnelingType, 
+			aTunnelingType.get_vendor_type());		
 	}
 	else
 	{
-		sqlStatement.Format(KSQLQueryRow, &aDbColumnName, &generalSettingsTableName, 
-			&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);		
+		sqlStatement.Format(KSQLQueryRow,
+			&aDbColumnName,
+			&generalSettingsTableName, 
+			&KServiceType,
+			aIndexType,
+			&KServiceIndex,
+			aIndex,
+			&KTunnelingTypeVendorId,
+			aTunnelingType.get_vendor_id(),
+			&KTunnelingType, 
+			aTunnelingType.get_vendor_type());		
 	}
 
 #else
 
 	{
-		sqlStatement.Format(KSQLQueryRow, &aDbColumnName, &generalSettingsTableName, 
-			&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);		
+		sqlStatement.Format(KSQLQueryRow,
+			&aDbColumnName,
+			&generalSettingsTableName, 
+			&KServiceType,
+			aIndexType,
+			&KServiceIndex,
+			aIndex,
+			&KTunnelingTypeVendorId,
+			aTunnelingType.get_vendor_id(),
+			&KTunnelingType, 
+			aTunnelingType.get_vendor_type());		
 	}
 
 #endif // End: #if defined(USE_FAST_EAP_TYPE)	
 
-	EAP_TRACE_DEBUG_SYMBIAN(
-	(_L("EapTlsPeapUtils::GetEapSettingsDataL - SQL query formated OK")));
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::GetEapSettingsDataL - SQL query formated OK")));
 
 	RDbView view;
 	
@@ -5483,20 +5470,18 @@
 		}
 	}
 
-	CleanupStack::PopAndDestroy( &view ); // Close view.
+	CleanupStack::PopAndDestroy( &view );
 	
 	if (status != eap_status_ok)
 	{
-		EAP_TRACE_DEBUG_SYMBIAN(
-				(_L("EapTlsPeapUtils::GetEapSettingsDataL: Status=%d\n"), status));
+		EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::GetEapSettingsDataL: Status=%d\n"), status));
 	}
 	
 	EAP_TRACE_DATA_DEBUG_SYMBIAN(("GetEapSettingsDataL:DbColumnValue:",
 		aDbColumnValue->get_data(aDbColumnValue->get_data_length()),
 		aDbColumnValue->get_data_length()));
 
-	EAP_TRACE_DEBUG_SYMBIAN(
-		(_L("EapTlsPeapUtils::GetEapSettingsDataL: End \n")));
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::GetEapSettingsDataL: End \n")));
 
 } // EapTlsPeapUtils::GetEapSettingsDataL()
 
@@ -5514,25 +5499,20 @@
 	const TDesC& aDbColumnName,
 	const eap_variable_data_c * const aDbColumnValue)
 {
-#ifdef USE_EAP_EXPANDED_TYPES
-
-	TUint aTunnelingVendorType = aTunnelingType.get_vendor_type();
-	TUint aEapVendorType = aEapType.get_vendor_type();
-
-#else
-
-	TUint aTunnelingVendorType = static_cast<TUint>(aTunnelingType);
-	TUint aEapVendorType = static_cast<TUint>(aEapType);
-
-#endif //#ifdef USE_EAP_EXPANDED_TYPES
-	
 	EAP_TRACE_DEBUG_SYMBIAN(
-	(_L("EapTlsPeapUtils::SetEapSettingsDataL-Start- aIndexType=%d, aIndex=%d, Tunneling vendor type=%d, Eap vendor type=%d \n"),
-	aIndexType,aIndex, aTunnelingVendorType, aEapVendorType));
-	
-	EAP_TRACE_DEBUG_SYMBIAN(
-	(_L("EapTlsPeapUtils::SetEapSettingsDataL Set Column Name:%S \n"),
-	&aDbColumnName));	
+		(_L("EapTlsPeapUtils::SetEapSettingsDataL(): -Start- aIndexType=%d, aIndex=%d, aTunnelingType=0xfe%06x%08x, aEapType=0xfe%06x%08x\n"),
+		aIndexType,
+		aIndex,
+		aTunnelingType.get_vendor_id(),
+		aTunnelingType.get_vendor_type(),
+		aEapType.get_vendor_id(),
+		aEapType.get_vendor_type()));
+
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapTlsPeapUtils::SetEapSettingsDataL()\n"));
+	
+	
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::SetEapSettingsDataL Set Column Name:%S \n"),
+		&aDbColumnName));	
 
 	EAP_TRACE_DATA_DEBUG_SYMBIAN(("SetEapSettingsDataL:DbColumnValue:",
 		aDbColumnValue->get_data(aDbColumnValue->get_data_length()),
@@ -5545,45 +5525,41 @@
 #endif
 
 	// Set the database table name based on the type
-	switch (aEapVendorType)
+	if (aEapType == eap_type_tls)
+	{
+		generalSettingsTableName = KTlsDatabaseTableName;
+	}
+	else if (aEapType == eap_type_peap)
 	{
-		case eap_type_tls:
-			generalSettingsTableName = KTlsDatabaseTableName;	
-			break;
-		
-		case eap_type_peap:
-			generalSettingsTableName = KPeapDatabaseTableName;
-			break;
-				
-		case eap_type_ttls:
-		case eap_type_ttls_plain_pap:
-			generalSettingsTableName = KTtlsDatabaseTableName;
-			break;
-			
+		generalSettingsTableName = KPeapDatabaseTableName;
+	}
+	else if (aEapType == eap_type_ttls
+		|| aEapType == eap_type_ttls_plain_pap)
+	{
+		generalSettingsTableName = KTtlsDatabaseTableName;
+	}
 #if defined (USE_FAST_EAP_TYPE)
-		case eap_type_fast:
-			generalSettingsTableName = KFastGeneralSettingsDBTableName; // General settings
-			specialSettingsTableName = KFastSpecialSettingsDBTableName; // Special settings  for only FAST
-			break;
+	else if (aEapType == eap_type_fast)
+	{
+		generalSettingsTableName = KFastGeneralSettingsDBTableName; // General settings
+		specialSettingsTableName = KFastSpecialSettingsDBTableName; // Special settings  for only FAST
+	}
 #endif // #if defined (USE_FAST_EAP_TYPE)
-			
-		default:
-			{
-				// Unsupported EAP type		
-				// Should never happen
-				
-				EAP_TRACE_DEBUG_SYMBIAN(
-					(_L("EapTlsPeapUtils::SetEapSettingsDataL: ERROR: Unsupported EAP type=%d"),
-					aEapVendorType));
-
-				User::Leave(KErrArgument);
-			}
+	else
+	{
+		// Unsupported EAP type		
+		// Should never happen
+		
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapTlsPeapUtils::SetEapSettingsDataL(): Unsupported EAP-type=0xfe%06x%08x"),
+			aEapType.get_vendor_id(),
+			aEapType.get_vendor_type()));
+
+		User::Leave(KErrArgument);
 	}
-	
+
 	if(aDbColumnName.Size() <= 0)	
 	{
-		EAP_TRACE_DEBUG_SYMBIAN(
-			(_L("EapTlsPeapUtils::SetEapSettingsDataL: ERROR: No Column Name!\n")));
+		EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapTlsPeapUtils::SetEapSettingsDataL(): No Column Name!\n")));
 		
 		User::Leave(KErrArgument);
 	}
@@ -5592,7 +5568,7 @@
 	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
 	TPtr sqlStatement = buf->Des();
 	
-	_LIT(KSQLQueryRow, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d");	
+	_LIT(KSQLQueryRow, "SELECT %S FROM %S WHERE %S=%d AND %S=%d AND %S=%d AND %S=%d");	
 	
 #if defined(USE_FAST_EAP_TYPE)
 	
@@ -5611,26 +5587,52 @@
 		EAP_TRACE_DEBUG_SYMBIAN(
 			(_L("EapTlsPeapUtils::SetEapSettingsDataL: This field will be read from EAP-FAST's special table")));
 
-		sqlStatement.Format(KSQLQueryRow, &aDbColumnName, &specialSettingsTableName, 
-			&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);		
+		sqlStatement.Format(KSQLQueryRow,
+			&aDbColumnName,
+			&specialSettingsTableName, 
+			&KServiceType,
+			aIndexType,
+			&KServiceIndex,
+			aIndex,
+			&KTunnelingTypeVendorId,
+			aTunnelingType.get_vendor_id(),
+			&KTunnelingType, 
+			aTunnelingType.get_vendor_type());		
 	}
 	else
 	{
-		sqlStatement.Format(KSQLQueryRow, &aDbColumnName, &generalSettingsTableName, 
-			&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);		
+		sqlStatement.Format(KSQLQueryRow,
+			&aDbColumnName,
+			&generalSettingsTableName, 
+			&KServiceType,
+			aIndexType,
+			&KServiceIndex,
+			aIndex,
+			&KTunnelingTypeVendorId,
+			aTunnelingType.get_vendor_id(),
+			&KTunnelingType, 
+			aTunnelingType.get_vendor_type());		
 	}
 
 #else
 
 	{
-		sqlStatement.Format(KSQLQueryRow, &aDbColumnName, &generalSettingsTableName, 
-			&KServiceType, aIndexType, &KServiceIndex, aIndex, &KTunnelingType, aTunnelingVendorType);		
+		sqlStatement.Format(KSQLQueryRow,
+			&aDbColumnName,
+			&generalSettingsTableName, 
+			&KServiceType,
+			aIndexType,
+			&KServiceIndex,
+			aIndex,
+			&KTunnelingTypeVendorId,
+			aTunnelingType.get_vendor_id(),
+			&KTunnelingType, 
+			aTunnelingType.get_vendor_type());		
 	}
 
 #endif // End: #if defined(USE_FAST_EAP_TYPE)	
 
-	EAP_TRACE_DEBUG_SYMBIAN(
-	(_L("EapTlsPeapUtils::SetEapSettingsDataL - SQL query formated OK")));
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::SetEapSettingsDataL - SQL query formated OK")));
 
 	RDbView view;
 	
@@ -5683,10 +5685,9 @@
 
 #if defined (USE_FAST_EAP_TYPE)
 					
-					EAP_TRACE_DEBUG_SYMBIAN(
-							(_L("eap_am_type_tls_peap_symbian_c::authentication_finishedL WARNING, HACK to set Unauth Prov mode set to default (NO)!")));					
-	
-					view.SetColL(KDefaultColumnInView_One, EFASTUnauthProvModeAllowedNo);
+					EAP_TRACE_DEBUG_SYMBIAN((_L("WARNING: eap_am_type_tls_peap_symbian_c::authentication_finishedL(): HACK to set Unauth Prov mode set to default (NO)!")));					
+	
+					view.SetColL(KDefaultColumnInView_One, EEapDbFalse);
 				
 #endif // End: #if defined (USE_FAST_EAP_TYPE)
 				}
@@ -5696,8 +5697,7 @@
 				{
 					// Do some lexical analysis to get TInt64 value here and set it in DB.
 					
-					EAP_TRACE_DEBUG_SYMBIAN(
-						(_L("EapTlsPeapUtils::SetEapSettingsDataL: ERROR: EDbColInt64 not supported here yet!\n")));	
+					EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapTlsPeapUtils::SetEapSettingsDataL(): EDbColInt64 not supported here yet!\n")));	
 					
 					User::Leave(KErrNotSupported);					
 				}
@@ -5706,16 +5706,14 @@
 			case EDbColLongBinary:
 				{
 					// This needs special handling. (readstream). Not needed in this DB yet.	
-					EAP_TRACE_DEBUG_SYMBIAN(
-						(_L("EapTlsPeapUtils::SetEapSettingsDataL: ERROR: EDbColLongBinary not supported in this DB!\n")));	
+					EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapTlsPeapUtils::SetEapSettingsDataL(): EDbColLongBinary not supported in this DB!\n")));	
 					
 					User::Leave(KErrNotSupported);
 				}
 				break;			
 				
 			default:
-				EAP_TRACE_DEBUG_SYMBIAN(
-					(_L("EapTlsPeapUtils::SetEapSettingsDataL: ERROR: Unsupported DB field! \n")));	
+				EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapTlsPeapUtils::SetEapSettingsDataL: Unsupported DB field! \n")));	
 				
 				User::Leave(KErrNotSupported);
 				break;
@@ -5726,8 +5724,7 @@
 		} // End: if(view.ColCount() == KDefaultColumnInView_One)
 		else
 		{
-			EAP_TRACE_DEBUG_SYMBIAN(
-				(_L("EapTlsPeapUtils::SetEapSettingsDataL: ERROR: Too many columns in DB view, count=%d \n"),
+			EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: EapTlsPeapUtils::SetEapSettingsDataL(): Too many columns in DB view, count=%d \n"),
 				view.ColCount()));	
 			
 			User::Leave(KErrNotFound);
@@ -5737,94 +5734,105 @@
 	// Now it should go to the DB.
 	view.PutL();	
 	
-	CleanupStack::PopAndDestroy( &view ); // Close view.		
+	CleanupStack::PopAndDestroy( &view );	
 
 	EAP_TRACE_DEBUG_SYMBIAN(
 		(_L("EapTlsPeapUtils::SetEapSettingsDataL: End \n")));	
 }
 
+// ---------------------------------------------------------
+
 /*
  * Alter table for added column, if doesn't exist
  * 
  */
 void EapTlsPeapUtils::AlterTableL(
-		RDbNamedDatabase& aDb,
-		TAlterTableCmd aCmd,
-		const TDesC& aTableName,
-		const TDesC& aColumnName,
-		const TDesC& aColumnDef )
-		{
-	
-		CDbColSet* colSet = aDb.ColSetL( aTableName );
-		User::LeaveIfNull( colSet );
-		CleanupStack::PushL( colSet );	
-			
-		EAP_TRACE_DEBUG_SYMBIAN( ( _L(
-	        "EapTlsPeapUtils::AlterTableL() \
-	        Number of columns in %S table is %d.\n" ),
-			&aTableName, colSet->Count() ) );
+	RDbNamedDatabase& aDb,
+	TAlterTableCmd aCmd,
+	const TDesC& aTableName,
+	const TDesC& aColumnName,
+	const TDesC& aColumnDef )
+{
+	EAP_TRACE_DEBUG_SYMBIAN(
+		(_L("EapTlsPeapUtils::AlterTableL(): -Start- aTableName=\"%S\", aColumnName=\"%S\", aColumnDef=\"%S\"\n"),
+		&aTableName,
+		&aColumnName,
+		&aColumnDef));
+
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: EapTlsPeapUtils::AlterTableL()\n"));
+
+	CDbColSet* colSet = aDb.ColSetL( aTableName );
+	User::LeaveIfNull( colSet );
+	CleanupStack::PushL( colSet );	
 		
-	    if ( aCmd == EAddColumn )
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::AlterTableL() Number of columns in \"%S\" table is %d.\n" ),
+		&aTableName,
+		colSet->Count()));
+	
+	if ( aCmd == EAddColumn )
+	    {
+	    // Check if there is a target column
+	    if( colSet->ColNo( aColumnName ) != KDbNullColNo )
 	    	{
-	    	// Check if there is a target column
-	    	if( colSet->ColNo( aColumnName ) != KDbNullColNo )
-	    		{
-	    		EAP_TRACE_DEBUG_SYMBIAN( ( _L(
-	   		        "EapTlsPeapUtils::AlterTableL() \
-	   		        Column %S exists already in table %S.\n" ),
-	    			&aColumnName, &aTableName ) );
-	    		CleanupStack::PopAndDestroy( colSet );
-	    		return;
-	    		}
+	    	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::AlterTableL() Column \"%S\" exists already in table \"%S\".\n" ),
+	    		&aColumnName,
+				&aTableName));
+	    	CleanupStack::PopAndDestroy( colSet );
+	    	return;
 	    	}
-	    else
+	    }
+	else
+	    {
+	    // Check if there is a target column
+	    if( colSet->ColNo( aColumnName ) == KDbNullColNo )
 	    	{
-	    	// Check if there is a target column
-	    	if( colSet->ColNo( aColumnName ) == KDbNullColNo )
-	    		{
-	    		EAP_TRACE_DEBUG_SYMBIAN( ( _L(
-	   		        "EapTlsPeapUtils::AlterTableL() \
-	   		        Column %S does not exists already in table %S.\n" ),
-	    			&aColumnName, &aTableName ) );
-	    		CleanupStack::PopAndDestroy( colSet );
-	    		return;
-	    		}
+	    	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::AlterTableL() Column \"%S\" does not exists already in table \"%S\".\n" ),
+	    		&aColumnName,
+				&aTableName));
+	    	CleanupStack::PopAndDestroy( colSet );
+	    	return;
 	    	}
-
-		HBufC* buf = HBufC::NewLC( KMaxSqlQueryLength );
-		TPtr sqlStatement = buf->Des();
-			
-		_LIT( KSqlAddCol, "ALTER TABLE %S ADD %S %S" );
-		_LIT( KSqlRemoveCol, "ALTER TABLE %S DROP %S" );
+	    }
+
+	HBufC* buf = HBufC::NewLC( KMaxSqlQueryLength );
+	TPtr sqlStatement = buf->Des();
 		
-		if ( aCmd == EAddColumn )
-			{
-			sqlStatement.Format( KSqlAddCol, &aTableName, 
-			    &aColumnName, &aColumnDef );
-			}
-		else
-			{
-			sqlStatement.Format( KSqlRemoveCol, &aTableName, 
-		        &aColumnName );
-			}
-			
-		EAP_TRACE_DEBUG_SYMBIAN( ( _L(
-			"EapTlsPeapUtils::AlterTableL(): sqlStatement=%S\n"),
-			&sqlStatement ) );
+	_LIT( KSqlAddCol, "ALTER TABLE %S ADD %S %S" );
+	_LIT( KSqlRemoveCol, "ALTER TABLE %S DROP %S" );
+	
+	if ( aCmd == EAddColumn )
+		{
+		sqlStatement.Format(KSqlAddCol,
+			&aTableName, 
+			&aColumnName,
+			&aColumnDef);
+		}
+	else
+		{
+		sqlStatement.Format(KSqlRemoveCol,
+			&aTableName, 
+		    &aColumnName);
+		}
 		
-		User::LeaveIfError( aDb.Execute( sqlStatement ) );		
-		CleanupStack::PopAndDestroy( buf );
-		CleanupStack::PopAndDestroy( colSet );
-
-		CDbColSet* alteredColSet = aDb.ColSetL( aTableName );
-		User::LeaveIfNull( alteredColSet );
-		EAP_TRACE_DEBUG_SYMBIAN( ( _L(
-	        "EapTlsPeapUtils::AlterTableL() \
-	        Number of columns in %S table after adding is %d.\n" ),
-			&aTableName, alteredColSet->Count() ) );
-		delete alteredColSet;
-			
-		} // EapTlsPeapUtils::AlterTableL()
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::AlterTableL(): sqlStatement=%S\n"),
+		&sqlStatement));
+	
+	User::LeaveIfError( aDb.Execute( sqlStatement ) );		
+	CleanupStack::PopAndDestroy( buf );
+	CleanupStack::PopAndDestroy( colSet );
+
+	CDbColSet* alteredColSet = aDb.ColSetL( aTableName );
+	User::LeaveIfNull( alteredColSet );
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("EapTlsPeapUtils::AlterTableL() Number of columns in %S table after adding is %d.\n" ),
+		&aTableName,
+		alteredColSet->Count()));
+
+	delete alteredColSet;
+		
+} // EapTlsPeapUtils::AlterTableL()
+
+// ---------------------------------------------------------
 
 // End of file
 
--- a/eapol/eapol_framework/eapol_symbian/am/wlaneapolif/data/2000b05a.rss	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/wlaneapolif/data/2000b05a.rss	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 6 %
+* %version: 3.1.2 %
 */
 
 #include <registryinfo.rh>
--- a/eapol/eapol_framework/eapol_symbian/am/wlaneapolif/inc/wlan_eapol_if_implementation.h	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/wlaneapolif/inc/wlan_eapol_if_implementation.h	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 6 %
+* %version: %
 */
 
 #ifndef _WLAN_EAPOL_INTERFACE_IMPLEMENTATION_H_
--- a/eapol/eapol_framework/eapol_symbian/am/wlaneapolif/src/wlan_eapol_if_implementation.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/am/wlaneapolif/src/wlan_eapol_if_implementation.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 5.1.3 %
+* %version: %
 */
 
 // INCLUDES
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_if/data/20026FC8.rss	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  ECom resources for the EapTools
+*
+*/
+
+/*
+* %version: 3 %
+*/
+
+#include <registryinfo.rh>
+#include "EapolUID.h"
+// ---------------------------------------------------------
+//   
+//    
+//    ECOM resource definitions for EapPlugin plugin
+//
+// ---------------------------------------------------------
+//
+RESOURCE REGISTRY_INFO theInfo
+	{
+	// UID for the DLL
+	dll_uid = EAP_TOOLS_DLL_UID;
+				
+	// Declare array of interface info
+	interfaces = 
+		{
+		INTERFACE_INFO
+			{
+			// UID of interface that is implemented
+			interface_uid = EAP_TOOLS_INTERFACE_UID;
+			implementations = 
+				{
+				// Info for EapTools
+				IMPLEMENTATION_INFO
+					{
+					implementation_uid = EAP_TOOLS_IMPLEMENTATION_UID;
+					version_no         = 1;
+					display_name       = "EapTools";
+					default_data       = "";
+					opaque_data        = "";
+					}
+				};
+			}
+		};
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_if/data/20026fcd.rss	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  ECom resources for the EapCoreInterfaceImplementation
+*
+*/
+
+/*
+* %version: 6 %
+*/
+
+#include <registryinfo.rh>
+#include "EapolUID.h"
+// ---------------------------------------------------------
+//   
+//    
+//    ECOM resource definitions for EapCoreInterfaceImplementation plugin
+//
+// ---------------------------------------------------------
+//
+RESOURCE REGISTRY_INFO theInfo
+	{
+	// UID for the DLL
+	dll_uid = EAP_CORE_INTERFACEIMPLEMENTATION_DLL_UID;
+				
+	// Declare array of interface info
+	interfaces = 
+		{
+		INTERFACE_INFO
+			{
+			// UID of interface that is implemented
+			interface_uid = EAP_CORE_INTERFACEIMPLEMENTATION_INTERFACE_UID;
+			implementations = 
+				{
+				// Info for EapCoreInterfaceImplementation
+				IMPLEMENTATION_INFO
+					{
+					implementation_uid = EAP_CORE_INTERFACEIMPLEMENTATION_IMPLEMENTATION_UID;
+					version_no         = 1;
+					display_name       = "EapCoreInterfaceImplementation";
+					default_data       = "";
+					opaque_data        = "";
+					}
+				};
+			}
+		};
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_if/data/20026fd1.rss	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  ECom resources for the EapGeneral
+*
+*/
+
+/*
+* %version: 6 %
+*/
+
+#include <registryinfo.rh>
+#include "EapolUID.h"
+// ---------------------------------------------------------
+//   
+//    
+//    ECOM resource definitions for EapGeneric plugin
+//
+// ---------------------------------------------------------
+//
+RESOURCE REGISTRY_INFO theInfo
+	{
+	// UID for the DLL
+	dll_uid = EAP_GENERIC_DLL_UID;
+				
+	// Declare array of interface info
+	interfaces = 
+		{
+		INTERFACE_INFO
+			{
+			// UID of interface that is implemented
+			interface_uid = EAP_GENERIC_INTERFACE_UID;
+			implementations = 
+				{
+				// Info for EapGeneric
+				IMPLEMENTATION_INFO
+					{
+					implementation_uid = EAP_GENERIC_IMPLEMENTATION_UID;
+					version_no         = 1;
+					display_name       = "EapGeneric";
+					default_data       = "";
+					opaque_data        = "";
+					}
+				};
+			}
+		};
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_if/data/20026fd6.rss	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  ECom resources for the EapGeneralSettings
+*
+*/
+
+/*
+* %version: 3 %
+*/
+
+#include <registryinfo.rh>
+#include "EapolUID.h"
+// ---------------------------------------------------------
+//   
+//    
+//    ECOM resource definitions for EapGeneralSettings plugin
+//
+// ---------------------------------------------------------
+//
+RESOURCE REGISTRY_INFO theInfo
+	{
+	// UID for the DLL
+	dll_uid = EAP_GENERAL_SETTINGS_DLL_UID;
+				
+	// Declare array of interface info
+	interfaces = 
+		{
+		INTERFACE_INFO
+			{
+			// UID of interface that is implemented
+			interface_uid = EAP_GENERAL_SETTINGS_INTERFACE_UID;
+			implementations = 
+				{
+				// Info for EapGeneralSettings
+				IMPLEMENTATION_INFO
+					{
+					implementation_uid = EAP_GENERAL_SETTINGS_IMPLEMENTATION_UID;
+					version_no         = 1;
+					display_name       = "EapGeneralSettings";
+					default_data       = "";
+					opaque_data        = "";
+					}
+				};
+			}
+		};
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_if/data/2002BC91.rss	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  ECom resources for the EapGeneralSettings
+*
+*/
+
+/*
+* %version: 4 %
+*/
+
+#include <registryinfo.rh>
+#include "EapolUID.h"
+// ---------------------------------------------------------
+//   
+//    
+//    ECOM resource definitions for EapFastPacStoreImpl plugin
+//
+// ---------------------------------------------------------
+//
+RESOURCE REGISTRY_INFO theInfo
+	{
+	// UID for the DLL
+	dll_uid = 0x2002BC91;
+				
+	// Declare array of interface info
+	interfaces = 
+		{
+		INTERFACE_INFO
+			{
+			// UID of interface that is implemented
+			interface_uid = 0x2002BC92;
+			implementations = 
+				{
+				// Info for EapFastPacStoreImpl
+				IMPLEMENTATION_INFO
+					{
+					implementation_uid = 0x2002BC93;
+					version_no         = 1;
+					display_name       = "EapFastPacStore";
+					default_data       = "";
+					opaque_data        = "";
+					}
+				};
+			}
+		};
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_if/include/EapClientIf.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,41 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 5 %
+*/
+
+#ifndef EAPCLIENTIF_H_
+#define EAPCLIENTIF_H_
+
+#include <e32base.h>
+#include "EapServerClientDef.h"
+
+class EapClientIf
+{
+public:
+
+    IMPORT_C EapClientIf();
+
+    IMPORT_C virtual ~EapClientIf();
+
+protected:
+    IMPORT_C static TInt GetServerNameAndExe(TBuf<KMaxServerExe> * const ServerName, TBuf<KMaxServerExe> * const ServerExe);
+};
+
+
+#endif /* EAPCLIENTIF_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_if/include/EapCoreInterface.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,93 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 9 %
+*/
+
+#ifndef EAPCOREINTERFACE_H_
+#define EAPCOREINTERFACE_H_
+
+
+#include "abs_eap_am_message_if.h"
+#include "eap_am_message_if.h"
+#include "EapSendInterface.h"
+#include "EapProcessInterface.h"
+#include "EapServerClientDef.h"
+
+class CEapCoreInterface : 
+    public CBase,
+    public MEapSendInterface,
+    public eap_am_message_if_c
+
+    {
+public:
+    /**
+     * Two-phased constructor.
+     */
+    CEapCoreInterface(const u32_t MTU);
+    
+    /**
+     * Destructor.
+     */
+    virtual ~CEapCoreInterface();
+
+public: // New functions
+    
+    /**
+     * From eap_am_message_if_c 
+     * Initialize interface to EAPOL or WAPI.
+     * @since S60 v9.2
+     */
+
+    EAP_FUNC_IMPORT bool get_is_valid();
+ 
+    /// Function receives the data message from lower layer.
+    /// Data is formatted to Attribute-Value Pairs.
+    /// Look at eap_tlv_header_c and eap_tlv_message_data_c.
+    EAP_FUNC_IMPORT eap_status_e process_data(const void * const data, const u32_t length);
+
+    // This is documented in abs_eap_stack_interface_c::configure().
+    EAP_FUNC_IMPORT eap_status_e configure(
+		const eap_variable_data_c * const client_configuration);
+
+    // This is documented in abs_eap_stack_interface_c::shutdown().
+    EAP_FUNC_IMPORT eap_status_e shutdown();
+
+    EAP_FUNC_IMPORT void set_partner(abs_eap_am_message_if_c * const client);
+    
+    /**
+  * from MEapSendInterface 
+     */
+    EAP_FUNC_IMPORT TInt SendData(
+        const void * const aData, 
+        const TInt aLength );
+
+    EAP_FUNC_IMPORT CEapProcessInterface* ConstrucL(abs_eap_am_tools_c * const tools );
+
+private:
+    
+    
+    abs_eap_am_message_if_c* iClient;
+    TBool iIsValid;
+    abs_eap_am_tools_c* iTools;
+    CEapCoreInterface* iEapCoreInterface;
+    CEapProcessInterface* iServer;
+    TUint32 iMTU;
+    };
+
+#endif /* EAPCOREINTERFACE_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_if/include/EapCoreInterfaceImplementation.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,153 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 11 %
+*/
+
+#ifndef EAP_CORE_INTERFACE_IMPLEMENTATION_H_
+#define EAP_CORE_INTERFACE_IMPLEMENTATION_H_
+
+// INCLUDES
+#include <e32std.h>
+#include "EapProcessInterface.h"
+#include "REapSession.h"
+#include "SendPacketHandler.h"
+#include "EapSendInterface.h"
+#include "abs_eap_am_tools.h"
+#include "EapClientIf.h"
+
+class MEapSendInterface;
+class EapMessageBuffer;
+
+
+/**
+ * Implementation for MWlanEapolInterface interface.
+ *
+ * @lib wlaneapolif.dll
+ * @since S60 v3.2
+ */
+class CEapCoreInterfaceImplementation
+: public CEapProcessInterface
+, public MSendPacketHandler
+, public EapClientIf
+{
+
+public:
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+	// Functions from CWlanEapolClient.
+
+	/**
+	 * Static constructor.
+	 * @param aPartner Pointer to callback instance.
+	 * @return Pointer to the constructed instance.
+	 */
+	static CEapProcessInterface* NewL(MEapSendInterface * aPartner);
+
+
+	/**
+	 * Destructor.
+	 */
+	virtual ~CEapCoreInterfaceImplementation();
+
+	/**
+	 * Configure plugin implementation.
+	 *
+	 * @since S60 v3.2
+	 * @param aHeaderOffset Offset of EAP-header in packet_send.
+	 * @param aMTU Maximum transfer unit (MTU).
+	 * @param aTrailerLength Length of trailer needed by lower levels..
+	 * @return Return value is specified in interface specification.
+	 */
+	TInt Configure(
+		const TInt aHeaderOffset,
+		const TInt aMTU,
+		const TInt aTrailerLength,
+		const void * const aConfigurationData,
+		const TInt aConfigurationDataLength);
+
+	TInt SetEnv(abs_eap_am_tools_c * const tools, const u32_t MTU);
+	 
+	/**
+	 * Shutdown plugin implementation.
+	 *
+	 * @since S60 v3.2
+	 * @return Return value is specified in interface specification.
+	 */        
+	TInt Shutdown();
+
+	/**
+	 * Send data to EAPOL.
+	 *
+	 * @since S60 v3.2
+	 * @param aData Pointer to the data to be sent.
+	 * @param aLength Length of the data to be sent.
+	 * @return Return value is specified in interface specification.
+	 */
+	TInt ProcessData(
+		const void * const aData, 
+		const TInt aLength );
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+	// Functions from MSendPacketHandler.
+
+	/// Function sends the data message to lower layer.
+	/// Data is formatted to Attribute-Value Pairs.
+	/// Look at eap_tlv_header_c and eap_tlv_message_data_c.
+	eap_status_e send_data(const TDesC8& message);
+
+
+private:
+
+    /**
+     * C++ default constructor.
+     */
+    CEapCoreInterfaceImplementation();
+
+    /**
+     * Symbian 2nd phase constructor.
+     */
+    void ConstructL(MEapSendInterface * aPartner);
+
+	/**
+	 * The get_is_valid() function returns the status of the CEapCoreInterfaceImplementation object.
+	 * @return True indicates the object is initialized.
+	 */
+	bool get_is_valid();
+	
+//	eap_status_e SendData(const void * const data, const u32_t length);
+	
+//	static TInt GetServerNameAndExe(TBuf<KMaxServerExe> * const ServerName, TBuf<KMaxServerExe> * const ServerExe);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	MEapSendInterface * m_partner;
+
+	REapSession iSession;
+
+	bool m_is_valid;
+	
+	TUint32 iMTU;
+	
+	abs_eap_am_tools_c * iTools;
+};
+
+
+#endif // EAP_CORE_INTERFACE_IMPLEMENTATION_H_
+
+// End of file.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_if/include/EapFastPacStoreImpl.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,133 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#include "EapFastPacStore.h"
+#include "abs_eap_pac_store_message.h"
+#include "eap_pac_store_message_base.h"
+#include "eap_pac_store_client_message_if.h"
+#include "eap_am_message_if.h"
+#include "EapClientIf.h"
+#include "eap_am_message_if_symbian.h"
+
+enum eap_fast_pac_store_impl_wait_state_e
+{
+	eap_fast_pac_store_impl_wait_state_none,
+	eap_fast_pac_store_impl_wait_state_complete_open_pac_store,
+	eap_fast_pac_store_impl_wait_state_complete_create_device_seed,
+	eap_fast_pac_store_impl_wait_state_complete_is_master_key_present,
+	eap_fast_pac_store_impl_wait_state_complete_is_master_key_and_password_matching,
+	eap_fast_pac_store_impl_wait_state_complete_create_and_save_master_key,
+	eap_fast_pac_store_impl_wait_state_complete_compare_pac_store_password,
+	eap_fast_pac_store_impl_wait_state_complete_is_pacstore_password_present,
+	eap_fast_pac_store_impl_wait_state_complete_set_pac_store_password,
+	eap_fast_pac_store_impl_wait_state_complete_destroy_pac_store,
+};
+
+class CEapFastPacStoreImpl
+: public CEapFastPacStore
+	,public abs_eap_pac_store_message_c
+{
+public:
+	
+	static CEapFastPacStore* NewL();
+	
+	CEapFastPacStoreImpl();
+	
+	virtual ~CEapFastPacStoreImpl();
+
+	void OpenPacStoreL();
+    
+  void CreateDeviceSeedL();
+
+  TBool IsMasterKeyPresentL();
+
+  TBool IsMasterKeyAndPasswordMatchingL(
+		const TDesC8 & aPassword8);
+
+  TInt CreateAndSaveMasterKeyL(
+		const TDesC8 & aPassword8);
+
+  TBool ComparePacStorePasswordL(
+		TDes8 & aPassword8);
+
+  TBool IsPacStorePasswordPresentL();
+
+  TInt SetPacStorePasswordL(
+		const TDesC8 & aPassword8);
+
+  TInt DestroyPacStore();
+  
+  eap_status_e complete_open_pac_store(
+		const eap_status_e completion_status);
+
+	eap_status_e complete_create_device_seed(
+		const eap_status_e completion_status);
+
+	eap_status_e complete_is_master_key_present(
+		bool is_present
+		,const eap_status_e completion_status);
+
+	eap_status_e complete_is_master_key_and_password_matching(
+	  bool is_matching
+		,const eap_status_e completion_status);
+
+	eap_status_e complete_create_and_save_master_key(
+		const eap_status_e completion_status);
+
+	eap_status_e complete_compare_pac_store_password(
+			bool is_matching);
+
+	eap_status_e complete_is_pacstore_password_present(
+			bool is_present);
+
+	eap_status_e complete_set_pac_store_password(
+		const eap_status_e completion_status);
+
+	eap_status_e complete_destroy_pac_store(
+		const eap_status_e completion_status);
+
+	void ConstructL();
+	
+protected:
+	
+
+private:
+	
+	void Activate();
+	
+	void Complete();
+
+	void WaitCompletion();
+
+	abs_eap_am_tools_c* iTools;
+	eap_pac_store_message_base_c * iPartner;
+	TBool iIsValid;
+	eap_fast_pac_store_impl_wait_state_e iWaitState;
+	eap_status_e iCompletionStatus;
+	TRequestStatus iAsyncronousStatus;
+	eap_variable_data_c* iPacStorePassword;
+	TBool iIsPresent;
+	TBool iIsMatching;
+	TBool iIsPwMatching;
+	TBool iIsPwPresent;
+	CActiveSchedulerWait iWait;
+
+};
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_if/include/EapGeneralSettingsImpl.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,166 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  This is implementation of CEapGeneralSettings interface.
+*
+*/
+
+/*
+* %version: 28 %
+*/
+
+#ifndef _EAP_GENERAL_SETTINGS_IMPL_H_
+#define _EAP_GENERAL_SETTINGS_IMPL_H_
+
+// INCLUDES
+#include <EapType.h>
+#include <EapGeneralSettings.h>
+#include "eap_header.h"
+#include "eap_array.h"
+#include "abs_eap_general_settings_message.h"
+#include "eap_configuration_field.h"
+#include "EapExpandedType.h"
+#include "EapClientIf.h"
+
+// FORWARD DECLARATIONS
+class eap_am_network_id_c;
+class eap_method_settings_c;
+class abs_eap_am_tools_c;
+class eap_general_settings_message_c;
+
+
+enum eap_general_settings_wait_state_e
+{
+	eap_general_settings_wait_state_none,
+	eap_general_settings_wait_state_complete_set_eap_methods,
+	eap_general_settings_wait_state_complete_get_eap_methods,
+	eap_general_settings_wait_state_complete_get_certificate_lists,
+	eap_general_settings_wait_state_complete_delete_all_eap_settings,
+	eap_general_settings_wait_state_complete_copy_all_eap_settings,
+};
+
+
+// CLASS DECLARATION
+/**
+* This is implementation of CEapGeneralSettings interface.
+*/
+class CEapGeneralSettingsImpl
+: public CEapGeneralSettings
+, public abs_eap_general_settings_message_c
+, public EapClientIf
+{
+public:		
+
+	/**
+	* Construction function. Called by ECom after the EAP generic plugin has been loaded.
+	* @param aIapInfo Pointer to the class that contains information about bearer type and unique index.
+	* @return Pointer to the instance.
+	*/
+	static CEapGeneralSettingsImpl* NewL(SIapInfo* aIapInfo);
+
+	/**
+	* Destructor does nothing.
+	*/
+	virtual ~CEapGeneralSettingsImpl();
+	
+	/**
+	* Returns the version of the interface that the EAP type implements.
+	* The client-side of the interface must always check the version with this function 
+	* and not call the functions that are not implemented. New functions must be
+	* added to the end of the interface so that the order of the old functions
+	* does not change.
+	* @return Integer indicating the version.
+	*/
+	TUint GetInterfaceVersion();
+
+	TInt SetEapMethods(
+		const RArray<TEapExpandedType> & aActiveEapMethods,
+		const RArray<TEapExpandedType> & aDisabledEapMethods);
+
+	TInt GetEapMethods(
+		RArray<TEapExpandedType> & aActiveEapMethods,
+		RArray<TEapExpandedType> & aDisabledEapMethods);
+
+	TInt GetCertificateLists(
+		RPointerArray<EapCertificateEntry> & aUserCerts,
+		RPointerArray<EapCertificateEntry> & aCACerts);
+
+	TInt DeleteAllEapSettings();
+
+	TInt CopyAllEapSettings(
+		const TIndexType aDestinationIndexType,
+		const TInt aDestinationIndex);
+
+	eap_status_e complete_get_eap_methods(
+		const eap_method_settings_c * const internal_settings);
+
+	eap_status_e complete_set_eap_methods(
+		const eap_status_e completion_status);
+
+	eap_status_e complete_get_certificate_lists(
+		const eap_method_settings_c * const internal_settings);
+
+	eap_status_e complete_delete_all_eap_settings(
+		const eap_status_e completion_status);
+
+	eap_status_e complete_copy_all_eap_settings(
+		const eap_status_e completion_status);
+
+protected:
+
+	/**
+	* Constructor initialises member variables.
+	*/
+	CEapGeneralSettingsImpl(const TIndexType aIndexType, const TInt aIndex);
+
+	void ConstructL();
+
+private:
+
+	void Activate();
+	
+	void Complete();
+
+	void WaitCompletion();
+
+	void SetCompletionStatusIfStillOk(const eap_status_e status);
+
+	/// This is pointer to the tools class.
+	abs_eap_am_tools_c * const m_am_tools;
+
+	eap_general_settings_message_c * const m_server;
+
+	CActiveSchedulerWait iWait;
+
+	// Bearer type
+	TIndexType iIndexType;
+
+	// Unique index in the bearer space.
+	TInt iIndex;
+
+	RArray<TEapExpandedType> * iActiveEapMethods;
+	RArray<TEapExpandedType> * iDisabledEapMethods;
+
+	RPointerArray<EapCertificateEntry> * iUserCerts;
+	RPointerArray<EapCertificateEntry> * iCACerts;
+
+	eap_general_settings_wait_state_e iWaitState;
+
+	eap_status_e iCompletionStatus;
+
+	TRequestStatus iAsyncronousStatus;
+};
+
+#endif // _EAP_GENERAL_SETTINGS_IMPL_H_
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_if/include/EapProcessInterface.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,110 @@
+/*
+* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Symbian Foundation License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Wrapper class for instantiating an implementation of
+*                MWlanEapolInterface via ECom framework.
+*
+*/
+
+/*
+* %version: 8 %
+*/
+
+#ifndef EAP_PROCESS_INTERFACE_H
+#define EAP_PROCESS_INTERFACE_H
+
+#include <ecom/ecom.h>
+#include "abs_eap_am_tools.h"
+#include "EapSendInterface.h"
+
+//const TInt KCWlanEapolClientUid = 0x2000B05C;
+//const TInt KCWlanWapiClientUid = 0x200195A1;
+
+/**
+ * @brief Class for instantiating an implementation of MWlanEapolInterface 
+ *
+ * @since S60 v3.2
+ */
+class CEapProcessInterface: public CBase
+    {
+
+public:
+
+    /**
+     * Static constructor.
+     * @param aUid UID of implementation to instantiate.
+     * @param aPartner Pointer to callback instance.
+     * @return Pointer to the constructed instance.
+     */
+    inline static CEapProcessInterface* NewL(
+        TInt aUid,
+        MEapSendInterface* aPartner);
+
+    /**
+     * Destructor.
+     */
+    inline virtual ~CEapProcessInterface();
+
+
+		virtual TInt SetEnv(abs_eap_am_tools_c * const tools, const u32_t MTU) = 0;
+
+    /**
+      * Configure plugin implementation.
+      *
+      * @since S60 v3.2
+      * @param aHeaderOffset Offset of EAP-header in packet_send.
+      * @param aMTU Maximum transfer unit (MTU).
+      * @param aTrailerLength Length of trailer needed by lower levels..
+      * @return Return value is specified in interface specification.
+      */
+	virtual TInt Configure(
+		const TInt aHeaderOffset,
+		const TInt aMTU,
+		const TInt aTrailerLength,
+		const void * const aConfigurationData,
+		const TInt aConfigurationDataLength
+		) = 0;
+
+     /**
+      * Shutdown plugin implementation.
+      *
+      * @since S60 v3.2
+      * @return Return value is specified in interface specification.
+      */        
+     virtual TInt Shutdown() = 0;
+
+     /**
+      * Send data to EAPOL.
+      *
+      * @since S60 v3.2
+      * @param aData Pointer to the data to be sent.
+      * @param aLength Length of the data to be sent.
+      * @return Return value is specified in interface specification.
+      */
+     virtual TInt ProcessData(
+         const void * const aData, 
+         const TInt aLength ) = 0;
+
+  private: // data
+
+     /**
+      * Identifies the instance of an implementation created by
+      * the ECOM framework.
+      */
+     TUid iInstanceIdentifier;
+
+    };
+
+#include "EapProcessInterface.inl"
+
+#endif // EAP_PROCESS_INTERFACE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_if/include/EapProcessInterface.inl	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,58 @@
+/*
+* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Symbian Foundation License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Inline functions of CWlanEapolClient class.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#include <ecom/ecom.h>
+#include "EapTraceSymbian.h"
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+
+inline CEapProcessInterface* CEapProcessInterface::NewL(
+    TInt aUid,
+    MEapSendInterface * aPartner)
+    {
+     
+    EAP_TRACE_DEBUG_SYMBIAN(
+        (_L("CEapProcessInterface::NewL")));  
+
+    const TUid KTMPUid = { aUid };
+
+    EAP_TRACE_DEBUG_SYMBIAN(
+        (_L("CEapProcessInterface::NewL KTMPUid created ")));  
+
+    TAny* aInterface = REComSession::CreateImplementationL(
+        KTMPUid,
+        _FOFF( CEapProcessInterface, iInstanceIdentifier ),
+        aPartner);
+
+    EAP_TRACE_DEBUG_SYMBIAN(
+        (_L("CEapProcessInterface::NewL CreateImplementationL done")));  
+
+    return reinterpret_cast<CEapProcessInterface*>( aInterface );
+    }
+
+// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
+//
+inline CEapProcessInterface::~CEapProcessInterface()
+    {
+    REComSession::DestroyedImplementation( iInstanceIdentifier );
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_if/include/EapSendInterface.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,56 @@
+/*
+* Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Symbian Foundation License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  ECom interface definition for WLAN EAPOL interface API.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#ifndef EAP_SEND_INTERFACE_H
+#define EAP_SEND_INTERFACE_H
+
+// INCLUDES
+#include <e32std.h>
+
+
+/**
+ * @brief ECom interface definition for WLAN EAPOL inteface API.
+ *
+ * This class defines the method used for sending data from EAPOL to WLAN Engine.
+ *
+ * @since S60 v3.2
+ */
+class MEapSendInterface
+    {
+
+public:
+
+    /**
+     * Callback interface to partner.
+     *
+     * @since S60 v3.2
+     * @param aData Pointer to the data to be sent.
+     * @param aLength Length of the data to be sent.
+     * @return Return value is specified in interface specification.
+     */
+    virtual TInt SendData(
+        const void * const aData, 
+        const TInt aLength ) = 0;
+
+    };
+
+
+#endif // EAP_SEND_INTERFACE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_if/include/REapSession.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,200 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 21 %
+*/
+
+
+#ifndef EAPSESSION_H_
+#define EAPSESSION_H_
+
+#include <e32base.h>
+#include <e32std.h>
+#include <ecom.h>
+#include "EapServerClientDef.h"
+#include "EapServer.h"
+#include "EapScheduler.h"
+#include "eap_am_tools.h"
+#include "eap_am_types.h"
+#include "SendPacketHandler.h"
+#include "EapMessageQueue.h"
+
+//----------------------------------------------------------------
+
+class MEapolPacketHandler
+    {
+public:
+    virtual void EapolHandleL(const TDesC8& aData) = 0;
+    };
+
+//----------------------------------------------------------------
+
+class CSendHandler;
+class CEapCoreInterfaceImplementation;
+class CEapClientProcessHandler;
+
+//----------------------------------------------------------------
+
+class CEapolPacketHandler : public CBase, public MEapolPacketHandler
+    {
+    void EapolHandleL(const TDesC8& aData);
+private:
+    CEapCoreInterfaceImplementation* iClient;
+    };
+
+//----------------------------------------------------------------
+
+class EAP_EXPORT REapSession :  public RSessionBase
+    {
+public:
+
+    // construct
+    inline REapSession()
+		: iSendHandler(0)
+		, iProcessHandler(0)
+		, iStatus(KErrNone)
+		, iTools(0)
+		, iClient(0)
+		, iEapMessageQueue(0)
+	{
+	};
+
+	EAP_FUNC_IMPORT virtual ~REapSession();
+
+
+	EAP_FUNC_IMPORT void ConnectL(
+		abs_eap_am_tools_c * const tools,
+		MSendPacketHandler * Client,
+		const TBuf<KMaxServerExe> ServerName,
+		const TBuf<KMaxServerExe> ServerExe,
+		const void * const aConfigurationData,
+		const TInt aConfigurationDataLength,
+		const TEapRequests aIfRequest);
+
+    EAP_FUNC_IMPORT void Close();
+
+    EAP_FUNC_IMPORT bool get_is_valid();
+ 
+    /// Function receives the data message from lower layer.
+    /// Data is formatted to Attribute-Value Pairs.
+    /// Look at eap_tlv_header_c and eap_tlv_message_data_c.
+    EAP_FUNC_IMPORT eap_status_e process_data(const TEapRequests aMessageType, const void * const data, const u32_t length);
+
+	const EapMessageBuffer * GetFirstMessage();
+
+	TInt DeleteFirstMessage();
+
+	void Process(const EapMessageBuffer * const buffer, TRequestStatus &aStatus) const;
+
+private:
+    /**
+    * Version information.
+    * @return Version information.
+    */
+    TVersion Version() const;
+
+    friend class CSendHandler;
+
+    void Receive(TDes8& aBuffer, TRequestStatus& aStatus);
+
+    void CancelReceive();
+
+    CSendHandler* iSendHandler;
+
+	CEapClientProcessHandler* iProcessHandler;
+
+    TRequestStatus iStatus;
+
+    abs_eap_am_tools_c * iTools;
+
+    MSendPacketHandler* iClient;
+
+    RProcess iServer;
+
+	EapMessageQueue* iEapMessageQueue;
+    };
+
+//----------------------------------------------------------------
+
+class CSendHandler : public CActive
+    {
+
+public:
+    // construct/destruct
+    CSendHandler(
+		abs_eap_am_tools_c * const tools,
+		REapSession& aSession); //MEapolPacketHandler& aHandler, 
+
+    virtual ~CSendHandler();
+
+    // operation
+    void Receive();
+
+private:
+    // from CActive
+    void RunL();
+    void DoCancel();
+	TInt RunError(TInt aError);
+
+
+private:
+
+    abs_eap_am_tools_c * iTools;
+
+    REapSession& iSession;
+
+    TBuf8<KMaxEapData> iBuffer;
+   
+    };
+
+//----------------------------------------------------------------
+
+class CEapClientProcessHandler
+: public CActive
+    {
+
+public:
+
+    CEapClientProcessHandler(
+		abs_eap_am_tools_c * const tools,
+		REapSession& aSession);
+
+    virtual ~CEapClientProcessHandler();
+
+	void Activate();
+
+private:
+
+    // from CActive
+    void RunL();
+    void DoCancel();
+	TInt RunError(TInt aError);
+
+
+private:
+
+    abs_eap_am_tools_c * iTools;
+
+    REapSession& iSession;
+
+	bool iProcessPending;
+    };
+
+//----------------------------------------------------------------
+
+#endif /* EAPSESSION_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_if/include/SendPacketHandler.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,37 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 5 %
+*/
+
+#ifndef SENDPACKETHANDLER_H_
+#define SENDPACKETHANDLER_H_
+
+class EapMessageBuffer;
+
+class EAP_EXPORT MSendPacketHandler
+    {
+public:
+
+    virtual eap_status_e send_data(const TDesC8& message) = 0;
+
+    };
+
+
+#endif /* SENDPACKETHANDLER_H_ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_if/include/eap_am_message_if_symbian.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,110 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Message interface on client side.
+*
+*/
+
+/*
+* %version: 9 %
+*/
+
+#ifndef _EAP_AM_MESSAGE_IF_SYMBIAN_H_
+#define _EAP_AM_MESSAGE_IF_SYMBIAN_H_
+
+// INCLUDES
+#include <e32std.h>
+#include "REapSession.h"
+#include "SendPacketHandler.h"
+#include "EapSendInterface.h"
+#include "abs_eap_am_tools.h"
+#include "abs_eap_am_message_if.h"
+#include "eap_am_message_if.h"
+#include "EapClientIf.h"
+
+class EapMessageBuffer;
+
+/**
+ * Message interface on client side.
+ */
+class EAP_EXPORT eap_am_message_if_symbian_c
+: public eap_am_message_if_c
+, public MSendPacketHandler
+, public EapClientIf
+{
+
+public:
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+	// Functions from CWlanEapolClient.
+
+    /**
+     * C++ default constructor.
+     */
+    EAP_FUNC_IMPORT eap_am_message_if_symbian_c(
+		abs_eap_am_tools_c * const tools,
+		const TEapRequests if_request);
+
+	/**
+	 * Destructor.
+	 */
+    EAP_FUNC_IMPORT virtual ~eap_am_message_if_symbian_c();
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+	// Functions from eap_am_message_if_c.
+
+    EAP_FUNC_IMPORT bool get_is_valid();
+
+    EAP_FUNC_IMPORT void set_partner(abs_eap_am_message_if_c * const client);
+
+	/// Function receives the data message from lower layer.
+	/// Data is formatted to Attribute-Value Pairs.
+	/// Look at eap_tlv_header_c and eap_tlv_message_data_c.
+    EAP_FUNC_IMPORT eap_status_e process_data(const void * const data, const u32_t length);
+
+	// This is documented in abs_eap_stack_interface_c::configure().
+    EAP_FUNC_IMPORT eap_status_e configure(
+		const eap_variable_data_c * const client_configuration);
+
+	// This is documented in abs_eap_stack_interface_c::shutdown().
+    EAP_FUNC_IMPORT eap_status_e shutdown();
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+	// Functions from MSendPacketHandler.
+
+	/// Function sends the data message to lower layer.
+	/// Data is formatted to Attribute-Value Pairs.
+	/// Look at eap_tlv_header_c and eap_tlv_message_data_c.
+    EAP_FUNC_IMPORT eap_status_e send_data(const TDesC8& message);
+
+
+private:
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	abs_eap_am_tools_c * const m_am_tools;
+
+	abs_eap_am_message_if_c * m_partner;
+
+	const TEapRequests m_if_request;
+
+	REapSession iSession;
+
+	bool m_is_valid;
+	
+};
+
+
+#endif // _EAP_AM_MESSAGE_IF_SYMBIAN_H_
+
+// End of file.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_if/src/EapClientIf.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,44 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Class stores the EAP-server name.
+*
+*/
+
+/*
+* %version: 6 %
+*/
+
+#include "EapClientIf.h"
+
+
+EXPORT_C EapClientIf::EapClientIf()
+{
+}
+
+EXPORT_C EapClientIf::~EapClientIf()
+{
+}
+
+    
+EXPORT_C TInt EapClientIf::GetServerNameAndExe(TBuf<KMaxServerExe> * const ServerName, TBuf<KMaxServerExe> * const ServerExe)
+{
+	_LIT( KEapServerName,"EapAuthServer" );
+	_LIT( KEapServerExe, "EapAuthServerExe.exe");
+
+	ServerName->Copy(KEapServerName);
+	ServerExe->Copy(KEapServerExe);
+	return KErrNone;
+}
+
+// end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_if/src/EapCoreInterface.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,204 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 19 %
+*/
+
+#include "EapCoreInterface.h"
+#include "eap_am_tools.h"
+#include "EapolUID.h"
+#include <EapPluginTools.h>
+
+CEapCoreInterface::CEapCoreInterface(const u32_t MTU):
+  iClient(NULL)
+  ,iIsValid(FALSE)
+  ,iTools(0)
+  ,iEapCoreInterface(0)
+  ,iServer(0)
+  ,iMTU(MTU)
+     {
+     }
+
+CEapCoreInterface::~CEapCoreInterface()
+    {
+    delete iEapCoreInterface;
+    }
+
+EAP_FUNC_EXPORT CEapProcessInterface* CEapCoreInterface::ConstrucL(abs_eap_am_tools_c * const tools)
+    {
+    iTools = tools;
+
+    //TInt implementationUid( EAP_CORE_INTERFACEIMPLEMENTATION_IMPLEMENTATION_UID );
+
+	const TUid KimplementationInterfaceUid = { EAP_CORE_INTERFACEIMPLEMENTATION_INTERFACE_UID };
+		
+    RImplInfoPtrArray aImplInfoArray;
+
+	CleanupStack::PushL( TCleanupItem( EapPluginTools::CleanupImplArray, &aImplInfoArray ) );
+
+    REComSession::ListImplementationsL(KimplementationInterfaceUid,
+            aImplInfoArray);
+
+	   	EAP_TRACE_DEBUG(
+	      tools, 
+	      TRACE_FLAGS_DEFAULT, 
+	      (EAPL("CEapCoreInterface::ConstrucL Implementation %d\n"),aImplInfoArray[0]->ImplementationUid().iUid));
+
+    iServer = CEapProcessInterface::NewL(
+            aImplInfoArray[0]->ImplementationUid().iUid,
+            this);
+
+    EAP_TRACE_DEBUG(
+      tools, 
+      TRACE_FLAGS_DEFAULT, 
+      (EAPL("CEapCoreInterface::ConstrucL CEapProcessInterface::NewL done\n")));
+
+    iIsValid = TRUE;
+
+	CleanupStack::PopAndDestroy(&aImplInfoArray);
+
+    return iServer;
+    
+    }
+
+EAP_FUNC_EXPORT eap_am_message_if_c * new_eap_am_client_message_if_c(
+        abs_eap_am_tools_c * const tools,
+        const bool is_client_when_true,
+        const u32_t MTU)
+    {   
+     CEapCoreInterface * aEapCoreInterface = 0;
+     CEapProcessInterface* aServer =0;
+     
+	   	EAP_TRACE_DEBUG(
+	      tools, 
+	      TRACE_FLAGS_DEFAULT, 
+	      (EAPL("new_eap_am_client_message_if_c()\n")));
+	      
+     aEapCoreInterface = new CEapCoreInterface(MTU);
+     if (aEapCoreInterface != 0)
+         {
+		 TRAPD( err, aServer = aEapCoreInterface->ConstrucL(tools));
+         if (err)
+             {    
+             	EAP_TRACE_DEBUG(
+				        tools, 
+				        TRACE_FLAGS_DEFAULT, 
+				        (EAPL("new_eap_am_client_message_if_c() NO SERVER IF, err = %d\n"),err));
+
+               return 0;
+             }
+         else if(aServer == NULL)
+            {
+             	EAP_TRACE_DEBUG(
+				        tools, 
+				        TRACE_FLAGS_DEFAULT, 
+				        (EAPL("new_eap_am_client_message_if_c() SERVER IF == 0\n")));
+          	}   
+         else
+  	       {
+	    	   aServer->SetEnv(tools, MTU);
+  	       }
+          
+         }
+       else
+       		{
+          EAP_TRACE_DEBUG(
+				        tools, 
+				        TRACE_FLAGS_DEFAULT, 
+				        (EAPL("new_eap_am_client_message_if_c() new(ELeave) CEapCoreInterface(MTU) failed\n")));
+       	 	return 0;
+					}
+     return aEapCoreInterface;
+
+    }
+
+EAP_FUNC_EXPORT bool CEapCoreInterface::get_is_valid()
+    {
+    EAP_TRACE_DEBUG(
+             iTools, 
+             TRACE_FLAGS_DEFAULT, 
+             (EAPL("CEapCoreInterface::get_is_valid() = %d\n"),iIsValid ));
+      return iIsValid;
+    }
+
+EAP_FUNC_EXPORT eap_status_e CEapCoreInterface::process_data(const void * const data, const u32_t length)
+    {
+    EAP_TRACE_DEBUG(
+            iTools, 
+            TRACE_FLAGS_DEFAULT, 
+            (EAPL("CEapCoreInterface::process_data()\n")));
+
+    TInt err = iServer->ProcessData(data, length);
+
+    return EAP_STATUS_RETURN(iTools, iTools->convert_am_error_to_eapol_error(err));
+    }
+
+
+EAP_FUNC_EXPORT eap_status_e CEapCoreInterface::configure(
+	const eap_variable_data_c * const client_configuration)
+    {
+    EAP_TRACE_DEBUG(
+            iTools, 
+            TRACE_FLAGS_DEFAULT, 
+            (EAPL("CEapCoreInterface::configure()\n")));
+
+    TInt err = iServer->Configure(0,0,0, client_configuration->get_data(), client_configuration->get_data_length());
+
+    return EAP_STATUS_RETURN(iTools, iTools->convert_am_error_to_eapol_error(err));
+    }
+
+// This is documented in abs_eap_stack_interface_c::shutdown().
+EAP_FUNC_EXPORT eap_status_e CEapCoreInterface::shutdown()
+    {
+    EAP_TRACE_DEBUG(
+            iTools, 
+            TRACE_FLAGS_DEFAULT, 
+            (EAPL("CEapCoreInterface::shutdown()\n")));
+
+    TInt err = iServer->Shutdown();
+
+    return EAP_STATUS_RETURN(iTools, iTools->convert_am_error_to_eapol_error(err));
+    }
+
+EAP_FUNC_EXPORT void CEapCoreInterface::set_partner(abs_eap_am_message_if_c * const client)
+    {
+    EAP_TRACE_DEBUG(
+            iTools, 
+            TRACE_FLAGS_DEFAULT, 
+            (EAPL("CEapCoreInterface::set_partner()\n")));
+    iClient = client;
+    }
+
+EAP_FUNC_EXPORT TInt CEapCoreInterface::SendData(
+    const void * const aData, 
+    const TInt aLength )
+    {
+    EAP_TRACE_DEBUG(
+            iTools, 
+            TRACE_FLAGS_DEFAULT, 
+            (EAPL("CEapCoreInterface::SendData()\n")));
+    if (iClient != NULL)
+        {
+        return iClient->send_data( aData, aLength);
+        }
+    else
+        {
+        return KErrNone;
+        }
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_if/src/EapCoreInterfaceImplementation.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,268 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 21 %
+*/
+
+// INCLUDES
+#include <e32std.h>
+#include <implementationproxy.h>
+#include "EapCoreInterfaceImplementation.h"
+#include "EapolUID.h"
+#include "EapTraceSymbian.h"
+//-----------------------------------------------------------------------------------------
+
+/**
+ * Pairs ECom implementation UIDs with a pointer to the instantiation 
+ * method for that implementation. Required for all ECom implementation
+ * collections.
+ */
+const TImplementationProxy ImplementationTable[] =
+{
+    {{ EAP_CORE_INTERFACEIMPLEMENTATION_IMPLEMENTATION_UID }, reinterpret_cast<TProxyNewLPtr>(CEapCoreInterfaceImplementation::NewL)}
+};
+
+//-----------------------------------------------------------------------------------------
+
+/**
+ * Static constructor.
+ * @param aPartner Pointer to callback instance.
+ * @return Pointer to the constructed instance.
+ */
+CEapProcessInterface* CEapCoreInterfaceImplementation::NewL(MEapSendInterface * aPartner)
+    {
+    EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapCoreInterfaceImplementation::NewL")));  
+
+    CEapCoreInterfaceImplementation* self = new (ELeave) CEapCoreInterfaceImplementation();
+	
+	CleanupStack::PushL(self);
+
+	self->ConstructL(aPartner);
+
+	if (self->get_is_valid() != true)
+	{
+		User::Leave(KErrGeneral);
+	}
+
+	CleanupStack::Pop(self);
+
+    EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapCoreInterfaceImplementation::NewL end")));  
+	return self;
+    }
+
+//-----------------------------------------------------------------------------------------
+
+/**
+ * C++ default constructor.
+*/ 
+CEapCoreInterfaceImplementation::CEapCoreInterfaceImplementation()
+	{
+    EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapCoreInterfaceImplementation::CEapCoreInterfaceImplementation")));  
+	m_partner = 0;
+	m_is_valid = false;
+	iMTU = 0;
+	iTools = 0;
+	}
+
+//-----------------------------------------------------------------------------------------
+
+/**
+ * Destructor.
+ */
+CEapCoreInterfaceImplementation::~CEapCoreInterfaceImplementation()
+    {
+    EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapCoreInterfaceImplementation::~CEapCoreInterfaceImplementation")));  
+	m_partner = 0;
+	iTools = 0;
+	iMTU = 0;
+//	iSession.Close();
+    }
+
+//-----------------------------------------------------------------------------------------
+TInt CEapCoreInterfaceImplementation::SetEnv(abs_eap_am_tools_c * const tools, const u32_t MTU)
+    {
+    EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapCoreInterfaceImplementation::SetEnv")));  
+	iTools = tools;
+	iMTU = MTU;
+	return KErrNone;
+    }
+
+/**
+ * Configure plugin implementation.
+ *
+ * @since S60 v3.2
+ * @param aHeaderOffset Offset of EAP-header in packet_send.
+ * @param aMTU Maximum transfer unit (MTU).
+ * @param aTrailerLength Length of trailer needed by lower levels..
+ * @return Return value is specified in interface specification.
+ */
+TInt CEapCoreInterfaceImplementation::Configure(
+	const TInt aHeaderOffset,
+	const TInt aMTU,
+	const TInt aTrailerLength,
+	const void * const aConfigurationData,
+	const TInt aConfigurationDataLength)
+	{
+	EAP_TRACE_DEBUG_SYMBIAN(
+	(_L("CEapCoreInterfaceImplementation::Configure")));  
+
+	TBuf<KMaxServerExe> ServerName;
+	TBuf<KMaxServerExe> ServerExe;
+
+	GetServerNameAndExe(&ServerName, &ServerExe);
+
+	TRAPD(err, iSession.ConnectL(iTools, this, ServerName, ServerExe, aConfigurationData, aConfigurationDataLength, EEapCoreIfNew));
+
+	if(err)
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CEapCoreInterfaceImplementation::Configure - iSession.ConnectL err=%d\n"), err ));
+		return err;
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapCoreInterfaceImplementation::Configure end")));
+
+	return err;
+	}
+
+//-----------------------------------------------------------------------------------------
+
+/**
+ * Shutdown plugin implementation.
+ *
+ * @since S60 v3.2
+ * @return Return value is specified in interface specification.
+ */        
+TInt CEapCoreInterfaceImplementation::Shutdown()
+    {
+    EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapCoreInterfaceImplementation::Shutdown")));  
+    iSession.Close();
+
+	return 0;
+    }
+
+//-----------------------------------------------------------------------------------------
+
+/**
+ * Send data to EAPOL.
+ *
+ * @since S60 v3.2
+ * @param aData Pointer to the data to be sent.
+ * @param aLength Length of the data to be sent.
+ * @return Return value is specified in interface specification.
+ */
+TInt CEapCoreInterfaceImplementation::ProcessData(
+        const void * const aData, 
+        const TInt aLength )
+    {
+    EAP_TRACE_DEBUG(
+            iTools,
+        TRACE_FLAGS_DEFAULT,
+        (EAPL("CEapCoreInterfaceImplementation::ProcessData()\n")));
+
+	EAP_TRACE_DATA_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapCoreInterfaceImplementation::ProcessData()"),
+		aData,
+		aLength));
+
+    return iSession.process_data(EEapCoreProcessData, aData, aLength);
+    }
+
+//-----------------------------------------------------------------------------------------
+
+/**
+ * Symbian 2nd phase constructor.
+ */
+void CEapCoreInterfaceImplementation::ConstructL(MEapSendInterface * aPartner)
+    {
+	m_partner = aPartner;
+	m_is_valid = true;
+    EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapCoreInterfaceImplementation::ConstructL")));  
+	
+//    RWapiSession session;
+//    __UHEAP_MARK;
+//    CTestPacketHandler* tph = new (ELeave) CTestPacketHandler;
+//    CleanupStack::PushL( tph );
+
+//    CleanupStack::Pop( tph );
+    
+//    delete tph;
+
+    }
+
+//-----------------------------------------------------------------------------------------
+
+bool CEapCoreInterfaceImplementation::get_is_valid()
+    {
+    EAP_TRACE_DEBUG_SYMBIAN(
+      (_L("CEapCoreInterfaceImplementation::get_is_valid = %d"),m_is_valid ));  
+    
+	return m_is_valid;
+    }
+
+//-----------------------------------------------------------------------------------------
+
+/// Function sends the data message to lower layer.
+/// Data is formatted to Attribute-Value Pairs.
+/// Look at eap_tlv_header_c and eap_tlv_message_data_c.
+eap_status_e CEapCoreInterfaceImplementation::send_data(const TDesC8& message)
+    {
+    EAP_TRACE_DEBUG(
+            iTools,
+        TRACE_FLAGS_DEFAULT,
+    (EAPL("CEapCoreInterfaceImplementation::send_data \n")));
+
+	return EAP_STATUS_RETURN(iTools, iTools->convert_am_error_to_eapol_error(
+		m_partner->SendData(
+            message.Ptr(), 
+            message.Length())));
+    }
+
+//-----------------------------------------------------------------------------------------
+
+// ======== GLOBAL FUNCTIONS ========
+
+// ---------------------------------------------------------
+// Returns an instance of the proxy table.
+// Returns: KErrNone
+// ---------------------------------------------------------
+//
+EAP_FUNC_EXPORT const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
+    {
+    EAP_TRACE_DEBUG_SYMBIAN(
+            (_L("TImplementationProxy* ImplementationGroupProxy")));  
+
+    aTableCount = sizeof( ImplementationTable) / sizeof( TImplementationProxy );
+    return ImplementationTable;
+    }
+
+//-----------------------------------------------------------------------------------------
+
+// End of file.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_if/src/EapFastPacStoreImpl.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,875 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 21 %
+*/
+
+#include <e32base.h>
+#include <ecom/implementationproxy.h>
+#include "EapolUID.h"
+#include "EapTraceSymbian.h"
+#include "EapFastPacStoreImpl.h"
+#include "eap_automatic_variable.h"
+
+// ----------------------------------------------------------
+
+const TImplementationProxy ImplementationTable[] = 
+{
+	{{0x2002BC93}, reinterpret_cast<TProxyNewLPtr> (CEapFastPacStoreImpl::NewL)}
+};
+
+// ----------------------------------------------------------
+
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
+{
+	aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
+
+	return ImplementationTable;
+}
+
+// ----------------------------------------------------------
+
+CEapFastPacStore* CEapFastPacStoreImpl::NewL()
+{
+    EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::NewL")));  
+
+    CEapFastPacStoreImpl* self = new (ELeave) CEapFastPacStoreImpl();
+		
+		self->ConstructL();
+
+    EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::NewL end")));  
+	return self;
+ 	
+}
+
+// ----------------------------------------------------------
+
+CEapFastPacStoreImpl::CEapFastPacStoreImpl():
+   	iTools(abs_eap_am_tools_c::new_abs_eap_am_tools_c())
+	  ,iPartner(eap_pac_store_message_base_c::new_eap_pac_store_client_message_if_c(
+			iTools,
+			this))
+    ,iIsValid (EFalse)
+   	,iWaitState(eap_fast_pac_store_impl_wait_state_none)
+    ,iPacStorePassword (new eap_variable_data_c(iTools))
+    ,iIsPresent(EFalse)
+		,iIsMatching(EFalse)
+	{
+    EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::CEapFastPacStoreImpl")));
+		
+		
+    EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::CEapFastPacStoreImpl end")));  
+	}
+	
+// ----------------------------------------------------------
+
+void CEapFastPacStoreImpl::ConstructL()
+	{
+    EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::ConstructL")));
+
+	eap_status_e status = iPartner->configure();
+	if (status != eap_status_ok)
+		{
+			TInt aError = iTools->convert_eapol_error_to_am_error(status);
+			
+		abs_eap_am_tools_c::delete_abs_eap_am_tools_c(iTools);
+		delete iPartner;
+		iPartner = NULL;
+		User::Leave(aError);
+		}
+			
+    EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::ConstructL end")));  
+		
+	}
+	
+// ----------------------------------------------------------
+
+CEapFastPacStoreImpl::~CEapFastPacStoreImpl()
+	{
+    EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::~CEapFastPacStoreImpl")));
+ 
+     if ( iPacStorePassword != NULL )
+        {
+        delete iPacStorePassword;
+        }
+
+		if (iPartner != 0)
+			{
+			iPartner->shutdown();
+			}
+		delete iPartner;
+
+    EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::~CEapFastPacStoreImpl end")));  
+		
+		abs_eap_am_tools_c::delete_abs_eap_am_tools_c(iTools);
+		iTools = NULL;
+	}
+	
+
+// ----------------------------------------------------------
+
+void CEapFastPacStoreImpl::Activate()
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapFastPacStoreImpl::Activate(): iAsyncronousStatus=%u\n"),
+			iAsyncronousStatus.Int()));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapFastPacStoreImpl::Activate()");
+
+	iAsyncronousStatus = KRequestPending;
+}
+
+//----------------------------------------------------------------
+
+void CEapFastPacStoreImpl::Complete()
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapFastPacStoreImpl::Complete(): iAsyncronousStatus=%u\n"),
+		iAsyncronousStatus.Int()));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapFastPacStoreImpl::Complete()");
+
+	iAsyncronousStatus = KErrNone;
+
+	// This is needed to continue the execution after Wait.Start(); 
+	iWait.AsyncStop();
+}
+
+//----------------------------------------------------------------
+
+void CEapFastPacStoreImpl::WaitCompletion()
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapFastPacStoreImpl::WaitCompletion(): iAsyncronousStatus=%u\n"),
+		iAsyncronousStatus.Int()));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapFastPacStoreImpl::WaitCompletion()");
+
+	while (iAsyncronousStatus == KRequestPending)
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CEapFastPacStoreImpl::WaitCompletion(): calls iWait.Start()\n")));
+
+		iWait.Start();
+
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CEapFastPacStoreImpl::WaitCompletion(): iWait.Start() returns, iAsyncronousStatus=%u\n"),
+			iAsyncronousStatus.Int()));
+	}
+}
+
+// ----------------------------------------------------------
+
+void CEapFastPacStoreImpl::OpenPacStoreL()
+	{
+  EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::OpenPacStoreL")));  
+
+		eap_status_e status = iPartner->open_pac_store(
+		iCompletionStatus);
+		
+	if (status != eap_status_ok)
+	{
+		User::Leave(iTools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(iTools, status)));
+	}
+
+	iWaitState = eap_fast_pac_store_impl_wait_state_complete_open_pac_store;
+    Activate();
+    WaitCompletion();
+
+	if (iCompletionStatus != eap_status_ok)
+	{
+		User::Leave(iTools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(iTools, iCompletionStatus)));
+	}
+
+  EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::OpenPacStoreL end")));  
+
+}
+    
+// ----------------------------------------------------------
+
+void CEapFastPacStoreImpl::CreateDeviceSeedL()
+{
+    EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::CreateDeviceSeedL")));  
+
+	eap_status_e status = iPartner->create_device_seed(
+		iCompletionStatus);
+
+	if (status != eap_status_ok)
+	{
+		User::Leave(iTools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(iTools, status)));
+	}
+
+	iWaitState = eap_fast_pac_store_impl_wait_state_complete_create_device_seed;
+    Activate();
+    WaitCompletion();
+
+	if (iCompletionStatus != eap_status_ok)
+	{
+		User::Leave(iTools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(iTools, iCompletionStatus)));
+	}
+
+    EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::CreateDeviceSeedL end")));  
+
+}
+
+// ----------------------------------------------------------
+
+TBool CEapFastPacStoreImpl::IsMasterKeyPresentL()
+{
+    EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::IsMasterKeyPresentL")));  
+
+	eap_status_e status = iPartner->is_master_key_present(
+		iCompletionStatus);
+
+	if (status != eap_status_ok)
+	{
+		User::Leave(iTools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(iTools, status)));
+	}
+
+	iWaitState = eap_fast_pac_store_impl_wait_state_complete_is_master_key_present;
+    Activate();
+    WaitCompletion();
+
+	if (iCompletionStatus != eap_status_ok)
+	{
+		User::Leave(iTools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(iTools, iCompletionStatus)));
+	}
+
+  EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::IsMasterKeyPresentL end")));  
+
+	return iIsPresent;
+
+}
+
+// ----------------------------------------------------------
+
+TBool CEapFastPacStoreImpl::IsMasterKeyAndPasswordMatchingL(
+		const TDesC8 & aPassword8)
+{
+    EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::IsMasterKeyAndPasswordMatchingL")));  
+
+	iPacStorePassword->set_copy_of_buffer(aPassword8.Ptr(), aPassword8.Size());
+
+	eap_status_e status = iPartner->is_master_key_and_password_matching(
+		iPacStorePassword
+		,iCompletionStatus);
+
+	if (status != eap_status_ok)
+	{
+		User::Leave(iTools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(iTools, status)));
+	}
+
+	iWaitState = eap_fast_pac_store_impl_wait_state_complete_is_master_key_and_password_matching;
+    Activate();
+    WaitCompletion();
+
+	if (iCompletionStatus != eap_status_ok)
+	{
+		User::Leave(iTools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(iTools, iCompletionStatus)));
+	}
+
+  EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::IsMasterKeyAndPasswordMatchingL end")));  
+
+	return iIsMatching;
+
+}
+
+// ----------------------------------------------------------
+
+TInt CEapFastPacStoreImpl::CreateAndSaveMasterKeyL(
+		const TDesC8 & aPassword8)
+{
+    EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::CreateAndSaveMasterKeyL")));  
+
+	
+	iPacStorePassword->set_copy_of_buffer(aPassword8.Ptr(), aPassword8.Size());
+
+	eap_status_e status = iPartner->create_and_save_master_key(
+		iPacStorePassword
+		,iCompletionStatus);
+
+	if (status != eap_status_ok)
+	{
+		User::Leave(iTools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(iTools, status)));
+	}
+
+	iWaitState = eap_fast_pac_store_impl_wait_state_complete_create_and_save_master_key;
+    Activate();
+    WaitCompletion();
+
+	if (iCompletionStatus != eap_status_ok)
+	{
+		User::Leave(iTools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(iTools, iCompletionStatus)));
+	}
+
+  EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::CreateAndSaveMasterKeyL end")));  
+
+  return iCompletionStatus;
+
+}
+
+// ----------------------------------------------------------
+
+TBool CEapFastPacStoreImpl::ComparePacStorePasswordL(
+		TDes8 & aPassword8)
+{
+    EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::ComparePacStorePasswordL")));  
+
+	iPacStorePassword->set_copy_of_buffer(aPassword8.Ptr(), aPassword8.Size());
+
+	eap_status_e status = iPartner->compare_pac_store_password(
+		iPacStorePassword);
+		
+	if (status != eap_status_ok)
+	{
+		User::Leave(iTools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(iTools, status)));
+	}
+
+	iWaitState = eap_fast_pac_store_impl_wait_state_complete_compare_pac_store_password;
+    Activate();
+    WaitCompletion();
+
+	if (iCompletionStatus != eap_status_ok)
+	{
+		User::Leave(iTools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(iTools, iCompletionStatus)));
+	}
+
+  EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::ComparePacStorePasswordL end")));  
+     
+  return iIsPwMatching;
+
+}
+
+ TBool CEapFastPacStoreImpl::IsPacStorePasswordPresentL()
+ 	{
+     EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::IsPacStorePasswordPresentL")));  
+
+	eap_status_e status = iPartner->is_pacstore_password_present();
+
+	if (status != eap_status_ok)
+	{
+		User::Leave(iTools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(iTools, status)));
+	}
+
+	iWaitState = eap_fast_pac_store_impl_wait_state_complete_is_pacstore_password_present;
+    Activate();
+    WaitCompletion();
+
+	if (iCompletionStatus != eap_status_ok)
+	{
+		User::Leave(iTools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(iTools, iCompletionStatus)));
+	}
+
+  EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::IsPacStorePasswordPresentL end")));  
+
+	return iIsPwPresent;
+		
+ 	}
+
+// ----------------------------------------------------------
+
+TInt CEapFastPacStoreImpl::SetPacStorePasswordL(
+		const TDesC8 & aPassword8)
+{
+    EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::SetPacStorePasswordL")));  
+
+	iPacStorePassword->set_copy_of_buffer(aPassword8.Ptr(), aPassword8.Size());
+	
+	eap_status_e status = iPartner->set_pac_store_password(
+		iPacStorePassword
+		,iCompletionStatus);
+
+	if (status != eap_status_ok)
+	{
+		User::Leave(iTools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(iTools, status)));
+	}
+
+	iWaitState = eap_fast_pac_store_impl_wait_state_complete_set_pac_store_password;
+    Activate();
+    WaitCompletion();
+
+	if (iCompletionStatus != eap_status_ok)
+	{
+		User::Leave(iTools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(iTools, iCompletionStatus)));
+	}
+
+  EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::SetPacStorePasswordL end")));  
+
+	return iCompletionStatus;
+
+
+}
+
+// ----------------------------------------------------------
+
+TInt CEapFastPacStoreImpl::DestroyPacStore()
+{
+    EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::DestroyPacStore")));  
+
+	eap_status_e status = iPartner->destroy_pac_store(
+		iCompletionStatus);
+
+	if (status != eap_status_ok)
+	{
+		return iTools->convert_eapol_error_to_am_error(status);
+	}
+
+	iWaitState = eap_fast_pac_store_impl_wait_state_complete_destroy_pac_store;
+    Activate();
+    WaitCompletion();
+
+  EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::DestroyPacStore end")));  
+
+	return iCompletionStatus;
+
+
+}
+
+// ----------------------------------------------------------
+
+eap_status_e CEapFastPacStoreImpl::complete_open_pac_store(
+		const eap_status_e completion_status)
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapFastPacStoreImpl::complete_open_pac_store(): this=0x%08x, iWaitState=%d\n"),
+		this,
+		iWaitState));
+
+	iCompletionStatus = completion_status;
+
+	if (iWaitState != eap_fast_pac_store_impl_wait_state_complete_open_pac_store
+		&& iCompletionStatus == eap_status_ok)
+	{
+		// ERROR wrong state.
+		iCompletionStatus = eap_status_wrong_eap_type_state;
+	}
+
+	Complete();
+
+    EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::complete_open_pac_store end")));  
+
+	return iCompletionStatus;
+
+}
+
+// ----------------------------------------------------------
+
+eap_status_e CEapFastPacStoreImpl::complete_create_device_seed(
+		const eap_status_e completion_status)
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapFastPacStoreImpl::complete_create_device_seed(): this=0x%08x, iWaitState=%d\n"),
+		this,
+		iWaitState));
+
+	iCompletionStatus = completion_status;
+
+	if (iWaitState != eap_fast_pac_store_impl_wait_state_complete_create_device_seed
+		&& iCompletionStatus == eap_status_ok)
+	{
+		// ERROR wrong state.
+		iCompletionStatus = eap_status_wrong_eap_type_state;
+	}
+
+	Complete();
+
+  EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::complete_create_device_seed end")));  
+
+	return iCompletionStatus;
+
+}
+
+// ----------------------------------------------------------
+
+eap_status_e CEapFastPacStoreImpl::complete_is_master_key_present(
+		bool is_present
+		,const eap_status_e completion_status)
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapFastPacStoreImpl::complete_is_master_key_present(): this=0x%08x, iWaitState=%d\n"),
+		this,
+		iWaitState));
+
+	iIsPresent = is_present;
+	iCompletionStatus = completion_status;
+
+	if (iWaitState != eap_fast_pac_store_impl_wait_state_complete_is_master_key_present
+		&& iCompletionStatus == eap_status_ok)
+	{
+		// ERROR wrong state.
+		iCompletionStatus = eap_status_wrong_eap_type_state;
+	}
+	
+	iIsPresent = is_present;
+	Complete();
+
+    EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::complete_is_master_key_present end")));  
+
+	return iCompletionStatus;
+
+}
+
+// ----------------------------------------------------------
+
+eap_status_e CEapFastPacStoreImpl::complete_is_master_key_and_password_matching(
+		bool is_matching
+		,const eap_status_e completion_status)
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapFastPacStoreImpl::complete_is_master_key_and_password_matching(): this=0x%08x, iWaitState=%d\n"),
+		this,
+		iWaitState));
+
+	iCompletionStatus = completion_status;
+
+	iIsMatching = is_matching;
+	if (iWaitState != eap_fast_pac_store_impl_wait_state_complete_is_master_key_and_password_matching
+		&& iCompletionStatus == eap_status_ok)
+	{
+		// ERROR wrong state.
+		iCompletionStatus = eap_status_wrong_eap_type_state;
+	}
+	iIsMatching = is_matching;
+	
+	Complete();
+
+  EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::complete_is_master_key_and_password_matching end")));  
+
+	return iCompletionStatus;
+
+}
+
+// ----------------------------------------------------------
+
+eap_status_e CEapFastPacStoreImpl::complete_create_and_save_master_key(
+		const eap_status_e completion_status)
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapFastPacStoreImpl::complete_create_and_save_master_key(): this=0x%08x, iWaitState=%d\n"),
+		this,
+		iWaitState));
+
+	iCompletionStatus = completion_status;
+
+	if (iWaitState != eap_fast_pac_store_impl_wait_state_complete_create_and_save_master_key
+		&& iCompletionStatus == eap_status_ok)
+	{
+		// ERROR wrong state.
+		iCompletionStatus = eap_status_wrong_eap_type_state;
+	}
+
+	Complete();
+
+  EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::complete_create_and_save_master_key end")));  
+
+	return iCompletionStatus;
+
+}
+
+// ----------------------------------------------------------
+
+eap_status_e CEapFastPacStoreImpl::complete_compare_pac_store_password(
+		bool is_matching)
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapFastPacStoreImpl::complete_compare_pac_store_password(): this=0x%08x, iWaitState=%d\n"),
+		this,
+		iWaitState));
+
+	iCompletionStatus = eap_status_ok;
+
+	if (iWaitState != eap_fast_pac_store_impl_wait_state_complete_compare_pac_store_password)
+	{
+		// ERROR wrong state.
+		iCompletionStatus = eap_status_wrong_eap_type_state;
+	}
+
+	iIsPwMatching = is_matching;
+	Complete();
+
+  EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::complete_compare_pac_store_password end")));  
+
+	return iCompletionStatus;
+
+}
+
+// ----------------------------------------------------------
+
+eap_status_e CEapFastPacStoreImpl::complete_is_pacstore_password_present(
+		bool is_present)
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapFastPacStoreImpl::complete_is_pacstore_password_present(): this=0x%08x, iWaitState=%d\n"),
+		this,
+		iWaitState));
+
+	iCompletionStatus = eap_status_ok;
+
+	if (iWaitState != eap_fast_pac_store_impl_wait_state_complete_is_pacstore_password_present)
+	{
+		// ERROR wrong state.
+		iCompletionStatus = eap_status_wrong_eap_type_state;
+	}
+
+	iIsPwPresent = is_present;
+	Complete();
+
+  EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::complete_is_pacstore_password_present end")));  
+
+	return iCompletionStatus;
+
+}
+// ----------------------------------------------------------
+
+eap_status_e CEapFastPacStoreImpl::complete_set_pac_store_password(
+		const eap_status_e completion_status)
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapFastPacStoreImpl::complete_set_pac_store_password(): this=0x%08x, iWaitState=%d\n"),
+		this,
+		iWaitState));
+
+	iCompletionStatus = completion_status;
+
+	if (iWaitState != eap_fast_pac_store_impl_wait_state_complete_set_pac_store_password
+		&& iCompletionStatus == eap_status_ok)
+	{
+		// ERROR wrong state.
+		iCompletionStatus = eap_status_wrong_eap_type_state;
+	}
+
+	Complete();
+
+  EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::complete_set_pac_store_password end")));  
+
+	return iCompletionStatus;
+
+}
+
+// ----------------------------------------------------------
+
+eap_status_e CEapFastPacStoreImpl::complete_destroy_pac_store(
+		const eap_status_e completion_status)
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapFastPacStoreImpl::complete_destroy_pac_store(): this=0x%08x, iWaitState=%d\n"),
+		this,
+		iWaitState));
+
+	iCompletionStatus = completion_status;
+
+	if (iWaitState != eap_fast_pac_store_impl_wait_state_complete_destroy_pac_store
+		&& iCompletionStatus == eap_status_ok)
+	{
+		// ERROR wrong state.
+		iCompletionStatus = eap_status_wrong_eap_type_state;
+	}
+
+	Complete();
+
+  EAP_TRACE_DEBUG_SYMBIAN(
+     (_L("CEapFastPacStoreImpl::complete_destroy_pac_store end")));  
+
+	return iCompletionStatus;
+
+}
+
+// ----------------------------------------------------------
+
+eap_am_message_if_c * eap_am_message_if_c::new_eap_am_message_if_c(
+	abs_eap_am_tools_c * const tools)
+{
+	EAP_TRACE_DEBUG(
+		tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_message_if_c::new_eap_am_server_pac_store_message_c()\n")));
+
+    eap_am_message_if_c *client_if = new eap_am_message_if_symbian_c(tools, EEapPacStoreNew);
+
+	eap_automatic_variable_c<eap_am_message_if_c> automatic_client_if(
+		tools,
+		client_if);
+
+	if (client_if == 0
+		|| client_if->get_is_valid() == false)
+	{
+		// ERROR.
+		if (client_if != 0)
+		{
+			EAP_TRACE_DEBUG(
+				tools,
+				TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+				(EAPL("ERROR: calls: eap_am_message_if_c::new_eap_am_server_general_settings_c(): client_if->shutdown()\n")));
+
+			client_if->shutdown();
+		}
+		return 0;
+	}
+
+	automatic_client_if.do_not_free_variable();
+
+	return client_if;
+
+}
+
+// ----------------------------------------------------------
+
+EAP_FUNC_EXPORT eap_pac_store_message_base_c * eap_pac_store_message_base_c::new_eap_pac_store_client_message_if_c(
+	abs_eap_am_tools_c * const tools,
+	abs_eap_pac_store_message_c * const partner)
+{
+	EAP_TRACE_DEBUG(
+		tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_pac_store_message_base_c::new_eap_pac_store_client_message_if_c()\n")));
+
+	eap_am_message_if_c *client_if = eap_am_message_if_c::new_eap_am_message_if_c(
+		tools);
+
+	eap_automatic_variable_c<eap_am_message_if_c> automatic_client_if(
+		tools,
+		client_if);
+
+	if (client_if == 0
+		|| client_if->get_is_valid() == false)
+	{
+		// ERROR.
+		if (client_if != 0)
+		{
+			EAP_TRACE_DEBUG(
+				tools,
+				TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+				(EAPL("ERROR: calls: eap_pac_store_message_base_c::new_eap_pac_store_client_message_if_c(): client_if->shutdown()\n")));
+
+			(void) client_if->shutdown();
+		}
+		return 0;
+	}
+
+	eap_pac_store_client_message_if_c * new_session_core = new eap_pac_store_client_message_if_c(tools, client_if, partner);
+
+	eap_automatic_variable_c<eap_pac_store_client_message_if_c> automatic_new_session_core(
+		tools,
+		new_session_core);
+
+	if (new_session_core == 0
+		|| new_session_core->get_is_valid() == false)
+	{
+		// ERROR.
+		if (new_session_core != 0)
+		{
+			EAP_TRACE_DEBUG(
+				tools,
+				TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+				(EAPL("ERROR: calls: eap_pac_store_message_base_c::new_eap_pac_store_client_message_if_c(): new_session_core->shutdown()\n")));
+
+			new_session_core->shutdown();
+		}
+		return 0;
+	}
+
+	client_if->set_partner(new_session_core);
+
+	automatic_client_if.do_not_free_variable();
+	automatic_new_session_core.do_not_free_variable();
+
+	return new_session_core;
+}
+
+
+// ----------------------------------------------------------
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_if/src/EapGeneralSettingsImpl.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,850 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  This is implementation of CEapGeneralSettings interface.
+*
+*/
+
+/*
+* %version: 48 %
+*/
+
+// This is enumeration of EAPOL source code.
+#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
+	#undef EAP_FILE_NUMBER_ENUM
+	#define EAP_FILE_NUMBER_ENUM 605 
+	#undef EAP_FILE_NUMBER_DATE 
+	#define EAP_FILE_NUMBER_DATE 1127594498 
+#endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
+
+
+// INCLUDE FILES
+
+#include "EapGeneralSettingsImpl.h"
+#include "EapConversion.h"
+#include "eap_am_assert.h"
+#include <EapTypeInfo.h>
+#include "abs_eap_am_tools.h"
+#include "eap_automatic_variable.h"
+#include <utf.h>                           // for CnvUtfConverter
+#include "abs_eap_am_message_if.h"
+#include "eap_am_message_if.h"
+#include "eap_automatic_variable.h"
+#include "eap_general_settings_message.h"
+#include "eap_am_message_if_symbian.h"
+#include "eap_process_tlv_message_data.h"
+#include "eap_general_settings_client_message_if.h"
+
+// LOCAL CONSTANTS
+
+// The version number of this interface.
+const TUint KInterfaceVersion = 1;
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+CEapGeneralSettingsImpl::CEapGeneralSettingsImpl(
+	const TIndexType aIndexType,	
+	const TInt aIndex)
+: m_am_tools(abs_eap_am_tools_c::new_abs_eap_am_tools_c())
+, m_server(new_eap_general_settings_client_message_if_c(
+		m_am_tools,
+		this))
+, iIndexType(aIndexType)
+, iIndex(aIndex)
+, iActiveEapMethods(0)
+, iDisabledEapMethods(0)
+, iUserCerts(0)
+, iCACerts(0)
+, iWaitState(eap_general_settings_wait_state_none)
+, iCompletionStatus(eap_status_process_general_error)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneralSettingsImpl::CEapGeneralSettingsImpl(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneralSettingsImpl::CEapGeneralSettingsImpl()");
+
+}
+
+// ----------------------------------------------------------
+
+void CEapGeneralSettingsImpl::ConstructL()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneralSettingsImpl::ConstructL(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneralSettingsImpl::ConstructL()");
+
+	if (m_am_tools == 0
+		|| m_am_tools->get_is_valid() == false
+		|| m_server == 0
+		|| m_server->get_is_valid() == false)
+	{
+		abs_eap_am_tools_c::delete_abs_eap_am_tools_c(m_am_tools);
+		delete m_server;
+
+		User::Leave(KErrNoMemory);
+	}
+
+	eap_status_e status = m_server->configure();
+	if (status != eap_status_ok)
+	{
+		TInt aStatus = m_am_tools->convert_eapol_error_to_am_error(status);
+			
+		abs_eap_am_tools_c::delete_abs_eap_am_tools_c(m_am_tools);
+		delete m_server;
+
+		User::Leave(aStatus);
+	}
+}
+
+// ----------------------------------------------------------
+
+CEapGeneralSettingsImpl* CEapGeneralSettingsImpl::NewL(SIapInfo* aIapInfo)
+{
+	CEapGeneralSettingsImpl* self = new(ELeave) CEapGeneralSettingsImpl(aIapInfo->indexType, aIapInfo->index);
+
+	CleanupStack::PushL(self);
+
+	self->ConstructL();
+
+	CleanupStack::Pop();
+
+	return self;
+}
+
+// ----------------------------------------------------------
+
+CEapGeneralSettingsImpl::~CEapGeneralSettingsImpl()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneralSettingsImpl::~CEapGeneralSettingsImpl(): this=0x%08x.\n"),
+		this));
+
+	if (m_server != 0)
+	{
+		m_server->shutdown();
+	}
+	delete m_server;
+
+	abs_eap_am_tools_c::delete_abs_eap_am_tools_c(m_am_tools);
+}
+
+// ----------------------------------------------------------
+
+TUint CEapGeneralSettingsImpl::GetInterfaceVersion()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneralSettingsImpl::GetInterfaceVersion(): this=0x%08x\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneralSettingsImpl::GetInterfaceVersion()");
+
+	return KInterfaceVersion;
+}
+
+//----------------------------------------------------------------
+
+void CEapGeneralSettingsImpl::Activate()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneralSettingsImpl::Activate(): iAsyncronousStatus=%u\n"),
+		iAsyncronousStatus.Int()));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneralSettingsImpl::Activate()");
+
+	iAsyncronousStatus = KRequestPending;
+
+}
+
+//----------------------------------------------------------------
+
+void CEapGeneralSettingsImpl::Complete()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneralSettingsImpl::Complete(): iAsyncronousStatus=%u\n"),
+		iAsyncronousStatus.Int()));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneralSettingsImpl::Complete()");
+
+	iAsyncronousStatus = KErrNone;
+
+	// This is needed to continue the execution after Wait.Start(); 
+	iWait.AsyncStop();
+}
+
+//----------------------------------------------------------------
+
+void CEapGeneralSettingsImpl::WaitCompletion()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneralSettingsImpl::WaitCompletion(): iAsyncronousStatus=%u\n"),
+		iAsyncronousStatus.Int()));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneralSettingsImpl::WaitCompletion()");
+
+	while (iAsyncronousStatus == KRequestPending)
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CEapGeneralSettingsImpl::WaitCompletion(): calls iWait.Start()\n")));
+
+		iWait.Start();
+
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CEapGeneralSettingsImpl::WaitCompletion(): iWait.Start() returns, iAsyncronousStatus=%u\n"),
+			iAsyncronousStatus.Int()));
+	}
+}
+
+// ----------------------------------------------------------
+
+void CEapGeneralSettingsImpl::SetCompletionStatusIfStillOk(const eap_status_e status)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneralSettingsImpl::SetCompletionStatusIfStillOk(): iCompletionStatus=%d=%s, status=%d=%s\n"),
+		iCompletionStatus,
+		eap_status_string_c::get_status_string(iCompletionStatus),
+		status,
+		eap_status_string_c::get_status_string(status)));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneralSettingsImpl::SetCompletionStatusIfStillOk()");
+
+	if (iCompletionStatus == eap_status_ok)
+	{
+		iCompletionStatus = status;
+	}
+}
+
+// ----------------------------------------------------------
+
+TInt CEapGeneralSettingsImpl::GetEapMethods(
+	RArray<TEapExpandedType> & ActiveEapMethods,
+	RArray<TEapExpandedType> & DisabledEapMethods)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneralSettingsImpl::GetEapMethods(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneralSettingsImpl::GetEapMethods()");
+
+	eap_method_settings_c * const internal_settings = new eap_method_settings_c(m_am_tools);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_internal_settings(
+		m_am_tools,
+		internal_settings);
+
+	if (internal_settings == 0)
+	{
+		return m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error));
+	}
+
+	internal_settings->m_IndexType = iIndexType;
+	internal_settings->m_Index = iIndex;
+
+	iActiveEapMethods = &ActiveEapMethods;
+	iDisabledEapMethods = &DisabledEapMethods;
+
+	eap_status_e status = m_server->get_eap_methods(internal_settings);
+
+	iWaitState = eap_general_settings_wait_state_complete_get_eap_methods;
+	Activate();
+    WaitCompletion();
+
+	if (iCompletionStatus != eap_status_ok)
+	{
+		return m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, iCompletionStatus));
+	}
+
+	return m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, status));
+}
+
+// ----------------------------------------------------------
+
+TInt CEapGeneralSettingsImpl::SetEapMethods(
+	const RArray<TEapExpandedType> & ActiveEapMethods,
+	const RArray<TEapExpandedType> & DisabledEapMethods)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneralSettingsImpl::SetEapMethods(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneralSettingsImpl::SetEapMethods()");
+
+	eap_method_settings_c * const internal_settings = new eap_method_settings_c(m_am_tools);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_internal_settings(
+		m_am_tools,
+		internal_settings);
+
+	if (internal_settings == 0)
+	{
+		return m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error));
+	}
+
+	internal_settings->m_IndexType = iIndexType;
+	internal_settings->m_Index = iIndex;
+
+
+	TInt error = CEapConversion::ConvertExpandedEAPTypesToInternalTypes(
+		m_am_tools,
+		&ActiveEapMethods,
+		&(internal_settings->m_active_eap_methods));
+	if (error != KErrNone)
+	{
+		return error;
+	}
+
+
+	error = CEapConversion::ConvertExpandedEAPTypesToInternalTypes(
+		m_am_tools,
+		&DisabledEapMethods,
+		&(internal_settings->m_disabled_eap_methods));
+	if (error != KErrNone)
+	{
+		return error;
+	}
+
+	internal_settings->m_SelectedEAPTypesPresent = true;
+
+	eap_status_e status = m_server->set_eap_methods(internal_settings);
+
+	iWaitState = eap_general_settings_wait_state_complete_set_eap_methods;
+	Activate();
+    WaitCompletion();
+
+	if (iCompletionStatus != eap_status_ok)
+	{
+		return m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, iCompletionStatus));
+	}
+
+	return m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, status));
+}
+
+// ----------------------------------------------------------
+
+eap_status_e CEapGeneralSettingsImpl::complete_get_eap_methods(
+	const eap_method_settings_c * const internal_settings)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneralSettingsImpl::complete_get_eap_methods(): this=0x%08x, iWaitState=%d, status=%d=%s\n"),
+		this,
+		iWaitState,
+		internal_settings->m_completion_status,
+		eap_status_string_c::get_status_string(internal_settings->m_completion_status)));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneralSettingsImpl::complete_get_eap_methods()");
+
+	if (internal_settings == 0)
+	{
+		iCompletionStatus = eap_status_illegal_parameter;
+
+		Complete();
+
+		return EAP_STATUS_RETURN(m_am_tools, iCompletionStatus);
+	}
+
+	iCompletionStatus = internal_settings->m_completion_status;
+
+	if (iWaitState == eap_general_settings_wait_state_complete_get_eap_methods
+		&& iCompletionStatus == eap_status_ok)
+	{
+		if (iActiveEapMethods != 0
+			&& iDisabledEapMethods != 0
+			&& internal_settings != 0)
+		{
+			TInt error(KErrNone);
+
+			error = CEapConversion::ConvertInternalTypesToExpandedEAPTypes(
+				m_am_tools,
+				&(internal_settings->m_active_eap_methods),
+				iActiveEapMethods);
+			if (error != KErrNone)
+			{
+				SetCompletionStatusIfStillOk(EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(error)));
+			}
+			else
+			{
+				error = CEapConversion::ConvertInternalTypesToExpandedEAPTypes(
+					m_am_tools,
+					&(internal_settings->m_disabled_eap_methods),
+					iDisabledEapMethods);
+				if (error != KErrNone)
+				{
+					SetCompletionStatusIfStillOk(EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(error)));
+				}
+			}
+		}
+		else
+		{
+			SetCompletionStatusIfStillOk(EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter));
+		}
+	}
+	else if (iCompletionStatus == eap_status_ok)
+	{
+		// ERROR, wrong state. Other function was completed successfully not the function that was waited.
+		SetCompletionStatusIfStillOk(EAP_STATUS_RETURN(m_am_tools, eap_status_wrong_eap_type_state));
+	}
+
+	Complete();
+
+	return EAP_STATUS_RETURN(m_am_tools, iCompletionStatus);
+}
+
+// ----------------------------------------------------------
+
+eap_status_e CEapGeneralSettingsImpl::complete_set_eap_methods(
+	const eap_status_e completion_status)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneralSettingsImpl::complete_set_eap_methods(): this=0x%08x, iWaitState=%d, status=%d=%s\n"),
+		this,
+		iWaitState,
+		completion_status,
+		eap_status_string_c::get_status_string(completion_status)));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneralSettingsImpl::complete_set_eap_methods()");
+
+	iCompletionStatus = completion_status;
+
+	if (iWaitState != eap_general_settings_wait_state_complete_set_eap_methods
+		&& iCompletionStatus == eap_status_ok)
+	{
+		// ERROR, wrong state. Other function was completed successfully not the function that was waited.
+		SetCompletionStatusIfStillOk(EAP_STATUS_RETURN(m_am_tools, eap_status_wrong_eap_type_state));
+	}
+
+	Complete();
+
+	return EAP_STATUS_RETURN(m_am_tools, completion_status);
+}
+
+// ----------------------------------------------------------
+
+TInt CEapGeneralSettingsImpl::GetCertificateLists(
+	RPointerArray<EapCertificateEntry> & aUserCerts,
+	RPointerArray<EapCertificateEntry> & aCACerts)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneralSettingsImpl::GetCertificateLists(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneralSettingsImpl::GetCertificateLists()");
+
+	eap_method_settings_c * const internal_settings = new eap_method_settings_c(m_am_tools);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_internal_settings(
+		m_am_tools,
+		internal_settings);
+
+	if (internal_settings == 0)
+	{
+		return m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error));
+	}
+
+	internal_settings->m_IndexType = iIndexType;
+	internal_settings->m_Index = iIndex;
+
+	iUserCerts = &aUserCerts;
+	iCACerts = &aCACerts;
+
+	eap_status_e status = m_server->get_certificate_lists(internal_settings);
+
+	iWaitState = eap_general_settings_wait_state_complete_get_certificate_lists;
+	Activate();
+	WaitCompletion();
+
+	if (iCompletionStatus != eap_status_ok)
+	{
+		return m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, iCompletionStatus));
+	}
+
+	return m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, status));
+}
+
+// ----------------------------------------------------------
+
+eap_status_e CEapGeneralSettingsImpl::complete_get_certificate_lists(
+	const eap_method_settings_c * const internal_settings)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneralSettingsImpl::complete_get_certificate_lists(): this=0x%08x, iWaitState=%d, status=%d=%s\n"),
+		this,
+		iWaitState,
+		internal_settings->m_completion_status,
+		eap_status_string_c::get_status_string(internal_settings->m_completion_status)));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneralSettingsImpl::complete_get_certificate_lists()");
+
+	if (internal_settings == 0)
+	{
+		// ERROR
+		iCompletionStatus = eap_status_illegal_parameter;
+
+		Complete();
+
+		return EAP_STATUS_RETURN(m_am_tools, iCompletionStatus);
+	}
+
+	iCompletionStatus = internal_settings->m_completion_status;
+
+	if (iWaitState == eap_general_settings_wait_state_complete_get_certificate_lists
+		&& iCompletionStatus == eap_status_ok)
+	{
+		if (iUserCerts != 0
+			&& iCACerts != 0
+			&& internal_settings != 0)
+		{
+			TInt error = CEapConversion::ConvertInternalTypeToCertificates(
+				m_am_tools,
+				eap_certificate_entry_c::eap_certificate_type_user,
+				&(internal_settings->m_Certificates),
+				iUserCerts);
+			if (error != KErrNone)
+			{
+				// ERROR
+				SetCompletionStatusIfStillOk(EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(error)));
+			}
+			else
+			{
+				error = CEapConversion::ConvertInternalTypeToCertificates(
+					m_am_tools,
+					eap_certificate_entry_c::eap_certificate_type_CA,
+					&(internal_settings->m_Certificates),
+					iCACerts);
+				if (error != KErrNone)
+				{
+					// ERROR
+					SetCompletionStatusIfStillOk(EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(error)));
+				}
+			}
+		}
+		else
+		{
+			// ERROR
+			SetCompletionStatusIfStillOk(EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter));
+		}
+	}
+	else if (iCompletionStatus == eap_status_ok)
+	{
+		// ERROR, wrong state. Other function was completed successfully not the function that was waited.
+		SetCompletionStatusIfStillOk(EAP_STATUS_RETURN(m_am_tools, eap_status_wrong_eap_type_state));
+	}
+
+	Complete();
+
+	return EAP_STATUS_RETURN(m_am_tools, iCompletionStatus);
+}
+
+// ----------------------------------------------------------
+
+TInt CEapGeneralSettingsImpl::DeleteAllEapSettings()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneralSettingsImpl::DeleteAllEapSettings(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneralSettingsImpl::DeleteAllEapSettings()");
+
+	eap_method_settings_c * const internal_settings = new eap_method_settings_c(m_am_tools);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_internal_settings(
+		m_am_tools,
+		internal_settings);
+
+	if (internal_settings == 0)
+	{
+		return m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error));
+	}
+
+	internal_settings->m_IndexType = iIndexType;
+	internal_settings->m_Index = iIndex;
+
+	eap_status_e status = m_server->delete_all_eap_settings(internal_settings);
+
+	iWaitState = eap_general_settings_wait_state_complete_delete_all_eap_settings;
+	Activate();
+	WaitCompletion();
+
+	if (iCompletionStatus != eap_status_ok)
+	{
+		return m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, iCompletionStatus));
+	}
+
+	return m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, status));
+}
+
+// ----------------------------------------------------------
+
+TInt CEapGeneralSettingsImpl::CopyAllEapSettings(
+	const TIndexType aDestinationIndexType,
+	const TInt aDestinationIndex)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneralSettingsImpl::CopyAllEapSettings(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneralSettingsImpl::CopyAllEapSettings()");
+
+	eap_method_settings_c * const internal_settings = new eap_method_settings_c(m_am_tools);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_internal_settings(
+		m_am_tools,
+		internal_settings);
+
+	if (internal_settings == 0)
+	{
+		return m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error));
+	}
+
+	internal_settings->m_IndexType = iIndexType;
+	internal_settings->m_Index = iIndex;
+	internal_settings->m_DestinationIndexType = aDestinationIndexType;
+	internal_settings->m_DestinationIndex = aDestinationIndex;
+
+	eap_status_e status = m_server->copy_all_eap_settings(internal_settings);
+
+	iWaitState = eap_general_settings_wait_state_complete_copy_all_eap_settings;
+	Activate();
+	WaitCompletion();
+
+	if (iCompletionStatus != eap_status_ok)
+	{
+		return m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, iCompletionStatus));
+	}
+
+	return m_am_tools->convert_eapol_error_to_am_error(
+			EAP_STATUS_RETURN(m_am_tools, status));
+}
+
+// ----------------------------------------------------------
+
+eap_status_e CEapGeneralSettingsImpl::complete_delete_all_eap_settings(
+	const eap_status_e completion_status)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneralSettingsImpl::complete_delete_all_eap_settings(): this=0x%08x, iWaitState=%d, status=%d=%s\n"),
+		this,
+		iWaitState,
+		completion_status,
+		eap_status_string_c::get_status_string(completion_status)));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneralSettingsImpl::complete_delete_all_eap_settings()");
+
+	iCompletionStatus = completion_status;
+
+	if (iWaitState != eap_general_settings_wait_state_complete_delete_all_eap_settings
+		&& iCompletionStatus == eap_status_ok)
+	{
+		// ERROR, wrong state. Other function was completed successfully not the function that was waited.
+		SetCompletionStatusIfStillOk(EAP_STATUS_RETURN(m_am_tools, eap_status_wrong_eap_type_state));
+	}
+
+	Complete();
+
+	return EAP_STATUS_RETURN(m_am_tools, completion_status);
+}
+
+// ----------------------------------------------------------
+
+eap_status_e CEapGeneralSettingsImpl::complete_copy_all_eap_settings(
+	const eap_status_e completion_status)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapGeneralSettingsImpl::complete_copy_all_eap_settings(): this=0x%08x, iWaitState=%d, status=%d=%s\n"),
+		this,
+		iWaitState,
+		completion_status,
+		eap_status_string_c::get_status_string(completion_status)));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapGeneralSettingsImpl::complete_copy_all_eap_settings()");
+
+	iCompletionStatus = completion_status;
+
+	if (iWaitState != eap_general_settings_wait_state_complete_copy_all_eap_settings
+		&& iCompletionStatus == eap_status_ok)
+	{
+		// ERROR, wrong state. Other function was completed successfully not the function that was waited.
+		SetCompletionStatusIfStillOk(EAP_STATUS_RETURN(m_am_tools, eap_status_wrong_eap_type_state));
+	}
+
+	Complete();
+
+	return EAP_STATUS_RETURN(m_am_tools, completion_status);
+}
+
+// ----------------------------------------------------------
+// ----------------------------------------------------------
+// ----------------------------------------------------------
+
+eap_am_message_if_c * eap_am_message_if_c::new_eap_am_message_if_c(
+	abs_eap_am_tools_c * const tools)
+{
+	EAP_TRACE_DEBUG(
+		tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_message_if_c::new_eap_am_server_general_settings_c()\n")));
+
+	EAP_TRACE_RETURN_STRING(tools, "returns: eap_am_message_if_c::new_eap_am_message_if_c()");
+
+    eap_am_message_if_c *client_if = new eap_am_message_if_symbian_c(tools, EEapSettingsNew);
+
+	eap_automatic_variable_c<eap_am_message_if_c> automatic_client_if(
+		tools,
+		client_if);
+
+	if (client_if == 0
+		|| client_if->get_is_valid() == false)
+	{
+		// ERROR.
+		if (client_if != 0)
+		{
+			EAP_TRACE_DEBUG(
+				tools,
+				TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+				(EAPL("ERROR: calls: eap_am_message_if_c::new_eap_am_server_general_settings_c(): client_if->shutdown()\n")));
+
+			client_if->shutdown();
+		}
+		return 0;
+	}
+
+	automatic_client_if.do_not_free_variable();
+
+	return client_if;
+
+}
+
+// ----------------------------------------------------------
+
+eap_general_settings_message_c * new_eap_general_settings_client_message_if_c(
+	abs_eap_am_tools_c * const tools,
+	abs_eap_general_settings_message_c * const partner)
+{
+	EAP_TRACE_DEBUG(
+		tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("new_eap_general_settings_client_message_if_c()\n")));
+
+	EAP_TRACE_RETURN_STRING(tools, "returns: new_eap_general_settings_client_message_if_c()");
+
+	eap_am_message_if_c *client_if = eap_am_message_if_c::new_eap_am_message_if_c(
+		tools);
+
+	eap_automatic_variable_c<eap_am_message_if_c> automatic_client_if(
+		tools,
+		client_if);
+
+	if (client_if == 0
+		|| client_if->get_is_valid() == false)
+	{
+		// ERROR.
+		if (client_if != 0)
+		{
+			EAP_TRACE_DEBUG(
+				tools,
+				TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+				(EAPL("ERROR: calls: new_eap_general_settings_client_message_if_c(): client_if->shutdown()\n")));
+
+			(void) client_if->shutdown();
+		}
+		return 0;
+	}
+
+	eap_general_settings_client_message_if_c * new_session_core = new eap_general_settings_client_message_if_c(tools, client_if, partner);
+
+	eap_automatic_variable_c<eap_general_settings_client_message_if_c> automatic_new_session_core(
+		tools,
+		new_session_core);
+
+	if (new_session_core == 0
+		|| new_session_core->get_is_valid() == false)
+	{
+		// ERROR.
+		if (new_session_core != 0)
+		{
+			EAP_TRACE_DEBUG(
+				tools,
+				TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+				(EAPL("ERROR: calls: new_eap_general_settings_client_message_if_c(): new_session_core->shutdown()\n")));
+
+			new_session_core->shutdown();
+		}
+		return 0;
+	}
+
+	client_if->set_partner(new_session_core);
+
+	automatic_client_if.do_not_free_variable();
+	automatic_new_session_core.do_not_free_variable();
+
+	return new_session_core;
+}
+
+// ----------------------------------------------------------
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_if/src/EapGeneralSettingsProxy.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,51 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 14 %
+*/
+
+// This is enumeration of EAPOL source code.
+#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
+	#undef EAP_FILE_NUMBER_ENUM
+	#define EAP_FILE_NUMBER_ENUM 606 
+	#undef EAP_FILE_NUMBER_DATE 
+	#define EAP_FILE_NUMBER_DATE 1127594498 
+#endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
+
+
+// INCLUDE FILES
+#include "EapGeneralSettingsImpl.h"
+#include <e32base.h>
+#include <ecom/implementationproxy.h>
+#include "EapolUID.h"
+
+const TImplementationProxy ImplementationTable[] = 
+{
+	{{EAP_GENERAL_SETTINGS_IMPLEMENTATION_UID}, reinterpret_cast<TProxyNewLPtr> (CEapGeneralSettingsImpl::NewL)}
+};
+
+// ================= OTHER EXPORTED FUNCTIONS ==============
+
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount)
+{
+	aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
+
+	return ImplementationTable;
+}
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_if/src/REapSession.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,732 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 33 %
+*/
+
+#include "REapSession.h"
+#include <e32base.h>
+#include "EapTraceSymbian.h"
+#include "EapCoreInterfaceImplementation.h"
+#include "EapServerStrings.h"
+#include "eap_automatic_variable.h"
+
+//----------------------------------------------------------------
+
+void Panic(TInt aPanic)
+    {
+    _LIT(KPanicCategory,"Eapol Client");
+    User::Panic(KPanicCategory, aPanic);
+    }
+
+//----------------------------------------------------------------
+
+TVersion REapSession::Version() const
+    {
+    return( TVersion(
+            KEapMajorVersionNumber,
+            KEapMinorVersionNumber,
+            KEapBuildVersionNumber ) );
+    }
+
+//----------------------------------------------------------------
+
+EAP_FUNC_EXPORT REapSession::~REapSession()
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("REapSession::~REapSession()\n")));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: REapSession::~REapSession()");
+
+	delete iEapMessageQueue;
+	iEapMessageQueue = 0;
+}
+
+//----------------------------------------------------------------
+
+EAP_FUNC_EXPORT void REapSession::ConnectL(
+	abs_eap_am_tools_c * const tools,
+	MSendPacketHandler * Client,
+	TBuf<KMaxServerExe> ServerName,
+	TBuf<KMaxServerExe> ServerExe,
+	const void * const aConfigurationData,
+	const TInt aConfigurationDataLength,
+	const TEapRequests aIfRequest)
+{
+	EAP_TRACE_DEBUG(
+		tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("REapSession::ConnectL()\n")));
+
+	EAP_TRACE_RETURN_STRING(tools, "returns: REapSession::ConnectL()");
+
+	iClient = Client;
+	iTools = tools;
+	iEapMessageQueue = new(ELeave) EapMessageQueue(iTools);
+
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("REapSession::ConnectL(): iEapMessageQueue=0x%08x\n"),
+		iEapMessageQueue));
+
+
+	// connect to iServer
+	TInt error=KErrNone;
+
+
+	TFindServer findServer(ServerName);
+	TFullName name;
+
+	error = findServer.Next( name );
+
+	if ( error == KErrNone )
+	{
+		// Server already running
+	}
+	else
+	{
+		error = iServer.Create(ServerExe,KNullDesC);
+
+		if (error != KErrNone)
+		{
+			EAP_TRACE_DEBUG(
+				iTools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("REapSession::ConnectL(): create iServer error=%d\n"),
+				error));
+			User::Leave(error);
+		}
+
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("REapSession::ConnectL(): iServer successfully created\n")));
+
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("REapSession::ConnectL(): iServer.SetPriority(EPriorityHigh)\n")));
+
+		iServer.SetPriority(EPriorityHigh);
+
+		TRequestStatus stat;
+
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("REapSession::ConnectL(): iServer.Rendezvous\n")));
+
+		iServer.Rendezvous( stat );
+
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("REapSession::ConnectL(): iServer.Rendezvous stat = %d\n"),
+			stat.Int()));
+
+		if ( stat!=KRequestPending )
+		{
+			iServer.Kill(0);     // abort startup
+
+			EAP_TRACE_DEBUG(
+				iTools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("ERROR: REapSession::ConnectL(): iServer killed\n")));
+		}
+		else
+		{
+			iServer.Resume();    // logon OK - start the iServer
+
+			EAP_TRACE_DEBUG(
+				iTools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("REapSession::ConnectL(): iServer started OK\n")));
+		}
+
+
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("REapSession::ConnectL(): WaitForRequest\n")));
+
+		User::WaitForRequest(stat);
+
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("REapSession::ConnectL(): WaitForRequest got, stat.Int()=%d\n"),
+			stat.Int()));
+
+		error = ( iServer.ExitType()==EExitPanic ) ? KErrGeneral : stat.Int();
+		iServer.Close();
+
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("REapSession::ConnectL(): Server closed, error=%d\n"),
+			error));
+	}
+
+
+	// create active object receive handler and add it to scheduler
+	CleanupClosePushL(*this);  // Close if next operations leave
+
+	User::LeaveIfError(error);
+
+	iSendHandler = new (ELeave) CSendHandler(iTools, *this); //*aHandler,
+	CActiveScheduler::Add(iSendHandler);
+
+	iProcessHandler = new (ELeave) CEapClientProcessHandler(iTools, *this); //*aHandler,
+	CleanupStack::Pop(this);
+	CActiveScheduler::Add(iProcessHandler);
+
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("REapSession::ConnectL(): calls CreateSession()\n")));
+
+	error = CreateSession(ServerName,Version(), KMaxEapMessageSlots);
+
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("REapSession::ConnectL(): CreateSession(), error=%d\n"),
+		error));
+
+	if (error != KErrNone)
+	{
+		User::Leave(error);
+	}
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("REapSession::ConnectL(): calls process_data(%d)"),
+		aIfRequest));
+
+	eap_status_e status = process_data(aIfRequest, aConfigurationData, aConfigurationDataLength);
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("REapSession::ConnectL(): process_data(%d) returns status=%d, iStatus.Int()=%d"),
+		aIfRequest,
+		status,
+		iStatus.Int()));
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("REapSession::ConnectL(): calls iSendHandler->Receive()")));
+
+	iSendHandler->Receive();
+}
+
+//----------------------------------------------------------------
+
+EAP_FUNC_EXPORT void REapSession::Close()
+	{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("REapSession::Close()\n")));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: REapSession::Close()");
+
+	// destroy receiver-handler
+	delete iSendHandler;
+	iSendHandler = 0;
+
+	delete iProcessHandler;
+	iProcessHandler = 0;
+
+	// destroy iServer session
+	iServer.Close();
+	RSessionBase::Close();
+	}
+
+//----------------------------------------------------------------
+
+/**
+ * From eap_am_message_if_c 
+ * Initialize interface to EAPOL or WAPI.
+ * @since S60 v9.2
+ */
+
+EAP_FUNC_EXPORT bool REapSession::get_is_valid()
+    {
+    EAP_TRACE_DEBUG_SYMBIAN((_L("REapSession::get_is_valid")));           
+	EAP_TRACE_RETURN_STRING(iTools, "returns: REapSession::get_is_valid()");
+
+    return ETrue;    
+    }
+
+//----------------------------------------------------------------
+
+/// Function receives the data message from lower layer.
+/// Data is formatted to Attribute-Value Pairs.
+/// Look at eap_tlv_header_c and eap_tlv_message_data_c.
+EAP_FUNC_EXPORT eap_status_e REapSession::process_data(const TEapRequests aMessageType, const void * const data, const u32_t length)
+    {
+	EAP_TRACE_DATA_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("REapSession::process_data()"),
+		data,
+		length));
+
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("REapSession::process_data(): calls iEapMessageQueue->AddMessage(): iEapMessageQueue=0x%08x\n"),
+		iEapMessageQueue));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: REapSession::process_data()");
+
+	TInt error = iEapMessageQueue->AddMessage(aMessageType, data, length);
+
+	if (error != KErrNone)
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("ERROR: REapSession::process_data(): failed = %d\n"),
+			error));
+		return EAP_STATUS_RETURN(iTools, iTools->convert_am_error_to_eapol_error(error));
+	}
+
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("REapSession::process_data(): calls iProcessHandler->Activate(): iProcessHandler=0x%08x\n"),
+		iProcessHandler));
+
+	iProcessHandler->Activate();
+
+    return EAP_STATUS_RETURN(iTools, iTools->convert_am_error_to_eapol_error(error));
+    }
+
+//----------------------------------------------------------------
+
+void REapSession::Receive(TDes8& aBuffer, TRequestStatus& aStatus)
+    {
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("REapSession::Receive()\n")));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: REapSession::Receive()");
+
+    TIpcArgs args( &aBuffer );
+
+    SendReceive( EEapIfReqReceive, args, aStatus );
+    }
+
+//----------------------------------------------------------------
+
+void REapSession::CancelReceive()
+    {
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("REapSession::CancelReceive()\n")));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: REapSession::CancelReceive()");
+
+    SendReceive(EEapIfCancelReceive, iStatus);
+    }
+
+//----------------------------------------------------------------
+
+const EapMessageBuffer * REapSession::GetFirstMessage()
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("REapSession::GetFirstMessage()\n")));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: REapSession::GetFirstMessage()");
+
+	return iEapMessageQueue->GetFirstMessage();
+}
+
+//----------------------------------------------------------------
+
+TInt REapSession::DeleteFirstMessage()
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("REapSession::DeleteFirstMessage()\n")));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: REapSession::DeleteFirstMessage()");
+
+	return iEapMessageQueue->DeleteFirstMessage();
+}
+
+//----------------------------------------------------------------
+
+void REapSession::Process(const EapMessageBuffer * const buffer, TRequestStatus &aStatus) const
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("REapSession::Process(): calls SendReceive(), aRequestType=%d=%s\n"),
+		buffer->GetRequestType(),
+		EapServerStrings::GetEapRequestsString(buffer->GetRequestType())));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: REapSession::Process()");
+
+	TIpcArgs args( buffer->GetData() );
+
+	SendReceive(buffer->GetRequestType(), args, aStatus);
+
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("REapSession::Process(): end iStatus=%d\n"),
+		iStatus.Int()));
+}
+
+//----------------------------------------------------------------
+//----------------------------------------------------------------
+//----------------------------------------------------------------
+
+/*
+    CSendHandler
+*/
+
+// construct/destruct
+
+CSendHandler::CSendHandler(
+	abs_eap_am_tools_c * const tools,
+	REapSession& aSession)
+    : CActive(0)
+	, iTools(tools)
+	, iSession(aSession)
+    {
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CSendHandler::CSendHandler()\n")));
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CSendHandler::CSendHandler()");
+
+    }
+
+//----------------------------------------------------------------
+
+CSendHandler::~CSendHandler()
+    {
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CSendHandler::~CSendHandler()\n")));
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CSendHandler::~CSendHandler()");
+
+    Cancel();
+    }
+
+//----------------------------------------------------------------
+
+// operation
+
+void CSendHandler::Receive()
+    {
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CSendHandler::Receive()\n")));
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CSendHandler::Receive()");
+
+    iSession.Receive(iBuffer, iStatus);
+
+	if(!IsActive())
+		{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CSendHandler::Receive(): calls SetActive()\n")));
+
+	    SetActive();
+		}
+    }
+
+//----------------------------------------------------------------
+
+// from CActive
+
+void CSendHandler::RunL()
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CSendHandler::RunL(): iStatus=%d\n"),
+		iStatus.Int()));
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CSendHandler::RunL()");
+
+	if (iStatus.Int() == KErrNone)
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CSendHandler::RunL(): iStatus = KErrNone, calls send_data()\n")));
+
+		iSession.iClient->send_data(iBuffer);
+
+		// initiate next receive
+		Receive();
+	}
+	else if (iStatus.Int() == KErrCancel)
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CSendHandler::RunL(): iStatus = KErrCancel, calls Close()\n")));
+
+		iSession.Close();
+	}
+	else
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CSendHandler::RunL(): does nothing\n")));
+
+	}
+}
+
+//----------------------------------------------------------------
+
+void CSendHandler::DoCancel()
+    {
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CSendHandler::DoCancel()\n")));
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CSendHandler::DoCancel()");
+
+    iSession.CancelReceive();
+    }
+
+//----------------------------------------------------------------------------
+
+TInt CSendHandler::RunError(TInt aError)
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CSendHandler::RunError(): aError=%d, this=0x%08x\n"),
+		aError,
+		this));
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CSendHandler::RunError()");
+
+	Cancel();
+
+	return aError;
+}
+
+//----------------------------------------------------------------
+//----------------------------------------------------------------
+//----------------------------------------------------------------
+
+void CEapolPacketHandler::EapolHandleL(const TDesC8& data)
+    {
+    EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: CEapolPacketHandler::EapolHandleL(): (do nothing now)")));           
+    }
+
+//----------------------------------------------------------------
+//----------------------------------------------------------------
+//----------------------------------------------------------------
+
+CEapClientProcessHandler::CEapClientProcessHandler(
+	abs_eap_am_tools_c * const tools,
+	REapSession& aSession)
+	: CActive(0)
+	, iTools(tools)
+	, iSession(aSession)
+	, iProcessPending(false)
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapClientProcessHandler::CEapClientProcessHandler()\n")));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapClientProcessHandler::CEapClientProcessHandler()");
+
+}
+
+//----------------------------------------------------------------
+
+CEapClientProcessHandler::~CEapClientProcessHandler()
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapClientProcessHandler::~CEapClientProcessHandler()\n")));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapClientProcessHandler::~CEapClientProcessHandler()");
+
+	Cancel();
+}
+
+//----------------------------------------------------------------
+
+// from CActive
+void CEapClientProcessHandler::RunL()
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("=start=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=\n")));
+
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapClientProcessHandler::RunL()\n")));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapClientProcessHandler::RunL()");
+
+	TInt error(KErrNone);
+
+	if (iProcessPending == true)
+	{
+		error = iSession.DeleteFirstMessage();
+		if (error != KErrNone)
+		{
+			EAP_TRACE_DEBUG(
+				iTools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("ERROR: CEapClientProcessHandler::RunL(): iSession.DeleteFirstMessage() failed = %d\n"),
+				error));
+
+			User::Leave(error);
+		}
+	}
+
+	const EapMessageBuffer * buffer = iSession.GetFirstMessage();
+
+	if (buffer != 0)
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CEapClientProcessHandler::RunL(): calls SendReceive(), buffer->GetRequestType()=%d=%s\n"),
+			buffer->GetRequestType(),
+			EapServerStrings::GetEapRequestsString(buffer->GetRequestType())));
+
+		TIpcArgs args( buffer->GetData() );
+
+		iSession.Process( buffer, iStatus );
+
+		SetActive();
+
+		iProcessPending = true;
+	}
+	else
+	{
+		iProcessPending = false;
+	}
+
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapClientProcessHandler::RunL(): end error=%d, iStatus=%d\n"),
+		error,
+		iStatus.Int()));
+
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("=end=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=c=\n")));
+}
+
+//----------------------------------------------------------------
+
+void CEapClientProcessHandler::Activate()
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapClientProcessHandler::Activate()\n")));
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapClientProcessHandler::Activate()");
+
+	if(!IsActive())
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CEapClientProcessHandler::Activate(): calls User::RequestComplete()\n")));
+
+		TRequestStatus* status = &iStatus;
+		User::RequestComplete(status, KErrNone);
+
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CEapClientProcessHandler::Activate(): calls SetActive()\n")));
+
+		SetActive();
+	}
+	else
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CEapClientProcessHandler::Activate(): Already active.\n")));
+	}
+}
+
+//----------------------------------------------------------------
+
+void CEapClientProcessHandler::DoCancel()
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapClientProcessHandler::DoCancel()\n")));
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapClientProcessHandler::DoCancel()");
+}
+
+//----------------------------------------------------------------------------
+
+TInt CEapClientProcessHandler::RunError(TInt aError)
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapClientProcessHandler::RunError(): aError=%d, this=0x%08x\n"),
+		aError,
+		this));
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapClientProcessHandler::RunError()");
+
+	Cancel();
+
+	return aError;
+}
+
+//----------------------------------------------------------------
+//----------------------------------------------------------------
+//----------------------------------------------------------------
+
+/*
+    DLL harness
+*/
+#ifndef EKA2
+EAP_FUNC_EXPORT TInt E32Dll(TDllReason)
+    {
+    return KErrNone;
+    }
+#endif
+
+//----------------------------------------------------------------
+// end
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_if/src/eap_am_message_if_symbian.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,249 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 19 %
+*/
+
+// INCLUDES
+#include <e32std.h>
+
+#include "abs_eap_am_message_if.h"
+#include "eap_am_message_if.h"
+#include "eap_am_message_if_symbian.h"
+#include "eap_variable_data.h"
+#include "eap_automatic_variable.h"
+#include "EapServerStrings.h"
+
+//-----------------------------------------------------------------------------------------
+
+/**
+ * C++ default constructor.
+ */
+EAP_FUNC_EXPORT eap_am_message_if_symbian_c::eap_am_message_if_symbian_c(
+	abs_eap_am_tools_c * const tools,
+	const TEapRequests if_request)
+: m_am_tools(tools)
+, m_partner(0)
+, m_if_request(if_request)
+, m_is_valid(false)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_am_message_if_symbian_c::eap_am_message_if_symbian_c(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_am_message_if_symbian_c::eap_am_message_if_symbian_c()");
+
+	if (m_am_tools == 0
+		|| m_am_tools->get_is_valid() == false)
+	{
+		return;
+	}
+
+	m_is_valid = true;
+}
+
+//-----------------------------------------------------------------------------------------
+
+/**
+ * Destructor.
+ */
+EAP_FUNC_EXPORT eap_am_message_if_symbian_c::~eap_am_message_if_symbian_c()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_am_message_if_symbian_c::~eap_am_message_if_symbian_c(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_am_message_if_symbian_c::~eap_am_message_if_symbian_c()");
+
+	m_partner = 0;
+}
+
+//-----------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT void eap_am_message_if_symbian_c::set_partner(abs_eap_am_message_if_c * const client)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_am_message_if_symbian_c::set_partner(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_am_message_if_symbian_c::set_partner()");
+
+	m_partner = client;
+
+	if (m_partner == 0)
+	{
+		m_is_valid = false;
+	}
+
+}
+
+//-----------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_am_message_if_symbian_c::configure(
+	const eap_variable_data_c * const client_configuration)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_am_message_if_symbian_c::configure(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_am_message_if_symbian_c::configure()");
+
+	TBuf<KMaxServerExe> ServerName;
+	TBuf<KMaxServerExe> ServerExe;
+
+	GetServerNameAndExe(&ServerName, &ServerExe);
+
+	const void * aConfigurationData = 0;
+	TInt aConfigurationDataLength = 0ul;
+
+	if (client_configuration != 0)
+	{
+		aConfigurationData = client_configuration->get_data();
+		aConfigurationDataLength = client_configuration->get_data_length();
+	}
+
+	TRAPD(err, iSession.ConnectL(m_am_tools, this, ServerName, ServerExe, aConfigurationData, aConfigurationDataLength, m_if_request));
+
+	if(err)
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_am_message_if_symbian_c::configure(): - iSession.ConnectL err=%d\n"), err ));    
+	}
+
+	return EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(err));
+}
+
+//-----------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_am_message_if_symbian_c::shutdown()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_am_message_if_symbian_c::shutdown(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_am_message_if_symbian_c::shutdown()");
+
+    iSession.Close();
+
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+//-----------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_am_message_if_symbian_c::process_data(const void * const data, const u32_t length)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_am_message_if_symbian_c::process_data(): this = 0x%08x, m_if_request=%d=%s.\n"),
+		this,
+		m_if_request,
+		EapServerStrings::GetEapRequestsString(m_if_request)));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_am_message_if_symbian_c::process_data()");
+
+	TEapRequests aRequest(EEapNone);
+
+	if (m_if_request == EEapPluginNew)
+	{
+		aRequest = EEapPluginProcessData;
+	}
+	else if (m_if_request == EEapSettingsNew)
+	{
+		aRequest = EEapSettingsProcessData;
+	}
+	else if (m_if_request == EEapPacStoreNew)
+	{
+		aRequest = EEapPacStoreProcessData;
+	}
+	else if (m_if_request == EWapiCoreIfNew)
+    {
+        aRequest = EWapiCoreProcessData;
+    }
+    else if (m_if_request == EWapiSettingsNew)
+    {
+        aRequest = EWapiSettingsProcessData;
+    }
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_am_message_if_symbian_c::process_data(): calls iSession.process_data(), this = 0x%08x, aRequest=%d=%s.\n"),
+		this,
+		aRequest,
+		EapServerStrings::GetEapRequestsString(aRequest)));
+
+	return EAP_STATUS_RETURN(
+		m_am_tools,
+		m_am_tools->convert_am_error_to_eapol_error(
+			iSession.process_data(aRequest, data, length)));
+}
+
+//-----------------------------------------------------------------------------------------
+
+EAP_FUNC_EXPORT bool eap_am_message_if_symbian_c::get_is_valid()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_am_message_if_symbian_c::get_is_valid(): this = 0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_am_message_if_symbian_c::get_is_valid()");
+
+	return m_is_valid;
+}
+
+//-----------------------------------------------------------------------------------------
+
+/// Function sends the data message to lower layer.
+/// Data is formatted to Attribute-Value Pairs.
+/// Look at eap_tlv_header_c and eap_tlv_message_data_c.
+EAP_FUNC_EXPORT eap_status_e eap_am_message_if_symbian_c::send_data(const TDesC8& message)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("eap_am_message_if_symbian_c::send_data(): this = 0x%08x, data=0x%08x, length=%d.\n"),
+		this,
+		message.Ptr(),
+		message.Length()));
+
+	EAP_TRACE_RETURN_STRING_FLAGS(m_am_tools, EAP_TRACE_FLAGS_MESSAGE_DATA, "returns: eap_am_message_if_symbian_c::send_data()");
+
+	return EAP_STATUS_RETURN(
+		m_am_tools, 
+		m_partner->send_data(message.Ptr(), message.Length()));
+}
+
+//-----------------------------------------------------------------------------------------
+
+// End of file.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/include/AbsEapProcessSendInterface.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 5 %
+*/
+
+#ifndef ABSEAPPROCESSSENDINTERFACE_H_
+#define ABSEAPPROCESSSENDINTERFACE_H_
+
+#include "eap_am_tools.h"
+#include "eap_am_export.h"
+
+class EapMessageBuffer;
+
+class EAP_EXPORT AbsEapProcessSendInterface
+    {
+
+private:
+
+public:
+
+    virtual ~AbsEapProcessSendInterface()
+        {
+        }
+
+    /// Function sends the data message to lower layer.
+    /// Data is formatted to Attribute-Value Pairs.
+    /// Look at eap_tlv_header_c and eap_tlv_message_data_c.
+    virtual eap_status_e SendData(EapMessageBuffer * const message) = 0;
+
+	virtual TBool GetReceiveActive() = 0;
+
+    };
+
+#endif /* ABSEAPPROCESSSENDINTERFACE_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/include/AbsEapSendInterface.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,46 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 5 %
+*/
+
+#ifndef ABSEAPSENDINTERFACE_H_
+#define ABSEAPSENDINTERFACE_H_
+
+#include "eap_am_tools.h"
+#include "eap_am_export.h"
+#include "EapServerClientDef.h"
+
+class EAP_EXPORT AbsEapSendInterface
+    {
+
+private:
+
+public:
+
+    virtual ~AbsEapSendInterface()
+        {
+        }
+
+    /// Function sends the data message to lower layer.
+    /// Data is formatted to Attribute-Value Pairs.
+    /// Look at eap_tlv_header_c and eap_tlv_message_data_c.
+    virtual eap_status_e SendData(const void * const data, const u32_t length, TEapRequests message) = 0;
+
+    };
+#endif /* ABSEAPSENDINTERFACE_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/include/EapCoreIf.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,97 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP-authentication interface in EAP-server.
+*
+*/
+
+/*
+* %version: 12 %
+*/
+
+
+#ifndef EAPCOREIF_H_
+#define EAPCOREIF_H_
+
+#include "abs_eap_am_message_if.h"
+#include "eap_am_message_if.h"
+#include "eap_tools.h"
+#include "AbsEapSendInterface.h"
+
+class eap_file_config_c;
+
+//--------------------------------------------------
+
+/** @file */
+
+/// This class is the EAP-authentication interface in EAP-server.
+class CEapCoreIf
+: public CBase
+, public abs_eap_am_message_if_c
+{
+
+private:
+
+    // ----------------------------------------------------------------------
+
+    /// This is pointer to the tools class.
+    abs_eap_am_tools_c * const m_am_tools;
+
+    // client interface
+    AbsEapSendInterface * m_client_if;
+
+    /// CEapCoreIf deletes m_server_if in destructor.
+    eap_am_message_if_c * m_server_if;
+
+    eap_file_config_c * m_fileconfig;
+
+    bool m_use_asyncronous_test;
+    
+    bool iIsValid;
+
+    // ----------------------------------------------------------------------
+
+public:
+
+    // ----------------------------------------------------------------------
+
+    CEapCoreIf(
+        abs_eap_am_tools_c * const tools,
+        eap_am_message_if_c * const server,
+        AbsEapSendInterface * client);
+
+    virtual ~CEapCoreIf();
+
+    bool get_is_valid();
+
+    eap_status_e configure(
+		const eap_variable_data_c * const client_configuration);
+
+    eap_status_e send_data(const void * const data, const u32_t length);
+
+    eap_status_e process_data(const void * const data, const u32_t length);
+
+    eap_status_e shutdown();
+
+    // ------------------------------------------------------
+
+    static CEapCoreIf * new_CEapCoreIf(
+        abs_eap_am_tools_c * const tools,
+        const bool is_client_when_true,
+        const u32_t MTU,
+        AbsEapSendInterface * client);
+
+    // ----------------------------------------------------------------------
+};
+
+#endif /* EAPCOREIF_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/include/EapPluginIf.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,95 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP-configuration interface in the EAP-server.
+*
+*/
+
+/*
+* %version: 11 %
+*/
+
+
+#ifndef _EAP_PLUGIN_IF_H_
+#define _EAP_PLUGIN_IF_H_
+
+#include "abs_eap_am_message_if.h"
+#include "eap_am_message_if.h"
+#include "abs_eap_am_plugin.h"
+#include "eap_am_plugin.h"
+#include "eap_tools.h"
+#include "AbsEapSendInterface.h"
+
+//--------------------------------------------------
+
+/** @file */
+
+/// This class is the EAP-configuration interface in the EAP-server.
+class CEapPluginIf
+: public CBase
+, public abs_eap_am_message_if_c
+{
+
+public:
+
+    // ----------------------------------------------------------------------
+
+    CEapPluginIf(
+        abs_eap_am_tools_c * const tools,
+        eap_am_message_if_c * const server);
+
+    virtual ~CEapPluginIf();
+
+    bool get_is_valid();
+
+    eap_status_e configure(
+		const eap_variable_data_c * const client_configuration);
+
+    void set_partner(AbsEapSendInterface * const client);
+
+    eap_status_e send_data(const void * const data, const u32_t length);
+
+    eap_status_e process_data(const void * const data, const u32_t length);
+
+    eap_status_e shutdown();
+
+    // ------------------------------------------------------
+
+    static CEapPluginIf * new_CEapPluginIf(
+        abs_eap_am_tools_c * const tools);
+
+    // ----------------------------------------------------------------------
+
+private:
+
+    // ----------------------------------------------------------------------
+
+    /// This is pointer to the tools class.
+    abs_eap_am_tools_c * const m_am_tools;
+
+    // client interface
+    AbsEapSendInterface * m_client_if;
+
+    /// CEapPluginIf deletes m_server_if in destructor.
+    eap_am_message_if_c * m_server_if;
+
+    bool m_use_asyncronous_test;
+    
+    bool m_is_valid;
+
+    // ----------------------------------------------------------------------
+
+};
+
+
+#endif /* _EAP_PLUGIN_IF_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/include/EapScheduler.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,108 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 10 %
+*/
+
+
+#ifndef EAPSCHEDULER_H_
+#define EAPSCHEDULER_H_
+
+#include "EapServerClientDef.h"
+#include "abs_eap_am_tools.h"
+#include "EapClientIf.h"
+#include <e32math.h>
+
+class CEapServer;
+
+// -------------------------------------------------------------------------
+
+class CEapScheduler
+: public CActiveScheduler
+, public EapClientIf
+{
+
+public:
+
+	EAP_FUNC_IMPORT static CEapScheduler* NewL();
+
+	EAP_FUNC_IMPORT static TInt LaunchFromClient(const TBuf<KMaxServerExe> Server);
+
+	class TServerStart
+	{
+
+	public:
+
+		TServerStart(TRequestStatus& aStatus);
+
+		TPtrC AsCommand() const;
+
+		inline TServerStart() {};
+
+		void SignalL();
+
+	private:
+
+		TThreadId iId;
+
+		TRequestStatus* iStatus;
+
+	};
+
+public:
+
+#ifdef __WINS__
+    static TInt ThreadFunction(TAny* aThreadParms);
+#endif
+
+    EAP_FUNC_IMPORT static TInt ThreadStart(TServerStart& aSignal);
+
+    static void ConstructL(TServerStart& aStart);
+
+    virtual ~CEapScheduler();
+
+    void Error(TInt aError) const; // from CActiveScheduler
+
+private:
+
+    CEapServer* iServer;
+
+};
+
+// -------------------------------------------------------------------------
+
+inline CEapScheduler::TServerStart::TServerStart(TRequestStatus& aStatus)
+    : iId(RThread().Id())
+	, iStatus(&aStatus)
+{
+	aStatus=KRequestPending;
+}
+
+// -------------------------------------------------------------------------
+
+inline TPtrC CEapScheduler::TServerStart::AsCommand() const
+{
+	return TPtrC(reinterpret_cast<const TText*>(this),sizeof(TServerStart)/sizeof(TText));
+}
+
+// -------------------------------------------------------------------------
+
+#endif /* EAPSCHEDULER_H_ */
+
+// -------------------------------------------------------------------------
+// End of file.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/include/EapServer.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,98 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP-server class.
+*
+*/
+
+/*
+* %version: 12 %
+*/
+
+
+#ifndef EAPAUTHSERVER_H_
+#define EAPAUTHSERVER_H_
+
+#include <e32base.h>
+#include <e32svr.h>
+#include <ecom/implementationinformation.h>
+#include <ecom/ecom.h>
+#include "EapServerClientDef.h"
+#include "EapScheduler.h"
+#include "EapSession.h"
+#include "abs_eap_am_tools.h"
+#include "EapClientIf.h"
+#include "EapServerBackup.h"
+
+class CEapDelayedShutdown;
+
+class CEapServer
+: public CServer2
+, public EapClientIf
+, public AbsEapserverBackup
+    {
+
+public:
+
+    // construct
+    CEapServer();
+    void ConstructL();
+    static CEapServer* NewL();
+    virtual ~CEapServer();
+    // from CServer2
+    CSession2* NewSessionL(const TVersion& aVersion, const RMessage2 &aMessage ) const;
+    // session counting
+    void IncrementSessions();
+    void DecrementSessions();
+    // utility
+    void PanicClient(TInt aPanic) const;
+
+	void StopL();
+
+	void BackupOrRestoreCompleteL();
+
+	void BackupOrRestoreStartingL();
+
+private:
+
+    TInt RunError(TInt aErr);
+    CEapDelayedShutdown* iShutdown;
+	CEapserverBackup * iBackupRestore;
+
+    TInt iSessionCount;
+    abs_eap_am_tools_c * iTools;
+    TBool iIsValid;
+    };
+
+
+// Handles timer that stops EAP-server after some idle time.
+class CEapDelayedShutdown : public CActive
+    {
+public:
+    CEapDelayedShutdown(abs_eap_am_tools_c * const tools, CEapServer * const aServer);
+    void ConstructL();
+    virtual ~CEapDelayedShutdown();
+    void Start();
+private:
+    void DoCancel();
+    void RunL();
+	TInt RunError(TInt aError);
+
+private:
+	abs_eap_am_tools_c * const iTools;
+    RTimer iTimer;
+	CEapServer * const iServer;
+    };
+
+
+#endif /* EAPAUTHSERVER_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/include/EapServerBackup.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,80 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP-server backup and restore.
+*
+*/
+
+/*
+* %version: 4 %
+*/
+
+
+#ifndef _EAP_SERVER_BACKUP_H_
+#define _EAP_SERVER_BACKUP_H_
+
+#include <e32base.h>
+#include <e32property.h>
+
+/**
+ @file
+*/
+
+//------------------------------------------------------------------------------------------------
+
+class AbsEapserverBackup
+{
+
+public:
+
+	virtual void BackupOrRestoreCompleteL() = 0;
+
+	virtual void BackupOrRestoreStartingL() = 0;
+};
+
+//------------------------------------------------------------------------------------------------
+
+class CEapserverBackup
+: public CActive
+{
+
+public:
+
+	static CEapserverBackup* NewL(AbsEapserverBackup * const aBackupAndRestoreObserver);
+
+	virtual ~CEapserverBackup();
+
+	TBool IsBackupOrRestoreInProgress();
+
+	CEapserverBackup(AbsEapserverBackup * const aBackupAndRestoreObserver);
+
+	void ConstructL();
+
+private:
+
+	void RunL();
+
+	void DoCancel();
+
+private:
+
+	AbsEapserverBackup * iBackupAndRestoreObserver;
+
+	RProperty iBackupProperty;
+
+	TBool iBackupOrRestoreInProgress;
+};
+
+#endif // _EAP_SERVER_BACKUP_H_
+
+// End of file.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/include/EapServerClientDef.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,75 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP-server and client definitions.
+*
+*/
+
+/*
+* %version: 20 %
+*/
+
+
+#ifndef EAPSERVERCLIENTDEF_H_
+#define EAPSERVERCLIENTDEF_H_
+
+#include <e32base.h>
+
+enum TEapPanic // both client-side and server-side - see category to distinguish
+    {
+    ECannotStartServer,
+    EBadRequest,
+    EBadDescriptor,
+    EListenAlreadyListening,
+    EErrorFromNonClientObject,
+    EReceiveReceiveAlreadyActive,
+    };
+
+enum TEapRequests
+    {
+    EEapNone                 =  0,
+    EEapCoreIfNew            =  1,
+    EEapPluginNew            =  2,
+    EEapSettingsNew          =  3,
+    EEapCoreProcessData      =  4,
+    EEapPluginProcessData    =  5,
+    EEapSettingsProcessData  =  6,
+    EEapCoreSendData         =  7,
+    EEapPluginSendData       =  8,
+    EEapSettingsSendData     =  9,
+    EEapIfReqReceive         = 10,
+    EEapIfCancelReceive      = 11,
+    EEapPacStoreNew          = 12,
+    EEapPacStoreProcessData  = 13,
+    EEapPacStoreSendData     = 14,
+    EWapiCoreIfNew           = 15,
+    EWapiSettingsNew         = 16,
+    EWapiCoreProcessData     = 17,
+    EWapiSettingsProcessData = 18,
+    EWapiCoreSendData        = 19,
+    EWapiSettingsSendData    = 20,
+    };
+
+//the server version. A version must be specifyed when creating a session with the server
+const TUint KEapMajorVersionNumber = 0;
+const TUint KEapMinorVersionNumber = 1;
+const TUint KEapBuildVersionNumber = 1;
+
+_LIT(KEapAuthServerSemaphore,   "EapAuthServerSemaphore");
+const TInt KMaxServerExe = 24;
+const TInt KEapShutdownInterval=5000000; // 5 seconds.
+const TInt KMaxCategoryLength = 16;
+const TInt KMaxEapData = 30000;
+const TInt KMaxEapMessageSlots = 50;
+
+#endif /* EAPSERVERCLIENTDEF_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/include/EapServerProcessHandler.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,95 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP-server process handler.
+*
+*/
+
+/*
+* %version: 22 %
+*/
+
+
+#ifndef EAPPROCESSHANDLER_H_
+#define EAPPROCESSHANDLER_H_
+
+#include "EapServerClientDef.h"
+#include "AbsEapSendInterface.h"
+#include "EapCoreIf.h"
+#include "EapPluginIf.h"
+#include "EapSettingsIf.h"
+
+#if defined (USE_WAPI_CORE)
+#include "WapiCoreIf.h"
+#include "WapiSettingsIf.h"
+#endif
+
+#if defined(USE_EAP_PAC_STORE_IF)
+#include "PacStoreIf.h"
+#endif //#if defined(USE_EAP_PAC_STORE_IF)
+
+#include "EapMessageQueue.h"
+#include "AbsEapProcessSendInterface.h"
+
+class CEapServerProcessHandler
+: public CActive
+, public AbsEapSendInterface
+{
+    
+public:
+    
+	virtual ~CEapServerProcessHandler();
+
+	void ConstructL(AbsEapProcessSendInterface* const client, abs_eap_am_tools_c * const tools);
+
+	static CEapServerProcessHandler* NewL();
+
+	void SaveMessage(TEapRequests message, const void * const data, const TUint length);
+
+	eap_status_e SendData(const void * const data, const u32_t length, TEapRequests message);
+
+	void Activate();
+
+private:
+
+	CEapServerProcessHandler();
+
+
+	//from CActive
+
+	void DoCancel();
+	void RunL();
+	TInt RunError(TInt aError);
+
+
+	AbsEapProcessSendInterface * iClient;
+	abs_eap_am_tools_c * iTools;
+	CEapCoreIf * iEapCore;
+	CEapPluginIf* iEapPlugin;
+	CEapSettingsIf* iEapSettings;
+
+#if defined (USE_WAPI_CORE)
+	CWapiCoreIf * iWapiCore;
+  CWapiSettingsIf* iWapiSettings;
+#endif
+
+#if defined(USE_EAP_PAC_STORE_IF) // JPH: does not compile anymore
+    CPacStoreIf* iPacStore;
+#endif //#if defined(USE_EAP_PAC_STORE_IF) // JPH: does not compile anymore
+
+	EapMessageQueue* iEapMessageQueue;
+	
+
+};
+    
+#endif /* EAPPROCESSHANDLER_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/include/EapServerStrings.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,59 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 5 %
+*/
+
+#if !defined( _EAP_SERVER_STRINGS_H_ )
+#define _EAP_SERVER_STRINGS_H_
+
+/** @file */
+
+#include "EapServerClientDef.h"
+#include "eap_am_types.h"
+
+//----------------------------------------------------------------------------------
+
+/// This class includes the debug strings of the EAP-SERVER.
+class EapServerStrings
+{
+public:
+
+	IMPORT_C virtual ~EapServerStrings();
+
+	IMPORT_C EapServerStrings();
+
+	/**
+	 * Function returns string of TEapRequests.
+	 * @param request is the queried string.
+	 */
+	IMPORT_C static eap_const_string GetEapRequestsString(const TEapRequests request);
+
+	/**
+	 * Function returns string of TEapRequests.
+	 * @param request is the queried string.
+	 */
+	IMPORT_C static eap_const_string GetEapRequestsString(const TInt request);
+
+};
+
+//----------------------------------------------------------------------------------
+
+#endif //#if !defined( _EAP_SERVER_STRINGS_H_ )
+
+// End.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/include/EapSession.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,85 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP-session inside the EAP-server.
+*
+*/
+
+/*
+* %version: 15 %
+*/
+
+
+#ifndef EAPSESSION_H_
+#define EAPSESSION_H_
+
+#include <e32base.h>
+#include <e32svr.h>
+#include <ecom/implementationinformation.h>
+#include <ecom/ecom.h>
+#include "AbsEapProcessSendInterface.h"
+
+
+class CEapServer;
+class CEapServerProcessHandler;
+class EapMessageBuffer;
+
+class CEapSession
+: public CSession2
+, public AbsEapProcessSendInterface
+    {
+
+public:
+
+    CEapSession();
+
+    void ConstructL(CEapServer& aServer, abs_eap_am_tools_c * const tools);
+
+    virtual ~CEapSession();
+
+    // service dispatcher - from CSession2
+    void ServiceL(const RMessage2& aMessage);
+
+    void ReceiveAll();
+
+    void Receive(RMessage2& aBuffer);
+
+    void CancelReceive();
+
+    eap_status_e SendData(EapMessageBuffer * const message);
+
+	TBool GetReceiveActive();
+
+ private:
+
+    CEapServer* Server() const;
+
+	void CheckCapabilityL(
+		const RMessage2& aMessage,
+		const TBool aMustHaveCapabilityWhenTrue,
+		const TCapability aCapability,
+		const char *aDiagnostic);
+
+    // receive support
+    TBool iReceiveActive;
+
+    RMessage2 iReceiveMessage;
+
+    CEapServerProcessHandler* iEapProcessHandler;
+
+    TRequestStatus iStatus;
+
+    abs_eap_am_tools_c * iTools;
+    };
+
+#endif /* EAPSESSION_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/include/EapSettingsIf.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,94 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP-general-settings interface inside the EAP-server.
+*
+*/
+
+/*
+* %version: 10 %
+*/
+
+#ifndef _EAP_SETTINGS_IF_H_
+#define _EAP_SETTINGS_IF_H_
+
+#include "abs_eap_am_message_if.h"
+#include "eap_am_message_if.h"
+#include "abs_eap_am_plugin.h"
+#include "eap_am_plugin.h"
+#include "eap_tools.h"
+#include "AbsEapSendInterface.h"
+
+//--------------------------------------------------
+
+/** @file */
+
+/// This class is the EAP-general-settings interface inside the EAP-server.
+class CEapSettingsIf
+: public CBase
+, public abs_eap_am_message_if_c
+{
+
+public:
+
+    // ----------------------------------------------------------------------
+
+    CEapSettingsIf(
+        abs_eap_am_tools_c * const tools,
+        eap_am_message_if_c * const server);
+
+    virtual ~CEapSettingsIf();
+
+    bool get_is_valid();
+
+    eap_status_e configure(
+		const eap_variable_data_c * const client_configuration);
+
+    void set_partner(AbsEapSendInterface * const client);
+
+    eap_status_e send_data(const void * const data, const u32_t length);
+
+    eap_status_e process_data(const void * const data, const u32_t length);
+
+    eap_status_e shutdown();
+
+    // ------------------------------------------------------
+
+    static CEapSettingsIf * new_CEapSettingsIf(
+        abs_eap_am_tools_c * const tools);
+
+    // ----------------------------------------------------------------------
+
+private:
+
+    // ----------------------------------------------------------------------
+
+    /// This is pointer to the tools class.
+    abs_eap_am_tools_c * const m_am_tools;
+
+    // client interface
+    AbsEapSendInterface * m_client_if;
+
+    /// CEapSettingsIf deletes m_server_if in destructor.
+    eap_am_message_if_c * m_server_if;
+
+    bool m_use_asyncronous_test;
+
+	bool m_is_valid;
+
+    // ----------------------------------------------------------------------
+
+};
+
+
+#endif /* _EAP_PLUGIN_IF_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/include/PacStoreIf.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,99 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  PAC-store interface inside the EAP-server.
+*
+*/
+
+/*
+* %version: 10 %
+*/
+
+
+#ifndef PACSTOREIF_H_
+#define PACSTOREIF_H_
+
+#include "abs_eap_am_message_if.h"
+#include "eap_am_message_if.h"
+#include "eap_tools.h"
+#include "AbsEapSendInterface.h"
+#include "eap_pac_store_server_message_if.h"
+
+class eap_file_config_c;
+
+//--------------------------------------------------
+
+/** @file */
+
+/// This class is the PAC-store interface inside the EAP-server.
+class CPacStoreIf
+: public CBase
+, public abs_eap_am_message_if_c
+{
+
+public:
+
+    // ----------------------------------------------------------------------
+
+    EAP_FUNC_IMPORT CPacStoreIf(
+        abs_eap_am_tools_c * const tools,
+        eap_am_message_if_c * const server,
+        AbsEapSendInterface * client);
+
+    EAP_FUNC_IMPORT virtual ~CPacStoreIf();
+
+    EAP_FUNC_IMPORT bool get_is_valid();
+
+    EAP_FUNC_IMPORT eap_status_e configure(
+		const eap_variable_data_c * const client_configuration);
+
+    EAP_FUNC_IMPORT eap_status_e send_data(const void * const data, const u32_t length);
+
+    EAP_FUNC_IMPORT eap_status_e process_data(const void * const data, const u32_t length);
+
+    EAP_FUNC_IMPORT eap_status_e shutdown();
+
+    // ------------------------------------------------------
+
+    EAP_FUNC_IMPORT static CPacStoreIf * new_CPacStoreIf(
+        abs_eap_am_tools_c * const tools,
+        const bool is_client_when_true,
+        const u32_t MTU,
+        AbsEapSendInterface * client);
+
+    // ----------------------------------------------------------------------
+
+private:
+
+    // ----------------------------------------------------------------------
+
+    /// This is pointer to the tools class.
+    abs_eap_am_tools_c * const m_am_tools;
+
+    // client interface
+    AbsEapSendInterface * m_client_if;
+
+    /// CPacStoreIf deletes m_server_if in destructor.
+    eap_am_message_if_c * m_server_if;
+
+    eap_file_config_c * m_fileconfig;
+
+    bool m_use_asyncronous_test;
+    
+    bool iIsValid;
+
+    // ----------------------------------------------------------------------
+
+};
+
+#endif /* PACSTOREIF_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/include/eap_am_general_settings_symbian.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,187 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 26 %
+*/
+
+#if !defined(_EAP_AM_GENERAL_SETTINGS_SYMBIAN_H_)
+#define _EAP_AM_GENERAL_SETTINGS_SYMBIAN_H_
+
+#include "eap_tools.h"
+#include "eap_status.h"
+#include "eap_am_export.h"
+#include "eap_expanded_type.h"
+#include "eap_array.h"
+#include "eap_database_reference_if.h"
+#include "eap_am_general_settings.h"
+#include "eap_process_tlv_message_data.h"
+#include <d32dbms.h>
+#include <AbsEapCertificateFetcher.h>
+#include <implementationinformation.h>
+
+class eap_method_settings_c;
+class CEapTlsPeapCertFetcher;
+
+/** @file */
+
+/// This class is the common part of EAP message interface.
+/// This class is interface to the message creation and parsing function.
+class EAP_EXPORT eap_am_general_settings_symbian_c
+: public eap_am_general_settings_c
+, public CAbsEapCertificateFetcher
+{
+
+public:
+
+	// ----------------------------------------------------------------------
+
+	eap_am_general_settings_symbian_c(
+		abs_eap_am_tools_c * const tools,
+		abs_eap_am_general_settings_c * const partner);
+
+	eap_am_general_settings_symbian_c(
+		abs_eap_am_tools_c * const tools);
+
+	virtual ~eap_am_general_settings_symbian_c();
+
+	bool get_is_valid();
+
+	// This is documented in abs_eap_stack_interface_c::configure().
+	eap_status_e configure();
+
+	// This is documented in abs_eap_stack_interface_c::shutdown().
+	eap_status_e shutdown();
+
+	eap_status_e get_eap_methods(const eap_method_settings_c * const internal_settings);
+
+	eap_status_e set_eap_methods(const eap_method_settings_c * const internal_settings);
+
+	eap_status_e get_certificate_lists(const eap_method_settings_c * const internal_settings);
+
+	eap_status_e delete_all_eap_settings(const eap_method_settings_c * const internal_settings);
+
+	eap_status_e copy_all_eap_settings(const eap_method_settings_c * const internal_settings);
+
+
+	void CompleteReadCertificatesL(
+		const RPointerArray<EapCertificateEntry>& aUserCerts, 
+		const RPointerArray<EapCertificateEntry>& aCACerts);
+
+	// This function reads synchronously enabled and disabled EAP-methods from database.
+	// This function is used only by EAP-SERVER directly.
+	// Use constructor without partner parameter.
+	eap_status_e read_eap_methods_synchronously(
+		const TUint indexType,
+		const TUint index,
+		eap_array_c<eap_type_value_e> * const aEnabledEapMethodsArray,
+		eap_array_c<eap_type_value_e> * const aDisabledEapMethodsArray);
+
+	// ----------------------------------------------------------------------
+
+private:
+
+	// ----------------------------------------------------------------------
+
+	abs_eap_am_tools_c * const m_am_tools;
+
+	abs_eap_am_general_settings_c * m_partner;
+
+	bool m_is_valid;
+
+	/// Function shutdown() is called already.
+	bool m_shutdown_was_called;
+
+	RDbNamedDatabase iGeneralSettingsDb;
+	RFs iGeneralSettingsFileServerSession;	
+
+	TBool iGeneralSettingsDbCreated;
+	TBool iGeneralSettingsSessionOpened;
+
+	CEapTlsPeapCertFetcher * iCertificateFetcher;
+
+	/// Status of the operation.
+	eap_status_e m_completion_status;
+
+	/// Specifies the EAP-method these settings are for. 
+	eap_type_value_e m_EAPType;
+
+	/// Specifies the index type (bearer protocol) these settings are for.
+	/// Values are ELan or EVpn.
+	u32_t m_IndexType;
+
+	/// Specifies unique index in the settings of the bearer protocol.
+	u32_t m_Index;
+
+	// ----------------------------------------------------------------------
+
+	void CloseGeneralSettings();
+
+	void OpenGeneralSettingsL();
+
+	void CreateGeneralSettingsL();
+
+	void GetGeneralSettingsLongBinaryL(
+		RDbView &aViev,
+		const TDesC &aColName,
+		HBufC8** const aMethods);
+
+	void GetGeneralSettingsDataL(
+		const TUint indexType,
+		const TUint index,
+		HBufC8** const aEnabledEapMethods,
+		HBufC8** const aDisabledEapMethods);
+
+
+	void SetGeneralSettingsLongBinaryL(
+		RDbView &aViev,
+		const TDesC &aColName,
+		const TDesC8& aMethods);
+
+	void SetGeneralSettingsDataL(
+		const TUint indexType,
+		const TUint index,
+		const TDesC8& aEnabledEapMethods,
+		const TDesC8& aDisabledEapMethods);
+
+	void DeleteGeneralSettingsDataL(
+		const TUint indexType,
+		const TUint index);
+
+	void CopyGeneralSettingsDataL(
+		const TUint aSourceIndexType,
+		const TUint aSourceIndex,
+		const TUint aDestinationIndexType,
+		const TUint aDestinationIndex);
+
+	eap_status_e error_complete(
+		const eap_status_e completion_status,
+		const eap_method_settings_c * const internal_settings,
+		const eap_tlv_message_type_function_e error_completion_function);
+
+	eap_status_e filter_eap_methods(
+		eap_array_c<eap_type_value_e> * const disabled_eap_methods,
+		RPointerArray<TEapExpandedType> * const aPlugins);
+
+	// ----------------------------------------------------------------------
+};
+
+#endif //#if !defined(_EAP_AM_GENERAL_SETTINGS_SYMBIAN_H_)
+
+
+//--------------------------------------------------
+// End
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/include/eap_am_pac_store_symbian.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,121 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  interface to PAC-store.
+*
+*/
+
+/*
+* %version: 8 %
+*/
+
+#if !defined(_EAP_AM_PAC_STORE_SYMBIAN_H_)
+#define _EAP_AM_PAC_STORE_SYMBIAN_H_
+
+#include "eap_tools.h"
+#include "eap_status.h"
+#include "eap_am_export.h"
+#include "eap_expanded_type.h"
+#include "eap_array.h"
+#include "eap_database_reference_if.h"
+#include "eap_am_pac_store.h"
+#include "eap_process_tlv_message_data.h"
+#include "pac_store_db_symbian.h"
+#include <d32dbms.h>
+
+class eap_method_settings_c;
+class abs_eap_am_pac_store_c;
+
+/** @file */
+
+/// This class is the interface to PAC-store.
+class EAP_EXPORT eap_am_pac_store_symbian_c
+: public eap_am_pac_store_c
+{
+
+private:
+
+	// ----------------------------------------------------------------------
+
+	abs_eap_am_tools_c * const m_am_tools;
+
+	abs_eap_am_pac_store_c * m_partner;
+
+	bool m_is_valid;
+
+	/// Function shutdown() is called already.
+	bool m_shutdown_was_called;
+
+	TBool iClientCreated;
+	TBool iPacStoreSessionOpened;
+	
+	CPacStoreDatabase* iClient;
+	
+	eap_variable_data_c m_PAC_store_password;
+
+	// ----------------------------------------------------------------------
+
+	// ----------------------------------------------------------------------
+
+public:
+
+	// ----------------------------------------------------------------------
+
+    static eap_am_pac_store_c* new_eap_am_pac_store_symbian_c(
+            abs_eap_am_tools_c * const tools,
+            abs_eap_am_pac_store_c * const partner);
+    
+	eap_am_pac_store_symbian_c(
+		abs_eap_am_tools_c * const tools,
+		abs_eap_am_pac_store_c * const partner);
+
+	virtual ~eap_am_pac_store_symbian_c();
+
+	EAP_FUNC_IMPORT bool get_is_valid();
+
+	// This is documented in abs_eap_stack_interface_c::configure().
+	EAP_FUNC_IMPORT	eap_status_e configure();
+
+	// This is documented in abs_eap_stack_interface_c::shutdown().
+	EAP_FUNC_IMPORT eap_status_e shutdown();
+
+	EAP_FUNC_IMPORT eap_status_e open_pac_store();
+
+	EAP_FUNC_IMPORT eap_status_e create_device_seed();
+
+	EAP_FUNC_IMPORT eap_status_e is_master_key_present();
+
+	EAP_FUNC_IMPORT eap_status_e is_master_key_and_password_matching(
+		const eap_variable_data_c * const pac_store_password);
+
+	EAP_FUNC_IMPORT eap_status_e create_and_save_master_key(
+		const eap_variable_data_c * const pac_store_password);
+
+	EAP_FUNC_IMPORT eap_status_e compare_pac_store_password(
+		eap_variable_data_c * const pac_store_password);
+
+	EAP_FUNC_IMPORT eap_status_e is_pacstore_password_present();
+
+	EAP_FUNC_IMPORT eap_status_e set_pac_store_password(
+		const eap_variable_data_c * pac_store_password);
+
+	EAP_FUNC_IMPORT eap_status_e destroy_pac_store();
+
+	// ----------------------------------------------------------------------
+};
+
+#endif //#if !defined(_EAP_AM_PAC_STORE_SYMBIAN_H_)
+
+
+//--------------------------------------------------
+// End
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/include/eap_am_plugin_symbian.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,113 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP-plugin adaptation.
+*
+*/
+
+/*
+* %version: 16 %
+*/
+
+#if !defined(_EAP_AM_PLUGIN_SYMBIAN_H_)
+#define _EAP_AM_PLUGIN_SYMBIAN_H_
+
+#include "eap_tools.h"
+#include "eap_status.h"
+#include "eap_am_export.h"
+#include "eap_expanded_type.h"
+#include "eap_array.h"
+#include "eap_database_reference_if.h"
+#include "eap_am_plugin.h"
+#include "eap_process_tlv_message_data.h"
+#include "eap_loaded_type.h"
+
+class eap_method_settings_c;
+class abs_eap_am_plugin_c;
+class CEapTypePlugin;
+
+/** @file */
+
+/// This class is EAP-plugin adaptation.
+class EAP_EXPORT eap_am_plugin_symbian_c
+: public eap_am_plugin_c
+{
+
+private:
+
+	// ----------------------------------------------------------------------
+
+	abs_eap_am_tools_c * const m_am_tools;
+
+	abs_eap_am_plugin_c * m_partner;
+
+	eap_array_c<eap_loaded_type_c> m_loaded_types;
+
+	bool m_is_valid;
+
+	bool m_shutdown_was_called;
+
+	// ----------------------------------------------------------------------
+
+	eap_status_e error_complete(
+		const eap_status_e completion_status,
+		const eap_method_settings_c * const internal_settings,
+		const eap_tlv_message_type_function_e completion_function);
+
+	CEapTypePlugin * get_eap_type(
+		const eap_type_value_e eap_type,
+		u32_t index_type,
+		u32_t index);
+
+	// ----------------------------------------------------------------------
+
+public:
+
+	// ----------------------------------------------------------------------
+
+	eap_am_plugin_symbian_c(
+		abs_eap_am_tools_c * const tools,
+		abs_eap_am_plugin_c * const partner);
+
+	virtual ~eap_am_plugin_symbian_c();
+
+	bool get_is_valid();
+
+	// This is documented in abs_eap_stack_interface_c::configure().
+	eap_status_e configure();
+
+	// This is documented in abs_eap_stack_interface_c::shutdown().
+	eap_status_e shutdown();
+
+	eap_status_e get_configuration(const eap_method_settings_c * const internal_settings);
+
+	eap_status_e set_configuration(const eap_method_settings_c * const internal_settings);
+
+	eap_status_e copy_configuration(const eap_method_settings_c * const internal_settings);
+
+	eap_status_e delete_configuration(const eap_method_settings_c * const internal_settings);
+
+	eap_status_e set_index(const eap_method_settings_c * const internal_settings);
+
+	eap_status_e get_type_info(const eap_method_settings_c * const internal_settings);
+
+
+
+	// ----------------------------------------------------------------------
+};
+
+#endif //#if !defined(_EAP_AM_PLUGIN_SYMBIAN_H_)
+
+
+//--------------------------------------------------
+// End
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/include/eap_am_stack_symbian.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,186 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 27 %
+*/
+
+#ifndef EAP_AM_STACK_SYMBIAN_H_
+#define EAP_AM_STACK_SYMBIAN_H_
+
+#include "eap_am_stack.h"
+#include "abs_eap_am_stack.h"
+#include "abs_eap_am_tools.h"
+#include "eap_automatic_variable.h"
+#include <e32base.h>
+#include <e32std.h>
+#include <d32dbms.h>
+#include "eap_config.h"
+#include "eap_file_config.h"
+#include "eap_am_file_input_symbian.h"
+#include "eap_type_selection.h"
+#include "eapol_key_types.h"
+
+#include "eapol_wlan_database_reference.h"
+#include <EapTypePlugin.h>
+#include "eap_base_type.h"
+#include "abs_eap_configuration_if.h"
+#include "eap_tlv_header.h"
+
+class EAP_EXPORT eap_am_stack_symbian_c
+: public CActive
+, public eap_am_stack_c
+, public abs_eap_configuration_if_c
+{
+public:
+   
+    EAP_FUNC_IMPORT eap_am_stack_symbian_c(class abs_eap_am_tools_c * tools, bool is_client_when_true);
+    
+    EAP_FUNC_IMPORT virtual ~eap_am_stack_symbian_c();
+  
+    EAP_FUNC_IMPORT bool get_is_valid();
+
+    EAP_FUNC_IMPORT eap_status_e set_partner(
+        abs_eap_am_stack_c * const partner
+        , abs_eap_configuration_if_c * const configuration_if
+        );
+
+    // This is documented in abs_eap_stack_interface_c::configure().
+    EAP_FUNC_IMPORT eap_status_e configure(
+		const eap_variable_data_c * const client_configuration);
+
+    // This is documented in abs_eap_stack_interface_c::shutdown().
+    EAP_FUNC_IMPORT eap_status_e shutdown();
+
+    EAP_FUNC_IMPORT eap_status_e read_configure(
+        const eap_configuration_field_c * const field,
+        eap_variable_data_c * const data);
+
+    EAP_FUNC_IMPORT eap_status_e set_timer(
+        abs_eap_base_timer_c * const p_initializer, 
+        const u32_t p_id, 
+        void * const p_data,
+        const u32_t p_time_ms);
+
+    EAP_FUNC_IMPORT eap_status_e cancel_timer(
+        abs_eap_base_timer_c * const p_initializer, 
+        const u32_t p_id);
+
+    EAP_FUNC_IMPORT eap_status_e check_is_valid_eap_type(
+        const eap_type_value_e eap_type);
+
+    EAP_FUNC_IMPORT eap_status_e get_eap_type_list(
+        eap_array_c<eap_type_value_e> * const eap_type_list);
+
+    EAP_FUNC_IMPORT eap_status_e load_module(
+        const eap_type_value_e type,
+        const eap_type_value_e tunneling_type,
+        abs_eap_base_type_c * const partner,
+        eap_base_type_c ** const eap_type,
+        const bool is_client_when_true,
+        const eap_am_network_id_c * const receive_network_id);
+
+    EAP_FUNC_IMPORT eap_status_e save_simple_config_session(
+        const simple_config_state_e state,
+        EAP_TEMPLATE_CONST eap_array_c<simple_config_credential_c> * const credential_array,
+        const eap_variable_data_c * const new_password,
+        const simple_config_Device_Password_ID_e Device_Password_ID,
+        const simple_config_payloads_c * const other_configuration);
+    
+    EAP_FUNC_IMPORT eap_status_e set_eap_database_reference_values(
+            const eap_variable_data_c * const reference);
+
+	EAP_FUNC_IMPORT eap_status_e get_802_11_authentication_mode(
+		const eap_am_network_id_c * const receive_network_id,
+		const eapol_key_authentication_type_e authentication_type);
+
+private:
+    
+    /// Function reads one configuration value from database.
+    void read_configureL(
+        const TDesC& aDbName,
+        const TDesC& aTableName,
+        eap_config_string field,
+        const u32_t /*field_length*/,
+        eap_variable_data_c * const data);
+
+    /// Control function of this active-object.
+    void RunL();
+
+    /// Cancel function for active-object.
+    void DoCancel();
+
+    /// RunError function for active-object.
+	TInt RunError(TInt aError);
+
+
+	void SetToTopPriorityL(const eap_type_value_e aEapType);
+
+	eap_status_e reset_eap_configuration();
+
+	void ReadEAPSettingsL();
+
+	eap_status_e reset_eap_plugins();
+
+	TInt get_current_eap_index();
+
+	void set_current_eap_index(const TInt ind);
+
+    
+    abs_eap_am_tools_c * const iTools;
+
+    TBool iIsValid;
+
+    const TBool iIsClient;
+
+    abs_eap_am_stack_c* iPartner;
+
+    /// Handle of database session.
+    RDbs iSession;
+
+    /// Handle of database file.
+    RFs iFs;
+    
+	eap_file_config_c m_client_config;
+
+    eap_file_config_c * iFileconfig;
+    
+    RPointerArray<CEapTypePlugin> m_plugin_if_array;
+
+
+	eap_array_c<eap_type_value_e> iEnabledEapMethodsArray;
+	eap_array_c<eap_type_value_e> iDisabledEapMethodsArray;
+
+
+    /// Array which corresponds with m_plugin_if_array and indicates the types of the loaded EAP types. 
+    eap_array_c<eap_type_value_e> m_eap_type_array;
+
+	abs_eap_configuration_if_c* iConfigurationIf;
+
+	TIndexType iIndexType;
+
+	TUint iIndex;
+
+	TInt iCurrentEapIndex;
+
+	/// WLAN authentication type.
+	eapol_key_authentication_type_e m_selected_eapol_key_authentication_type;
+};
+
+#endif /* EAP_AM_STACK_SYMBIAN_H_ */
+
+// end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/include/eap_loaded_type.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,88 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  This class stores the information on loaded EAP-type plugin.
+*
+*/
+
+/*
+* %version: 5 %
+*/
+
+#if !defined(_EAP_LOADED_TYPE_H_)
+#define _EAP_LOADED_TYPE_H_
+
+#include "eap_tools.h"
+#include "eap_status.h"
+#include "eap_am_export.h"
+#include "eap_expanded_type.h"
+#include "eap_array.h"
+#include "eap_database_reference_if.h"
+#include "eap_am_plugin.h"
+#include "eap_process_tlv_message_data.h"
+#include <EapTypePlugin.h>
+
+/** @file */
+
+/// This class stores the information on loaded EAP-type plugin.
+class EAP_EXPORT eap_loaded_type_c
+{
+
+private:
+
+	// ----------------------------------------------------------------------
+
+	abs_eap_am_tools_c * const m_am_tools;
+
+	CEapTypePlugin * const m_type_plugin;
+
+	const eap_type_value_e m_eap_type;
+
+	const u32_t m_index_type;
+
+	const u32_t m_index;
+
+	// ----------------------------------------------------------------------
+
+public:
+
+	// ----------------------------------------------------------------------
+
+	// Destructor will delete type_plugin. So pass only object allocated from heap.
+	eap_loaded_type_c(
+		abs_eap_am_tools_c * const tools,
+		CEapTypePlugin * const type_plugin,
+		const eap_type_value_e eap_type,
+		const u32_t index_type,
+		const u32_t index);
+
+	virtual ~eap_loaded_type_c();
+
+	i32_t compare(const eap_loaded_type_c * const right);
+
+	CEapTypePlugin * get_type_plugin();
+
+	eap_type_value_e get_eap_type() const;
+
+	u32_t get_index_type() const;
+
+	u32_t get_index() const;
+
+	// ----------------------------------------------------------------------
+};
+
+#endif //#if !defined(_EAP_LOADED_TYPE_H_)
+
+
+//--------------------------------------------------
+// End
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/src/EapCoreIf.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,219 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 17 %
+*/
+
+
+#include "eap_am_tools.h"
+#include "eap_am_export.h"
+#include "EapCoreIf.h"
+#include "eap_automatic_variable.h"
+#include "eap_config.h"
+#include "eap_file_config.h"
+#include "abs_eap_am_mutex.h"
+#include "EapServerClientDef.h"
+
+/** @file */
+
+//--------------------------------------------------
+
+/**
+ * This is the timer ID used with abs_eap_am_tools_c::set_timer() and abs_eap_am_tools_c::cancel_timer().
+ */
+enum eap_am_core_message_if_timer_id
+{
+    EAP_AM_CORE_MESSAGE_IF_TIMER_PROCESS_DATA_ID,
+    EAP_AM_CORE_MESSAGE_IF_TIMER_SEND_DATA_ID,
+};
+
+//--------------------------------------------------
+
+CEapCoreIf::CEapCoreIf(
+    abs_eap_am_tools_c * const tools,
+    eap_am_message_if_c * const server,
+    AbsEapSendInterface * client)
+    : m_am_tools(tools)
+    , m_client_if(client)
+    , m_server_if(server)
+    , m_fileconfig(0)
+    , m_use_asyncronous_test(false)
+    , iIsValid(false)
+{
+	if (m_am_tools == 0 || m_am_tools->get_is_valid() == false)
+	{
+		return;
+	}
+
+	if (m_client_if == 0)
+	{
+		return;
+	}
+
+	if (m_server_if == 0 || m_server_if->get_is_valid() == false)
+	{
+		return;
+	}
+
+	iIsValid = true;
+}
+
+//--------------------------------------------------
+
+CEapCoreIf::~CEapCoreIf()
+{
+	if (m_server_if != 0)
+	{
+		m_server_if->shutdown();
+	}
+    delete m_server_if;
+    m_server_if = 0;
+
+    delete m_fileconfig;
+    m_fileconfig = 0;
+}
+
+//--------------------------------------------------
+
+bool CEapCoreIf::get_is_valid()
+{
+    return iIsValid;
+}
+
+//--------------------------------------------------
+
+eap_status_e CEapCoreIf::configure(
+	const eap_variable_data_c * const client_configuration)
+{
+	return m_server_if->configure(client_configuration);
+}
+
+// ----------------------------------------------------------------
+
+eap_status_e CEapCoreIf::send_data(const void * const data, const u32_t length)
+{
+	return m_client_if->SendData(data, length, EEapCoreSendData);
+}
+
+// ----------------------------------------------------------------
+
+eap_status_e CEapCoreIf::process_data(const void * const data, const u32_t length)
+{
+	return m_server_if->process_data(data, length);
+}
+
+//--------------------------------------------------
+
+//
+eap_status_e CEapCoreIf::shutdown()
+{
+    EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+    EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+    EAP_TRACE_DEBUG(
+        m_am_tools, 
+        EAP_TRACE_FLAGS_MESSAGE_DATA, 
+        (EAPL("CEapCoreIf::shutdown(): this = 0x%08x.\n"),
+        this));
+
+    eap_status_e status(eap_status_process_general_error);
+
+    if (m_server_if != 0)
+    {
+        m_server_if->shutdown();
+    }
+
+    EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+    return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+CEapCoreIf* CEapCoreIf::new_CEapCoreIf(
+    abs_eap_am_tools_c * const tools,
+    const bool is_client_when_true,
+    const u32_t MTU,
+    AbsEapSendInterface * client)
+{
+	eap_am_message_if_c *server =  eap_am_message_if_c::new_eap_am_server_message_if_c(
+		tools,
+		is_client_when_true,
+		MTU);
+
+	eap_automatic_variable_c<eap_am_message_if_c> automatic_server(
+		tools,
+		server);
+
+	if (server == 0
+		|| server->get_is_valid() == false)
+	{
+		// ERROR.
+		if (server != 0)
+		{
+			EAP_TRACE_DEBUG(
+				tools,
+				TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+				(EAPL("calls: CEapCoreIf(): server->shutdown(): %s.\n"),
+				(is_client_when_true == true) ? "client": "server"));
+
+			server->shutdown();
+		}
+
+		return 0;
+	}
+
+	CEapCoreIf * core_if = new CEapCoreIf(
+		tools,
+		server,
+		client);
+
+	eap_automatic_variable_c<CEapCoreIf> automatic_core_if(
+		tools,
+		core_if);
+
+	if (core_if == 0
+		|| core_if->get_is_valid() == false)
+	{
+		// ERROR.
+		if (core_if != 0)
+		{
+			EAP_TRACE_DEBUG(
+				tools,
+				TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+				(EAPL("calls: CEapCoreIf(): core_if->shutdown(): %s.\n"),
+				(is_client_when_true == true) ? "client": "server"));
+
+			// automatic_core_if will delete core_if and core_if will delete server too.
+			automatic_server.do_not_free_variable();
+			core_if->shutdown();
+		}
+
+		return 0;
+	}
+
+	server->set_partner(core_if);
+
+	automatic_server.do_not_free_variable();
+	automatic_core_if.do_not_free_variable();
+
+	return core_if;
+}
+
+//--------------------------------------------------
+// End
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/src/EapPluginIf.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,321 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP-plugin interface.
+*
+*/
+
+/*
+* %version: 17 %
+*/
+
+#include "eap_am_tools.h"
+#include "eap_am_export.h"
+#include "EapPluginIf.h"
+#include "eap_automatic_variable.h"
+#include "eap_config.h"
+#include "eap_file_config.h"
+#include "abs_eap_am_mutex.h"
+#include "eap_am_plugin.h"
+#include "eap_am_plugin_symbian.h"
+#include "eap_plugin_server_message_if.h"
+
+/** @file */
+
+//--------------------------------------------------
+
+CEapPluginIf::CEapPluginIf(
+    abs_eap_am_tools_c * const tools,
+    eap_am_message_if_c * const server)
+    : m_am_tools(tools)
+    , m_client_if(0)
+    , m_server_if(server)
+    , m_use_asyncronous_test(false)
+		, m_is_valid(false)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("CEapPluginIf::CEapPluginIf()\n")));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: CEapPluginIf::CEapPluginIf()");
+
+	if (m_am_tools == 0 || m_am_tools->get_is_valid() == false)
+	{
+		return;
+	}
+
+	if (m_server_if == 0 || m_server_if->get_is_valid() == false)
+	{
+		return;
+	}
+
+	m_is_valid = true;
+
+
+}
+
+//--------------------------------------------------
+
+CEapPluginIf::~CEapPluginIf()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("CEapPluginIf::~CEapPluginIf()\n")));
+
+	if (m_server_if != 0)
+	{
+		m_server_if->shutdown();
+	}
+    delete m_server_if;
+    m_server_if = 0;
+}
+
+//--------------------------------------------------
+
+bool CEapPluginIf::get_is_valid()
+{
+    return m_is_valid;
+}
+
+//--------------------------------------------------
+
+eap_status_e CEapPluginIf::configure(
+	const eap_variable_data_c * const client_configuration)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("CEapPluginIf::configure()\n")));
+
+	return m_server_if->configure(client_configuration);
+}
+
+//--------------------------------------------------
+
+void CEapPluginIf::set_partner(AbsEapSendInterface * const client)
+{
+    m_client_if = client;
+}
+
+// ----------------------------------------------------------------
+
+eap_status_e CEapPluginIf::send_data(const void * const data, const u32_t length)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("CEapPluginIf::send_data()\n")));
+
+	return EAP_STATUS_RETURN(m_am_tools, m_client_if->SendData(data, length, EEapPluginSendData));
+}
+
+// ----------------------------------------------------------------
+
+eap_status_e CEapPluginIf::process_data(const void * const data, const u32_t length)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("CEapPluginIf::process_data()\n")));
+
+	return EAP_STATUS_RETURN(m_am_tools, m_server_if->process_data(data, length));
+}
+
+//--------------------------------------------------
+
+//
+eap_status_e CEapPluginIf::shutdown()
+{
+    EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+    EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+    EAP_TRACE_DEBUG(
+        m_am_tools, 
+        EAP_TRACE_FLAGS_MESSAGE_DATA, 
+        (EAPL("CEapPluginIf::shutdown(): this = 0x%08x.\n"),
+        this));
+
+    eap_status_e status(eap_status_ok);
+
+    if (m_server_if != 0)
+    {
+        status = m_server_if->shutdown();
+    }
+
+    EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+    return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_am_plugin_c * new_eap_am_plugin_c(
+	abs_eap_am_tools_c * const tools,
+	abs_eap_am_plugin_c * const partner)
+{
+	eap_am_plugin_c * const plugin = new eap_am_plugin_symbian_c(tools, partner);
+
+	eap_automatic_variable_c<eap_am_plugin_c> automatic_plugin(
+		tools,
+		plugin);
+
+	if (plugin == 0
+	|| plugin->get_is_valid() == false)
+	{
+		// ERROR.
+		if (plugin != 0)
+		{
+			EAP_TRACE_DEBUG(
+			tools,
+			TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+			(EAPL("calls: new_eap_am_plugin_c(): plugin->shutdown()\n")));
+
+			plugin->shutdown();
+		}
+		return 0;
+	}
+
+	eap_status_e status = plugin->configure();
+	if (status != eap_status_ok)
+	{
+		plugin->shutdown();
+		return 0;
+	}
+
+	automatic_plugin.do_not_free_variable();
+
+	return plugin;
+}
+
+//--------------------------------------------------
+
+eap_am_message_if_c * eap_am_message_if_c::new_eap_plugin_server_message_if_c(
+	abs_eap_am_tools_c * const tools)
+{
+	EAP_TRACE_DEBUG(
+		tools,
+		TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+		(EAPL("eap_am_message_if_c::new_eap_plugin_server_message_if_c()\n")));
+
+	EAP_TRACE_RETURN_STRING(tools, "returns: eap_am_message_if_c::new_eap_plugin_server_message_if_c()");
+
+	eap_am_message_if_c * const server = new eap_plugin_server_message_if_c(
+		tools);
+
+	eap_automatic_variable_c<eap_am_message_if_c> automatic_server(
+		tools,
+		server);
+
+	if (server == 0
+	|| server->get_is_valid() == false)
+	{
+		// ERROR.
+		if (server != 0)
+		{
+			EAP_TRACE_DEBUG(
+			tools,
+			TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+			(EAPL("calls: CEapPluginIf::new_CEapPluginIf(): server->shutdown()\n")));
+
+			server->shutdown();
+		}
+		return 0;
+	}
+
+	eap_status_e status = server->configure(0);
+	if (status != eap_status_ok)
+	{
+		server->shutdown();
+		return 0;
+	}
+
+	automatic_server.do_not_free_variable();
+
+	return server;
+}
+
+//--------------------------------------------------
+
+CEapPluginIf* CEapPluginIf::new_CEapPluginIf(
+    abs_eap_am_tools_c * const tools)
+{
+	EAP_TRACE_DEBUG(
+		tools,
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("CEapPluginIf::new_CEapPluginIf()\n")));
+
+	EAP_TRACE_RETURN_STRING(tools, "returns: CEapPluginIf::new_CEapPluginIf()");
+
+	eap_am_message_if_c * const server = eap_am_message_if_c::new_eap_plugin_server_message_if_c(
+		tools);
+
+	eap_automatic_variable_c<eap_am_message_if_c> automatic_server(
+		tools,
+		server);
+
+	if (server == 0
+	|| server->get_is_valid() == false)
+	{
+		// ERROR.
+		if (server != 0)
+		{
+			EAP_TRACE_DEBUG(
+				tools,
+				TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+				(EAPL("calls: CEapPluginIf::new_CEapPluginIf(): server->shutdown()\n")));
+
+			server->shutdown();
+		}
+
+		return 0;
+	}
+
+	CEapPluginIf * const plugin_if = new CEapPluginIf(
+		tools,
+		server);
+
+	eap_automatic_variable_c<CEapPluginIf> automatic_plugin_if(
+		tools,
+		plugin_if);
+
+	if (plugin_if == 0
+	|| plugin_if->get_is_valid() == false)
+	{
+		// ERROR.
+		if (plugin_if != 0)
+		{
+			EAP_TRACE_DEBUG(
+			tools,
+			TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+			(EAPL("calls: CEapPluginIf::new_CEapPluginIf(): plugin_if->shutdown()\n")));
+
+			// automatic_plugin_if will delete plugin_if and plugin_if will delete server too.
+			automatic_server.do_not_free_variable();
+			plugin_if->shutdown();
+		}
+
+		return 0;
+	}
+
+	server->set_partner(plugin_if);
+
+	automatic_server.do_not_free_variable();
+	automatic_plugin_if.do_not_free_variable();
+
+	return plugin_if;
+}
+
+//--------------------------------------------------
+// End
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/src/EapScheduler.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,192 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  scheduler of EAP-server.
+*
+*/
+
+/*
+* %version: 15 %
+*/
+
+#include "EapScheduler.h"
+#include "EapTraceSymbian.h"
+#include "EapServer.h"
+
+void CEapScheduler::TServerStart::SignalL()
+//
+// Signal the owning thread that the server has started successfully
+// This may itself fail
+//
+    {
+    EAP_TRACE_DEBUG_SYMBIAN((_L("TServerStart::SignalL()")));
+    TBuf<KMaxServerExe> ServerName;
+    TBuf<KMaxServerExe> ServerExe;
+    
+    //EapClientIf * aClientIf = new (ELeave)EapClientIf();
+    
+    GetServerNameAndExe(&ServerName, &ServerExe);
+    TFindThread aProcess(ServerName);
+    TFullName result;
+
+   while(aProcess.Next(result) == KErrNone) 
+      {
+      RThread starter;
+      User::LeaveIfError(starter.Open(aProcess));
+      starter.RequestComplete(iStatus,KErrNone);
+      starter.Close();
+      }
+    EAP_TRACE_DEBUG_SYMBIAN((_L("TServerStart::SignalL(): end")));           
+    }
+
+/*
+    class CEapScheduler
+*/
+
+EAP_FUNC_EXPORT CEapScheduler* CEapScheduler::NewL()
+    {
+    EAP_TRACE_DEBUG_SYMBIAN((_L("CEapScheduler::NewL()")));
+
+    CEapScheduler* self = new(ELeave)CEapScheduler();
+    CleanupStack::PushL(self);
+
+    TRequestStatus started;
+    TServerStart start(started);
+
+    self->ConstructL(start);
+
+    CleanupStack::Pop(self);
+    return self;
+
+    }
+
+EAP_FUNC_EXPORT TInt CEapScheduler::LaunchFromClient(const TBuf<KMaxServerExe> Server)
+    {
+    TRequestStatus started;
+    TServerStart start(started);
+    
+    EAP_TRACE_DEBUG_SYMBIAN((_L("TServerStart::LaunchFromClient()")));           
+
+    //
+    // EPOC is easy, we just create a new server process. Simultaneous
+    // launching of two such processes should be detected when the
+    // second one attempts to create the server object, failing with
+    // KErrAlreadyExists.
+    //
+    RProcess server;
+    TInt r=server.Create(Server,KNullDesC);
+
+    if (r!=KErrNone)
+        {
+        EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: TServerStart::LaunchFromClient(): server create error")));
+        return r;
+        }
+    EAP_TRACE_DEBUG_SYMBIAN((_L("TServerStart::LaunchFromClient(): server created")));
+
+    EAP_TRACE_DEBUG_SYMBIAN((_L("TServerStart::LaunchFromClient(): server.SetPriority(EPriorityHigh)")));
+	server.SetPriority(EPriorityHigh);
+
+    TRequestStatus stat;
+    server.Rendezvous( stat );
+    EAP_TRACE_DEBUG_SYMBIAN((_L("TServerStart::LaunchFromClient(): server.Rendezvous(), stat.Int()=%d"),
+		stat.Int()));
+    if ( stat!=KRequestPending )
+        {
+	    EAP_TRACE_DEBUG_SYMBIAN((_L("ERROR: TServerStart::LaunchFromClient(): server.Kill()")));
+        server.Kill(0);     // abort startup
+        }
+    else
+        {
+	    EAP_TRACE_DEBUG_SYMBIAN((_L("TServerStart::LaunchFromClient(): server.Resume(), OK")));
+        server.Resume();    // logon OK - start the server
+        }
+        
+    
+    User::WaitForRequest(stat);
+    EAP_TRACE_DEBUG_SYMBIAN((_L("TServerStart::LaunchFromClient(): User::WaitForRequest(stat), stat.Int()=%d"),
+		stat.Int()));
+
+    r = ( server.ExitType()==EExitPanic ) ? KErrGeneral : stat.Int();
+
+    server.Close();
+
+    return r;
+    }
+
+EAP_FUNC_EXPORT TInt CEapScheduler::ThreadStart(TServerStart& aStart)
+    {
+    // get cleanup stack
+    EAP_TRACE_DEBUG_SYMBIAN((_L("CEapScheduler::ThreadStart()")));           
+
+    __UHEAP_MARK;
+
+    CTrapCleanup* cleanup=CTrapCleanup::New();
+
+    // initialize all up to and including starting scheduler
+    TInt err = KErrNoMemory;
+    if (cleanup)
+		{
+		TRAP(err, ConstructL(aStart));
+		delete cleanup;
+		}
+
+    __UHEAP_MARKEND;
+
+    EAP_TRACE_DEBUG_SYMBIAN((_L("CEapScheduler::ThreadStart end err=%d"), err));           
+    return err;
+    }
+
+void CEapScheduler::ConstructL(TServerStart& aStart)
+    {
+    EAP_TRACE_DEBUG_SYMBIAN((_L("CEapScheduler::ConstructL()")));           
+
+    // construct active scheduler
+    CEapScheduler* self=new(ELeave) CEapScheduler;
+    CleanupStack::PushL(self);
+    CActiveScheduler::Install(self);
+
+    // construct server
+    self->iServer=new(ELeave) CEapServer;
+    self->iServer->ConstructL();
+
+    // Let the client know we've started OK
+    aStart.SignalL();
+
+    EAP_TRACE_DEBUG_SYMBIAN((_L("CEapScheduler::ThreadStart Rendezvous")));           
+    RProcess::Rendezvous(KErrNone);
+    EAP_TRACE_DEBUG_SYMBIAN((_L("CEapScheduler::ThreadStart Rendezvous end")));           
+
+    EAP_TRACE_DEBUG_SYMBIAN((_L("CEapScheduler::ConstructL(): CActiveScheduler::Start() starts")));
+    CActiveScheduler::Start();
+    EAP_TRACE_DEBUG_SYMBIAN((_L("CEapScheduler::ConstructL(): CActiveScheduler::Start() ends")));
+
+    // Destroy the scheduler
+    CleanupStack::PopAndDestroy(self);
+    EAP_TRACE_DEBUG_SYMBIAN((_L("CEapScheduler::ConstructL(): end")));
+    }
+
+CEapScheduler::~CEapScheduler()
+    {
+    EAP_TRACE_DEBUG_SYMBIAN((_L("CEapScheduler::~CEapScheduler()")));
+
+    delete iServer;
+    }
+
+void CEapScheduler::Error(TInt aError) const
+    {
+    EAP_TRACE_DEBUG_SYMBIAN((_L("CEapScheduler::Error(): aError=%d"),
+		aError));
+
+    __DEBUGGER();
+//    PanicServer(EErrorFromNonClientObject);
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/src/EapServer.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,533 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  scheduler of EAP-server.
+*
+*/
+
+/*
+* %version: 30 %
+*/
+
+#include "EapServer.h"
+#include "EapTraceSymbian.h"
+#include <ecom.h>
+#include "eap_automatic_variable.h"
+
+/*
+    class CEapServer
+*/
+
+//----------------------------------------------------------------------------
+
+CEapServer::CEapServer()
+    : CServer2(0, EGlobalSharableSessions) // //ESharableSessions
+    {
+    EAP_TRACE_DEBUG_SYMBIAN((_L("CEapServer::CEapServer(): this=0x%08x"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapServer::CEapServer()"));
+    }
+
+//----------------------------------------------------------------------------
+
+void CEapServer::ConstructL()
+    {
+    EAP_TRACE_DEBUG_SYMBIAN((_L("CEapServer::ConstructL(): start")));
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+    iIsValid = EFalse;
+    iTools = abs_eap_am_tools_c::new_abs_eap_am_tools_c();
+
+    // Check if creation went ok and the the iIsValid variable
+    if (iTools == 0
+		|| iTools->get_is_valid() == false)
+	{
+		if (iTools != 0)
+		{
+			iTools->am_cancel_all_timers();
+		}
+		abs_eap_am_tools_c::delete_abs_eap_am_tools_c(iTools);
+		User::Leave(KErrNoMemory);
+	}
+	else
+	{
+		iIsValid = iTools->get_is_valid();
+	}
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapServer::ConstructL()");
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	{
+		const u8_t DEFAULT_PREFIX[] = "EAP-SERVER";
+		eap_variable_data_c tmp_prefix(iTools);
+
+		if (tmp_prefix.get_is_valid() == false)
+		{
+			iTools->am_cancel_all_timers();
+			abs_eap_am_tools_c::delete_abs_eap_am_tools_c(iTools);
+			User::Leave(KErrNoMemory);
+		}
+
+		eap_status_e status = tmp_prefix.set_copy_of_buffer(DEFAULT_PREFIX, sizeof(DEFAULT_PREFIX)-1ul);;
+		if (status != eap_status_ok)
+		{
+			iTools->am_cancel_all_timers();
+			abs_eap_am_tools_c::delete_abs_eap_am_tools_c(iTools);
+			User::Leave(KErrNoMemory);
+		}
+
+		status = tmp_prefix.add_end_null();
+		if (status != eap_status_ok)
+		{
+			iTools->am_cancel_all_timers();
+			abs_eap_am_tools_c::delete_abs_eap_am_tools_c(iTools);
+			User::Leave(KErrNoMemory);
+		}
+
+		status = iTools->set_trace_prefix(&tmp_prefix);
+		if (status != eap_status_ok)
+		{
+			iTools->am_cancel_all_timers();
+			abs_eap_am_tools_c::delete_abs_eap_am_tools_c(iTools);
+			User::Leave(KErrNoMemory);
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	{
+		TInt error;
+		RFs aFileServerSession;
+
+		// Open file server session
+		EAP_TRACE_DEBUG(
+			iTools, 
+			TRACE_FLAGS_DEFAULT, 
+			(EAPL("CEapServer::ConstructL(): - calls aFileServerSession.Connect()\n")));
+
+		error = aFileServerSession.Connect();
+
+		EAP_TRACE_DEBUG(
+			iTools, 
+			TRACE_FLAGS_DEFAULT, 
+			(EAPL("CEapServer::ConstructL(): - aFileServerSession.Connect(), error=%d\n"),
+			error));
+
+		User::LeaveIfError(error);
+
+		// Create the private path - it is not automatically created by Symbian OS.
+		EAP_TRACE_DEBUG(
+			iTools, 
+			TRACE_FLAGS_DEFAULT, 
+			(EAPL("CEapServer::ConstructL(): - calls aFileServerSession.CreatePrivatePath(%d)\n"),
+			RFs::GetSystemDrive()));
+
+		error = aFileServerSession.CreatePrivatePath(RFs::GetSystemDrive());
+
+		EAP_TRACE_DEBUG(
+			iTools, 
+			TRACE_FLAGS_DEFAULT, 
+			(EAPL("CEapServer::ConstructL(): - aFileServerSession.CreatePrivatePath(%d), error=%d\n"),
+			RFs::GetSystemDrive(),
+			error));
+
+		User::LeaveIfError(error);
+
+		// Set the session path to the private directory
+		EAP_TRACE_DEBUG(
+			iTools, 
+			TRACE_FLAGS_DEFAULT, 
+			(EAPL("CEapServer::ConstructL(): - calls aFileServerSession.SetSessionToPrivate(%d)\n"),
+			RFs::GetSystemDrive()));
+
+		error = aFileServerSession.SetSessionToPrivate(RFs::GetSystemDrive());
+
+		EAP_TRACE_DEBUG(
+			iTools, 
+			TRACE_FLAGS_DEFAULT, 
+			(EAPL("CEapServer::ConstructL(): - aFileServerSession.SetSessionToPrivate(%d), error=%d\n"),
+			RFs::GetSystemDrive(),
+			error));
+
+		User::LeaveIfError(error);
+
+		// Close the session with the file server.
+		aFileServerSession.Close();
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+    {
+		// construct shutdown timer
+		iShutdown = new(ELeave) CEapDelayedShutdown(iTools, this);
+		iShutdown->ConstructL();
+		// identify ourselves and open for service
+		TBuf<KMaxServerExe> ServerName;
+		TBuf<KMaxServerExe> ServerExe;
+    
+		GetServerNameAndExe(&ServerName, &ServerExe);
+
+		StartL(ServerName);
+
+		// Initiates shut down timer. Timer will close server unless we get client connections.
+		iShutdown->Start();
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+    {
+		// construct backup and restore observer
+		iBackupRestore = new(ELeave) CEapserverBackup(this);
+		iBackupRestore->ConstructL();
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+   }
+
+//----------------------------------------------------------------------------
+
+CEapServer* CEapServer::NewL()
+    {
+    EAP_TRACE_DEBUG_SYMBIAN((_L("CEapServer::NewL(): starts")));
+
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapServer::NewL()"));
+
+    CEapServer* self = new(ELeave)CEapServer();
+    CleanupStack::PushL(self);
+
+    self->ConstructL();
+
+    CleanupStack::Pop(self);
+
+    return self;
+    }
+
+//----------------------------------------------------------------------------
+
+CEapServer::~CEapServer()
+	{
+	EAP_TRACE_DEBUG(
+		iTools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("CEapServer::~CEapServer(): this=0x%08x\n"),
+		this));
+
+	// Do not use iTools, because it will be destroyed before return.
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapServer::~CEapServer()"));
+
+	delete iShutdown;
+	delete iBackupRestore;
+	
+	if (iTools) 
+	{
+		iTools->am_cancel_all_timers();
+		abs_eap_am_tools_c::delete_abs_eap_am_tools_c(iTools);
+	}
+
+	REComSession::FinalClose();
+	}
+
+//----------------------------------------------------------------------------
+
+// from CServer
+
+CSession2* CEapServer::NewSessionL(const TVersion& /* aVersion */, const RMessage2 &aMessage) const
+    {
+	EAP_TRACE_DEBUG(
+		iTools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("CEapServer::NewSessionL(): starts\n")));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapServer::NewSessionL()");
+
+    CEapSession* session = new(ELeave) CEapSession();
+    CleanupStack::PushL(session);
+
+	EAP_TRACE_DEBUG(
+		iTools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("CEapServer::NewSessionL(): session=0x%08x\n"),
+		session));
+
+    EAP_TRACE_DEBUG(
+		iTools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("CEapServer::NewSessionL(): session->ConstructL() starts")));
+
+    session->ConstructL(*const_cast<CEapServer*>(this), iTools);
+
+    EAP_TRACE_DEBUG(
+		iTools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("CEapServer::NewSessionL(): session->ConstructL() ends")));
+
+    CleanupStack::Pop(session);
+
+    const_cast<CEapServer*>(this)->IncrementSessions();
+
+	return session;
+    }
+
+//----------------------------------------------------------------------------
+
+TInt CEapServer::RunError(TInt aErr)
+    /**
+       Handle leaves from ServiceL.
+
+       Any leave from a ServiceL() will land up here.
+    */
+    {
+	EAP_TRACE_DEBUG(
+		iTools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("CEapServer::RunError(), aErr=%d\n"),
+		aErr));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapServer::RunError()");
+
+    // if it's a bad descriptor, panic the client
+    if (aErr==KErrBadDescriptor)    // client had a bad descriptor
+        {
+        PanicClient(EBadDescriptor);
+        }
+
+    // anyway, complete the outstanding message
+    Message().Complete(aErr);
+    ReStart(); // really means just continue reading client requests
+    return KErrNone;
+    }
+
+//----------------------------------------------------------------------------
+
+/**
+   session count support
+*/
+void CEapServer::IncrementSessions()
+{   
+	iSessionCount++;
+
+	EAP_TRACE_DEBUG(
+		iTools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("CEapServer::IncrementSessions(): iSessionCount=%d\n"),
+		iSessionCount));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapServer::IncrementSessions()");
+
+	iShutdown->Cancel();
+}
+
+//----------------------------------------------------------------------------
+
+void CEapServer::DecrementSessions()
+{
+	EAP_TRACE_DEBUG(
+		iTools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("CEapServer::DecrementSessions(): iSessionCount=%d\n"),
+		iSessionCount));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapServer::DecrementSessions()");
+
+	iSessionCount--;
+	if (iSessionCount>0)
+		return;
+
+	iShutdown->Start();
+}
+
+//----------------------------------------------------------------------------
+
+void CEapServer::PanicClient(TInt aPanic) const
+{
+	EAP_TRACE_DEBUG(
+		iTools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("CEapServer::PanicClient(): aPanic=%d\n"),
+		aPanic));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapServer::PanicClient()");
+
+	// let's have a look before we panic the client
+	__DEBUGGER()
+	// ok, go for it
+
+	const TBufC<KMaxCategoryLength> aCategory; 
+	Message().Panic(aCategory, EBadRequest);
+}
+
+//----------------------------------------------------------------------------
+
+void CEapServer::StopL()
+{
+	EAP_TRACE_DEBUG(
+		iTools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("CEapServer::StopL()\n")));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapServer::StopL()");
+
+	for (iSessionIter.SetToFirst(); iSessionIter; iSessionIter++)
+	{
+		CSession2 * aSession = iSessionIter;
+
+		EAP_TRACE_DEBUG(
+			iTools, 
+			TRACE_FLAGS_DEFAULT, 
+			(EAPL("CEapServer::StopL(): aSession=0x%08x calls CancelReceive()\n"),
+			aSession));
+
+		if (dynamic_cast<CEapSession *>(aSession) != NULL)
+			{
+			dynamic_cast<CEapSession *>(aSession)->CancelReceive();
+			}
+	}
+}
+
+//----------------------------------------------------------------------------
+
+void CEapServer::BackupOrRestoreCompleteL()
+{
+	EAP_TRACE_DEBUG(
+		iTools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("ERROR: CEapServer::BackupOrRestoreCompleteL(): Do something\n")));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapServer::BackupOrRestoreCompleteL()");
+}
+
+//----------------------------------------------------------------------------
+
+void CEapServer::BackupOrRestoreStartingL()
+{
+	EAP_TRACE_DEBUG(
+		iTools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("WARNING: CEapServer::BackupOrRestoreStartingL(): Terminates EAP-SERVER. All sessions are also closed. All files are unlocked for backup or restore.\n")));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapServer::BackupOrRestoreStartingL()");
+
+    StopL();
+}
+
+//----------------------------------------------------------------------------
+
+/*
+    class CEapDelayedShutdown
+*/
+
+CEapDelayedShutdown::CEapDelayedShutdown(abs_eap_am_tools_c * const tools, CEapServer * const aServer)
+    : CActive(0)
+	, iTools(tools)
+	, iServer(aServer)
+    {
+    }
+
+//----------------------------------------------------------------------------
+
+void CEapDelayedShutdown::ConstructL()
+    {
+	EAP_TRACE_DEBUG(
+		iTools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("CEapDelayedShutdown::ConstructL()\n")));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapDelayedShutdown::ConstructL()");
+
+    CActiveScheduler::Add(this);
+    User::LeaveIfError(iTimer.CreateLocal());
+    }
+
+//----------------------------------------------------------------------------
+
+CEapDelayedShutdown::~CEapDelayedShutdown()
+    {
+	EAP_TRACE_DEBUG(
+		iTools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("CEapDelayedShutdown::~CEapDelayedShutdown()\n")));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapDelayedShutdown::~CEapDelayedShutdown()");
+
+    Cancel();
+    iTimer.Close();
+    }
+
+//----------------------------------------------------------------------------
+
+void CEapDelayedShutdown::Start()
+    {
+	EAP_TRACE_DEBUG(
+		iTools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("CEapDelayedShutdown::Start()\n")));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapDelayedShutdown::Start()");
+
+    iTimer.After(iStatus, KEapShutdownInterval);
+    SetActive();
+    }
+
+//----------------------------------------------------------------------------
+
+void CEapDelayedShutdown::DoCancel()
+{
+	EAP_TRACE_DEBUG(
+		iTools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("CEapDelayedShutdown::DoCancel()\n")));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapDelayedShutdown::DoCancel()");
+
+	iTimer.Cancel();
+}
+
+//----------------------------------------------------------------------------
+
+TInt CEapDelayedShutdown::RunError(TInt aError)
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapDelayedShutdown::RunError(): aError=%d, this=0x%08x\n"),
+		aError,
+		this));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapDelayedShutdown::RunError()");
+
+	iTimer.Cancel();
+
+	return aError;
+}
+
+//----------------------------------------------------------------------------
+
+void CEapDelayedShutdown::RunL()
+{
+	EAP_TRACE_DEBUG(
+		iTools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("CEapDelayedShutdown::RunL(), calls CActiveScheduler::Stop()\n")));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapDelayedShutdown::RunL()");
+
+	CActiveScheduler::Stop();
+}
+
+//----------------------------------------------------------------------------
+
+// end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/src/EapServerBackup.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,150 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  scheduler of EAP-server.
+*
+*/
+
+/*
+* %version: %
+*/
+
+/**
+ @file
+*/
+
+#include <e32std.h>
+#include "EapServerBackup.h"
+#include <connect/sbdefs.h>
+#include "EapTraceSymbian.h"
+
+using namespace conn;
+
+//----------------------------------------------------------------------------
+
+CEapserverBackup* CEapserverBackup::NewL(AbsEapserverBackup * const aBackupAndRestoreObserver)
+{
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapserverBackup::NewL()")));
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapserverBackup::NewL()\n"));
+
+	CEapserverBackup* self = new(ELeave) CEapserverBackup(aBackupAndRestoreObserver);
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+	return self;
+}
+
+//----------------------------------------------------------------------------
+
+CEapserverBackup::CEapserverBackup(AbsEapserverBackup * const aBackupAndRestoreObserver)
+:CActive(EPriorityStandard)
+{
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapserverBackup::CEapserverBackup()")));
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapserverBackup::CEapserverBackup()\n"));
+
+	iBackupAndRestoreObserver = aBackupAndRestoreObserver;
+}
+
+//----------------------------------------------------------------------------
+
+void CEapserverBackup::ConstructL()
+{
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapserverBackup::ConstructL()")));
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapserverBackup::ConstructL()\n"));
+
+	iBackupOrRestoreInProgress = EFalse;
+	User::LeaveIfError(iBackupProperty.Attach(KUidSystemCategory,KUidBackupRestoreKey));
+	CActiveScheduler::Add(this);
+	iBackupProperty.Subscribe(iStatus);
+	SetActive();
+}
+
+//----------------------------------------------------------------------------
+
+CEapserverBackup::~CEapserverBackup()
+{
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapserverBackup::~CEapserverBackup()")));
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapserverBackup::~CEapserverBackup()\n"));
+
+	Cancel();
+	iBackupProperty.Close();
+}
+
+//----------------------------------------------------------------------------
+
+void CEapserverBackup::DoCancel()
+{
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapserverBackup::DoCancel()")));
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapserverBackup::DoCancel()\n"));
+
+	iBackupProperty.Cancel();
+}
+
+//----------------------------------------------------------------------------
+
+TBool CEapserverBackup::IsBackupOrRestoreInProgress()
+{
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapserverBackup::IsBackupOrRestoreInProgress()")));
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapserverBackup::IsBackupOrRestoreInProgress()\n"));
+
+	return iBackupOrRestoreInProgress;
+}
+
+//----------------------------------------------------------------------------
+
+/**
+ *  @leave KErrNotSupported if unknown backup flag is found
+ */
+void CEapserverBackup::RunL()
+{
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapserverBackup::RunL()")));
+    EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapserverBackup::RunL()\n"));
+
+	iBackupProperty.Subscribe(iStatus);
+	SetActive();
+
+
+	TInt backupRestoreFlag;
+	iBackupProperty.Get(backupRestoreFlag);
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("CEapserverBackup::RunL(): backupRestoreFlag=0x%08x"),
+		backupRestoreFlag));
+
+	switch(backupRestoreFlag & KBURPartTypeMask)
+	{
+ 		case EBURUnset:
+ 		case EBURNormal:
+ 			if(iBackupOrRestoreInProgress) //only report complete if already reported starting
+ 			{
+				EAP_TRACE_DEBUG_SYMBIAN((_L("CEapserverBackup::RunL(): Backup or restore complete")));
+ 				iBackupAndRestoreObserver->BackupOrRestoreCompleteL();
+ 				iBackupOrRestoreInProgress=EFalse;
+ 			}
+ 			break;
+ 		case EBURBackupFull:
+ 		case EBURBackupPartial:
+		case EBURRestoreFull:
+		case EBURRestorePartial:
+			{
+				EAP_TRACE_DEBUG_SYMBIAN((_L("CEapserverBackup::RunL(): Backup or restore starts")));
+				iBackupOrRestoreInProgress=ETrue;
+				iBackupAndRestoreObserver->BackupOrRestoreStartingL();
+			}
+			break;
+		default:
+			User::Leave(KErrNotSupported); //unexpected value
+	};
+}
+
+//----------------------------------------------------------------------------
+// End of file.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/src/EapServerExe.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,31 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  scheduler of EAP-server.
+*
+*/
+
+/*
+* %version: 4 %
+*/
+
+#include "EapServer.h"
+
+GLDEF_C TInt E32Main()
+{
+	CEapScheduler::TServerStart start;
+	TInt r=CEapScheduler::ThreadStart(start);
+	return r;
+}
+
+// End of file.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/src/EapServerProcessHandler.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,916 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version:  39 %
+*/
+
+#include "EapServerProcessHandler.h"
+#include "EapTraceSymbian.h"
+#if defined(USE_FAST_EAP_TYPE)
+#include "PacStoreIf.h"
+#endif //#if defined(USE_FAST_EAP_TYPE)
+#include "EapServerStrings.h"
+#include "eap_automatic_variable.h"
+
+//----------------------------------------------------------------------------
+
+CEapServerProcessHandler::CEapServerProcessHandler()
+: CActive (0)
+, iClient(0)
+, iTools(0)
+, iEapCore(0)
+, iEapPlugin(0)
+, iEapSettings(0)
+#if defined (USE_WAPI_CORE)
+, iWapiCore(0)
+, iWapiSettings(0)
+#endif
+#if defined(USE_FAST_EAP_TYPE)
+, iPacStore(0)
+#endif //#if defined(USE_FAST_EAP_TYPE)
+, iEapMessageQueue(0)
+{
+
+}
+
+//----------------------------------------------------------------------------
+
+CEapServerProcessHandler::~CEapServerProcessHandler()
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapServerProcessHandler::~CEapServerProcessHandler(): this=0x%08x\n"),
+		this));
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapServerProcessHandler::~CEapServerProcessHandler()");
+
+	if(IsActive())
+	{
+		Cancel();
+	}
+
+	delete iEapCore;
+	iEapCore = 0;
+
+	delete iEapPlugin;
+	iEapPlugin = 0;
+
+	delete iEapSettings;
+	iEapSettings = 0;
+
+#if defined (USE_WAPI_CORE)
+    delete iWapiCore;
+    iWapiCore = 0;
+
+    delete iWapiSettings;
+    iWapiSettings = 0;
+#endif
+
+#if defined(USE_FAST_EAP_TYPE)
+    delete iPacStore;
+    iPacStore = 0;
+#endif //#if defined(USE_FAST_EAP_TYPE)
+
+    delete iEapMessageQueue;
+	iEapMessageQueue = 0;
+}
+    
+//----------------------------------------------------------------------------
+
+CEapServerProcessHandler* CEapServerProcessHandler::NewL()
+{
+	return new (ELeave) CEapServerProcessHandler();
+}
+
+//----------------------------------------------------------------------------
+
+void CEapServerProcessHandler::ConstructL(AbsEapProcessSendInterface* const client, abs_eap_am_tools_c * const tools)
+{
+	EAP_TRACE_DEBUG(
+		tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapServerProcessHandler::ConstructL(): this=0x%08x\n"),
+		this));
+	EAP_TRACE_RETURN_STRING(tools, "returns: CEapServerProcessHandler::ConstructL()");
+
+	iClient = client;
+	iTools = tools;
+
+	iEapMessageQueue = new(ELeave) EapMessageQueue(iTools);
+}
+
+//----------------------------------------------------------------------------
+
+eap_status_e CEapServerProcessHandler::SendData(const void * const data, const u32_t length, TEapRequests message)
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapServerProcessHandler::SendData(): this=0x%08x\n"),
+		this));
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapServerProcessHandler::SendData()");
+
+	eap_status_e status(eap_status_ok);
+
+	SaveMessage(message, data, length);
+
+	return status;
+}
+
+//----------------------------------------------------------------------------
+
+void CEapServerProcessHandler::SaveMessage(TEapRequests message, const void * const data, const TUint length)
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapServerProcessHandler::SaveMessage(): this=0x%08x, message=%d=%s\n"),
+		this,
+		message,
+		EapServerStrings::GetEapRequestsString(message)));
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapServerProcessHandler::SaveMessage()");
+
+	EAP_TRACE_DATA_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapServerProcessHandler::SaveMessage()"),
+		data,
+		length));
+
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapServerProcessHandler::SaveMessage(): calls iEapMessageQueue->AddMessage()\n")));
+
+	TInt error = iEapMessageQueue->AddMessage(message, data, length);
+
+	if (error != KErrNone)
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("ERROR: CEapServerProcessHandler::SaveMessage(): failed = %d\n"),
+			error));
+		return;
+	}
+
+	Activate();
+
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapServerProcessHandler::SaveMessage(): returns this=0x%08x, message=%d=%s\n"),
+		this,
+		message,
+		EapServerStrings::GetEapRequestsString(message)));
+}
+
+//----------------------------------------------------------------------------
+
+void CEapServerProcessHandler::Activate()
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapServerProcessHandler::Activate(): this=0x%08x\n"),
+		this));
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapServerProcessHandler::Activate()");
+
+	if(!IsActive())
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CEapServerProcessHandler::Activate(): calls User::RequestComplete()\n")));
+
+		TRequestStatus* status = &iStatus;
+		User::RequestComplete(status, KErrNone);
+
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CEapServerProcessHandler::Activate(): calls SetActive()\n")));
+
+		SetActive();
+	}
+	else
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CEapServerProcessHandler::Activate(): Already active.\n")));
+	}
+}
+
+//----------------------------------------------------------------------------
+
+void CEapServerProcessHandler::RunL()
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("=start=====================================================================\n")));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapServerProcessHandler::RunL()");
+
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapServerProcessHandler::RunL(): this=0x%08x\n"),
+		this));
+
+	EapMessageBuffer * const message = iEapMessageQueue->GetFirstMessage();
+
+	if (message != 0)
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CEapServerProcessHandler::RunL(): message->GetRequestType()=%d=%s, data=0x%08x, size=%d\n"),
+			message->GetRequestType(),
+			EapServerStrings::GetEapRequestsString(message->GetRequestType()),
+			message->GetData()->Ptr(),
+			message->GetData()->Size()));
+
+		eap_status_e status(eap_status_ok);
+
+		switch (message->GetRequestType())
+		{
+
+		case EEapCoreIfNew:
+
+			{
+				EAP_TRACE_DEBUG(
+					iTools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("CEapServerProcessHandler::RunL() EEapCoreIfNew\n")));
+
+				CEapCoreIf * tmpEapCore = CEapCoreIf::new_CEapCoreIf(
+					iTools,
+					ETrue,
+					0,
+					this);
+
+				if (tmpEapCore != 0)
+				{
+					CleanupStack::PushL(tmpEapCore);
+
+					if (tmpEapCore->get_is_valid() == false)
+					{
+						EAP_TRACE_DEBUG(
+							iTools,
+							TRACE_FLAGS_DEFAULT,
+							(EAPL("ERROR: CEapServerProcessHandler::RunL(): CEapCoreIf::new_CEapCoreIf() failed, this=0x%08x\n"),
+							this));
+
+						User::Leave(iTools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(iTools, eap_status_allocation_error)));
+					}
+
+					const void * const aData = reinterpret_cast<const void *>(message->GetData()->Ptr());
+					const TInt aLength = message->GetData()->Size();
+
+					const eap_variable_data_c client_configuration(
+						iTools,
+						aData,
+						aLength,
+						false,
+						false);
+					if (client_configuration.get_is_valid() == false)
+					{
+						EAP_TRACE_DEBUG(
+							iTools,
+							TRACE_FLAGS_DEFAULT,
+							(EAPL("ERROR: CEapServerProcessHandler::RunL(): eap_variable_data_c client_configuration() failed, this=0x%08x\n"),
+							this));
+
+						User::Leave(iTools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(iTools, eap_status_allocation_error)));
+					}
+
+					status = tmpEapCore->configure(&client_configuration);
+					if (status != eap_status_ok)
+					{
+						EAP_TRACE_DEBUG(
+							iTools,
+							TRACE_FLAGS_DEFAULT,
+							(EAPL("ERROR: CEapServerProcessHandler::RunL(): tmpEapCore->configure() failed, this=0x%08x, status=%d=%s\n"),
+							this,
+							status,
+							eap_status_string_c::get_status_string(status)));
+
+						User::Leave(iTools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(iTools, status)));
+					}
+
+					iEapCore = tmpEapCore;
+
+					CleanupStack::Pop(tmpEapCore);
+				}
+				else
+				{
+					EAP_TRACE_DEBUG(
+						iTools,
+						TRACE_FLAGS_DEFAULT,
+						(EAPL("ERROR: CEapServerProcessHandler::RunL(): EEapCoreIfNew, iEapCore is NULL\n")));
+				}
+			}
+
+			break;
+
+		case EEapPluginNew:
+
+			{
+				EAP_TRACE_DEBUG(
+					iTools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("CEapServerProcessHandler::RunL() EEapPluginNew\n")));
+
+				CEapPluginIf * tmpEapPlugin = CEapPluginIf::new_CEapPluginIf(iTools);
+
+				if (tmpEapPlugin != 0)
+				{
+					CleanupStack::PushL(tmpEapPlugin);
+
+					if (tmpEapPlugin->get_is_valid() == false)
+					{
+						EAP_TRACE_DEBUG(
+							iTools,
+							TRACE_FLAGS_DEFAULT,
+							(EAPL("ERROR: CEapServerProcessHandler::RunL(): CEapPluginIf::new_CEapPluginIf() failed, this=0x%08x\n"),
+							this));
+
+						User::Leave(iTools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(iTools, eap_status_allocation_error)));
+					}
+
+					tmpEapPlugin->set_partner(this);
+
+					const void * const aData = reinterpret_cast<const void *>(message->GetData()->Ptr());
+					const TInt aLength = message->GetData()->Size();
+
+					const eap_variable_data_c client_configuration(
+						iTools,
+						aData,
+						aLength,
+						false,
+						false);
+					if (client_configuration.get_is_valid() == false)
+					{
+						EAP_TRACE_DEBUG(
+							iTools,
+							TRACE_FLAGS_DEFAULT,
+							(EAPL("ERROR: CEapServerProcessHandler::RunL(): eap_variable_data_c client_configuration() failed, this=0x%08x\n"),
+							this));
+
+						User::Leave(iTools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(iTools, eap_status_allocation_error)));
+					}
+
+					status = tmpEapPlugin->configure(&client_configuration);
+					if (status != eap_status_ok)
+					{
+						EAP_TRACE_DEBUG(
+							iTools,
+							TRACE_FLAGS_DEFAULT,
+							(EAPL("ERROR: CEapServerProcessHandler::RunL(): tmpEapPlugin->configure() failed, this=0x%08x, status=%d=%s\n"),
+							this,
+							status,
+							eap_status_string_c::get_status_string(status)));
+
+						User::Leave(iTools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(iTools, status)));
+					}
+
+					iEapPlugin = tmpEapPlugin;
+
+					CleanupStack::Pop(tmpEapPlugin);
+				}
+				else
+				{
+					EAP_TRACE_DEBUG(
+						iTools,
+						TRACE_FLAGS_DEFAULT,
+						(EAPL("ERROR: CEapServerProcessHandler::RunL(): EEapPluginNew, iEapPlugin is NULL\n")));
+				}
+			}
+
+			break;
+
+		case EEapSettingsNew:
+
+			{
+				EAP_TRACE_DEBUG(
+					iTools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("CEapServerProcessHandler::RunL() EEapSettingsNew\n")));
+
+				CEapSettingsIf * tmpEapSettings = CEapSettingsIf::new_CEapSettingsIf(iTools);
+
+				if (tmpEapSettings != 0)
+				{
+					CleanupStack::PushL(tmpEapSettings);
+
+					if (tmpEapSettings->get_is_valid() == false)
+					{
+						EAP_TRACE_DEBUG(
+							iTools,
+							TRACE_FLAGS_DEFAULT,
+							(EAPL("ERROR: CEapServerProcessHandler::RunL(): CEapSettingsIf::new_CEapSettingsIf() failed, this=0x%08x\n"),
+							this));
+
+						User::Leave(iTools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(iTools, eap_status_allocation_error)));
+					}
+
+					tmpEapSettings->set_partner(this);
+
+					const void * const aData = reinterpret_cast<const void *>(message->GetData()->Ptr());
+					const TInt aLength = message->GetData()->Size();
+
+					const eap_variable_data_c client_configuration(
+						iTools,
+						aData,
+						aLength,
+						false,
+						false);
+					if (client_configuration.get_is_valid() == false)
+					{
+						EAP_TRACE_DEBUG(
+							iTools,
+							TRACE_FLAGS_DEFAULT,
+							(EAPL("ERROR: CEapServerProcessHandler::RunL(): eap_variable_data_c client_configuration() failed, this=0x%08x\n"),
+							this));
+
+						User::Leave(iTools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(iTools, eap_status_allocation_error)));
+					}
+
+					status = tmpEapSettings->configure(&client_configuration);
+					if (status != eap_status_ok)
+					{
+						EAP_TRACE_DEBUG(
+							iTools,
+							TRACE_FLAGS_DEFAULT,
+							(EAPL("ERROR: CEapServerProcessHandler::RunL(): tmpEapSettings->configure() failed, this=0x%08x, status=%d=%s\n"),
+							this,
+							status,
+							eap_status_string_c::get_status_string(status)));
+
+						User::Leave(iTools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(iTools, status)));
+					}
+
+					iEapSettings = tmpEapSettings;
+
+					CleanupStack::Pop(tmpEapSettings);
+				}
+				else
+				{
+					EAP_TRACE_DEBUG(
+						iTools,
+						TRACE_FLAGS_DEFAULT,
+						(EAPL("ERROR: CEapServerProcessHandler::RunL(): EEapSettingsNew, iEapSettings is NULL\n")));
+				}
+			}
+
+			break;
+
+#if defined (USE_WAPI_CORE)
+	     case EWapiCoreIfNew:
+
+	            EAP_TRACE_DEBUG(
+	                iTools,
+	                TRACE_FLAGS_DEFAULT,
+	                (EAPL("CEapServerProcessHandler::RunL() EWapiCoreIfNew\n")));
+
+                iWapiCore = CWapiCoreIf::NewL(iTools, this);
+
+				EAP_TRACE_DEBUG(
+					iTools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("CEapServerProcessHandler::RunL() EWapiCoreIfNew - iWapiCore = 0x%08x.\n"),
+					iWapiCore));
+
+
+	            break;
+
+	        case EWapiSettingsNew:
+
+	            EAP_TRACE_DEBUG(
+	                iTools,
+	                TRACE_FLAGS_DEFAULT,
+	                (EAPL("CEapServerProcessHandler::RunL() EWapiSettingsNew\n")));
+
+	            iWapiSettings = CWapiSettingsIf::NewL(iTools, this);
+
+				EAP_TRACE_DEBUG(
+					iTools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("CEapServerProcessHandler::RunL() EWapiSettingsNew - iWapiSettings = 0x%08x.\n"),
+					iWapiSettings));
+	            break;
+#endif
+	            
+        case EEapPacStoreNew:
+
+			{
+				EAP_TRACE_DEBUG(
+					iTools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("CEapServerProcessHandler::RunL() EEapPacStoreNew\n")));
+
+#if defined(USE_FAST_EAP_TYPE)
+
+				CPacStoreIf * tmpPacStore = CPacStoreIf::new_CPacStoreIf(
+					iTools,
+					ETrue,
+					0,
+					this);
+
+				if (tmpPacStore != 0)
+				{
+					CleanupStack::PushL(tmpPacStore);
+
+					if (tmpPacStore->get_is_valid() == false)
+					{
+						EAP_TRACE_DEBUG(
+							iTools,
+							TRACE_FLAGS_DEFAULT,
+							(EAPL("ERROR: CEapServerProcessHandler::RunL(): CPacStoreIf::new_CPacStoreIf() failed, this=0x%08x\n"),
+							this));
+
+						User::Leave(iTools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(iTools, eap_status_allocation_error)));
+					}
+
+					const void * const aData = reinterpret_cast<const void *>(message->GetData()->Ptr());
+					const TInt aLength = message->GetData()->Size();
+
+					const eap_variable_data_c client_configuration(
+						iTools,
+						aData,
+						aLength,
+						false,
+						false);
+					if (client_configuration.get_is_valid() == false)
+					{
+						EAP_TRACE_DEBUG(
+							iTools,
+							TRACE_FLAGS_DEFAULT,
+							(EAPL("ERROR: CEapServerProcessHandler::RunL(): eap_variable_data_c client_configuration() failed, this=0x%08x\n"),
+							this));
+
+						User::Leave(iTools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(iTools, eap_status_allocation_error)));
+					}
+
+					status = tmpPacStore->configure(&client_configuration);
+					if (status != eap_status_ok)
+					{
+						EAP_TRACE_DEBUG(
+							iTools,
+							TRACE_FLAGS_DEFAULT,
+							(EAPL("ERROR: CEapServerProcessHandler::RunL(): tmpPacStore->configure() failed, this=0x%08x, status=%d=%s\n"),
+							this,
+							status,
+							eap_status_string_c::get_status_string(status)));
+
+						User::Leave(iTools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(iTools, status)));
+					}
+
+					iPacStore = tmpPacStore;
+
+					CleanupStack::Pop(tmpPacStore);
+				}
+				else
+				{
+					EAP_TRACE_DEBUG(
+						iTools,
+						TRACE_FLAGS_DEFAULT,
+						(EAPL("ERROR: CEapServerProcessHandler::RunL(): EEapPacStoreNew, iPacStore is NULL\n")));
+				}
+
+#endif //#if defined(USE_FAST_EAP_TYPE)
+
+			}
+
+            break;
+
+        case EEapCoreProcessData:
+
+            EAP_TRACE_DEBUG(
+                iTools,
+                TRACE_FLAGS_DEFAULT,
+                (EAPL("CEapServerProcessHandler::RunL() EEapCoreProcessData\n")));
+
+            if (iEapCore !=0)
+            {
+                void* aData = reinterpret_cast<void *>(const_cast<TUint8 *>(message->GetData()->Ptr()));
+                TInt aLength = message->GetData()->Size();
+                iEapCore->process_data(aData, aLength);
+            }
+            else
+            {
+                EAP_TRACE_DEBUG(
+                    iTools,
+                    TRACE_FLAGS_DEFAULT,
+                    (EAPL("ERROR: CEapServerProcessHandler::RunL(): EEapCoreProcessData, iEapCore is NULL\n")));
+            }
+
+            break;
+
+        case EEapPacStoreProcessData:
+
+			EAP_TRACE_DEBUG(
+				iTools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("CEapServerProcessHandler::RunL() EEapPacStoreProcessData\n")));
+
+#if defined(USE_FAST_EAP_TYPE)
+			if (iPacStore !=0)
+			{
+				void* aData = reinterpret_cast<void *>(const_cast<TUint8 *>(message->GetData()->Ptr()));
+				TInt aLength = message->GetData()->Size();
+				iPacStore->process_data(aData, aLength);
+			}
+			else
+			{
+				EAP_TRACE_DEBUG(
+					iTools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("ERROR: CEapServerProcessHandler::RunL(): EEapPacStoreProcessData, iPacStore is NULL\n")));
+			}
+#endif //#if defined(USE_FAST_EAP_TYPE)
+			break;
+
+		case EEapPluginProcessData:
+
+			EAP_TRACE_DEBUG(
+				iTools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("CEapServerProcessHandler::RunL() EEapPluginProcessData\n")));
+
+			if (iEapPlugin !=0)
+			{
+				void* aData = reinterpret_cast<void *>(const_cast<TUint8 *>(message->GetData()->Ptr()));
+				TInt aLength = message->GetData()->Size();
+				iEapPlugin->process_data(aData, aLength);
+			}
+			else
+			{
+				EAP_TRACE_DEBUG(
+					iTools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("ERROR: CEapServerProcessHandler::RunL(): EEapPluginProcessData, iEapPlugin is NULL\n")));
+			}
+
+			break;
+
+		case EEapSettingsProcessData:
+
+			EAP_TRACE_DEBUG(
+				iTools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("CEapServerProcessHandler::RunL() EEapSettingsProcessData\n")));
+
+			if (iEapSettings !=0)
+			{
+				void* aData = reinterpret_cast<void *>(const_cast<TUint8 *>(message->GetData()->Ptr()));
+				TInt aLength = message->GetData()->Size();
+				iEapSettings->process_data(aData, aLength);
+			}
+			else
+			{
+				EAP_TRACE_DEBUG(
+					iTools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("ERROR: CEapServerProcessHandler::RunL(): EEapSettingsProcessData, iEapSettings is NULL\n")));
+			}
+
+			break;
+
+#if defined (USE_WAPI_CORE)
+		case EWapiCoreProcessData:
+
+            EAP_TRACE_DEBUG(
+                iTools,
+                TRACE_FLAGS_DEFAULT,
+                (EAPL("CEapServerProcessHandler::RunL() EWapiCoreProcessData\n")));
+
+            if (iWapiCore !=0)
+            {
+                void* aData = reinterpret_cast<void *>(const_cast<TUint8 *>(message->GetData()->Ptr()));
+                TInt aLength = message->GetData()->Size();
+                iWapiCore->process_data(aData, aLength);
+            }
+            else
+            {
+                EAP_TRACE_DEBUG(
+                    iTools,
+                    TRACE_FLAGS_DEFAULT,
+                    (EAPL("ERROR: CEapServerProcessHandler::RunL(): EWapiCoreProcessData, iWapiCore is NULL\n")));
+            }
+            break;
+
+		case EWapiSettingsProcessData:
+
+            EAP_TRACE_DEBUG(
+                iTools,
+                TRACE_FLAGS_DEFAULT,
+                (EAPL("CEapServerProcessHandler::RunL() EWapiSettingsProcessData\n")));
+
+            if (iWapiSettings !=0)
+            {
+                void* aData = reinterpret_cast<void *>(const_cast<TUint8 *>(message->GetData()->Ptr()));
+                TInt aLength = message->GetData()->Size();
+                iWapiSettings->process_data(aData, aLength);
+            }
+            else
+            {
+                EAP_TRACE_DEBUG(
+                    iTools,
+                    TRACE_FLAGS_DEFAULT,
+                    (EAPL("ERROR: CEapServerProcessHandler::RunL(): EWapiSettingsProcessData, iWapiSettings is NULL\n")));
+            }
+
+            break;
+#endif
+
+		case EEapCoreSendData:
+		case EEapPluginSendData:
+		case EEapSettingsSendData:
+        case EEapPacStoreSendData:
+#if defined (USE_WAPI_CORE)
+        case EWapiCoreSendData:
+        case EWapiSettingsSendData:
+#endif
+			if (message->GetRequestType() == EEapCoreSendData)
+			{
+				EAP_TRACE_DEBUG(
+					iTools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("CEapServerProcessHandler::RunL() EEapCoreSendData\n")));
+			}
+			else if (message->GetRequestType() == EEapPluginSendData)
+			{
+				EAP_TRACE_DEBUG(
+					iTools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("CEapServerProcessHandler::RunL() EEapPluginSendData\n")));
+			}
+			else if (message->GetRequestType() == EEapSettingsSendData)
+			{
+				EAP_TRACE_DEBUG(
+					iTools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("CEapServerProcessHandler::RunL() EEapSettingsSendData\n")));
+			}
+            else if (message->GetRequestType() == EEapPacStoreSendData)
+            {
+                EAP_TRACE_DEBUG(
+                    iTools,
+                    TRACE_FLAGS_DEFAULT,
+                    (EAPL("CEapServerProcessHandler::RunL() EEapPacStoreSendData\n")));
+            }
+#if defined (USE_WAPI_CORE)
+            else if (message->GetRequestType() == EWapiCoreSendData)
+            {
+                EAP_TRACE_DEBUG(
+                    iTools,
+                    TRACE_FLAGS_DEFAULT,
+                    (EAPL("CEapServerProcessHandler::RunL() EWapiCoreSendData\n")));
+            }
+            else if (message->GetRequestType() == EWapiSettingsSendData)
+            {
+                EAP_TRACE_DEBUG(
+                    iTools,
+                    TRACE_FLAGS_DEFAULT,
+                    (EAPL("CEapServerProcessHandler::RunL() EWapiSettingsSendData\n")));
+            }
+#endif
+			EAP_TRACE_DEBUG(
+				iTools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("CEapServerProcessHandler::RunL(): iClient=0x%08x\n"),
+				iClient));
+
+			if (iClient != 0)
+			{
+				status = iClient->SendData(message);
+				if (status != eap_status_ok)
+				{
+					EAP_TRACE_DEBUG(
+						iTools,
+						TRACE_FLAGS_DEFAULT,
+						(EAPL("ERROR: CEapServerProcessHandler::RunL(): SendData() failed, iClient=0x%08x, status=%d=%s\n"),
+						iClient,
+						status,
+						eap_status_string_c::get_status_string(status)));
+
+					// We do not return here. Even the iClient->SendData() fails we run this function to the end.
+				}
+			}
+			else
+			{
+				EAP_TRACE_DEBUG(
+					iTools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("ERROR: CEapServerProcessHandler::RunL(): EEap*SendData, iClient is NULL\n")));
+			}
+
+			break;
+
+		default:
+
+			EAP_TRACE_DEBUG(
+				iTools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("ERROR: CEapServerProcessHandler::RunL(): unknown message->GetRequestType()=%d=%s\n"),
+				message->GetRequestType(),
+				EapServerStrings::GetEapRequestsString(message->GetRequestType())));
+			break;
+
+		} // switch()
+
+		if (status == eap_status_ok)
+		{
+			// First one handled, remove message.
+			// iClient->SendData() call may fail, then we do not remove the message.
+			iEapMessageQueue->DeleteFirstMessage();
+		}
+
+	} // if ()
+
+	if (iEapMessageQueue->GetFirstMessage() != 0)
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CEapServerProcessHandler::RunL(): Still messages waiting.\n")));
+
+		if (iClient != NULL)
+		{
+			if (iClient->GetReceiveActive())
+			{
+				Activate();
+			}
+			else
+			{
+				EAP_TRACE_DEBUG(
+					iTools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("WARNING: CEapServerProcessHandler::RunL(): cannot call User::RequestComplete() because no receive is active.\n")));
+			}
+		}
+	}
+	else
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CEapServerProcessHandler::RunL(): No more messages to process.\n")));
+	}
+
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("=end======================================================================\n")));
+}
+
+//----------------------------------------------------------------------------
+
+void CEapServerProcessHandler::DoCancel()
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapServerProcessHandler::DoCancel(): this=0x%08x\n"),
+		this));
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapServerProcessHandler::DoCancel()");
+
+}
+
+//----------------------------------------------------------------------------
+
+TInt CEapServerProcessHandler::RunError(TInt aError)
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapServerProcessHandler::RunError(): aError=%d, this=0x%08x\n"),
+		aError,
+		this));
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapServerProcessHandler::RunError()");
+
+	Cancel();
+
+	return aError;
+}
+
+//----------------------------------------------------------------------------
+// end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/src/EapServerStrings.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,94 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: %
+*/
+
+// This is enumeration of EAPOL source code.
+#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
+	#undef EAP_FILE_NUMBER_ENUM
+	#define EAP_FILE_NUMBER_ENUM 38
+	#undef EAP_FILE_NUMBER_DATE
+	#define EAP_FILE_NUMBER_DATE 1127594498
+#endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
+
+
+
+/** @file */
+
+#include "EapServerStrings.h"
+#include "eap_tools.h"
+
+//------------------------------------------------------------------------------
+
+EXPORT_C EapServerStrings::~EapServerStrings()
+{
+}
+
+//------------------------------------------------------------------------------
+
+EXPORT_C EapServerStrings::EapServerStrings()
+{
+}
+
+//------------------------------------------------------------------------------
+
+EXPORT_C eap_const_string EapServerStrings::GetEapRequestsString(const TEapRequests request)
+{
+
+#if defined(USE_EAP_TRACE_STRINGS)
+	EAP_IF_RETURN_STRING(request, EEapNone)
+	else EAP_IF_RETURN_STRING(request, EEapCoreIfNew)
+	else EAP_IF_RETURN_STRING(request, EEapPluginNew)
+	else EAP_IF_RETURN_STRING(request, EEapSettingsNew)
+	else EAP_IF_RETURN_STRING(request, EEapCoreProcessData)
+	else EAP_IF_RETURN_STRING(request, EEapPluginProcessData)
+	else EAP_IF_RETURN_STRING(request, EEapSettingsProcessData)
+	else EAP_IF_RETURN_STRING(request, EEapCoreSendData)
+	else EAP_IF_RETURN_STRING(request, EEapPluginSendData)
+	else EAP_IF_RETURN_STRING(request, EEapSettingsSendData)
+	else EAP_IF_RETURN_STRING(request, EEapIfReqReceive)
+	else EAP_IF_RETURN_STRING(request, EEapIfCancelReceive)
+	else EAP_IF_RETURN_STRING(request, EEapPacStoreNew)
+	else EAP_IF_RETURN_STRING(request, EEapPacStoreProcessData)
+	else EAP_IF_RETURN_STRING(request, EEapPacStoreSendData)
+	else EAP_IF_RETURN_STRING(request, EWapiCoreIfNew)
+	else EAP_IF_RETURN_STRING(request, EWapiSettingsNew)
+	else EAP_IF_RETURN_STRING(request, EWapiCoreProcessData)
+	else EAP_IF_RETURN_STRING(request, EWapiSettingsProcessData)
+	else EAP_IF_RETURN_STRING(request, EWapiCoreSendData)
+	else EAP_IF_RETURN_STRING(request, EWapiSettingsSendData)
+
+	else
+#endif // #if defined(USE_EAP_TRACE_STRINGS)
+	{
+		EAP_UNREFERENCED_PARAMETER(request);
+		return EAPL("Unknown TEapRequests");
+	}
+
+}
+
+//------------------------------------------------------------------------------
+
+EXPORT_C eap_const_string EapServerStrings::GetEapRequestsString(const TInt request)
+{
+	return EapServerStrings::GetEapRequestsString(static_cast<TEapRequests>(request));
+}
+
+//------------------------------------------------------------------------------
+// End.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/src/EapSession.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,545 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP-session inside EAP-server.
+*
+*/
+
+/*
+* %version: %
+*/
+
+
+#define __REFERENCE_CAPABILITY_NAMES__
+#define __INCLUDE_CAPABILITY_NAMES__
+
+#include "EapSession.h"
+#include "EapServerStrings.h"
+#include "EapServer.h"
+#include "EapServerProcessHandler.h"
+#include "EapServerClientDef.h"
+#include "abs_eap_am_tools.h"
+#include "EapTraceSymbian.h"
+
+#include "eap_automatic_variable.h"
+
+/*
+    CEapSession
+*/
+
+const TInt KMaxMessageLength = 1000000;
+
+// -----------------------------------------------------------------------------------------
+
+// construct/destruct
+
+CEapSession::CEapSession()
+: iReceiveActive(EFalse)
+, iEapProcessHandler(0)
+, iTools(0)
+    {
+    EAP_TRACE_DEBUG_SYMBIAN((_L("CEapSession::CEapSession(): this=0x%08x"),
+		this));
+
+	EAP_TRACE_RETURN_STRING_SYMBIAN(_L("returns: CEapSession::CEapSession()"));
+
+    }
+
+// -----------------------------------------------------------------------------------------
+
+void CEapSession::ConstructL(CEapServer& aServer, abs_eap_am_tools_c * const tools)
+    {
+	EAP_TRACE_DEBUG(
+		tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapSession::ConstructL(): this=0x%08x\n"),
+		this));
+	EAP_TRACE_RETURN_STRING(tools, "returns: CEapSession::ConstructL()");
+
+    iTools = tools;
+
+    iEapProcessHandler = CEapServerProcessHandler::NewL();
+    iEapProcessHandler->ConstructL(this, iTools);
+	CActiveScheduler::Add(iEapProcessHandler);
+    }
+
+// -----------------------------------------------------------------------------------------
+
+CEapSession::~CEapSession()
+    {
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapSession::~CEapSession(): this=0x%08x\n"),
+		this));
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapSession::~CEapSession()");
+
+    // cancel any receive
+    CancelReceive();
+    if (iEapProcessHandler != 0)
+        {
+        delete iEapProcessHandler;
+        iEapProcessHandler = 0;
+        }
+    // decrement session count, so server may terminate if no longer needed
+    Server()->DecrementSessions();
+    }
+
+// -----------------------------------------------------------------------------------------
+
+CEapServer* CEapSession::Server() const
+    /**
+       Return the EAP-server.
+
+       This deliberately hides the ugly casts around the code.
+    */
+    {
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapSession::Server(): this=0x%08x\n"),
+		this));
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapSession::Server()");
+
+    return const_cast<CEapServer*>(static_cast<const CEapServer*>(CSession2::Server()));
+    }
+
+// -----------------------------------------------------------------------------------------
+
+void CEapSession::CheckCapabilityL(
+	const RMessage2& aMessage,
+	const TBool aMustHaveCapabilityWhenTrue,
+	const TCapability aCapability,
+	const char *aDiagnostic)
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapSession::CheckCapabilityL(): this=0x%08x: aMessage.Function()=%d=%s\n"),
+		this,
+		aMessage.Function(),
+		EapServerStrings::GetEapRequestsString(aMessage.Function())));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapSession::CheckCapabilityL()");
+
+	if (aMustHaveCapabilityWhenTrue != aMessage.HasCapability(aCapability, aDiagnostic))
+	{
+		// Capability check failed.
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("ERROR: CEapSession::CheckCapability(): aMessage.Function()=%d=%s, failed capability check: %d=%s, %s\n"),
+			aMessage.Function(),
+			EapServerStrings::GetEapRequestsString(aMessage.Function()),
+			aCapability,
+			CapabilityNames[aCapability],
+			aDiagnostic));
+		Server()->PanicClient(EBadRequest);
+		User::Leave(EBadRequest);
+	}
+	else
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CEapSession::CheckCapability(): aMessage.Function()=%d=%s, OK capability check: %d=%s\n"),
+			aMessage.Function(),
+			EapServerStrings::GetEapRequestsString(aMessage.Function()),
+			aCapability,
+			CapabilityNames[aCapability]));
+	}
+}
+
+// -----------------------------------------------------------------------------------------
+
+// service dispatcher - from CSharableSession
+
+void CEapSession::ServiceL(const RMessage2& aMessage)
+    {
+
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("-start--------------------------------------------------------------------\n")));
+
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapSession::ServiceL(): this=0x%08x: starts, aMessage.Function()=%d=%s\n"),
+		this,
+		aMessage.Function(),
+		EapServerStrings::GetEapRequestsString(aMessage.Function())));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapSession::ServiceL()");
+
+
+	{
+		CheckCapabilityL(
+			aMessage,
+			ETrue,
+			ECapabilityNetworkControl,
+			"EAP-SERVER: Missing ECapabilityNetworkControl");
+
+		CheckCapabilityL(
+			aMessage,
+			ETrue,
+			ECapabilityNetworkServices,
+			"EAP-SERVER: Missing ECapabilityNetworkServices");
+
+		CheckCapabilityL(
+			aMessage,
+			ETrue,
+			ECapabilityReadDeviceData,
+			"EAP-SERVER: Missing ECapabilityReadDeviceData");
+
+		CheckCapabilityL(
+			aMessage,
+			ETrue,
+			ECapabilityReadUserData,
+			"EAP-SERVER: Missing ECapabilityReadUserData");
+	}
+
+
+	if (aMessage.Function() == EEapIfCancelReceive)
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CEapSession::ServiceL(): aMessage.Function()=%d=%s, calls CancelReceive()\n"),
+			aMessage.Function(),
+			EapServerStrings::GetEapRequestsString(aMessage.Function())));
+        CancelReceive();
+		return;
+	}
+
+	// length of passed descriptor (1st parameter passed from client)
+	TInt deslen = aMessage.GetDesLength(0);
+
+	if (deslen > KMaxMessageLength)
+	{
+		Server()->PanicClient(EBadRequest);
+		return;
+	}
+
+	// Passed data will be saved in this descriptor.
+	RBuf8 buffer;
+
+	// Max length set to the value of "deslen", but current length is zero
+	buffer.CreateL(deslen);
+
+	// Do the right cleanup if anything subsequently goes wrong
+	buffer.CleanupClosePushL();
+
+	// Copy the client's descriptor data into our buffer.
+	aMessage.ReadL(0,buffer,0);
+
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapSession::ServiceL(): calls buffer.Length()\n")));
+
+	TUint aLength = buffer.Length();
+
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapSession::ServiceL(): calls buffer.Ptr(): aLength=%d\n"),
+		aLength));
+
+	const void * aData = buffer.Ptr();
+
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapSession::ServiceL(): aData=0x%08x, aLength=%d\n"),
+		aData,
+		aLength));
+
+	EAP_TRACE_DATA_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapSession::ServiceL()"),
+		aData,
+		aLength));
+
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapSession::ServiceL(): switch aMessage.Function()=%d=%s, iEapProcessHandler=0x%08x\n"),
+		aMessage.Function(),
+		EapServerStrings::GetEapRequestsString(aMessage.Function()),
+		iEapProcessHandler));
+
+
+    switch (aMessage.Function())
+        {
+    case EEapCoreIfNew:
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CEapSession::ServiceL(): EEapCoreIfNew\n")));
+        ReceiveAll();
+        iEapProcessHandler->SaveMessage(EEapCoreIfNew, aData, aLength);
+        aMessage.Complete(KErrNone);
+        break;
+    case EEapPluginNew:
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CEapSession::ServiceL(): EEapPluginNew\n")));
+        iEapProcessHandler->SaveMessage(EEapPluginNew, aData, aLength);
+        aMessage.Complete(KErrNone);
+        break;
+    case EEapSettingsNew:
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CEapSession::ServiceL(): EEapSettingsNew\n")));
+        iEapProcessHandler->SaveMessage(EEapSettingsNew, aData, aLength);
+        aMessage.Complete(KErrNone);
+        break;
+    case EEapPacStoreNew:
+        EAP_TRACE_DEBUG(
+            iTools,
+            TRACE_FLAGS_DEFAULT,
+            (EAPL("CEapSession::ServiceL(): EEapPacStoreNew\n")));
+        iEapProcessHandler->SaveMessage(EEapPacStoreNew, aData, aLength);
+        aMessage.Complete(KErrNone);
+        break;
+    case EWapiCoreIfNew:
+        EAP_TRACE_DEBUG(
+            iTools,
+            TRACE_FLAGS_DEFAULT,
+            (EAPL("CEapSession::ServiceL(): EWapiCoreIfNew\n")));
+        ReceiveAll();
+        iEapProcessHandler->SaveMessage(EWapiCoreIfNew, aData, aLength);
+        aMessage.Complete(KErrNone);
+        break;
+    case EWapiSettingsNew:
+        EAP_TRACE_DEBUG(
+            iTools,
+            TRACE_FLAGS_DEFAULT,
+            (EAPL("CEapSession::ServiceL(): EWapiSettingsNew\n")));
+        ReceiveAll();
+        iEapProcessHandler->SaveMessage(EWapiSettingsNew, aData, aLength);
+        aMessage.Complete(KErrNone);
+        break;
+    case EEapCoreProcessData:
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CEapSession::ServiceL(): EEapCoreProcessData\n")));
+        // Read message
+        iEapProcessHandler->SaveMessage(EEapCoreProcessData, aData, aLength);
+        aMessage.Complete(KErrNone);
+        break;
+    case EEapPluginProcessData:
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CEapSession::ServiceL(): EEapPluginProcessData\n")));
+        iEapProcessHandler->SaveMessage(EEapPluginProcessData, aData, aLength);
+        aMessage.Complete(KErrNone);
+        break;
+    case EEapSettingsProcessData:
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CEapSession::ServiceL(): EEapSettingsProcessData\n")));
+        iEapProcessHandler->SaveMessage(EEapSettingsProcessData, aData, aLength);
+        aMessage.Complete(KErrNone);
+        break;
+    case EEapPacStoreProcessData:
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CEapSession::ServiceL(): EEapPacStoreProcessData\n")));
+        iEapProcessHandler->SaveMessage(EEapPacStoreProcessData, aData, aLength);
+        aMessage.Complete(KErrNone);
+        break;
+    case EWapiCoreProcessData:
+        EAP_TRACE_DEBUG(
+            iTools,
+            TRACE_FLAGS_DEFAULT,
+            (EAPL("CEapSession::ServiceL(): EWapiCoreProcessData\n")));
+        iEapProcessHandler->SaveMessage(EWapiCoreProcessData, aData, aLength);
+        aMessage.Complete(KErrNone);
+        break;
+    case EWapiSettingsProcessData:
+        EAP_TRACE_DEBUG(
+            iTools,
+            TRACE_FLAGS_DEFAULT,
+            (EAPL("CEapSession::ServiceL(): EWapiSettingsProcessData\n")));
+        iEapProcessHandler->SaveMessage(EWapiSettingsProcessData, aData, aLength);
+        aMessage.Complete(KErrNone);
+        break;
+    case EEapIfReqReceive: // TAny& aBuffer - async
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CEapSession::ServiceL(): EEapIfReqReceive\n")));
+        __ASSERT_DEBUG(!iReceiveActive, Server()->PanicClient(EReceiveReceiveAlreadyActive));
+        // remember receive request
+        iReceiveMessage = aMessage;
+        iReceiveActive=ETrue;
+		iEapProcessHandler->Activate();
+        break;
+    case EEapIfCancelReceive:
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CEapSession::ServiceL(): EEapIfCancelReceive\n")));
+        CancelReceive();
+        break;
+    default:
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("ERROR: CEapSession::ServiceL(): unknown aMessage.Function()=%d=%s, calls Server()->PanicClient()\n"),
+			aMessage.Function(),
+			EapServerStrings::GetEapRequestsString(aMessage.Function())));
+
+		Server()->PanicClient(EBadRequest);
+        };
+
+	CleanupStack::PopAndDestroy(&buffer);
+
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapSession::ServiceL(): ends aMessage.Function()=%d=%s\n"),
+		aMessage.Function(),
+		EapServerStrings::GetEapRequestsString(aMessage.Function())));
+
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("-end----------------------------------------------------------------------\n")));
+    }
+
+// -----------------------------------------------------------------------------------------
+
+void CEapSession::ReceiveAll()
+    {
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapSession::ReceiveAll(): this=0x%08x\n"),
+		this));
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapSession::ReceiveAll()");
+
+    }
+
+// -----------------------------------------------------------------------------------------
+
+void CEapSession::Receive(RMessage2& aBuffer)
+    {
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapSession::Receive(): this=0x%08x\n"),
+		this));
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapSession::Receive()");
+
+    __ASSERT_DEBUG(!iReceiveActive,Server()->PanicClient(EReceiveReceiveAlreadyActive));
+
+    // remember receive request
+    iReceiveMessage = aBuffer;
+    iReceiveActive=ETrue;
+    }
+
+// -----------------------------------------------------------------------------------------
+
+void CEapSession::CancelReceive()
+    {
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapSession::CancelReceive(): this=0x%08x\n"),
+		this));
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapSession::CancelReceive()");
+
+    if (!iReceiveActive)
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CEapSession::CancelReceive(): No receive active\n")));
+        return;
+	}
+
+    iReceiveMessage.Complete(KErrCancel);
+    iReceiveActive=EFalse;
+    }
+
+// -----------------------------------------------------------------------------------------
+
+TBool CEapSession::GetReceiveActive()
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapSession::GetReceiveActive(): this=0x%08x: iReceiveActive=%d\n"),
+		this,
+		iReceiveActive));
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapSession::GetReceiveActive()");
+
+	return iReceiveActive;
+}
+
+// -----------------------------------------------------------------------------------------
+
+eap_status_e CEapSession::SendData(EapMessageBuffer * const message)
+    {
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapSession::SendData(): this=0x%08x: message->GetRequestType()=%d=%s, message->GetData()->Length()=%d\n"),
+		this,
+		message->GetRequestType(),
+		EapServerStrings::GetEapRequestsString(message->GetRequestType()),
+		message->GetData()->Length()));
+	EAP_TRACE_RETURN_STRING(iTools, "returns: CEapSession::SendData()");
+
+    if (!iReceiveActive)
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("CEapSession::SendData(): No receive active\n")));
+        return EAP_STATUS_RETURN(iTools, iTools->convert_am_error_to_eapol_error(KErrCancel));
+	}
+
+    TInt error(KErrNone);
+
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapSession::SendData(): calls iReceiveMessage.Write()\n")));
+
+	error = iReceiveMessage.Write(0, message->GetData()->Des());
+
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("CEapSession::SendData(): calls iReceiveMessage.Complete(): Write() error=%d\n"),
+		error));
+
+    iReceiveMessage.Complete(KErrNone);
+    iReceiveActive=EFalse;
+
+    return EAP_STATUS_RETURN(iTools, iTools->convert_am_error_to_eapol_error(error));
+    }
+
+// -----------------------------------------------------------------------------------------
+// end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/src/EapSettingsIf.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,288 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP-settings interface in EAP-server.
+*
+*/
+
+/*
+* %version: 18 %
+*/
+
+
+#include "eap_am_tools.h"
+#include "eap_am_export.h"
+#include "EapSettingsIf.h"
+#include "eap_automatic_variable.h"
+#include "eap_config.h"
+#include "eap_file_config.h"
+#include "abs_eap_am_mutex.h"
+#include "eap_am_general_settings.h"
+#include "eap_am_general_settings_symbian.h"
+#include "eap_general_settings_server_message_if.h"
+#include "EapServerClientDef.h"
+
+/** @file */
+
+//--------------------------------------------------
+
+CEapSettingsIf::CEapSettingsIf(
+	abs_eap_am_tools_c * const tools,
+	eap_am_message_if_c * const server)
+	: m_am_tools(tools)
+	, m_client_if(0)
+	, m_server_if(server)
+	, m_use_asyncronous_test(false)
+	, m_is_valid(false)
+{
+	if (m_am_tools == 0 || m_am_tools->get_is_valid() == false)
+	{
+		return;
+	}
+
+	if (m_server_if == 0 || m_server_if->get_is_valid() == false)
+	{
+		return;
+	}
+
+	m_is_valid = true;
+}
+
+//--------------------------------------------------
+
+CEapSettingsIf::~CEapSettingsIf()
+{
+	if (m_server_if != 0)
+	{
+		m_server_if->shutdown();
+	}
+    delete m_server_if;
+    m_server_if = 0;
+}
+
+//--------------------------------------------------
+
+bool CEapSettingsIf::get_is_valid()
+{
+    return m_is_valid;
+}
+
+//--------------------------------------------------
+
+eap_status_e CEapSettingsIf::configure(
+	const eap_variable_data_c * const client_configuration)
+{
+	return m_server_if->configure(client_configuration);
+}
+
+//--------------------------------------------------
+
+void CEapSettingsIf::set_partner(AbsEapSendInterface * const client)
+{
+    m_client_if = client;
+}
+
+// ----------------------------------------------------------------
+
+eap_status_e CEapSettingsIf::send_data(const void * const data, const u32_t length)
+{
+	return EAP_STATUS_RETURN(m_am_tools, m_client_if->SendData(data, length, EEapSettingsSendData));
+}
+
+// ----------------------------------------------------------------
+
+eap_status_e CEapSettingsIf::process_data(const void * const data, const u32_t length)
+{
+	return EAP_STATUS_RETURN(m_am_tools, m_server_if->process_data(data, length));
+}
+
+//--------------------------------------------------
+
+//
+eap_status_e CEapSettingsIf::shutdown()
+{
+	EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+	EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools, 
+		EAP_TRACE_FLAGS_MESSAGE_DATA, 
+		(EAPL("CEapSettingsIf::shutdown(): this = 0x%08x.\n"),
+		this));
+
+	eap_status_e status(eap_status_ok);
+
+	if (m_server_if != 0)
+	{
+		status = m_server_if->shutdown();
+	}
+
+	EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+
+eap_am_general_settings_c * new_eap_am_general_settings_c(
+	abs_eap_am_tools_c * const tools,
+	abs_eap_am_general_settings_c * const partner)
+{
+	eap_am_general_settings_c * const plugin = new eap_am_general_settings_symbian_c(tools, partner);
+
+	// This will delete the plugin memory automatically.
+	eap_automatic_variable_c<eap_am_general_settings_c> automatic_plugin(
+		tools,
+		plugin);
+
+	if (plugin == 0
+	|| plugin->get_is_valid() == false)
+	{
+		// ERROR.
+		if (plugin != 0)
+		{
+			EAP_TRACE_DEBUG(
+			tools,
+			TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+			(EAPL("calls: new_eap_am_general_settings_c(): plugin->shutdown()\n")));
+
+			(void) plugin->shutdown();
+		}
+		return 0;
+	}
+
+	eap_status_e status = plugin->configure();
+	if (status != eap_status_ok)
+	{
+		(void) plugin->shutdown();
+		return 0;
+	}
+
+	// This will prevent automatic deletion of the plugin memory.
+	automatic_plugin.do_not_free_variable();
+
+	return plugin;
+}
+
+//--------------------------------------------------
+
+eap_am_message_if_c * eap_am_message_if_c::new_eap_general_settings_server_message_if_c(
+	abs_eap_am_tools_c * const tools)
+{
+	eap_am_message_if_c * const server = new eap_general_settings_server_message_if_c(
+		tools);
+
+	// This will delete the server memory automatically.
+	eap_automatic_variable_c<eap_am_message_if_c> automatic_server(
+		tools,
+		server);
+
+	if (server == 0
+	|| server->get_is_valid() == false)
+	{
+		// ERROR.
+		if (server != 0)
+		{
+			EAP_TRACE_DEBUG(
+			tools,
+			TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+			(EAPL("calls: eap_am_message_if_c::new_eap_general_settings_server_message_if_c(): server->shutdown()\n")));
+
+			(void) server->shutdown();
+		}
+		return 0;
+	}
+
+	eap_status_e status = server->configure(0);
+	if (status != eap_status_ok)
+	{
+		(void) server->shutdown();
+		return 0;
+	}
+
+	// This will prevent automatic deletion of the server memory.
+	automatic_server.do_not_free_variable();
+
+	return server;
+}
+
+//--------------------------------------------------
+
+CEapSettingsIf* CEapSettingsIf::new_CEapSettingsIf(
+    abs_eap_am_tools_c * const tools)
+{
+	eap_am_message_if_c * const server = eap_am_message_if_c::new_eap_general_settings_server_message_if_c(
+		tools);
+
+	// This will delete the server memory automatically.
+	eap_automatic_variable_c<eap_am_message_if_c> automatic_server(
+		tools,
+		server);
+
+	if (server == 0
+	|| server->get_is_valid() == false)
+	{
+		// ERROR.
+		if (server != 0)
+		{
+			EAP_TRACE_DEBUG(
+			tools,
+			TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+			(EAPL("calls: CEapSettingsIf::new_CEapPluginIf(): server->shutdown()\n")));
+
+			(void) server->shutdown();
+		}
+		return 0;
+	}
+
+	CEapSettingsIf * const settings_if = new CEapSettingsIf(
+		tools,
+		server);
+
+	// This will delete the settings_if memory automatically.
+	eap_automatic_variable_c<CEapSettingsIf> automatic_settings_if(
+		tools,
+		settings_if);
+
+	if (settings_if == 0
+	|| settings_if->get_is_valid() == false)
+	{
+		// ERROR.
+		if (settings_if != 0)
+		{
+			EAP_TRACE_DEBUG(
+			tools,
+			TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+			(EAPL("calls: CEapSettingsIf::new_CEapPluginIf(): settings_if->shutdown()\n")));
+
+			// This will prevent automatic deletion of the server memory.
+			// automatic_settings_if will delete settings_if and server too.
+			automatic_server.do_not_free_variable();
+
+			(void) settings_if->shutdown();
+		}
+		return 0;
+	}
+
+	server->set_partner(settings_if);
+
+	// This will prevent automatic deletion of the server memory.
+	automatic_server.do_not_free_variable();
+	// This will prevent automatic deletion of the settings_if memory.
+	automatic_settings_if.do_not_free_variable();
+
+	return settings_if;
+}
+
+//--------------------------------------------------
+// End
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/src/PacStoreIf.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,262 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  PAC-store interface inside the EAP-server.
+*
+*/
+
+/*
+* %version: 10 %
+*/
+
+#include "eap_am_tools.h"
+#include "eap_am_export.h"
+#include "PacStoreIf.h"
+#include "eap_automatic_variable.h"
+#include "eap_config.h"
+#include "eap_file_config.h"
+#include "abs_eap_am_mutex.h"
+
+
+/** @file */
+
+//--------------------------------------------------
+
+/**
+ * This is the timer ID used with abs_eap_am_tools_c::set_timer() and abs_eap_am_tools_c::cancel_timer().
+ */
+enum pac_store_message_if_timer_id
+{
+    pac_store_message_IF_TIMER_PROCESS_DATA_ID,
+    pac_store_message_IF_TIMER_SEND_DATA_ID,
+};
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT CPacStoreIf::CPacStoreIf(
+    abs_eap_am_tools_c * const tools,
+    eap_am_message_if_c * const server,
+    AbsEapSendInterface * client)
+    : m_am_tools(tools)
+    , m_client_if(client)
+    , m_server_if(server)
+    , m_fileconfig(0)
+    , m_use_asyncronous_test(false)
+    , iIsValid(false)
+{
+	if (m_am_tools == 0 || m_am_tools->get_is_valid() == false)
+		{
+		return;
+		}
+	if (m_client_if == 0)
+		{
+		return;
+		}
+	if (m_server_if == 0 || m_server_if->get_is_valid() == false)
+		{
+		return;
+		}
+		 
+	iIsValid = true;
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT CPacStoreIf::~CPacStoreIf()
+{
+	if (m_server_if != 0)
+	{
+		m_server_if->shutdown();
+	}
+    delete m_server_if;
+    m_server_if = 0;
+
+    delete m_fileconfig;
+    m_fileconfig = 0;
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT bool CPacStoreIf::get_is_valid()
+{
+    return iIsValid;
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e CPacStoreIf::configure(
+	const eap_variable_data_c * const client_configuration)
+{
+	return m_server_if->configure(client_configuration);
+}
+
+// ----------------------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e CPacStoreIf::send_data(const void * const data, const u32_t length)
+    {
+    return m_client_if->SendData(data, length, EEapPacStoreSendData);
+    }
+
+// ----------------------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e CPacStoreIf::process_data(const void * const data, const u32_t length)
+    {
+    return m_server_if->process_data(data, length);
+    }
+
+//--------------------------------------------------
+
+//
+EAP_FUNC_EXPORT eap_status_e CPacStoreIf::shutdown()
+{
+    EAP_TRACE_BEGIN(m_am_tools, TRACE_FLAGS_DEFAULT);
+
+    EAP_ASSERT(m_am_tools->get_global_mutex()->get_is_reserved() == true);
+
+    EAP_TRACE_DEBUG(
+        m_am_tools, 
+        EAP_TRACE_FLAGS_MESSAGE_DATA, 
+        (EAPL("CPacStoreIf::shutdown(): this = 0x%08x.\n"),
+        this));
+
+    eap_status_e status(eap_status_ok);
+
+    if (m_server_if != 0)
+    {
+        status = m_server_if->shutdown();
+    }
+
+    EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+    return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+//--------------------------------------------------
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_pac_store_server_message_if_c * eap_pac_store_server_message_if_c::new_eap_pac_store_server_message_if_c(
+    abs_eap_am_tools_c * const tools)
+{
+    EAP_TRACE_DEBUG(
+        tools,
+        TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+        (EAPL("eap_pac_store_server_message_if_c::new_eap_pac_store_server_message_if_c()\n")));
+
+    EAP_TRACE_RETURN_STRING(tools, "returns: eap_pac_store_server_message_if_c::new_eap_pac_store_server_message_if_c()");
+
+    eap_pac_store_server_message_if_c * const server = new eap_pac_store_server_message_if_c(
+        tools);
+
+    eap_automatic_variable_c<eap_am_message_if_c> automatic_server(
+        tools,
+        server);
+
+    if (server == 0
+    || server->get_is_valid() == false)
+    {
+        // ERROR.
+        if (server != 0)
+        {
+            EAP_TRACE_DEBUG(
+            tools,
+            TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+            (EAPL("calls: CPacStoreIf::CPacStoreIf(): server->shutdown()\n")));
+
+            (void) server->shutdown();
+        }
+        return 0;
+    }
+
+    eap_status_e status = server->configure(0);
+    if (status != eap_status_ok)
+    {
+        (void) server->shutdown();
+        return 0;
+    }
+
+    automatic_server.do_not_free_variable();
+
+    return server;
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT CPacStoreIf* CPacStoreIf::new_CPacStoreIf(
+    abs_eap_am_tools_c * const tools,
+    const bool is_client_when_true,
+    const u32_t MTU,
+    AbsEapSendInterface * client)
+    {
+    
+    eap_pac_store_server_message_if_c *server =  eap_pac_store_server_message_if_c::new_eap_pac_store_server_message_if_c(
+        tools);
+    
+    eap_automatic_variable_c<eap_am_message_if_c> automatic_server(
+        tools,
+        server);
+
+    if (server == 0
+        || server->get_is_valid() == false)
+        {
+        // ERROR.
+        if (server != 0)
+            {
+            EAP_TRACE_DEBUG(
+                tools,
+                TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+                (EAPL("calls: CPacStoreIf(): server->shutdown(): %s.\n"),
+                (is_client_when_true == true) ? "client": "server"));
+
+            (void) server->shutdown();
+            }
+        return 0;
+        }
+
+    CPacStoreIf * pacstore_if = new CPacStoreIf(
+        tools,
+        server,
+        client);
+
+    eap_automatic_variable_c<CPacStoreIf> automatic_pacstore_if(
+        tools,
+        pacstore_if);
+
+    if (pacstore_if == 0
+        || pacstore_if->get_is_valid() == false)
+        {
+        // ERROR.
+        if (pacstore_if != 0)
+            {
+            EAP_TRACE_DEBUG(
+                tools,
+                TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+                (EAPL("calls: CPacStoreIf(): pacstore_if->shutdown(): %s.\n"),
+                (is_client_when_true == true) ? "client": "server"));
+
+			// automatic_pacstore_if will delete pacstore_if and pacstore_if will delete server too.
+			automatic_server.do_not_free_variable();
+
+            (void) pacstore_if->shutdown();
+            }
+        return 0;
+        }
+
+    server->set_partner(pacstore_if);
+
+    automatic_server.do_not_free_variable();
+    automatic_pacstore_if.do_not_free_variable();
+    
+    return pacstore_if;
+    }
+
+//--------------------------------------------------
+// End
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/src/eap_am_general_settings_symbian.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,2660 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP general settings configuration.
+*
+*/
+
+/*
+* %version: 51 %
+*/
+
+#include "eap_tools.h"
+#include "eap_status.h"
+#include "eap_am_export.h"
+#include "eap_expanded_type.h"
+#include "eap_array.h"
+#include "eap_database_reference_if.h"
+#include "eap_am_general_settings_symbian.h"
+#include "abs_eap_am_general_settings.h"
+#include "eap_automatic_variable.h"
+#include "EapTraceSymbian.h"
+#include "EapConversion.h"
+#include "EapTlsPeapCertFetcher.h"
+#include <EapAutomatic.h>
+#include <EapPluginTools.h>
+#include <EapTypePlugin.h>
+
+/** @file */
+
+// ----------------------------------------------------------------------
+
+EAP_LITERAL_SYMBIAN(KGeneralsettingsDatabaseName, "eap_methods.dat");
+
+EAP_LITERAL_SYMBIAN(KGeneralSettingsTableName, "eap_general_settings");
+
+_LIT(KEapMethodEnabledValue, "enabled");
+_LIT(KEapMethodDisabledValue, "disabled");
+
+_LIT(KServiceType, "service_type");
+_LIT(KServiceIndex, "service_index");
+
+_LIT(KSQL, "SELECT %S, %S, %S, %S FROM %S WHERE %S=%d AND %S=%d");
+
+const TUint KMaxSqlQueryLength = 512;
+const TInt	KDefaultColumnInView_One = 4; // For DB view.
+
+// ----------------------------------------------------------------------
+
+eap_am_general_settings_symbian_c::eap_am_general_settings_symbian_c(
+	abs_eap_am_tools_c * const tools,
+	abs_eap_am_general_settings_c * const partner)
+	: m_am_tools(tools)
+	, m_partner(partner)
+	, m_is_valid(false)
+	, m_shutdown_was_called(false)
+	, iGeneralSettingsDbCreated(EFalse)
+	, iGeneralSettingsSessionOpened(EFalse)
+	, iCertificateFetcher(0)
+	, m_completion_status(eap_status_process_general_error)
+	, m_EAPType(eap_type_none)
+	, m_IndexType(0ul)
+	, m_Index(0ul)
+{
+	if (m_am_tools == 0
+		|| m_am_tools->get_is_valid() == false
+		|| m_partner == 0)
+	{
+		return;
+	}
+
+	m_is_valid = true;
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::eap_am_general_settings_symbian_c(): this=0x%08x.\n"),
+		this));
+}
+
+// ----------------------------------------------------------------------
+
+eap_am_general_settings_symbian_c::eap_am_general_settings_symbian_c(
+	abs_eap_am_tools_c * const tools)
+	: m_am_tools(tools)
+	, m_partner(0)
+	, m_is_valid(false)
+	, m_shutdown_was_called(false)
+	, iGeneralSettingsDbCreated(EFalse)
+	, iGeneralSettingsSessionOpened(EFalse)
+	, iCertificateFetcher(0)
+	, m_completion_status(eap_status_process_general_error)
+	, m_EAPType(eap_type_none)
+	, m_IndexType(0ul)
+	, m_Index(0ul)
+{
+	if (m_am_tools == 0
+		|| m_am_tools->get_is_valid() == false)
+	{
+		return;
+	}
+
+	m_is_valid = true;
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::eap_am_general_settings_symbian_c(): this=0x%08x.\n"),
+		this));
+}
+
+// ----------------------------------------------------------------------
+
+eap_am_general_settings_symbian_c::~eap_am_general_settings_symbian_c()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::~eap_am_general_settings_symbian_c(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_general_settings_symbian_c::~eap_am_general_settings_symbian_c()");
+
+	EAP_UNREFERENCED_PARAMETER(KGeneralsettingsDatabaseName_8bit);
+
+	EAP_UNREFERENCED_PARAMETER(KGeneralSettingsTableName_8bit);
+
+	CloseGeneralSettings();
+
+	EAP_ASSERT(m_shutdown_was_called == true);
+}
+
+// ----------------------------------------------------------------------
+
+bool eap_am_general_settings_symbian_c::get_is_valid()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::get_is_valid(): this=0x%08x, m_is_valid=%d.\n"),
+		this,
+		m_is_valid));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_general_settings_symbian_c::get_is_valid()");
+
+	return m_is_valid;
+}
+
+// ----------------------------------------------------------------------
+
+// This is documented in abs_eap_stack_interface_c::configure().
+eap_status_e eap_am_general_settings_symbian_c::configure()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::configure(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_general_settings_symbian_c::configure()");
+
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+// ----------------------------------------------------------------------
+
+// This is documented in abs_eap_stack_interface_c::shutdown().
+eap_status_e eap_am_general_settings_symbian_c::shutdown()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::shutdown(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_general_settings_symbian_c::shutdown()");
+
+	delete iCertificateFetcher;
+	iCertificateFetcher = 0;
+
+	m_shutdown_was_called = true;
+
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+// ----------------------------------------------------------------------
+
+void eap_am_general_settings_symbian_c::CloseGeneralSettings()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::CloseGeneralSettings(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_general_settings_symbian_c::CloseGeneralSettings()");
+
+	iGeneralSettingsDb.Close();
+	iGeneralSettingsDbCreated = EFalse;
+
+	iGeneralSettingsFileServerSession.Close();
+	iGeneralSettingsSessionOpened = EFalse;
+}
+
+// ----------------------------------------------------------------------
+
+void eap_am_general_settings_symbian_c::OpenGeneralSettingsL()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::OpenGeneralSettingsL(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_general_settings_symbian_c::OpenGeneralSettingsL()");
+
+	if(iGeneralSettingsDbCreated == EFalse
+		|| iGeneralSettingsSessionOpened == EFalse)
+	{
+		// The general settings store DB and tables are not created. So create it.
+		CreateGeneralSettingsL();
+	}
+}
+
+// ----------------------------------------------------------------------
+
+void eap_am_general_settings_symbian_c::CreateGeneralSettingsL()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::CreateGeneralSettingsL(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_general_settings_symbian_c::CreateGeneralSettingsL()");
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	// 1. Open/create a database
+
+	TInt error(KErrNone);
+
+	// Connect to the DBMS server, if not connected already.
+	if(iGeneralSettingsSessionOpened == EFalse)
+	{
+		error = iGeneralSettingsFileServerSession.Connect();
+		(void)EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(error));
+		User::LeaveIfError(error);
+
+		iGeneralSettingsSessionOpened = ETrue;
+	}
+
+	TFileName aPrivateDatabasePathName;
+
+	EapPluginTools::CreateDatabaseLC(
+		iGeneralSettingsDb,
+		iGeneralSettingsFileServerSession,
+		error,
+		KGeneralsettingsDatabaseName,
+		aPrivateDatabasePathName);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::CreateGeneralSettingsL() - Created Secure DB for %S. error=%d (-11=DB already exist)\n"),
+		&KGeneralsettingsDatabaseName_8bit,
+		error) );
+
+	if(error == KErrNone)
+	{
+		// Database is closed if it was created in EapPluginTools::CreateDatabaseLC().
+		// If database exists it was not opened in EapPluginTools::CreateDatabaseLC().
+		iGeneralSettingsDb.Close();
+	}
+	else if (error != KErrAlreadyExists)
+	{
+		(void)EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(error));
+		User::LeaveIfError(error);
+	}
+
+	error = iGeneralSettingsDb.Open(iGeneralSettingsFileServerSession, aPrivateDatabasePathName);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::CreateGeneralSettingsL() - Open Secure DB for %S. error=%d (-11=DB already exist)\n"),
+		&KGeneralsettingsDatabaseName_8bit,
+		error) );
+
+	User::LeaveIfError(error);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	// 2. Create the tables to database (ignore error if tables exist)
+
+	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
+	TPtr sqlStatement = buf->Des();
+
+	// Create table for enabled and disabled EAP-types.
+
+	//// NAME //////////////////// TYPE ///////////// Constant ////////////////////
+	//| ServiceType				| UNSIGNED INTEGER | KServiceType				|//
+	//| ServiceIndex			| UNSIGNED INTEGER | KServiceIndex				|//
+	//| Enabled EAP-methods		| LONG VARBINARY   | KEapMethodEnabledValue		|//
+	//| Disabled EAP-methods	| LONG VARBINARY   | KEapMethodDisabledValue	|//
+	///////////////////////////////////////////////////////////////////////////////
+
+	_LIT(KSQLCreateTable2, "CREATE TABLE %S (%S UNSIGNED INTEGER, \
+		%S UNSIGNED INTEGER, \
+		%S LONG VARBINARY, \
+		%S LONG VARBINARY)");
+
+	sqlStatement.Format(
+		KSQLCreateTable2,
+		&KGeneralSettingsTableName,
+		&KServiceType,
+		&KServiceIndex,
+		&KEapMethodEnabledValue,
+		&KEapMethodDisabledValue);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::CreateGeneralSettingsL() - SQL query formated OK\n")));
+
+	error = iGeneralSettingsDb.Execute(sqlStatement);
+	if (error != KErrNone
+		&& error != KErrAlreadyExists)
+	{
+		(void)EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(error));
+		User::Leave(error);
+	}
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::CreateGeneralSettingsL() Created Groups table\n")));
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	CleanupStack::PopAndDestroy( buf );
+	CleanupStack::Pop(&iGeneralSettingsDb);
+	CleanupStack::Pop(&iGeneralSettingsFileServerSession);
+
+	iGeneralSettingsDbCreated = ETrue;
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::CreateGeneralSettingsL(): End \n")));	
+
+} // eap_am_general_settings_symbian_c::CreateGeneralSettingsL()
+
+// ----------------------------------------------------------------------
+
+void eap_am_general_settings_symbian_c::GetGeneralSettingsLongBinaryL(
+	RDbView &aViev,
+	const TDesC &aColName,
+	HBufC8** const aMethods)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::GetGeneralSettingsLongBinaryL(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_general_settings_symbian_c::GetGeneralSettingsLongBinaryL()");
+
+	// Get column set so we get the correct column numbers
+	CDbColSet* colSet = aViev.ColSetL();
+	CleanupStack::PushL(colSet);
+
+	TDbColNo colNoReference = 0;
+	colNoReference = colSet->ColNo(aColName);
+
+	switch (aViev.ColType(colNoReference))
+	{
+		case EDbColLongBinary:
+		{
+			EAP_TRACE_DATA_DEBUG(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("eap_am_general_settings_symbian_c::GetGeneralSettingsLongBinaryL() - Long Binary column"),
+				aColName.Ptr(),
+				aColName.Size()));
+
+			// A stream is needed for LONG columns in DB.
+			RDbColReadStream readStream;
+
+			// Get the value from DB.
+			HBufC8* valueBuf = HBufC8::NewLC(aViev.ColLength(colNoReference)); // Buffer for the data.
+			TPtr8 value8 = valueBuf->Des();
+
+			readStream.OpenLC(aViev, colNoReference);
+			readStream.ReadL(value8, aViev.ColLength(colNoReference));
+			readStream.Close();
+			CleanupStack::PopAndDestroy(&readStream);
+
+			EAP_TRACE_DATA_DEBUG(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("eap_am_general_settings_symbian_c::GetGeneralSettingsLongBinaryL(): LONG BINARY value from DB"),
+				value8.Ptr(), 
+				value8.Size()));
+
+			*aMethods = HBufC8::New(value8.Size());
+
+			// This to avoid the use of clean up stack for output parameter.
+			if ((*aMethods) != 0)
+			{
+				TPtr8 aDbBinaryColumnValuePtr = (*aMethods)->Des();			
+
+				aDbBinaryColumnValuePtr.Copy(value8);
+
+				EAP_TRACE_DATA_DEBUG(
+					m_am_tools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("eap_am_general_settings_symbian_c::GetGeneralSettingsLongBinaryL(): LONG BINARY value to caller"),
+					aDbBinaryColumnValuePtr.Ptr(), 
+					aDbBinaryColumnValuePtr.Size()));
+			}
+			else
+			{
+				User::Leave(KErrNoMemory);
+			}
+
+			CleanupStack::PopAndDestroy(valueBuf);
+
+			break;
+		}
+		default:
+			EAP_TRACE_ERROR(
+				m_am_tools,
+				TRACE_FLAGS_ERROR,
+				(EAPL("ERROR: eap_am_general_settings_symbian_c::GetGeneralSettingsLongBinaryL(): Unsupported DB field:%d = %S\n"),
+				aViev.ColType(colNoReference),
+				&aColName));	
+
+			User::Leave(KErrNotSupported);
+			break;
+	} // End: switch ()
+
+	CleanupStack::PopAndDestroy(colSet);
+}
+
+// ----------------------------------------------------------------------
+
+void eap_am_general_settings_symbian_c::GetGeneralSettingsDataL(
+	const TUint indexType,
+	const TUint index,
+	HBufC8** const aEnabledEapMethods,
+	HBufC8** const aDisabledEapMethods)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::GetGeneralSettingsDataL(): iGeneralSettingsSessionOpened=%d, iGeneralSettingsDbCreated=%d"),
+		iGeneralSettingsSessionOpened,
+		iGeneralSettingsDbCreated));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_general_settings_symbian_c::GetGeneralSettingsDataL()");
+
+	*aEnabledEapMethods = 0;
+	*aDisabledEapMethods = 0;
+
+	if(iGeneralSettingsSessionOpened == EFalse)
+	{
+		EAP_TRACE_ERROR(
+			m_am_tools,
+			TRACE_FLAGS_ERROR,
+			(EAPL("eap_am_general_settings_symbian_c::GetGeneralSettingsDataL(): ERROR: General settings session not opened!")));
+
+		User::Leave(KErrSessionClosed);
+	}	
+
+	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
+	TPtr sqlStatement = buf->Des();
+
+	sqlStatement.Format(
+		KSQL,
+		&KServiceType,
+		&KServiceIndex,
+		&KEapMethodEnabledValue,
+		&KEapMethodDisabledValue,
+		&KGeneralSettingsTableName,
+		&KServiceType,
+		indexType,
+		&KServiceIndex,
+		index);
+
+
+	RDbView view;
+
+	User::LeaveIfError(view.Prepare(
+		iGeneralSettingsDb, 
+		TDbQuery(sqlStatement), 
+		TDbWindow::EUnlimited,
+		RDbView::EReadOnly));
+
+	CleanupClosePushL(view);
+
+	User::LeaveIfError(view.EvaluateAll());
+
+	if (view.IsEmptyL())
+	{				
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_am_general_settings_symbian_c::GetGeneralSettingsDataL(): No entries in this table (%S) RETURN EMPTY VALUE"),
+			&KGeneralSettingsTableName_8bit));
+
+		EAP_TRACE_DATA_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_am_general_settings_symbian_c::GetGeneralSettingsDataL():sqlStatement"),
+			sqlStatement.Ptr(), 
+			sqlStatement.Size()));
+
+		CleanupStack::PopAndDestroy(&view);
+
+		CleanupStack::PopAndDestroy(buf);	
+
+		return;
+	}
+	else
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_am_general_settings_symbian_c::GetGeneralSettingsDataL(): Number of entries in table %S=%d"),
+			&KGeneralSettingsTableName_8bit, view.CountL()));
+	}
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::GetGeneralSettingsDataL() - view evaluated OK\n")));
+
+
+	if (view.FirstL())
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_am_general_settings_symbian_c::GetGeneralSettingsDataL() - First OK\n")));
+
+		view.GetL();
+
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_am_general_settings_symbian_c::GetGeneralSettingsDataL() - First Got\n")));
+
+		GetGeneralSettingsLongBinaryL(view, KEapMethodEnabledValue, aEnabledEapMethods);
+
+		GetGeneralSettingsLongBinaryL(view, KEapMethodDisabledValue, aDisabledEapMethods);
+	}
+
+	CleanupStack::PopAndDestroy( &view );
+
+	CleanupStack::PopAndDestroy(buf); // We don't need buf or sqlStatement any more.
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::GetGeneralSettingsDataL(): End")));	
+}
+
+// ----------------------------------------------------------------------
+
+void eap_am_general_settings_symbian_c::SetGeneralSettingsLongBinaryL(
+	RDbView &aViev,
+	const TDesC &aColName,
+	const TDesC8& aMethods)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::SetGeneralSettingsLongBinaryL(): iGeneralSettingsSessionOpened=%d, iGeneralSettingsDbCreated=%d"),
+		iGeneralSettingsSessionOpened,
+		iGeneralSettingsDbCreated));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_general_settings_symbian_c::SetGeneralSettingsLongBinaryL()");
+
+	// Get column set so we get the correct column numbers
+	CDbColSet* colSet = aViev.ColSetL();
+	CleanupStack::PushL(colSet);
+
+	TDbColNo colNoReference = 0;
+	colNoReference = colSet->ColNo(aColName);
+
+	switch (aViev.ColType(colNoReference))
+	{
+		case EDbColLongBinary:
+		{
+			EAP_TRACE_DATA_DEBUG(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("eap_am_general_settings_symbian_c::SetGeneralSettingsLongBinaryL() - Long Binary column"),
+				aColName.Ptr(), 
+				aColName.Size()));
+
+			// A stream is needed for LONG columns in DB.
+			RDbColWriteStream writeStream;					
+			writeStream.OpenLC( aViev, colNoReference );
+			writeStream.WriteL( aMethods );
+			writeStream.Close();
+			CleanupStack::PopAndDestroy( &writeStream );
+			break;
+		}
+		default:
+			EAP_TRACE_ERROR(
+				m_am_tools,
+				TRACE_FLAGS_ERROR,
+				(EAPL("eap_am_general_settings_symbian_c::SetGeneralSettingsLongBinaryL(): ERROR: Unsupported DB field:%d = %S\n"),
+				aViev.ColType(colNoReference),
+				&aColName));	
+
+			User::Leave(KErrNotSupported);
+			break;
+
+	} // End: switch (aViev.ColType(colNoReference))
+
+	CleanupStack::PopAndDestroy(colSet);
+}
+
+//-------------------------------------------------------------
+
+void eap_am_general_settings_symbian_c::SetGeneralSettingsDataL(
+	const TUint indexType,
+	const TUint index,
+	const TDesC8& aEnabledEapMethods,
+	const TDesC8& aDisabledEapMethods)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::SetGeneralSettingsDataL(): iGeneralSettingsSessionOpened=%d, iGeneralSettingsDbCreated=%d"),
+		iGeneralSettingsSessionOpened, iGeneralSettingsDbCreated));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_general_settings_symbian_c::SetGeneralSettingsDataL()");
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::SetGeneralSettingsDataL(): Set this value in general settings DB"),
+		aEnabledEapMethods.Ptr(),
+		aEnabledEapMethods.Size()));
+
+	if(iGeneralSettingsSessionOpened == EFalse)
+	{
+		EAP_TRACE_ERROR(
+			m_am_tools,
+			TRACE_FLAGS_ERROR,
+			(EAPL("eap_am_general_settings_symbian_c::SetGeneralSettingsDataL(): ERROR: General settings session not opened!")));
+
+		User::Leave(KErrSessionClosed);
+	}	
+
+	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
+	TPtr sqlStatement = buf->Des();
+
+	sqlStatement.Format(
+		KSQL,
+		&KServiceType,
+		&KServiceIndex,
+		&KEapMethodEnabledValue,
+		&KEapMethodDisabledValue,
+		&KGeneralSettingsTableName,
+		&KServiceType,
+		indexType,
+		&KServiceIndex,
+		index);
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::SetGeneralSettingsDataL():sqlStatement"),
+		sqlStatement.Ptr(), 
+		sqlStatement.Size()));
+
+	RDbView view;
+
+	User::LeaveIfError(view.Prepare(
+		iGeneralSettingsDb, 
+		TDbQuery(sqlStatement), 
+		TDbWindow::EUnlimited,
+		RDbView::EUpdatable));
+
+	CleanupClosePushL(view);
+
+	User::LeaveIfError(view.EvaluateAll());
+
+	{	
+		if(view.ColCount() != KDefaultColumnInView_One)
+		{
+			EAP_TRACE_ERROR(
+				m_am_tools,
+				TRACE_FLAGS_ERROR,
+				(EAPL("eap_am_general_settings_symbian_c::SetGeneralSettingsDataL(): ERROR: Problem with rows or columns in DB view, view.IsEmptyL()=%d, row count=%d, col count=%d \n"),
+				view.IsEmptyL(),
+				view.CountL(),
+				view.ColCount()));	
+
+			User::Leave(KErrNotFound);				
+		}	
+
+		if (view.FirstL())
+		{
+			view.UpdateL(); // Here it is update.
+		}
+		else
+		{
+			view.InsertL(); // Here it is insert.
+		}
+
+		{
+			CDbColSet* colSet = view.ColSetL();
+			CleanupStack::PushL(colSet);		
+
+			TDbColNo colNoServiceType = 0;
+			TDbColNo colNoServiceIndex = 0;
+
+			colNoServiceType = colSet->ColNo(KServiceType);
+			colNoServiceIndex = colSet->ColNo(KServiceIndex);		
+			
+			CleanupStack::PopAndDestroy(colSet); // delete colSet.
+
+			view.SetColL(colNoServiceType, indexType);
+			view.SetColL(colNoServiceIndex, index);
+
+			SetGeneralSettingsLongBinaryL(view,	KEapMethodEnabledValue, aEnabledEapMethods);
+
+			SetGeneralSettingsLongBinaryL(view,	KEapMethodDisabledValue, aDisabledEapMethods);
+		}
+	}
+
+	// Now it should go to the DB.
+	view.PutL();	
+
+	CleanupStack::PopAndDestroy( &view );
+
+	CleanupStack::PopAndDestroy(buf);
+}
+
+//-------------------------------------------------------------
+
+void eap_am_general_settings_symbian_c::DeleteGeneralSettingsDataL(
+	const TUint indexType,
+	const TUint index)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::DeleteGeneralSettingsDataL(): iGeneralSettingsSessionOpened=%d, iGeneralSettingsDbCreated=%d"),
+		iGeneralSettingsSessionOpened, iGeneralSettingsDbCreated));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_general_settings_symbian_c::DeleteGeneralSettingsDataL()");
+
+	if(iGeneralSettingsSessionOpened == EFalse)
+	{
+		EAP_TRACE_ERROR(
+			m_am_tools,
+			TRACE_FLAGS_ERROR,
+			(EAPL("eap_am_general_settings_symbian_c::DeleteGeneralSettingsDataL(): ERROR: General settings session not opened!")));
+
+		User::Leave(KErrSessionClosed);
+	}	
+
+	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
+	TPtr sqlStatement = buf->Des();
+
+	sqlStatement.Format(
+		KSQL,
+		&KServiceType,
+		&KServiceIndex,
+		&KEapMethodEnabledValue,
+		&KEapMethodDisabledValue,
+		&KGeneralSettingsTableName,
+		&KServiceType,
+		indexType,
+		&KServiceIndex,
+		index);
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::DeleteGeneralSettingsDataL():sqlStatement"),
+		sqlStatement.Ptr(), 
+		sqlStatement.Size()));
+
+	RDbView view;
+
+	User::LeaveIfError(view.Prepare(
+		iGeneralSettingsDb, 
+		TDbQuery(sqlStatement), 
+		TDbWindow::EUnlimited,
+		RDbView::EUpdatable));
+
+	CleanupClosePushL(view);
+
+	User::LeaveIfError(view.EvaluateAll());
+
+	{	
+		// Delete old row and also rows that are for same IAP.
+		if (view.FirstL())
+		{
+			CDbColSet* colSet = view.ColSetL();
+			CleanupStack::PushL(colSet);		
+
+			do {
+				view.GetL();
+
+				if (view.ColUint32(colSet->ColNo(KServiceType)) == static_cast<TUint>(indexType)
+						&& view.ColUint32(colSet->ColNo(KServiceIndex)) == static_cast<TUint>(index))
+				{	
+					view.DeleteL();	
+				}
+				
+			} while (view.NextL() != EFalse);
+
+			CleanupStack::PopAndDestroy(colSet); // delete colSet.
+		}
+	}
+
+	CleanupStack::PopAndDestroy( &view );
+
+	CleanupStack::PopAndDestroy(buf);
+}
+
+// ----------------------------------------------------------------------
+
+void eap_am_general_settings_symbian_c::CopyGeneralSettingsDataL(
+	const TUint aSourceIndexType,
+	const TUint aSourceIndex,
+	const TUint aDestinationIndexType,
+	const TUint aDestinationIndex)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::CopyGeneralSettingsDataL(): iGeneralSettingsSessionOpened=%d, iGeneralSettingsDbCreated=%d"),
+		iGeneralSettingsSessionOpened, iGeneralSettingsDbCreated));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_general_settings_symbian_c::CopyGeneralSettingsDataL()");
+
+	if(iGeneralSettingsSessionOpened == EFalse)
+	{
+		EAP_TRACE_ERROR(
+			m_am_tools,
+			TRACE_FLAGS_ERROR,
+			(EAPL("eap_am_general_settings_symbian_c::CopyGeneralSettingsDataL(): ERROR: General settings session not opened!")));
+
+		User::Leave(KErrSessionClosed);
+	}
+
+	if (aSourceIndexType == aDestinationIndexType
+		&& aSourceIndex == aDestinationIndex)
+	{
+		EAP_TRACE_ERROR(
+			m_am_tools,
+			TRACE_FLAGS_ERROR,
+			(EAPL("eap_am_general_settings_symbian_c::CopyGeneralSettingsDataL(): ERROR: aSourceIndexType == aDestinationIndexType && aSourceIndex == aDestinationIndex")));
+
+		User::Leave(KErrArgument);
+	}
+
+	HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
+	TPtr sqlStatement = buf->Des();
+
+	sqlStatement.Format(
+		KSQL,
+		&KServiceType,
+		&KServiceIndex,
+		&KEapMethodEnabledValue,
+		&KEapMethodDisabledValue,
+		&KGeneralSettingsTableName,
+		&KServiceType,
+		aDestinationIndexType,
+		&KServiceIndex,
+		aDestinationIndex);
+
+	EAP_TRACE_DATA_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::CopyGeneralSettingsDataL():sqlStatement"),
+		sqlStatement.Ptr(), 
+		sqlStatement.Size()));
+
+	RDbView view;
+
+	User::LeaveIfError(view.Prepare(
+		iGeneralSettingsDb, 
+		TDbQuery(sqlStatement), 
+		TDbWindow::EUnlimited,
+		RDbView::EUpdatable));
+
+	CleanupClosePushL(view);
+
+	User::LeaveIfError(view.EvaluateAll());
+
+	{	
+		// Delete destination old data.
+		if (view.FirstL())
+		{
+			CDbColSet* colSet = view.ColSetL();
+			CleanupStack::PushL(colSet);
+
+  			do 
+  			{
+	  			view.GetL();
+
+				if (view.ColUint(colSet->ColNo(KServiceType)) == static_cast<TUint>(aDestinationIndexType)
+					&& view.ColUint(colSet->ColNo(KServiceIndex)) == static_cast<TUint>(aDestinationIndex))
+				{  		
+      				EAP_TRACE_DEBUG_SYMBIAN((_L("eap_am_general_settings_symbian_c::CopyGeneralSettingsDataL(): Delete old records\n") ) );
+      				view.DeleteL();
+   				}
+			}
+			while (view.NextL() != EFalse);
+
+			view.Close();
+
+			CleanupStack::PopAndDestroy(colSet); // delete colSet.
+		}
+
+		sqlStatement.Format(
+			KSQL,
+			&KServiceType,
+			&KServiceIndex,
+			&KEapMethodEnabledValue,
+			&KEapMethodDisabledValue,
+			&KGeneralSettingsTableName,
+			&KServiceType,
+			aSourceIndexType,
+			&KServiceIndex,
+			aSourceIndex);
+
+		EAP_TRACE_DATA_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_am_general_settings_symbian_c::CopyGeneralSettingsDataL():sqlStatement"),
+			sqlStatement.Ptr(), 
+			sqlStatement.Size()));
+
+		User::LeaveIfError(view.Prepare(
+			iGeneralSettingsDb, 
+			TDbQuery(sqlStatement), 
+			TDbWindow::EUnlimited,
+			RDbView::EUpdatable));
+
+		User::LeaveIfError(view.EvaluateAll());
+
+		// Copy source row to destination.
+		if (view.FirstL())
+		{
+			CDbColSet* colSet = view.ColSetL();
+			CleanupStack::PushL(colSet);
+			TDbBookmark bookmark;
+
+			do
+			{
+				view.GetL();
+
+				if (view.ColUint32(colSet->ColNo(KServiceType)) == static_cast<TUint>(aSourceIndexType)
+						&& view.ColUint32(colSet->ColNo(KServiceIndex)) == static_cast<TUint>(aSourceIndex))
+				{	
+					bookmark = view.Bookmark();
+					
+					view.InsertCopyL();
+					
+					view.SetColL(colSet->ColNo(KServiceType), static_cast<TUint>(aDestinationIndexType));
+	    			view.SetColL(colSet->ColNo(KServiceIndex), static_cast<TUint>(aDestinationIndex));
+					
+					view.PutL();
+				
+					view.GotoL(bookmark);
+				}
+				
+			}
+			while (view.NextL() != EFalse);
+
+			CleanupStack::PopAndDestroy(colSet); // delete colSet.
+		}
+	}
+
+	CleanupStack::PopAndDestroy( &view );
+
+	CleanupStack::PopAndDestroy(buf);
+}
+
+// ----------------------------------------------------------------------
+
+eap_status_e eap_am_general_settings_symbian_c::error_complete(
+	const eap_status_e completion_status,
+	const eap_method_settings_c * const internal_settings,
+	const eap_tlv_message_type_function_e error_completion_function)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::error_complete(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_general_settings_symbian_c::error_complete()");
+
+	CloseGeneralSettings();
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::error_complete(): this=0x%08x, CloseGeneralSettings()\n"),
+		this));
+
+	if (internal_settings == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	eap_method_settings_c * const complete_settings = new eap_method_settings_c(m_am_tools, internal_settings);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_complete_settings(
+		m_am_tools,
+		complete_settings);
+
+	if (complete_settings == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	complete_settings->m_completion_status = completion_status;
+
+	eap_status_e status(eap_status_not_supported);
+
+	switch(error_completion_function)
+	{
+	case eap_tlv_message_type_function_general_settings_complete_get_eap_methods:
+		status = m_partner->complete_get_eap_methods(complete_settings);
+		break;
+	case eap_tlv_message_type_function_general_settings_complete_set_eap_methods:
+		status = m_partner->complete_set_eap_methods(complete_settings);
+		break;
+	case eap_tlv_message_type_function_general_settings_complete_get_certificate_lists:
+		status = m_partner->complete_get_certificate_lists(complete_settings);
+		break;
+	case eap_tlv_message_type_function_general_settings_complete_delete_all_eap_settings:
+		status = m_partner->complete_delete_all_eap_settings(complete_settings);
+		break;
+	case eap_tlv_message_type_function_general_settings_complete_copy_all_eap_settings:
+		status = m_partner->complete_copy_all_eap_settings(complete_settings);
+		break;
+	default:
+		EAP_TRACE_ERROR(
+			m_am_tools,
+			TRACE_FLAGS_ERROR,
+			(EAPL("ERROR: eap_am_general_settings_symbian_c::error_complete(): unknown function %d.\n"),
+			 error_completion_function));
+
+		EAP_ASSERT_ANYWAY_TOOLS(m_am_tools);
+
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+// ----------------------------------------------------------------------
+
+eap_status_e eap_am_general_settings_symbian_c::filter_eap_methods(
+	eap_array_c<eap_type_value_e> * const eap_methods,
+	RPointerArray<TEapExpandedType> * const aPlugins)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::filter_eap_methods(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_general_settings_symbian_c::filter_eap_methods()");
+
+	eap_status_e status(eap_status_ok);
+
+	for (TInt act_ind = 0; act_ind < eap_methods->get_object_count(); ++act_ind)
+	{
+		const eap_type_value_e * active_type = eap_methods->get_object(act_ind);
+		if (active_type == 0)
+		{
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+		}
+
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_am_general_settings_symbian_c::filter_eap_methods(): eap_methods[%d] EAP-type=0xfe%06x%08x\n"),
+			act_ind,
+			active_type->get_vendor_id(),
+			active_type->get_vendor_type()));
+
+		bool exists(false);
+
+		for (TInt plugin_ind = 0; plugin_ind < aPlugins->Count(); ++plugin_ind)
+		{
+			const TEapExpandedType * eap_type = (*aPlugins)[plugin_ind];
+			if (eap_type == 0)
+			{
+				return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+			}
+
+			EAP_TRACE_DEBUG_SYMBIAN((_L("eap_am_general_settings_symbian_c::filter_eap_methods(): aPlugins[%d] EAP-type=0xfe%06x%08x\n"),
+				plugin_ind,
+				eap_type->GetVendorId(),
+				eap_type->GetVendorType()));
+
+			const eap_type_value_e common_eap_type(
+				static_cast<eap_type_vendor_id_e>(eap_type->GetVendorId()),
+				eap_type->GetVendorType());
+
+			if (common_eap_type == *active_type)
+			{
+				// OK, this active EAP-method have implementation.
+				exists = true;
+
+				EAP_TRACE_DEBUG(
+					m_am_tools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("eap_am_general_settings_symbian_c::filter_eap_methods(): Removes from aPlugins EAP-type=0xfe%06x%08x\n"),
+					common_eap_type.get_vendor_id(),
+					common_eap_type.get_vendor_type()));
+
+				// Remove this plugin EAP-method because it is in the list of EAP-methods.
+				delete (*aPlugins)[plugin_ind];
+				aPlugins->Remove(plugin_ind);
+
+				break;
+			}
+		} // for()
+
+		if (exists == false)
+		{
+			// Remove this EAP-method because there are no implementation.
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("eap_am_general_settings_symbian_c::filter_eap_methods(): Removes from eap_methods EAP-type=0xfe%06x%08x\n"),
+				active_type->get_vendor_id(),
+				active_type->get_vendor_type()));
+
+			status = eap_methods->remove_object(act_ind);
+			if (status != eap_status_ok)
+			{
+				return EAP_STATUS_RETURN(m_am_tools, status);
+			}
+
+			--act_ind;
+		}
+	} // for()
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+// ----------------------------------------------------------------------
+
+eap_status_e eap_am_general_settings_symbian_c::read_eap_methods_synchronously(
+	const TUint indexType,
+	const TUint index,
+	eap_array_c<eap_type_value_e> * const aEnabledEapMethodsArray,
+	eap_array_c<eap_type_value_e> * const aDisabledEapMethodsArray)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::read_eap_methods_synchronously(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_general_settings_symbian_c::read_eap_methods_synchronously()");
+
+	TInt error = KErrNone;
+
+	TRAP(error, (OpenGeneralSettingsL()));
+
+	if (error != KErrNone)
+	{
+		EAP_TRACE_ERROR(
+			m_am_tools,
+			TRACE_FLAGS_ERROR,
+			(EAPL("ERROR: eap_am_general_settings_symbian_c::read_eap_methods_synchronously(): OpenGeneralSettingsL() failed, indexType=%d, index=%d, error=%d.\n"),
+			indexType,
+			index,
+			error));
+
+		CloseGeneralSettings();
+
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_am_general_settings_symbian_c::read_eap_methods_synchronously(): this=0x%08x, CloseGeneralSettings()\n"),
+			this));
+
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			m_am_tools->convert_am_error_to_eapol_error(error));
+	}
+
+
+	HBufC8 *aEnabledEapMethods = 0;
+	HBufC8 *aDisabledEapMethods = 0;
+
+	// The output parameters aEnabledEapMethods and aDisabledEapMethods are NOT in clean up stack.
+	TRAP(error, (GetGeneralSettingsDataL(
+		indexType,
+		index,
+		&aEnabledEapMethods,
+		&aDisabledEapMethods)));
+
+	eap_automatic_variable_c<HBufC8> automatic_aEnabledEapMethods(
+		m_am_tools,
+		aEnabledEapMethods);
+
+	eap_automatic_variable_c<HBufC8> automatic_aDisabledEapMethods(
+		m_am_tools,
+		aDisabledEapMethods);
+
+	if (error != KErrNone)
+	{
+		EAP_TRACE_ERROR(
+			m_am_tools,
+			TRACE_FLAGS_ERROR,
+			(EAPL("ERROR: eap_am_general_settings_symbian_c::read_eap_methods_synchronously(): GetGeneralSettingsDataL() failed, index_type=%d, index=%d, error=%d.\n"),
+			indexType,
+			index,
+			error));
+
+		CloseGeneralSettings();
+
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_am_general_settings_symbian_c::read_eap_methods_synchronously(): this=0x%08x, CloseGeneralSettings()\n"),
+			this));
+
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			m_am_tools->convert_am_error_to_eapol_error(error));
+	}
+
+	if (aEnabledEapMethods != 0)
+	{
+		error = CEapConversion::ConvertHBufC8ToInternalTypes(
+			m_am_tools,
+			aEnabledEapMethods,
+			aEnabledEapMethodsArray);
+
+		if (error != KErrNone)
+		{
+			EAP_TRACE_ERROR(
+				m_am_tools,
+				TRACE_FLAGS_ERROR,
+				(EAPL("ERROR: eap_am_general_settings_symbian_c::read_eap_methods_synchronously(): index_type=%d, index=%d.\n"),
+				indexType,
+				index));
+
+			CloseGeneralSettings();
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("eap_am_general_settings_symbian_c::read_eap_methods_synchronously(): this=0x%08x, CloseGeneralSettings()\n"),
+				this));
+
+			return EAP_STATUS_RETURN(
+				m_am_tools,
+				m_am_tools->convert_am_error_to_eapol_error(error));
+		}
+	}
+
+	if (aDisabledEapMethods != 0)
+	{
+		error = CEapConversion::ConvertHBufC8ToInternalTypes(
+			m_am_tools,
+			aDisabledEapMethods,
+			aDisabledEapMethodsArray);
+
+		if (error != KErrNone)
+		{
+			EAP_TRACE_ERROR(
+				m_am_tools,
+				TRACE_FLAGS_ERROR,
+				(EAPL("ERROR: eap_am_general_settings_symbian_c::read_eap_methods_synchronously(): index_type=%d, index=%d.\n"),
+				indexType,
+				index));
+
+			CloseGeneralSettings();
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("eap_am_general_settings_symbian_c::read_eap_methods_synchronously(): this=0x%08x, CloseGeneralSettings()\n"),
+				this));
+
+			return EAP_STATUS_RETURN(
+				m_am_tools,
+				m_am_tools->convert_am_error_to_eapol_error(error));
+		}
+	}
+
+	iGeneralSettingsDb.Compact();
+
+	CloseGeneralSettings();
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::read_eap_methods_synchronously(): this=0x%08x, CloseGeneralSettings()\n"),
+		this));
+
+	return EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(error));
+}
+
+// ----------------------------------------------------------------------
+
+eap_status_e eap_am_general_settings_symbian_c::get_eap_methods(const eap_method_settings_c * const internal_settings)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::get_eap_methods(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_general_settings_symbian_c::get_eap_methods()");
+
+	const eap_tlv_message_type_function_e error_completion_function(eap_tlv_message_type_function_general_settings_complete_get_eap_methods);
+
+	HBufC8 *aEnabledEapMethods = 0;
+	HBufC8 *aDisabledEapMethods = 0;
+
+	TInt error(KErrNone);
+	eap_status_e status(eap_status_ok);
+
+	TRAP(error, (OpenGeneralSettingsL()));
+
+	if (error != KErrNone)
+	{
+		EAP_TRACE_ERROR(
+			m_am_tools,
+			TRACE_FLAGS_ERROR,
+			(EAPL("ERROR: eap_am_general_settings_symbian_c::get_eap_methods(): OpenGeneralSettingsL() failed, EAP-type=0xfe%06x%08x, index_type=%d, index=%d, error=%d.\n"),
+			internal_settings->m_EAPType.get_vendor_id(),
+			internal_settings->m_EAPType.get_vendor_type(),
+			internal_settings->m_IndexType,
+			internal_settings->m_Index,
+			error));
+
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				m_am_tools->convert_am_error_to_eapol_error(error),
+				internal_settings,
+				error_completion_function));
+	}
+
+
+	// The output parameters aEnabledEapMethods and aDisabledEapMethods are NOT in clean up stack.
+	TRAP(error, (GetGeneralSettingsDataL(
+		internal_settings->m_IndexType,
+		internal_settings->m_Index,
+		&aEnabledEapMethods,
+		&aDisabledEapMethods)));
+
+	eap_automatic_variable_c<HBufC8> automatic_aEnabledEapMethods(
+		m_am_tools,
+		aEnabledEapMethods);
+
+	eap_automatic_variable_c<HBufC8> automatic_aDisabledEapMethods(
+		m_am_tools,
+		aDisabledEapMethods);
+
+	if (error != KErrNone)
+	{
+		EAP_TRACE_ERROR(
+			m_am_tools,
+			TRACE_FLAGS_ERROR,
+			(EAPL("ERROR: eap_am_general_settings_symbian_c::get_eap_methods(): GetGeneralSettingsDataL() failed, EAP-type=0xfe%06x%08x, index_type=%d, index=%d, error=%d.\n"),
+			internal_settings->m_EAPType.get_vendor_id(),
+			internal_settings->m_EAPType.get_vendor_type(),
+			internal_settings->m_IndexType,
+			internal_settings->m_Index,
+			error));
+
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				m_am_tools->convert_am_error_to_eapol_error(error),
+				internal_settings,
+				error_completion_function));
+	}
+
+
+	RPointerArray<TEapExpandedType> plugins_array;
+
+	PointerArrayResetAndDestroy<TEapExpandedType> aAutomaticPlugins(&plugins_array, EFalse);
+
+	EapPluginTools aPluginTool;
+
+	TEapExpandedType aTunnelingType(*EapExpandedTypeNone.GetType());
+
+	TRAP(error, (aPluginTool.ListAllEapPluginsL(aTunnelingType, plugins_array)));
+	if (error != KErrNone)
+	{
+		EAP_TRACE_ERROR(
+			m_am_tools,
+			TRACE_FLAGS_ERROR,
+			(EAPL("ERROR: eap_am_general_settings_symbian_c::get_eap_methods(): aPluginTool.ListAllEapPluginsL() failed, EAP-type=0xfe%06x%08x, index_type=%d, index=%d, error=%d.\n"),
+			internal_settings->m_EAPType.get_vendor_id(),
+			internal_settings->m_EAPType.get_vendor_type(),
+			internal_settings->m_IndexType,
+			internal_settings->m_Index,
+			error));
+
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				m_am_tools->convert_am_error_to_eapol_error(error),
+				internal_settings,
+				error_completion_function));
+	}
+
+	eap_method_settings_c * const complete_settings = new eap_method_settings_c(m_am_tools);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_complete_settings(
+		m_am_tools,
+		complete_settings);
+
+	if (complete_settings == 0)
+	{
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				eap_status_allocation_error,
+				internal_settings,
+				error_completion_function));
+	}
+
+	if (aEnabledEapMethods != 0)
+	{
+		error = CEapConversion::ConvertHBufC8ToInternalTypes(
+			m_am_tools,
+			aEnabledEapMethods,
+			&(complete_settings->m_active_eap_methods));
+
+		if (error != KErrNone)
+		{
+			EAP_TRACE_ERROR(
+				m_am_tools,
+				TRACE_FLAGS_ERROR,
+				(EAPL("ERROR: eap_am_general_settings_symbian_c::get_eap_methods(): EAP-type=0xfe%06x%08x, index_type=%d, index=%d.\n"),
+				internal_settings->m_EAPType.get_vendor_id(),
+				internal_settings->m_EAPType.get_vendor_type(),
+				internal_settings->m_IndexType,
+				internal_settings->m_Index));
+			return EAP_STATUS_RETURN(
+				m_am_tools,
+				error_complete(
+					m_am_tools->convert_am_error_to_eapol_error(error),
+					internal_settings,
+					error_completion_function));
+		}
+	}
+
+	if (aDisabledEapMethods != 0)
+	{
+		error = CEapConversion::ConvertHBufC8ToInternalTypes(
+			m_am_tools,
+			aDisabledEapMethods,
+			&(complete_settings->m_disabled_eap_methods));
+
+		if (error != KErrNone)
+		{
+			EAP_TRACE_ERROR(
+				m_am_tools,
+				TRACE_FLAGS_ERROR,
+				(EAPL("ERROR: eap_am_general_settings_symbian_c::get_eap_methods(): EAP-type=0xfe%06x%08x, index_type=%d, index=%d.\n"),
+				internal_settings->m_EAPType.get_vendor_id(),
+				internal_settings->m_EAPType.get_vendor_type(),
+				internal_settings->m_IndexType,
+				internal_settings->m_Index));
+			return EAP_STATUS_RETURN(
+				m_am_tools,
+				error_complete(
+					m_am_tools->convert_am_error_to_eapol_error(error),
+					internal_settings,
+					error_completion_function));
+		}
+	}
+
+	// Next filter out unimplemented EAP-methods.
+	status = filter_eap_methods(
+		&(complete_settings->m_active_eap_methods),
+		&plugins_array);
+	if (status != eap_status_ok)
+	{
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				status,
+				internal_settings,
+				error_completion_function));
+	}
+
+	// Check the disabled EAP-method have implementation.
+	status = filter_eap_methods(
+		&(complete_settings->m_disabled_eap_methods),
+		&plugins_array);
+	if (status != eap_status_ok)
+	{
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				status,
+				internal_settings,
+				error_completion_function));
+	}
+
+	// Add the rest of the implemented EAP-methods to the disabled EAP-methods.
+	for (TInt plugin_ind = 0; plugin_ind < plugins_array.Count(); ++plugin_ind)
+	{
+		const TEapExpandedType * eap_type = plugins_array[plugin_ind];
+		if (eap_type == 0)
+		{
+			return EAP_STATUS_RETURN(
+				m_am_tools,
+				error_complete(
+					eap_status_allocation_error,
+					internal_settings,
+					error_completion_function));
+		}
+
+		const eap_type_value_e common_eap_type(
+			static_cast<eap_type_vendor_id_e>(eap_type->GetVendorId()),
+			eap_type->GetVendorType());
+
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_am_general_settings_symbian_c::get_eap_methods(): Adds disabled EAP-type=0xfe%06x%08x\n"),
+			eap_type->GetVendorId(),
+			eap_type->GetVendorType()));
+
+		status = complete_settings->m_disabled_eap_methods.add_object(common_eap_type.copy(), true);
+		if (status != eap_status_ok)
+		{
+			return EAP_STATUS_RETURN(
+				m_am_tools,
+				error_complete(
+					status,
+					internal_settings,
+					error_completion_function));
+		}
+	} // for()
+
+	complete_settings->m_SelectedEAPTypesPresent = true;
+
+	complete_settings->m_completion_status = eap_status_ok;
+	complete_settings->m_EAPType = internal_settings->m_EAPType;
+	complete_settings->m_IndexType = internal_settings->m_IndexType;
+	complete_settings->m_Index = internal_settings->m_Index;
+
+	status = m_partner->complete_get_eap_methods(complete_settings);
+
+
+	iGeneralSettingsDb.Compact();
+
+	CloseGeneralSettings();
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::get_eap_methods(): this=0x%08x, CloseGeneralSettings()\n"),
+		this));
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+// ----------------------------------------------------------------------
+
+eap_status_e eap_am_general_settings_symbian_c::set_eap_methods(const eap_method_settings_c * const internal_settings)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::set_eap_methods(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_general_settings_symbian_c::set_eap_methods()");
+
+	const eap_tlv_message_type_function_e error_completion_function(eap_tlv_message_type_function_general_settings_complete_set_eap_methods);
+
+	TInt error = KErrNone;
+
+	TRAP(error, (OpenGeneralSettingsL()));
+
+	if (error != KErrNone)
+	{
+		EAP_TRACE_ERROR(
+			m_am_tools,
+			TRACE_FLAGS_ERROR,
+			(EAPL("ERROR: eap_am_general_settings_symbian_c::set_eap_methods(): OpenGeneralSettingsL() failed, EAP-type=0xfe%06x%08x, index_type=%d, index=%d, error=%d.\n"),
+			internal_settings->m_EAPType.get_vendor_id(),
+			internal_settings->m_EAPType.get_vendor_type(),
+			internal_settings->m_IndexType,
+			internal_settings->m_Index,
+			error));
+
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				m_am_tools->convert_am_error_to_eapol_error(error),
+				internal_settings,
+				error_completion_function));
+	}
+
+
+	HBufC8 *aEnabledEapMethods = 0;
+	HBufC8 *aDisabledEapMethods = 0;
+
+	error = CEapConversion::ConvertInternalTypesToHBufC8(
+		m_am_tools,
+		&(internal_settings->m_active_eap_methods),
+		&aEnabledEapMethods);
+
+	eap_automatic_variable_c<HBufC8> automatic_aEnabledEapMethods(
+		m_am_tools,
+		aEnabledEapMethods);
+
+	if (error != KErrNone)
+	{
+		EAP_TRACE_ERROR(
+			m_am_tools,
+			TRACE_FLAGS_ERROR,
+			(EAPL("ERROR: eap_am_general_settings_symbian_c::set_eap_methods(): EAP-type=0xfe%06x%08x, index_type=%d, index=%d.\n"),
+			internal_settings->m_EAPType.get_vendor_id(),
+			internal_settings->m_EAPType.get_vendor_type(),
+			internal_settings->m_IndexType,
+			internal_settings->m_Index));
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				m_am_tools->convert_am_error_to_eapol_error(error),
+				internal_settings,
+				error_completion_function));
+	}
+
+	error = CEapConversion::ConvertInternalTypesToHBufC8(
+		m_am_tools,
+		&(internal_settings->m_disabled_eap_methods),
+		&aDisabledEapMethods);
+
+	eap_automatic_variable_c<HBufC8> automatic_aDisabledEapMethods(
+		m_am_tools,
+		aDisabledEapMethods);
+
+	if (error != KErrNone)
+	{
+		EAP_TRACE_ERROR(
+			m_am_tools,
+			TRACE_FLAGS_ERROR,
+			(EAPL("ERROR: eap_am_general_settings_symbian_c::set_eap_methods(): EAP-type=0xfe%06x%08x, index_type=%d, index=%d.\n"),
+			internal_settings->m_EAPType.get_vendor_id(),
+			internal_settings->m_EAPType.get_vendor_type(),
+			internal_settings->m_IndexType,
+			internal_settings->m_Index));
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				m_am_tools->convert_am_error_to_eapol_error(error),
+				internal_settings,
+				error_completion_function));
+	}
+
+	TRAP(error, (SetGeneralSettingsDataL(
+		internal_settings->m_IndexType,
+		internal_settings->m_Index,
+		*aEnabledEapMethods,
+		*aDisabledEapMethods)));
+	if (error != KErrNone)
+	{
+		EAP_TRACE_ERROR(
+			m_am_tools,
+			TRACE_FLAGS_ERROR,
+			(EAPL("ERROR: eap_am_general_settings_symbian_c::set_eap_methods(): EAP-type=0xfe%06x%08x, index_type=%d, index=%d.\n"),
+			internal_settings->m_EAPType.get_vendor_id(),
+			internal_settings->m_EAPType.get_vendor_type(),
+			internal_settings->m_IndexType,
+			internal_settings->m_Index));
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				m_am_tools->convert_am_error_to_eapol_error(error),
+				internal_settings,
+				error_completion_function));
+	}
+
+	eap_method_settings_c * const complete_settings = new eap_method_settings_c(m_am_tools);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_complete_settings(
+		m_am_tools,
+		complete_settings);
+
+	if (complete_settings == 0)
+	{
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				eap_status_allocation_error,
+				internal_settings,
+				error_completion_function));
+	}
+
+	complete_settings->m_completion_status = eap_status_ok;
+	complete_settings->m_EAPType = internal_settings->m_EAPType;
+	complete_settings->m_IndexType = internal_settings->m_IndexType;
+	complete_settings->m_Index = internal_settings->m_Index;
+
+	eap_status_e status = m_partner->complete_set_eap_methods(complete_settings);
+
+	iGeneralSettingsDb.Compact();
+
+	CloseGeneralSettings();
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::set_eap_methods(): this=0x%08x, CloseGeneralSettings()\n"),
+		this));
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+// ----------------------------------------------------------------------
+
+eap_status_e eap_am_general_settings_symbian_c::get_certificate_lists(const eap_method_settings_c * const internal_settings)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::get_certificate_lists(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_general_settings_symbian_c::get_certificate_lists()");
+
+	TInt error(KErrNone);
+
+	const eap_tlv_message_type_function_e error_completion_function(eap_tlv_message_type_function_general_settings_complete_get_certificate_lists);
+
+	if (iCertificateFetcher == 0)
+	{
+		TRAP(error, iCertificateFetcher = CEapTlsPeapCertFetcher::NewL(this));
+		if (error != KErrNone)
+		{
+			EAP_TRACE_ERROR(
+				m_am_tools,
+				TRACE_FLAGS_ERROR,
+				(EAPL("ERROR: eap_am_general_settings_symbian_c::get_certificate_lists(): this=0x%08x: CEapTlsPeapCertFetcher::NewL() failed=%d\n"),
+				this,
+				error));
+
+			eap_method_settings_c * const complete_settings = new eap_method_settings_c(m_am_tools);
+
+			eap_automatic_variable_c<eap_method_settings_c> automatic_complete_settings(
+				m_am_tools,
+				complete_settings);
+
+			return EAP_STATUS_RETURN(
+				m_am_tools,
+				error_complete(
+					m_am_tools->convert_am_error_to_eapol_error(error),
+					complete_settings,
+					error_completion_function));
+		}
+	}
+
+	m_completion_status = internal_settings->m_completion_status;
+	m_EAPType = internal_settings->m_EAPType;
+	m_IndexType = internal_settings->m_IndexType;
+	m_Index = internal_settings->m_Index;
+
+	TRAP(error, (iCertificateFetcher->GetCertificatesL()));
+	if (error != KErrNone)
+	{
+		EAP_TRACE_ERROR(
+			m_am_tools,
+			TRACE_FLAGS_ERROR,
+			(EAPL("ERROR: eap_am_general_settings_symbian_c::get_certificate_lists(): iCertificateFetcher->GetCertificatesL(), error=%d\n"),
+			error));
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				m_am_tools->convert_am_error_to_eapol_error(error),
+				internal_settings,
+				error_completion_function));
+	}
+
+	CloseGeneralSettings();
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::get_certificate_lists(): this=0x%08x, CloseGeneralSettings()\n"),
+		this));
+
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+// ----------------------------------------------------------
+
+void eap_am_general_settings_symbian_c::CompleteReadCertificatesL(
+		const RPointerArray<EapCertificateEntry>& aAvailableUserCerts, 
+		const RPointerArray<EapCertificateEntry>& aAvailableCACerts)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::CompleteReadCertificatesL(): - Available cert count in device - USER=%d, CA=%d \n"),
+		aAvailableUserCerts.Count(),
+		aAvailableCACerts.Count()));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_general_settings_symbian_c::CompleteReadCertificatesL()");
+
+	// Now all available certificates have been read.
+
+	const eap_tlv_message_type_function_e error_completion_function(eap_tlv_message_type_function_general_settings_complete_get_certificate_lists);
+
+	eap_method_settings_c * const complete_settings = new eap_method_settings_c(m_am_tools);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_complete_settings(
+		m_am_tools,
+		complete_settings);
+
+	if (complete_settings == 0)
+	{
+		(void) EAP_STATUS_RETURN(m_am_tools, error_complete(
+			eap_status_allocation_error,
+			complete_settings,
+			error_completion_function));
+	}
+
+	TInt error = CEapConversion::ConvertCertificatesToInternalType(
+		m_am_tools,
+		&aAvailableUserCerts,
+		&(complete_settings->m_Certificates));
+	if (error != KErrNone)
+	{
+		(void) EAP_STATUS_RETURN(m_am_tools, error_complete(
+			m_am_tools->convert_am_error_to_eapol_error(error),
+			complete_settings,
+			error_completion_function));
+	}
+
+	error = CEapConversion::ConvertCertificatesToInternalType(
+		m_am_tools,
+		&aAvailableCACerts,
+		&(complete_settings->m_Certificates));
+	if (error != KErrNone)
+	{
+		(void) EAP_STATUS_RETURN(m_am_tools, error_complete(
+			m_am_tools->convert_am_error_to_eapol_error(error),
+			complete_settings,
+			error_completion_function));
+	}
+
+	complete_settings->m_CertificatesPresent = true;
+
+	complete_settings->m_completion_status = eap_status_ok;
+	complete_settings->m_EAPType = m_EAPType;
+	complete_settings->m_IndexType = m_IndexType;
+	complete_settings->m_Index = m_Index;
+
+	eap_status_e status = m_partner->complete_get_certificate_lists(complete_settings);
+
+	(void) EAP_STATUS_RETURN(m_am_tools, status);
+	EAP_UNREFERENCED_PARAMETER(status);
+}
+
+// ----------------------------------------------------------------------
+
+eap_status_e eap_am_general_settings_symbian_c::delete_all_eap_settings(const eap_method_settings_c * const internal_settings)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::delete_all_eap_settings(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_general_settings_symbian_c::delete_all_eap_settings()");
+
+	const eap_tlv_message_type_function_e error_completion_function(eap_tlv_message_type_function_general_settings_complete_delete_all_eap_settings);
+
+	TInt error(KErrNone);
+
+	TRAP(error, (OpenGeneralSettingsL()));
+
+	if (error != KErrNone)
+	{
+		EAP_TRACE_ERROR(
+			m_am_tools,
+			TRACE_FLAGS_ERROR,
+			(EAPL("ERROR: eap_am_general_settings_symbian_c::delete_all_eap_settings(): OpenGeneralSettingsL() failed, EAP-type=0xfe%06x%08x, index_type=%d, index=%d, error=%d.\n"),
+			internal_settings->m_EAPType.get_vendor_id(),
+			internal_settings->m_EAPType.get_vendor_type(),
+			internal_settings->m_IndexType,
+			internal_settings->m_Index,
+			error));
+
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				m_am_tools->convert_am_error_to_eapol_error(error),
+				internal_settings,
+				error_completion_function));
+	}
+
+	eap_method_settings_c * const complete_settings = new eap_method_settings_c(m_am_tools);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_complete_settings(
+		m_am_tools,
+		complete_settings);
+
+	if (complete_settings == 0)
+	{
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				eap_status_allocation_error,
+				internal_settings,
+				error_completion_function));
+	}
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::delete_all_eap_settings(): this=0x%08x: DeleteGeneralSettingsDataL(): EAP-type=0xfe%06x%08x, index_type=%d, index=%d\n"),
+		this,
+		internal_settings->m_EAPType.get_vendor_id(),
+		internal_settings->m_EAPType.get_vendor_type(),
+		internal_settings->m_IndexType,
+		internal_settings->m_Index));
+
+	TRAP(error, (DeleteGeneralSettingsDataL(
+		internal_settings->m_IndexType,
+		internal_settings->m_Index)));
+	if (error != KErrNone)
+	{
+		EAP_TRACE_ERROR(
+			m_am_tools,
+			TRACE_FLAGS_ERROR,
+			(EAPL("ERROR: eap_am_general_settings_symbian_c::delete_all_eap_settings(): EAP-type=0xfe%06x%08x, index_type=%d, index=%d.\n"),
+			internal_settings->m_EAPType.get_vendor_id(),
+			internal_settings->m_EAPType.get_vendor_type(),
+			internal_settings->m_IndexType,
+			internal_settings->m_Index));
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				m_am_tools->convert_am_error_to_eapol_error(error),
+				internal_settings,
+				error_completion_function));
+	}
+
+	{
+		RPointerArray<TEapExpandedType> plugins_array;
+
+		PointerArrayResetAndDestroy<TEapExpandedType> aAutomaticPlugins(&plugins_array, EFalse);
+
+		EapPluginTools aPluginTool;
+
+		TEapExpandedType aTunnelingType(*EapExpandedTypeNone.GetType());
+
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_am_general_settings_symbian_c::delete_all_eap_settings(): this=0x%08x: aPluginTool.ListAllEapPluginsL(): tunneling EAP-type=0xfe%06x%08x, index_type=%d, index=%d\n"),
+			this,
+			aTunnelingType.GetVendorId(),
+			aTunnelingType.GetVendorType(),
+			internal_settings->m_IndexType,
+			internal_settings->m_Index));
+
+		// This will list all outer EAP-methods because aTunnelingType = None.
+		TRAP(error, (aPluginTool.ListAllEapPluginsL(aTunnelingType, plugins_array)));
+		if (error != KErrNone)
+		{
+			EAP_TRACE_ERROR(
+				m_am_tools,
+				TRACE_FLAGS_ERROR,
+				(EAPL("ERROR: eap_am_general_settings_symbian_c::delete_all_eap_settings(): aPluginTool.ListAllEapPluginsL() failed, tunneling EAP-type=0xfe%06x%08x, index_type=%d, index=%d, error=%d.\n"),
+				aTunnelingType.GetVendorId(),
+				aTunnelingType.GetVendorType(),
+				internal_settings->m_IndexType,
+				internal_settings->m_Index,
+				error));
+
+			return EAP_STATUS_RETURN(
+				m_am_tools,
+				error_complete(
+					m_am_tools->convert_am_error_to_eapol_error(error),
+					internal_settings,
+					error_completion_function));
+		}
+
+		TUint ind_outer(0ul);
+
+		for (ind_outer = 0ul; ind_outer < plugins_array.Count(); ++ind_outer)
+		{
+
+			// List all plugins that could be used inside the each outer EAP-method on each plugin.
+
+			RPointerArray<TEapExpandedType> tunneled_plugins;
+
+			PointerArrayResetAndDestroy<TEapExpandedType> aAutomaticTunneledPlugins(&tunneled_plugins, EFalse);
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("eap_am_general_settings_symbian_c::delete_all_eap_settings(): this=0x%08x: aPluginTool.ListAllEapPluginsL(): tunneling EAP-type=0xfe%06x%08x, index_type=%d, index=%d\n"),
+				this,
+				plugins_array[ind_outer]->GetVendorId(),
+				plugins_array[ind_outer]->GetVendorType(),
+				internal_settings->m_IndexType,
+				internal_settings->m_Index));
+
+			// This will list all inner EAP-methods of EAP-type.
+			TRAP(error, (aPluginTool.ListAllEapPluginsL(plugins_array[ind_outer], tunneled_plugins)));
+			if (error != KErrNone)
+			{
+				EAP_TRACE_ERROR(
+					m_am_tools,
+					TRACE_FLAGS_ERROR,
+					(EAPL("ERROR: eap_am_general_settings_symbian_c::delete_all_eap_settings(): aPluginTool.ListAllEapPluginsL() failed, tunneling EAP-type=0xfe%06x%08x, index_type=%d, index=%d, error=%d.\n"),
+					plugins_array[ind_outer]->GetVendorId(),
+					plugins_array[ind_outer]->GetVendorType(),
+					internal_settings->m_IndexType,
+					internal_settings->m_Index,
+					error));
+
+				return EAP_STATUS_RETURN(
+					m_am_tools,
+					error_complete(
+						m_am_tools->convert_am_error_to_eapol_error(error),
+						internal_settings,
+						error_completion_function));
+			}
+
+
+			// Delete possible configuration of each inner EAP-method that could be configured inside of outer EAP-method.
+
+			TUint ind_inner(0ul);
+
+			for (ind_inner = 0ul; ind_inner < tunneled_plugins.Count(); ++ind_inner)
+			{
+				CEapTypePlugin * eapType = NULL;
+
+				EAP_TRACE_DEBUG(
+					m_am_tools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("eap_am_general_settings_symbian_c::delete_all_eap_settings(): this=0x%08x: CEapTypePlugin::NewL(): EAP-type=0xfe%06x%08x, index_type=%d, index=%d\n"),
+					this,
+					tunneled_plugins[ind_inner]->GetVendorId(),
+					tunneled_plugins[ind_inner]->GetVendorType(),
+					internal_settings->m_IndexType,
+					internal_settings->m_Index));
+
+				TRAP(error, (eapType = CEapTypePlugin::NewL(
+					tunneled_plugins[ind_inner]->GetValue(),
+					static_cast<TIndexType>(internal_settings->m_IndexType),
+					internal_settings->m_Index)));
+
+				// This will automatocally delete eapType.
+				eap_automatic_variable_c<CEapTypePlugin> automatic_eap_type(
+					m_am_tools,
+					eapType);
+
+				if(error != KErrNone
+					|| eapType == NULL)
+				{
+					EAP_TRACE_ERROR(
+						m_am_tools,
+						TRACE_FLAGS_ERROR,
+						(EAPL("ERROR: eap_am_general_settings_symbian_c::delete_all_eap_settings(): CEapTypePlugin::NewL() failed, EAP-type=0xfe%06x%08x, index_type=%d, index=%d, error=%d.\n"),
+						tunneled_plugins[ind_inner]->GetVendorId(),
+						tunneled_plugins[ind_inner]->GetVendorType(),
+						internal_settings->m_IndexType,
+						internal_settings->m_Index,
+						error));
+
+					return EAP_STATUS_RETURN(
+						m_am_tools,
+						error_complete(
+							m_am_tools->convert_am_error_to_eapol_error(error),
+							internal_settings,
+							error_completion_function));
+				}
+				
+			    eapType->SetTunnelingType(plugins_array[ind_outer]);
+
+				EAP_TRACE_DEBUG(
+					m_am_tools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("eap_am_general_settings_symbian_c::delete_all_eap_settings(): this=0x%08x: eapType->DeleteConfigurationL(): EAP-type=0xfe%06x%08x, index_type=%d, index=%d\n"),
+					this,
+					tunneled_plugins[ind_inner]->GetVendorId(),
+					tunneled_plugins[ind_inner]->GetVendorType(),
+					internal_settings->m_IndexType,
+					internal_settings->m_Index));
+
+				TRAP(error, (eapType->DeleteConfigurationL()));
+				if(error != KErrNone)
+				{
+					EAP_TRACE_ERROR(
+						m_am_tools,
+						TRACE_FLAGS_ERROR,
+						(EAPL("ERROR: eap_am_general_settings_symbian_c::delete_all_eap_settings(): eapType->DeleteConfigurationL() failed, EAP-type=0xfe%06x%08x, index_type=%d, index=%d, error=%d.\n"),
+						tunneled_plugins[ind_inner]->GetVendorId(),
+						tunneled_plugins[ind_inner]->GetVendorType(),
+						internal_settings->m_IndexType,
+						internal_settings->m_Index,
+						error));
+
+					return EAP_STATUS_RETURN(
+						m_am_tools,
+						error_complete(
+							m_am_tools->convert_am_error_to_eapol_error(error),
+							internal_settings,
+							error_completion_function));
+				}
+
+			} // for()
+
+
+			{
+
+				// Delete possible configuration of each outer EAP-method on each plugin.
+
+				EAP_TRACE_DEBUG(
+					m_am_tools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("eap_am_general_settings_symbian_c::delete_all_eap_settings(): this=0x%08x: CEapTypePlugin::NewL(): outer EAP-type=0xfe%06x%08x, index_type=%d, index=%d\n"),
+					this,
+					plugins_array[ind_outer]->GetVendorId(),
+					plugins_array[ind_outer]->GetVendorType(),
+					internal_settings->m_IndexType,
+					internal_settings->m_Index));
+
+				CEapTypePlugin * eapType = NULL;
+
+				TRAP(error, (eapType = CEapTypePlugin::NewL(
+					plugins_array[ind_outer]->GetValue(),
+					static_cast<TIndexType>(internal_settings->m_IndexType),
+					internal_settings->m_Index)));
+
+				// This will automatocally delete eapType.
+				eap_automatic_variable_c<CEapTypePlugin> automatic_eap_type(
+					m_am_tools,
+					eapType);
+				
+				if(error != KErrNone
+					|| eapType == NULL)
+				{
+					EAP_TRACE_ERROR(
+						m_am_tools,
+						TRACE_FLAGS_ERROR,
+						(EAPL("ERROR: eap_am_general_settings_symbian_c::delete_all_eap_settings(): CEapTypePlugin::NewL() failed, outer EAP-type=0xfe%06x%08x, index_type=%d, index=%d, error=%d.\n"),
+						plugins_array[ind_outer]->GetVendorId(),
+						plugins_array[ind_outer]->GetVendorType(),
+						internal_settings->m_IndexType,
+						internal_settings->m_Index,
+						error));
+
+					return EAP_STATUS_RETURN(
+						m_am_tools,
+						error_complete(
+							m_am_tools->convert_am_error_to_eapol_error(error),
+							internal_settings,
+							error_completion_function));
+				}
+				
+				EAP_TRACE_DEBUG(
+					m_am_tools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("eap_am_general_settings_symbian_c::delete_all_eap_settings(): this=0x%08x: eapType->DeleteConfigurationL(): outer EAP-type=0xfe%06x%08x, index_type=%d, index=%d\n"),
+					this,
+					plugins_array[ind_outer]->GetVendorId(),
+					plugins_array[ind_outer]->GetVendorType(),
+					internal_settings->m_IndexType,
+					internal_settings->m_Index));
+
+				TRAP(error, (eapType->DeleteConfigurationL()));
+				if(error != KErrNone)
+				{
+					EAP_TRACE_ERROR(
+						m_am_tools,
+						TRACE_FLAGS_ERROR,
+						(EAPL("ERROR: eap_am_general_settings_symbian_c::delete_all_eap_settings(): eapType->DeleteConfigurationL() failed, outer EAP-type=0xfe%06x%08x, index_type=%d, index=%d, error=%d.\n"),
+						plugins_array[ind_outer]->GetVendorId(),
+						plugins_array[ind_outer]->GetVendorType(),
+						internal_settings->m_IndexType,
+						internal_settings->m_Index,
+						error));
+
+					return EAP_STATUS_RETURN(
+						m_am_tools,
+						error_complete(
+							m_am_tools->convert_am_error_to_eapol_error(error),
+							internal_settings,
+							error_completion_function));
+				}
+			}
+
+		} // for()
+
+	}
+
+	complete_settings->m_completion_status = eap_status_ok;
+	complete_settings->m_EAPType = internal_settings->m_EAPType;
+	complete_settings->m_IndexType = internal_settings->m_IndexType;
+	complete_settings->m_Index = internal_settings->m_Index;
+
+	eap_status_e status = m_partner->complete_delete_all_eap_settings(complete_settings);
+
+	iGeneralSettingsDb.Compact();
+
+	CloseGeneralSettings();
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::delete_all_eap_settings(): this=0x%08x, CloseGeneralSettings()\n"),
+		this));
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+// ----------------------------------------------------------------------
+
+eap_status_e eap_am_general_settings_symbian_c::copy_all_eap_settings(const eap_method_settings_c * const internal_settings)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::copy_all_eap_settings(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_general_settings_symbian_c::copy_all_eap_settings()");
+
+	const eap_tlv_message_type_function_e error_completion_function(eap_tlv_message_type_function_general_settings_complete_copy_all_eap_settings);
+
+	TInt error(KErrNone);
+
+	TRAP(error, (OpenGeneralSettingsL()));
+
+	if (error != KErrNone)
+	{
+		EAP_TRACE_ERROR(
+			m_am_tools,
+			TRACE_FLAGS_ERROR,
+			(EAPL("ERROR: eap_am_general_settings_symbian_c::copy_all_eap_settings(): OpenGeneralSettingsL() failed, EAP-type=0xfe%06x%08x, index_type=%d, index=%d, error=%d.\n"),
+			internal_settings->m_EAPType.get_vendor_id(),
+			internal_settings->m_EAPType.get_vendor_type(),
+			internal_settings->m_IndexType,
+			internal_settings->m_Index,
+			error));
+
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				m_am_tools->convert_am_error_to_eapol_error(error),
+				internal_settings,
+				error_completion_function));
+	}
+
+	eap_method_settings_c * const complete_settings = new eap_method_settings_c(m_am_tools);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_complete_settings(
+		m_am_tools,
+		complete_settings);
+
+	if (complete_settings == 0)
+	{
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				eap_status_allocation_error,
+				internal_settings,
+				error_completion_function));
+	}
+
+	if (internal_settings == 0
+		|| internal_settings->m_DestinationIndexAndTypePresent == false)
+	{
+		// Cannot copy without destination.
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				eap_status_illegal_parameter,
+				internal_settings,
+				error_completion_function));
+	}
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::copy_all_eap_settings(): this=0x%08x: DeleteGeneralSettingsDataL(): EAP-type=0xfe%06x%08x, m_IndexType=%d, m_Index=%d, m_DestinationIndexType=%d, m_DestinationIndex=%d\n"),
+		this,
+		internal_settings->m_EAPType.get_vendor_id(),
+		internal_settings->m_EAPType.get_vendor_type(),
+		internal_settings->m_IndexType,
+		internal_settings->m_Index,
+		internal_settings->m_DestinationIndexType,
+		internal_settings->m_DestinationIndex));
+
+	TRAP(error, (CopyGeneralSettingsDataL(
+		internal_settings->m_IndexType,
+		internal_settings->m_Index,
+		internal_settings->m_DestinationIndexType,
+		internal_settings->m_DestinationIndex)));
+	if (error != KErrNone)
+	{
+		EAP_TRACE_ERROR(
+			m_am_tools,
+			TRACE_FLAGS_ERROR,
+			(EAPL("ERROR: eap_am_general_settings_symbian_c::copy_all_eap_settings(): EAP-type=0xfe%06x%08x, m_IndexType=%d, m_Index=%d, m_DestinationIndexType=%d, m_DestinationIndex=%d, error=%d.\n"),
+			internal_settings->m_EAPType.get_vendor_id(),
+			internal_settings->m_EAPType.get_vendor_type(),
+			internal_settings->m_IndexType,
+			internal_settings->m_Index,
+			internal_settings->m_DestinationIndexType,
+			internal_settings->m_DestinationIndex,
+			error));
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				m_am_tools->convert_am_error_to_eapol_error(error),
+				internal_settings,
+				error_completion_function));
+	}
+
+	{
+		RPointerArray<TEapExpandedType> plugins;
+
+		PointerArrayResetAndDestroy<TEapExpandedType> aAutomaticPlugins(&plugins, EFalse);
+
+		EapPluginTools aPluginTool;
+
+		TEapExpandedType aTunnelingType(*EapExpandedTypeNone.GetType());
+
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_am_general_settings_symbian_c::copy_all_eap_settings(): this=0x%08x: aPluginTool.ListAllEapPluginsL(): tunneling EAP-type=0xfe%06x%08x, m_IndexType=%d, m_Index=%d, m_DestinationIndexType=%d, m_DestinationIndex=%d\n"),
+			this,
+			aTunnelingType.GetVendorId(),
+			aTunnelingType.GetVendorType(),
+			internal_settings->m_IndexType,
+			internal_settings->m_Index,
+			internal_settings->m_DestinationIndexType,
+			internal_settings->m_DestinationIndex));
+
+		// This will list all outer EAP-methods because aTunnelingType = None.
+		TRAP(error, (aPluginTool.ListAllEapPluginsL(aTunnelingType, plugins)));
+		if (error != KErrNone)
+		{
+			EAP_TRACE_ERROR(
+				m_am_tools,
+				TRACE_FLAGS_ERROR,
+				(EAPL("ERROR: eap_am_general_settings_symbian_c::copy_all_eap_settings(): aPluginTool.ListAllEapPluginsL() failed, tunneling EAP-type=0xfe%06x%08x, m_IndexType=%d, m_Index=%d, m_DestinationIndexType=%d, m_DestinationIndex=%d, error=%d.\n"),
+				aTunnelingType.GetVendorId(),
+				aTunnelingType.GetVendorType(),
+				internal_settings->m_IndexType,
+				internal_settings->m_Index,
+				internal_settings->m_DestinationIndexType,
+				internal_settings->m_DestinationIndex,
+				error));
+
+			return EAP_STATUS_RETURN(
+				m_am_tools,
+				error_complete(
+					m_am_tools->convert_am_error_to_eapol_error(error),
+					internal_settings,
+					error_completion_function));
+		}
+
+		TUint ind_outer(0ul);
+
+		for (ind_outer = 0ul; ind_outer < plugins.Count(); ++ind_outer)
+		{
+
+			// List all plugins that could be used inside the each outer EAP-method on each plugin.
+
+			RPointerArray<TEapExpandedType> tunneled_plugins;
+
+			PointerArrayResetAndDestroy<TEapExpandedType> aAutomaticTunneledPlugins(&tunneled_plugins, EFalse);
+
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("eap_am_general_settings_symbian_c::copy_all_eap_settings(): this=0x%08x: aPluginTool.ListAllEapPluginsL(): tunneling EAP-type=0xfe%06x%08x, m_IndexType=%d, m_Index=%d, m_DestinationIndexType=%d, m_DestinationIndex=%d\n"),
+				this,
+				plugins[ind_outer]->GetVendorId(),
+				plugins[ind_outer]->GetVendorType(),
+				internal_settings->m_IndexType,
+				internal_settings->m_Index,
+				internal_settings->m_DestinationIndexType,
+				internal_settings->m_DestinationIndex));
+
+			// This will list all inner EAP-methods of EAP-type.
+			TRAP(error, (aPluginTool.ListAllEapPluginsL(plugins[ind_outer], tunneled_plugins)));
+			if (error != KErrNone)
+			{
+				EAP_TRACE_ERROR(
+					m_am_tools,
+					TRACE_FLAGS_ERROR,
+					(EAPL("ERROR: eap_am_general_settings_symbian_c::copy_all_eap_settings(): aPluginTool.ListAllEapPluginsL() failed, tunneling EAP-type=0xfe%06x%08x, m_IndexType=%d, m_Index=%d, m_DestinationIndexType=%d, m_DestinationIndex=%d, error=%d.\n"),
+					plugins[ind_outer]->GetVendorId(),
+					plugins[ind_outer]->GetVendorType(),
+					internal_settings->m_IndexType,
+					internal_settings->m_Index,
+					internal_settings->m_DestinationIndexType,
+					internal_settings->m_DestinationIndex,
+					error));
+
+				return EAP_STATUS_RETURN(
+					m_am_tools,
+					error_complete(
+						m_am_tools->convert_am_error_to_eapol_error(error),
+						internal_settings,
+						error_completion_function));
+			}
+
+
+			// Copy possible configuration of each inner EAP-method that could be configured inside of outer EAP-method.
+
+			TUint ind_inner(0ul);
+
+			for (ind_inner = 0ul; ind_inner < tunneled_plugins.Count(); ++ind_inner)
+			{
+				CEapTypePlugin * eapType = NULL;
+
+				EAP_TRACE_DEBUG(
+					m_am_tools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("eap_am_general_settings_symbian_c::copy_all_eap_settings(): this=0x%08x: CEapTypePlugin::NewL(): EAP-type=0xfe%06x%08x, m_IndexType=%d, m_Index=%d, m_DestinationIndexType=%d, m_DestinationIndex=%d\n"),
+					this,
+					tunneled_plugins[ind_inner]->GetVendorId(),
+					tunneled_plugins[ind_inner]->GetVendorType(),
+					internal_settings->m_IndexType,
+					internal_settings->m_Index,
+					internal_settings->m_DestinationIndexType,
+					internal_settings->m_DestinationIndex));
+
+				TRAP(error, (eapType = CEapTypePlugin::NewL(
+					tunneled_plugins[ind_inner]->GetValue(),
+					static_cast<TIndexType>(internal_settings->m_IndexType),
+					internal_settings->m_Index)));
+
+				// This will automatocally delete eapType.
+				eap_automatic_variable_c<CEapTypePlugin> automatic_eap_type(
+					m_am_tools,
+					eapType);
+
+				if(error != KErrNone
+					|| eapType == NULL)
+				{
+					EAP_TRACE_ERROR(
+						m_am_tools,
+						TRACE_FLAGS_ERROR,
+						(EAPL("ERROR: eap_am_general_settings_symbian_c::copy_all_eap_settings(): CEapTypePlugin::NewL() failed, EAP-type=0xfe%06x%08x, m_IndexType=%d, m_Index=%d, m_DestinationIndexType=%d, m_DestinationIndex=%d, error=%d.\n"),
+						tunneled_plugins[ind_inner]->GetVendorId(),
+						tunneled_plugins[ind_inner]->GetVendorType(),
+						internal_settings->m_IndexType,
+						internal_settings->m_Index,
+						internal_settings->m_DestinationIndexType,
+						internal_settings->m_DestinationIndex,
+						error));
+
+					return EAP_STATUS_RETURN(
+						m_am_tools,
+						error_complete(
+							m_am_tools->convert_am_error_to_eapol_error(error),
+							internal_settings,
+							error_completion_function));
+				}
+				
+			    eapType->SetTunnelingType(plugins[ind_outer]);
+
+				EAP_TRACE_DEBUG(
+					m_am_tools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("eap_am_general_settings_symbian_c::copy_all_eap_settings(): this=0x%08x: eapType->CopySettingsL(): EAP-type=0xfe%06x%08x, m_IndexType=%d, m_Index=%d, m_DestinationIndexType=%d, m_DestinationIndex=%d\n"),
+					this,
+					tunneled_plugins[ind_inner]->GetVendorId(),
+					tunneled_plugins[ind_inner]->GetVendorType(),
+					internal_settings->m_IndexType,
+					internal_settings->m_Index,
+					internal_settings->m_DestinationIndexType,
+					internal_settings->m_DestinationIndex));
+
+				TRAP(error, (eapType->CopySettingsL(
+					static_cast<TIndexType>(internal_settings->m_DestinationIndexType),
+					internal_settings->m_DestinationIndex)));
+				if(error != KErrNone)
+				{
+					EAP_TRACE_ERROR(
+						m_am_tools,
+						TRACE_FLAGS_ERROR,
+						(EAPL("ERROR: eap_am_general_settings_symbian_c::copy_all_eap_settings(): eapType->CopySettingsL() failed, EAP-type=0xfe%06x%08x, m_IndexType=%d, m_Index=%d, m_DestinationIndexType=%d, m_DestinationIndex=%d, error=%d.\n"),
+						tunneled_plugins[ind_inner]->GetVendorId(),
+						tunneled_plugins[ind_inner]->GetVendorType(),
+						internal_settings->m_IndexType,
+						internal_settings->m_Index,
+						internal_settings->m_DestinationIndexType,
+						internal_settings->m_DestinationIndex,
+						error));
+
+					return EAP_STATUS_RETURN(
+						m_am_tools,
+						error_complete(
+							m_am_tools->convert_am_error_to_eapol_error(error),
+							internal_settings,
+							error_completion_function));
+				}
+
+			} // for()
+
+
+			{
+
+				// Copy possible configuration of each outer EAP-method on each plugin.
+
+				EAP_TRACE_DEBUG(
+					m_am_tools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("eap_am_general_settings_symbian_c::copy_all_eap_settings(): this=0x%08x: CEapTypePlugin::NewL(): outer EAP-type=0xfe%06x%08x, m_IndexType=%d, m_Index=%d, m_DestinationIndexType=%d, m_DestinationIndex=%d\n"),
+					this,
+					plugins[ind_outer]->GetVendorId(),
+					plugins[ind_outer]->GetVendorType(),
+					internal_settings->m_IndexType,
+					internal_settings->m_Index,
+					internal_settings->m_DestinationIndexType,
+					internal_settings->m_DestinationIndex));
+
+				CEapTypePlugin * eapType = NULL;
+
+				TRAP(error, (eapType = CEapTypePlugin::NewL(
+					plugins[ind_outer]->GetValue(),
+					static_cast<TIndexType>(internal_settings->m_IndexType),
+					internal_settings->m_Index)));
+
+				// This will automatocally delete eapType.
+				eap_automatic_variable_c<CEapTypePlugin> automatic_eap_type(
+					m_am_tools,
+					eapType);
+				
+				if(error != KErrNone
+					|| eapType == NULL)
+				{
+					EAP_TRACE_ERROR(
+						m_am_tools,
+						TRACE_FLAGS_ERROR,
+						(EAPL("ERROR: eap_am_general_settings_symbian_c::copy_all_eap_settings(): CEapTypePlugin::NewL() failed, outer EAP-type=0xfe%06x%08x, m_IndexType=%d, m_Index=%d, m_DestinationIndexType=%d, m_DestinationIndex=%d, error=%d.\n"),
+						plugins[ind_outer]->GetVendorId(),
+						plugins[ind_outer]->GetVendorType(),
+						internal_settings->m_IndexType,
+						internal_settings->m_Index,
+						internal_settings->m_DestinationIndexType,
+						internal_settings->m_DestinationIndex,
+						error));
+
+					return EAP_STATUS_RETURN(
+						m_am_tools,
+						error_complete(
+							m_am_tools->convert_am_error_to_eapol_error(error),
+							internal_settings,
+							error_completion_function));
+				}
+				
+				EAP_TRACE_DEBUG(
+					m_am_tools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("eap_am_general_settings_symbian_c::copy_all_eap_settings(): this=0x%08x: eapType->CopySettingsL(): outer EAP-type=0xfe%06x%08x, m_IndexType=%d, m_Index=%d, m_DestinationIndexType=%d, m_DestinationIndex=%d\n"),
+					this,
+					plugins[ind_outer]->GetVendorId(),
+					plugins[ind_outer]->GetVendorType(),
+					internal_settings->m_IndexType,
+					internal_settings->m_Index,
+					internal_settings->m_DestinationIndexType,
+					internal_settings->m_DestinationIndex));
+
+				TRAP(error, (eapType->CopySettingsL(
+					static_cast<TIndexType>(internal_settings->m_DestinationIndexType),
+					internal_settings->m_DestinationIndex)));
+				if(error != KErrNone)
+				{
+					EAP_TRACE_ERROR(
+						m_am_tools,
+						TRACE_FLAGS_ERROR,
+						(EAPL("ERROR: eap_am_general_settings_symbian_c::copy_all_eap_settings(): eapType->CopySettingsL() failed, outer EAP-type=0xfe%06x%08x, m_IndexType=%d, m_Index=%d, m_DestinationIndexType=%d, m_DestinationIndex=%d, error=%d.\n"),
+						plugins[ind_outer]->GetVendorId(),
+						plugins[ind_outer]->GetVendorType(),
+						internal_settings->m_IndexType,
+						internal_settings->m_Index,
+						internal_settings->m_DestinationIndexType,
+						internal_settings->m_DestinationIndex,
+						error));
+
+					return EAP_STATUS_RETURN(
+						m_am_tools,
+						error_complete(
+							m_am_tools->convert_am_error_to_eapol_error(error),
+							internal_settings,
+							error_completion_function));
+				}
+			}
+
+		} // for()
+
+	}
+
+	complete_settings->m_completion_status = eap_status_ok;
+	complete_settings->m_EAPType = internal_settings->m_EAPType;
+	complete_settings->m_IndexType = internal_settings->m_IndexType;
+	complete_settings->m_Index = internal_settings->m_Index;
+
+	eap_status_e status = m_partner->complete_copy_all_eap_settings(complete_settings);
+
+	iGeneralSettingsDb.Compact();
+
+	CloseGeneralSettings();
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_general_settings_symbian_c::get_eap_methods(): this=0x%08x, CloseGeneralSettings()\n"),
+		this));
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+// ----------------------------------------------------------------------
+// End
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/src/eap_am_pac_store_symbian.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,494 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  interface to PAC-store.
+*
+*/
+
+/*
+* %version: 12 %
+*/
+
+#include "eap_tools.h"
+#include "eap_status.h"
+#include "eap_am_export.h"
+#include "eap_am_pac_store_symbian.h"
+#include "abs_eap_am_pac_store.h"
+#include "eap_automatic_variable.h"
+#include "EapTraceSymbian.h"
+#include "EapConversion.h"
+#include "eap_type_tls_peap_types.h"
+#include "pac_store_db_parameters.h"
+#include "pac_store_db_symbian.h"
+#include <f32file.h>
+#include "EapPluginDbDefaults.h"
+
+/** @file */
+
+// ----------------------------------------------------------------------
+const TUint KMaxDBFieldNameLength = 255;
+
+// ----------------------------------------------------------------------
+
+eap_am_pac_store_symbian_c::eap_am_pac_store_symbian_c(
+	abs_eap_am_tools_c * const tools,
+	abs_eap_am_pac_store_c * const partner)
+	: m_am_tools(tools)
+	, m_partner(partner)
+	, m_is_valid(false)
+	, m_shutdown_was_called(false)
+	, iClientCreated(false)
+	, iPacStoreSessionOpened(false)
+	, iClient(NULL)
+	, m_PAC_store_password(tools)
+
+{
+
+	if (m_am_tools == 0
+		|| m_am_tools->get_is_valid() == false
+		|| m_partner == 0)
+	{
+		return;
+	}
+
+	m_is_valid = true;
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_pac_store_symbian_c::eap_am_pac_store_symbian_c(): this=0x%08x.\n"),
+		this));
+}
+
+// ----------------------------------------------------------------------
+
+eap_am_pac_store_symbian_c::~eap_am_pac_store_symbian_c()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_pac_store_symbian_c::~eap_am_pac_store_symbian_c(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_pac_store_symbian_c::~eap_am_pac_store_symbian_c()");
+
+	delete iClient;
+	iClient = NULL;
+	
+	EAP_ASSERT(m_shutdown_was_called == true);
+}
+
+// ----------------------------------------------------------------------
+
+bool eap_am_pac_store_symbian_c::get_is_valid()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_pac_store_symbian_c::get_is_valid(): this=0x%08x. valid=%d\n"),
+		this, m_is_valid));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_pac_store_symbian_c::get_is_valid()");
+
+	return m_is_valid;
+}
+
+// ----------------------------------------------------------------------
+
+// This is documented in abs_eap_stack_interface_c::configure().
+EAP_FUNC_EXPORT eap_status_e eap_am_pac_store_symbian_c::configure()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_pac_store_symbian_c::configure(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_pac_store_symbian_c::configure()");
+
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+// ----------------------------------------------------------------------
+
+// This is documented in abs_eap_stack_interface_c::shutdown().
+EAP_FUNC_EXPORT eap_status_e eap_am_pac_store_symbian_c::shutdown()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_pac_store_symbian_c::shutdown(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_pac_store_symbian_c::shutdown()");
+
+	m_shutdown_was_called = true;
+
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+// ----------------------------------------------------------------------
+EAP_FUNC_EXPORT eap_status_e eap_am_pac_store_symbian_c::open_pac_store()
+	{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_pac_store_symbian_c::open_pac_store(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_pac_store_symbian_c::open_pac_store()");
+
+	TRAPD(err, iClient = CPacStoreDatabase::NewL());
+	if (err || iClient == NULL)
+			{
+			m_partner->complete_open_pac_store(eap_status_process_general_error);
+			return EAP_STATUS_RETURN(m_am_tools, eap_status_process_general_error);
+			}
+	EAP_TRACE_DEBUG_SYMBIAN(
+			(_L("eap_am_pac_store_symbian_c::open_pac_store Created PAC store")));	
+		
+	TRAP(err, iClient->OpenPacStoreL());
+	if (err || iClient == NULL)
+		{
+		m_partner->complete_open_pac_store(eap_status_process_general_error);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_process_general_error);
+		}
+	EAP_TRACE_DEBUG_SYMBIAN(
+			(_L("eap_am_pac_store_symbian_c::open_pac_store Opened PAC store")));	
+
+	iClientCreated = ETrue;
+
+	m_partner->complete_open_pac_store(eap_status_ok);
+	
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+	}
+
+// ----------------------------------------------------------------------
+EAP_FUNC_EXPORT eap_status_e eap_am_pac_store_symbian_c::create_device_seed()
+	{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_pac_store_symbian_c::create_device_seed(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_pac_store_symbian_c::create_device_seed()");
+
+	if(iClientCreated == EFalse)
+		{
+		m_partner->complete_create_device_seed(eap_status_process_general_error);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_process_general_error);
+		}
+
+	eap_variable_data_c aDeviceSeed(m_am_tools);
+	
+	eap_status_e status = iClient->CreateDeviceSeed(&aDeviceSeed);
+
+	m_partner->complete_create_device_seed(status);
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+
+// ----------------------------------------------------------------------
+EAP_FUNC_EXPORT eap_status_e eap_am_pac_store_symbian_c::is_master_key_present()
+	{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_pac_store_symbian_c::is_master_key_present(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_pac_store_symbian_c::is_master_key_present()");
+
+	TBool present = EFalse;
+	if(iClientCreated == EFalse)
+		{
+		m_partner->complete_is_master_key_present(EFalse);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_process_general_error);
+		}
+
+	eap_status_e status(eap_status_ok);
+
+	TRAPD(err, present = iClient->IsMasterKeyPresentL());
+	if (err)
+		{
+		present = EFalse;
+		status = EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(err));
+		}
+
+	m_partner->complete_is_master_key_present(present);
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+
+// ----------------------------------------------------------------------
+EAP_FUNC_EXPORT eap_status_e eap_am_pac_store_symbian_c::is_master_key_and_password_matching(
+		const eap_variable_data_c * const pac_store_password)
+	{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_pac_store_symbian_c::is_master_key_and_password_matching(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_pac_store_symbian_c::is_master_key_and_password_matching()");
+
+	TBool matching = EFalse;
+	
+	if(iClientCreated == EFalse)
+		{
+		m_partner->complete_is_master_key_and_password_matching(EFalse);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_process_general_error);
+		}
+
+	HBufC8* pacStorePW8(NULL);
+	
+	TRAPD(err, pacStorePW8 = HBufC8::NewL(pac_store_password->get_data_length()));
+	if (err)
+		{
+		m_partner->complete_is_master_key_and_password_matching(EFalse);
+		return EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(err));
+		}
+	
+	TPtr8 pacStorePW8Ptr = 	pacStorePW8->Des();
+	
+	pacStorePW8Ptr.Copy(pac_store_password->get_data(), pac_store_password->get_data_length());
+		
+	eap_status_e status(eap_status_ok);
+
+	TRAP(err, matching = iClient->IsMasterKeyAndPasswordMatchingL(pacStorePW8Ptr));
+	if (err)
+		{
+		matching = EFalse;
+		status = EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(err));
+		}
+
+	delete pacStorePW8;	
+
+	m_partner->complete_is_master_key_and_password_matching(matching);
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+	
+	}
+
+// ----------------------------------------------------------------------
+EAP_FUNC_EXPORT eap_status_e eap_am_pac_store_symbian_c::create_and_save_master_key(
+		const eap_variable_data_c * const pac_store_password)
+	{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_pac_store_symbian_c::create_and_save_master_key(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_pac_store_symbian_c::create_and_save_master_key()");
+
+	if(iClientCreated == EFalse)
+		{
+		m_partner->complete_create_and_save_master_key(eap_status_process_general_error);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_process_general_error);
+		}
+
+	HBufC8* pacStorePW8(NULL);
+	
+	eap_status_e status(eap_status_ok);
+
+	TRAPD(err, pacStorePW8 = HBufC8::NewL(pac_store_password->get_data_length()));
+	if (err)
+		{
+		status = EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(err));
+		m_partner->complete_create_and_save_master_key(status);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+	
+	TPtr8 pacStorePW8Ptr = 	pacStorePW8->Des();
+	
+	pacStorePW8Ptr.Copy(pac_store_password->get_data(), pac_store_password->get_data_length());
+
+	TRAP(err, iClient->CreateAndSaveMasterKeyL(pacStorePW8Ptr));
+	if (err)
+		{
+		status = EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(err));
+		}
+
+	delete pacStorePW8;	
+
+	m_partner->complete_create_and_save_master_key(status);
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+
+// ----------------------------------------------------------------------
+EAP_FUNC_EXPORT eap_status_e eap_am_pac_store_symbian_c::is_pacstore_password_present()
+	{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_pac_store_symbian_c::is_pacstore_password_present(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_pac_store_symbian_c::is_pacstore_password_present()");
+
+	TBool present = EFalse;
+	if(iClientCreated == EFalse)
+		{
+		m_partner->complete_is_pacstore_password_present(EFalse);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_process_general_error);
+		}
+
+	eap_status_e status(eap_status_ok);
+
+	TRAPD(err, present = iClient->IsPacPasswordPresentL());
+	if (err)
+		{
+		present = EFalse;
+		status = EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(err));
+		}
+
+	m_partner->complete_is_pacstore_password_present(present);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+
+// ----------------------------------------------------------------------
+EAP_FUNC_EXPORT eap_status_e eap_am_pac_store_symbian_c::compare_pac_store_password(
+		eap_variable_data_c * const pac_store_password)
+	{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_pac_store_symbian_c::compare_pac_store_password(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_pac_store_symbian_c::compare_pac_store_password()");
+
+	TBool matching = EFalse;
+	
+	if(iClientCreated == EFalse)
+		{
+		m_partner->complete_compare_pac_store_password(EFalse);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_process_general_error);
+		}
+
+	HBufC8* pacStorePW8(NULL);
+	
+	TRAPD(err, pacStorePW8 = HBufC8::NewL(pac_store_password->get_data_length()));
+	if (err)
+		{
+		m_partner->complete_compare_pac_store_password(EFalse);
+		return EAP_STATUS_RETURN(m_am_tools, EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(err)));
+		}
+	
+	TPtr8 pacStorePW8Ptr = 	pacStorePW8->Des();
+	
+	pacStorePW8Ptr.Copy(pac_store_password->get_data(), pac_store_password->get_data_length());
+		
+
+	eap_status_e status(eap_status_ok);
+
+	TRAP(err, matching = iClient->ComparePacStorePasswordL(pacStorePW8Ptr));
+	if (err)
+		{
+		matching = EFalse;
+		status = EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(err));
+		}
+
+	delete pacStorePW8;
+
+	m_partner->complete_compare_pac_store_password(matching);
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+// ----------------------------------------------------------------------
+EAP_FUNC_EXPORT eap_status_e eap_am_pac_store_symbian_c::set_pac_store_password(
+		const eap_variable_data_c * pac_store_password)
+	{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_pac_store_symbian_c::set_pac_store_password(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_pac_store_symbian_c::set_pac_store_password()");
+
+	if(iClientCreated == EFalse)
+		{
+		m_partner->complete_set_pac_store_password(eap_status_process_general_error);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_process_general_error);
+		}
+		
+	TBuf<KMaxDBFieldNameLength> pacStoreDBColName;
+	HBufC8* pacStoreDBColValBuf8(NULL);
+	
+	pacStoreDBColName.Copy(cf_str_EAP_FAST_PAC_store_password_literal);			
+
+	eap_status_e status(eap_status_ok);
+
+	TRAPD(err, pacStoreDBColValBuf8 = HBufC8::NewL(KMaxPasswordLengthInDB));
+	if (err)
+		{
+		status = EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(err));
+		m_partner->complete_set_pac_store_password(status);
+		return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+	TPtr8 pacStoreDBColValPtr8 = pacStoreDBColValBuf8->Des();
+	pacStoreDBColValPtr8.Copy(pac_store_password->get_data(), pac_store_password->get_data_length());
+
+	TRAP( err, iClient->SetPacStoreDataL(pacStoreDBColName, pacStoreDBColValPtr8));
+	if (err)
+		{
+		status = EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(err));
+		}
+
+	delete pacStoreDBColValBuf8;
+	m_partner->complete_set_pac_store_password(status);
+	return EAP_STATUS_RETURN(m_am_tools, status);
+	}
+
+// ----------------------------------------------------------------------
+EAP_FUNC_EXPORT eap_status_e eap_am_pac_store_symbian_c::destroy_pac_store()
+	{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_pac_store_symbian_c::destroy_pac_store(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_pac_store_symbian_c::destroy_pac_store()");
+
+	if(iClientCreated == EFalse)
+		{
+		eap_status_e status(eap_status_process_general_error);
+
+		m_partner->complete_destroy_pac_store(status);
+
+		return EAP_STATUS_RETURN(m_am_tools, status);
+		}
+
+	iClient->DestroyPacStore();
+
+	EAP_TRACE_DEBUG_SYMBIAN((_L("eap_am_pac_store_symbian_c::open_pac_store destroy_pac_store end")));
+
+	m_partner->complete_destroy_pac_store(eap_status_ok);
+
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+	}
+
+
+// ----------------------------------------------------------------------
+// End
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/src/eap_am_plugin_symbian.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,1108 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP-plugin adaptation.
+*
+*/
+
+/*
+* %version: 28 %
+*/
+
+#include "eap_tools.h"
+#include "eap_status.h"
+#include "eap_am_export.h"
+#include "eap_expanded_type.h"
+#include "eap_array.h"
+#include "eap_database_reference_if.h"
+#include "eap_am_plugin_symbian.h"
+#include "eap_automatic_variable.h"
+#include <EapTypePlugin.h>
+#include <EapSettings.h>
+#include <EapTypeInfo.h>
+#include "EapConversion.h"
+#include "abs_eap_am_plugin.h"
+
+/** @file */
+
+// ----------------------------------------------------------------------
+
+eap_am_plugin_symbian_c::eap_am_plugin_symbian_c(
+	abs_eap_am_tools_c * const tools,
+	abs_eap_am_plugin_c * const partner)
+	: m_am_tools(tools)
+	, m_partner(partner)
+	, m_loaded_types(tools)
+	, m_is_valid(false)
+	, m_shutdown_was_called(false)
+{
+	if (m_am_tools == 0
+		|| m_am_tools->get_is_valid() == false
+		|| m_partner == 0)
+	{
+		return;
+	}
+
+	m_is_valid = true;
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_plugin_symbian_c::eap_am_plugin_symbian_c(): this=0x%08x.\n"),
+		this));
+}
+
+// ----------------------------------------------------------------------
+
+eap_am_plugin_symbian_c::~eap_am_plugin_symbian_c()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_plugin_symbian_c::~eap_am_plugin_symbian_c(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_plugin_symbian_c::~eap_am_plugin_symbian_c()");
+
+	EAP_ASSERT(m_shutdown_was_called == true);
+}
+
+// ----------------------------------------------------------------------
+
+bool eap_am_plugin_symbian_c::get_is_valid()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_plugin_symbian_c::get_is_valid(): this=0x%08x, m_is_valid=%d.\n"),
+		this,
+		m_is_valid));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_plugin_symbian_c::get_is_valid()");
+
+	return m_is_valid;
+}
+
+// ----------------------------------------------------------------------
+
+// This is documented in abs_eap_stack_interface_c::configure().
+eap_status_e eap_am_plugin_symbian_c::configure()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_plugin_symbian_c::configure(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_plugin_symbian_c::configure()");
+
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+// ----------------------------------------------------------------------
+
+// This is documented in abs_eap_stack_interface_c::shutdown().
+eap_status_e eap_am_plugin_symbian_c::shutdown()
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_plugin_symbian_c::shutdown(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_plugin_symbian_c::shutdown()");
+
+	m_shutdown_was_called = true;
+
+	return EAP_STATUS_RETURN(m_am_tools, eap_status_ok);
+}
+
+// ----------------------------------------------------------------------
+
+eap_status_e eap_am_plugin_symbian_c::error_complete(
+	const eap_status_e completion_status,
+	const eap_method_settings_c * const internal_settings,
+	const eap_tlv_message_type_function_e error_completion_function)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_plugin_symbian_c::error_complete(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_plugin_symbian_c::error_complete()");
+
+	eap_method_settings_c * const complete_settings = new eap_method_settings_c(m_am_tools, internal_settings);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_complete_settings(
+		m_am_tools,
+		complete_settings);
+
+	if (complete_settings == 0)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+	}
+
+	complete_settings->m_completion_status = completion_status;
+
+	eap_status_e status(eap_status_not_supported);
+
+	switch(error_completion_function)
+	{
+	case eap_tlv_message_type_function_plugin_complete_get_configuration:
+		status = m_partner->complete_get_configuration(complete_settings);
+		break;
+	case eap_tlv_message_type_function_plugin_complete_set_configuration:
+		status = m_partner->complete_set_configuration(complete_settings);
+		break;
+	case eap_tlv_message_type_function_plugin_complete_copy_configuration:
+		status = m_partner->complete_copy_configuration(complete_settings);
+		break;
+	case eap_tlv_message_type_function_plugin_complete_delete_configuration:
+		status = m_partner->complete_delete_configuration(complete_settings);
+		break;
+	case eap_tlv_message_type_function_plugin_complete_set_index:
+		status = m_partner->complete_set_index(complete_settings);
+		break;
+	case eap_tlv_message_type_function_plugin_complete_get_type_info:
+		status = m_partner->complete_get_type_info(complete_settings);
+		break;
+
+	default:
+		EAP_TRACE_ERROR(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("ERROR: eap_am_plugin_symbian_c::error_complete(): unknown function %d.\n"),
+			 error_completion_function));
+
+		EAP_ASSERT_ANYWAY_TOOLS(m_am_tools);
+
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(m_am_tools, eap_status_illegal_parameter);
+	}
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+// ----------------------------------------------------------------------
+
+CEapTypePlugin * eap_am_plugin_symbian_c::get_eap_type(
+	const eap_type_value_e eap_type,
+	u32_t index_type,
+	u32_t index)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_plugin_symbian_c::get_eap_type(): this=0x%08x, index_type=%d, index=%d, EAP-type=0xfe%06x%08x.\n"),
+		this,
+		index_type,
+		index,
+		eap_type.get_vendor_id(),
+		eap_type.get_vendor_type()));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_plugin_symbian_c::get_eap_type()");
+
+	CEapTypePlugin *eap_plugin = 0;
+
+	eap_loaded_type_c search(
+		m_am_tools,
+		0,
+		eap_type,
+		index_type,
+		index);
+
+	i32_t found_index = find<eap_loaded_type_c>(&m_loaded_types, &search, m_am_tools);
+
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_plugin_symbian_c::get_eap_type(): this=0x%08x, found_index=%d.\n"),
+		this,
+		found_index));
+
+	if (found_index >= 0)
+	{
+		// OK, EAP-type for index_type and index is already loaded.
+		eap_loaded_type_c * const loaded_type = m_loaded_types.get_object(found_index);
+		if (loaded_type == 0)
+		{
+			(void) EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+			return 0;
+		}
+
+		eap_plugin = loaded_type->get_type_plugin();
+
+		return eap_plugin;
+	}
+	else
+	{
+		// Load a new instance of EAP-type.
+
+		TEapExpandedType expanded_type;
+
+		eap_variable_data_c eap_data(m_am_tools);
+
+		eap_status_e status = eap_type.get_expanded_type_data(
+			m_am_tools,
+			&eap_data);
+		if (status != eap_status_ok)
+		{
+			(void) EAP_STATUS_RETURN(m_am_tools, status);
+			return 0;
+		}
+
+		EAP_TRACE_DATA_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_data"),
+			eap_data.get_data(),
+			eap_data.get_data_length()));
+
+		TInt error = expanded_type.SetValue(
+			eap_data.get_data(),
+			eap_data.get_data_length());
+		if (error != KErrNone)
+		{
+			(void) EAP_STATUS_RETURN(m_am_tools, m_am_tools->convert_am_error_to_eapol_error(error));
+			return 0;
+		}
+
+		EAP_TRACE_DATA_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("expanded_type.GetValue()"),
+			expanded_type.GetValue().Ptr(),
+			expanded_type.GetValue().Length()));
+
+		TIndexType IndexType(static_cast<TIndexType>(index_type));
+		TUint Index(static_cast<TUint>(index));
+
+		TRAP(error, (eap_plugin = CEapTypePlugin::NewL(
+			expanded_type.GetValue(),
+			IndexType,
+			Index)));
+		if (error != KErrNone
+			|| eap_plugin == 0)
+		{
+			// Interface not found or implementation creation function failed
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("ERROR: ECom could not find/initiate implementation for EAP-type=0xfe%06x%08x, index_type=%d, index=%d, error = %d.\n"),
+				eap_type.get_vendor_id(),
+				eap_type.get_vendor_type(),
+				index_type,
+				index,
+				error));
+			(void) EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+			return 0;
+		}
+
+		eap_loaded_type_c * const new_eap_plugin = new eap_loaded_type_c(
+			m_am_tools,
+			eap_plugin,
+			eap_type,
+			index_type,
+			index);
+		if (new_eap_plugin == 0)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("ERROR: Could not allocate EAP-type=0xfe%06x%08x, index_type=%d, index=%d.\n"),
+				eap_type.get_vendor_id(),
+				eap_type.get_vendor_type(),
+				index_type,
+				index));
+			(void) EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+			delete eap_plugin;
+			return 0;
+		}
+
+		status = m_loaded_types.add_object(
+			new_eap_plugin,
+			true);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_DEBUG(
+				m_am_tools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("ERROR: Could not add EAP-type=0xfe%06x%08x, index_type=%d, index=%d to array.\n"),
+				eap_type.get_vendor_id(),
+				eap_type.get_vendor_type(),
+				index_type,
+				index));
+			(void) EAP_STATUS_RETURN(m_am_tools, eap_status_allocation_error);
+			return 0;
+		}
+
+		return eap_plugin;
+	}
+}
+
+// ----------------------------------------------------------------------
+
+eap_status_e eap_am_plugin_symbian_c::get_configuration(const eap_method_settings_c * const internal_settings)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_plugin_symbian_c::get_configuration(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_plugin_symbian_c::get_configuration()");
+
+	const eap_tlv_message_type_function_e error_completion_function(eap_tlv_message_type_function_plugin_complete_get_configuration);
+
+	CEapTypePlugin* const eapType = get_eap_type(internal_settings->m_EAPType, internal_settings->m_IndexType, internal_settings->m_Index);
+	if (eapType == 0)
+	{
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				eap_status_allocation_error,
+				internal_settings,
+				error_completion_function));
+	}
+
+	if (internal_settings->m_TunnelingTypePresent == true)
+	{
+		TEapExpandedType aExpandedType;
+    
+		TInt err = CEapConversion::ConvertInternalTypeToExpandedEAPType(
+				&(internal_settings->m_TunnelingType),
+				&aExpandedType);
+
+		eapType->SetTunnelingType(aExpandedType);
+	}
+
+	EAPSettings * local_settings = new EAPSettings;
+
+	eap_automatic_variable_c<EAPSettings> automatic_aSettings(
+		m_am_tools,
+		local_settings);
+
+	if (local_settings == 0)
+	{
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				eap_status_allocation_error,
+				internal_settings,
+				error_completion_function));
+	}
+
+	TInt error(KErrNone);
+
+	TRAP(error, (eapType->GetConfigurationL(*local_settings)));
+	if (error != KErrNone)
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("ERROR: Cannot read configuration from EAP-type=0xfe%06x%08x, index_type=%d, index=%d.\n"),
+			internal_settings->m_EAPType.get_vendor_id(),
+			internal_settings->m_EAPType.get_vendor_type(),
+			internal_settings->m_IndexType,
+			internal_settings->m_Index));
+
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				m_am_tools->convert_am_error_to_eapol_error(error),
+				internal_settings,
+				error_completion_function));
+	}
+
+	eap_method_settings_c * const complete_settings = new eap_method_settings_c(m_am_tools);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_complete_settings(
+		m_am_tools,
+		complete_settings);
+
+	if (complete_settings == 0)
+	{
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				eap_status_allocation_error,
+				internal_settings,
+				error_completion_function));
+	}
+
+	error = CEapConversion::ConvertEAPSettingsToInternalType(
+		m_am_tools,
+		local_settings,
+		complete_settings);
+	if (error != KErrNone)
+	{
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				m_am_tools->convert_am_error_to_eapol_error(error),
+				internal_settings,
+				error_completion_function));
+	}
+
+	complete_settings->m_EAPType = internal_settings->m_EAPType;
+	complete_settings->m_IndexType = internal_settings->m_IndexType;
+	complete_settings->m_Index = internal_settings->m_Index;
+	complete_settings->m_completion_status = eap_status_ok;
+
+	eap_status_e status = m_partner->complete_get_configuration(complete_settings);
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+// ----------------------------------------------------------------------
+
+eap_status_e eap_am_plugin_symbian_c::set_configuration(const eap_method_settings_c * const internal_settings)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_plugin_symbian_c::set_configuration(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_plugin_symbian_c::set_configuration()");
+
+	const eap_tlv_message_type_function_e error_completion_function(eap_tlv_message_type_function_plugin_complete_set_configuration);
+
+	CEapTypePlugin* const eapType = get_eap_type(internal_settings->m_EAPType, internal_settings->m_IndexType, internal_settings->m_Index);
+	if (eapType == 0)
+	{
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				eap_status_allocation_error,
+				internal_settings,
+				error_completion_function));
+	}
+
+	if (internal_settings->m_TunnelingTypePresent == true)
+	{
+		TEapExpandedType aExpandedType;
+    
+		TInt err = CEapConversion::ConvertInternalTypeToExpandedEAPType(
+				&(internal_settings->m_TunnelingType),
+				&aExpandedType);
+
+		eapType->SetTunnelingType(aExpandedType);
+	}
+
+	EAPSettings * local_settings = new EAPSettings;
+
+	eap_automatic_variable_c<EAPSettings> automatic_aSettings(
+		m_am_tools,
+		local_settings);
+
+	if (local_settings == 0)
+	{
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				eap_status_allocation_error,
+				internal_settings,
+				error_completion_function));
+	}
+
+	TInt error = CEapConversion::ConvertInternalTypeToEAPSettings(
+		m_am_tools,
+		internal_settings,
+		local_settings);
+	if (error != KErrNone)
+	{
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				m_am_tools->convert_am_error_to_eapol_error(error),
+				internal_settings,
+				error_completion_function));
+	}
+
+	TRAP(error, (eapType->SetConfigurationL(*local_settings)));
+	if (error != KErrNone)
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("ERROR: Cannot write configuration to EAP-type=0xfe%06x%08x, index_type=%d, index=%d.\n"),
+			internal_settings->m_EAPType.get_vendor_id(),
+			internal_settings->m_EAPType.get_vendor_type(),
+			internal_settings->m_IndexType,
+			internal_settings->m_Index));
+
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				m_am_tools->convert_am_error_to_eapol_error(error),
+				internal_settings,
+				error_completion_function));
+	}
+
+	eap_method_settings_c * const complete_settings = new eap_method_settings_c(m_am_tools, internal_settings);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_complete_settings(
+		m_am_tools,
+		complete_settings);
+
+	if (complete_settings == 0)
+	{
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				eap_status_allocation_error,
+				internal_settings,
+				error_completion_function));
+	}
+
+	complete_settings->m_completion_status = eap_status_ok;
+
+	eap_status_e status = m_partner->complete_set_configuration(complete_settings);
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+// ----------------------------------------------------------------------
+
+eap_status_e eap_am_plugin_symbian_c::copy_configuration(const eap_method_settings_c * const internal_settings)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_plugin_symbian_c::set_configuration(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_plugin_symbian_c::set_configuration()");
+
+	const eap_tlv_message_type_function_e error_completion_function(eap_tlv_message_type_function_plugin_complete_copy_configuration);
+
+	CEapTypePlugin* const eapType = get_eap_type(internal_settings->m_EAPType, internal_settings->m_IndexType, internal_settings->m_Index);
+	if (eapType == 0)
+	{
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				eap_status_allocation_error,
+				internal_settings,
+				error_completion_function));
+	}
+
+	if (internal_settings->m_TunnelingTypePresent == true)
+	{
+		TEapExpandedType aExpandedType;
+    
+		TInt err = CEapConversion::ConvertInternalTypeToExpandedEAPType(
+				&(internal_settings->m_TunnelingType),
+				&aExpandedType);
+
+		eapType->SetTunnelingType(aExpandedType);
+	}
+
+	EAPSettings * local_settings = new EAPSettings;
+
+	eap_automatic_variable_c<EAPSettings> automatic_aSettings(
+		m_am_tools,
+		local_settings);
+
+	if (local_settings == 0)
+	{
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				eap_status_allocation_error,
+				internal_settings,
+				error_completion_function));
+	}
+
+	TInt error = CEapConversion::ConvertInternalTypeToEAPSettings(
+		m_am_tools,
+		internal_settings,
+		local_settings);
+	if (error != KErrNone)
+	{
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				m_am_tools->convert_am_error_to_eapol_error(error),
+				internal_settings,
+				error_completion_function));
+	}
+
+	if (internal_settings->m_DestinationIndexAndTypePresent == false)
+	{
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				eap_status_illegal_parameter,
+				internal_settings,
+				error_completion_function));
+	}
+
+	TIndexType aDestinationIndexType(static_cast<TIndexType>(internal_settings->m_DestinationIndexType));
+	TUint aDestinationIndex(static_cast<TUint>(internal_settings->m_DestinationIndex));
+
+	TRAP(error, (eapType->CopySettingsL(
+		aDestinationIndexType, 
+		aDestinationIndex)));
+	if (error != KErrNone)
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("ERROR: Cannot copy configuration from EAP-type=0xfe%06x%08x, (index_type=%d, index=%d) to (index_type=%d, index=%d).\n"),
+			internal_settings->m_EAPType.get_vendor_id(),
+			internal_settings->m_EAPType.get_vendor_type(),
+			internal_settings->m_IndexType,
+			internal_settings->m_Index,
+			internal_settings->m_DestinationIndexType,
+			internal_settings->m_DestinationIndex));
+
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				m_am_tools->convert_am_error_to_eapol_error(error),
+				internal_settings,
+				error_completion_function));
+	}
+
+	eap_method_settings_c * const complete_settings = new eap_method_settings_c(m_am_tools, internal_settings);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_complete_settings(
+		m_am_tools,
+		complete_settings);
+
+	if (complete_settings == 0)
+	{
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				eap_status_allocation_error,
+				internal_settings,
+				error_completion_function));
+	}
+
+	complete_settings->m_completion_status = eap_status_ok;
+
+	eap_status_e status = m_partner->complete_copy_configuration(complete_settings);
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+// ----------------------------------------------------------------------
+
+eap_status_e eap_am_plugin_symbian_c::delete_configuration(const eap_method_settings_c * const internal_settings)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_plugin_symbian_c::delete_configuration(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_plugin_symbian_c::delete_configuration()");
+
+	const eap_tlv_message_type_function_e error_completion_function(eap_tlv_message_type_function_plugin_complete_delete_configuration);
+
+	CEapTypePlugin* const eapType = get_eap_type(internal_settings->m_EAPType, internal_settings->m_IndexType, internal_settings->m_Index);
+	if (eapType == 0)
+	{
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				eap_status_allocation_error,
+				internal_settings,
+				error_completion_function));
+	}
+
+	if (internal_settings->m_TunnelingTypePresent == true)
+	{
+		TEapExpandedType aExpandedType;
+    
+		TInt err = CEapConversion::ConvertInternalTypeToExpandedEAPType(
+				&(internal_settings->m_TunnelingType),
+				&aExpandedType);
+
+		eapType->SetTunnelingType(aExpandedType);
+	}
+
+	EAPSettings * local_settings = new EAPSettings;
+
+	eap_automatic_variable_c<EAPSettings> automatic_aSettings(
+		m_am_tools,
+		local_settings);
+
+	if (local_settings == 0)
+	{
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				eap_status_allocation_error,
+				internal_settings,
+				error_completion_function));
+	}
+
+	TInt error = CEapConversion::ConvertInternalTypeToEAPSettings(
+		m_am_tools,
+		internal_settings,
+		local_settings);
+	if (error != KErrNone)
+	{
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				m_am_tools->convert_am_error_to_eapol_error(error),
+				internal_settings,
+				error_completion_function));
+	}
+
+	TRAP(error, (eapType->DeleteConfigurationL()));
+	if (error != KErrNone)
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("ERROR: Cannot delete configuration from EAP-type=0xfe%06x%08x, (index_type=%d, index=%d).\n"),
+			internal_settings->m_EAPType.get_vendor_id(),
+			internal_settings->m_EAPType.get_vendor_type(),
+			internal_settings->m_IndexType,
+			internal_settings->m_Index));
+
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				m_am_tools->convert_am_error_to_eapol_error(error),
+				internal_settings,
+				error_completion_function));
+	}
+
+	eap_method_settings_c * const complete_settings = new eap_method_settings_c(m_am_tools, internal_settings);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_complete_settings(
+		m_am_tools,
+		complete_settings);
+
+	if (complete_settings == 0)
+	{
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				eap_status_allocation_error,
+				internal_settings,
+				error_completion_function));
+	}
+
+	complete_settings->m_completion_status = eap_status_ok;
+
+	eap_status_e status = m_partner->complete_delete_configuration(complete_settings);
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+// ----------------------------------------------------------------------
+
+eap_status_e eap_am_plugin_symbian_c::set_index(const eap_method_settings_c * const internal_settings)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_plugin_symbian_c::set_index(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_plugin_symbian_c::set_index()");
+
+	const eap_tlv_message_type_function_e error_completion_function(eap_tlv_message_type_function_plugin_complete_set_index);
+
+	CEapTypePlugin* const eapType = get_eap_type(internal_settings->m_EAPType, internal_settings->m_IndexType, internal_settings->m_Index);
+	if (eapType == 0)
+	{
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				eap_status_allocation_error,
+				internal_settings,
+				error_completion_function));
+	}
+
+	if (internal_settings->m_TunnelingTypePresent == true)
+	{
+		TEapExpandedType aExpandedType;
+    
+		TInt err = CEapConversion::ConvertInternalTypeToExpandedEAPType(
+				&(internal_settings->m_TunnelingType),
+				&aExpandedType);
+
+		eapType->SetTunnelingType(aExpandedType);
+	}
+
+	EAPSettings * local_settings = new EAPSettings;
+
+	eap_automatic_variable_c<EAPSettings> automatic_aSettings(
+		m_am_tools,
+		local_settings);
+
+	if (local_settings == 0)
+	{
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				eap_status_allocation_error,
+				internal_settings,
+				error_completion_function));
+	}
+
+	TInt error = CEapConversion::ConvertInternalTypeToEAPSettings(
+		m_am_tools,
+		internal_settings,
+		local_settings);
+	if (error != KErrNone)
+	{
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				m_am_tools->convert_am_error_to_eapol_error(error),
+				internal_settings,
+				error_completion_function));
+	}
+
+	if (internal_settings->m_DestinationIndexAndTypePresent == false)
+	{
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				eap_status_illegal_parameter,
+				internal_settings,
+				error_completion_function));
+	}
+
+	TIndexType aDestinationIndexType(static_cast<TIndexType>(internal_settings->m_DestinationIndexType));
+	TUint aDestinationIndex(static_cast<TUint>(internal_settings->m_DestinationIndex));
+
+	TRAP(error, (eapType->SetIndexL(
+		aDestinationIndexType, 
+		aDestinationIndex)));
+	if (error != KErrNone)
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("ERROR: Cannot copy configuration from EAP-type=0xfe%06x%08x, (index_type=%d, index=%d) to (index_type=%d, index=%d).\n"),
+			internal_settings->m_EAPType.get_vendor_id(),
+			internal_settings->m_EAPType.get_vendor_type(),
+			internal_settings->m_IndexType,
+			internal_settings->m_Index,
+			internal_settings->m_DestinationIndexType,
+			internal_settings->m_DestinationIndex));
+
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				m_am_tools->convert_am_error_to_eapol_error(error),
+				internal_settings,
+				error_completion_function));
+	}
+
+	eap_method_settings_c * const complete_settings = new eap_method_settings_c(m_am_tools, internal_settings);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_complete_settings(
+		m_am_tools,
+		complete_settings);
+
+	if (complete_settings == 0)
+	{
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				eap_status_allocation_error,
+				internal_settings,
+				error_completion_function));
+	}
+
+	complete_settings->m_completion_status = eap_status_ok;
+
+	eap_status_e status = m_partner->complete_set_index(complete_settings);
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+// ----------------------------------------------------------------------
+
+eap_status_e eap_am_plugin_symbian_c::get_type_info(const eap_method_settings_c * const internal_settings)
+{
+	EAP_TRACE_DEBUG(
+		m_am_tools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_plugin_symbian_c::get_type_info(): this=0x%08x.\n"),
+		this));
+
+	EAP_TRACE_RETURN_STRING(m_am_tools, "returns: eap_am_plugin_symbian_c::get_type_info()");
+
+	const eap_tlv_message_type_function_e error_completion_function(eap_tlv_message_type_function_plugin_complete_get_type_info);
+
+	CEapTypePlugin* const eapType = get_eap_type(internal_settings->m_EAPType, internal_settings->m_IndexType, internal_settings->m_Index);
+	if (eapType == 0)
+	{
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				eap_status_allocation_error,
+				internal_settings,
+				error_completion_function));
+	}
+
+	if (internal_settings->m_TunnelingTypePresent == true)
+	{
+		TEapExpandedType aExpandedType;
+    
+		TInt err = CEapConversion::ConvertInternalTypeToExpandedEAPType(
+				&(internal_settings->m_TunnelingType),
+				&aExpandedType);
+
+		eapType->SetTunnelingType(aExpandedType);
+	}
+
+	EAPSettings * local_settings = new EAPSettings;
+
+	eap_automatic_variable_c<EAPSettings> automatic_aSettings(
+		m_am_tools,
+		local_settings);
+
+	if (local_settings == 0)
+	{
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				eap_status_allocation_error,
+				internal_settings,
+				error_completion_function));
+	}
+
+	TInt error = CEapConversion::ConvertInternalTypeToEAPSettings(
+		m_am_tools,
+		internal_settings,
+		local_settings);
+	if (error != KErrNone)
+	{
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				m_am_tools->convert_am_error_to_eapol_error(error),
+				internal_settings,
+				error_completion_function));
+	}
+
+	if (internal_settings->m_DestinationIndexAndTypePresent == false)
+	{
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				eap_status_illegal_parameter,
+				internal_settings,
+				error_completion_function));
+	}
+
+	CEapTypeInfo * type_info = 0;
+
+	TRAP(error, (type_info = eapType->GetInfoL()));
+	if (error != KErrNone
+		|| type_info == 0)
+	{
+		EAP_TRACE_DEBUG(
+			m_am_tools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("ERROR: Cannot get type info configuration from EAP-type=0xfe%06x%08x, (index_type=%d, index=%d).\n"),
+			internal_settings->m_EAPType.get_vendor_id(),
+			internal_settings->m_EAPType.get_vendor_type(),
+			internal_settings->m_IndexType,
+			internal_settings->m_Index));
+
+		if (type_info != 0)
+		{
+			delete type_info;
+			type_info = 0;
+		}
+
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				m_am_tools->convert_am_error_to_eapol_error(error),
+				internal_settings,
+				error_completion_function));
+	}
+
+	eap_method_settings_c * const complete_settings = new eap_method_settings_c(m_am_tools, internal_settings);
+
+	eap_automatic_variable_c<eap_method_settings_c> automatic_complete_settings(
+		m_am_tools,
+		complete_settings);
+
+	if (complete_settings == 0)
+	{
+		delete type_info;
+		type_info = 0;
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				eap_status_allocation_error,
+				internal_settings,
+				error_completion_function));
+	}
+
+	error = CEapConversion::ConvertFromTDesCToInternal(
+		m_am_tools,
+		type_info->ReleaseDate(),
+		&(complete_settings->m_KReleaseDate));
+
+	if(error == KErrNone)
+	{
+		error = CEapConversion::ConvertFromTDesCToInternal(
+			m_am_tools,
+			type_info->Version(),
+			&(complete_settings->m_KEapTypeVersion));
+	}
+
+	if(error == KErrNone)
+	{
+		error = CEapConversion::ConvertFromTDesCToInternal(
+			m_am_tools,
+			type_info->Manufacturer(),
+			&(complete_settings->m_KManufacturer));
+	}
+
+	delete type_info;
+	type_info = 0;
+
+	if(error != KErrNone)
+	{
+		return EAP_STATUS_RETURN(
+			m_am_tools,
+			error_complete(
+				m_am_tools->convert_am_error_to_eapol_error(error),
+				internal_settings,
+				error_completion_function));
+	}
+
+	complete_settings->m_completion_status = eap_status_ok;
+
+	eap_status_e status = m_partner->complete_get_type_info(complete_settings);
+
+	return EAP_STATUS_RETURN(m_am_tools, status);
+}
+
+// ----------------------------------------------------------------------
+
+
+
+// ----------------------------------------------------------------------
+// End
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/src/eap_am_stack_symbian.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,1563 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 48 %
+*/
+
+#include "eap_am_stack_symbian.h"
+#include "eap_array_algorithms.h"
+#include "eap_base_type.h"
+#include "eap_header_string.h"
+#include "EapConversion.h"
+#include "eapol_key_state_string.h"
+#include "eap_type_tls_peap_types.h"
+#include "EapPluginDbDefaults.h"
+#include "EapConfigToolsSymbian.h"
+#include "eap_am_general_settings_symbian.h"
+
+class CEapTypePlugin;
+
+// LOCAL CONSTANTS
+const TUint KMaxSqlQueryLength = 2048;
+
+const TUint KExpandedEAPSize = 8;
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_am_stack_symbian_c::eap_am_stack_symbian_c(class abs_eap_am_tools_c * tools, bool is_client_when_true)
+	: CActive(0)
+	, iTools (tools)
+	, iIsClient(is_client_when_true)
+	, iPartner(0)
+	, m_client_config(tools)
+	, iFileconfig(0)
+	, iEnabledEapMethodsArray(tools)
+	, iDisabledEapMethodsArray(tools)
+	, m_eap_type_array(tools)
+	, iConfigurationIf(0)
+	, iIndexType(ELan)
+	, iIndex(0UL)
+	, iCurrentEapIndex(0)
+	, m_selected_eapol_key_authentication_type(eapol_key_authentication_type_none)
+{
+    EAP_TRACE_DEBUG(
+        tools, 
+        TRACE_FLAGS_DEFAULT, 
+        (EAPL("eap_am_stack_symbian_c::eap_am_stack_symbian_c()\n")));
+
+    EAP_TRACE_RETURN_STRING(tools, "returns: eap_am_stack_symbian_c::eap_am_stack_symbian_c()");
+
+    iIsValid = ETrue;
+    
+    return;
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_am_stack_symbian_c::~eap_am_stack_symbian_c()
+    {
+    EAP_TRACE_DEBUG(
+        iTools, 
+        TRACE_FLAGS_DEFAULT, 
+        (EAPL("eap_am_stack_symbian_c::~eap_am_stack_symbian_c()\n")));
+
+	Cancel();
+
+    EAP_TRACE_RETURN_STRING(iTools, "returns: eap_am_stack_symbian_c::~eap_am_stack_symbian_c()");
+    }
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT bool eap_am_stack_symbian_c::get_is_valid()
+    {
+    return iIsValid;
+    }
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_am_stack_symbian_c::set_partner(abs_eap_am_stack_c * partner, abs_eap_configuration_if_c * configuration_if)
+    {
+    eap_status_e aStatus(eap_status_ok);
+    iPartner = partner;
+    iConfigurationIf = configuration_if;
+    return aStatus;
+    }
+
+//--------------------------------------------------
+
+eap_status_e eap_am_stack_symbian_c::reset_eap_configuration()
+{
+	EAP_TRACE_BEGIN(iTools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		iTools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("eap_am_stack_symbian_c::reset_eap_configuration(): %s, this = 0x%08x\n"),
+		 (iIsClient == true) ? "client": "server",
+		 this));
+
+    EAP_TRACE_RETURN_STRING(iTools, "returns: eap_am_stack_symbian_c::reset_eap_configuration()");
+
+	eap_status_e status(eap_status_ok);
+
+	TRAPD(error, ReadEAPSettingsL());
+	if (error != KErrNone)
+	{
+		EAP_TRACE_ERROR(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("EAP settings reading from CommDb failed or cancelled(error %d).\n"), error));
+
+		status = iTools->convert_am_error_to_eapol_error(error);
+	}
+
+	EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(iTools, status);
+}
+
+//--------------------------------------------------
+
+// This is documented in abs_eap_stack_interface_c::configure().
+EAP_FUNC_EXPORT eap_status_e eap_am_stack_symbian_c::configure(
+	const eap_variable_data_c * const client_configuration)
+    {
+    EAP_TRACE_BEGIN(iTools, TRACE_FLAGS_DEFAULT);
+
+    EAP_TRACE_DEBUG(
+        iTools, 
+        TRACE_FLAGS_DEFAULT, 
+        (EAPL("eap_am_stack_symbian_c::configure(): %s, this = 0x%08x => 0x%08x\n"),
+         (iIsClient == true) ? "client": "server",
+         this,
+         dynamic_cast<abs_eap_base_timer_c *>(this)));
+
+    EAP_TRACE_RETURN_STRING(iTools, "returns: eap_am_stack_symbian_c::configure()");
+
+    TInt error(KErrNone);
+	eap_status_e status(eap_status_ok);
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	if (client_configuration != 0
+		&& client_configuration->get_is_valid_data() == true)
+	{
+		status = m_client_config.read_configuration_message(client_configuration);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(iTools, status);
+		}
+	}
+	
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+    // Open the database session
+    error = iSession.Connect();
+    if (error != KErrNone)
+    {
+        status = EAP_STATUS_RETURN(iTools, iTools->convert_am_error_to_eapol_error(error));
+
+        EAP_TRACE_DEBUG(
+            iTools,
+            TRACE_FLAGS_DEFAULT,
+            (EAPL("RDbs::Connect() failed %d.\n"),
+            status));
+        EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+        return EAP_STATUS_RETURN(iTools, status);
+    }
+
+    EAP_TRACE_DEBUG(
+        iTools,
+        TRACE_FLAGS_DEFAULT,
+        (EAPL("Database session initialized...\n")));
+
+    // Connect to FS
+    error = iFs.Connect();
+    if (error != KErrNone)
+    {
+        status = EAP_STATUS_RETURN(iTools, iTools->convert_am_error_to_eapol_error(error));
+
+        EAP_TRACE_DEBUG(
+            iTools,
+            TRACE_FLAGS_DEFAULT,
+            (EAPL("RFs::Connect() failed %d.\n"),
+            status));
+        EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+        return EAP_STATUS_RETURN(iTools, status);
+    }
+
+    EAP_TRACE_DEBUG(
+        iTools,
+        TRACE_FLAGS_DEFAULT,
+        (EAPL("Fileserver session initialized...\n")));
+
+    // - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = EapConfigToolsSymbian::EapReadDefaultConfigFileSymbian(
+		iTools,
+		&iFileconfig);
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(m_am_tools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(iTools, status);
+	}
+
+    // - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+#if defined(USE_EAP_FILE_TRACE)
+    {
+        eap_variable_data_c trace_output_file(iTools);
+
+        status = read_configure(
+            cf_str_EAP_TRACE_output_file_name.get_field(),
+            &trace_output_file);
+        if (status == eap_status_ok
+            && trace_output_file.get_is_valid_data() == true)
+        {
+            status = iTools->set_trace_file_name(&trace_output_file);
+            if (status == eap_status_ok)
+            {
+                // OK, set the default trace mask.
+                iTools->set_trace_mask(
+                    eap_am_tools_c::eap_trace_mask_debug
+                    | eap_am_tools_c::eap_trace_mask_always
+                    | eap_am_tools_c::eap_trace_mask_error
+                    | eap_am_tools_c::eap_trace_mask_message_data);
+            }
+        }
+    }
+#endif //#if defined(USE_EAP_FILE_TRACE)
+
+
+    // - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	{
+		eap_variable_data_c EAP_TRACE_enable_timer_traces(iTools);
+
+		status = read_configure(
+			cf_str_EAP_TRACE_enable_timer_traces.get_field(),
+			&EAP_TRACE_enable_timer_traces);
+		if (status == eap_status_ok
+			&& EAP_TRACE_enable_timer_traces.get_is_valid_data() == true)
+		{
+			u32_t *enable_timer_traces = reinterpret_cast<u32_t *>(
+				EAP_TRACE_enable_timer_traces.get_data(sizeof(u32_t)));
+			if (enable_timer_traces != 0
+				&& *enable_timer_traces != 0)
+			{
+				iTools->set_trace_mask(
+					iTools->get_trace_mask()
+					| TRACE_FLAGS_TIMER
+					);
+			}
+		}
+	}
+
+	// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	{
+		eap_variable_data_c EAP_TRACE_enable_timer_queue_traces(iTools);
+
+		status = read_configure(
+			cf_str_EAP_TRACE_enable_timer_queue_traces.get_field(),
+			&EAP_TRACE_enable_timer_queue_traces);
+		if (status == eap_status_ok
+			&& EAP_TRACE_enable_timer_queue_traces.get_is_valid_data() == true)
+		{
+			u32_t *enable_timer_queue_traces = reinterpret_cast<u32_t *>(
+				EAP_TRACE_enable_timer_queue_traces.get_data(sizeof(u32_t)));
+			if (enable_timer_queue_traces != 0
+				&& *enable_timer_queue_traces != 0)
+			{
+				iTools->set_trace_mask(
+					iTools->get_trace_mask()
+					| TRACE_FLAGS_TIMER_QUEUE
+					);
+			}
+		}
+	}
+
+    {
+        eap_variable_data_c EAP_TRACE_enable_function_traces(iTools);
+
+        status = read_configure(
+            cf_str_EAP_TRACE_enable_function_traces.get_field(),
+            &EAP_TRACE_enable_function_traces);
+        if (status == eap_status_ok
+            && EAP_TRACE_enable_function_traces.get_is_valid_data() == true)
+        {
+            u32_t *enable_function_traces = reinterpret_cast<u32_t *>(
+                EAP_TRACE_enable_function_traces.get_data(sizeof(u32_t)));
+            if (enable_function_traces != 0
+                && *enable_function_traces != 0)
+            {
+                iTools->set_trace_mask(
+                    iTools->get_trace_mask()
+                    | eap_am_tools_c::eap_trace_mask_functions
+                    );
+            }
+        }
+    }
+
+    // - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+    EAP_TRACE_DEBUG(
+        iTools,
+        TRACE_FLAGS_DEFAULT,
+        (EAPL("Created timer...\n")));
+
+    EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+    return EAP_STATUS_RETURN(iTools, eap_status_ok);
+  
+    }
+
+//--------------------------------------------------
+
+eap_status_e eap_am_stack_symbian_c::reset_eap_plugins()
+{
+	EAP_TRACE_BEGIN(iTools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		iTools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("eap_am_stack_symbian_c::reset_eap_plugins(): %s, this = 0x%08x => 0x%08x\n"),
+		 (iIsClient == true) ? "client": "server",
+		 this,
+		 dynamic_cast<abs_eap_base_timer_c *>(this)));
+
+	// Unload all loaded plugins
+	for(int ind = 0; ind < m_plugin_if_array.Count(); ind++)
+	{
+		delete m_plugin_if_array[ind];
+	}
+
+	m_plugin_if_array.Close();
+
+
+	iEnabledEapMethodsArray.reset();
+	iDisabledEapMethodsArray.reset();
+
+	
+	m_eap_type_array.reset();
+	
+	EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(iTools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+// This is documented in abs_eap_stack_interface_c::shutdown().
+EAP_FUNC_EXPORT eap_status_e eap_am_stack_symbian_c::shutdown()
+{
+	EAP_TRACE_BEGIN(iTools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_ALWAYS(
+		iTools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("eap_am_stack_symbian_c::shutdown(): %s, this = 0x%08x => 0x%08x\n"),
+		 (iIsClient == true) ? "client": "server",
+		 this,
+		 dynamic_cast<abs_eap_base_timer_c *>(this)));
+
+	delete iFileconfig;
+	iFileconfig = 0;
+
+	(void) reset_eap_plugins();
+
+	EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(iTools, eap_status_ok);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_am_stack_symbian_c::read_configure(
+    const eap_configuration_field_c * const field,
+    eap_variable_data_c * const data) 
+{
+    EAP_TRACE_BEGIN(iTools, TRACE_FLAGS_DEFAULT);
+    EAP_ASSERT_ALWAYS_TOOLS(iTools, data != NULL);
+    
+    EAP_TRACE_DEBUG(
+        iTools, 
+        TRACE_FLAGS_DEFAULT, 
+        (EAPL("eap_am_stack_symbian_c::read_configure(): %s, %d=%s, this = 0x%08x => 0x%08x\n"),
+         (iIsClient == true) ? "client": "server",
+		 m_selected_eapol_key_authentication_type,
+		 eapol_key_state_string_c::get_eapol_key_authentication_type_string(m_selected_eapol_key_authentication_type),
+         this,
+         dynamic_cast<abs_eap_base_timer_c *>(this)));
+    
+	EAP_TRACE_DATA_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_stack_symbian_c::read_configure()"),
+		 field->get_field(),
+		 field->get_field_length()));
+
+    EAP_TRACE_RETURN_STRING(iTools, "returns: eap_am_stack_symbian_c::read_configure()");
+
+    // Trap must be set here because the OS independent portion of EAPOL
+    // that calls this function does not know anything about Symbian.   
+    eap_status_e status(eap_status_ok);
+
+    // Check if the wanted parameter is default type
+	if (field->compare(iTools, cf_str_EAP_default_type_hex_data.get_field()) == true)
+	{
+		// First check do we have read configuration from databases.
+		if (m_selected_eapol_key_authentication_type == eapol_key_authentication_type_WPS)
+		{
+			EAP_TRACE_DEBUG(
+				iTools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("m_selected_eapol_key_authentication_type = eapol_key_authentication_type_WPS\n")));
+
+			status = eap_expanded_type_simple_config.get_type().get_expanded_type_data(
+				iTools,
+				data);
+
+			if (status == eap_status_ok)
+			{
+				set_current_eap_index(0);
+			}
+
+			EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(iTools, status);
+		}
+		else if (iEnabledEapMethodsArray.get_object_count() == 0ul)
+		{
+			EAP_TRACE_ERROR(
+				iTools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("EAP settings not read from CommsDat\n")));
+
+			EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);	
+			return EAP_STATUS_RETURN(iTools, eap_status_process_general_error);
+		}
+
+		// Now we need to return here the next EAP type we should try
+
+		TInt ind = get_current_eap_index(); 
+
+
+		if (get_current_eap_index() < iEnabledEapMethodsArray.get_object_count())
+		{
+			eap_type_value_e * const next_eap_method = iEnabledEapMethodsArray.get_object(get_current_eap_index());
+			if (next_eap_method != 0
+				&& next_eap_method->get_is_valid() == true)
+			{
+				status = data->set_buffer_length(eap_expanded_type_c::get_eap_expanded_type_size());
+				if (status != eap_status_ok)
+				{
+					EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+					return EAP_STATUS_RETURN(iTools, eap_status_allocation_error);
+				}
+
+				status = data->set_data_length(eap_expanded_type_c::get_eap_expanded_type_size());
+				if (status != eap_status_ok)
+				{
+					EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+					return EAP_STATUS_RETURN(iTools, status);
+				}
+
+				status = eap_expanded_type_c::write_type(
+					iTools,
+					0ul,
+					data->get_data(),
+					data->get_data_length(),
+					true,
+					*next_eap_method);
+				if (status != eap_status_ok)
+				{
+					EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+					return EAP_STATUS_RETURN(iTools, status);
+				}
+			}
+		}
+
+
+
+		if (ind >= iEnabledEapMethodsArray.get_object_count())
+		{
+			// Not found any other EAP type as enabled.
+			// Send WLM notification because there is no way that the authentication
+			// can be successful if we don't have any EAP types to use...
+			if (iIsClient)
+			{
+				EAP_TRACE_ERROR(
+					iTools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("ERROR: read_configure: No configured EAP types or all tried unsuccessfully.\n")));
+			}
+
+			EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(iTools, eap_status_illegal_configure_field);
+		}
+
+		EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(iTools, status);
+
+	} // if ()
+
+
+#if defined(USE_EAP_FILECONFIG)
+    {
+		status = m_client_config.read_configure(field, data);
+		if (status != eap_status_ok)
+		{
+			if (iFileconfig != 0
+				&& iFileconfig->get_is_valid() == true)
+			{
+				// Here we could try the final configuration option.
+				status = iFileconfig->read_configure(
+					field,
+					data);
+			}
+		}
+    }
+#endif //#if defined(USE_EAP_FILECONFIG)
+
+
+    iTools->trace_configuration(
+        status,
+        field,
+        data);
+
+    EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+    return EAP_STATUS_RETURN(iTools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_am_stack_symbian_c::set_timer(
+    abs_eap_base_timer_c * const p_initializer, 
+    const u32_t p_id, 
+    void * const p_data,
+    const u32_t p_time_ms) 
+{
+	EAP_TRACE_BEGIN(iTools, TRACE_FLAGS_DEFAULT);
+
+	const eap_status_e status = iTools->am_set_timer(
+		p_initializer, 
+		p_id, 
+		p_data,
+		p_time_ms);
+
+	EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(iTools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_am_stack_symbian_c::cancel_timer(
+    abs_eap_base_timer_c * const p_initializer, 
+    const u32_t p_id) 
+{
+	EAP_TRACE_BEGIN(iTools, TRACE_FLAGS_DEFAULT);
+
+	const eap_status_e status = iTools->am_cancel_timer(
+		p_initializer, 
+		p_id);
+
+	EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(iTools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_am_stack_symbian_c::check_is_valid_eap_type(
+    const eap_type_value_e eap_type) 
+{
+	EAP_TRACE_BEGIN(iTools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_stack_symbian_c::check_is_valid_eap_type():  %s, %d=%s, this = 0x%08x => 0x%08x, EAP-type=0xfe%06x%08x=%s\n"),
+		(iIsClient == true) ? "client": "server",
+		m_selected_eapol_key_authentication_type,
+		eapol_key_state_string_c::get_eapol_key_authentication_type_string(m_selected_eapol_key_authentication_type),
+		this,
+		dynamic_cast<abs_eap_base_timer_c *>(this),
+		eap_type.get_vendor_id(),
+		eap_type.get_vendor_type(),
+		eap_header_string_c::get_eap_type_string(eap_type)));
+
+    EAP_TRACE_RETURN_STRING(iTools, "returns: eap_am_stack_symbian_c::check_is_valid_eap_type()");
+
+	if (m_selected_eapol_key_authentication_type == eapol_key_authentication_type_WPS
+		&& eap_type == eap_expanded_type_simple_config.get_type())
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT, (EAPL("eap_am_stack_symbian_c::check_is_valid_eap_type(): WPS does not use CommDbIf anymore.\n")));
+
+		return EAP_STATUS_RETURN(iTools, eap_status_ok);
+	}
+
+
+	for (int ind = 0; ind < iEnabledEapMethodsArray.get_object_count(); ++ind)
+	{
+		const eap_type_value_e * const allowed_eap_method = iEnabledEapMethodsArray.get_object(ind);
+
+		if (allowed_eap_method != 0
+			&& eap_type == *allowed_eap_method)
+		{
+			// This is Allowed and Valid.
+			EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(iTools, eap_status_ok);
+		}
+	} // for()
+
+
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("ERROR: %s: check_is_valid_eap_type(): not supported EAP-type=0xfe%06x%08x=%s\n"),
+		 (iIsClient == true ? "client": "server"),
+		 eap_type.get_vendor_id(),
+		 eap_type.get_vendor_type(),
+		 eap_header_string_c::get_eap_type_string(eap_type)));
+
+
+	EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(iTools, eap_status_illegal_eap_type);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_am_stack_symbian_c::get_eap_type_list(
+    eap_array_c<eap_type_value_e> * const eap_type_list) 
+{
+	EAP_TRACE_BEGIN(iTools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		iTools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("eap_am_stack_symbian_c::get_eap_type_list(): %s, %d=%s, this = 0x%08x => 0x%08x\n"),
+		 (iIsClient == true) ? "client": "server",
+		 m_selected_eapol_key_authentication_type,
+		 eapol_key_state_string_c::get_eapol_key_authentication_type_string(m_selected_eapol_key_authentication_type),
+		 this,
+		 dynamic_cast<abs_eap_base_timer_c *>(this)));
+
+    EAP_TRACE_RETURN_STRING(iTools, "returns: eap_am_stack_symbian_c::get_eap_type_list()");
+
+	eap_status_e status(eap_status_illegal_eap_type);
+
+	status = eap_type_list->reset();
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(iTools, status);
+	}
+
+	if (m_selected_eapol_key_authentication_type == eapol_key_authentication_type_WPS)
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT, (EAPL("eap_am_stack_symbian_c::get_eap_type_list(): WPS does not use CommDbIf anymore.\n")));
+
+		// This is for one expanded EAP type (for the above one).
+		eap_expanded_type_c * expandedEAPType = new eap_type_value_e(eap_expanded_type_simple_config.get_type());
+
+		// Add WPS EAP-type to list.		
+		status = eap_type_list->add_object(expandedEAPType, true);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(iTools, status);
+		}
+
+		return EAP_STATUS_RETURN(iTools, eap_status_ok);
+	}
+
+	// This function is same as get_selected_eap_types in behavior.
+
+	// We need to return only the EAP types available as enabled types.
+	// It means only the ones available in m_enabled_expanded_eap_array.
+	
+
+	for (TInt ind = 0; ind < iEnabledEapMethodsArray.get_object_count(); ++ind)
+	{	
+		const eap_type_value_e * const allowed_eap_method = iEnabledEapMethodsArray.get_object(ind);
+
+		if (allowed_eap_method != 0
+			&& allowed_eap_method->get_is_valid() == true)
+		{
+			EAP_TRACE_DEBUG(
+				iTools, 
+				TRACE_FLAGS_DEFAULT, 
+				(EAPL("eap_am_stack_symbian_c::ReadEAPSettingsL(): Enabled expanded EAP type at index=%d, EAP-type=0xfe%06x%08x\n"),
+				 ind,
+				 allowed_eap_method->get_vendor_id(),
+				 allowed_eap_method->get_vendor_type()));
+
+			status = eap_type_list->add_object(allowed_eap_method->copy(), true);
+			if (status != eap_status_ok)
+			{
+				EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(iTools, status);
+			}
+		}
+	} // for()
+
+
+	EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(iTools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_am_stack_symbian_c::load_module(
+    const eap_type_value_e type,
+    const eap_type_value_e tunneling_type,
+    abs_eap_base_type_c * const partner,
+    eap_base_type_c ** const eap_type,
+    const bool is_client_when_true,
+    const eap_am_network_id_c * const receive_network_id) 
+{
+	EAP_TRACE_BEGIN(iTools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_stack_symbian_c::load_module(type %d=%s, tunneling_type %d=%s)\n"),
+		convert_eap_type_to_u32_t(type),
+		eap_header_string_c::get_eap_type_string(type),
+		convert_eap_type_to_u32_t(tunneling_type),
+		eap_header_string_c::get_eap_type_string(tunneling_type)));
+
+	EAP_TRACE_RETURN_STRING(iTools, "returns: eap_am_stack_symbian_c::load_module()");
+
+	eap_status_e status(eap_status_process_general_error);
+
+	CEapTypePlugin* eapType = 0;
+	TInt error(KErrNone);
+
+	// Check if this EAP type has already been loaded
+	TInt eapArrayIndex = find<eap_type_value_e>(
+		&m_eap_type_array,
+		&type,
+		iTools);
+
+	if (eapArrayIndex >= 0)
+	{
+		// We found the entry in the array.
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_am_stack_symbian_c::load_module(type %d=%s, tunneling_type %d=%s) already loaded.\n"),
+			convert_eap_type_to_u32_t(type),
+			eap_header_string_c::get_eap_type_string(type),
+			convert_eap_type_to_u32_t(tunneling_type),
+			eap_header_string_c::get_eap_type_string(tunneling_type)));
+
+		// Yep. It was loaded already.
+		eapType = m_plugin_if_array[eapArrayIndex];     
+	}
+	else 
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_am_stack_symbian_c::load_module(type %d=%s, tunneling_type %d=%s) load new, iIndexType=%d, iIndex=%d.\n"),
+			convert_eap_type_to_u32_t(type),
+			eap_header_string_c::get_eap_type_string(type),
+			convert_eap_type_to_u32_t(tunneling_type),
+			eap_header_string_c::get_eap_type_string(tunneling_type),
+			iIndexType,
+			iIndex));
+
+		TBuf8<KExpandedEAPSize> expanded_type;
+    
+		// Some indirect way of forming the 8 byte string of an EAP type for the cue is needed here.        
+		TUint8 tmp_expanded_type[KExpandedEAPSize];
+
+		// This is to make the tmp_expanded_type in 8 byte string with correct vendor type and vendor id details.
+		status = eap_expanded_type_c::write_type(iTools,
+												0, // index should be zero here.
+												tmp_expanded_type,
+												KExpandedEAPSize,
+												true,
+												type);
+		if (status != eap_status_ok)
+		{
+			EAP_TRACE_DEBUG(
+				iTools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("load_module: eap_expanded_type_c::write_type(): failed status=%d=%s\n"),
+				status,
+				eap_status_string_c::get_status_string(status)));
+    
+			EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(iTools, status);
+		}
+    
+		// Now copy the 8 byte string to the real expanded cue.
+		expanded_type.Copy(tmp_expanded_type, KExpandedEAPSize);
+
+		EAP_TRACE_DATA_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("EAPOL:eap_am_stack_symbian_c::load_module(): expanded_type:"),
+			expanded_type.Ptr(),
+			expanded_type.Size()));
+
+
+		// We must have a trap here since the EAPOL core knows nothing about Symbian.
+		TRAP(error, (eapType = CEapTypePlugin::NewL(
+			expanded_type,
+			iIndexType,
+			iIndex)));   
+		if (error != KErrNone
+			|| eapType == 0)
+		{
+			// Interface not found or implementation creation function failed
+			status = iTools->convert_am_error_to_eapol_error(error);
+			if (status == eap_status_ok)
+			{
+				status = eap_status_allocation_error;
+			}
+
+			EAP_TRACE_DEBUG(
+				iTools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("ERROR: ECom could not find/initiate implementation, error=%d, status=%d=%s.\n"),
+				error,
+				status,
+				eap_status_string_c::get_status_string(status)));
+
+			EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(iTools, status);
+		}
+	}
+
+
+	{
+		TEapExpandedType expanded_type;
+    
+		error = CEapConversion::ConvertInternalTypeToExpandedEAPType(
+				&tunneling_type,
+				&expanded_type);
+		if (error != KErrNone)
+		{
+			status = iTools->convert_am_error_to_eapol_error(error);
+			EAP_TRACE_DEBUG(
+				iTools,
+				TRACE_FLAGS_DEFAULT,
+				(EAPL("ERROR: CEapConversion::ConvertInternalTypeToExpandedEAPType(): failed error=%d, status=%d=%s\n"),
+				error,
+				status,
+				eap_status_string_c::get_status_string(status)));
+			EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+			return EAP_STATUS_RETURN(iTools, status);
+		}
+
+		eapType->SetTunnelingType(expanded_type);
+	}
+
+	// Create the EAP protocol interface implementation.
+
+	TRAP(error, (*eap_type = eapType->GetStackInterfaceL(iTools, 
+		partner, 
+		is_client_when_true, 
+		receive_network_id,
+		this)));
+
+	if (error != KErrNone 
+		|| *eap_type == 0 
+		|| (*eap_type)->get_is_valid() == false)
+	{
+		status = iTools->convert_am_error_to_eapol_error(error);
+		if (status == eap_status_ok)
+		{
+			status = eap_status_allocation_error;
+		}
+
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("ERROR: Could not create EAP type interface instance. error=%d, status=%d=%s\n"),
+			error,
+			status,
+			eap_status_string_c::get_status_string(status)));
+
+		if  (eapArrayIndex == KErrNotFound)
+		{
+			// No need to call shutdown here because GetStackInterfaceL has done it.
+			delete eapType;
+		}
+		// Note: even in error cases eap_core_c deletes eap_type
+	}
+	else
+	{
+		status = eap_status_ok;
+		if (eapArrayIndex  == KErrNotFound)
+		{
+			// Add plugin information to the member arrays. There is no need to store eap_type pointer because
+			// the stack takes care of its deletion.
+			if (m_plugin_if_array.Append(eapType) != KErrNone)
+			{
+				delete eapType;
+				status = eap_status_allocation_error;
+				EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(iTools, status);               
+			}
+
+			eap_type_value_e * tmpEAPType = new eap_type_value_e();
+			if(tmpEAPType == NULL)
+			{
+				EAP_TRACE_DEBUG(
+					iTools,
+					TRACE_FLAGS_DEFAULT,
+					(EAPL("ERROR: eap_am_stack_symbian_c::load_module() eap_type_value_e creation failed\n")));
+				EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(iTools, eap_status_allocation_error);              
+			}
+        
+			*tmpEAPType = type;
+        
+			status = m_eap_type_array.add_object(tmpEAPType, true);
+        
+			if (status != eap_status_ok)            
+			{
+				// Remove the eap type added just previously
+				m_plugin_if_array.Remove(m_plugin_if_array.Count() - 1);
+				delete eapType;
+				status = eap_status_allocation_error;
+				EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+				return EAP_STATUS_RETURN(iTools, status);               
+			}
+		} 
+	}
+
+	EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(iTools, status);
+}
+
+//--------------------------------------------------
+
+void eap_am_stack_symbian_c::RunL()
+{
+    EAP_TRACE_BEGIN(iTools, TRACE_FLAGS_DEFAULT);   
+    EAP_TRACE_DEBUG(
+        iTools,
+        TRACE_FLAGS_DEFAULT,
+        (EAPL("eap_am_stack_symbian_c::RunL(): iStatus.Int() = %d\n"),
+        iStatus.Int()));
+
+    if (iStatus.Int() != KErrNone)
+    {
+        EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+        return;
+    }
+
+    // Authentication cancelled.
+    EAP_TRACE_ALWAYS(
+        iTools,
+        TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT,
+        (EAPL("Authentication cancelled.\n")));
+
+    // Reset index of current EAP-type.
+    set_current_eap_index(0ul);
+
+    EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT); 
+}
+
+//--------------------------------------------------
+
+void eap_am_stack_symbian_c::read_configureL(
+    const TDesC& aDbName,
+    const TDesC& aTableName,
+    eap_config_string field,
+    const u32_t /*field_length*/,
+    eap_variable_data_c * const data)
+{   
+    EAP_TRACE_BEGIN(iTools, TRACE_FLAGS_DEFAULT);
+    
+    EAP_TRACE_DEBUG(
+        iTools, 
+        TRACE_FLAGS_DEFAULT, 
+        (EAPL("eap_am_stack_symbian_c::read_configureL(): %s, %d=%s, this = 0x%08x => 0x%08x\n"),
+         (iIsClient == true) ? "client": "server",
+		 m_selected_eapol_key_authentication_type,
+		 eapol_key_state_string_c::get_eapol_key_authentication_type_string(m_selected_eapol_key_authentication_type),
+         this,
+         dynamic_cast<abs_eap_base_timer_c *>(this)));
+    
+    EAP_TRACE_RETURN_STRING(iTools, "returns: eap_am_stack_symbian_c::read_configureL()");
+
+	if (m_selected_eapol_key_authentication_type == eapol_key_authentication_type_WPS)
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT, (EAPL("eap_am_stack_symbian_c::read_configureL(): WPS does not use CommDbIf anymore.\n")));
+		User::Leave(KErrNotSupported);
+	}
+
+    // Open database
+    RDbNamedDatabase db;
+
+    User::LeaveIfError(db.Open(iSession, aDbName, KEapSecureUIDFormat));  
+    
+    CleanupClosePushL(db);
+
+	const TUint BUFFER_SIZE = 128ul;
+
+    // Create a buffer for the ascii strings - initialised with the argument
+    HBufC8* asciibuf = HBufC8::NewLC(BUFFER_SIZE);
+    TPtr8 asciiString = asciibuf->Des();
+    asciiString.Copy(reinterpret_cast<const unsigned char *>(field));
+        
+    // Buffer for unicode parameter
+    HBufC* unicodebuf = HBufC::NewLC(BUFFER_SIZE);
+    TPtr unicodeString = unicodebuf->Des();
+    
+    // Convert to unicode 
+    unicodeString.Copy(asciiString);
+
+    // Now do the database query
+    HBufC* buf = HBufC::NewLC(KMaxSqlQueryLength);
+    TPtr sqlStatement = buf->Des();
+    _LIT(KSQLQueryRow, "SELECT %S FROM %S");
+    sqlStatement.Format( KSQLQueryRow, &unicodeString, &aTableName );
+    
+    RDbView view;
+    User::LeaveIfError(view.Prepare(db, TDbQuery(sqlStatement), TDbWindow::EUnlimited));
+    CleanupClosePushL(view);
+    User::LeaveIfError(view.EvaluateAll()); 
+    if (view.FirstL())
+    {
+        eap_status_e status(eap_status_process_general_error);
+		const TDbColNo FIRST_COLUMN = 1ul;
+        view.GetL();        
+        switch (view.ColType(FIRST_COLUMN))
+        {
+        case EDbColText:                
+            {
+                unicodeString = view.ColDes(FIRST_COLUMN);
+                // Convert to 8-bit
+                asciiString.Copy(unicodeString);
+                if (asciiString.Size() > 0)
+                {
+                    status = data->set_copy_of_buffer(asciiString.Ptr(), asciiString.Size());
+                    if (status != eap_status_ok)
+                    {
+                        User::Leave(KErrNoMemory);
+                    }
+                } 
+            }
+            break;
+        case EDbColUint32:
+            {
+                TUint value;
+                value = view.ColUint32(FIRST_COLUMN);
+                status = data->set_copy_of_buffer((const unsigned char *) &value, sizeof(value));
+                if (status != eap_status_ok)
+                {
+                    User::Leave(KErrNoMemory);
+                }
+            }
+            break;
+        default:
+            EAP_TRACE_DEBUG(
+                iTools,
+                TRACE_FLAGS_DEFAULT,
+                (EAPL("read_configureL: Unexpected column type.\n")));
+            User::Panic(_L("EAPOL"), 1);            
+        }
+    } 
+    else 
+    {
+        // Could not find parameter
+        EAP_TRACE_DEBUG(
+            iTools,
+            TRACE_FLAGS_DEFAULT,
+            (EAPL("read_configureL: Could not find configuration parameter.\n")));
+        User::Leave(KErrNotFound);
+    }       
+    
+    // Close database
+    CleanupStack::PopAndDestroy(&view);
+    CleanupStack::PopAndDestroy(buf);
+    CleanupStack::PopAndDestroy(unicodebuf);
+    CleanupStack::PopAndDestroy(asciibuf);
+    CleanupStack::PopAndDestroy(&db);
+
+
+    EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+}
+
+//--------------------------------------------------
+
+//
+void eap_am_stack_symbian_c::DoCancel()
+{   
+    EAP_TRACE_BEGIN(iTools, TRACE_FLAGS_DEFAULT);
+
+    EAP_TRACE_DEBUG(
+        iTools,
+        TRACE_FLAGS_DEFAULT,
+        (EAPL("eap_am_stack_symbian_c::DoCancel()\n")));
+
+    EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT); 
+}
+
+//----------------------------------------------------------------------------
+
+TInt eap_am_stack_symbian_c::RunError(TInt aError)
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_stack_symbian_c::RunError(): aError=%d, this=0x%08x\n"),
+		aError,
+		this));
+
+	return aError;
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_am_stack_symbian_c::save_simple_config_session(
+    const simple_config_state_e state,
+    EAP_TEMPLATE_CONST eap_array_c<simple_config_credential_c> * const credential_array,
+    const eap_variable_data_c * const new_password,
+    const simple_config_Device_Password_ID_e Device_Password_ID,
+    const simple_config_payloads_c * const other_configuration)
+{
+    EAP_TRACE_DEBUG(
+        iTools,
+        TRACE_FLAGS_DEFAULT,
+        (EAPL("%s: eap_am_stack_symbian_c::save_simple_config_session()\n"),
+        (iIsClient == true ? "client": "server")));
+
+    eap_status_e status(eap_status_ok);
+
+    status = iConfigurationIf->save_simple_config_session(
+        state,
+        credential_array,
+        new_password,
+        Device_Password_ID,
+        other_configuration);
+
+    EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+    return EAP_STATUS_RETURN(iTools, status);
+}
+
+//--------------------------------------------------
+
+//
+void eap_am_stack_symbian_c::ReadEAPSettingsL()
+{
+	EAP_TRACE_BEGIN(iTools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		iTools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("eap_am_stack_symbian_c::ReadEAPSettingsL(): %s, %d=%s, this = 0x%08x => 0x%08x\n"),
+		 (iIsClient == true) ? "client": "server",
+		 m_selected_eapol_key_authentication_type,
+		 eapol_key_state_string_c::get_eapol_key_authentication_type_string(m_selected_eapol_key_authentication_type),
+		 this,
+		 dynamic_cast<abs_eap_base_timer_c *>(this)));
+
+    EAP_TRACE_RETURN_STRING(iTools, "returns: eap_am_stack_symbian_c::ReadEAPSettingsL()");
+
+	eap_status_e status(eap_status_ok);
+
+	if (m_selected_eapol_key_authentication_type == eapol_key_authentication_type_WPS
+		|| iIndex == 0)
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT, (EAPL("eap_am_stack_symbian_c::ReadEAPSettingsL(): WPS does not use CommDbIf anymore.\n")));
+		return;
+	}
+
+	status = reset_eap_plugins();
+	if (status != eap_status_ok)
+	{
+		EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+		User::Leave(iTools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(iTools, status)));
+	}
+
+	if (iIndexType == ELan
+		|| iIndexType == EVpn)
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("eap_am_stack_symbian_c::ReadEAPSettingsL(): Beginning to read IAP settings - Type: %d, Index: %d.\n"), iIndexType, iIndex));
+
+
+		{
+			{
+				eap_am_general_settings_symbian_c * const general_setting = new eap_am_general_settings_symbian_c(iTools);
+
+				if (general_setting == 0)
+				{
+					User::Leave(KErrNoMemory);
+				}
+				if (general_setting->get_is_valid() == false)
+				{
+					general_setting->shutdown();
+					delete general_setting;
+					User::Leave(KErrNoMemory);
+				}
+
+				status = general_setting->configure();
+				if (status != eap_status_ok)
+				{
+					general_setting->shutdown();
+					delete general_setting;
+					User::Leave(iTools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(iTools, status)));
+				}
+
+				status = general_setting->read_eap_methods_synchronously(
+					iIndexType,
+					iIndex,
+					&iEnabledEapMethodsArray,
+					&iDisabledEapMethodsArray);
+
+				general_setting->shutdown();
+				delete general_setting;
+			}
+
+			if (status != eap_status_ok)
+			{
+				User::Leave(iTools->convert_eapol_error_to_am_error(EAP_STATUS_RETURN(iTools, status)));
+			}
+
+			// Trace enabled.
+			for (TInt ind = 0; ind < iEnabledEapMethodsArray.get_object_count(); ++ind)
+			{	
+				const eap_type_value_e * const allowed_eap_method = iEnabledEapMethodsArray.get_object(ind);
+
+				if (allowed_eap_method != 0
+					&& allowed_eap_method->get_is_valid() == true)
+				{
+					EAP_TRACE_DEBUG(
+						iTools, 
+						TRACE_FLAGS_DEFAULT, 
+						(EAPL("eap_am_stack_symbian_c::ReadEAPSettingsL(): Enabled expanded EAP type at index=%d, EAP-type=0xfe%06x%08x\n"),
+						 ind,
+						 allowed_eap_method->get_vendor_id(),
+						 allowed_eap_method->get_vendor_type()));
+				}
+			} // for()
+
+			// Trace disabled.
+			for (TInt ind = 0; ind < iDisabledEapMethodsArray.get_object_count(); ++ind)
+			{	
+				const eap_type_value_e * const allowed_eap_method = iDisabledEapMethodsArray.get_object(ind);
+
+				if (allowed_eap_method != 0
+					&& allowed_eap_method->get_is_valid() == true)
+				{
+					EAP_TRACE_DEBUG(
+						iTools, 
+						TRACE_FLAGS_DEFAULT, 
+						(EAPL("eap_am_stack_symbian_c::ReadEAPSettingsL(): Disabled expanded EAP type at index=%d, EAP-type=0xfe%06x%08x\n"),
+						 ind,
+						 allowed_eap_method->get_vendor_id(),
+						 allowed_eap_method->get_vendor_type()));
+				}
+			} // for()
+		}
+
+
+	} 
+	else
+	{
+		// Unsupported bearer.
+
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("ERROR: eap_am_stack_symbian_c::ReadEAPSettingsL() - LEAVE - unsupported bearer\n")));
+
+		User::Leave(KErrNotSupported);
+	}
+
+	EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+}
+
+//--------------------------------------------------
+
+void eap_am_stack_symbian_c::SetToTopPriorityL(const eap_type_value_e aEapType)
+{
+	EAP_TRACE_BEGIN(iTools, TRACE_FLAGS_DEFAULT);
+
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_stack_symbian_c::SetToTopPriorityL() - for EXP EAP types, %d=%s\n"),
+		 m_selected_eapol_key_authentication_type,
+		 eapol_key_state_string_c::get_eapol_key_authentication_type_string(m_selected_eapol_key_authentication_type)));
+
+    EAP_TRACE_RETURN_STRING(iTools, "returns: eap_am_stack_symbian_c::SetToTopPriorityL()");
+
+	if (m_selected_eapol_key_authentication_type == eapol_key_authentication_type_WPS)
+	{
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT, (EAPL("eap_am_stack_symbian_c::SetToTopPriorityL(): WPS does not use CommDbIf anymore.\n")));
+		return;
+	}
+
+	if (iIndexType == ELan
+		|| iIndexType == EVpn)
+	{
+
+
+
+	} 
+	else
+	{
+		// Unsupported bearer.
+
+		EAP_TRACE_DEBUG(
+			iTools,
+			TRACE_FLAGS_DEFAULT,
+			(EAPL("ERROR: eap_am_stack_symbian_c::SetToTopPriorityL() - LEAVE - unsupported bearer\n")));
+		
+		User::Leave(KErrNotSupported);
+	}
+		
+	EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_am_stack_symbian_c::set_eap_database_reference_values(
+                const eap_variable_data_c * const reference)
+{
+    eap_status_e status(eap_status_ok);
+
+	EAP_TRACE_DEBUG(
+		iTools, 
+		TRACE_FLAGS_DEFAULT, 
+		(EAPL("eap_am_stack_symbian_c::set_eap_database_reference_values(): %s, this = 0x%08x => 0x%08x\n"),
+		 (iIsClient == true) ? "client": "server",
+		 this,
+		 dynamic_cast<abs_eap_base_timer_c *>(this)));
+
+    EAP_TRACE_RETURN_STRING(iTools, "returns: eap_am_stack_symbian_c::set_eap_database_reference_values()");
+
+	const eapol_wlan_database_reference_values_s * const database_reference_values
+		= reinterpret_cast<eapol_wlan_database_reference_values_s *>(
+		reference->get_data(sizeof(eapol_wlan_database_reference_values_s)));
+	if (database_reference_values == 0)
+	{
+		EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+		return EAP_STATUS_RETURN(iTools, eap_status_allocation_error);
+	}
+
+	iIndexType = static_cast<TIndexType>(database_reference_values->m_database_index_type);
+	iIndex = database_reference_values->m_database_index;
+
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("eap_am_stack_symbian_c::set_eap_database_reference_values(): iIndexType=%d, iIndex=%d.\n"),
+		 iIndexType,
+		 iIndex));
+
+    // - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+    return EAP_STATUS_RETURN(iTools, status);
+}
+
+//--------------------------------------------------
+
+TInt eap_am_stack_symbian_c::get_current_eap_index()
+{
+	return iCurrentEapIndex;
+}
+
+//--------------------------------------------------
+
+void eap_am_stack_symbian_c::set_current_eap_index(const TInt ind)
+{
+	iCurrentEapIndex = ind;
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_status_e eap_am_stack_symbian_c::get_802_11_authentication_mode(
+	const eap_am_network_id_c * const receive_network_id,
+	const eapol_key_authentication_type_e authentication_type)
+{
+	EAP_TRACE_DEBUG(
+		iTools,
+		TRACE_FLAGS_DEFAULT,
+		(EAPL("%s: eap_am_stack_symbian_c::get_802_11_authentication_mode(): %d=%s\n"),
+		("client"),
+		 authentication_type,
+		 eapol_key_state_string_c::get_eapol_key_authentication_type_string(authentication_type)));
+
+    EAP_TRACE_RETURN_STRING(iTools, "returns: eap_am_stack_symbian_c::get_802_11_authentication_mode()");
+
+	eap_status_e status(eap_status_ok);
+	eap_expanded_type_c expandedEAPType(eap_type_none);
+	u32_t ind_type = 0ul;
+
+	m_selected_eapol_key_authentication_type = authentication_type;
+
+    // - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+	status = reset_eap_configuration();
+    if (status != eap_status_ok)
+    {
+        EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+        return EAP_STATUS_RETURN(iTools, status);
+    }
+
+    // - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+
+	for (ind_type = 0; ind_type < iEnabledEapMethodsArray.get_object_count(); ++ind_type)
+	{	
+		const eap_type_value_e * const allowed_eap_method = iEnabledEapMethodsArray.get_object(ind_type);
+
+		if (allowed_eap_method != 0
+			&& allowed_eap_method->get_is_valid() == true)
+		{
+			EAP_TRACE_DEBUG(
+				iTools, 
+				TRACE_FLAGS_DEFAULT, 
+				(EAPL("eap_am_stack_symbian_c::ReadEAPSettingsL(): Enabled expanded EAP type at index=%d, EAP-type=0xfe%06x%08x\n"),
+				 ind_type,
+				 allowed_eap_method->get_vendor_id(),
+				 allowed_eap_method->get_vendor_type()));
+
+			if (*allowed_eap_method != eap_type_none)
+			{
+				expandedEAPType = *allowed_eap_method;
+				break;
+			}
+		}
+	} // for()
+
+
+	if (m_selected_eapol_key_authentication_type == eapol_key_authentication_type_WPS)
+	{
+		expandedEAPType = eap_expanded_type_simple_config.get_type();
+	}
+	else if (ind_type >= iEnabledEapMethodsArray.get_object_count())
+	{
+		// No enabled EAP types.
+		EAP_TRACE_ALWAYS(
+			iTools,
+			TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT,
+			(EAPL("ERROR: No enabled EAP types.\n")));
+		EAP_TRACE_ALWAYS(
+			iTools,
+			TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT,
+			(EAPL("ERROR: Indication sent to WLM: eap_status_failed_completely.\n")));
+
+		status = iPartner->complete_get_802_11_authentication_mode(
+			eap_status_illegal_eap_type,
+			receive_network_id,
+			eapol_key_802_11_authentication_mode_none);
+
+		EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);	
+		return EAP_STATUS_RETURN(iTools, status);
+	}	
+
+	eapol_key_802_11_authentication_mode_e a802_11_authentication_mode(eapol_key_802_11_authentication_mode_none);
+
+	if (expandedEAPType == eap_type_leap)
+	{
+		if (authentication_type == eapol_key_authentication_type_dynamic_WEP)
+		{
+			// LEAP uses it's own 802.11 authentication mode when 802.1X (dynamic WEP) is used.
+			a802_11_authentication_mode = eapol_key_802_11_authentication_mode_leap;
+
+			EAP_TRACE_ALWAYS(
+				iTools,
+				TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+				(EAPL("start_authentication(): Trying auth mode LEAP (802.1x mode).\n")));
+		}
+		else
+		{
+			// If security mode is WPA or RSNA then even LEAP uses open authentication!
+			a802_11_authentication_mode = eapol_key_802_11_authentication_mode_open;
+
+			EAP_TRACE_ALWAYS(
+				iTools,
+				TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+				(EAPL("start_authentication(): Trying auth mode OPEN (LEAP in WPA mode).\n")));
+		}
+
+	}
+	else
+	{
+		a802_11_authentication_mode = eapol_key_802_11_authentication_mode_open;
+
+		EAP_TRACE_ALWAYS(
+			iTools,
+			TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+			(EAPL("start_authentication(): Trying auth mode OPEN.\n")));
+	}
+
+	status = iPartner->complete_get_802_11_authentication_mode(
+		status,
+		receive_network_id,
+		a802_11_authentication_mode);
+
+	EAP_TRACE_END(iTools, TRACE_FLAGS_DEFAULT);
+	return EAP_STATUS_RETURN(iTools, status);
+}
+
+//--------------------------------------------------
+
+EAP_FUNC_EXPORT eap_am_stack_c * new_eap_am_stack_c(class abs_eap_am_tools_c * tools, bool is_client_when_true)
+{
+    eap_am_stack_symbian_c * am_stack = new eap_am_stack_symbian_c(tools, is_client_when_true);
+
+	eap_automatic_variable_c<eap_am_stack_c> automatic_am_stack(
+		tools,
+		am_stack);
+
+	if (am_stack == 0
+		|| am_stack->get_is_valid() == false)
+	{
+		// ERROR.
+		if (am_stack != 0)
+		{
+			EAP_TRACE_DEBUG(
+				tools,
+				TRACE_FLAGS_ALWAYS|TRACE_FLAGS_DEFAULT, 
+				(EAPL("calls: new_eap_am_stack_c(): am_stack->shutdown(): %s.\n"),
+				(is_client_when_true == true) ? "client": "server"));
+
+			am_stack->shutdown();
+		}
+		return 0;
+	}
+
+	automatic_am_stack.do_not_free_variable();
+
+    return am_stack;
+}
+
+//--------------------------------------------------
+// end
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/eap_server/src/eap_loaded_type.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,98 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  EAP and WLAN authentication protocols.
+*
+*/
+
+/*
+* %version: 5 %
+*/
+
+#include "eap_loaded_type.h"
+#include "eap_expanded_type.h"
+
+/** @file */
+
+//--------------------------------------------------
+
+eap_loaded_type_c::eap_loaded_type_c(
+	abs_eap_am_tools_c * const tools,
+	CEapTypePlugin * const type_plugin,
+	const eap_type_value_e eap_type,
+	const u32_t index_type,
+	const u32_t index)
+	: m_am_tools(tools)
+	, m_type_plugin(type_plugin)
+	, m_eap_type(eap_type)
+	, m_index_type(index_type)
+	, m_index(index)
+{
+}
+
+//--------------------------------------------------
+
+eap_loaded_type_c::~eap_loaded_type_c()
+{
+	delete m_type_plugin;
+}
+
+//--------------------------------------------------
+
+i32_t eap_loaded_type_c::compare(const eap_loaded_type_c * const right)
+{
+	if (get_index_type() != right->get_index_type())
+	{
+		return static_cast<i32_t>(get_index_type()) - static_cast<i32_t>(right->get_index_type());
+	}
+	else if (get_index() != right->get_index())
+	{
+		return static_cast<i32_t>(get_index()) - static_cast<i32_t>(right->get_index());
+	}
+	else
+	{
+		// Compares the EAP-type.
+		return get_eap_type().compare(&(right->get_eap_type()));
+	}
+}
+
+//--------------------------------------------------
+
+CEapTypePlugin * eap_loaded_type_c::get_type_plugin()
+{
+	return m_type_plugin;
+}
+
+//--------------------------------------------------
+
+eap_type_value_e eap_loaded_type_c::get_eap_type() const
+{
+	return m_eap_type;
+}
+
+//--------------------------------------------------
+
+u32_t eap_loaded_type_c::get_index_type() const
+{
+	return m_index_type;
+}
+
+//--------------------------------------------------
+
+u32_t eap_loaded_type_c::get_index() const
+{
+	return m_index;
+}
+
+//--------------------------------------------------
+// End
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/group/backup_registration.xml	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,7 @@
+<?xml version="1.0" standalone="yes"?> 
+<backup_registration> 
+	<passive_backup> 
+	<include_directory name = "\" /> 
+	</passive_backup> 
+	<restore requires_reboot = "no"/> 
+</backup_registration>
--- a/eapol/eapol_framework/eapol_symbian/group/bld.inf	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/group/bld.inf	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 3 %
+* %version: 36 %
 */
 
 #include <platform_paths.hrh>
@@ -26,41 +26,57 @@
 
 PRJ_EXPORTS
 
-// Exporting IBY file (only for 5.0).
+
 ../rom/eapol.iby	CORE_MW_LAYER_IBY_EXPORT_PATH(eapol.iby) 
 
-// Secure policy file for saving all EAPOL AND EAP databases in DBMS.
+// Secure policy file for saving all EAPOL and EAP databases in DBMS.
 ../am/include/102072e9.spd 	/epoc32/data/z/private/100012a5/policy/102072e9.spd
 ../am/include/102072e9.spd  /epoc32/release/winscw/udeb/z/private/100012a5/policy/102072e9.spd
 ../am/include/102072e9.spd  /epoc32/release/winscw/urel/z/private/100012a5/policy/102072e9.spd
 
-// Backup registration file for backing up all EAPOL related databases. Exported to the private cage path for WLAN engine.
+// Backup registration file for backing up all EAPOL databases. Exported to the private cage path of WLAN engine.
 backup_registration_eapol.xml  /epoc32/data/z/private/101F8EC5/backup_registration_eapol.xml
 backup_registration_eapol.xml  /epoc32/release/winscw/udeb/z/private/101F8EC5/backup_registration_eapol.xml
 backup_registration_eapol.xml  /epoc32/release/winscw/urel/z/private/101F8EC5/backup_registration_eapol.xml
 
-// Copies configuration file of EAPOL.
+// Backup registration file for backing up all EAP server databases. Exported to the private cage path of EAP server.
+backup_registration.xml  /epoc32/data/z/private/20026FCB/backup_registration.xml
+backup_registration.xml  /epoc32/release/udeb/urel/z/private/20026FCB/backup_registration.xml
+backup_registration.xml  /epoc32/release/winscw/urel/z/private/20026FCB/backup_registration.xml
+
+// copy EAPOL configuration file to WLAN server's private cage path
 ../am/core/symbian/file_config/eap_symbian.conf  /epoc32/data/z/private/101F8EC5/eap.conf
 ../am/core/symbian/file_config/eap_symbian.conf  /epoc32/release/winscw/udeb/z/private/101F8EC5/eap.conf
 ../am/core/symbian/file_config/eap_symbian.conf  /epoc32/release/winscw/urel/z/private/101F8EC5/eap.conf
 
-#ifndef __SERIES60_HELP
-../am/type/securid/symbian/plugin/inc/eapgtc.hlp.hrh     /epoc32/include/cshelp/eapgtc.hlp.hrh
-../am/type/mschapv2/symbian/plugin/inc/eapmschap.hlp.hrh /epoc32/include/cshelp/eapmschap.hlp.hrh
-../am/type/tls_peap/symbian/plugin/inc/eappeap.hlp.hrh   /epoc32/include/cshelp/eappeap.hlp.hrh
-../am/type/gsmsim/symbian/plugin/inc/eapsim.hlp.hrh      /epoc32/include/cshelp/eapsim.hlp.hrh
-../am/type/tls_peap/symbian/plugin/inc/eaptls.hlp.hrh    /epoc32/include/cshelp/eaptls.hlp.hrh
-#endif
-
-#ifndef __SERIES60_HELP
-// EAP-LEAP is part of WPX. You need special release to compile this. However the header is needed.
-../am/type/leap/symbian/plugin/inc/eapleap.hlp.hrh /epoc32/include/cshelp/eapleap.hlp.hrh
-#endif
-
+// copy EAP server configuration file to EAP server's the private cage path
+../am/core/symbian/file_config/eap_symbian.conf  /epoc32/data/z/private/20026FCB/eap.conf
+../am/core/symbian/file_config/eap_symbian.conf  /epoc32/release/winscw/udeb/z/private/20026FCB/eap.conf
+../am/core/symbian/file_config/eap_symbian.conf  /epoc32/release/winscw/urel/z/private/20026FCB/eap.conf
 
 PRJ_MMPFILES
 
-// This compiles stub of EAPOL WPX, the empty functions that implement WPX.
+// Tools libraries are needed by other modules. Must be built first.
+#include "../tools/group/bld.inf"
+
+eap_notifier.mmp
+
+// eap server
+eapauthserver.mmp
+
+// eap server exe
+eapauthserverexe.mmp
+
+// eapclientif
+eapclientif.mmp
+
+// coreinterfaceimplementation
+eapcoreinterfaceimplementation.mmp
+
+// coreinterface
+eapcoreinterface.mmp
+
+// compiles EAPOL WPX stub
 eapolwpxstub.mmp
 
 // This is the basic set that should always be compiled for every environment.
@@ -70,14 +86,14 @@
 eapmschapv2.mmp
 eapsecurid.mmp
 eapaka.mmp
+eapprotectedsetup.mmp
+eapgeneric.mmp
+eapgeneralsettings.mmp
 
-// API for VPN.
+// Interface for providing EAP authentication services to VPN
 eapvpnif.mmp
 
-eapprotectedsetup.mmp
-
-// API for WLAN-engine.
+// Iterface for providing authentication services to WLAN
 wlaneapolif.mmp
 
-
 // End of file.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/group/eabi/eapleapu.def	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+	_Z24ImplementationGroupProxyRi @ 1 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/group/eabi/pacstoreifu.def	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,300 @@
+EXPORTS
+	_ZN11CPacStoreIf12get_is_validEv @ 1 NONAME
+	_ZN11CPacStoreIf12process_dataEPKvi @ 2 NONAME
+	_ZN11CPacStoreIf15new_CPacStoreIfEP18abs_eap_am_tools_cbmP19AbsEapSendInterface @ 3 NONAME
+	_ZN11CPacStoreIf8shutdownEv @ 4 NONAME
+	_ZN11CPacStoreIf9configureEPK19eap_variable_data_c @ 5 NONAME
+	_ZN11CPacStoreIf9send_dataEPKvm @ 6 NONAME
+	_ZN11CPacStoreIfC1EP18abs_eap_am_tools_cP19eap_am_message_if_cP19AbsEapSendInterface @ 7 NONAME
+	_ZN11CPacStoreIfC2EP18abs_eap_am_tools_cP19eap_am_message_if_cP19AbsEapSendInterface @ 8 NONAME
+	_ZN11CPacStoreIfD0Ev @ 9 NONAME
+	_ZN11CPacStoreIfD1Ev @ 10 NONAME
+	_ZN11CPacStoreIfD2Ev @ 11 NONAME
+	_ZN18eap_fast_pac_tlv_c10create_MACEP19eap_variable_data_cPKS0_S3_ @ 12 NONAME
+	_ZN18eap_fast_pac_tlv_c10create_tlvEP24eap_fast_variable_data_cPK19eap_variable_data_c @ 13 NONAME
+	_ZN18eap_fast_pac_tlv_c12get_is_validEv @ 14 NONAME
+	_ZN18eap_fast_pac_tlv_c13parse_pac_tlvEPK24eap_fast_variable_data_c @ 15 NONAME
+	_ZN18eap_fast_pac_tlv_c14create_pac_tlvEP24eap_fast_variable_data_cPKS0_S3_S3_19eap_fast_pac_type_e @ 16 NONAME
+	_ZN18eap_fast_pac_tlv_c14parse_PAC_dataEPK19eap_variable_data_cS2_ @ 17 NONAME
+	_ZN18eap_fast_pac_tlv_c14read_u16_t_tlvEPK24eap_fast_variable_data_c19eap_fast_tlv_type_ePt @ 18 NONAME
+	_ZN18eap_fast_pac_tlv_c14read_u32_t_tlvEPK24eap_fast_variable_data_c19eap_fast_tlv_type_ePm @ 19 NONAME
+	_ZN18eap_fast_pac_tlv_c15create_PAC_dataEP19eap_variable_data_cPKS0_PK24eap_fast_variable_data_cS6_S6_ @ 20 NONAME
+	_ZN18eap_fast_pac_tlv_c15create_type_tlvEP24eap_fast_variable_data_c19eap_fast_pac_type_e @ 21 NONAME
+	_ZN18eap_fast_pac_tlv_c15parse_A_ID_dataEPK19eap_variable_data_cS2_ @ 22 NONAME
+	_ZN18eap_fast_pac_tlv_c16create_A_ID_dataEP19eap_variable_data_cPKS0_PK24eap_fast_variable_data_cS6_S6_S6_ @ 23 NONAME
+	_ZN18eap_fast_pac_tlv_c16create_u16_t_tlvEP24eap_fast_variable_data_c19eap_fast_tlv_type_et @ 24 NONAME
+	_ZN18eap_fast_pac_tlv_c16create_u32_t_tlvEP24eap_fast_variable_data_c19eap_fast_tlv_type_em @ 25 NONAME
+	_ZN18eap_fast_pac_tlv_c16parse_group_dataEPK19eap_variable_data_cS2_ @ 26 NONAME
+	_ZN18eap_fast_pac_tlv_c16read_generic_tlvEPK24eap_fast_variable_data_c19eap_fast_tlv_type_eP19eap_variable_data_c @ 27 NONAME
+	_ZN18eap_fast_pac_tlv_c17create_group_dataEP19eap_variable_data_cPKS0_PK24eap_fast_variable_data_cS6_S6_ @ 28 NONAME
+	_ZN18eap_fast_pac_tlv_c17generate_data_keyEb25eap_pac_store_data_type_eP19eap_variable_data_cPKS1_S4_S4_ @ 29 NONAME
+	_ZN18eap_fast_pac_tlv_c18create_generic_tlvEP24eap_fast_variable_data_c19eap_fast_tlv_type_ePK19eap_variable_data_c @ 30 NONAME
+	_ZN18eap_fast_pac_tlv_c19create_pac_info_tlvEP24eap_fast_variable_data_cPKS0_S3_S3_S3_S3_ @ 31 NONAME
+	_ZN18eap_fast_pac_tlv_c19create_test_pac_tlvEP24eap_fast_variable_data_cPK19eap_variable_data_cS4_S4_S4_S4_S4_19eap_fast_pac_type_emt @ 32 NONAME
+	_ZN18eap_fast_pac_tlv_c19parse_data_with_MACEPK19eap_variable_data_cS2_ @ 33 NONAME
+	_ZN18eap_fast_pac_tlv_c19parse_encrypted_tlvEP24eap_fast_variable_data_cPK19eap_variable_data_cPKS0_ @ 34 NONAME
+	_ZN18eap_fast_pac_tlv_c20create_data_with_MACEP19eap_variable_data_cPKS0_PK24eap_fast_variable_data_c @ 35 NONAME
+	_ZN18eap_fast_pac_tlv_c20create_encrypted_tlvEP24eap_fast_variable_data_c19eap_fast_tlv_type_ePK19eap_variable_data_cS1_ @ 36 NONAME
+	_ZN18eap_fast_pac_tlv_c21create_type_tlv_queryEP24eap_fast_variable_data_c19eap_fast_pac_type_e @ 37 NONAME
+	_ZN18eap_fast_pac_tlv_c22create_master_key_dataEPK19eap_variable_data_cS2_S2_S2_PS0_ @ 38 NONAME
+	_ZN18eap_fast_pac_tlv_c25parse_test_pac_opaque_tlvEPK24eap_fast_variable_data_cPK19eap_variable_data_cS5_ @ 39 NONAME
+	_ZN18eap_fast_pac_tlv_c26read_PAC_Type_from_PAC_TLVEPK24eap_fast_variable_data_cP19eap_fast_pac_type_e @ 40 NONAME
+	_ZN18eap_fast_pac_tlv_c5resetEv @ 41 NONAME
+	_ZN20eap_fast_pac_store_c10query_PACsEPK24eap_fast_variable_data_c @ 42 NONAME
+	_ZN20eap_fast_pac_store_c10remove_PACEPK24eap_fast_variable_data_c @ 43 NONAME
+	_ZN20eap_fast_pac_store_c10remove_PACEPK25eap_fast_pac_store_data_cS2_PK19eap_variable_data_c @ 44 NONAME
+	_ZN20eap_fast_pac_store_c11add_PAC_TLVE31eap_fast_completion_operation_ePK24eap_fast_variable_data_c @ 45 NONAME
+	_ZN20eap_fast_pac_store_c11remove_A_IDEPK24eap_fast_variable_data_c @ 46 NONAME
+	_ZN20eap_fast_pac_store_c11remove_pacsEPK24eap_fast_variable_data_c @ 47 NONAME
+	_ZN20eap_fast_pac_store_c12get_is_validEv @ 48 NONAME
+	_ZN20eap_fast_pac_store_c13timer_expiredEmPv @ 49 NONAME
+	_ZN20eap_fast_pac_store_c14encypt_PAC_TLVEPK24eap_fast_variable_data_cS2_19eap_fast_pac_type_eP25eap_fast_pac_store_data_c @ 50 NONAME
+	_ZN20eap_fast_pac_store_c14save_pac_storeEv @ 51 NONAME
+	_ZN20eap_fast_pac_store_c15add_PAC_to_A_IDEPK25eap_fast_pac_store_data_cPK24eap_fast_variable_data_cS5_P19eap_fast_pac_type_e @ 52 NONAME
+	_ZN20eap_fast_pac_store_c15decrypt_PAC_TLVEP24eap_fast_variable_data_cPK25eap_fast_pac_store_data_cPK19eap_variable_data_c @ 53 NONAME
+	_ZN20eap_fast_pac_store_c17cancel_operationsEv @ 54 NONAME
+	_ZN20eap_fast_pac_store_c17timer_delete_dataEmPv @ 55 NONAME
+	_ZN20eap_fast_pac_store_c19save_PAC_store_dataEPK11eap_array_cI25eap_fast_pac_store_data_cE @ 56 NONAME
+	_ZN20eap_fast_pac_store_c20find_group_with_A_IDEPK24eap_fast_variable_data_cP25eap_fast_pac_store_data_cS4_ @ 57 NONAME
+	_ZN20eap_fast_pac_store_c20read_PACs_from_groupEPK24eap_fast_variable_data_cPK25eap_fast_pac_store_data_cP11eap_array_cIS0_E @ 58 NONAME
+	_ZN20eap_fast_pac_store_c20remove_IAP_referenceEPK19eap_variable_data_cPK25eap_fast_pac_store_data_c @ 59 NONAME
+	_ZN20eap_fast_pac_store_c21add_imported_PAC_fileEPK19eap_variable_data_cPK25eap_fast_pac_store_data_cS2_S2_ @ 60 NONAME
+	_ZN20eap_fast_pac_store_c21completion_action_addE31eap_fast_pac_store_completion_e @ 61 NONAME
+	_ZN20eap_fast_pac_store_c21completion_action_popEv @ 62 NONAME
+	_ZN20eap_fast_pac_store_c21mark_pac_data_deletedEP11eap_array_cI25eap_fast_pac_store_data_cES3_PKS1_ @ 63 NONAME
+	_ZN20eap_fast_pac_store_c21remove_IAP_from_groupEPK19eap_variable_data_cP25eap_fast_pac_store_data_cS4_ @ 64 NONAME
+	_ZN20eap_fast_pac_store_c21set_pending_operationE38eap_fast_pac_store_pending_operation_e @ 65 NONAME
+	_ZN20eap_fast_pac_store_c22completion_action_pushE31eap_fast_pac_store_completion_e @ 66 NONAME
+	_ZN20eap_fast_pac_store_c23completion_action_checkEv @ 67 NONAME
+	_ZN20eap_fast_pac_store_c23completion_action_traceEv @ 68 NONAME
+	_ZN20eap_fast_pac_store_c23create_unique_referenceEP25eap_fast_pac_store_data_c @ 69 NONAME
+	_ZN20eap_fast_pac_store_c23read_all_PAC_store_infoE38eap_fast_pac_store_pending_operation_ebbb @ 70 NONAME
+	_ZN20eap_fast_pac_store_c24completion_action_clenupEv @ 71 NONAME
+	_ZN20eap_fast_pac_store_c24query_PAC_store_passwordE38eap_fast_pac_store_pending_operation_e @ 72 NONAME
+	_ZN20eap_fast_pac_store_c25update_PAC_reference_listEPK25eap_fast_pac_store_data_cPK11eap_array_cI24eap_fast_variable_data_cE @ 73 NONAME
+	_ZN20eap_fast_pac_store_c27check_all_info_is_availableE38eap_fast_pac_store_pending_operation_e @ 74 NONAME
+	_ZN20eap_fast_pac_store_c27query_password_for_PAC_fileE38eap_fast_pac_store_pending_operation_ePK19eap_variable_data_c @ 75 NONAME
+	_ZN20eap_fast_pac_store_c28complete_read_PAC_store_dataE12eap_status_e38eap_fast_pac_store_pending_operation_ePK11eap_array_cI25eap_fast_pac_store_data_cE @ 76 NONAME
+	_ZN20eap_fast_pac_store_c28internal_complete_query_PACsEPK24eap_fast_variable_data_cPK19eap_variable_data_cPK25eap_fast_pac_store_data_c @ 77 NONAME
+	_ZN20eap_fast_pac_store_c28internal_complete_remove_PACEPK25eap_fast_pac_store_data_cS2_PK19eap_variable_data_c @ 78 NONAME
+	_ZN20eap_fast_pac_store_c28remove_cached_pac_store_dataEv @ 79 NONAME
+	_ZN20eap_fast_pac_store_c29add_new_PAC_reference_to_listEP24eap_fast_variable_data_cPKS0_PK25eap_fast_pac_store_data_c @ 80 NONAME
+	_ZN20eap_fast_pac_store_c29add_to_pac_data_if_not_existsEP11eap_array_cI25eap_fast_pac_store_data_cEPKS1_ @ 81 NONAME
+	_ZN20eap_fast_pac_store_c29are_pending_queries_completedEv @ 82 NONAME
+	_ZN20eap_fast_pac_store_c29complete_write_PAC_store_dataE12eap_status_e38eap_fast_pac_store_pending_operation_e @ 83 NONAME
+	_ZN20eap_fast_pac_store_c29create_new_PAC_reference_listEP24eap_fast_variable_data_cPK11eap_array_cIS0_E @ 84 NONAME
+	_ZN20eap_fast_pac_store_c29get_A_ID_reference_from_groupE38eap_fast_pac_store_pending_operation_ePK25eap_fast_pac_store_data_cPK24eap_fast_variable_data_cPS1_ @ 85 NONAME
+	_ZN20eap_fast_pac_store_c29internal_complete_add_PAC_TLVE38eap_fast_pac_store_pending_operation_ePK19eap_variable_data_cPK25eap_fast_pac_store_data_cPK24eap_fast_variable_data_c @ 86 NONAME
+	_ZN20eap_fast_pac_store_c29query_PAC_store_IAP_referenceE38eap_fast_pac_store_pending_operation_e @ 87 NONAME
+	_ZN20eap_fast_pac_store_c30query_user_permission_for_A_IDEPK24eap_fast_variable_data_cS2_ @ 88 NONAME
+	_ZN20eap_fast_pac_store_c34remove_old_PAC_reference_from_listEP24eap_fast_variable_data_cPKS0_PK11eap_array_cI25eap_fast_pac_store_data_cE @ 89 NONAME
+	_ZN20eap_fast_pac_store_c35internal_complete_pending_operationE38eap_fast_pac_store_pending_operation_e @ 90 NONAME
+	_ZN20eap_fast_pac_store_c38internal_complete_find_group_with_A_IDEPK24eap_fast_variable_data_cP25eap_fast_pac_store_data_cS4_ @ 91 NONAME
+	_ZN20eap_fast_pac_store_c38internal_complete_remove_IAP_referenceEPK19eap_variable_data_cPK25eap_fast_pac_store_data_c @ 92 NONAME
+	_ZN20eap_fast_pac_store_c39complete_query_user_permission_for_A_IDE12eap_status_e38eap_fast_pac_store_pending_operation_e @ 93 NONAME
+	_ZN20eap_fast_pac_store_c39internal_complete_add_imported_PAC_dataEPK19eap_variable_data_cPK25eap_fast_pac_store_data_cS2_S2_ @ 94 NONAME
+	_ZN20eap_fast_pac_store_c43internal_complete_process_imported_PAC_dataEPK19eap_variable_data_cPK25eap_fast_pac_store_data_cS2_S2_S2_ @ 95 NONAME
+	_ZN20eap_fast_pac_store_c46create_group_with_A_ID_if_group_does_not_existEPK24eap_fast_variable_data_cP25eap_fast_pac_store_data_cS4_ @ 96 NONAME
+	_ZN20eap_fast_pac_store_c48internal_complete_query_user_permission_for_A_IDEv @ 97 NONAME
+	_ZN20eap_fast_pac_store_c50internal_complete_remove_IAP_reference_from_groupsEPK19eap_variable_data_cPK25eap_fast_pac_store_data_c @ 98 NONAME
+	_ZN20eap_fast_pac_store_c8shutdownEv @ 99 NONAME
+	_ZN20eap_fast_pac_store_c9configureEv @ 100 NONAME
+	_ZN20eap_fast_pac_store_c9save_listEPK19eap_variable_data_c19eap_fast_tlv_type_eP11eap_array_cIS0_E @ 101 NONAME
+	_ZN20eap_fast_pac_store_c9save_listEPK24eap_fast_variable_data_c19eap_fast_tlv_type_eP11eap_array_cIS0_E @ 102 NONAME
+	_ZN22eap_fast_tlv_message_c11add_paddingEm @ 103 NONAME
+	_ZN22eap_fast_tlv_message_c12get_is_validEv @ 104 NONAME
+	_ZN22eap_fast_tlv_message_c25get_eap_fast_message_dataEv @ 105 NONAME
+	_ZN22eap_fast_tlv_message_c25set_eap_fast_message_dataEP19eap_variable_data_ch @ 106 NONAME
+	_ZN22eap_fast_tlv_message_c5resetEv @ 107 NONAME
+	_ZN22eap_fast_tlv_message_cC1EP18abs_eap_am_tools_cb @ 108 NONAME
+	_ZN22eap_fast_tlv_message_cC2EP18abs_eap_am_tools_cb @ 109 NONAME
+	_ZN22eap_fast_tlv_message_cD0Ev @ 110 NONAME
+	_ZN22eap_fast_tlv_message_cD1Ev @ 111 NONAME
+	_ZN22eap_fast_tlv_message_cD2Ev @ 112 NONAME
+	_ZN23eap_fast_tlv_payloads_c13copy_tlv_dataE19eap_fast_tlv_type_ebPKvm @ 113 NONAME
+	_ZN23eap_fast_tlv_payloads_c14verify_paddingEPKhm @ 114 NONAME
+	_ZN23eap_fast_tlv_payloads_c21parse_generic_payloadE19eap_fast_tlv_type_ePK21eap_fast_tlv_header_cb @ 115 NONAME
+	_ZN23eap_fast_tlv_payloads_c23parse_eap_fast_payloadsEPvPmS1_b @ 116 NONAME
+	_ZN23eap_fast_tlv_payloads_c5resetEv @ 117 NONAME
+	_ZN23eap_fast_tlv_payloads_c7add_tlvEP24eap_fast_variable_data_c @ 118 NONAME
+	_ZN23eap_fast_tlv_payloads_c8copy_tlvEPKS_19eap_fast_tlv_type_e @ 119 NONAME
+	_ZN23eap_fast_tlv_payloads_cC1EP18abs_eap_am_tools_cb @ 120 NONAME
+	_ZN23eap_fast_tlv_payloads_cC2EP18abs_eap_am_tools_cb @ 121 NONAME
+	_ZN23eap_fast_tlv_payloads_cD0Ev @ 122 NONAME
+	_ZN23eap_fast_tlv_payloads_cD1Ev @ 123 NONAME
+	_ZN23eap_fast_tlv_payloads_cD2Ev @ 124 NONAME
+	_ZN24eap_fast_variable_data_c11init_headerE19eap_fast_tlv_type_ebm @ 125 NONAME
+	_ZN24eap_fast_variable_data_c12set_tlv_typeE19eap_fast_tlv_type_e @ 126 NONAME
+	_ZN24eap_fast_variable_data_c16set_is_mandatoryEb @ 127 NONAME
+	_ZN24eap_fast_variable_data_c18set_copy_of_bufferE19eap_fast_tlv_type_ebPKvm @ 128 NONAME
+	_ZN24eap_fast_variable_data_c18set_copy_of_bufferEPKS_ @ 129 NONAME
+	_ZN24eap_fast_variable_data_c18set_copy_of_bufferEPKvm @ 130 NONAME
+	_ZN24eap_fast_variable_data_c28get_writable_full_tlv_bufferEv @ 131 NONAME
+	_ZN24eap_fast_variable_data_c31object_increase_reference_countEv @ 132 NONAME
+	_ZN24eap_fast_variable_data_c35add_next_payload_with_same_tlv_typeEPS_ @ 133 NONAME
+	_ZN24eap_fast_variable_data_c35set_next_payload_with_same_tlv_typeEPS_ @ 134 NONAME
+	_ZN24eap_fast_variable_data_c5resetEv @ 135 NONAME
+	_ZN24eap_fast_variable_data_c8add_dataEPKS_ @ 136 NONAME
+	_ZN24eap_fast_variable_data_c8add_dataEPKvm @ 137 NONAME
+	_ZN24eap_fast_variable_data_cC1EP18abs_eap_am_tools_c @ 138 NONAME
+	_ZN24eap_fast_variable_data_cC2EP18abs_eap_am_tools_c @ 139 NONAME
+	_ZN24eap_fast_variable_data_cD0Ev @ 140 NONAME
+	_ZN24eap_fast_variable_data_cD1Ev @ 141 NONAME
+	_ZN24eap_fast_variable_data_cD2Ev @ 142 NONAME
+	_ZN25eap_fast_pac_store_data_c12set_PAC_typeE19eap_fast_pac_type_e @ 143 NONAME
+	_ZN25eap_fast_pac_store_data_c17get_writable_dataEv @ 144 NONAME
+	_ZN25eap_fast_pac_store_data_c17set_change_statusE34eap_pac_store_data_change_status_e @ 145 NONAME
+	_ZN25eap_fast_pac_store_data_c18set_copy_of_bufferEPKS_ @ 146 NONAME
+	_ZN25eap_fast_pac_store_data_c22get_writable_referenceEv @ 147 NONAME
+	_ZN25eap_fast_pac_store_data_c24get_data_references_readEv @ 148 NONAME
+	_ZN25eap_fast_pac_store_data_c24set_data_references_readEv @ 149 NONAME
+	_ZN25eap_fast_pac_store_data_c5resetEv @ 150 NONAME
+	_ZN25eap_fast_pac_store_data_c8set_typeE25eap_pac_store_data_type_e @ 151 NONAME
+	_ZN25eap_fast_pac_store_data_cC1EP18abs_eap_am_tools_c @ 152 NONAME
+	_ZN25eap_fast_pac_store_data_cC2EP18abs_eap_am_tools_c @ 153 NONAME
+	_ZN25eap_fast_pac_store_data_cD0Ev @ 154 NONAME
+	_ZN25eap_fast_pac_store_data_cD1Ev @ 155 NONAME
+	_ZN25eap_fast_pac_store_data_cD2Ev @ 156 NONAME
+	_ZN26eap_am_pac_store_symbian_c14open_pac_storeEv @ 157 NONAME
+	_ZN26eap_am_pac_store_symbian_c17destroy_pac_storeEv @ 158 NONAME
+	_ZN26eap_am_pac_store_symbian_c18create_device_seedEv @ 159 NONAME
+	_ZN26eap_am_pac_store_symbian_c21is_master_key_presentEv @ 160 NONAME
+	_ZN26eap_am_pac_store_symbian_c22set_pac_store_passwordEPK19eap_variable_data_c @ 161 NONAME
+	_ZN26eap_am_pac_store_symbian_c26compare_pac_store_passwordEP19eap_variable_data_c @ 162 NONAME
+	_ZN26eap_am_pac_store_symbian_c26create_and_save_master_keyEPK19eap_variable_data_c @ 163 NONAME
+	_ZN26eap_am_pac_store_symbian_c28is_pacstore_password_presentEv @ 164 NONAME
+	_ZN26eap_am_pac_store_symbian_c35is_master_key_and_password_matchingEPK19eap_variable_data_c @ 165 NONAME
+	_ZN26eap_am_pac_store_symbian_c8shutdownEv @ 166 NONAME
+	_ZN26eap_am_pac_store_symbian_c9configureEv @ 167 NONAME
+	_ZN28eap_fast_tlv_header_string_c24get_fast_pac_type_stringE19eap_fast_pac_type_e @ 168 NONAME
+	_ZN28eap_fast_tlv_header_string_c30get_fast_pac_store_data_stringE25eap_pac_store_data_type_e @ 169 NONAME
+	_ZN28eap_fast_tlv_header_string_c30get_fast_pac_store_data_stringE38eap_fast_pac_store_pending_operation_e @ 170 NONAME
+	_ZN28eap_fast_tlv_header_string_c33get_fast_tlv_header_string_stringE18eap_fast_subtype_e @ 171 NONAME
+	_ZN28eap_fast_tlv_header_string_c33get_fast_tlv_header_string_stringE18eap_fast_version_e @ 172 NONAME
+	_ZN28eap_fast_tlv_header_string_c33get_fast_tlv_header_string_stringE19eap_fast_tlv_type_eb @ 173 NONAME
+	_ZN28eap_fast_tlv_header_string_c33get_fast_tlv_header_string_stringE21eap_fast_tlv_status_e @ 174 NONAME
+	_ZN28eap_fast_tlv_header_string_c33get_fast_tlv_header_string_stringE25eap_fast_request_action_e @ 175 NONAME
+	_ZN28eap_fast_tlv_header_string_c33get_fast_tlv_header_string_stringE25eap_fast_tlv_error_code_e @ 176 NONAME
+	_ZN28eap_fast_tlv_header_string_c33get_fast_tlv_header_string_stringE39eap_fast_tlv_type_crypto_binding_type_e @ 177 NONAME
+	_ZN28eap_fast_tlv_header_string_c44get_fast_pac_store_data_change_status_stringE34eap_pac_store_data_change_status_e @ 178 NONAME
+	_ZN28eap_fast_tlv_header_string_cC1Ev @ 179 NONAME
+	_ZN28eap_fast_tlv_header_string_cC2Ev @ 180 NONAME
+	_ZN28eap_fast_tlv_header_string_cD0Ev @ 181 NONAME
+	_ZN28eap_fast_tlv_header_string_cD1Ev @ 182 NONAME
+	_ZN28eap_fast_tlv_header_string_cD2Ev @ 183 NONAME
+	_ZN31eap_fast_pac_store_completion_c12get_is_validEv @ 184 NONAME
+	_ZN31eap_fast_pac_store_completion_c12set_is_validEv @ 185 NONAME
+	_ZN31eap_fast_pac_store_completion_c21set_completion_actionE31eap_fast_pac_store_completion_e @ 186 NONAME
+	_ZN31eap_fast_pac_store_completion_c28get_completion_action_stringE31eap_fast_pac_store_completion_e @ 187 NONAME
+	_ZN31eap_fast_pac_store_completion_cC1EP18abs_eap_am_tools_c31eap_fast_pac_store_completion_e @ 188 NONAME
+	_ZN31eap_fast_pac_store_completion_cC2EP18abs_eap_am_tools_c31eap_fast_pac_store_completion_e @ 189 NONAME
+	_ZN31eap_fast_pac_store_completion_cD0Ev @ 190 NONAME
+	_ZN31eap_fast_pac_store_completion_cD1Ev @ 191 NONAME
+	_ZN31eap_fast_pac_store_completion_cD2Ev @ 192 NONAME
+	_ZN33eap_pac_store_server_message_if_c11set_partnerEP23abs_eap_am_message_if_c @ 193 NONAME
+	_ZN33eap_pac_store_server_message_if_c12get_is_validEv @ 194 NONAME
+	_ZN33eap_pac_store_server_message_if_c12process_dataEPKvm @ 195 NONAME
+	_ZN33eap_pac_store_server_message_if_c12send_messageEP30eap_process_tlv_message_data_c @ 196 NONAME
+	_ZN33eap_pac_store_server_message_if_c12set_is_validEv @ 197 NONAME
+	_ZN33eap_pac_store_server_message_if_c13timer_expiredEmPv @ 198 NONAME
+	_ZN33eap_pac_store_server_message_if_c15process_messageEP30eap_process_tlv_message_data_c @ 199 NONAME
+	_ZN33eap_pac_store_server_message_if_c17timer_delete_dataEmPv @ 200 NONAME
+	_ZN33eap_pac_store_server_message_if_c18send_error_messageE12eap_status_e31eap_tlv_message_type_function_e @ 201 NONAME
+	_ZN33eap_pac_store_server_message_if_c23complete_open_pac_storeE12eap_status_e @ 202 NONAME
+	_ZN33eap_pac_store_server_message_if_c26complete_destroy_pac_storeE12eap_status_e @ 203 NONAME
+	_ZN33eap_pac_store_server_message_if_c26process_message_type_errorEPK11eap_array_cI16eap_tlv_header_cE @ 204 NONAME
+	_ZN33eap_pac_store_server_message_if_c27complete_create_device_seedE12eap_status_e @ 205 NONAME
+	_ZN33eap_pac_store_server_message_if_c30complete_is_master_key_presentEb @ 206 NONAME
+	_ZN33eap_pac_store_server_message_if_c31complete_set_pac_store_passwordE12eap_status_e @ 207 NONAME
+	_ZN33eap_pac_store_server_message_if_c35complete_compare_pac_store_passwordEb @ 208 NONAME
+	_ZN33eap_pac_store_server_message_if_c35complete_create_and_save_master_keyE12eap_status_e @ 209 NONAME
+	_ZN33eap_pac_store_server_message_if_c37complete_is_pacstore_password_presentEb @ 210 NONAME
+	_ZN33eap_pac_store_server_message_if_c37new_eap_pac_store_server_message_if_cEP18abs_eap_am_tools_c @ 211 NONAME
+	_ZN33eap_pac_store_server_message_if_c44complete_is_master_key_and_password_matchingEb @ 212 NONAME
+	_ZN33eap_pac_store_server_message_if_c8shutdownEv @ 213 NONAME
+	_ZN33eap_pac_store_server_message_if_c9configureEPK19eap_variable_data_c @ 214 NONAME
+	_ZN33eap_pac_store_server_message_if_cC1EP18abs_eap_am_tools_c @ 215 NONAME
+	_ZN33eap_pac_store_server_message_if_cC2EP18abs_eap_am_tools_c @ 216 NONAME
+	_ZN33eap_pac_store_server_message_if_cD0Ev @ 217 NONAME
+	_ZN33eap_pac_store_server_message_if_cD1Ev @ 218 NONAME
+	_ZN33eap_pac_store_server_message_if_cD2Ev @ 219 NONAME
+	_ZN48eap_fast_pac_store_data_compare_A_ID_reference_cC1EP18abs_eap_am_tools_c @ 220 NONAME
+	_ZN48eap_fast_pac_store_data_compare_A_ID_reference_cC2EP18abs_eap_am_tools_c @ 221 NONAME
+	_ZN48eap_fast_pac_store_data_compare_A_ID_reference_cD0Ev @ 222 NONAME
+	_ZN48eap_fast_pac_store_data_compare_A_ID_reference_cD1Ev @ 223 NONAME
+	_ZN48eap_fast_pac_store_data_compare_A_ID_reference_cD2Ev @ 224 NONAME
+	_ZNK18eap_fast_pac_tlv_c12get_payloadsEv @ 225 NONAME
+	_ZNK23eap_fast_tlv_payloads_c12get_is_validEv @ 226 NONAME
+	_ZNK23eap_fast_tlv_payloads_c13get_tlv_countEv @ 227 NONAME
+	_ZNK23eap_fast_tlv_payloads_c15get_tlv_pointerE19eap_fast_tlv_type_e @ 228 NONAME
+	_ZNK23eap_fast_tlv_payloads_c15get_tlv_pointerE19eap_fast_tlv_type_em @ 229 NONAME
+	_ZNK23eap_fast_tlv_payloads_c24check_mandatory_payloadsEPK11eap_array_cI19eap_fast_tlv_type_eE @ 230 NONAME
+	_ZNK23eap_fast_tlv_payloads_c24check_payloads_existenseEPK11eap_array_cI19eap_fast_tlv_type_eE @ 231 NONAME
+	_ZNK23eap_fast_tlv_payloads_c24check_payloads_existenseEPK19eap_fast_tlv_type_em @ 232 NONAME
+	_ZNK23eap_fast_tlv_payloads_c27create_eap_fast_tlv_messageEP22eap_fast_tlv_message_cb @ 233 NONAME
+	_ZNK23eap_fast_tlv_payloads_c4copyEv @ 234 NONAME
+	_ZNK23eap_fast_tlv_payloads_c7get_tlvEm @ 235 NONAME
+	_ZNK24eap_fast_variable_data_c10get_headerEv @ 236 NONAME
+	_ZNK24eap_fast_variable_data_c12get_is_validEv @ 237 NONAME
+	_ZNK24eap_fast_variable_data_c12get_tlv_typeEv @ 238 NONAME
+	_ZNK24eap_fast_variable_data_c15get_data_lengthEv @ 239 NONAME
+	_ZNK24eap_fast_variable_data_c15get_data_offsetEmm @ 240 NONAME
+	_ZNK24eap_fast_variable_data_c16get_is_mandatoryEv @ 241 NONAME
+	_ZNK24eap_fast_variable_data_c17get_is_valid_dataEv @ 242 NONAME
+	_ZNK24eap_fast_variable_data_c19get_full_tlv_bufferEv @ 243 NONAME
+	_ZNK24eap_fast_variable_data_c35get_next_payload_with_same_tlv_typeEv @ 244 NONAME
+	_ZNK24eap_fast_variable_data_c4copyEv @ 245 NONAME
+	_ZNK24eap_fast_variable_data_c7compareEPKS_ @ 246 NONAME
+	_ZNK24eap_fast_variable_data_c8get_dataEm @ 247 NONAME
+	_ZNK25eap_fast_pac_store_data_c12get_PAC_typeEv @ 248 NONAME
+	_ZNK25eap_fast_pac_store_data_c12get_is_validEv @ 249 NONAME
+	_ZNK25eap_fast_pac_store_data_c13get_referenceEv @ 250 NONAME
+	_ZNK25eap_fast_pac_store_data_c17get_change_statusEv @ 251 NONAME
+	_ZNK25eap_fast_pac_store_data_c17get_is_valid_dataEv @ 252 NONAME
+	_ZNK25eap_fast_pac_store_data_c7compareEPKS_ @ 253 NONAME
+	_ZNK25eap_fast_pac_store_data_c8get_dataEv @ 254 NONAME
+	_ZNK25eap_fast_pac_store_data_c8get_typeEv @ 255 NONAME
+	_ZNK31eap_fast_pac_store_completion_c21get_completion_actionEv @ 256 NONAME
+	_ZNK48eap_fast_pac_store_data_compare_A_ID_reference_c7compareEPK25eap_fast_pac_store_data_cS2_ @ 257 NONAME
+	_ZTI11CPacStoreIf @ 258 NONAME
+	_ZTI18eap_fast_pac_tlv_c @ 259 NONAME
+	_ZTI20eap_fast_pac_store_c @ 260 NONAME
+	_ZTI21eap_fast_tlv_header_c @ 261 NONAME
+	_ZTI22eap_fast_tlv_message_c @ 262 NONAME
+	_ZTI23eap_fast_tlv_payloads_c @ 263 NONAME
+	_ZTI24eap_fast_variable_data_c @ 264 NONAME
+	_ZTI25eap_fast_pac_store_data_c @ 265 NONAME
+	_ZTI26eap_am_pac_store_symbian_c @ 266 NONAME
+	_ZTI27eap_am_async_wait_symbian_c @ 267 NONAME
+	_ZTI28eap_fast_tlv_header_string_c @ 268 NONAME
+	_ZTI31eap_fast_pac_file_data_header_c @ 269 NONAME
+	_ZTI31eap_fast_pac_store_completion_c @ 270 NONAME
+	_ZTI33eap_pac_store_server_message_if_c @ 271 NONAME
+	_ZTI48eap_fast_pac_store_data_compare_A_ID_reference_c @ 272 NONAME
+	_ZTV11CPacStoreIf @ 273 NONAME
+	_ZTV18eap_fast_pac_tlv_c @ 274 NONAME
+	_ZTV20eap_fast_pac_store_c @ 275 NONAME
+	_ZTV21eap_fast_tlv_header_c @ 276 NONAME
+	_ZTV22eap_fast_tlv_message_c @ 277 NONAME
+	_ZTV23eap_fast_tlv_payloads_c @ 278 NONAME
+	_ZTV24eap_fast_variable_data_c @ 279 NONAME
+	_ZTV25eap_fast_pac_store_data_c @ 280 NONAME
+	_ZTV26eap_am_pac_store_symbian_c @ 281 NONAME
+	_ZTV27eap_am_async_wait_symbian_c @ 282 NONAME
+	_ZTV28eap_fast_tlv_header_string_c @ 283 NONAME
+	_ZTV31eap_fast_pac_file_data_header_c @ 284 NONAME
+	_ZTV31eap_fast_pac_store_completion_c @ 285 NONAME
+	_ZTV33eap_pac_store_server_message_if_c @ 286 NONAME
+	_ZTV48eap_fast_pac_store_data_compare_A_ID_reference_c @ 287 NONAME
+	_ZThn4_N33eap_pac_store_server_message_if_c11set_partnerEP23abs_eap_am_message_if_c @ 288 NONAME
+	_ZThn4_N33eap_pac_store_server_message_if_c12get_is_validEv @ 289 NONAME
+	_ZThn4_N33eap_pac_store_server_message_if_c12process_dataEPKvm @ 290 NONAME
+	_ZThn4_N33eap_pac_store_server_message_if_c8shutdownEv @ 291 NONAME
+	_ZThn4_N33eap_pac_store_server_message_if_c9configureEPK19eap_variable_data_c @ 292 NONAME
+	_ZThn4_N33eap_pac_store_server_message_if_cD0Ev @ 293 NONAME
+	_ZThn4_N33eap_pac_store_server_message_if_cD1Ev @ 294 NONAME
+	_ZThn8_N33eap_pac_store_server_message_if_c13timer_expiredEmPv @ 295 NONAME
+	_ZThn8_N33eap_pac_store_server_message_if_c17timer_delete_dataEmPv @ 296 NONAME
+	_ZThn8_N33eap_pac_store_server_message_if_cD0Ev @ 297 NONAME
+	_ZThn8_N33eap_pac_store_server_message_if_cD1Ev @ 298 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/group/eap_notifier.mmp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Project definition file for eap_notifier
+*
+*/
+
+/*
+* %version:  %
+*/
+
+#include <platform_paths.hrh>
+#include "eapol.mmh"
+
+
+TARGET        eap_notifier.dll
+TARGETTYPE    dll
+
+UID           0x1000008d 0x2002E6F1
+
+CAPABILITY    All -TCB
+
+deffile eap_notifier.def
+
+SOURCEPATH    ../am/eap_notifier/src
+SOURCE        eap_auth_notifier.cpp
+SOURCE        eap_auth_observer.cpp
+
+USERINCLUDE   ../am/eap_notifier/inc
+
+MW_LAYER_SYSTEMINCLUDE
+
+LIBRARY       euser.lib
+LIBRARY	      eapsymbiantools.lib 
+LIBRARY	      eaptools.lib
+LIBRARY		  HbCore.lib
+LIBRARY	      HbWidgets.lib
+
+
--- a/eapol/eapol_framework/eapol_symbian/group/eapaka.mmp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/group/eapaka.mmp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 17.2.4 %
+* %version: 17.1.9 %
 */
 
 #include <platform_paths.hrh>
@@ -55,10 +55,7 @@
 SOURCE      eap_type_aka_header.cpp
 SOURCE		eap_type_aka_authentication_vector.cpp
 
-SOURCEPATH    ../am/common/symbian
-SOURCE		  eap_am_trace_symbian.cpp
 
-SOURCEPATH    	../am/type/aka/symbian/plugin/src
 
 USERINCLUDE		../am/include
 USERINCLUDE		../am/type/symbian/plugin/include
@@ -69,13 +66,9 @@
 USERINCLUDE  	../am/type/aka/symbian/plugin/inc
 USERINCLUDE   ../../eapol_common/type
 
-//SYSTEMINCLUDE 	/epoc32/include/ecom
-//SYSTEMINCLUDE 	/epoc32/include/libc
-//SYSTEMINCLUDE 	/epoc32/include/cshelp
-
 MW_LAYER_SYSTEMINCLUDE // For the MiddleWare domain headers.
 
-LIBRARY     euser.lib ecom.lib eapol.lib edbms.lib efsrv.lib 
+LIBRARY     euser.lib ecom.lib eaptools.lib eaptrace.lib eapsymbiantools.lib edbms.lib efsrv.lib 
 LIBRARY		cone.lib eikcoctl.lib eikctl.lib bafl.lib
 LIBRARY		estor.lib	// For RReadStream
 
@@ -93,5 +86,11 @@
 LIBRARY     eikcore.lib
 LIBRARY     hlplch.lib
 LIBRARY		featmgr.lib
+
+// exports unfrozen in winscw
+#if defined(WINSCW)
+EXPORTUNFROZEN
+#endif
+
 //-------------------------------------------------------------------
 // End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/group/eapauthserver.mmp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,126 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Project definition file for eapauthserver
+*
+*/
+
+/*
+* %version:  %
+*/
+
+//-------------------------------------------------------------------
+
+#include <platform_paths.hrh>
+#include "eapol.mmh"
+
+//-------------------------------------------------------------------
+CAPABILITY ALL -TCB
+VENDORID VID_DEFAULT
+
+TARGET			EapAuthServer.dll
+TARGETTYPE		dll
+UID			0x1000008d  0x20026807
+
+///////////////////////////////////////////////////////////////////
+
+LANG	SC
+
+
+//USERINCLUDE ../../wapi_symbian/wapi_client/include/
+//USERINCLUDE ../../wapi_symbian/wapi_server/include/
+//USERINCLUDE ../../wapi_symbian/wapi_adaptation/
+USERINCLUDE ../eap_if/include
+USERINCLUDE ../eap_server/include
+USERINCLUDE ../../eapol_common/am/include
+USERINCLUDE ../../eapol_common/include
+USERINCLUDE ../../eapol_symbian/am/include
+USERINCLUDE ../../eapol_symbian/am/include/eaptlspeap_db_api_inc
+USERINCLUDE ../../eapol_common/type/simple_config/simple_config/include
+USERINCLUDE ../../eapol_symbian/am/type/fast/symbian/inc
+USERINCLUDE ../../eapol_common/type/tls_peap/eap/include/
+USERINCLUDE ../../eapol_common/type/tls_peap/tls/include/
+#if defined(USE_FAST_EAP_TYPE)
+USERINCLUDE ../../eapol_common/type/tls_peap/tls/include/wpx
+#endif
+USERINCLUDE ../am/type/tls_peap/symbian/plugin/inc
+USERINCLUDE ../am/type/ttls_pap/symbian/inc
+USERINCLUDE ../am/type/symbian/plugin/include
+
+SYSTEMINCLUDE /epoc32/include/ecom
+SYSTEMINCLUDE /epoc32/include/kernel 
+SYSTEMINCLUDE /epoc32/include/libc
+SYSTEMINCLUDE /epoc32/include/libc/netinet
+
+SOURCEPATH ../eap_server/src/
+SOURCE EapCoreIf.cpp
+SOURCE EapPluginIf.cpp
+SOURCE EapServerProcessHandler.cpp
+SOURCE EapScheduler.cpp
+SOURCE EapServer.cpp
+SOURCE EapServerExe.cpp
+SOURCE EapSession.cpp
+SOURCE EapSettingsIf.cpp
+SOURCE eap_am_general_settings_symbian.cpp
+SOURCE eap_am_plugin_symbian.cpp
+SOURCE eap_am_stack_symbian.cpp
+SOURCE eap_loaded_type.cpp
+SOURCE EapServerBackup.cpp
+
+SOURCEPATH ../eap_if/src/
+SOURCE EapClientIf.cpp
+
+SOURCEPATH ../../eapol_common/core
+SOURCE eap_core_server_message_if.cpp
+SOURCE eap_plugin_server_message_if.cpp
+SOURCE eap_general_settings_server_message_if.cpp
+SOURCE eapol_key_state_string.cpp
+
+
+SOURCEPATH  ../../eapol_common/common
+SOURCE		eap_method_settings.cpp
+
+SOURCEPATH    ../am/type/tls_peap/symbian/plugin/src
+SOURCE		  EapTlsPeapCertFetcher.cpp
+
+SOURCEPATH	../am/common/symbian
+SOURCE EapConfigToolsSymbian.cpp
+
+MW_LAYER_SYSTEMINCLUDE // For the MiddleWare domain headers.
+
+LIBRARY  eaptools.lib eaptrace.lib eapsymbiantools.lib
+
+LIBRARY		euser.lib ecom.lib efsrv.lib cone.lib
+LIBRARY		etelmm.lib etel.lib	// For ETel connection
+LIBRARY		hash.lib random.lib cryptography.lib asn1.lib
+LIBRARY     estor.lib edbms.lib // for RReadStream and RDbColReadStream
+LIBRARY     charconv.lib 
+LIBRARY bafl.lib
+LIBRARY estlib.lib // For memcmp, used in NRC ECC library.
+
+// JPH: EapTlsPeapCertFetcher.cpp requires
+LIBRARY		  x509certnameparser.lib		// For parsing of certificate label. 
+LIBRARY	    x509.lib crypto.lib certstore.lib ctframework.lib pkixcert.lib
+LIBRARY		x500.lib eikctl.lib egul.lib fbscli.lib
+
+#if defined(USE_FAST_EAP_TYPE)
+LIBRARY		pacstoreif.lib
+#endif
+
+// exports unfrozen in winscw
+#if defined(WINSCW)
+EXPORTUNFROZEN
+#endif
+
+//-------------------------------------------------------------------
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/group/eapauthserverexe.mmp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,62 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Project definition file for eapauthserverexe
+*
+*/
+
+/*
+* %version:  %
+*/
+
+#include <platform_paths.hrh>
+#include "eapol.mmh"
+
+TARGET 		EapAuthServerExe.exe
+TARGETTYPE 	exe
+TARGETPATH    /System/Libs
+UID           0x1000008c 0x20026fcb
+CAPABILITY    CAP_SERVER CommDD NetworkControl
+VENDORID      VID_DEFAULT
+
+USERINCLUDE ../../eapol_symbian/am/include
+USERINCLUDE ../../wapi_symbian/wapi_client/include/
+USERINCLUDE ../../wapi_symbian/wapi_server/include/
+USERINCLUDE ../../wapi_symbian/wapi_adaptation/
+USERINCLUDE ../eap_if/include
+USERINCLUDE ../eap_server/include
+USERINCLUDE ../../eapol_common/am/include
+USERINCLUDE ../../eapol_common/include
+USERINCLUDE ../../eapol_common/type/simple_config/simple_config/include
+
+SYSTEMINCLUDE /epoc32/include/ecom
+SYSTEMINCLUDE /epoc32/include/kernel 
+SYSTEMINCLUDE /epoc32/include/libc
+SYSTEMINCLUDE /epoc32/include/libc/netinet
+
+SOURCEPATH ../eap_server/src/
+SOURCE EapServerExe.cpp
+
+MW_LAYER_SYSTEMINCLUDE
+
+
+LIBRARY 		euser.lib ecom.lib EapAuthServer.lib
+
+// exports unfrozen in winscw
+#if defined(WINSCW)
+EXPORTUNFROZEN
+#endif
+
+EPOCSTACKSIZE 0x4000
+
+// End of file.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/group/eapclientif.mmp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,60 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Project definition file for project EAPOL
+*
+*/
+
+/*
+* %version: %
+*/
+
+#include <platform_paths.hrh>
+#include "eapol.mmh"
+
+CAPABILITY CAP_ECOM_PLUGIN
+VENDORID VID_DEFAULT
+TARGETTYPE    DLL
+
+TARGET	eapclientif.dll
+UID		0x10009d8d 0x20027033
+
+
+SYSTEMINCLUDE /epoc32/include/ecom
+
+USERINCLUDE	../am/include
+USERINCLUDE	../am/type/symbian/plugin/include
+USERINCLUDE	../../eapol_common
+USERINCLUDE	../../eapol_common/include
+USERINCLUDE	../../eapol_common/am/include
+USERINCLUDE	../am/type/generic/symbian/plugin/inc
+USERINCLUDE	../../eapol_common/type
+USERINCLUDE	../../eapol_common/type/simple_config/simple_config/include/
+USERINCLUDE	../eap_server/include
+USERINCLUDE	../eap_if/include
+
+
+MW_LAYER_SYSTEMINCLUDE // For the MiddleWare domain headers.
+
+SOURCEPATH  ../eap_if/src
+SOURCE REapSession.cpp
+SOURCE EapClientIf.cpp
+
+LIBRARY		euser.lib ecom.lib eapauthserver.lib eaptools.lib eaptrace.lib
+
+// exports unfrozen in winscw
+#if defined(WINSCW)
+EXPORTUNFROZEN
+#endif
+
+// end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/group/eapcoreinterface.mmp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,60 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Project definition file for project EAPOL
+*
+*/
+
+/*
+* %version: 15 %
+*/
+
+#include <platform_paths.hrh>
+#include "eapol.mmh"
+
+CAPABILITY CAP_ECOM_PLUGIN
+VENDORID VID_DEFAULT
+TARGETTYPE    DLL
+
+TARGET	eapcoreinterface.dll
+UID		0x10009d8d 0x20026FEC
+
+SYSTEMINCLUDE /epoc32/include/ecom
+
+USERINCLUDE	../am/include
+USERINCLUDE	../am/type/symbian/plugin/include
+USERINCLUDE	../../eapol_common
+USERINCLUDE	../../eapol_common/include
+USERINCLUDE	../../eapol_common/am/include
+USERINCLUDE	../am/type/generic/symbian/plugin/inc
+USERINCLUDE	../../eapol_common/type
+USERINCLUDE	../../eapol_common/type/simple_config/simple_config/include/
+USERINCLUDE	../eap_server/include
+USERINCLUDE	../eap_if/include
+
+
+MW_LAYER_SYSTEMINCLUDE // For the MiddleWare domain headers.
+
+SOURCEPATH  ../eap_if/src
+//SOURCE eap_am_message_if_symbian.cpp
+SOURCE EapCoreInterface.cpp
+
+LIBRARY eapclientif.lib eaptools.lib eapsymbiantools.lib eaptrace.lib
+LIBRARY	euser.lib edbms.lib efsrv.lib ecom.lib
+
+// exports unfrozen in winscw
+#if defined(WINSCW)
+EXPORTUNFROZEN
+#endif
+
+// end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/group/eapcoreinterfaceimplementation.mmp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,72 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Project definition file for project EAPOL
+*
+*/
+
+/*
+* %version: %
+*/
+
+#include <platform_paths.hrh>
+#include "eapol.mmh"
+
+CAPABILITY CAP_ECOM_PLUGIN
+VENDORID VID_DEFAULT
+TARGETTYPE PLUGIN
+
+TARGET	EapCoreInterfaceImplementation.dll
+UID		0x10009D8D 0x20026FCD
+SECUREID 0x20026FCD
+
+SOURCEPATH  ../eap_if/data
+START RESOURCE 20026fcd.rss
+TARGET EapCoreInterfaceImplementation
+END
+
+/*
+SOURCEPATH  ../eap_if/data
+START RESOURCE 20026fd3.rss
+	TARGET EapPlugin.rsc
+END
+*/
+
+SYSTEMINCLUDE /epoc32/include/ecom
+
+USERINCLUDE	../am/include
+USERINCLUDE	../am/type/symbian/plugin/include
+USERINCLUDE	../../eapol_common
+USERINCLUDE	../../eapol_common/include
+USERINCLUDE	../../eapol_common/am/include
+USERINCLUDE	../am/type/generic/symbian/plugin/inc
+USERINCLUDE	../../eapol_common/type
+USERINCLUDE	../../eapol_common/type/simple_config/simple_config/include/
+USERINCLUDE	../eap_server/include
+USERINCLUDE	../eap_if/include
+
+
+MW_LAYER_SYSTEMINCLUDE // For the MiddleWare domain headers.
+
+SOURCEPATH  ../eap_if/src
+SOURCE EapCoreInterfaceImplementation.cpp
+SOURCE EapClientIf.cpp
+
+LIBRARY		euser.lib ecom.lib eapclientif.lib eaptools.lib eaptrace.lib eapsymbiantools.lib
+
+// exports unfrozen in winscw
+#if defined(WINSCW)
+EXPORTUNFROZEN
+#endif
+
+// end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/group/eapgeneralsettings.mmp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,84 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Project definition file for project EAP-general settings.
+*
+*/
+
+/*
+* %version: 20 %
+*/
+
+#include <platform_paths.hrh>
+#include "eapol.mmh"
+
+CAPABILITY CAP_ECOM_PLUGIN
+VENDORID VID_DEFAULT
+TARGETTYPE    PLUGIN
+
+TARGET	eapgeneralsettings.dll
+UID		0x10009d8d 0x20026FD6
+
+SOURCEPATH  ../eap_if/data
+START RESOURCE 20026fd6.rss
+	TARGET EapGeneralSettings
+END
+
+SOURCEPATH  ../../eapol_common/core
+SOURCE		eap_general_settings_client_message_if.cpp
+SOURCE		eap_general_settings_message.cpp
+
+SOURCEPATH  ../../eapol_common/common
+SOURCE		eap_method_settings.cpp
+
+SOURCEPATH  ../eap_if/src
+SOURCE		EapGeneralSettingsImpl.cpp
+SOURCE		EapGeneralSettingsProxy.cpp
+SOURCE 		eap_am_message_if_symbian.cpp
+SOURCE		EapClientIf.cpp
+
+LIBRARY	    charconv.lib
+
+SYSTEMINCLUDE /epoc32/include/ecom
+
+USERINCLUDE	../am/include
+USERINCLUDE	../am/type/symbian/plugin/include
+USERINCLUDE	../../eapol_common
+USERINCLUDE	../../eapol_common/include
+USERINCLUDE	../../eapol_common/am/include
+USERINCLUDE	../am/type/generic/symbian/plugin/inc
+USERINCLUDE	../../eapol_common/type
+USERINCLUDE	../../eapol_common/type/simple_config/simple_config/include/
+USERINCLUDE	../eap_if/include
+USERINCLUDE	../eap_server/include
+
+MW_LAYER_SYSTEMINCLUDE // For the MiddleWare domain headers.
+
+LIBRARY		euser.lib eaptools.lib eaptrace.lib eapsymbiantools.lib edbms.lib efsrv.lib ecom.lib eapclientif.lib
+LIBRARY		cone.lib eikcoctl.lib eikctl.lib bafl.lib
+LIBRARY		estor.lib	// For RReadStream
+
+LANG		SC
+
+LIBRARY	eikdlg.lib
+LIBRARY	eikcore.lib
+LIBRARY	hlplch.lib
+LIBRARY		featmgr.lib
+
+// exports unfrozen in winscw
+#if defined(WINSCW)
+EXPORTUNFROZEN
+#endif
+
+//-------------------------------------------------------------------
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/group/eapgeneric.mmp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,96 @@
+/*
+* Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Project definition file for project EAP-generic.
+*
+*/
+
+/*
+* %version: 22 %
+*/
+
+#include <platform_paths.hrh>
+#include "eapol.mmh"
+
+CAPABILITY CAP_ECOM_PLUGIN
+VENDORID VID_DEFAULT
+TARGETTYPE    PLUGIN
+
+TARGET	eapgeneric.dll
+UID		0x10009d8d 0x20026FD1
+
+SOURCEPATH    ../am/type/generic/symbian/plugin/src
+SOURCE		EapGeneric.cpp 
+SOURCE		EapGenericProxy.cpp 
+
+SOURCEPATH  ../eap_if/data
+START RESOURCE 20026fd1.rss
+	TARGET EapGeneric
+END
+
+SOURCEPATH	../am/type/symbian/plugin/common
+SOURCE		EapTypeInfo.cpp
+
+SOURCEPATH  ../../eapol_common/core
+SOURCE		eap_plugin_client_message_if.cpp
+SOURCE		eap_plugin_message_base.cpp
+
+SOURCEPATH  ../../eapol_common/common
+SOURCE		eap_method_settings.cpp
+
+SOURCEPATH  ../../eapol_common/type/simple_config/simple_config/src
+SOURCE		simple_config_payloads.cpp
+SOURCE		simple_config_credential.cpp
+SOURCE		simple_config_types.cpp
+SOURCE		simple_config_tlv_header.cpp
+SOURCE		simple_config_message.cpp
+
+SOURCEPATH  ../eap_if/src
+SOURCE 		eap_am_message_if_symbian.cpp
+SOURCE		EapClientIf.cpp
+
+LIBRARY	    charconv.lib
+
+SYSTEMINCLUDE /epoc32/include/ecom
+
+USERINCLUDE	../am/include
+USERINCLUDE	../am/type/symbian/plugin/include
+USERINCLUDE	../../eapol_common
+USERINCLUDE	../../eapol_common/include
+USERINCLUDE	../../eapol_common/am/include
+USERINCLUDE	../am/type/generic/symbian/plugin/inc
+USERINCLUDE	../../eapol_common/type
+USERINCLUDE	../../eapol_common/type/simple_config/simple_config/include/
+USERINCLUDE	../eap_if/include
+USERINCLUDE	../eap_server/include
+
+MW_LAYER_SYSTEMINCLUDE // For the MiddleWare domain headers.
+
+LIBRARY		euser.lib eaptools.lib eaptrace.lib eapsymbiantools.lib edbms.lib efsrv.lib  eapclientif.lib ecom.lib
+LIBRARY		cone.lib eikcoctl.lib eikctl.lib bafl.lib
+LIBRARY		estor.lib	// For RReadStream
+
+LANG		SC
+
+LIBRARY	eikdlg.lib
+LIBRARY	eikcore.lib
+LIBRARY	hlplch.lib
+LIBRARY		featmgr.lib
+
+// exports unfrozen in winscw
+#if defined(WINSCW)
+EXPORTUNFROZEN
+#endif
+
+//-------------------------------------------------------------------
+// End of File
--- a/eapol/eapol_framework/eapol_symbian/group/eapmschapv2.mmp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/group/eapmschapv2.mmp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 19 %
+* %version: 15.1.11 %
 */
 
 #include <platform_paths.hrh>
@@ -58,11 +58,6 @@
 	SOURCE		  eap_type_mschapv2_server.cpp
 #endif
 
-SOURCEPATH    ../am/common/symbian
-SOURCE		  eap_am_trace_symbian.cpp
-
-SOURCEPATH    ../am/type/mschapv2/symbian/plugin/src
-
 USERINCLUDE   ../am/type/mschapv2/symbian/plugin/inc
 USERINCLUDE   ../../eapol_common/type/mschapv2/include
 USERINCLUDE   ../../eapol_common/include
@@ -70,16 +65,14 @@
 USERINCLUDE   ../../eapol_common/am/include
 USERINCLUDE	  ../am/type/symbian/plugin/include
 USERINCLUDE   ../../eapol_common/type
-
-//SYSTEMINCLUDE /epoc32/include/ecom
-//SYSTEMINCLUDE /epoc32/include/libc
-//SYSTEMINCLUDE /epoc32/include/cshelp
+USERINCLUDE   ../am/eap_notifier/inc
 
 MW_LAYER_SYSTEMINCLUDE // For the MiddleWare domain headers.
 
 LIBRARY     euser.lib
 LIBRARY		ecom.lib
-LIBRARY     eapol.lib
+LIBRARY     eaptools.lib eaptrace.lib
+LIBRARY     eapsymbiantools.lib
 LIBRARY     edbms.lib
 LIBRARY     efsrv.lib
 LIBRARY     cone.lib
@@ -91,8 +84,18 @@
 LIBRARY     hlplch.lib
 LIBRARY		featmgr.lib
 
+LIBRARY		HbCore.lib
+LIBRARY		HbWidgets.lib
+LIBRARY   eap_notifier.lib
+
 LANG		  SC
 
+
+// exports unfrozen in winscw
+#if defined(WINSCW)
+EXPORTUNFROZEN
+#endif
+
 //-------------------------------------------------------------------
 
 //-------------------------------------------------------------------
--- a/eapol/eapol_framework/eapol_symbian/group/eapol.mmh	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/group/eapol.mmh	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 52 %
+* %version: 48.1.17 %
 */
 
 //-------------------------------------------------------------------
@@ -70,12 +70,6 @@
 
 // - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
-// This flag enables EAP expanded types.
-MACRO USE_EAP_EXPANDED_TYPES=1
-#define USE_EAP_EXPANDED_TYPES
-
-// - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
 // This flag activates message based WLAN engine EAPOL interface.
 MACRO USE_EAPOL_WLAN_AUTHENTICATION_MESSAGE_IF
 #define USE_EAPOL_WLAN_AUTHENTICATION_MESSAGE_IF
@@ -91,6 +85,8 @@
 
 #if defined(FF_WLAN_EXTENSIONS)
 
+#warning FF_WLAN_EXTENSIONS enabled
+
 MACRO USE_FAST_EAP_TYPE=1
 #define USE_FAST_EAP_TYPE
 
@@ -146,11 +142,6 @@
 // These following macros should be adjusted depending on the test environment.
 // For WLM compatibility only NO_EAP_MUTEX should be defined.
 MACRO NO_EAP_MUTEX=1
-MACRO USE_EAPOL_KEY_STATE=1
-
-// The following marco activates optimized 4-Way Handshake.
-// Note the interface between WLAN engine and EAPOL changes too.
-MACRO USE_EAPOL_KEY_STATE_OPTIMIZED_4_WAY_HANDSHAKE=1
 
 // Enables configuration option to skips user interactions in selected test cases.
 MACRO USE_EAP_CONFIGURATION_TO_SKIP_USER_INTERACTIONS=1
@@ -158,6 +149,9 @@
 // Enables timer to stop authentication with broken authentication server or access point configuration that blocks WLAN connection for too long time.
 MACRO USE_EAP_CORE_WAIT_REQUEST_TYPE_TIMER=1
 
+// Enables EAP-timer traces.
+MACRO USE_EAP_TIMER_QUEUE_TRACE=1
+
 // - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
 #if defined(FF_WLAN_EXTENSIONS)
@@ -166,11 +160,17 @@
 	// You need all EAPOL WPX sources or binary eapolwpx.lib to compile WPX version.
 	MACRO EAP_USE_WPXM=1
 	#define EAP_USE_WPXM
+
+	MACRO USE_EAP_PAC_STORE_IF=1
+	#define USE_EAP_PAC_STORE_IF
 #else
 	// The WPX stub is needed even without WPX functionality.
 	#define USE_EAPOL_WLAN_WPX_STUB 
 #endif // #if defined(FF_WLAN_EXTENSIONS)
 
+// Removes include statements for stdint.h
+MACRO EAP_NO_STDINT_H_HEADER=1
+#define EAP_NO_STDINT_H_HEADER
 
 //-------------------------------------------------------------------
 // End of File
--- a/eapol/eapol_framework/eapol_symbian/group/eapol.mmp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/group/eapol.mmp	Mon May 24 20:32:47 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 42.1.2.1.2 %
+* %version: 46 %
 */
 
 //-------------------------------------------------------------------
@@ -32,57 +32,16 @@
 TARGETTYPE		dll
 UID			0x1000008d  0x101f8e48
 
-deffile EAPOLPROTECTED.DEF
-
-SOURCEPATH ../am/common/symbian 
-SOURCE dll_entry.cpp
-SOURCE eap_am_tools_symbian.cpp
-
-// This source uses Symbian crypto library.
-SOURCEPATH	../am/common/symbian
-SOURCE eap_am_crypto_symbian.cpp
-SOURCE eap_am_mutex_symbian.cpp
-
-SOURCEPATH	../am/common/DSS_random
-SOURCE dss_random_symbian.cpp
-
-#if defined(USE_EAP_ASSERT_STACK_TRACE)
-SOURCEPATH ../../eapol_common/am/common/stack
-SOURCE eap_am_stack_trace.cpp
-#endif //#if defined(USE_EAP_ASSERT_STACK_TRACE)
-
-SOURCEPATH	../../eapol_common/am/common/crypto/md4
-SOURCE eap_am_crypto_md4.cpp
-
-SOURCEPATH	../../eapol_common/am/common/crypto/rc4
-SOURCE eap_am_crypto_rc4.cpp
-
-SOURCEPATH	../../eapol_common/am/common/crypto/sha1
-SOURCE eap_am_crypto_sha1.cpp
-
-SOURCEPATH	../../eapol_common/am/common/crypto/sha-256
-SOURCE eap_am_crypto_sha_256.cpp
-
-SOURCEPATH	../../eapol_common/am/common
-SOURCE eap_am_memory.cpp
-SOURCE eap_am_network_id.cpp
-SOURCE eap_am_tools.cpp
-SOURCE eap_timer_queue.cpp
-SOURCE eap_am_memory_store.cpp
-SOURCE eap_am_memory_store_data.cpp
-SOURCE abs_eap_am_mutex.cpp
-
-SOURCEPATH	../../eapol_common/am/common
-SOURCE eap_file_config.cpp
-SOURCEPATH	../am/common/file_io/symbian
-SOURCE eap_am_file_input_symbian.cpp
+deffile eapolprotected.def
 
 SOURCEPATH	../../eapol_common/am/core
 SOURCE eapol_am_wlan_authentication.cpp
 
 SOURCEPATH	../am/core/symbian
+SOURCE eapol_am_wlan_authentication_symbian.cpp
 
-SOURCE eapol_am_wlan_authentication_symbian.cpp
+SOURCEPATH	../am/common/symbian
+SOURCE EapConfigToolsSymbian.cpp
 
 LIBRARY bafl.lib
 LIBRARY wlandbif.lib
@@ -91,39 +50,12 @@
 
 LANG	SC
 
-SOURCEPATH	../../eapol_common/common
-SOURCE eap_base_type.cpp
-SOURCE eap_buffer.cpp
-SOURCE eap_crypto_api.cpp
-SOURCE eap_header.cpp
-SOURCE eap_expanded_type.cpp
-SOURCE eap_header_string.cpp
-SOURCE eap_state_notification.cpp
-SOURCE eap_tools.cpp
-SOURCE eap_status_string.cpp
-SOURCE eap_variable_data.cpp
-SOURCE eap_master_session_key.cpp
-SOURCE eap_general_header_base.cpp
-SOURCE eap_rogue_ap_entry.cpp
-SOURCE eap_memory_store_variable_data.cpp
-SOURCE eapol_session_key.cpp
-SOURCE eap_network_id_selector.cpp
-SOURCE eapol_ethernet_header.cpp
-SOURCE eapol_header.cpp
-SOURCE eap_tlv_header.cpp
-SOURCE eap_tlv_message_data.cpp
-
 #if defined(USE_EAPOL_WLAN_AUTHENTICATION_MESSAGE_IF)
 SOURCEPATH	../../eapol_common/common
 SOURCE wlan_eap_if_send_status.cpp
 #endif //#if defined(USE_EAPOL_WLAN_AUTHENTICATION_MESSAGE_IF)
 
 SOURCEPATH	../../eapol_common/core
-SOURCE eap_core.cpp
-SOURCE eap_core_nak_info.cpp
-SOURCE eap_core_retransmission.cpp
-SOURCE eap_session_core.cpp
-SOURCE eap_type_selection.cpp
 SOURCE eapol_core.cpp
 SOURCE ethernet_core.cpp
 SOURCE eapol_key_state_common.cpp
@@ -137,6 +69,7 @@
 SOURCE eapol_rsna_key_data_gtk_header.cpp
 SOURCE eapol_wlan_authentication.cpp
 SOURCE eapol_wlan_database_reference.cpp
+SOURCE eap_core_client_message_if.cpp
 
 #if defined(USE_EAPOL_WLAN_AUTHENTICATION_MESSAGE_IF)
 SOURCEPATH	../../eapol_common/core
@@ -144,55 +77,51 @@
 SOURCE eapol_handle_tlv_message_data.cpp
 #endif //#if defined(USE_EAPOL_WLAN_AUTHENTICATION_MESSAGE_IF)
 
-SOURCEPATH	../am/eap_test_timer/symbian 
-SOURCE eap_test_timer.cpp
-
-SOURCEPATH ../../eapol_common/type/tls_peap/tls/src
-SOURCE tls_peap_tlv_header.cpp
-
-SOURCEPATH   ../../eapol_common/type/simple_config/simple_config/src
-SOURCE simple_config_credential.cpp
-SOURCE simple_config_types.cpp
-
-#if !defined(USE_EAPOL_WLAN_WPX_STUB)
-// This library includes real WPX functionality.
-STATICLIBRARY eapolwpx.lib
-#endif //#if !defined(USE_EAPOL_WLAN_WPX_STUB)
-
-#if defined(USE_EAPOL_WLAN_WPX_STUB)
-// This library includes stubs of non working WPX functions.
-STATICLIBRARY eapolwpxstub.lib
-#endif //#if defined(USE_EAPOL_WLAN_WPX_STUB)
-
 USERINCLUDE ..
 USERINCLUDE ../am/type/symbian/plugin/include
 USERINCLUDE ../am/common
 USERINCLUDE ../../eapol_common/am/common
 USERINCLUDE ../am/include
-USERINCLUDE   ../../eapol_common/am/include
-USERINCLUDE   ../../eapol_common/include
-USERINCLUDE   ../../eapol_common/type
+USERINCLUDE ../../eapol_common/am/include
+USERINCLUDE ../../eapol_common/include
+USERINCLUDE ../../eapol_common/type
 USERINCLUDE ../../eapol_common/am/common/DSS_random
 USERINCLUDE ../../eapol_common/type/tls_peap/tls/include
-USERINCLUDE   ../../eapol_common/type/simple_config/simple_config/include
-USERINCLUDE   ../../eapol_common/type/simple_config/eap/include
+USERINCLUDE ../../eapol_common/type/simple_config/simple_config/include
+USERINCLUDE ../../eapol_common/type/simple_config/eap/include
 
 #if defined(EAP_USE_WPXM)
 USERINCLUDE   ../../eapol_common/wpx_include
 #endif //#if defined(EAP_USE_WPXM)
+USERINCLUDE ../eap_if/include
+USERINCLUDE ../eap_server/include
 
 
-//SYSTEMINCLUDE	/epoc32/include/ecom
+SYSTEMINCLUDE	/epoc32/include/ecom
 SYSTEMINCLUDE	/epoc32/include/kernel 
 SYSTEMINCLUDE	/epoc32/include/libc
 SYSTEMINCLUDE	/epoc32/include/libc/netinet
 
 MW_LAYER_SYSTEMINCLUDE // For the MiddleWare domain headers.
 
-LIBRARY		ecom.lib
+#if !defined(USE_EAPOL_WLAN_WPX_STUB)
+#warning STATICLIBRARY eapolwpx.lib
+STATICLIBRARY eapolwpx.lib
+#else
+STATICLIBRARY eapolwpxstub.lib
+#endif //#if !defined(USE_EAPOL_WLAN_WPX_STUB)
+
+LIBRARY		eaptools.lib eaptrace.lib eapsymbiantools.lib eapcoreinterface.lib
+LIBRARY		ecom.lib EapAuthServer.lib
 LIBRARY		euser.lib hash.lib random.lib cryptography.lib efsrv.lib asn1.lib edbms.lib
-LIBRARY     charconv.lib 
+LIBRARY   charconv.lib 
 
 MACRO USE_EAP_INTERFACE_EXPORTS
+
+// exports unfrozen in winscw
+#if defined(WINSCW)
+EXPORTUNFROZEN
+#endif
+
 //-------------------------------------------------------------------
 // End of File
--- a/eapol/eapol_framework/eapol_symbian/group/eapolwpxstub.mmp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/group/eapolwpxstub.mmp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12.2.2 %
+* %version: %
 */
 
 //-------------------------------------------------------------------
@@ -49,6 +49,7 @@
 USERINCLUDE ../../eapol_common/include
 USERINCLUDE ../../eapol_common/type
 USERINCLUDE ../../eapol_common/am/common/DSS_random
+USERINCLUDE ../../eapol_common/type/simple_config/simple_config/include
 
 SYSTEMINCLUDE /epoc32/include/ecom
 SYSTEMINCLUDE /epoc32/include/kernel 
@@ -57,5 +58,10 @@
 
 MW_LAYER_SYSTEMINCLUDE // For the MiddleWare domain headers.
 
+// exports unfrozen in winscw
+#if defined(WINSCW)
+EXPORTUNFROZEN
+#endif
+
 //-------------------------------------------------------------------
 // End of File
--- a/eapol/eapol_framework/eapol_symbian/group/eapprotectedsetup.mmp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/group/eapprotectedsetup.mmp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 12.2.4 %
+* %version: 14 %
 */
 
 #include <platform_paths.hrh>
@@ -47,9 +47,6 @@
 SOURCE        eap_am_type_protected_setup_symbian.cpp
 SOURCE        EapProtectedSetupInterface.cpp
 
-SOURCEPATH    ../am/common/symbian
-SOURCE		  eap_am_trace_symbian.cpp
-
 // For Common Side
 SOURCEPATH		../../eapol_common/type/simple_config/eap/src
 SOURCE			eap_type_simple_config.cpp
@@ -80,13 +77,16 @@
 
 MW_LAYER_SYSTEMINCLUDE // For the MiddleWare domain headers.
 
-LIBRARY		euser.lib ecom.lib eapol.lib //edbms.lib efsrv.lib 
+LIBRARY		euser.lib ecom.lib eaptools.lib eaptrace.lib eapsymbiantools.lib 
 LIBRARY		cone.lib eikcoctl.lib
 LIBRARY		etelmm.lib etel.lib	// For ETel connection
 
-LIBRARY 	wlandbif.lib
+
 
-//-------------------------------------------------------------------
+// exports unfrozen in winscw
+#if defined(WINSCW)
+EXPORTUNFROZEN
+#endif
 
 //-------------------------------------------------------------------
 // End of File
--- a/eapol/eapol_framework/eapol_symbian/group/eapsecurid.mmp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/group/eapsecurid.mmp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 16.2.4 %
+* %version: 16.1.11 %
 */
 
 #include <platform_paths.hrh>
@@ -56,11 +56,6 @@
 	SOURCE		  eap_type_securid_server.cpp
 #endif
 
-SOURCEPATH    ../am/common/symbian
-SOURCE		  eap_am_trace_symbian.cpp
-
-SOURCEPATH    ../am/type/securid/symbian/plugin/src
-
 USERINCLUDE   ../am/type/securid/symbian/plugin/inc
 USERINCLUDE   ../../eapol_common/type/securid/include
 USERINCLUDE   ../../eapol_common/include
@@ -68,22 +63,28 @@
 USERINCLUDE   ../../eapol_common/am/include
 USERINCLUDE	  ../am/type/symbian/plugin/include
 USERINCLUDE   ../../eapol_common/type
-
-//SYSTEMINCLUDE /epoc32/include/ecom
-//SYSTEMINCLUDE /epoc32/include/libc
-//SYSTEMINCLUDE /epoc32/include/cshelp
+USERINCLUDE   ../am/eap_notifier/inc
 
 MW_LAYER_SYSTEMINCLUDE // For the MiddleWare domain headers.
 
-LIBRARY     euser.lib ecom.lib eapol.lib edbms.lib efsrv.lib cone.lib eikcoctl.lib
+LIBRARY     euser.lib ecom.lib eaptools.lib eaptrace.lib eapsymbiantools.lib edbms.lib efsrv.lib cone.lib eikcoctl.lib
 LIBRARY		bafl.lib
 LIBRARY     eikdlg.lib
 LIBRARY     eikcore.lib
 LIBRARY     hlplch.lib
 LIBRARY		featmgr.lib
 
+LIBRARY		HbCore.lib
+LIBRARY		HbWidgets.lib
+LIBRARY   eap_notifier.lib
+
 LANG		  SC
 
+// exports unfrozen in winscw
+#if defined(WINSCW)
+EXPORTUNFROZEN
+#endif
+
 //-------------------------------------------------------------------
 
 //-------------------------------------------------------------------
--- a/eapol/eapol_framework/eapol_symbian/group/eapsim.mmp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/group/eapsim.mmp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 18.2.4 %
+* %version: 18.1.11 %
 */
 
 #include <platform_paths.hrh>
@@ -58,10 +58,7 @@
 SOURCEPATH	  ../../eapol_common/common
 SOURCE        eap_sim_triplets.cpp
 
-SOURCEPATH    ../am/common/symbian
-SOURCE		  eap_am_trace_symbian.cpp
 
-SOURCEPATH    ../am/type/gsmsim/symbian/plugin/src
 
 USERINCLUDE   ../am/type/gsmsim/symbian/plugin/inc
 USERINCLUDE   ../../eapol_common/type/gsmsim/include
@@ -69,10 +66,11 @@
 USERINCLUDE   ../am/include
 USERINCLUDE   ../../eapol_common/am/include
 USERINCLUDE   ../../eapol_common/type
+USERINCLUDE   ../am/type/symbian/plugin/include
 
 MW_LAYER_SYSTEMINCLUDE // For the MiddleWare domain headers.
 
-LIBRARY       euser.lib ecom.lib eapol.lib edbms.lib efsrv.lib 
+LIBRARY       euser.lib ecom.lib eaptools.lib eaptrace.lib eapsymbiantools.lib edbms.lib efsrv.lib 
 LIBRARY		  cone.lib eikcoctl.lib eikctl.lib bafl.lib
 LIBRARY		  estor.lib	// For RReadStream
 
@@ -93,5 +91,10 @@
 LIBRARY     hlplch.lib
 LIBRARY		featmgr.lib
 
+// exports unfrozen in winscw
+#if defined(WINSCW)
+EXPORTUNFROZEN
+#endif
+
 //-------------------------------------------------------------------
 // End of File
--- a/eapol/eapol_framework/eapol_symbian/group/eaptlspeap.mmp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/group/eaptlspeap.mmp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 44.2.4 %
+* %version: 44.1.16 %
 */
 
 #include <platform_paths.hrh>
@@ -49,6 +49,12 @@
 SOURCEPATH    ../am/type/tls_peap/symbian
 SOURCE        eap_am_type_tls_peap_symbian.cpp 
 
+SOURCEPATH ../../eapol_common/core
+SOURCE			dummy_eap_core.cpp
+
+SOURCEPATH	../am/common/symbian
+SOURCE EapConfigToolsSymbian.cpp
+
 SOURCEPATH    ../../eapol_common/type/tls_peap/eap/src
 SOURCE 	      eap_type_tls_peap_state_notification.cpp 
 SOURCE		  eap_type_tls_peap.cpp
@@ -80,11 +86,7 @@
 SOURCE		  eap_diameter_payloads.cpp
 SOURCE		  eap_diameter_avp_code.cpp
 
-SOURCEPATH    ../am/common/symbian
-SOURCE		  eap_am_trace_symbian.cpp
 
-SOURCEPATH    ../am/type/ttls_pap/symbian/src
-SOURCE        eap_ttls_pap_active.cpp
 
 USERINCLUDE   ../am/type/tls_peap/symbian/plugin/inc
 USERINCLUDE   ../../eapol_common/type/tls_peap/eap/include
@@ -98,10 +100,13 @@
 USERINCLUDE   ../../eapol_common/type
 USERINCLUDE   ../../eapol_common/type/diameter/include
 USERINCLUDE   ../am/type/ttls_pap/symbian/inc
-
+USERINCLUDE   ../eap_if/include
+USERINCLUDE   ../eap_server/include
+USERINCLUDE   ../am/type/symbian/plugin/include
 #if defined(EAP_USE_TTLS_PLAIN_MS_CHAP_V2_HACK)
 USERINCLUDE   ../../eapol_common/type/mschapv2/include
 #endif //#if defined(EAP_USE_TTLS_PLAIN_MS_CHAP_V2_HACK)
+USERINCLUDE   ../am/eap_notifier/inc
 
 #if defined(EAP_USE_TTLS_PLAIN_MS_CHAP_V2_HACK)
 SOURCEPATH    ../../eapol_common/type/mschapv2/core
@@ -116,8 +121,9 @@
 SOURCEPATH		../am/type/tls_peap/symbian/plugin/inc
 DOCUMENT		101f8e4c.loc
 
-// old ui db api
-USERINCLUDE   ../am/include/eaptlspeap_db_api
+// old ui
+USERINCLUDE   ../am/include/eaptlspeap_db_api_inc
+
 // UI
 SOURCEPATH    ../am/type/tls_peap/symbian/plugin/src
 SOURCE		  EapTlsPeapUiConnection.cpp
@@ -128,14 +134,11 @@
 SOURCE        EapTlsPeapUiCertificates.cpp
 SOURCE        EapTlsPeapUiCipherSuites.cpp
 
-
-
 LIBRARY		  x509certnameparser.lib		// For parsing of certificate label. 
 
-
 MW_LAYER_SYSTEMINCLUDE // For the MiddleWare domain headers.
 
-LIBRARY		euser.lib ecom.lib eapol.lib edbms.lib efsrv.lib cone.lib eikcoctl.lib
+LIBRARY		euser.lib ecom.lib eaptools.lib eaptrace.lib eapsymbiantools.lib edbms.lib efsrv.lib cone.lib eikcoctl.lib
 LIBRARY	    x509.lib crypto.lib certstore.lib ctframework.lib pkixcert.lib
 LIBRARY		asn1.lib x500.lib bafl.lib eikctl.lib egul.lib fbscli.lib
 LIBRARY		gdi.lib
@@ -150,6 +153,14 @@
 LIBRARY     charconv.lib
 
 //-------------------------------------------------------------------
+LIBRARY		HbCore.lib
+LIBRARY		HbWidgets.lib
+LIBRARY   eap_notifier.lib
+
+// exports unfrozen in winscw
+#if defined(WINSCW)
+EXPORTUNFROZEN
+#endif
 
 //-------------------------------------------------------------------
 // End of File
--- a/eapol/eapol_framework/eapol_symbian/group/eapvpnif.mmp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/group/eapvpnif.mmp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 11.2.3 %
+* %version: 11.1.8 %
 */
 
 #include <platform_paths.hrh>
@@ -37,6 +37,12 @@
 SOURCE		eap_vpn_if_implementation.cpp
 SOURCE		eap_vpn_if_timer.cpp
 
+SOURCEPATH ../eap_if/src
+SOURCE		EapCoreInterface.cpp
+
+SOURCEPATH ../../eapol_common/core
+SOURCE eap_core_client_message_if.cpp
+
 USERINCLUDE   ../am/eapvpnif/inc
 USERINCLUDE   ../../eapol_common/include
 USERINCLUDE   ../am/include
@@ -46,6 +52,10 @@
 
 USERINCLUDE   ../am/type/gsmsim/symbian/plugin/inc
 USERINCLUDE   ../am/type/aka/symbian/plugin/inc
+USERINCLUDE   ../../eapol_common/type/simple_config/simple_config/include
+USERINCLUDE   ../eap_if/include
+USERINCLUDE   ../eap_server/include
+USERINCLUDE   ../am/type/symbian/plugin/include
 
 SYSTEMINCLUDE /epoc32/include/ecom
 SYSTEMINCLUDE /epoc32/include/libc
@@ -58,7 +68,12 @@
 TARGET eapvpnif.rsc
 END
 
-LIBRARY euser.lib ECom.lib eapol.lib edbms.lib efsrv.lib PlatformEnv.lib
+LIBRARY euser.lib ECom.lib eaptools.lib eaptrace.lib eapsymbiantools.lib edbms.lib efsrv.lib PlatformEnv.lib
 DEBUGLIBRARY    flogger.lib
 
+// exports unfrozen in winscw
+#if defined(WINSCW)
+EXPORTUNFROZEN
+#endif
+
 // End
--- a/eapol/eapol_framework/eapol_symbian/group/wlaneapolif.mmp	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/group/wlaneapolif.mmp	Mon May 24 20:32:47 2010 +0300
@@ -16,7 +16,7 @@
 */
 
 /*
-* %version: 8.2.3 %
+* %version: 8.1.6 %
 */
 
 #include <platform_paths.hrh>
@@ -63,7 +63,7 @@
 TARGET wlaneapolif.rsc
 END
 
-LIBRARY euser.lib ECom.lib eapol.lib edbms.lib efsrv.lib
+LIBRARY euser.lib ECom.lib eapol.lib edbms.lib efsrv.lib eaptools.lib eaptrace.lib eapsymbiantools.lib
 DEBUGLIBRARY    flogger.lib
 
 #else
@@ -72,4 +72,9 @@
 
 #endif //#if defined(USE_EAPOL_WLAN_AUTHENTICATION_MESSAGE_IF)
 
+// exports unfrozen in winscw
+#if defined(WINSCW)
+EXPORTUNFROZEN
+#endif
+
 // End
--- a/eapol/eapol_framework/eapol_symbian/rom/eapol.iby	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_symbian/rom/eapol.iby	Mon May 24 20:32:47 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of the License "Eclipse Public License v1.0"
@@ -11,23 +11,35 @@
 *
 * Contributors:
 *
-* Description:  Image description file for project EAPOL
+* Description:  Image description file for EAPOL framework
 *
 */
 
 /*
-* %version: 16.1.2 %
+* %version: 34 %
 */
 
 #ifndef __EAPOL_IBY__
 #define __EAPOL_IBY__
+
+#include <data_caging_paths_for_iby.hrh>
 #include <bldvariant.hrh>
 
 #ifdef __PROTOCOL_WLAN
 
+
+/* tools */
+file=ABI_DIR\BUILD_DIR\eaptools.dll		SHARED_LIB_DIR\eaptools.dll
+
+/* Symbian tools */
+file=ABI_DIR\BUILD_DIR\eapsymbiantools.dll		SHARED_LIB_DIR\eapsymbiantools.dll
+
+/* Symbian trace */
+file=ABI_DIR\BUILD_DIR\eaptrace.dll		SHARED_LIB_DIR\eaptrace.dll
+
 /* EAPOL + EAP types */
 
-file=ABI_DIR\BUILD_DIR\eapol.dll			SHARED_LIB_DIR\Eapol.dll
+file=ABI_DIR\BUILD_DIR\eapol.dll			SHARED_LIB_DIR\eapol.dll
 
 // EAP SIM
 ECOM_PLUGIN( eapsim.dll,101f8e49.rsc )
@@ -35,38 +47,57 @@
 // EAP AKA
 ECOM_PLUGIN( eapaka.dll,102073c1.rsc )
 
-// EAP MSCHAPV2
+// EAP MSCHAPv2 / Plain-MSCHAPv2
 ECOM_PLUGIN( eapmschapv2.dll,101f8e66.rsc )
 
-// EAP TLS PEAP
+// EAP TLS PEAP TTLS
 ECOM_PLUGIN( eaptlspeap.dll,101f8e4c.rsc )
 
-// EAP Secure ID
+// EAP Secure ID / GTC
 ECOM_PLUGIN( eapsecurid.dll,101f8e74.rsc )
 
-#ifdef FF_WLAN_EXTENSIONS
-// EAP LEAP
-ECOM_PLUGIN( eapleap.dll,101f8ea6.rsc )
-#endif //#ifdef FF_WLAN_EXTENSIONS
-
-// The VPN interface
+// VPN interface
 ECOM_PLUGIN(eapvpnif.dll, 10200ec9.rsc)
 
 // The Engine EAPOL interface
 ECOM_PLUGIN(wlaneapolif.dll, 2000b05a.rsc)
 
-// EAP Protected Setup
+// Protected Setup
 ECOM_PLUGIN( eapprotectedsetup.dll,2000b003.rsc )
 
 // For database policy file (For secured databases of different EAP types and EAPOL.dat)
 data=ZPRIVATE\100012A5\policy\102072e9.spd			private\100012A5\policy\102072e9.spd
 
-
 // For additional backup registration file for EAPOL.
 data=ZPRIVATE\101F8EC5\backup_registration_eapol.xml	private\101F8EC5\backup_registration_eapol.xml
 
 // Copies configuration file of EAPOL.
 data=ZPRIVATE\101F8EC5\eap.conf	private\101F8EC5\eap.conf
 
+// Copies configuration file of EAP-server.
+data=ZPRIVATE\20026FCB\eap.conf	private\20026FCB\eap.conf
+
+// Copies backup registration file of EAP-server.
+data=ZPRIVATE\20026FCB\backup_registration.xml	private\20026FCB\backup_registration.xml
+
+
+file=ABI_DIR\BUILD_DIR\EapAuthServer.dll		SHARED_LIB_DIR\EapAuthServer.dll
+
+file=ABI_DIR\BUILD_DIR\EapAuthServerExe.exe		SHARED_LIB_DIR\EapAuthServerExe.exe
+
+file=ABI_DIR\BUILD_DIR\eapcoreinterface.dll		SHARED_LIB_DIR\eapcoreinterface.dll
+
+file=ABI_DIR\BUILD_DIR\eapclientif.dll		SHARED_LIB_DIR\eapclientif.dll
+
+ECOM_PLUGIN( EapCoreInterfaceImplementation.dll, 20026fcd.rsc)
+
+ECOM_PLUGIN( EapGeneric.dll, 20026fd1.rsc )
+
+ECOM_PLUGIN( EapGeneralSettings.dll, 20026fd6.rsc)
+
+file=ABI_DIR\BUILD_DIR\eap_notifier.dll		SHARED_LIB_DIR\eap_notifier.dll
+
+
 #endif // __PROTOCOL_WLAN
-#endif // #ifndef __EAPOL_IBY__
+
+#endif // __EAPOL_IBY__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/tools/eabi/eapsymbiantoolsu.def	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,40 @@
+EXPORTS
+	_ZN14EapPluginTools15GetPrivatePathLER3RFsR4TBufILi256EE @ 1 NONAME
+	_ZN14EapPluginTools15GetPrivatePathLER4TBufILi256EE @ 2 NONAME
+	_ZN14EapPluginTools16CleanupImplArrayEPv @ 3 NONAME
+	_ZN14EapPluginTools16CreateDatabaseLCER16RDbNamedDatabaseR3RFsRiRK7TDesC16R4TBufILi256EE @ 4 NONAME
+	_ZN14EapPluginTools18ListAllEapPluginsLERK16TEapExpandedTypeR13RPointerArrayIS0_E @ 5 NONAME
+	_ZN14EapPluginToolsC1Ev @ 6 NONAME
+	_ZN14EapPluginToolsC2Ev @ 7 NONAME
+	_ZN14EapPluginToolsD0Ev @ 8 NONAME
+	_ZN14EapPluginToolsD1Ev @ 9 NONAME
+	_ZN14EapPluginToolsD2Ev @ 10 NONAME
+	_ZN16TEapExpandedType8SetValueEPKvj @ 11 NONAME
+	_ZN16TEapExpandedType8SetValueEjj @ 12 NONAME
+	_ZN16TEapExpandedTypeC1EPKS_ @ 13 NONAME
+	_ZN16TEapExpandedTypeC1ERK6TBufC8ILi8EE @ 14 NONAME
+	_ZN16TEapExpandedTypeC1ERK6TDesC8 @ 15 NONAME
+	_ZN16TEapExpandedTypeC1ERKS_ @ 16 NONAME
+	_ZN16TEapExpandedTypeC1Ev @ 17 NONAME
+	_ZN16TEapExpandedTypeC2EPKS_ @ 18 NONAME
+	_ZN16TEapExpandedTypeC2ERK6TBufC8ILi8EE @ 19 NONAME
+	_ZN16TEapExpandedTypeC2ERK6TDesC8 @ 20 NONAME
+	_ZN16TEapExpandedTypeC2ERKS_ @ 21 NONAME
+	_ZN16TEapExpandedTypeC2Ev @ 22 NONAME
+	_ZN16TEapExpandedTypeD1Ev @ 23 NONAME
+	_ZN16TEapExpandedTypeD2Ev @ 24 NONAME
+	_ZN16TEapExpandedTypeaSERK6TBufC8ILi8EE @ 25 NONAME
+	_ZN16TEapExpandedTypeaSERK6TDesC8 @ 26 NONAME
+	_ZN16TEapExpandedTypeaSERKS_ @ 27 NONAME
+	_ZNK16TEapExpandedType11GetVendorIdEv @ 28 NONAME
+	_ZNK16TEapExpandedType13GetVendorTypeEv @ 29 NONAME
+	_ZNK16TEapExpandedType7CompareERKS_ @ 30 NONAME
+	_ZNK16TEapExpandedType8GetValueEv @ 31 NONAME
+	_ZNK16TEapExpandedTypeeqERKS_ @ 32 NONAME
+	_ZNK16TEapExpandedTypeneERKS_ @ 33 NONAME
+	_ZTI14EapPluginTools @ 34 NONAME
+	_ZTV14EapPluginTools @ 35 NONAME
+	_ZN16TEapExpandedTypeD0Ev @ 36 NONAME
+	_ZTI16TEapExpandedType @ 37 NONAME
+	_ZTV16TEapExpandedType @ 38 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/tools/eabi/eaptoolsu.def	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,1787 @@
+EXPORTS
+	_Z10eap_htonlly @ 1 NONAME
+	_Z21eap_shift_left_64_bitym @ 2 NONAME
+	_Z22eap_shift_right_64_bitym @ 3 NONAME
+	_Z25convert_eap_type_to_u32_t19eap_expanded_type_c @ 4 NONAME
+	_Z25convert_eap_type_to_u64_t19eap_expanded_type_c @ 5 NONAME
+	_Z28eap_read_u16_t_network_orderPKvm @ 6 NONAME
+	_Z28eap_read_u24_t_network_orderPKvm @ 7 NONAME
+	_Z28eap_read_u32_t_network_orderPKvm @ 8 NONAME
+	_Z28eap_read_u64_t_network_orderPKvm @ 9 NONAME
+	_Z29eap_write_u16_t_network_orderPvmt @ 10 NONAME
+	_Z29eap_write_u24_t_network_orderPvmm @ 11 NONAME
+	_Z29eap_write_u32_t_network_orderPvmm @ 12 NONAME
+	_Z29eap_write_u64_t_network_orderPvmy @ 13 NONAME
+	_Z30eap_host_to_little_endian_longm @ 14 NONAME
+	_Z31eap_host_to_little_endian_shortt @ 15 NONAME
+	_Z34eap_read_u16_t_little_endian_orderPKvm @ 16 NONAME
+	_Z34eap_read_u32_t_little_endian_orderPKvm @ 17 NONAME
+	_Z34eap_read_u64_t_little_endian_orderPKvm @ 18 NONAME
+	_Z35eap_host_to_little_endian_long_longy @ 19 NONAME
+	_Z35eap_write_u16_t_little_endian_orderPvmt @ 20 NONAME
+	_Z35eap_write_u32_t_little_endian_orderPvmm @ 21 NONAME
+	_Z35eap_write_u64_t_little_endian_orderPvmy @ 22 NONAME
+	_Z9eap_htonlm @ 23 NONAME
+	_Z9eap_htonst @ 24 NONAME
+	_ZN10eap_core_c11get_partnerEv @ 25 NONAME
+	_ZN10eap_core_c11load_moduleE19eap_expanded_type_cS0_P19abs_eap_base_type_cPP15eap_base_type_cbPK19eap_am_network_id_c @ 26 NONAME
+	_ZN10eap_core_c11packet_sendEPK19eap_am_network_id_cP18eap_buf_chain_wr_cmmm @ 27 NONAME
+	_ZN10eap_core_c11set_partnerEP14abs_eap_core_c @ 28 NONAME
+	_ZN10eap_core_c12add_rogue_apER11eap_array_cI20eap_rogue_ap_entry_cE @ 29 NONAME
+	_ZN10eap_core_c12cancel_timerEP20abs_eap_base_timer_cm @ 30 NONAME
+	_ZN10eap_core_c12get_is_validEv @ 31 NONAME
+	_ZN10eap_core_c12set_is_validEv @ 32 NONAME
+	_ZN10eap_core_c13resend_packetEPK19eap_am_network_id_cP18eap_buf_chain_wr_cmmmm @ 33 NONAME
+	_ZN10eap_core_c13timer_expiredEmPv @ 34 NONAME
+	_ZN10eap_core_c13unload_moduleE19eap_expanded_type_c @ 35 NONAME
+	_ZN10eap_core_c14packet_processEPK19eap_am_network_id_cP25eap_general_header_base_cm @ 36 NONAME
+	_ZN10eap_core_c14read_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 37 NONAME
+	_ZN10eap_core_c15eap_acknowledgeEPK19eap_am_network_id_c @ 38 NONAME
+	_ZN10eap_core_c15reset_operationEP15eap_base_type_cP18abs_eap_am_tools_c @ 39 NONAME
+	_ZN10eap_core_c15write_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 40 NONAME
+	_ZN10eap_core_c16send_eap_failureEPK19eap_am_network_id_ch @ 41 NONAME
+	_ZN10eap_core_c16send_eap_successEPK19eap_am_network_id_ch @ 42 NONAME
+	_ZN10eap_core_c16trace_eap_packetEPKcPK15eap_header_wr_c @ 43 NONAME
+	_ZN10eap_core_c17get_eap_type_listEP11eap_array_cI19eap_expanded_type_cE @ 44 NONAME
+	_ZN10eap_core_c17get_header_offsetEPmS0_ @ 45 NONAME
+	_ZN10eap_core_c17timer_delete_dataEmPv @ 46 NONAME
+	_ZN10eap_core_c18get_marked_removedEv @ 47 NONAME
+	_ZN10eap_core_c18set_marked_removedEv @ 48 NONAME
+	_ZN10eap_core_c18shutdown_operationEP15eap_base_type_cP18abs_eap_am_tools_c @ 49 NONAME
+	_ZN10eap_core_c18state_notificationEPK28abs_eap_state_notification_c @ 50 NONAME
+	_ZN10eap_core_c19init_retransmissionEPK19eap_am_network_id_cP18eap_buf_chain_wr_cmm16eap_code_value_eh19eap_expanded_type_c @ 51 NONAME
+	_ZN10eap_core_c19packet_process_typeE19eap_expanded_type_cPK19eap_am_network_id_cP25eap_general_header_base_cm @ 52 NONAME
+	_ZN10eap_core_c19set_session_timeoutEm @ 53 NONAME
+	_ZN10eap_core_c20ignore_notificationsEv @ 54 NONAME
+	_ZN10eap_core_c20unset_marked_removedEv @ 55 NONAME
+	_ZN10eap_core_c21cancel_retransmissionEv @ 56 NONAME
+	_ZN10eap_core_c21restart_with_new_typeE19eap_expanded_type_cPK19eap_am_network_id_ch @ 57 NONAME
+	_ZN10eap_core_c21send_eap_nak_responseEPK19eap_am_network_id_chPK11eap_array_cI19eap_expanded_type_cE @ 58 NONAME
+	_ZN10eap_core_c22cancel_session_timeoutEv @ 59 NONAME
+	_ZN10eap_core_c22get_saved_eap_identityEP19eap_variable_data_c @ 60 NONAME
+	_ZN10eap_core_c22restart_authenticationEPK19eap_am_network_id_cb @ 61 NONAME
+	_ZN10eap_core_c23check_is_valid_eap_typeE19eap_expanded_type_c @ 62 NONAME
+	_ZN10eap_core_c23packet_data_crypto_keysEPK19eap_am_network_id_cPK24eap_master_session_key_c @ 63 NONAME
+	_ZN10eap_core_c23set_authentication_roleEb @ 64 NONAME
+	_ZN10eap_core_c23set_eap_failure_timeoutEv @ 65 NONAME
+	_ZN10eap_core_c25client_proposes_eap_typesEPK19eap_am_network_id_ch @ 66 NONAME
+	_ZN10eap_core_c25send_eap_identity_requestEPK19eap_am_network_id_c @ 67 NONAME
+	_ZN10eap_core_c26cancel_eap_failure_timeoutEv @ 68 NONAME
+	_ZN10eap_core_c26initialize_session_timeoutEm @ 69 NONAME
+	_ZN10eap_core_c26send_eap_identity_responseEPK19eap_am_network_id_cPK19eap_variable_data_ch @ 70 NONAME
+	_ZN10eap_core_c27complete_eap_identity_queryEPK19eap_am_network_id_cPK19eap_variable_data_ch @ 71 NONAME
+	_ZN10eap_core_c27handle_eap_identity_requestE19eap_expanded_type_chPK19eap_am_network_id_c @ 72 NONAME
+	_ZN10eap_core_c28create_eap_identity_responseEP18eap_buf_chain_wr_cPK19eap_variable_data_ch @ 73 NONAME
+	_ZN10eap_core_c28handle_eap_identity_responseEP15eap_base_type_c19eap_expanded_type_cPK19eap_am_network_id_cP15eap_header_wr_cm @ 74 NONAME
+	_ZN10eap_core_c30send_eap_notification_responseEPK19eap_am_network_id_ch @ 75 NONAME
+	_ZN10eap_core_c31object_decrease_reference_countEv @ 76 NONAME
+	_ZN10eap_core_c31object_increase_reference_countEv @ 77 NONAME
+	_ZN10eap_core_c5resetEv @ 78 NONAME
+	_ZN10eap_core_c8shutdownEv @ 79 NONAME
+	_ZN10eap_core_c9configureEv @ 80 NONAME
+	_ZN10eap_core_c9load_typeE19eap_expanded_type_cS0_PK19eap_am_network_id_c @ 81 NONAME
+	_ZN10eap_core_c9set_timerEP20abs_eap_base_timer_cmPvm @ 82 NONAME
+	_ZN10eap_core_cC1EP18abs_eap_am_tools_cP14abs_eap_core_cbPK19eap_am_network_id_cb @ 83 NONAME
+	_ZN10eap_core_cC2EP18abs_eap_am_tools_cP14abs_eap_core_cbPK19eap_am_network_id_cb @ 84 NONAME
+	_ZN10eap_core_cD0Ev @ 85 NONAME
+	_ZN10eap_core_cD1Ev @ 86 NONAME
+	_ZN10eap_core_cD2Ev @ 87 NONAME
+	_ZN11EAPSettingsC1Ev @ 88 NONAME
+	_ZN11EAPSettingsC2Ev @ 89 NONAME
+	_ZN11EAPSettingsD0Ev @ 90 NONAME
+	_ZN11EAPSettingsD1Ev @ 91 NONAME
+	_ZN11EAPSettingsD2Ev @ 92 NONAME
+	_ZN12crypto_aes_c12get_encryptsEv @ 93 NONAME
+	_ZN12crypto_aes_c12get_is_validEv @ 94 NONAME
+	_ZN12crypto_aes_c12set_is_validEv @ 95 NONAME
+	_ZN12crypto_aes_c13decrypt_blockEPKvPvm @ 96 NONAME
+	_ZN12crypto_aes_c13encrypt_blockEPKvPvm @ 97 NONAME
+	_ZN12crypto_aes_c14get_block_sizeEv @ 98 NONAME
+	_ZN12crypto_aes_c14get_key_lengthEv @ 99 NONAME
+	_ZN12crypto_aes_c18set_decryption_keyEPKvm @ 100 NONAME
+	_ZN12crypto_aes_c18set_encryption_keyEPKvm @ 101 NONAME
+	_ZN12crypto_aes_cC1EP18abs_eap_am_tools_c @ 102 NONAME
+	_ZN12crypto_aes_cC2EP18abs_eap_am_tools_c @ 103 NONAME
+	_ZN12crypto_aes_cD0Ev @ 104 NONAME
+	_ZN12crypto_aes_cD1Ev @ 105 NONAME
+	_ZN12crypto_aes_cD2Ev @ 106 NONAME
+	_ZN12crypto_cbc_c10get_tmp_IVEv @ 107 NONAME
+	_ZN12crypto_cbc_c12decrypt_dataEPKvPvm @ 108 NONAME
+	_ZN12crypto_cbc_c12decrypt_dataEPvm @ 109 NONAME
+	_ZN12crypto_cbc_c12encrypt_dataEPKvPvm @ 110 NONAME
+	_ZN12crypto_cbc_c12encrypt_dataEPvm @ 111 NONAME
+	_ZN12crypto_cbc_c12get_encryptsEv @ 112 NONAME
+	_ZN12crypto_cbc_c12get_is_validEv @ 113 NONAME
+	_ZN12crypto_cbc_c12set_is_validEv @ 114 NONAME
+	_ZN12crypto_cbc_c13cbc_xor_blockEPKvPvmm @ 115 NONAME
+	_ZN12crypto_cbc_c14cbc_copy_blockEPvPKvmm @ 116 NONAME
+	_ZN12crypto_cbc_c14get_block_sizeEv @ 117 NONAME
+	_ZN12crypto_cbc_c14get_key_lengthEv @ 118 NONAME
+	_ZN12crypto_cbc_c17add_padding_bytesEPvmh @ 119 NONAME
+	_ZN12crypto_cbc_c18set_decryption_keyEPKvmS1_m @ 120 NONAME
+	_ZN12crypto_cbc_c18set_encryption_keyEPKvmS1_m @ 121 NONAME
+	_ZN12crypto_cbc_c18update_non_alignedEPKvPvm @ 122 NONAME
+	_ZN12crypto_cbc_c18update_non_alignedEPvm @ 123 NONAME
+	_ZN12crypto_cbc_c19aligned_data_lengthEm @ 124 NONAME
+	_ZN12crypto_cbc_c19check_padding_bytesEPKvmh @ 125 NONAME
+	_ZN12crypto_cbc_c20finalize_non_alignedEv @ 126 NONAME
+	_ZN12crypto_cbc_c21internal_decrypt_dataEPKvPvm @ 127 NONAME
+	_ZN12crypto_cbc_c21internal_encrypt_dataEPKvPvm @ 128 NONAME
+	_ZN12crypto_cbc_c5resetEv @ 129 NONAME
+	_ZN12crypto_cbc_cC1EP18abs_eap_am_tools_cP28abs_crypto_block_algorithm_cb @ 130 NONAME
+	_ZN12crypto_cbc_cC2EP18abs_eap_am_tools_cP28abs_crypto_block_algorithm_cb @ 131 NONAME
+	_ZN12crypto_cbc_cD0Ev @ 132 NONAME
+	_ZN12crypto_cbc_cD1Ev @ 133 NONAME
+	_ZN12crypto_cbc_cD2Ev @ 134 NONAME
+	_ZN12crypto_dsa_c12get_is_validEv @ 135 NONAME
+	_ZN12crypto_dsa_c12set_is_validEv @ 136 NONAME
+	_ZN12crypto_dsa_c14set_is_invalidEv @ 137 NONAME
+	_ZN12crypto_dsa_c4initEv @ 138 NONAME
+	_ZN12crypto_dsa_c4signEPK19eap_variable_data_cS2_PS0_ @ 139 NONAME
+	_ZN12crypto_dsa_c6verifyEPK19eap_variable_data_cS2_S2_S2_S2_S2_ @ 140 NONAME
+	_ZN12crypto_dsa_c7cleanupEv @ 141 NONAME
+	_ZN12crypto_dsa_cC1EP18abs_eap_am_tools_c @ 142 NONAME
+	_ZN12crypto_dsa_cC2EP18abs_eap_am_tools_c @ 143 NONAME
+	_ZN12crypto_dsa_cD0Ev @ 144 NONAME
+	_ZN12crypto_dsa_cD1Ev @ 145 NONAME
+	_ZN12crypto_dsa_cD2Ev @ 146 NONAME
+	_ZN12crypto_md4_c10hash_finalEPvPm @ 147 NONAME
+	_ZN12crypto_md4_c11hash_updateEPKvm @ 148 NONAME
+	_ZN12crypto_md4_c12copy_contextEPK19eap_variable_data_c @ 149 NONAME
+	_ZN12crypto_md4_c12get_is_validEv @ 150 NONAME
+	_ZN12crypto_md4_c12hash_cleanupEv @ 151 NONAME
+	_ZN12crypto_md4_c12set_is_validEv @ 152 NONAME
+	_ZN12crypto_md4_c14get_block_sizeEv @ 153 NONAME
+	_ZN12crypto_md4_c14set_is_invalidEv @ 154 NONAME
+	_ZN12crypto_md4_c17get_digest_lengthEv @ 155 NONAME
+	_ZN12crypto_md4_c4copyEv @ 156 NONAME
+	_ZN12crypto_md4_c9hash_initEv @ 157 NONAME
+	_ZN12crypto_md4_cC1EP18abs_eap_am_tools_c @ 158 NONAME
+	_ZN12crypto_md4_cC2EP18abs_eap_am_tools_c @ 159 NONAME
+	_ZN12crypto_md4_cD0Ev @ 160 NONAME
+	_ZN12crypto_md4_cD1Ev @ 161 NONAME
+	_ZN12crypto_md4_cD2Ev @ 162 NONAME
+	_ZN12crypto_md5_c10hash_finalEPvPm @ 163 NONAME
+	_ZN12crypto_md5_c11hash_updateEPKvm @ 164 NONAME
+	_ZN12crypto_md5_c12copy_contextEPK19eap_variable_data_c @ 165 NONAME
+	_ZN12crypto_md5_c12get_is_validEv @ 166 NONAME
+	_ZN12crypto_md5_c12hash_cleanupEv @ 167 NONAME
+	_ZN12crypto_md5_c12set_is_validEv @ 168 NONAME
+	_ZN12crypto_md5_c14get_block_sizeEv @ 169 NONAME
+	_ZN12crypto_md5_c14set_is_invalidEv @ 170 NONAME
+	_ZN12crypto_md5_c17get_digest_lengthEv @ 171 NONAME
+	_ZN12crypto_md5_c4copyEv @ 172 NONAME
+	_ZN12crypto_md5_c9hash_initEv @ 173 NONAME
+	_ZN12crypto_md5_cC1EP18abs_eap_am_tools_c @ 174 NONAME
+	_ZN12crypto_md5_cC2EP18abs_eap_am_tools_c @ 175 NONAME
+	_ZN12crypto_md5_cD0Ev @ 176 NONAME
+	_ZN12crypto_md5_cD1Ev @ 177 NONAME
+	_ZN12crypto_md5_cD2Ev @ 178 NONAME
+	_ZN12crypto_rc4_c12decrypt_dataEPKvPvm @ 179 NONAME
+	_ZN12crypto_rc4_c12decrypt_dataEPvm @ 180 NONAME
+	_ZN12crypto_rc4_c12encrypt_dataEPKvPvm @ 181 NONAME
+	_ZN12crypto_rc4_c12encrypt_dataEPvm @ 182 NONAME
+	_ZN12crypto_rc4_c12get_is_validEv @ 183 NONAME
+	_ZN12crypto_rc4_c12set_is_validEv @ 184 NONAME
+	_ZN12crypto_rc4_c14discard_streamEm @ 185 NONAME
+	_ZN12crypto_rc4_c14set_is_invalidEv @ 186 NONAME
+	_ZN12crypto_rc4_c7set_keyEPK19eap_variable_data_c @ 187 NONAME
+	_ZN12crypto_rc4_cC1EP18abs_eap_am_tools_c @ 188 NONAME
+	_ZN12crypto_rc4_cC2EP18abs_eap_am_tools_c @ 189 NONAME
+	_ZN12crypto_rc4_cD0Ev @ 190 NONAME
+	_ZN12crypto_rc4_cD1Ev @ 191 NONAME
+	_ZN12crypto_rc4_cD2Ev @ 192 NONAME
+	_ZN12crypto_rsa_c12get_is_validEv @ 193 NONAME
+	_ZN12crypto_rsa_c12set_is_validEv @ 194 NONAME
+	_ZN12crypto_rsa_c14set_is_invalidEv @ 195 NONAME
+	_ZN12crypto_rsa_c23decrypt_with_public_keyEPK19eap_variable_data_cS2_PS0_ @ 196 NONAME
+	_ZN12crypto_rsa_c23encrypt_with_public_keyEPK19eap_variable_data_cS2_PS0_ @ 197 NONAME
+	_ZN12crypto_rsa_c24decrypt_with_private_keyEPK19eap_variable_data_cS2_PS0_ @ 198 NONAME
+	_ZN12crypto_rsa_c24encrypt_with_private_keyEPK19eap_variable_data_cS2_PS0_ @ 199 NONAME
+	_ZN12crypto_rsa_c4initEv @ 200 NONAME
+	_ZN12crypto_rsa_c4signEPK19eap_variable_data_cS2_PS0_ @ 201 NONAME
+	_ZN12crypto_rsa_c6verifyEPK19eap_variable_data_cS2_S2_ @ 202 NONAME
+	_ZN12crypto_rsa_c7cleanupEv @ 203 NONAME
+	_ZN12crypto_rsa_cC1EP18abs_eap_am_tools_c @ 204 NONAME
+	_ZN12crypto_rsa_cC2EP18abs_eap_am_tools_c @ 205 NONAME
+	_ZN12crypto_rsa_cD0Ev @ 206 NONAME
+	_ZN12crypto_rsa_cD1Ev @ 207 NONAME
+	_ZN12crypto_rsa_cD2Ev @ 208 NONAME
+	_ZN13crypto_hmac_c10hmac_finalEPvPm @ 209 NONAME
+	_ZN13crypto_hmac_c11hmac_updateEPKvm @ 210 NONAME
+	_ZN13crypto_hmac_c12get_is_validEv @ 211 NONAME
+	_ZN13crypto_hmac_c12hmac_cleanupEv @ 212 NONAME
+	_ZN13crypto_hmac_c12hmac_set_keyEPK19eap_variable_data_c @ 213 NONAME
+	_ZN13crypto_hmac_c12set_is_validEv @ 214 NONAME
+	_ZN13crypto_hmac_c14hmac_128_finalEPvPm @ 215 NONAME
+	_ZN13crypto_hmac_c14initialize_padEP19eap_variable_data_ch @ 216 NONAME
+	_ZN13crypto_hmac_c17get_digest_lengthEv @ 217 NONAME
+	_ZN13crypto_hmac_cC1EP18abs_eap_am_tools_cP27abs_crypto_hash_algorithm_cb @ 218 NONAME
+	_ZN13crypto_hmac_cC2EP18abs_eap_am_tools_cP27abs_crypto_hash_algorithm_cb @ 219 NONAME
+	_ZN13crypto_hmac_cD0Ev @ 220 NONAME
+	_ZN13crypto_hmac_cD1Ev @ 221 NONAME
+	_ZN13crypto_hmac_cD2Ev @ 222 NONAME
+	_ZN13crypto_sha1_c10hash_finalEPvPm @ 223 NONAME
+	_ZN13crypto_sha1_c11hash_updateEPKvm @ 224 NONAME
+	_ZN13crypto_sha1_c12copy_contextEPK19eap_variable_data_c @ 225 NONAME
+	_ZN13crypto_sha1_c12get_is_validEv @ 226 NONAME
+	_ZN13crypto_sha1_c12hash_cleanupEv @ 227 NONAME
+	_ZN13crypto_sha1_c12set_is_validEv @ 228 NONAME
+	_ZN13crypto_sha1_c14get_block_sizeEv @ 229 NONAME
+	_ZN13crypto_sha1_c14set_is_invalidEv @ 230 NONAME
+	_ZN13crypto_sha1_c17get_digest_lengthEv @ 231 NONAME
+	_ZN13crypto_sha1_c4copyEv @ 232 NONAME
+	_ZN13crypto_sha1_c9hash_initEv @ 233 NONAME
+	_ZN13crypto_sha1_cC1EP18abs_eap_am_tools_c @ 234 NONAME
+	_ZN13crypto_sha1_cC2EP18abs_eap_am_tools_c @ 235 NONAME
+	_ZN13crypto_sha1_cD0Ev @ 236 NONAME
+	_ZN13crypto_sha1_cD1Ev @ 237 NONAME
+	_ZN13crypto_sha1_cD2Ev @ 238 NONAME
+	_ZN14CEapConversion26ConvertFromBuf16ToInternalEP18abs_eap_am_tools_cPK6TDes16P19eap_variable_data_c @ 239 NONAME
+	_ZN14CEapConversion26ConvertFromInternalToBuf16EP18abs_eap_am_tools_cPK19eap_variable_data_cP6TDes16 @ 240 NONAME
+	_ZN14CEapConversion26ConvertFromTDesCToInternalEP18abs_eap_am_tools_cRK7TDesC16P19eap_variable_data_c @ 241 NONAME
+	_ZN14CEapConversion28ConvertHBufC8ToInternalTypesEP18abs_eap_am_tools_cPK6HBufC8P11eap_array_cI19eap_expanded_type_cE @ 242 NONAME
+	_ZN14CEapConversion28ConvertInternalTypesToHBufC8EP18abs_eap_am_tools_cPK11eap_array_cI19eap_expanded_type_cEPP6HBufC8 @ 243 NONAME
+	_ZN14CEapConversion30ConvertEAPTypesToInternalTypesEP18abs_eap_am_tools_cPK6RArrayIjEP11eap_array_cI19eap_expanded_type_cE @ 244 NONAME
+	_ZN14CEapConversion30ConvertInternalTypesToEAPTypesEP18abs_eap_am_tools_cPK11eap_array_cI19eap_expanded_type_cEP6RArrayIjE @ 245 NONAME
+	_ZN14CEapConversion32ConvertEAPSettingsToInternalTypeEP18abs_eap_am_tools_cPK11EAPSettingsP21eap_method_settings_c @ 246 NONAME
+	_ZN14CEapConversion32ConvertInternalTypeToEAPSettingsEP18abs_eap_am_tools_cPK21eap_method_settings_cP11EAPSettings @ 247 NONAME
+	_ZN14CEapConversion33ConvertCertificatesToInternalTypeEP18abs_eap_am_tools_cPK13RPointerArrayI19EapCertificateEntryEP11eap_array_cI23eap_certificate_entry_cE @ 248 NONAME
+	_ZN14CEapConversion33ConvertCipherSuitesToInternalTypeEP18abs_eap_am_tools_cPK6RArrayIjEP11eap_array_cItE @ 249 NONAME
+	_ZN14CEapConversion33ConvertInternalTypeToCertificatesEP18abs_eap_am_tools_cN23eap_certificate_entry_c22eap_certificate_type_eEPK11eap_array_cIS2_EP13RPointerArrayI19EapCertificateEntryE @ 250 NONAME
+	_ZN14CEapConversion33ConvertInternalTypeToCipherSuitesEP18abs_eap_am_tools_cPK11eap_array_cItEP6RArrayIjE @ 251 NONAME
+	_ZN14CEapConversion36ConvertExpandedEAPTypeToInternalTypeEPK16TEapExpandedTypeP19eap_expanded_type_c @ 252 NONAME
+	_ZN14CEapConversion36ConvertInternalTypeToExpandedEAPTypeEPK19eap_expanded_type_cP16TEapExpandedType @ 253 NONAME
+	_ZN14CEapConversion38ConvertExpandedEAPTypesToInternalTypesEP18abs_eap_am_tools_cPK6RArrayI16TEapExpandedTypeEP11eap_array_cI19eap_expanded_type_cE @ 254 NONAME
+	_ZN14CEapConversion38ConvertInternalTypesToExpandedEAPTypesEP18abs_eap_am_tools_cPK11eap_array_cI19eap_expanded_type_cEP6RArrayI16TEapExpandedTypeE @ 255 NONAME
+	_ZN14eap_am_tools_c10trace_dataEPKcPKvm @ 256 NONAME
+	_ZN14eap_am_tools_c11compare_u64Eyy @ 257 NONAME
+	_ZN14eap_am_tools_c12multiply_u64Eyy @ 258 NONAME
+	_ZN14eap_am_tools_c14ascii_to_octetEl @ 259 NONAME
+	_ZN14eap_am_tools_c14create_uuid_v5EPKvmS1_mP19eap_variable_data_c @ 260 NONAME
+	_ZN14eap_am_tools_c14octet_to_asciiEl @ 261 NONAME
+	_ZN14eap_am_tools_c14set_trace_maskEm @ 262 NONAME
+	_ZN14eap_am_tools_c17eap_status_returnEb12eap_status_ePKcl @ 263 NONAME
+	_ZN14eap_am_tools_c17shutdown_am_toolsEv @ 264 NONAME
+	_ZN14eap_am_tools_c18get_thread_stoppedEv @ 265 NONAME
+	_ZN14eap_am_tools_c19get_use_timer_queueEv @ 266 NONAME
+	_ZN14eap_am_tools_c19set_use_timer_queueEv @ 267 NONAME
+	_ZN14eap_am_tools_c19trace_configurationE12eap_status_ePK25eap_configuration_field_cPK19eap_variable_data_c @ 268 NONAME
+	_ZN14eap_am_tools_c20number_string_to_u32EPKhmPm @ 269 NONAME
+	_ZN14eap_am_tools_c20octet_to_ascii_armorEh @ 270 NONAME
+	_ZN14eap_am_tools_c21memory_store_add_dataEPK19eap_variable_data_cP22eap_tlv_message_data_cm @ 271 NONAME
+	_ZN14eap_am_tools_c21memory_store_get_dataEPK19eap_variable_data_cP22eap_tlv_message_data_c @ 272 NONAME
+	_ZN14eap_am_tools_c21timer_thread_functionEv @ 273 NONAME
+	_ZN14eap_am_tools_c22octet_from_ascii_armorEh @ 274 NONAME
+	_ZN14eap_am_tools_c24memory_store_remove_dataEPK19eap_variable_data_c @ 275 NONAME
+	_ZN14eap_am_tools_c26convert_ascii_to_uppercaseEPhm @ 276 NONAME
+	_ZN14eap_am_tools_c26convert_bytes_to_hex_asciiEPKhmPhPm @ 277 NONAME
+	_ZN14eap_am_tools_c26convert_bytes_to_hex_asciiEPKvmP19eap_variable_data_c @ 278 NONAME
+	_ZN14eap_am_tools_c26convert_hex_ascii_to_bytesEPKhmPhPm @ 279 NONAME
+	_ZN14eap_am_tools_c26convert_hex_ascii_to_bytesEPKvmP19eap_variable_data_c @ 280 NONAME
+	_ZN14eap_am_tools_c27set_activate_trace_on_errorEv @ 281 NONAME
+	_ZN14eap_am_tools_c28convert_bytes_to_ascii_armorEPKhmPhPm @ 282 NONAME
+	_ZN14eap_am_tools_c29check_activate_trace_on_errorEv @ 283 NONAME
+	_ZN14eap_am_tools_c29eap_status_return_file_numberEb12eap_status_emml @ 284 NONAME
+	_ZN14eap_am_tools_c30restore_bytes_from_ascii_armorEPKhmPhPm @ 285 NONAME
+	_ZN14eap_am_tools_c31create_uuid_v5_from_mac_addressEPKhmP19eap_variable_data_c @ 286 NONAME
+	_ZN14eap_am_tools_c31generic_convert_unicode_to_utf8ER19eap_variable_data_cRKS0_ @ 287 NONAME
+	_ZN14eap_am_tools_c31generic_convert_utf8_to_unicodeER19eap_variable_data_cRKS0_ @ 288 NONAME
+	_ZN14eap_am_tools_c35get_use_seconds_timestamp_in_tracesEv @ 289 NONAME
+	_ZN14eap_am_tools_c37convert_selected_bytes_to_ascii_armorEhPmPhS1_S0_b @ 290 NONAME
+	_ZN14eap_am_tools_c39restore_selected_bytes_from_ascii_armorEhPmPhS0_b @ 291 NONAME
+	_ZN14eap_am_tools_c7xor_u64Eyy @ 292 NONAME
+	_ZN14eap_am_tools_c9parse_naiEPK19eap_variable_data_cPS0_S3_ @ 293 NONAME
+	_ZN14eap_am_tools_cC2Ev @ 294 NONAME
+	_ZN14eap_am_tools_cD0Ev @ 295 NONAME
+	_ZN14eap_am_tools_cD1Ev @ 296 NONAME
+	_ZN14eap_am_tools_cD2Ev @ 297 NONAME
+	_ZN15EapMessageQueue10AddMessageE12TEapRequestsPKvj @ 298 NONAME
+	_ZN15EapMessageQueue15GetFirstMessageEv @ 299 NONAME
+	_ZN15EapMessageQueue18DeleteFirstMessageEv @ 300 NONAME
+	_ZN15EapMessageQueueC1EP18abs_eap_am_tools_c @ 301 NONAME
+	_ZN15EapMessageQueueC2EP18abs_eap_am_tools_c @ 302 NONAME
+	_ZN15EapMessageQueueD0Ev @ 303 NONAME
+	_ZN15EapMessageQueueD1Ev @ 304 NONAME
+	_ZN15EapMessageQueueD2Ev @ 305 NONAME
+	_ZN15crypto_random_c12get_is_validEv @ 306 NONAME
+	_ZN15crypto_random_c12set_is_validEv @ 307 NONAME
+	_ZN15crypto_random_c13add_rand_seedEPKvm @ 308 NONAME
+	_ZN15crypto_random_c14get_rand_bytesEP19eap_variable_data_cm @ 309 NONAME
+	_ZN15crypto_random_c14get_rand_bytesEPvm @ 310 NONAME
+	_ZN15crypto_random_c16get_rand_integerEmm @ 311 NONAME
+	_ZN15crypto_random_c22add_rand_seed_hw_ticksEv @ 312 NONAME
+	_ZN15crypto_random_cC1EP18abs_eap_am_tools_c @ 313 NONAME
+	_ZN15crypto_random_cC2EP18abs_eap_am_tools_c @ 314 NONAME
+	_ZN15crypto_random_cD0Ev @ 315 NONAME
+	_ZN15crypto_random_cD1Ev @ 316 NONAME
+	_ZN15crypto_random_cD2Ev @ 317 NONAME
+	_ZN15eap_base_type_c16get_type_partnerEv @ 318 NONAME
+	_ZN15eap_base_type_c31object_decrease_reference_countEv @ 319 NONAME
+	_ZN15eap_base_type_c31object_increase_reference_countEv @ 320 NONAME
+	_ZN15eap_base_type_cC2EP18abs_eap_am_tools_cP19abs_eap_base_type_c @ 321 NONAME
+	_ZN15eap_base_type_cD0Ev @ 322 NONAME
+	_ZN15eap_base_type_cD1Ev @ 323 NONAME
+	_ZN15eap_base_type_cD2Ev @ 324 NONAME
+	_ZN15eap_header_rd_cC1EP18abs_eap_am_tools_cPhm @ 325 NONAME
+	_ZN15eap_header_rd_cC2EP18abs_eap_am_tools_cPhm @ 326 NONAME
+	_ZN15eap_header_rd_cD0Ev @ 327 NONAME
+	_ZN15eap_header_rd_cD1Ev @ 328 NONAME
+	_ZN15eap_header_rd_cD2Ev @ 329 NONAME
+	_ZN15eap_header_wr_c12reset_headerEtb @ 330 NONAME
+	_ZN15eap_header_wr_cC1EP18abs_eap_am_tools_cPhm @ 331 NONAME
+	_ZN15eap_header_wr_cC2EP18abs_eap_am_tools_cPhm @ 332 NONAME
+	_ZN15eap_header_wr_cD0Ev @ 333 NONAME
+	_ZN15eap_header_wr_cD1Ev @ 334 NONAME
+	_ZN15eap_header_wr_cD2Ev @ 335 NONAME
+	_ZN16EapMessageBuffer8CopyDataE12TEapRequestsPKvj @ 336 NONAME
+	_ZN16EapMessageBufferC1EP18abs_eap_am_tools_c @ 337 NONAME
+	_ZN16EapMessageBufferC2EP18abs_eap_am_tools_c @ 338 NONAME
+	_ZN16EapMessageBufferD0Ev @ 339 NONAME
+	_ZN16EapMessageBufferD1Ev @ 340 NONAME
+	_ZN16EapMessageBufferD2Ev @ 341 NONAME
+	_ZN16EapServerStrings20GetEapRequestsStringE12TEapRequests @ 342 NONAME
+	_ZN16EapServerStrings20GetEapRequestsStringEi @ 343 NONAME
+	_ZN16EapServerStringsC1Ev @ 344 NONAME
+	_ZN16EapServerStringsC2Ev @ 345 NONAME
+	_ZN16EapServerStringsD0Ev @ 346 NONAME
+	_ZN16EapServerStringsD1Ev @ 347 NONAME
+	_ZN16EapServerStringsD2Ev @ 348 NONAME
+	_ZN16TEapExpandedType8SetValueEPKvj @ 349 NONAME
+	_ZN16TEapExpandedType8SetValueEjj @ 350 NONAME
+	_ZN16TEapExpandedTypeC1EPKS_ @ 351 NONAME
+	_ZN16TEapExpandedTypeC1ERK6TBufC8ILi8EE @ 352 NONAME
+	_ZN16TEapExpandedTypeC1ERK6TDesC8 @ 353 NONAME
+	_ZN16TEapExpandedTypeC1ERKS_ @ 354 NONAME
+	_ZN16TEapExpandedTypeC1Ev @ 355 NONAME
+	_ZN16TEapExpandedTypeC2EPKS_ @ 356 NONAME
+	_ZN16TEapExpandedTypeC2ERK6TBufC8ILi8EE @ 357 NONAME
+	_ZN16TEapExpandedTypeC2ERK6TDesC8 @ 358 NONAME
+	_ZN16TEapExpandedTypeC2ERKS_ @ 359 NONAME
+	_ZN16TEapExpandedTypeC2Ev @ 360 NONAME
+	_ZN16TEapExpandedTypeD0Ev @ 361 NONAME
+	_ZN16TEapExpandedTypeD1Ev @ 362 NONAME
+	_ZN16TEapExpandedTypeD2Ev @ 363 NONAME
+	_ZN16TEapExpandedTypeaSERK6TBufC8ILi8EE @ 364 NONAME
+	_ZN16TEapExpandedTypeaSERK6TDesC8 @ 365 NONAME
+	_ZN16TEapExpandedTypeaSERKS_ @ 366 NONAME
+	_ZN16crypto_nt_hash_c12get_is_validEv @ 367 NONAME
+	_ZN16crypto_nt_hash_c14get_master_keyEPK19eap_variable_data_cS2_PS0_m @ 368 NONAME
+	_ZN16crypto_nt_hash_c16nt_password_hashEPK19eap_variable_data_cPS0_m @ 369 NONAME
+	_ZN16crypto_nt_hash_c20get_new_key_from_shaEPK19eap_variable_data_cS2_PS0_m @ 370 NONAME
+	_ZN16crypto_nt_hash_c21hash_nt_password_hashEPK19eap_variable_data_cPS0_m @ 371 NONAME
+	_ZN16crypto_nt_hash_c24get_asymmetric_start_keyEPK19eap_variable_data_cPS0_mbb @ 372 NONAME
+	_ZN16crypto_nt_hash_cC1EP18abs_eap_am_tools_c @ 373 NONAME
+	_ZN16crypto_nt_hash_cC2EP18abs_eap_am_tools_c @ 374 NONAME
+	_ZN16crypto_nt_hash_cD0Ev @ 375 NONAME
+	_ZN16crypto_nt_hash_cD1Ev @ 376 NONAME
+	_ZN16crypto_nt_hash_cD2Ev @ 377 NONAME
+	_ZN16crypto_sha_256_c10hash_finalEPvPm @ 378 NONAME
+	_ZN16crypto_sha_256_c11hash_updateEPKvm @ 379 NONAME
+	_ZN16crypto_sha_256_c12copy_contextEPK19eap_variable_data_c @ 380 NONAME
+	_ZN16crypto_sha_256_c12get_is_validEv @ 381 NONAME
+	_ZN16crypto_sha_256_c12hash_cleanupEv @ 382 NONAME
+	_ZN16crypto_sha_256_c12set_is_validEv @ 383 NONAME
+	_ZN16crypto_sha_256_c14get_block_sizeEv @ 384 NONAME
+	_ZN16crypto_sha_256_c14set_is_invalidEv @ 385 NONAME
+	_ZN16crypto_sha_256_c17get_digest_lengthEv @ 386 NONAME
+	_ZN16crypto_sha_256_c4copyEv @ 387 NONAME
+	_ZN16crypto_sha_256_c9hash_initEv @ 388 NONAME
+	_ZN16crypto_sha_256_cC1EP18abs_eap_am_tools_c @ 389 NONAME
+	_ZN16crypto_sha_256_cC2EP18abs_eap_am_tools_c @ 390 NONAME
+	_ZN16crypto_sha_256_cD0Ev @ 391 NONAME
+	_ZN16crypto_sha_256_cD1Ev @ 392 NONAME
+	_ZN16crypto_sha_256_cD2Ev @ 393 NONAME
+	_ZN16crypto_tls_prf_c12get_is_validEv @ 394 NONAME
+	_ZN16crypto_tls_prf_c12set_is_validEv @ 395 NONAME
+	_ZN16crypto_tls_prf_c12tls_prf_initEPK19eap_variable_data_cS2_S2_ @ 396 NONAME
+	_ZN16crypto_tls_prf_c14set_is_invalidEv @ 397 NONAME
+	_ZN16crypto_tls_prf_c14tls_prf_outputEPvm @ 398 NONAME
+	_ZN16crypto_tls_prf_c15tls_prf_cleanupEv @ 399 NONAME
+	_ZN16crypto_tls_prf_cC1EP18abs_eap_am_tools_c @ 400 NONAME
+	_ZN16crypto_tls_prf_cC2EP18abs_eap_am_tools_c @ 401 NONAME
+	_ZN16crypto_tls_prf_cD0Ev @ 402 NONAME
+	_ZN16crypto_tls_prf_cD1Ev @ 403 NONAME
+	_ZN16crypto_tls_prf_cD2Ev @ 404 NONAME
+	_ZN16eap_tlv_header_c12reset_headerEmm @ 405 NONAME
+	_ZN16eap_tlv_header_c16set_value_lengthEm @ 406 NONAME
+	_ZN16eap_tlv_header_c17get_header_lengthEv @ 407 NONAME
+	_ZN16eap_tlv_header_c8set_typeEm @ 408 NONAME
+	_ZN16eap_tlv_header_cC1EP18abs_eap_am_tools_cPvm @ 409 NONAME
+	_ZN16eap_tlv_header_cC2EP18abs_eap_am_tools_cPvm @ 410 NONAME
+	_ZN16eap_tlv_header_cD0Ev @ 411 NONAME
+	_ZN16eap_tlv_header_cD1Ev @ 412 NONAME
+	_ZN16eap_tlv_header_cD2Ev @ 413 NONAME
+	_ZN17crypto_3des_ede_c12get_encryptsEv @ 414 NONAME
+	_ZN17crypto_3des_ede_c12get_is_validEv @ 415 NONAME
+	_ZN17crypto_3des_ede_c12set_is_validEv @ 416 NONAME
+	_ZN17crypto_3des_ede_c13decrypt_blockEPKvPvm @ 417 NONAME
+	_ZN17crypto_3des_ede_c13encrypt_blockEPKvPvm @ 418 NONAME
+	_ZN17crypto_3des_ede_c14get_block_sizeEv @ 419 NONAME
+	_ZN17crypto_3des_ede_c14get_key_lengthEv @ 420 NONAME
+	_ZN17crypto_3des_ede_c18set_decryption_keyEPKvm @ 421 NONAME
+	_ZN17crypto_3des_ede_c18set_encryption_keyEPKvm @ 422 NONAME
+	_ZN17crypto_3des_ede_cC1EP18abs_eap_am_tools_c @ 423 NONAME
+	_ZN17crypto_3des_ede_cC2EP18abs_eap_am_tools_c @ 424 NONAME
+	_ZN17crypto_3des_ede_cD0Ev @ 425 NONAME
+	_ZN17crypto_3des_ede_cD1Ev @ 426 NONAME
+	_ZN17crypto_3des_ede_cD2Ev @ 427 NONAME
+	_ZN17crypto_aes_wrap_c12get_encryptsEv @ 428 NONAME
+	_ZN17crypto_aes_wrap_c12get_is_validEv @ 429 NONAME
+	_ZN17crypto_aes_wrap_c12set_is_validEv @ 430 NONAME
+	_ZN17crypto_aes_wrap_c13decrypt_blockEPKvmPvm @ 431 NONAME
+	_ZN17crypto_aes_wrap_c13encrypt_blockEPKvmPvm @ 432 NONAME
+	_ZN17crypto_aes_wrap_c14get_block_sizeEv @ 433 NONAME
+	_ZN17crypto_aes_wrap_c14get_key_lengthEv @ 434 NONAME
+	_ZN17crypto_aes_wrap_c17add_padding_bytesEPvm @ 435 NONAME
+	_ZN17crypto_aes_wrap_c18set_decryption_keyEPKvm @ 436 NONAME
+	_ZN17crypto_aes_wrap_c18set_encryption_keyEPKvm @ 437 NONAME
+	_ZN17crypto_aes_wrap_cC1EP18abs_eap_am_tools_c @ 438 NONAME
+	_ZN17crypto_aes_wrap_cC2EP18abs_eap_am_tools_c @ 439 NONAME
+	_ZN17crypto_aes_wrap_cD0Ev @ 440 NONAME
+	_ZN17crypto_aes_wrap_cD1Ev @ 441 NONAME
+	_ZN17crypto_aes_wrap_cD2Ev @ 442 NONAME
+	_ZN17eap_file_config_c10read_u32_tEPhPKhPm @ 443 NONAME
+	_ZN17eap_file_config_c11get_subsectEP23abs_eap_am_file_input_cP19eap_variable_data_c @ 444 NONAME
+	_ZN17eap_file_config_c12read_sectionEP23abs_eap_am_file_input_cP14eap_core_map_cI18eap_config_value_c18abs_eap_core_map_c19eap_variable_data_cE @ 445 NONAME
+	_ZN17eap_file_config_c13convert_valueEP14eap_core_map_cI18eap_config_value_c18abs_eap_core_map_c19eap_variable_data_cEPKS3_20eap_configure_type_ePS3_ @ 446 NONAME
+	_ZN17eap_file_config_c13read_hex_byteEPhPKhS0_ @ 447 NONAME
+	_ZN17eap_file_config_c13remove_spacesEP19eap_variable_data_c @ 448 NONAME
+	_ZN17eap_file_config_c14cnf_get_stringEPK19eap_variable_data_cPS0_S3_P20eap_configure_type_e @ 449 NONAME
+	_ZN17eap_file_config_c14file_read_lineEP23abs_eap_am_file_input_cP19eap_variable_data_c @ 450 NONAME
+	_ZN17eap_file_config_c14read_configureEP14eap_core_map_cI18eap_config_value_c18abs_eap_core_map_c19eap_variable_data_cEPK25eap_configuration_field_cPS3_P20eap_configure_type_eb @ 451 NONAME
+	_ZN17eap_file_config_c14read_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 452 NONAME
+	_ZN17eap_file_config_c14read_configureEPK25eap_configuration_field_cP19eap_variable_data_cP14eap_core_map_cI18eap_config_value_c18abs_eap_core_map_cS3_Eb @ 453 NONAME
+	_ZN17eap_file_config_c15cnf_parse_valueEPK19eap_variable_data_cS2_P20eap_configure_type_ePS0_b @ 454 NONAME
+	_ZN17eap_file_config_c15store_configureEP23abs_eap_am_file_input_cPK19eap_variable_data_cP14eap_core_map_cI18eap_config_value_c18abs_eap_core_map_cS2_E @ 455 NONAME
+	_ZN17eap_file_config_c16read_subsectionsEP23abs_eap_am_file_input_cP14eap_core_map_cI18eap_config_value_c18abs_eap_core_map_c19eap_variable_data_cE @ 456 NONAME
+	_ZN17eap_file_config_c21remove_leading_spacesEP19eap_variable_data_c @ 457 NONAME
+	_ZN17eap_file_config_c26read_configuration_messageEPK19eap_variable_data_c @ 458 NONAME
+	_ZN17eap_file_config_c28expand_environment_variablesEP14eap_core_map_cI18eap_config_value_c18abs_eap_core_map_c19eap_variable_data_cEPKS3_PS3_ @ 459 NONAME
+	_ZN17eap_file_config_c9configureEP23abs_eap_am_file_input_c @ 460 NONAME
+	_ZN17eap_file_config_cC1EP18abs_eap_am_tools_c @ 461 NONAME
+	_ZN17eap_file_config_cC2EP18abs_eap_am_tools_c @ 462 NONAME
+	_ZN17eap_file_config_cD0Ev @ 463 NONAME
+	_ZN17eap_file_config_cD1Ev @ 464 NONAME
+	_ZN17eap_file_config_cD2Ev @ 465 NONAME
+	_ZN17eap_header_base_c10set_lengthEtb @ 466 NONAME
+	_ZN17eap_header_base_c14set_identifierEh @ 467 NONAME
+	_ZN17eap_header_base_c17get_header_lengthEv @ 468 NONAME
+	_ZN17eap_header_base_c20set_type_data_lengthEtb @ 469 NONAME
+	_ZN17eap_header_base_c26get_ietf_type_field_lengthEv @ 470 NONAME
+	_ZN17eap_header_base_c26get_type_data_start_offsetEb @ 471 NONAME
+	_ZN17eap_header_base_c29get_expanded_ietf_type_offsetEv @ 472 NONAME
+	_ZN17eap_header_base_c29get_expanded_vendor_id_offsetEv @ 473 NONAME
+	_ZN17eap_header_base_c30get_expanded_type_field_lengthEv @ 474 NONAME
+	_ZN17eap_header_base_c31get_expanded_vendor_type_offsetEv @ 475 NONAME
+	_ZN17eap_header_base_c8set_codeE16eap_code_value_e @ 476 NONAME
+	_ZN17eap_header_base_c8set_typeE19eap_expanded_type_cb @ 477 NONAME
+	_ZN17eap_header_base_cC1EP18abs_eap_am_tools_cPvm @ 478 NONAME
+	_ZN17eap_header_base_cC2EP18abs_eap_am_tools_cPvm @ 479 NONAME
+	_ZN17eap_header_base_cD0Ev @ 480 NONAME
+	_ZN17eap_header_base_cD1Ev @ 481 NONAME
+	_ZN17eap_header_base_cD2Ev @ 482 NONAME
+	_ZN17eapol_header_rd_cC1EP18abs_eap_am_tools_cPhm @ 483 NONAME
+	_ZN17eapol_header_rd_cC2EP18abs_eap_am_tools_cPhm @ 484 NONAME
+	_ZN17eapol_header_rd_cD0Ev @ 485 NONAME
+	_ZN17eapol_header_rd_cD1Ev @ 486 NONAME
+	_ZN17eapol_header_rd_cD2Ev @ 487 NONAME
+	_ZN17eapol_header_wr_c12reset_headerEt @ 488 NONAME
+	_ZN17eapol_header_wr_c14get_eap_headerEv @ 489 NONAME
+	_ZN17eapol_header_wr_cC1EP18abs_eap_am_tools_cPhm @ 490 NONAME
+	_ZN17eapol_header_wr_cC2EP18abs_eap_am_tools_cPhm @ 491 NONAME
+	_ZN17eapol_header_wr_cD0Ev @ 492 NONAME
+	_ZN17eapol_header_wr_cD1Ev @ 493 NONAME
+	_ZN17eapol_header_wr_cD2Ev @ 494 NONAME
+	_ZN18abs_eap_am_mutex_cC2Ev @ 495 NONAME
+	_ZN18abs_eap_am_mutex_cD0Ev @ 496 NONAME
+	_ZN18abs_eap_am_mutex_cD1Ev @ 497 NONAME
+	_ZN18abs_eap_am_mutex_cD2Ev @ 498 NONAME
+	_ZN18abs_eap_am_tools_c22new_abs_eap_am_tools_cEv @ 499 NONAME
+	_ZN18abs_eap_am_tools_c25delete_abs_eap_am_tools_cEPS_ @ 500 NONAME
+	_ZN18eap_buf_chain_rd_c17force_inheritanceEv @ 501 NONAME
+	_ZN18eap_buf_chain_rd_cC1E17eap_read_buffer_eP18abs_eap_am_tools_cPKhmb @ 502 NONAME
+	_ZN18eap_buf_chain_rd_cC1E17eap_read_buffer_eP18abs_eap_am_tools_cm @ 503 NONAME
+	_ZN18eap_buf_chain_rd_cC2E17eap_read_buffer_eP18abs_eap_am_tools_cPKhmb @ 504 NONAME
+	_ZN18eap_buf_chain_rd_cC2E17eap_read_buffer_eP18abs_eap_am_tools_cm @ 505 NONAME
+	_ZN18eap_buf_chain_rd_cD0Ev @ 506 NONAME
+	_ZN18eap_buf_chain_rd_cD1Ev @ 507 NONAME
+	_ZN18eap_buf_chain_rd_cD2Ev @ 508 NONAME
+	_ZN18eap_buf_chain_wr_c17force_inheritanceEv @ 509 NONAME
+	_ZN18eap_buf_chain_wr_c19get_ethernet_headerEv @ 510 NONAME
+	_ZN18eap_buf_chain_wr_c4copyEv @ 511 NONAME
+	_ZN18eap_buf_chain_wr_cC1E18eap_write_buffer_eP18abs_eap_am_tools_c @ 512 NONAME
+	_ZN18eap_buf_chain_wr_cC1E18eap_write_buffer_eP18abs_eap_am_tools_cPhmbbm @ 513 NONAME
+	_ZN18eap_buf_chain_wr_cC1E18eap_write_buffer_eP18abs_eap_am_tools_cm @ 514 NONAME
+	_ZN18eap_buf_chain_wr_cC2E18eap_write_buffer_eP18abs_eap_am_tools_c @ 515 NONAME
+	_ZN18eap_buf_chain_wr_cC2E18eap_write_buffer_eP18abs_eap_am_tools_cPhmbbm @ 516 NONAME
+	_ZN18eap_buf_chain_wr_cC2E18eap_write_buffer_eP18abs_eap_am_tools_cm @ 517 NONAME
+	_ZN18eap_buf_chain_wr_cD0Ev @ 518 NONAME
+	_ZN18eap_buf_chain_wr_cD1Ev @ 519 NONAME
+	_ZN18eap_buf_chain_wr_cD2Ev @ 520 NONAME
+	_ZN18eap_config_value_c14get_subsectionEv @ 521 NONAME
+	_ZN18eap_config_value_c14set_subsectionEP14eap_core_map_cIS_18abs_eap_core_map_c19eap_variable_data_cE @ 522 NONAME
+	_ZN18eap_config_value_c31object_increase_reference_countEv @ 523 NONAME
+	_ZN18eap_config_value_c8get_dataEv @ 524 NONAME
+	_ZN18eap_config_value_c8get_typeEv @ 525 NONAME
+	_ZN18eap_config_value_c8set_typeE20eap_configure_type_e @ 526 NONAME
+	_ZN18eap_config_value_cC1EP18abs_eap_am_tools_c @ 527 NONAME
+	_ZN18eap_config_value_cC2EP18abs_eap_am_tools_c @ 528 NONAME
+	_ZN18eap_config_value_cD0Ev @ 529 NONAME
+	_ZN18eap_config_value_cD1Ev @ 530 NONAME
+	_ZN18eap_config_value_cD2Ev @ 531 NONAME
+	_ZN18eap_session_core_c11get_partnerEv @ 532 NONAME
+	_ZN18eap_session_core_c11load_moduleE19eap_expanded_type_cS0_P19abs_eap_base_type_cPP15eap_base_type_cbPK19eap_am_network_id_c @ 533 NONAME
+	_ZN18eap_session_core_c11packet_sendEPK19eap_am_network_id_cP18eap_buf_chain_wr_cmmm @ 534 NONAME
+	_ZN18eap_session_core_c12add_rogue_apER11eap_array_cI20eap_rogue_ap_entry_cE @ 535 NONAME
+	_ZN18eap_session_core_c12cancel_timerEP20abs_eap_base_timer_cm @ 536 NONAME
+	_ZN18eap_session_core_c12get_is_validEv @ 537 NONAME
+	_ZN18eap_session_core_c12set_is_validEv @ 538 NONAME
+	_ZN18eap_session_core_c13timer_expiredEmPv @ 539 NONAME
+	_ZN18eap_session_core_c13unload_moduleE19eap_expanded_type_c @ 540 NONAME
+	_ZN18eap_session_core_c14packet_processEPK19eap_am_network_id_cP25eap_general_header_base_cm @ 541 NONAME
+	_ZN18eap_session_core_c14read_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 542 NONAME
+	_ZN18eap_session_core_c15eap_acknowledgeEPK19eap_am_network_id_c @ 543 NONAME
+	_ZN18eap_session_core_c15write_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 544 NONAME
+	_ZN18eap_session_core_c17get_eap_type_listEP11eap_array_cI19eap_expanded_type_cE @ 545 NONAME
+	_ZN18eap_session_core_c17get_header_offsetEPmS0_ @ 546 NONAME
+	_ZN18eap_session_core_c17timer_delete_dataEmPv @ 547 NONAME
+	_ZN18eap_session_core_c18create_eap_sessionEPK19eap_am_network_id_c @ 548 NONAME
+	_ZN18eap_session_core_c18create_new_sessionEPK19eap_am_network_id_c @ 549 NONAME
+	_ZN18eap_session_core_c18remove_eap_sessionEbPK19eap_am_network_id_c @ 550 NONAME
+	_ZN18eap_session_core_c18shutdown_operationEP10eap_core_cP18abs_eap_am_tools_c @ 551 NONAME
+	_ZN18eap_session_core_c18state_notificationEPK28abs_eap_state_notification_c @ 552 NONAME
+	_ZN18eap_session_core_c19set_session_timeoutEm @ 553 NONAME
+	_ZN18eap_session_core_c22restart_authenticationEPK19eap_am_network_id_cb @ 554 NONAME
+	_ZN18eap_session_core_c22restart_authenticationEPK19eap_am_network_id_cbbb @ 555 NONAME
+	_ZN18eap_session_core_c23cancel_all_eap_sessionsEv @ 556 NONAME
+	_ZN18eap_session_core_c23check_is_valid_eap_typeE19eap_expanded_type_c @ 557 NONAME
+	_ZN18eap_session_core_c23packet_data_crypto_keysEPK19eap_am_network_id_cPK24eap_master_session_key_c @ 558 NONAME
+	_ZN18eap_session_core_c23reset_or_remove_sessionEPP10eap_core_cPK25eap_network_id_selector_cb @ 559 NONAME
+	_ZN18eap_session_core_c25send_eap_identity_requestEPK19eap_am_network_id_c @ 560 NONAME
+	_ZN18eap_session_core_c30get_802_11_authentication_modeEPK19eap_am_network_id_c31eapol_key_authentication_type_ePK19eap_variable_data_cS6_ @ 561 NONAME
+	_ZN18eap_session_core_c33set_eap_database_reference_valuesEPK19eap_variable_data_c @ 562 NONAME
+	_ZN18eap_session_core_c5resetEv @ 563 NONAME
+	_ZN18eap_session_core_c8shutdownEv @ 564 NONAME
+	_ZN18eap_session_core_c9configureEv @ 565 NONAME
+	_ZN18eap_session_core_c9set_timerEP20abs_eap_base_timer_cmPvm @ 566 NONAME
+	_ZN18eap_session_core_cC1EP18abs_eap_am_tools_cP22abs_eap_session_core_cb @ 567 NONAME
+	_ZN18eap_session_core_cC2EP18abs_eap_am_tools_cP22abs_eap_session_core_cb @ 568 NONAME
+	_ZN18eap_session_core_cD0Ev @ 569 NONAME
+	_ZN18eap_session_core_cD1Ev @ 570 NONAME
+	_ZN18eap_session_core_cD2Ev @ 571 NONAME
+	_ZN19EapCertificateEntry10SetIsValidEi @ 572 NONAME
+	_ZN19EapCertificateEntry11SetCertTypeERKNS_9TCertTypeE @ 573 NONAME
+	_ZN19EapCertificateEntry12SetIsEnabledEi @ 574 NONAME
+	_ZN19EapCertificateEntry13SetIssuerNameERK4TBufILi255EE @ 575 NONAME
+	_ZN19EapCertificateEntry13SetThumbprintERK4TBufILi64EE @ 576 NONAME
+	_ZN19EapCertificateEntry14SetPrimaryNameERK4TBufILi64EE @ 577 NONAME
+	_ZN19EapCertificateEntry14SetSubjectNameERK4TBufILi255EE @ 578 NONAME
+	_ZN19EapCertificateEntry15SetLabelPresentEv @ 579 NONAME
+	_ZN19EapCertificateEntry15SetSerialNumberERK4TBufILi255EE @ 580 NONAME
+	_ZN19EapCertificateEntry15SetSubjectKeyIdERK5TBuf8ILi20EE @ 581 NONAME
+	_ZN19EapCertificateEntry16GetLabelWritableEv @ 582 NONAME
+	_ZN19EapCertificateEntry16SetSecondaryNameERK4TBufILi64EE @ 583 NONAME
+	_ZN19EapCertificateEntry19SetIsEnabledPresentEv @ 584 NONAME
+	_ZN19EapCertificateEntry20SetIssuerNamePresentEv @ 585 NONAME
+	_ZN19EapCertificateEntry20SetThumbprintPresentEv @ 586 NONAME
+	_ZN19EapCertificateEntry21GetIssuerNameWritableEv @ 587 NONAME
+	_ZN19EapCertificateEntry21GetThumbprintWritableEv @ 588 NONAME
+	_ZN19EapCertificateEntry21SetPrimaryNamePresentEv @ 589 NONAME
+	_ZN19EapCertificateEntry21SetSubjectNamePresentEv @ 590 NONAME
+	_ZN19EapCertificateEntry22GetPrimaryNameWritableEv @ 591 NONAME
+	_ZN19EapCertificateEntry22GetSubjectNameWritableEv @ 592 NONAME
+	_ZN19EapCertificateEntry22SetSerialNumberPresentEv @ 593 NONAME
+	_ZN19EapCertificateEntry22SetSubjectKeyIdPresentEv @ 594 NONAME
+	_ZN19EapCertificateEntry23GetSerialNumberWritableEv @ 595 NONAME
+	_ZN19EapCertificateEntry23GetSubjectKeyIdWritableEv @ 596 NONAME
+	_ZN19EapCertificateEntry23SetSecondaryNamePresentEv @ 597 NONAME
+	_ZN19EapCertificateEntry24GetSecondaryNameWritableEv @ 598 NONAME
+	_ZN19EapCertificateEntry4CopyEv @ 599 NONAME
+	_ZN19EapCertificateEntry8SetLabelERK4TBufILi64EE @ 600 NONAME
+	_ZN19EapCertificateEntryC1Ev @ 601 NONAME
+	_ZN19EapCertificateEntryC2Ev @ 602 NONAME
+	_ZN19EapCertificateEntryD0Ev @ 603 NONAME
+	_ZN19EapCertificateEntryD1Ev @ 604 NONAME
+	_ZN19EapCertificateEntryD2Ev @ 605 NONAME
+	_ZN19EapCertificateEntryaSERKS_ @ 606 NONAME
+	_ZN19eap_am_crypto_md4_c10hash_finalEPvPm @ 607 NONAME
+	_ZN19eap_am_crypto_md4_c11hash_updateEPKvm @ 608 NONAME
+	_ZN19eap_am_crypto_md4_c12copy_contextEPK19eap_variable_data_cyPKmS4_ @ 609 NONAME
+	_ZN19eap_am_crypto_md4_c12get_is_validEv @ 610 NONAME
+	_ZN19eap_am_crypto_md4_c12hash_cleanupEv @ 611 NONAME
+	_ZN19eap_am_crypto_md4_c12set_is_validEv @ 612 NONAME
+	_ZN19eap_am_crypto_md4_c14get_block_sizeEv @ 613 NONAME
+	_ZN19eap_am_crypto_md4_c14set_is_invalidEv @ 614 NONAME
+	_ZN19eap_am_crypto_md4_c17get_digest_lengthEv @ 615 NONAME
+	_ZN19eap_am_crypto_md4_c19copy_message_digestEPvPm @ 616 NONAME
+	_ZN19eap_am_crypto_md4_c20eap_md4_process_dataEPKmm @ 617 NONAME
+	_ZN19eap_am_crypto_md4_c28eap_md4_transform_host_orderEPKmm @ 618 NONAME
+	_ZN19eap_am_crypto_md4_c4copyEv @ 619 NONAME
+	_ZN19eap_am_crypto_md4_c9hash_initEv @ 620 NONAME
+	_ZN19eap_am_crypto_md4_cC1EP18abs_eap_am_tools_c @ 621 NONAME
+	_ZN19eap_am_crypto_md4_cC2EP18abs_eap_am_tools_c @ 622 NONAME
+	_ZN19eap_am_crypto_md4_cD0Ev @ 623 NONAME
+	_ZN19eap_am_crypto_md4_cD1Ev @ 624 NONAME
+	_ZN19eap_am_crypto_md4_cD2Ev @ 625 NONAME
+	_ZN19eap_am_crypto_rc4_c12decrypt_dataEPKvPvm @ 626 NONAME
+	_ZN19eap_am_crypto_rc4_c12encrypt_dataEPKvPvm @ 627 NONAME
+	_ZN19eap_am_crypto_rc4_c12get_is_validEv @ 628 NONAME
+	_ZN19eap_am_crypto_rc4_c12set_is_validEv @ 629 NONAME
+	_ZN19eap_am_crypto_rc4_c14set_is_invalidEv @ 630 NONAME
+	_ZN19eap_am_crypto_rc4_c4swapEPhS0_ @ 631 NONAME
+	_ZN19eap_am_crypto_rc4_c7cleanupEv @ 632 NONAME
+	_ZN19eap_am_crypto_rc4_c7set_keyEPK19eap_variable_data_c @ 633 NONAME
+	_ZN19eap_am_crypto_rc4_cC1EP18abs_eap_am_tools_c @ 634 NONAME
+	_ZN19eap_am_crypto_rc4_cC2EP18abs_eap_am_tools_c @ 635 NONAME
+	_ZN19eap_am_crypto_rc4_cD0Ev @ 636 NONAME
+	_ZN19eap_am_crypto_rc4_cD1Ev @ 637 NONAME
+	_ZN19eap_am_crypto_rc4_cD2Ev @ 638 NONAME
+	_ZN19eap_am_mutex_base_cC1EPKS_ @ 639 NONAME
+	_ZN19eap_am_mutex_base_cC1Ev @ 640 NONAME
+	_ZN19eap_am_mutex_base_cC2EPKS_ @ 641 NONAME
+	_ZN19eap_am_mutex_base_cC2Ev @ 642 NONAME
+	_ZN19eap_am_mutex_base_cD0Ev @ 643 NONAME
+	_ZN19eap_am_mutex_base_cD1Ev @ 644 NONAME
+	_ZN19eap_am_mutex_base_cD2Ev @ 645 NONAME
+	_ZN19eap_am_network_id_c12set_is_validEv @ 646 NONAME
+	_ZN19eap_am_network_id_c22set_copy_of_network_idEPKS_ @ 647 NONAME
+	_ZN19eap_am_network_id_c25set_copy_of_am_network_idEPKvmS1_mt @ 648 NONAME
+	_ZN19eap_am_network_id_c5resetEv @ 649 NONAME
+	_ZN19eap_am_network_id_c8set_typeEt @ 650 NONAME
+	_ZN19eap_am_network_id_cC1EP18abs_eap_am_tools_c @ 651 NONAME
+	_ZN19eap_am_network_id_cC1EP18abs_eap_am_tools_cPK19eap_variable_data_cS4_t @ 652 NONAME
+	_ZN19eap_am_network_id_cC1EP18abs_eap_am_tools_cPKS_ @ 653 NONAME
+	_ZN19eap_am_network_id_cC1EP18abs_eap_am_tools_cPKvmS3_mtbb @ 654 NONAME
+	_ZN19eap_am_network_id_cC2EP18abs_eap_am_tools_c @ 655 NONAME
+	_ZN19eap_am_network_id_cC2EP18abs_eap_am_tools_cPK19eap_variable_data_cS4_t @ 656 NONAME
+	_ZN19eap_am_network_id_cC2EP18abs_eap_am_tools_cPKS_ @ 657 NONAME
+	_ZN19eap_am_network_id_cC2EP18abs_eap_am_tools_cPKvmS3_mtbb @ 658 NONAME
+	_ZN19eap_am_network_id_cD0Ev @ 659 NONAME
+	_ZN19eap_am_network_id_cD1Ev @ 660 NONAME
+	_ZN19eap_am_network_id_cD2Ev @ 661 NONAME
+	_ZN19eap_core_nak_info_cC1EP18abs_eap_am_tools_cPK19eap_am_network_id_c19eap_expanded_type_ch @ 662 NONAME
+	_ZN19eap_core_nak_info_cC2EP18abs_eap_am_tools_cPK19eap_am_network_id_c19eap_expanded_type_ch @ 663 NONAME
+	_ZN19eap_core_nak_info_cD0Ev @ 664 NONAME
+	_ZN19eap_core_nak_info_cD1Ev @ 665 NONAME
+	_ZN19eap_core_nak_info_cD2Ev @ 666 NONAME
+	_ZN19eap_expanded_type_c10write_typeEP18abs_eap_am_tools_cmPvmbS_ @ 667 NONAME
+	_ZN19eap_expanded_type_c12is_ietf_typeES_ @ 668 NONAME
+	_ZN19eap_expanded_type_c16is_expanded_typeE22eap_type_ietf_values_e @ 669 NONAME
+	_ZN19eap_expanded_type_c19set_eap_type_valuesE20eap_type_vendor_id_em @ 670 NONAME
+	_ZN19eap_expanded_type_c22set_expanded_type_dataEP18abs_eap_am_tools_cPK19eap_variable_data_c @ 671 NONAME
+	_ZN19eap_expanded_type_c22set_expanded_type_dataEP18abs_eap_am_tools_cPKvm @ 672 NONAME
+	_ZN19eap_expanded_type_c26get_eap_expanded_type_sizeEv @ 673 NONAME
+	_ZN19eap_expanded_type_c9read_typeEP18abs_eap_am_tools_cmPKvmPS_ @ 674 NONAME
+	_ZN19eap_expanded_type_cC1E20eap_type_vendor_id_em @ 675 NONAME
+	_ZN19eap_expanded_type_cC1E22eap_type_ietf_values_e @ 676 NONAME
+	_ZN19eap_expanded_type_cC1Ev @ 677 NONAME
+	_ZN19eap_expanded_type_cC2E20eap_type_vendor_id_em @ 678 NONAME
+	_ZN19eap_expanded_type_cC2E22eap_type_ietf_values_e @ 679 NONAME
+	_ZN19eap_expanded_type_cC2Ev @ 680 NONAME
+	_ZN19eap_expanded_type_cD1Ev @ 681 NONAME
+	_ZN19eap_expanded_type_cD2Ev @ 682 NONAME
+	_ZN19eap_expanded_type_caSE22eap_type_ietf_values_e @ 683 NONAME
+	_ZN19eap_expanded_type_caSERKS_ @ 684 NONAME
+	_ZN19eap_expanded_type_cadEv @ 685 NONAME
+	_ZN19eap_header_string_c19get_eap_code_stringE16eap_code_value_e @ 686 NONAME
+	_ZN19eap_header_string_c19get_eap_type_stringE19eap_expanded_type_c @ 687 NONAME
+	_ZN19eap_header_string_cC1Ev @ 688 NONAME
+	_ZN19eap_header_string_cC2Ev @ 689 NONAME
+	_ZN19eap_header_string_cD0Ev @ 690 NONAME
+	_ZN19eap_header_string_cD1Ev @ 691 NONAME
+	_ZN19eap_header_string_cD2Ev @ 692 NONAME
+	_ZN19eap_status_string_c17get_status_stringE12eap_status_e @ 693 NONAME
+	_ZN19eap_status_string_cC1Ev @ 694 NONAME
+	_ZN19eap_status_string_cC2Ev @ 695 NONAME
+	_ZN19eap_status_string_cD0Ev @ 696 NONAME
+	_ZN19eap_status_string_cD1Ev @ 697 NONAME
+	_ZN19eap_status_string_cD2Ev @ 698 NONAME
+	_ZN19eap_variable_data_c10set_bufferEPKS_ @ 699 NONAME
+	_ZN19eap_variable_data_c10set_bufferEPKvmbb @ 700 NONAME
+	_ZN19eap_variable_data_c10set_bufferEPvmbb @ 701 NONAME
+	_ZN19eap_variable_data_c12add_end_nullEv @ 702 NONAME
+	_ZN19eap_variable_data_c12set_is_validEv @ 703 NONAME
+	_ZN19eap_variable_data_c14set_is_invalidEv @ 704 NONAME
+	_ZN19eap_variable_data_c15allocate_bufferEm @ 705 NONAME
+	_ZN19eap_variable_data_c15set_data_lengthEm @ 706 NONAME
+	_ZN19eap_variable_data_c16set_start_offsetEm @ 707 NONAME
+	_ZN19eap_variable_data_c17set_buffer_lengthEm @ 708 NONAME
+	_ZN19eap_variable_data_c18add_data_to_offsetEmPKS_ @ 709 NONAME
+	_ZN19eap_variable_data_c18add_data_to_offsetEmPKvm @ 710 NONAME
+	_ZN19eap_variable_data_c18initialize_membersEv @ 711 NONAME
+	_ZN19eap_variable_data_c18set_copy_of_bufferEPKS_ @ 712 NONAME
+	_ZN19eap_variable_data_c18set_copy_of_bufferEPKvm @ 713 NONAME
+	_ZN19eap_variable_data_c34reset_start_offset_and_data_lengthEv @ 714 NONAME
+	_ZN19eap_variable_data_c4initEm @ 715 NONAME
+	_ZN19eap_variable_data_c5resetEv @ 716 NONAME
+	_ZN19eap_variable_data_c8add_dataEPKS_ @ 717 NONAME
+	_ZN19eap_variable_data_c8add_dataEPKvm @ 718 NONAME
+	_ZN19eap_variable_data_cC1EP18abs_eap_am_tools_c @ 719 NONAME
+	_ZN19eap_variable_data_cC1EP18abs_eap_am_tools_cPKvmbb @ 720 NONAME
+	_ZN19eap_variable_data_cC2EP18abs_eap_am_tools_c @ 721 NONAME
+	_ZN19eap_variable_data_cC2EP18abs_eap_am_tools_cPKvmbb @ 722 NONAME
+	_ZN19eap_variable_data_cD0Ev @ 723 NONAME
+	_ZN19eap_variable_data_cD1Ev @ 724 NONAME
+	_ZN19eap_variable_data_cD2Ev @ 725 NONAME
+	_ZN19eapol_header_base_c11set_versionE24eapol_protocol_version_e @ 726 NONAME
+	_ZN19eapol_header_base_c15set_data_lengthEt @ 727 NONAME
+	_ZN19eapol_header_base_c15set_packet_typeE19eapol_packet_type_e @ 728 NONAME
+	_ZN19eapol_header_base_c17get_header_lengthEv @ 729 NONAME
+	_ZN19eapol_header_base_cC1EP18abs_eap_am_tools_cPvm @ 730 NONAME
+	_ZN19eapol_header_base_cC2EP18abs_eap_am_tools_cPvm @ 731 NONAME
+	_ZN19eapol_header_base_cD0Ev @ 732 NONAME
+	_ZN19eapol_header_base_cD1Ev @ 733 NONAME
+	_ZN19eapol_header_base_cD2Ev @ 734 NONAME
+	_ZN19eapol_session_key_c12set_key_typeE16eapol_key_type_e @ 735 NONAME
+	_ZN19eapol_session_key_c13set_key_indexEm @ 736 NONAME
+	_ZN19eapol_session_key_c14set_key_tx_bitEb @ 737 NONAME
+	_ZN19eapol_session_key_c19set_sequence_numberEP19eap_variable_data_c @ 738 NONAME
+	_ZN19eapol_session_key_c25get_eapol_key_type_stringE16eapol_key_type_e @ 739 NONAME
+	_ZN19eapol_session_key_c7set_keyEPK19eap_variable_data_c @ 740 NONAME
+	_ZN19eapol_session_key_cC1EP18abs_eap_am_tools_c @ 741 NONAME
+	_ZN19eapol_session_key_cC1EP18abs_eap_am_tools_cP19eap_variable_data_c16eapol_key_type_embPKhm @ 742 NONAME
+	_ZN19eapol_session_key_cC2EP18abs_eap_am_tools_c @ 743 NONAME
+	_ZN19eapol_session_key_cC2EP18abs_eap_am_tools_cP19eap_variable_data_c16eapol_key_type_embPKhm @ 744 NONAME
+	_ZN19eapol_session_key_cD0Ev @ 745 NONAME
+	_ZN19eapol_session_key_cD1Ev @ 746 NONAME
+	_ZN19eapol_session_key_cD2Ev @ 747 NONAME
+	_ZN20crypto_tls_md5_prf_c12get_is_validEv @ 748 NONAME
+	_ZN20crypto_tls_md5_prf_c12set_is_validEv @ 749 NONAME
+	_ZN20crypto_tls_md5_prf_c12tls_prf_initEPK19eap_variable_data_cS2_S2_ @ 750 NONAME
+	_ZN20crypto_tls_md5_prf_c14set_is_invalidEv @ 751 NONAME
+	_ZN20crypto_tls_md5_prf_c14tls_prf_outputEPvm @ 752 NONAME
+	_ZN20crypto_tls_md5_prf_c15tls_prf_cleanupEv @ 753 NONAME
+	_ZN20crypto_tls_md5_prf_cC1EP18abs_eap_am_tools_c @ 754 NONAME
+	_ZN20crypto_tls_md5_prf_cC2EP18abs_eap_am_tools_c @ 755 NONAME
+	_ZN20crypto_tls_md5_prf_cD0Ev @ 756 NONAME
+	_ZN20crypto_tls_md5_prf_cD1Ev @ 757 NONAME
+	_ZN20crypto_tls_md5_prf_cD2Ev @ 758 NONAME
+	_ZN20eap_am_crypto_sha1_c10hash_finalEPvPm @ 759 NONAME
+	_ZN20eap_am_crypto_sha1_c11hash_updateEPKvm @ 760 NONAME
+	_ZN20eap_am_crypto_sha1_c12copy_contextEPK19eap_variable_data_cyPKmS4_S4_ @ 761 NONAME
+	_ZN20eap_am_crypto_sha1_c12get_is_validEv @ 762 NONAME
+	_ZN20eap_am_crypto_sha1_c12hash_cleanupEv @ 763 NONAME
+	_ZN20eap_am_crypto_sha1_c12set_is_validEv @ 764 NONAME
+	_ZN20eap_am_crypto_sha1_c14get_block_sizeEv @ 765 NONAME
+	_ZN20eap_am_crypto_sha1_c14set_is_invalidEv @ 766 NONAME
+	_ZN20eap_am_crypto_sha1_c17get_digest_lengthEv @ 767 NONAME
+	_ZN20eap_am_crypto_sha1_c19copy_message_digestEPvPm @ 768 NONAME
+	_ZN20eap_am_crypto_sha1_c23eap_sha1_dss_G_functionEPKvmPvPm @ 769 NONAME
+	_ZN20eap_am_crypto_sha1_c32eap_sha1_process_data_host_orderEPKmm @ 770 NONAME
+	_ZN20eap_am_crypto_sha1_c35eap_sha1_process_data_network_orderEPKmm @ 771 NONAME
+	_ZN20eap_am_crypto_sha1_c4copyEv @ 772 NONAME
+	_ZN20eap_am_crypto_sha1_c9hash_initEv @ 773 NONAME
+	_ZN20eap_am_crypto_sha1_cC1EP18abs_eap_am_tools_c @ 774 NONAME
+	_ZN20eap_am_crypto_sha1_cC2EP18abs_eap_am_tools_c @ 775 NONAME
+	_ZN20eap_am_crypto_sha1_cD0Ev @ 776 NONAME
+	_ZN20eap_am_crypto_sha1_cD1Ev @ 777 NONAME
+	_ZN20eap_am_crypto_sha1_cD2Ev @ 778 NONAME
+	_ZN20eap_buf_chain_base_c10initializeEm @ 779 NONAME
+	_ZN20eap_buf_chain_base_c11set_encryptEb @ 780 NONAME
+	_ZN20eap_buf_chain_base_c12get_am_toolsEv @ 781 NONAME
+	_ZN20eap_buf_chain_base_c13set_is_clientEb @ 782 NONAME
+	_ZN20eap_buf_chain_base_c15set_data_lengthEm @ 783 NONAME
+	_ZN20eap_buf_chain_base_c17reset_data_bufferEv @ 784 NONAME
+	_ZN20eap_buf_chain_base_c17set_buffer_lengthEm @ 785 NONAME
+	_ZN20eap_buf_chain_base_c17set_stack_addressEPKv @ 786 NONAME
+	_ZN20eap_buf_chain_base_c18add_data_to_offsetEmPK19eap_variable_data_c @ 787 NONAME
+	_ZN20eap_buf_chain_base_c18add_data_to_offsetEmPKvm @ 788 NONAME
+	_ZN20eap_buf_chain_base_c18get_is_manipulatedEv @ 789 NONAME
+	_ZN20eap_buf_chain_base_c18set_is_manipulatedEv @ 790 NONAME
+	_ZN20eap_buf_chain_base_c19set_mem_guard_bytesEv @ 791 NONAME
+	_ZN20eap_buf_chain_base_c20get_mem_guard_lengthEv @ 792 NONAME
+	_ZN20eap_buf_chain_base_c20set_do_length_checksEb @ 793 NONAME
+	_ZN20eap_buf_chain_base_c21get_random_error_typeEv @ 794 NONAME
+	_ZN20eap_buf_chain_base_c21get_send_packet_indexEv @ 795 NONAME
+	_ZN20eap_buf_chain_base_c21set_random_error_typeE21eap_random_error_type @ 796 NONAME
+	_ZN20eap_buf_chain_base_c21set_send_packet_indexEm @ 797 NONAME
+	_ZN20eap_buf_chain_base_c28get_do_packet_retransmissionEv @ 798 NONAME
+	_ZN20eap_buf_chain_base_c28set_do_packet_retransmissionEb @ 799 NONAME
+	_ZN20eap_buf_chain_base_c8add_dataEPK19eap_variable_data_c @ 800 NONAME
+	_ZN20eap_buf_chain_base_c8add_dataEPKvm @ 801 NONAME
+	_ZN20eap_buf_chain_base_cC2E17eap_read_buffer_eP18abs_eap_am_tools_cPKhmb @ 802 NONAME
+	_ZN20eap_buf_chain_base_cC2E17eap_read_buffer_eP18abs_eap_am_tools_cm @ 803 NONAME
+	_ZN20eap_buf_chain_base_cC2E18eap_write_buffer_eP18abs_eap_am_tools_cPhmbbm @ 804 NONAME
+	_ZN20eap_buf_chain_base_cC2E18eap_write_buffer_eP18abs_eap_am_tools_cm @ 805 NONAME
+	_ZN20eap_buf_chain_base_cD0Ev @ 806 NONAME
+	_ZN20eap_buf_chain_base_cD1Ev @ 807 NONAME
+	_ZN20eap_buf_chain_base_cD2Ev @ 808 NONAME
+	_ZN20eap_rogue_ap_entry_c15set_mac_addressEPKh @ 809 NONAME
+	_ZN20eap_rogue_ap_entry_c16set_rogue_reasonE21eap_rogue_ap_reason_e @ 810 NONAME
+	_ZN20eap_rogue_ap_entry_cC1EP18abs_eap_am_tools_c @ 811 NONAME
+	_ZN20eap_rogue_ap_entry_cC2EP18abs_eap_am_tools_c @ 812 NONAME
+	_ZN20eap_rogue_ap_entry_cD0Ev @ 813 NONAME
+	_ZN20eap_rogue_ap_entry_cD1Ev @ 814 NONAME
+	_ZN20eap_rogue_ap_entry_cD2Ev @ 815 NONAME
+	_ZN20eap_type_selection_cC1EP18abs_eap_am_tools_c19eap_expanded_type_cb @ 816 NONAME
+	_ZN20eap_type_selection_cC2EP18abs_eap_am_tools_c19eap_expanded_type_cb @ 817 NONAME
+	_ZN20eap_type_selection_cD0Ev @ 818 NONAME
+	_ZN20eap_type_selection_cD1Ev @ 819 NONAME
+	_ZN20eap_type_selection_cD2Ev @ 820 NONAME
+	_ZN21crypto_tls_base_prf_c12get_is_validEv @ 821 NONAME
+	_ZN21crypto_tls_base_prf_c12set_is_validEv @ 822 NONAME
+	_ZN21crypto_tls_base_prf_c14set_is_invalidEv @ 823 NONAME
+	_ZN21crypto_tls_base_prf_c15tls_prf_A_valueEP27abs_crypto_hmac_algorithm_cP19eap_variable_data_cS3_S3_ @ 824 NONAME
+	_ZN21crypto_tls_base_prf_c15tls_prf_cleanupEv @ 825 NONAME
+	_ZN21crypto_tls_base_prf_c17tls_prf_one_roundEP27abs_crypto_hmac_algorithm_cPK19eap_variable_data_cPS2_S5_Pvm @ 826 NONAME
+	_ZN21crypto_tls_base_prf_cC1EP18abs_eap_am_tools_c @ 827 NONAME
+	_ZN21crypto_tls_base_prf_cC2EP18abs_eap_am_tools_c @ 828 NONAME
+	_ZN21crypto_tls_base_prf_cD0Ev @ 829 NONAME
+	_ZN21crypto_tls_base_prf_cD1Ev @ 830 NONAME
+	_ZN21crypto_tls_base_prf_cD2Ev @ 831 NONAME
+	_ZN21crypto_tls_sha1_prf_c12get_is_validEv @ 832 NONAME
+	_ZN21crypto_tls_sha1_prf_c12set_is_validEv @ 833 NONAME
+	_ZN21crypto_tls_sha1_prf_c12tls_prf_initEPK19eap_variable_data_cS2_S2_ @ 834 NONAME
+	_ZN21crypto_tls_sha1_prf_c14set_is_invalidEv @ 835 NONAME
+	_ZN21crypto_tls_sha1_prf_c14tls_prf_outputEPvm @ 836 NONAME
+	_ZN21crypto_tls_sha1_prf_c15tls_prf_cleanupEv @ 837 NONAME
+	_ZN21crypto_tls_sha1_prf_cC1EP18abs_eap_am_tools_c @ 838 NONAME
+	_ZN21crypto_tls_sha1_prf_cC2EP18abs_eap_am_tools_c @ 839 NONAME
+	_ZN21crypto_tls_sha1_prf_cD0Ev @ 840 NONAME
+	_ZN21crypto_tls_sha1_prf_cD1Ev @ 841 NONAME
+	_ZN21crypto_tls_sha1_prf_cD2Ev @ 842 NONAME
+	_ZN21eap_am_memory_store_c11remove_dataEPK19eap_variable_data_c @ 843 NONAME
+	_ZN21eap_am_memory_store_c12get_is_validEv @ 844 NONAME
+	_ZN21eap_am_memory_store_c12set_is_validEv @ 845 NONAME
+	_ZN21eap_am_memory_store_c13timer_expiredEmPv @ 846 NONAME
+	_ZN21eap_am_memory_store_c17timer_delete_dataEmPv @ 847 NONAME
+	_ZN21eap_am_memory_store_c8add_dataEPK19eap_variable_data_cPK22eap_tlv_message_data_cm @ 848 NONAME
+	_ZN21eap_am_memory_store_c8get_dataEPK19eap_variable_data_cP22eap_tlv_message_data_c @ 849 NONAME
+	_ZN21eap_am_memory_store_c8shutdownEv @ 850 NONAME
+	_ZN21eap_am_memory_store_cC1EP18abs_eap_am_tools_c @ 851 NONAME
+	_ZN21eap_am_memory_store_cC2EP18abs_eap_am_tools_c @ 852 NONAME
+	_ZN21eap_am_memory_store_cD0Ev @ 853 NONAME
+	_ZN21eap_am_memory_store_cD1Ev @ 854 NONAME
+	_ZN21eap_am_memory_store_cD2Ev @ 855 NONAME
+	_ZN22eap_am_mutex_symbian_c11mutex_enterEv @ 856 NONAME
+	_ZN22eap_am_mutex_symbian_c11mutex_leaveEP18abs_eap_am_tools_c @ 857 NONAME
+	_ZN22eap_am_mutex_symbian_c15dublicate_mutexEv @ 858 NONAME
+	_ZN22eap_am_mutex_symbian_cC1EPKS_ @ 859 NONAME
+	_ZN22eap_am_mutex_symbian_cC1Ev @ 860 NONAME
+	_ZN22eap_am_mutex_symbian_cC2EPKS_ @ 861 NONAME
+	_ZN22eap_am_mutex_symbian_cC2Ev @ 862 NONAME
+	_ZN22eap_am_mutex_symbian_cD0Ev @ 863 NONAME
+	_ZN22eap_am_mutex_symbian_cD1Ev @ 864 NONAME
+	_ZN22eap_am_mutex_symbian_cD2Ev @ 865 NONAME
+	_ZN22eap_am_tools_symbian_c10get_cryptoEv @ 866 NONAME
+	_ZN22eap_am_tools_symbian_c11pulse_timerEm @ 867 NONAME
+	_ZN22eap_am_tools_symbian_c11timer_sleepEm @ 868 NONAME
+	_ZN22eap_am_tools_symbian_c12am_set_timerEP20abs_eap_base_timer_cmPvm @ 869 NONAME
+	_ZN22eap_am_tools_symbian_c13config_strlenEPKc @ 870 NONAME
+	_ZN22eap_am_tools_symbian_c15am_cancel_timerEP20abs_eap_base_timer_cm @ 871 NONAME
+	_ZN22eap_am_tools_symbian_c15begin_db_deleteER7RDbView @ 872 NONAME
+	_ZN22eap_am_tools_symbian_c15begin_db_updateER7RDbView @ 873 NONAME
+	_ZN22eap_am_tools_symbian_c15enter_crypto_csEv @ 874 NONAME
+	_ZN22eap_am_tools_symbian_c15formatted_printEPKcz @ 875 NONAME
+	_ZN22eap_am_tools_symbian_c15get_clock_ticksEv @ 876 NONAME
+	_ZN22eap_am_tools_symbian_c15get_trace_mutexEv @ 877 NONAME
+	_ZN22eap_am_tools_symbian_c15leave_crypto_csEv @ 878 NONAME
+	_ZN22eap_am_tools_symbian_c16get_global_mutexEv @ 879 NONAME
+	_ZN22eap_am_tools_symbian_c16set_trace_prefixEPK19eap_variable_data_c @ 880 NONAME
+	_ZN22eap_am_tools_symbian_c17enter_trace_mutexEv @ 881 NONAME
+	_ZN22eap_am_tools_symbian_c17get_gmt_unix_timeEv @ 882 NONAME
+	_ZN22eap_am_tools_symbian_c17leave_trace_mutexEv @ 883 NONAME
+	_ZN22eap_am_tools_symbian_c18enter_global_mutexEv @ 884 NONAME
+	_ZN22eap_am_tools_symbian_c18get_hardware_ticksEv @ 885 NONAME
+	_ZN22eap_am_tools_symbian_c18leave_global_mutexEv @ 886 NONAME
+	_ZN22eap_am_tools_symbian_c19set_trace_file_nameEPK19eap_variable_data_c @ 887 NONAME
+	_ZN22eap_am_tools_symbian_c19u64_struct_to_u64_tE10u64_struct @ 888 NONAME
+	_ZN22eap_am_tools_symbian_c19u64_t_to_u64_structEy @ 889 NONAME
+	_ZN22eap_am_tools_symbian_c20am_cancel_all_timersEv @ 890 NONAME
+	_ZN22eap_am_tools_symbian_c20begin_db_transactionER16RDbNamedDatabase @ 891 NONAME
+	_ZN22eap_am_tools_symbian_c23convert_unicode_to_utf8ER19eap_variable_data_cRKS0_ @ 892 NONAME
+	_ZN22eap_am_tools_symbian_c23convert_utf8_to_unicodeER19eap_variable_data_cRKS0_ @ 893 NONAME
+	_ZN22eap_am_tools_symbian_c23get_timer_resolution_msEv @ 894 NONAME
+	_ZN22eap_am_tools_symbian_c23re_activate_timer_queueEv @ 895 NONAME
+	_ZN22eap_am_tools_symbian_c23set_max_trace_file_sizeEm @ 896 NONAME
+	_ZN22eap_am_tools_symbian_c23set_timer_resolution_msEm @ 897 NONAME
+	_ZN22eap_am_tools_symbian_c24get_timer_queue_is_emptyEv @ 898 NONAME
+	_ZN22eap_am_tools_symbian_c25get_clock_ticks_of_secondEv @ 899 NONAME
+	_ZN22eap_am_tools_symbian_c26get_is_timer_thread_activeEv @ 900 NONAME
+	_ZN22eap_am_tools_symbian_c28get_hardware_ticks_of_secondEv @ 901 NONAME
+	_ZN22eap_am_tools_symbian_c30get_use_eap_milli_second_timerEv @ 902 NONAME
+	_ZN22eap_am_tools_symbian_c30set_use_eap_milli_second_timerEb @ 903 NONAME
+	_ZN22eap_am_tools_symbian_c31convert_am_error_to_eapol_errorEl @ 904 NONAME
+	_ZN22eap_am_tools_symbian_c31convert_eapol_error_to_am_errorE12eap_status_e @ 905 NONAME
+	_ZN22eap_am_tools_symbian_c5sleepEm @ 906 NONAME
+	_ZN22eap_am_tools_symbian_c6getenvEPK19eap_variable_data_cPS0_ @ 907 NONAME
+	_ZN22eap_am_tools_symbian_c6memchrEPKvhm @ 908 NONAME
+	_ZN22eap_am_tools_symbian_c6memcmpEPKvS1_m @ 909 NONAME
+	_ZN22eap_am_tools_symbian_c6memsetEPvlm @ 910 NONAME
+	_ZN22eap_am_tools_symbian_c6sprintER6TDes16PKcz @ 911 NONAME
+	_ZN22eap_am_tools_symbian_c6strlenEPKc @ 912 NONAME
+	_ZN22eap_am_tools_symbian_c7isspaceEh @ 913 NONAME
+	_ZN22eap_am_tools_symbian_c7memmoveEPvPKvm @ 914 NONAME
+	_ZN22eap_am_tools_symbian_c7memrchrEPKvhm @ 915 NONAME
+	_ZN22eap_am_tools_symbian_c8shutdownEv @ 916 NONAME
+	_ZN22eap_am_tools_symbian_c8snprintfEPhmPKcz @ 917 NONAME
+	_ZN22eap_am_tools_symbian_c9configureEv @ 918 NONAME
+	_ZN22eap_am_tools_symbian_cC1EPKc @ 919 NONAME
+	_ZN22eap_am_tools_symbian_cC2EPKc @ 920 NONAME
+	_ZN22eap_am_tools_symbian_cD0Ev @ 921 NONAME
+	_ZN22eap_am_tools_symbian_cD1Ev @ 922 NONAME
+	_ZN22eap_am_tools_symbian_cD2Ev @ 923 NONAME
+	_ZN22eap_tlv_message_data_c12get_is_validEv @ 924 NONAME
+	_ZN22eap_tlv_message_data_c16add_message_dataEmmPKv @ 925 NONAME
+	_ZN22eap_tlv_message_data_c16set_message_dataEmPKv @ 926 NONAME
+	_ZN22eap_tlv_message_data_c17copy_message_dataEmPKv @ 927 NONAME
+	_ZN22eap_tlv_message_data_c18add_message_headerEmm @ 928 NONAME
+	_ZN22eap_tlv_message_data_c18parse_message_dataEP11eap_array_cI16eap_tlv_header_cE @ 929 NONAME
+	_ZN22eap_tlv_message_data_c22add_message_data_arrayEmmP11eap_array_cI19eap_variable_data_cE @ 930 NONAME
+	_ZN22eap_tlv_message_data_c23allocate_message_bufferEmmPPv @ 931 NONAME
+	_ZN22eap_tlv_message_data_c28allocate_message_data_bufferEm @ 932 NONAME
+	_ZN22eap_tlv_message_data_c31object_decrease_reference_countEv @ 933 NONAME
+	_ZN22eap_tlv_message_data_c31object_increase_reference_countEv @ 934 NONAME
+	_ZN22eap_tlv_message_data_cC1EP18abs_eap_am_tools_c @ 935 NONAME
+	_ZN22eap_tlv_message_data_cC2EP18abs_eap_am_tools_c @ 936 NONAME
+	_ZN22eap_tlv_message_data_cD0Ev @ 937 NONAME
+	_ZN22eap_tlv_message_data_cD1Ev @ 938 NONAME
+	_ZN22eap_tlv_message_data_cD2Ev @ 939 NONAME
+	_ZN23crypto_kd_hmac_sha256_c10expand_keyEP19eap_variable_data_cmPKS0_S3_ @ 940 NONAME
+	_ZN23crypto_kd_hmac_sha256_c12get_is_validEv @ 941 NONAME
+	_ZN23crypto_kd_hmac_sha256_cC1EP18abs_eap_am_tools_c @ 942 NONAME
+	_ZN23crypto_kd_hmac_sha256_cC2EP18abs_eap_am_tools_c @ 943 NONAME
+	_ZN23crypto_kd_hmac_sha256_cD0Ev @ 944 NONAME
+	_ZN23crypto_kd_hmac_sha256_cD1Ev @ 945 NONAME
+	_ZN23crypto_kd_hmac_sha256_cD2Ev @ 946 NONAME
+	_ZN23eap_am_crypto_sha_256_c10hash_finalEPvPm @ 947 NONAME
+	_ZN23eap_am_crypto_sha_256_c11hash_updateEPKvm @ 948 NONAME
+	_ZN23eap_am_crypto_sha_256_c12copy_contextEPK19eap_variable_data_cyPKmS4_S4_ @ 949 NONAME
+	_ZN23eap_am_crypto_sha_256_c12get_is_validEv @ 950 NONAME
+	_ZN23eap_am_crypto_sha_256_c12hash_cleanupEv @ 951 NONAME
+	_ZN23eap_am_crypto_sha_256_c12set_is_validEv @ 952 NONAME
+	_ZN23eap_am_crypto_sha_256_c14get_block_sizeEv @ 953 NONAME
+	_ZN23eap_am_crypto_sha_256_c14set_is_invalidEv @ 954 NONAME
+	_ZN23eap_am_crypto_sha_256_c17get_digest_lengthEv @ 955 NONAME
+	_ZN23eap_am_crypto_sha_256_c19copy_message_digestEPvPm @ 956 NONAME
+	_ZN23eap_am_crypto_sha_256_c35eap_sha_256_process_data_host_orderEPKmm @ 957 NONAME
+	_ZN23eap_am_crypto_sha_256_c38eap_sha_256_process_data_network_orderEPKmm @ 958 NONAME
+	_ZN23eap_am_crypto_sha_256_c4copyEv @ 959 NONAME
+	_ZN23eap_am_crypto_sha_256_c9hash_initEv @ 960 NONAME
+	_ZN23eap_am_crypto_sha_256_cC1EP18abs_eap_am_tools_c @ 961 NONAME
+	_ZN23eap_am_crypto_sha_256_cC2EP18abs_eap_am_tools_c @ 962 NONAME
+	_ZN23eap_am_crypto_sha_256_cD0Ev @ 963 NONAME
+	_ZN23eap_am_crypto_sha_256_cD1Ev @ 964 NONAME
+	_ZN23eap_am_crypto_sha_256_cD2Ev @ 965 NONAME
+	_ZN23eap_am_crypto_symbian_c10dh_cleanupEPK19eap_variable_data_c @ 966 NONAME
+	_ZN23eap_am_crypto_symbian_c10dsa_verifyEP19eap_variable_data_cPKS0_S3_S3_S3_S3_S3_ @ 967 NONAME
+	_ZN23eap_am_crypto_symbian_c10md4_updateEP19eap_variable_data_cPKhm @ 968 NONAME
+	_ZN23eap_am_crypto_symbian_c10md5_updateEP19eap_variable_data_cPKhm @ 969 NONAME
+	_ZN23eap_am_crypto_symbian_c10rsa_verifyEP19eap_variable_data_cPKS0_S3_S3_ @ 970 NONAME
+	_ZN23eap_am_crypto_symbian_c10sha1_finalEP19eap_variable_data_cPhPm @ 971 NONAME
+	_ZN23eap_am_crypto_symbian_c11aes_cleanupEP19eap_variable_data_c @ 972 NONAME
+	_ZN23eap_am_crypto_symbian_c11dsa_cleanupEP19eap_variable_data_c @ 973 NONAME
+	_ZN23eap_am_crypto_symbian_c11md4_cleanupEP19eap_variable_data_c @ 974 NONAME
+	_ZN23eap_am_crypto_symbian_c11md5_cleanupEP19eap_variable_data_c @ 975 NONAME
+	_ZN23eap_am_crypto_symbian_c11rc4_cleanupEP19eap_variable_data_c @ 976 NONAME
+	_ZN23eap_am_crypto_symbian_c11rc4_decryptEPK19eap_variable_data_cPKvPvm @ 977 NONAME
+	_ZN23eap_am_crypto_symbian_c11rc4_decryptEPK19eap_variable_data_cPvm @ 978 NONAME
+	_ZN23eap_am_crypto_symbian_c11rc4_encryptEPK19eap_variable_data_cPKvPvm @ 979 NONAME
+	_ZN23eap_am_crypto_symbian_c11rc4_encryptEPK19eap_variable_data_cPvm @ 980 NONAME
+	_ZN23eap_am_crypto_symbian_c11rc4_set_keyEP19eap_variable_data_cPKS0_ @ 981 NONAME
+	_ZN23eap_am_crypto_symbian_c11rsa_cleanupEP19eap_variable_data_c @ 982 NONAME
+	_ZN23eap_am_crypto_symbian_c11sha1_updateEP19eap_variable_data_cPKhm @ 983 NONAME
+	_ZN23eap_am_crypto_symbian_c12set_is_validEv @ 984 NONAME
+	_ZN23eap_am_crypto_symbian_c12sha1_cleanupEP19eap_variable_data_c @ 985 NONAME
+	_ZN23eap_am_crypto_symbian_c12sha_256_initEP19eap_variable_data_c @ 986 NONAME
+	_ZN23eap_am_crypto_symbian_c13add_rand_seedEPKhm @ 987 NONAME
+	_ZN23eap_am_crypto_symbian_c13sha_256_finalEP19eap_variable_data_cPhPm @ 988 NONAME
+	_ZN23eap_am_crypto_symbian_c14aes_block_sizeEv @ 989 NONAME
+	_ZN23eap_am_crypto_symbian_c14aes_key_lengthEv @ 990 NONAME
+	_ZN23eap_am_crypto_symbian_c14get_rand_bytesEPhm @ 991 NONAME
+	_ZN23eap_am_crypto_symbian_c14sha_256_updateEP19eap_variable_data_cPKhm @ 992 NONAME
+	_ZN23eap_am_crypto_symbian_c15sha_256_cleanupEP19eap_variable_data_c @ 993 NONAME
+	_ZN23eap_am_crypto_symbian_c15use_test_randomEPKhmb @ 994 NONAME
+	_ZN23eap_am_crypto_symbian_c16cleanup_3des_edeEP19eap_variable_data_c @ 995 NONAME
+	_ZN23eap_am_crypto_symbian_c16md4_copy_contextEP19eap_variable_data_cPKS0_ @ 996 NONAME
+	_ZN23eap_am_crypto_symbian_c16md5_copy_contextEP19eap_variable_data_cPKS0_ @ 997 NONAME
+	_ZN23eap_am_crypto_symbian_c17aes_decrypt_blockEP19eap_variable_data_cPKhPhm @ 998 NONAME
+	_ZN23eap_am_crypto_symbian_c17aes_encrypt_blockEP19eap_variable_data_cPKhPhm @ 999 NONAME
+	_ZN23eap_am_crypto_symbian_c17dss_pseudo_randomEPhmS0_m @ 1000 NONAME
+	_ZN23eap_am_crypto_symbian_c17sha1_copy_contextEP19eap_variable_data_cPKS0_ @ 1001 NONAME
+	_ZN23eap_am_crypto_symbian_c18get_md4_block_sizeEP19eap_variable_data_c @ 1002 NONAME
+	_ZN23eap_am_crypto_symbian_c18get_md5_block_sizeEP19eap_variable_data_c @ 1003 NONAME
+	_ZN23eap_am_crypto_symbian_c19block_size_3des_edeEv @ 1004 NONAME
+	_ZN23eap_am_crypto_symbian_c19get_sha1_block_sizeEP19eap_variable_data_c @ 1005 NONAME
+	_ZN23eap_am_crypto_symbian_c19key_length_3des_edeEv @ 1006 NONAME
+	_ZN23eap_am_crypto_symbian_c20sha_256_copy_contextEP19eap_variable_data_cPKS0_ @ 1007 NONAME
+	_ZN23eap_am_crypto_symbian_c21get_md4_digest_lengthEP19eap_variable_data_c @ 1008 NONAME
+	_ZN23eap_am_crypto_symbian_c21get_md5_digest_lengthEP19eap_variable_data_c @ 1009 NONAME
+	_ZN23eap_am_crypto_symbian_c22add_rand_seed_hw_ticksEv @ 1010 NONAME
+	_ZN23eap_am_crypto_symbian_c22aes_set_decryption_keyEP19eap_variable_data_cPKhm @ 1011 NONAME
+	_ZN23eap_am_crypto_symbian_c22aes_set_encryption_keyEP19eap_variable_data_cPKhm @ 1012 NONAME
+	_ZN23eap_am_crypto_symbian_c22decrypt_block_3des_edeEP19eap_variable_data_cPKhPhm @ 1013 NONAME
+	_ZN23eap_am_crypto_symbian_c22encrypt_block_3des_edeEP19eap_variable_data_cPKhPhm @ 1014 NONAME
+	_ZN23eap_am_crypto_symbian_c22generate_g_power_to_xyEPK19eap_variable_data_cS2_PS0_PKhmS5_m @ 1015 NONAME
+	_ZN23eap_am_crypto_symbian_c22get_sha1_digest_lengthEP19eap_variable_data_c @ 1016 NONAME
+	_ZN23eap_am_crypto_symbian_c22get_sha_256_block_sizeEP19eap_variable_data_c @ 1017 NONAME
+	_ZN23eap_am_crypto_symbian_c24open_crypto_memory_leaksEv @ 1018 NONAME
+	_ZN23eap_am_crypto_symbian_c25close_crypto_memory_leaksEv @ 1019 NONAME
+	_ZN23eap_am_crypto_symbian_c25get_sha_256_digest_lengthEP19eap_variable_data_c @ 1020 NONAME
+	_ZN23eap_am_crypto_symbian_c27rsa_decrypt_with_public_keyEP19eap_variable_data_cPKS0_S3_S1_ @ 1021 NONAME
+	_ZN23eap_am_crypto_symbian_c27rsa_encrypt_with_public_keyEP19eap_variable_data_cPKS0_S3_S1_ @ 1022 NONAME
+	_ZN23eap_am_crypto_symbian_c27set_decryption_key_3des_edeEP19eap_variable_data_cPKhm @ 1023 NONAME
+	_ZN23eap_am_crypto_symbian_c27set_encryption_key_3des_edeEP19eap_variable_data_cPKhm @ 1024 NONAME
+	_ZN23eap_am_crypto_symbian_c28generate_diffie_hellman_keysEP19eap_variable_data_cS1_PKhmS3_m @ 1025 NONAME
+	_ZN23eap_am_crypto_symbian_c28rsa_decrypt_with_private_keyEP19eap_variable_data_cPKS0_S3_S1_ @ 1026 NONAME
+	_ZN23eap_am_crypto_symbian_c28rsa_encrypt_with_private_keyEP19eap_variable_data_cPKS0_S3_S1_ @ 1027 NONAME
+	_ZN23eap_am_crypto_symbian_c8dsa_initEP19eap_variable_data_c @ 1028 NONAME
+	_ZN23eap_am_crypto_symbian_c8dsa_signEP19eap_variable_data_cPKS0_S3_S1_ @ 1029 NONAME
+	_ZN23eap_am_crypto_symbian_c8md4_initEP19eap_variable_data_c @ 1030 NONAME
+	_ZN23eap_am_crypto_symbian_c8md5_initEP19eap_variable_data_c @ 1031 NONAME
+	_ZN23eap_am_crypto_symbian_c8rsa_initEP19eap_variable_data_c @ 1032 NONAME
+	_ZN23eap_am_crypto_symbian_c8rsa_signEP19eap_variable_data_cPKS0_S3_S1_ @ 1033 NONAME
+	_ZN23eap_am_crypto_symbian_c9configureEv @ 1034 NONAME
+	_ZN23eap_am_crypto_symbian_c9md4_finalEP19eap_variable_data_cPhPm @ 1035 NONAME
+	_ZN23eap_am_crypto_symbian_c9md5_finalEP19eap_variable_data_cPhPm @ 1036 NONAME
+	_ZN23eap_am_crypto_symbian_c9sha1_initEP19eap_variable_data_c @ 1037 NONAME
+	_ZN23eap_am_crypto_symbian_cC1EP18abs_eap_am_tools_c @ 1038 NONAME
+	_ZN23eap_am_crypto_symbian_cC2EP18abs_eap_am_tools_c @ 1039 NONAME
+	_ZN23eap_am_crypto_symbian_cD0Ev @ 1040 NONAME
+	_ZN23eap_am_crypto_symbian_cD1Ev @ 1041 NONAME
+	_ZN23eap_am_crypto_symbian_cD2Ev @ 1042 NONAME
+	_ZN23eap_session_core_base_c22new_eap_session_core_cEP18abs_eap_am_tools_cP22abs_eap_session_core_cbm @ 1043 NONAME
+	_ZN23eap_session_core_base_cC2Ev @ 1044 NONAME
+	_ZN23eap_session_core_base_cD0Ev @ 1045 NONAME
+	_ZN23eap_session_core_base_cD1Ev @ 1046 NONAME
+	_ZN23eap_session_core_base_cD2Ev @ 1047 NONAME
+	_ZN23network_key_and_index_c12get_is_validEv @ 1048 NONAME
+	_ZN23network_key_and_index_c15get_network_keyEv @ 1049 NONAME
+	_ZN23network_key_and_index_c17get_is_valid_dataEv @ 1050 NONAME
+	_ZN23network_key_and_index_c21set_network_key_indexEh @ 1051 NONAME
+	_ZN23network_key_and_index_c4copyEv @ 1052 NONAME
+	_ZN23network_key_and_index_cC1EP18abs_eap_am_tools_c @ 1053 NONAME
+	_ZN23network_key_and_index_cC2EP18abs_eap_am_tools_c @ 1054 NONAME
+	_ZN23network_key_and_index_cD0Ev @ 1055 NONAME
+	_ZN23network_key_and_index_cD1Ev @ 1056 NONAME
+	_ZN23network_key_and_index_cD2Ev @ 1057 NONAME
+	_ZN24eap_am_mutex_reference_c13add_referenceEv @ 1058 NONAME
+	_ZN24eap_am_mutex_reference_c15get_is_reservedEv @ 1059 NONAME
+	_ZN24eap_am_mutex_reference_c15set_is_reservedEb @ 1060 NONAME
+	_ZN24eap_am_mutex_reference_c16remove_referenceEv @ 1061 NONAME
+	_ZN24eap_am_mutex_reference_c19get_reference_countEv @ 1062 NONAME
+	_ZN24eap_am_mutex_reference_cC1Ev @ 1063 NONAME
+	_ZN24eap_am_mutex_reference_cC2Ev @ 1064 NONAME
+	_ZN24eap_am_mutex_reference_cD0Ev @ 1065 NONAME
+	_ZN24eap_am_mutex_reference_cD1Ev @ 1066 NONAME
+	_ZN24eap_am_mutex_reference_cD2Ev @ 1067 NONAME
+	_ZN24eap_master_session_key_c12set_eap_typeE19eap_expanded_type_c @ 1068 NONAME
+	_ZN24eap_master_session_key_c18copy_leap_passwordEPK19eap_variable_data_c @ 1069 NONAME
+	_ZN24eap_master_session_key_c8set_copyEPKS_ @ 1070 NONAME
+	_ZN24eap_master_session_key_cC1EP18abs_eap_am_tools_c19eap_expanded_type_c @ 1071 NONAME
+	_ZN24eap_master_session_key_cC2EP18abs_eap_am_tools_c19eap_expanded_type_c @ 1072 NONAME
+	_ZN24eap_master_session_key_cD0Ev @ 1073 NONAME
+	_ZN24eap_master_session_key_cD1Ev @ 1074 NONAME
+	_ZN24eap_master_session_key_cD2Ev @ 1075 NONAME
+	_ZN24eap_state_notification_c16get_state_stringEmm @ 1076 NONAME
+	_ZN24eap_state_notification_c19get_protocol_stringEmm @ 1077 NONAME
+	_ZN24eap_state_notification_c23set_notification_stringEPK19eap_variable_data_cb @ 1078 NONAME
+	_ZN24eap_state_notification_c24set_authentication_errorE12eap_status_e @ 1079 NONAME
+	_ZN24eap_state_notification_c25get_protocol_layer_stringEm @ 1080 NONAME
+	_ZN24eap_state_notification_cC1EP18abs_eap_am_tools_cPK19eap_am_network_id_cb28eap_state_notification_eap_e20eap_protocol_layer_e19eap_expanded_type_cmmhb @ 1081 NONAME
+	_ZN24eap_state_notification_cC1EP18abs_eap_am_tools_cPK19eap_am_network_id_cb28eap_state_notification_eap_e20eap_protocol_layer_e22eap_type_ietf_values_emmhb @ 1082 NONAME
+	_ZN24eap_state_notification_cC1EP18abs_eap_am_tools_cPK19eap_am_network_id_cb32eap_state_notification_generic_e20eap_protocol_layer_emmmhb @ 1083 NONAME
+	_ZN24eap_state_notification_cC2EP18abs_eap_am_tools_cPK19eap_am_network_id_cb28eap_state_notification_eap_e20eap_protocol_layer_e19eap_expanded_type_cmmhb @ 1084 NONAME
+	_ZN24eap_state_notification_cC2EP18abs_eap_am_tools_cPK19eap_am_network_id_cb28eap_state_notification_eap_e20eap_protocol_layer_e22eap_type_ietf_values_emmhb @ 1085 NONAME
+	_ZN24eap_state_notification_cC2EP18abs_eap_am_tools_cPK19eap_am_network_id_cb32eap_state_notification_generic_e20eap_protocol_layer_emmmhb @ 1086 NONAME
+	_ZN24eap_state_notification_cD0Ev @ 1087 NONAME
+	_ZN24eap_state_notification_cD1Ev @ 1088 NONAME
+	_ZN24eap_state_notification_cD2Ev @ 1089 NONAME
+	_ZN25eap_core_retransmission_c19get_send_network_idEv @ 1090 NONAME
+	_ZN25eap_core_retransmission_c28get_next_retransmission_timeEv @ 1091 NONAME
+	_ZN25eap_core_retransmission_c31get_next_retransmission_counterEv @ 1092 NONAME
+	_ZN25eap_core_retransmission_cC1EP18abs_eap_am_tools_cPK19eap_am_network_id_cP18eap_buf_chain_wr_cmmmm16eap_code_value_eh19eap_expanded_type_c @ 1093 NONAME
+	_ZN25eap_core_retransmission_cC2EP18abs_eap_am_tools_cPK19eap_am_network_id_cP18eap_buf_chain_wr_cmmmm16eap_code_value_eh19eap_expanded_type_c @ 1094 NONAME
+	_ZN25eap_core_retransmission_cD0Ev @ 1095 NONAME
+	_ZN25eap_core_retransmission_cD1Ev @ 1096 NONAME
+	_ZN25eap_core_retransmission_cD2Ev @ 1097 NONAME
+	_ZN25eap_general_header_base_c17set_header_bufferEPhm @ 1098 NONAME
+	_ZN25eap_general_header_base_cC2EP18abs_eap_am_tools_cPvm @ 1099 NONAME
+	_ZN25eap_general_header_base_cD0Ev @ 1100 NONAME
+	_ZN25eap_general_header_base_cD1Ev @ 1101 NONAME
+	_ZN25eap_general_header_base_cD2Ev @ 1102 NONAME
+	_ZN25eap_network_id_selector_c12set_selectorEPK19eap_am_network_id_c @ 1103 NONAME
+	_ZN25eap_network_id_selector_cC1EP18abs_eap_am_tools_c @ 1104 NONAME
+	_ZN25eap_network_id_selector_cC1EP18abs_eap_am_tools_cPK19eap_am_network_id_c @ 1105 NONAME
+	_ZN25eap_network_id_selector_cC1EP18abs_eap_am_tools_cPKS_ @ 1106 NONAME
+	_ZN25eap_network_id_selector_cC2EP18abs_eap_am_tools_c @ 1107 NONAME
+	_ZN25eap_network_id_selector_cC2EP18abs_eap_am_tools_cPK19eap_am_network_id_c @ 1108 NONAME
+	_ZN25eap_network_id_selector_cC2EP18abs_eap_am_tools_cPKS_ @ 1109 NONAME
+	_ZN25eap_network_id_selector_cD0Ev @ 1110 NONAME
+	_ZN25eap_network_id_selector_cD1Ev @ 1111 NONAME
+	_ZN25eap_network_id_selector_cD2Ev @ 1112 NONAME
+	_ZN26eapol_ethernet_header_rd_cC1EP18abs_eap_am_tools_cPKhm @ 1113 NONAME
+	_ZN26eapol_ethernet_header_rd_cC2EP18abs_eap_am_tools_cPKhm @ 1114 NONAME
+	_ZN26eapol_ethernet_header_rd_cD0Ev @ 1115 NONAME
+	_ZN26eapol_ethernet_header_rd_cD1Ev @ 1116 NONAME
+	_ZN26eapol_ethernet_header_rd_cD2Ev @ 1117 NONAME
+	_ZN26eapol_ethernet_header_wr_c10get_sourceEv @ 1118 NONAME
+	_ZN26eapol_ethernet_header_wr_c12reset_headerE21eapol_ethernet_type_et @ 1119 NONAME
+	_ZN26eapol_ethernet_header_wr_c15get_destinationEv @ 1120 NONAME
+	_ZN26eapol_ethernet_header_wr_cC1EP18abs_eap_am_tools_cPKhm @ 1121 NONAME
+	_ZN26eapol_ethernet_header_wr_cC2EP18abs_eap_am_tools_cPKhm @ 1122 NONAME
+	_ZN26eapol_ethernet_header_wr_cD0Ev @ 1123 NONAME
+	_ZN26eapol_ethernet_header_wr_cD1Ev @ 1124 NONAME
+	_ZN26eapol_ethernet_header_wr_cD2Ev @ 1125 NONAME
+	_ZN26simple_config_credential_c12get_is_validEv @ 1126 NONAME
+	_ZN26simple_config_credential_c15get_MAC_addressEv @ 1127 NONAME
+	_ZN26simple_config_credential_c16get_network_keysEv @ 1128 NONAME
+	_ZN26simple_config_credential_c17set_network_indexEh @ 1129 NONAME
+	_ZN26simple_config_credential_c19get_Encryption_TypeEv @ 1130 NONAME
+	_ZN26simple_config_credential_c19set_Encryption_TypeE31simple_config_Encryption_Type_e @ 1131 NONAME
+	_ZN26simple_config_credential_c23get_Authentication_TypeEv @ 1132 NONAME
+	_ZN26simple_config_credential_c23set_Authentication_TypeE35simple_config_Authentication_Type_e @ 1133 NONAME
+	_ZN26simple_config_credential_c8get_SSIDEv @ 1134 NONAME
+	_ZN26simple_config_credential_cC1EP18abs_eap_am_tools_c @ 1135 NONAME
+	_ZN26simple_config_credential_cC2EP18abs_eap_am_tools_c @ 1136 NONAME
+	_ZN26simple_config_credential_cD0Ev @ 1137 NONAME
+	_ZN26simple_config_credential_cD1Ev @ 1138 NONAME
+	_ZN26simple_config_credential_cD2Ev @ 1139 NONAME
+	_ZN27abs_crypto_hash_algorithm_cD0Ev @ 1140 NONAME
+	_ZN27abs_crypto_hash_algorithm_cD1Ev @ 1141 NONAME
+	_ZN27abs_crypto_hash_algorithm_cD2Ev @ 1142 NONAME
+	_ZN27abs_crypto_hmac_algorithm_cD0Ev @ 1143 NONAME
+	_ZN27abs_crypto_hmac_algorithm_cD1Ev @ 1144 NONAME
+	_ZN27abs_crypto_hmac_algorithm_cD2Ev @ 1145 NONAME
+	_ZN27eap_am_file_input_symbian_c10file_closeEv @ 1146 NONAME
+	_ZN27eap_am_file_input_symbian_c10file_writeEPK19eap_variable_data_c @ 1147 NONAME
+	_ZN27eap_am_file_input_symbian_c11file_deleteEPK19eap_variable_data_c @ 1148 NONAME
+	_ZN27eap_am_file_input_symbian_c11file_existsEPK19eap_variable_data_c @ 1149 NONAME
+	_ZN27eap_am_file_input_symbian_c14file_read_lineEP19eap_variable_data_c @ 1150 NONAME
+	_ZN27eap_am_file_input_symbian_c9file_copyEPK19eap_variable_data_cS2_ @ 1151 NONAME
+	_ZN27eap_am_file_input_symbian_c9file_openEPK19eap_variable_data_c23eap_file_io_direction_e @ 1152 NONAME
+	_ZN27eap_am_file_input_symbian_c9file_readEP19eap_variable_data_c @ 1153 NONAME
+	_ZN27eap_am_file_input_symbian_c9file_sizeEv @ 1154 NONAME
+	_ZN27eap_am_file_input_symbian_cC1EP18abs_eap_am_tools_c @ 1155 NONAME
+	_ZN27eap_am_file_input_symbian_cC2EP18abs_eap_am_tools_c @ 1156 NONAME
+	_ZN27eap_am_file_input_symbian_cD0Ev @ 1157 NONAME
+	_ZN27eap_am_file_input_symbian_cD1Ev @ 1158 NONAME
+	_ZN27eap_am_file_input_symbian_cD2Ev @ 1159 NONAME
+	_ZN28abs_crypto_block_algorithm_cD0Ev @ 1160 NONAME
+	_ZN28abs_crypto_block_algorithm_cD1Ev @ 1161 NONAME
+	_ZN28abs_crypto_block_algorithm_cD2Ev @ 1162 NONAME
+	_ZN28eapol_ethernet_header_base_c17get_header_lengthEv @ 1163 NONAME
+	_ZN28eapol_ethernet_header_base_c8set_typeE21eapol_ethernet_type_e @ 1164 NONAME
+	_ZN28eapol_ethernet_header_base_cC1EP18abs_eap_am_tools_cPvm @ 1165 NONAME
+	_ZN28eapol_ethernet_header_base_cC2EP18abs_eap_am_tools_cPvm @ 1166 NONAME
+	_ZN28eapol_ethernet_header_base_cD0Ev @ 1167 NONAME
+	_ZN28eapol_ethernet_header_base_cD1Ev @ 1168 NONAME
+	_ZN28eapol_ethernet_header_base_cD2Ev @ 1169 NONAME
+	_ZN29abs_crypto_stream_algorithm_cD0Ev @ 1170 NONAME
+	_ZN29abs_crypto_stream_algorithm_cD1Ev @ 1171 NONAME
+	_ZN29abs_crypto_stream_algorithm_cD2Ev @ 1172 NONAME
+	_ZN30abs_eap_am_memory_store_data_cC1Ev @ 1173 NONAME
+	_ZN30abs_eap_am_memory_store_data_cC2Ev @ 1174 NONAME
+	_ZN30abs_eap_am_memory_store_data_cD0Ev @ 1175 NONAME
+	_ZN30abs_eap_am_memory_store_data_cD1Ev @ 1176 NONAME
+	_ZN30abs_eap_am_memory_store_data_cD2Ev @ 1177 NONAME
+	_ZN30crypto_wpa_psk_password_hash_c12get_is_validEv @ 1178 NONAME
+	_ZN30crypto_wpa_psk_password_hash_c13password_hashEPK19eap_variable_data_cS2_PS0_PvPF12eap_status_eS4_mE @ 1179 NONAME
+	_ZN30crypto_wpa_psk_password_hash_cC1EP18abs_eap_am_tools_c @ 1180 NONAME
+	_ZN30crypto_wpa_psk_password_hash_cC2EP18abs_eap_am_tools_c @ 1181 NONAME
+	_ZN30crypto_wpa_psk_password_hash_cD0Ev @ 1182 NONAME
+	_ZN30crypto_wpa_psk_password_hash_cD1Ev @ 1183 NONAME
+	_ZN30crypto_wpa_psk_password_hash_cD2Ev @ 1184 NONAME
+	_ZN30eap_am_memory_store_tlv_data_c17copy_message_dataEPK22eap_tlv_message_data_cm @ 1185 NONAME
+	_ZN30eap_am_memory_store_tlv_data_c31object_decrease_reference_countEv @ 1186 NONAME
+	_ZN30eap_am_memory_store_tlv_data_c31object_increase_reference_countEv @ 1187 NONAME
+	_ZN30eap_am_memory_store_tlv_data_cC1EP18abs_eap_am_tools_c @ 1188 NONAME
+	_ZN30eap_am_memory_store_tlv_data_cC2EP18abs_eap_am_tools_c @ 1189 NONAME
+	_ZN30eap_am_memory_store_tlv_data_cD0Ev @ 1190 NONAME
+	_ZN30eap_am_memory_store_tlv_data_cD1Ev @ 1191 NONAME
+	_ZN30eap_am_memory_store_tlv_data_cD2Ev @ 1192 NONAME
+	_ZN30eap_process_tlv_message_data_c12get_is_validEv @ 1193 NONAME
+	_ZN30eap_process_tlv_message_data_c15get_type_stringE22eap_tlv_message_type_e @ 1194 NONAME
+	_ZN30eap_process_tlv_message_data_c18add_parameter_dataE12eap_status_e @ 1195 NONAME
+	_ZN30eap_process_tlv_message_data_c18add_parameter_dataE19eap_expanded_type_c @ 1196 NONAME
+	_ZN30eap_process_tlv_message_data_c18add_parameter_dataE22eap_tlv_message_type_em @ 1197 NONAME
+	_ZN30eap_process_tlv_message_data_c18add_parameter_dataE31eap_tlv_message_type_function_e @ 1198 NONAME
+	_ZN30eap_process_tlv_message_data_c18add_parameter_dataE31eapol_key_authentication_type_e @ 1199 NONAME
+	_ZN30eap_process_tlv_message_data_c18add_parameter_dataE38eapol_key_802_11_authentication_mode_e @ 1200 NONAME
+	_ZN30eap_process_tlv_message_data_c18add_parameter_dataEPK11eap_array_cI19eap_expanded_type_cE @ 1201 NONAME
+	_ZN30eap_process_tlv_message_data_c18add_parameter_dataEPK11eap_array_cI23eap_certificate_entry_cE @ 1202 NONAME
+	_ZN30eap_process_tlv_message_data_c18add_parameter_dataEPK11eap_array_cI26simple_config_credential_cE @ 1203 NONAME
+	_ZN30eap_process_tlv_message_data_c18add_parameter_dataEPK11eap_array_cItE @ 1204 NONAME
+	_ZN30eap_process_tlv_message_data_c18add_parameter_dataEPK18eap_buf_chain_wr_c @ 1205 NONAME
+	_ZN30eap_process_tlv_message_data_c18add_parameter_dataEPK19eap_am_network_id_c @ 1206 NONAME
+	_ZN30eap_process_tlv_message_data_c18add_parameter_dataEPK19eap_variable_data_c @ 1207 NONAME
+	_ZN30eap_process_tlv_message_data_c18add_parameter_dataEPK19eap_variable_data_cPK18eap_config_value_c @ 1208 NONAME
+	_ZN30eap_process_tlv_message_data_c18add_parameter_dataEPK19eapol_session_key_c @ 1209 NONAME
+	_ZN30eap_process_tlv_message_data_c18add_parameter_dataEPK21eap_method_settings_c @ 1210 NONAME
+	_ZN30eap_process_tlv_message_data_c18add_parameter_dataEPK23eap_certificate_entry_c @ 1211 NONAME
+	_ZN30eap_process_tlv_message_data_c18add_parameter_dataEPK25eap_general_header_base_c @ 1212 NONAME
+	_ZN30eap_process_tlv_message_data_c18add_parameter_dataEPK28abs_eap_state_notification_c @ 1213 NONAME
+	_ZN30eap_process_tlv_message_data_c18add_parameter_dataEb @ 1214 NONAME
+	_ZN30eap_process_tlv_message_data_c18add_parameter_dataEc @ 1215 NONAME
+	_ZN30eap_process_tlv_message_data_c18add_parameter_dataEh @ 1216 NONAME
+	_ZN30eap_process_tlv_message_data_c18add_parameter_dataEl @ 1217 NONAME
+	_ZN30eap_process_tlv_message_data_c18add_parameter_dataEm @ 1218 NONAME
+	_ZN30eap_process_tlv_message_data_c18add_parameter_dataEs @ 1219 NONAME
+	_ZN30eap_process_tlv_message_data_c18add_parameter_dataEt @ 1220 NONAME
+	_ZN30eap_process_tlv_message_data_c18add_parameter_dataEy @ 1221 NONAME
+	_ZN30eap_process_tlv_message_data_c18get_parameter_dataEPK16eap_tlv_header_cP11eap_array_cI19eap_expanded_type_cE @ 1222 NONAME
+	_ZN30eap_process_tlv_message_data_c18get_parameter_dataEPK16eap_tlv_header_cP11eap_array_cI23eap_certificate_entry_cE @ 1223 NONAME
+	_ZN30eap_process_tlv_message_data_c18get_parameter_dataEPK16eap_tlv_header_cP11eap_array_cI23network_key_and_index_cE @ 1224 NONAME
+	_ZN30eap_process_tlv_message_data_c18get_parameter_dataEPK16eap_tlv_header_cP11eap_array_cI26simple_config_credential_cE @ 1225 NONAME
+	_ZN30eap_process_tlv_message_data_c18get_parameter_dataEPK16eap_tlv_header_cP11eap_array_cItE @ 1226 NONAME
+	_ZN30eap_process_tlv_message_data_c18get_parameter_dataEPK16eap_tlv_header_cP19eap_am_network_id_c @ 1227 NONAME
+	_ZN30eap_process_tlv_message_data_c18get_parameter_dataEPK16eap_tlv_header_cP19eap_expanded_type_c @ 1228 NONAME
+	_ZN30eap_process_tlv_message_data_c18get_parameter_dataEPK16eap_tlv_header_cP19eap_variable_data_c @ 1229 NONAME
+	_ZN30eap_process_tlv_message_data_c18get_parameter_dataEPK16eap_tlv_header_cP19eapol_session_key_c @ 1230 NONAME
+	_ZN30eap_process_tlv_message_data_c18get_parameter_dataEPK16eap_tlv_header_cP21eap_method_settings_c @ 1231 NONAME
+	_ZN30eap_process_tlv_message_data_c18get_parameter_dataEPK16eap_tlv_header_cP23eap_certificate_entry_c @ 1232 NONAME
+	_ZN30eap_process_tlv_message_data_c18get_parameter_dataEPK16eap_tlv_header_cP23network_key_and_index_c @ 1233 NONAME
+	_ZN30eap_process_tlv_message_data_c18get_parameter_dataEPK16eap_tlv_header_cP26simple_config_credential_c @ 1234 NONAME
+	_ZN30eap_process_tlv_message_data_c18get_parameter_dataEPK16eap_tlv_header_cP31eap_tlv_message_type_function_e @ 1235 NONAME
+	_ZN30eap_process_tlv_message_data_c18get_parameter_dataEPK16eap_tlv_header_cPP24eap_state_notification_c @ 1236 NONAME
+	_ZN30eap_process_tlv_message_data_c18get_parameter_dataEPK16eap_tlv_header_cPc @ 1237 NONAME
+	_ZN30eap_process_tlv_message_data_c18get_parameter_dataEPK16eap_tlv_header_cPh @ 1238 NONAME
+	_ZN30eap_process_tlv_message_data_c18get_parameter_dataEPK16eap_tlv_header_cPl @ 1239 NONAME
+	_ZN30eap_process_tlv_message_data_c18get_parameter_dataEPK16eap_tlv_header_cPm @ 1240 NONAME
+	_ZN30eap_process_tlv_message_data_c18get_parameter_dataEPK16eap_tlv_header_cPs @ 1241 NONAME
+	_ZN30eap_process_tlv_message_data_c18get_parameter_dataEPK16eap_tlv_header_cPt @ 1242 NONAME
+	_ZN30eap_process_tlv_message_data_c18get_parameter_dataEPK16eap_tlv_header_cPy @ 1243 NONAME
+	_ZN30eap_process_tlv_message_data_c19get_function_stringE31eap_tlv_message_type_function_e @ 1244 NONAME
+	_ZN30eap_process_tlv_message_data_c19read_parameter_dataEPK11eap_array_cI16eap_tlv_header_cEm22eap_tlv_message_type_eP12eap_status_e @ 1245 NONAME
+	_ZN30eap_process_tlv_message_data_c19read_parameter_dataEPK11eap_array_cI16eap_tlv_header_cEmP19eap_am_network_id_c @ 1246 NONAME
+	_ZN30eap_process_tlv_message_data_c19read_parameter_dataEPK11eap_array_cI16eap_tlv_header_cEmP19eap_expanded_type_c @ 1247 NONAME
+	_ZN30eap_process_tlv_message_data_c19read_parameter_dataEPK11eap_array_cI16eap_tlv_header_cEmP19eap_variable_data_c @ 1248 NONAME
+	_ZN30eap_process_tlv_message_data_c19read_parameter_dataEPK11eap_array_cI16eap_tlv_header_cEmP19eapol_session_key_c @ 1249 NONAME
+	_ZN30eap_process_tlv_message_data_c19read_parameter_dataEPK11eap_array_cI16eap_tlv_header_cEmP21eap_method_settings_c @ 1250 NONAME
+	_ZN30eap_process_tlv_message_data_c19read_parameter_dataEPK11eap_array_cI16eap_tlv_header_cEmP31eap_tlv_message_type_function_e @ 1251 NONAME
+	_ZN30eap_process_tlv_message_data_c19read_parameter_dataEPK11eap_array_cI16eap_tlv_header_cEmP31eapol_key_authentication_type_e @ 1252 NONAME
+	_ZN30eap_process_tlv_message_data_c19read_parameter_dataEPK11eap_array_cI16eap_tlv_header_cEmP31simple_config_Encryption_Type_e @ 1253 NONAME
+	_ZN30eap_process_tlv_message_data_c19read_parameter_dataEPK11eap_array_cI16eap_tlv_header_cEmP33eapol_wlan_authentication_state_e @ 1254 NONAME
+	_ZN30eap_process_tlv_message_data_c19read_parameter_dataEPK11eap_array_cI16eap_tlv_header_cEmP35simple_config_Authentication_Type_e @ 1255 NONAME
+	_ZN30eap_process_tlv_message_data_c19read_parameter_dataEPK11eap_array_cI16eap_tlv_header_cEmP38eapol_key_802_11_authentication_mode_e @ 1256 NONAME
+	_ZN30eap_process_tlv_message_data_c19read_parameter_dataEPK11eap_array_cI16eap_tlv_header_cEmPN23eap_certificate_entry_c22eap_certificate_type_eE @ 1257 NONAME
+	_ZN30eap_process_tlv_message_data_c19read_parameter_dataEPK11eap_array_cI16eap_tlv_header_cEmPN23eapol_RSNA_key_header_c19eapol_RSNA_cipher_eE @ 1258 NONAME
+	_ZN30eap_process_tlv_message_data_c19read_parameter_dataEPK11eap_array_cI16eap_tlv_header_cEmPN23eapol_RSNA_key_header_c29eapol_tkip_mic_failure_type_eE @ 1259 NONAME
+	_ZN30eap_process_tlv_message_data_c19read_parameter_dataEPK11eap_array_cI16eap_tlv_header_cEmPP24eap_state_notification_c @ 1260 NONAME
+	_ZN30eap_process_tlv_message_data_c19read_parameter_dataEPK11eap_array_cI16eap_tlv_header_cEmPS0_I19eap_am_network_id_cE @ 1261 NONAME
+	_ZN30eap_process_tlv_message_data_c19read_parameter_dataEPK11eap_array_cI16eap_tlv_header_cEmPS0_I19eap_expanded_type_cE @ 1262 NONAME
+	_ZN30eap_process_tlv_message_data_c19read_parameter_dataEPK11eap_array_cI16eap_tlv_header_cEmPS0_I23eap_certificate_entry_cE @ 1263 NONAME
+	_ZN30eap_process_tlv_message_data_c19read_parameter_dataEPK11eap_array_cI16eap_tlv_header_cEmPS0_I23network_key_and_index_cE @ 1264 NONAME
+	_ZN30eap_process_tlv_message_data_c19read_parameter_dataEPK11eap_array_cI16eap_tlv_header_cEmPS0_I26simple_config_credential_cE @ 1265 NONAME
+	_ZN30eap_process_tlv_message_data_c19read_parameter_dataEPK11eap_array_cI16eap_tlv_header_cEmPS0_ItE @ 1266 NONAME
+	_ZN30eap_process_tlv_message_data_c19read_parameter_dataEPK11eap_array_cI16eap_tlv_header_cEmPb @ 1267 NONAME
+	_ZN30eap_process_tlv_message_data_c19read_parameter_dataEPK11eap_array_cI16eap_tlv_header_cEmPc @ 1268 NONAME
+	_ZN30eap_process_tlv_message_data_c19read_parameter_dataEPK11eap_array_cI16eap_tlv_header_cEmPh @ 1269 NONAME
+	_ZN30eap_process_tlv_message_data_c19read_parameter_dataEPK11eap_array_cI16eap_tlv_header_cEmPl @ 1270 NONAME
+	_ZN30eap_process_tlv_message_data_c19read_parameter_dataEPK11eap_array_cI16eap_tlv_header_cEmPm @ 1271 NONAME
+	_ZN30eap_process_tlv_message_data_c19read_parameter_dataEPK11eap_array_cI16eap_tlv_header_cEmPs @ 1272 NONAME
+	_ZN30eap_process_tlv_message_data_c19read_parameter_dataEPK11eap_array_cI16eap_tlv_header_cEmPt @ 1273 NONAME
+	_ZN30eap_process_tlv_message_data_c19read_parameter_dataEPK11eap_array_cI16eap_tlv_header_cEmPy @ 1274 NONAME
+	_ZN30eap_process_tlv_message_data_c31add_structured_parameter_headerE22eap_tlv_message_type_em @ 1275 NONAME
+	_ZN30eap_process_tlv_message_data_c31object_decrease_reference_countEv @ 1276 NONAME
+	_ZN30eap_process_tlv_message_data_c31object_increase_reference_countEv @ 1277 NONAME
+	_ZN30eap_process_tlv_message_data_cC1EP18abs_eap_am_tools_c @ 1278 NONAME
+	_ZN30eap_process_tlv_message_data_cC2EP18abs_eap_am_tools_c @ 1279 NONAME
+	_ZN30eap_process_tlv_message_data_cD0Ev @ 1280 NONAME
+	_ZN30eap_process_tlv_message_data_cD1Ev @ 1281 NONAME
+	_ZN30eap_process_tlv_message_data_cD2Ev @ 1282 NONAME
+	_ZN31crypto_eap_fast_hmac_sha1_prf_c10t_prf_initEPK19eap_variable_data_cS2_S2_ @ 1283 NONAME
+	_ZN31crypto_eap_fast_hmac_sha1_prf_c12get_is_validEv @ 1284 NONAME
+	_ZN31crypto_eap_fast_hmac_sha1_prf_c12set_is_validEv @ 1285 NONAME
+	_ZN31crypto_eap_fast_hmac_sha1_prf_c12t_prf_outputEPvt @ 1286 NONAME
+	_ZN31crypto_eap_fast_hmac_sha1_prf_c13t_prf_cleanupEv @ 1287 NONAME
+	_ZN31crypto_eap_fast_hmac_sha1_prf_c14set_is_invalidEv @ 1288 NONAME
+	_ZN31crypto_eap_fast_hmac_sha1_prf_cC1EP18abs_eap_am_tools_c @ 1289 NONAME
+	_ZN31crypto_eap_fast_hmac_sha1_prf_cC2EP18abs_eap_am_tools_c @ 1290 NONAME
+	_ZN31crypto_eap_fast_hmac_sha1_prf_cD0Ev @ 1291 NONAME
+	_ZN31crypto_eap_fast_hmac_sha1_prf_cD1Ev @ 1292 NONAME
+	_ZN31crypto_eap_fast_hmac_sha1_prf_cD2Ev @ 1293 NONAME
+	_ZN32abs_crypto_cbc_block_algorithm_cD0Ev @ 1294 NONAME
+	_ZN32abs_crypto_cbc_block_algorithm_cD1Ev @ 1295 NONAME
+	_ZN32abs_crypto_cbc_block_algorithm_cD2Ev @ 1296 NONAME
+	_ZN32eap_simple_config_trace_string_cC1Ev @ 1297 NONAME
+	_ZN32eap_simple_config_trace_string_cC2Ev @ 1298 NONAME
+	_ZN32eap_simple_config_trace_string_cD0Ev @ 1299 NONAME
+	_ZN32eap_simple_config_trace_string_cD1Ev @ 1300 NONAME
+	_ZN32eap_simple_config_trace_string_cD2Ev @ 1301 NONAME
+	_ZN33crypto_ephemeral_diffie_hellman_c10dh_cleanupEPK19eap_variable_data_c @ 1302 NONAME
+	_ZN33crypto_ephemeral_diffie_hellman_c12get_is_validEv @ 1303 NONAME
+	_ZN33crypto_ephemeral_diffie_hellman_c12set_is_validEv @ 1304 NONAME
+	_ZN33crypto_ephemeral_diffie_hellman_c22generate_g_power_to_xyEPK19eap_variable_data_cS2_PS0_PKvmS5_m @ 1305 NONAME
+	_ZN33crypto_ephemeral_diffie_hellman_c28generate_diffie_hellman_keysEP19eap_variable_data_cS1_PKvmS3_m @ 1306 NONAME
+	_ZN33crypto_ephemeral_diffie_hellman_cC1EP18abs_eap_am_tools_c @ 1307 NONAME
+	_ZN33crypto_ephemeral_diffie_hellman_cC2EP18abs_eap_am_tools_c @ 1308 NONAME
+	_ZN33crypto_ephemeral_diffie_hellman_cD0Ev @ 1309 NONAME
+	_ZN33crypto_ephemeral_diffie_hellman_cD1Ev @ 1310 NONAME
+	_ZN33crypto_ephemeral_diffie_hellman_cD2Ev @ 1311 NONAME
+	_ZNK10eap_core_c19get_is_tunneled_eapEv @ 1312 NONAME
+	_ZNK11EAPSettings5traceEv @ 1313 NONAME
+	_ZNK14eap_am_tools_c14get_trace_maskEv @ 1314 NONAME
+	_ZNK15eap_header_wr_c13get_type_dataEm @ 1315 NONAME
+	_ZNK15eap_header_wr_c20get_type_data_offsetEmm @ 1316 NONAME
+	_ZNK16EapMessageBuffer14GetRequestTypeEv @ 1317 NONAME
+	_ZNK16EapMessageBuffer7GetDataEv @ 1318 NONAME
+	_ZNK16TEapExpandedType11GetVendorIdEv @ 1319 NONAME
+	_ZNK16TEapExpandedType13GetVendorTypeEv @ 1320 NONAME
+	_ZNK16TEapExpandedType7CompareERKS_ @ 1321 NONAME
+	_ZNK16TEapExpandedType8GetValueEv @ 1322 NONAME
+	_ZNK16TEapExpandedTypeeqERKS_ @ 1323 NONAME
+	_ZNK16TEapExpandedTypeneERKS_ @ 1324 NONAME
+	_ZNK16eap_tlv_header_c12check_headerEv @ 1325 NONAME
+	_ZNK16eap_tlv_header_c16get_value_lengthEv @ 1326 NONAME
+	_ZNK16eap_tlv_header_c16get_value_offsetEmm @ 1327 NONAME
+	_ZNK16eap_tlv_header_c8get_typeEv @ 1328 NONAME
+	_ZNK16eap_tlv_header_c9get_valueEm @ 1329 NONAME
+	_ZNK17eap_header_base_c10get_lengthEv @ 1330 NONAME
+	_ZNK17eap_header_base_c12check_headerEv @ 1331 NONAME
+	_ZNK17eap_header_base_c13get_ietf_typeEv @ 1332 NONAME
+	_ZNK17eap_header_base_c13get_type_dataEm @ 1333 NONAME
+	_ZNK17eap_header_base_c14get_identifierEv @ 1334 NONAME
+	_ZNK17eap_header_base_c15get_code_stringEv @ 1335 NONAME
+	_ZNK17eap_header_base_c15get_data_lengthEv @ 1336 NONAME
+	_ZNK17eap_header_base_c15get_data_offsetEmm @ 1337 NONAME
+	_ZNK17eap_header_base_c15get_type_stringEv @ 1338 NONAME
+	_ZNK17eap_header_base_c20get_type_data_lengthEv @ 1339 NONAME
+	_ZNK17eap_header_base_c20get_type_data_offsetEmm @ 1340 NONAME
+	_ZNK17eap_header_base_c21get_type_field_lengthEv @ 1341 NONAME
+	_ZNK17eap_header_base_c8get_codeEv @ 1342 NONAME
+	_ZNK17eap_header_base_c8get_dataEm @ 1343 NONAME
+	_ZNK17eap_header_base_c8get_typeEv @ 1344 NONAME
+	_ZNK17eapol_header_rd_c14get_eap_headerEv @ 1345 NONAME
+	_ZNK18eap_buf_chain_rd_c15get_data_offsetEmm @ 1346 NONAME
+	_ZNK18eap_buf_chain_rd_c19get_ethernet_headerEv @ 1347 NONAME
+	_ZNK18eap_buf_chain_rd_c8get_dataEm @ 1348 NONAME
+	_ZNK18eap_config_value_c12get_is_validEv @ 1349 NONAME
+	_ZNK18eap_config_value_c14get_const_dataEv @ 1350 NONAME
+	_ZNK18eap_config_value_c14get_const_typeEv @ 1351 NONAME
+	_ZNK19EapCertificateEntry10GetIsValidEv @ 1352 NONAME
+	_ZNK19EapCertificateEntry11GetCertTypeEv @ 1353 NONAME
+	_ZNK19EapCertificateEntry12GetIsEnabledEv @ 1354 NONAME
+	_ZNK19EapCertificateEntry13GetIssuerNameEv @ 1355 NONAME
+	_ZNK19EapCertificateEntry13GetThumbprintEv @ 1356 NONAME
+	_ZNK19EapCertificateEntry14GetPrimaryNameEv @ 1357 NONAME
+	_ZNK19EapCertificateEntry14GetSubjectNameEv @ 1358 NONAME
+	_ZNK19EapCertificateEntry15GetLabelPresentEv @ 1359 NONAME
+	_ZNK19EapCertificateEntry15GetSerialNumberEv @ 1360 NONAME
+	_ZNK19EapCertificateEntry15GetSubjectKeyIdEv @ 1361 NONAME
+	_ZNK19EapCertificateEntry16GetSecondaryNameEv @ 1362 NONAME
+	_ZNK19EapCertificateEntry19GetIsEnabledPresentEv @ 1363 NONAME
+	_ZNK19EapCertificateEntry20GetIssuerNamePresentEv @ 1364 NONAME
+	_ZNK19EapCertificateEntry20GetThumbprintPresentEv @ 1365 NONAME
+	_ZNK19EapCertificateEntry21GetPrimaryNamePresentEv @ 1366 NONAME
+	_ZNK19EapCertificateEntry21GetSubjectNamePresentEv @ 1367 NONAME
+	_ZNK19EapCertificateEntry22GetSerialNumberPresentEv @ 1368 NONAME
+	_ZNK19EapCertificateEntry22GetSubjectKeyIdPresentEv @ 1369 NONAME
+	_ZNK19EapCertificateEntry23GetSecondaryNamePresentEv @ 1370 NONAME
+	_ZNK19EapCertificateEntry5traceEv @ 1371 NONAME
+	_ZNK19EapCertificateEntry8GetLabelEv @ 1372 NONAME
+	_ZNK19eap_am_mutex_base_c12get_is_validEv @ 1373 NONAME
+	_ZNK19eap_am_mutex_base_c13get_referenceEv @ 1374 NONAME
+	_ZNK19eap_am_mutex_base_c15get_is_reservedEv @ 1375 NONAME
+	_ZNK19eap_am_network_id_c10get_sourceEv @ 1376 NONAME
+	_ZNK19eap_am_network_id_c12get_is_validEv @ 1377 NONAME
+	_ZNK19eap_am_network_id_c13get_source_idEv @ 1378 NONAME
+	_ZNK19eap_am_network_id_c14get_network_idEv @ 1379 NONAME
+	_ZNK19eap_am_network_id_c15get_destinationEv @ 1380 NONAME
+	_ZNK19eap_am_network_id_c17get_is_valid_dataEv @ 1381 NONAME
+	_ZNK19eap_am_network_id_c17get_source_lengthEv @ 1382 NONAME
+	_ZNK19eap_am_network_id_c18compare_network_idEPKS_ @ 1383 NONAME
+	_ZNK19eap_am_network_id_c18get_destination_idEv @ 1384 NONAME
+	_ZNK19eap_am_network_id_c22get_destination_lengthEv @ 1385 NONAME
+	_ZNK19eap_am_network_id_c4copyEv @ 1386 NONAME
+	_ZNK19eap_am_network_id_c8get_typeEv @ 1387 NONAME
+	_ZNK19eap_core_nak_info_c18get_eap_identifierEv @ 1388 NONAME
+	_ZNK19eap_core_nak_info_c21get_proposed_eap_typeEv @ 1389 NONAME
+	_ZNK19eap_expanded_type_c12get_is_validEv @ 1390 NONAME
+	_ZNK19eap_expanded_type_c13get_type_dataEP18abs_eap_am_tools_cP22eap_type_ietf_values_e @ 1391 NONAME
+	_ZNK19eap_expanded_type_c13get_type_dataEP18abs_eap_am_tools_cPS_ @ 1392 NONAME
+	_ZNK19eap_expanded_type_c13get_vendor_idEv @ 1393 NONAME
+	_ZNK19eap_expanded_type_c15get_vendor_typeEv @ 1394 NONAME
+	_ZNK19eap_expanded_type_c17get_is_valid_dataEv @ 1395 NONAME
+	_ZNK19eap_expanded_type_c22get_expanded_type_dataEP18abs_eap_am_tools_cP19eap_variable_data_c @ 1396 NONAME
+	_ZNK19eap_expanded_type_c4copyEv @ 1397 NONAME
+	_ZNK19eap_expanded_type_c7compareEPKS_ @ 1398 NONAME
+	_ZNK19eap_expanded_type_cadEv @ 1399 NONAME
+	_ZNK19eap_expanded_type_ceqE22eap_type_ietf_values_e @ 1400 NONAME
+	_ZNK19eap_expanded_type_ceqERKS_ @ 1401 NONAME
+	_ZNK19eap_expanded_type_cneE22eap_type_ietf_values_e @ 1402 NONAME
+	_ZNK19eap_expanded_type_cneERKS_ @ 1403 NONAME
+	_ZNK19eap_variable_data_c10get_bufferEm @ 1404 NONAME
+	_ZNK19eap_variable_data_c12get_is_validEv @ 1405 NONAME
+	_ZNK19eap_variable_data_c14compare_lengthEPKS_m @ 1406 NONAME
+	_ZNK19eap_variable_data_c14compare_lengthEPKvmm @ 1407 NONAME
+	_ZNK19eap_variable_data_c15get_data_lengthEv @ 1408 NONAME
+	_ZNK19eap_variable_data_c15get_data_offsetEmm @ 1409 NONAME
+	_ZNK19eap_variable_data_c15get_is_writableEv @ 1410 NONAME
+	_ZNK19eap_variable_data_c17get_buffer_lengthEv @ 1411 NONAME
+	_ZNK19eap_variable_data_c17get_buffer_offsetEmm @ 1412 NONAME
+	_ZNK19eap_variable_data_c17get_is_valid_dataEv @ 1413 NONAME
+	_ZNK19eap_variable_data_c4copyEv @ 1414 NONAME
+	_ZNK19eap_variable_data_c4hashEm @ 1415 NONAME
+	_ZNK19eap_variable_data_c7compareEPKS_ @ 1416 NONAME
+	_ZNK19eap_variable_data_c7compareEPKvm @ 1417 NONAME
+	_ZNK19eap_variable_data_c8get_dataEm @ 1418 NONAME
+	_ZNK19eap_variable_data_c8get_dataEv @ 1419 NONAME
+	_ZNK19eapol_header_base_c11get_versionEv @ 1420 NONAME
+	_ZNK19eapol_header_base_c12check_headerEv @ 1421 NONAME
+	_ZNK19eapol_header_base_c15get_data_lengthEv @ 1422 NONAME
+	_ZNK19eapol_header_base_c15get_packet_typeEv @ 1423 NONAME
+	_ZNK19eapol_header_base_c15get_type_stringEv @ 1424 NONAME
+	_ZNK19eapol_header_base_c8get_dataEm @ 1425 NONAME
+	_ZNK19eapol_session_key_c12get_is_validEv @ 1426 NONAME
+	_ZNK19eapol_session_key_c12get_key_typeEv @ 1427 NONAME
+	_ZNK19eapol_session_key_c13get_key_indexEv @ 1428 NONAME
+	_ZNK19eapol_session_key_c14get_key_tx_bitEv @ 1429 NONAME
+	_ZNK19eapol_session_key_c19get_sequence_numberEv @ 1430 NONAME
+	_ZNK19eapol_session_key_c7get_keyEv @ 1431 NONAME
+	_ZNK20eap_buf_chain_base_c11get_encryptEv @ 1432 NONAME
+	_ZNK20eap_buf_chain_base_c12check_guardsEv @ 1433 NONAME
+	_ZNK20eap_buf_chain_base_c12get_is_validEv @ 1434 NONAME
+	_ZNK20eap_buf_chain_base_c13get_is_clientEv @ 1435 NONAME
+	_ZNK20eap_buf_chain_base_c15get_data_lengthEv @ 1436 NONAME
+	_ZNK20eap_buf_chain_base_c15get_data_offsetEmm @ 1437 NONAME
+	_ZNK20eap_buf_chain_base_c17check_guard_bytesEPKh @ 1438 NONAME
+	_ZNK20eap_buf_chain_base_c17get_buffer_lengthEv @ 1439 NONAME
+	_ZNK20eap_buf_chain_base_c17get_is_valid_dataEv @ 1440 NONAME
+	_ZNK20eap_buf_chain_base_c17get_stack_addressEv @ 1441 NONAME
+	_ZNK20eap_buf_chain_base_c20get_do_length_checksEv @ 1442 NONAME
+	_ZNK20eap_buf_chain_base_c8get_dataEm @ 1443 NONAME
+	_ZNK20eap_rogue_ap_entry_c15get_mac_addressEPh @ 1444 NONAME
+	_ZNK20eap_rogue_ap_entry_c15get_mac_addressEv @ 1445 NONAME
+	_ZNK20eap_rogue_ap_entry_c16get_rogue_reasonEv @ 1446 NONAME
+	_ZNK20eap_rogue_ap_entry_c4copyEv @ 1447 NONAME
+	_ZNK20eap_type_selection_c12get_is_validEv @ 1448 NONAME
+	_ZNK20eap_type_selection_c14get_is_enabledEv @ 1449 NONAME
+	_ZNK20eap_type_selection_c17get_is_valid_dataEv @ 1450 NONAME
+	_ZNK20eap_type_selection_c4copyEv @ 1451 NONAME
+	_ZNK20eap_type_selection_c8get_typeEv @ 1452 NONAME
+	_ZNK22eap_am_mutex_symbian_c12get_is_validEv @ 1453 NONAME
+	_ZNK22eap_am_mutex_symbian_c15get_is_reservedEv @ 1454 NONAME
+	_ZNK22eap_am_mutex_symbian_c16get_owner_threadEv @ 1455 NONAME
+	_ZNK22eap_am_mutex_symbian_c9get_mutexEv @ 1456 NONAME
+	_ZNK22eap_am_tools_symbian_c12get_is_validEv @ 1457 NONAME
+	_ZNK22eap_tlv_message_data_c16get_message_dataEv @ 1458 NONAME
+	_ZNK22eap_tlv_message_data_c23get_message_data_lengthEv @ 1459 NONAME
+	_ZNK23eap_am_crypto_symbian_c12get_is_validEv @ 1460 NONAME
+	_ZNK23network_key_and_index_c21get_network_key_constEv @ 1461 NONAME
+	_ZNK23network_key_and_index_c21get_network_key_indexEv @ 1462 NONAME
+	_ZNK24eap_master_session_key_c12get_eap_typeEv @ 1463 NONAME
+	_ZNK24eap_master_session_key_c17get_leap_passwordEv @ 1464 NONAME
+	_ZNK24eap_state_notification_c12get_eap_typeEv @ 1465 NONAME
+	_ZNK24eap_state_notification_c12get_protocolEv @ 1466 NONAME
+	_ZNK24eap_state_notification_c13get_is_clientEv @ 1467 NONAME
+	_ZNK24eap_state_notification_c17get_current_stateEv @ 1468 NONAME
+	_ZNK24eap_state_notification_c18get_eap_identifierEv @ 1469 NONAME
+	_ZNK24eap_state_notification_c18get_previous_stateEv @ 1470 NONAME
+	_ZNK24eap_state_notification_c18get_protocol_layerEv @ 1471 NONAME
+	_ZNK24eap_state_notification_c19get_protocol_stringEv @ 1472 NONAME
+	_ZNK24eap_state_notification_c19get_send_network_idEv @ 1473 NONAME
+	_ZNK24eap_state_notification_c23get_notification_stringEv @ 1474 NONAME
+	_ZNK24eap_state_notification_c24get_authentication_errorEv @ 1475 NONAME
+	_ZNK24eap_state_notification_c24get_current_state_stringEv @ 1476 NONAME
+	_ZNK24eap_state_notification_c25get_previous_state_stringEv @ 1477 NONAME
+	_ZNK24eap_state_notification_c25get_protocol_layer_stringEv @ 1478 NONAME
+	_ZNK24eap_state_notification_c26get_allow_send_eap_successEv @ 1479 NONAME
+	_ZNK24eap_state_notification_c32get_needs_confirmation_from_userEv @ 1480 NONAME
+	_ZNK25eap_core_retransmission_c12get_eap_codeEv @ 1481 NONAME
+	_ZNK25eap_core_retransmission_c12get_eap_typeEv @ 1482 NONAME
+	_ZNK25eap_core_retransmission_c12get_is_validEv @ 1483 NONAME
+	_ZNK25eap_core_retransmission_c15get_buffer_sizeEv @ 1484 NONAME
+	_ZNK25eap_core_retransmission_c15get_data_lengthEv @ 1485 NONAME
+	_ZNK25eap_core_retransmission_c15get_sent_packetEv @ 1486 NONAME
+	_ZNK25eap_core_retransmission_c17get_header_offsetEv @ 1487 NONAME
+	_ZNK25eap_core_retransmission_c18get_eap_identifierEv @ 1488 NONAME
+	_ZNK25eap_core_retransmission_c26get_retransmission_counterEv @ 1489 NONAME
+	_ZNK25eap_general_header_base_c12get_am_toolsEv @ 1490 NONAME
+	_ZNK25eap_general_header_base_c12get_is_validEv @ 1491 NONAME
+	_ZNK25eap_general_header_base_c17get_header_bufferEm @ 1492 NONAME
+	_ZNK25eap_general_header_base_c17get_header_offsetEmm @ 1493 NONAME
+	_ZNK25eap_general_header_base_c24get_header_buffer_lengthEv @ 1494 NONAME
+	_ZNK25eap_network_id_selector_c4copyEv @ 1495 NONAME
+	_ZNK26eap_static_expanded_type_c8get_typeEv @ 1496 NONAME
+	_ZNK26eapol_ethernet_header_rd_c16get_eapol_headerEv @ 1497 NONAME
+	_ZNK26eapol_ethernet_header_wr_c16get_eapol_headerEv @ 1498 NONAME
+	_ZNK26simple_config_credential_c14get_SSID_constEv @ 1499 NONAME
+	_ZNK26simple_config_credential_c17get_network_indexEv @ 1500 NONAME
+	_ZNK26simple_config_credential_c21get_MAC_address_constEv @ 1501 NONAME
+	_ZNK26simple_config_credential_c22get_network_keys_constEv @ 1502 NONAME
+	_ZNK28eapol_ethernet_header_base_c10get_sourceEv @ 1503 NONAME
+	_ZNK28eapol_ethernet_header_base_c12check_headerEv @ 1504 NONAME
+	_ZNK28eapol_ethernet_header_base_c15get_data_lengthEv @ 1505 NONAME
+	_ZNK28eapol_ethernet_header_base_c15get_destinationEv @ 1506 NONAME
+	_ZNK28eapol_ethernet_header_base_c17get_source_lengthEv @ 1507 NONAME
+	_ZNK28eapol_ethernet_header_base_c22get_destination_lengthEv @ 1508 NONAME
+	_ZNK28eapol_ethernet_header_base_c8get_dataEm @ 1509 NONAME
+	_ZNK28eapol_ethernet_header_base_c8get_typeEv @ 1510 NONAME
+	_ZNK30eap_am_memory_store_tlv_data_c12get_timer_idEv @ 1511 NONAME
+	_ZNK30eap_am_memory_store_tlv_data_c16get_message_dataEv @ 1512 NONAME
+	_ZNK30eap_am_memory_store_tlv_data_c23get_message_data_lengthEv @ 1513 NONAME
+	_ZNK30eap_process_tlv_message_data_c16get_payload_sizeEPK11eap_array_cI19eap_expanded_type_cE @ 1514 NONAME
+	_ZNK30eap_process_tlv_message_data_c16get_payload_sizeEPK11eap_array_cI23eap_certificate_entry_cE @ 1515 NONAME
+	_ZNK30eap_process_tlv_message_data_c16get_payload_sizeEPK11eap_array_cI23network_key_and_index_cE @ 1516 NONAME
+	_ZNK30eap_process_tlv_message_data_c16get_payload_sizeEPK11eap_array_cI26simple_config_credential_cE @ 1517 NONAME
+	_ZNK30eap_process_tlv_message_data_c16get_payload_sizeEPK11eap_array_cItE @ 1518 NONAME
+	_ZNK30eap_process_tlv_message_data_c16get_payload_sizeEPK19eap_am_network_id_c @ 1519 NONAME
+	_ZNK30eap_process_tlv_message_data_c16get_payload_sizeEPK19eap_variable_data_c @ 1520 NONAME
+	_ZNK30eap_process_tlv_message_data_c16get_payload_sizeEPK19eap_variable_data_cPK18eap_config_value_c @ 1521 NONAME
+	_ZNK30eap_process_tlv_message_data_c16get_payload_sizeEPK19eapol_session_key_c @ 1522 NONAME
+	_ZNK30eap_process_tlv_message_data_c16get_payload_sizeEPK21eap_method_settings_c @ 1523 NONAME
+	_ZNK30eap_process_tlv_message_data_c16get_payload_sizeEPK23eap_certificate_entry_c @ 1524 NONAME
+	_ZNK30eap_process_tlv_message_data_c16get_payload_sizeEPK23network_key_and_index_c @ 1525 NONAME
+	_ZNK30eap_process_tlv_message_data_c16get_payload_sizeEPK26simple_config_credential_c @ 1526 NONAME
+	_ZNK30eap_process_tlv_message_data_c16get_payload_sizeEPK28abs_eap_state_notification_c @ 1527 NONAME
+	_ZNK32eap_simple_config_trace_string_c16get_state_stringE21simple_config_state_e @ 1528 NONAME
+	_ZNK32eap_simple_config_trace_string_c23get_message_type_stringE28simple_config_Message_Type_e @ 1529 NONAME
+	_ZNK32eap_simple_config_trace_string_c25get_attribute_type_stringE30simple_config_Attribute_Type_e @ 1530 NONAME
+	_ZTI10eap_core_c @ 1531 NONAME
+	_ZTI11EAPSettings @ 1532 NONAME
+	_ZTI12crypto_aes_c @ 1533 NONAME
+	_ZTI12crypto_cbc_c @ 1534 NONAME
+	_ZTI12crypto_dsa_c @ 1535 NONAME
+	_ZTI12crypto_md4_c @ 1536 NONAME
+	_ZTI12crypto_md5_c @ 1537 NONAME
+	_ZTI12crypto_rc4_c @ 1538 NONAME
+	_ZTI12crypto_rsa_c @ 1539 NONAME
+	_ZTI13crypto_hmac_c @ 1540 NONAME
+	_ZTI13crypto_sha1_c @ 1541 NONAME
+	_ZTI14eap_am_tools_c @ 1542 NONAME
+	_ZTI15EapMessageQueue @ 1543 NONAME
+	_ZTI15crypto_random_c @ 1544 NONAME
+	_ZTI15eap_base_type_c @ 1545 NONAME
+	_ZTI15eap_header_rd_c @ 1546 NONAME
+	_ZTI15eap_header_wr_c @ 1547 NONAME
+	_ZTI16EapMessageBuffer @ 1548 NONAME
+	_ZTI16EapServerStrings @ 1549 NONAME
+	_ZTI16TEapExpandedType @ 1550 NONAME
+	_ZTI16crypto_nt_hash_c @ 1551 NONAME
+	_ZTI16crypto_sha_256_c @ 1552 NONAME
+	_ZTI16crypto_tls_prf_c @ 1553 NONAME
+	_ZTI16eap_tlv_header_c @ 1554 NONAME
+	_ZTI17crypto_3des_ede_c @ 1555 NONAME
+	_ZTI17crypto_aes_wrap_c @ 1556 NONAME
+	_ZTI17eap_file_config_c @ 1557 NONAME
+	_ZTI17eap_header_base_c @ 1558 NONAME
+	_ZTI17eap_timer_queue_c @ 1559 NONAME
+	_ZTI17eapol_header_rd_c @ 1560 NONAME
+	_ZTI17eapol_header_wr_c @ 1561 NONAME
+	_ZTI18abs_eap_am_mutex_c @ 1562 NONAME
+	_ZTI18eap_buf_chain_rd_c @ 1563 NONAME
+	_ZTI18eap_buf_chain_wr_c @ 1564 NONAME
+	_ZTI18eap_config_value_c @ 1565 NONAME
+	_ZTI18eap_session_core_c @ 1566 NONAME
+	_ZTI19EapCertificateEntry @ 1567 NONAME
+	_ZTI19eap_am_crypto_md4_c @ 1568 NONAME
+	_ZTI19eap_am_crypto_rc4_c @ 1569 NONAME
+	_ZTI19eap_am_mutex_base_c @ 1570 NONAME
+	_ZTI19eap_am_network_id_c @ 1571 NONAME
+	_ZTI19eap_core_nak_info_c @ 1572 NONAME
+	_ZTI19eap_header_string_c @ 1573 NONAME
+	_ZTI19eap_method_values_c @ 1574 NONAME
+	_ZTI19eap_status_string_c @ 1575 NONAME
+	_ZTI19eap_variable_data_c @ 1576 NONAME
+	_ZTI19eapol_header_base_c @ 1577 NONAME
+	_ZTI19eapol_session_key_c @ 1578 NONAME
+	_ZTI20crypto_tls_md5_prf_c @ 1579 NONAME
+	_ZTI20eap_am_crypto_sha1_c @ 1580 NONAME
+	_ZTI20eap_buf_chain_base_c @ 1581 NONAME
+	_ZTI20eap_rogue_ap_entry_c @ 1582 NONAME
+	_ZTI20eap_type_selection_c @ 1583 NONAME
+	_ZTI21crypto_tls_base_prf_c @ 1584 NONAME
+	_ZTI21crypto_tls_sha1_prf_c @ 1585 NONAME
+	_ZTI21eap_am_memory_store_c @ 1586 NONAME
+	_ZTI21eap_method_settings_c @ 1587 NONAME
+	_ZTI21tls_peap_tlv_header_c @ 1588 NONAME
+	_ZTI22eap_am_mutex_symbian_c @ 1589 NONAME
+	_ZTI22eap_am_tools_symbian_c @ 1590 NONAME
+	_ZTI22eap_timer_queue_hash_c @ 1591 NONAME
+	_ZTI22eap_tlv_message_data_c @ 1592 NONAME
+	_ZTI23crypto_kd_hmac_sha256_c @ 1593 NONAME
+	_ZTI23eap_am_crypto_sha_256_c @ 1594 NONAME
+	_ZTI23eap_am_crypto_symbian_c @ 1595 NONAME
+	_ZTI23eap_certificate_entry_c @ 1596 NONAME
+	_ZTI23eap_session_core_base_c @ 1597 NONAME
+	_ZTI23eap_timer_queue_event_c @ 1598 NONAME
+	_ZTI23network_key_and_index_c @ 1599 NONAME
+	_ZTI24eap_am_mutex_reference_c @ 1600 NONAME
+	_ZTI24eap_master_session_key_c @ 1601 NONAME
+	_ZTI24eap_state_notification_c @ 1602 NONAME
+	_ZTI25eap_core_retransmission_c @ 1603 NONAME
+	_ZTI25eap_general_header_base_c @ 1604 NONAME
+	_ZTI25eap_network_id_selector_c @ 1605 NONAME
+	_ZTI26eapol_ethernet_header_rd_c @ 1606 NONAME
+	_ZTI26eapol_ethernet_header_wr_c @ 1607 NONAME
+	_ZTI26simple_config_credential_c @ 1608 NONAME
+	_ZTI27abs_crypto_hash_algorithm_c @ 1609 NONAME
+	_ZTI27abs_crypto_hmac_algorithm_c @ 1610 NONAME
+	_ZTI27eap_am_file_input_symbian_c @ 1611 NONAME
+	_ZTI28abs_crypto_block_algorithm_c @ 1612 NONAME
+	_ZTI28eapol_ethernet_header_base_c @ 1613 NONAME
+	_ZTI29abs_crypto_stream_algorithm_c @ 1614 NONAME
+	_ZTI30abs_eap_am_memory_store_data_c @ 1615 NONAME
+	_ZTI30crypto_wpa_psk_password_hash_c @ 1616 NONAME
+	_ZTI30eap_am_memory_store_tlv_data_c @ 1617 NONAME
+	_ZTI30eap_process_tlv_message_data_c @ 1618 NONAME
+	_ZTI31crypto_eap_fast_hmac_sha1_prf_c @ 1619 NONAME
+	_ZTI32abs_crypto_cbc_block_algorithm_c @ 1620 NONAME
+	_ZTI32eap_simple_config_trace_string_c @ 1621 NONAME
+	_ZTI33crypto_ephemeral_diffie_hellman_c @ 1622 NONAME
+	_ZTV10eap_core_c @ 1623 NONAME
+	_ZTV11EAPSettings @ 1624 NONAME
+	_ZTV12crypto_aes_c @ 1625 NONAME
+	_ZTV12crypto_cbc_c @ 1626 NONAME
+	_ZTV12crypto_dsa_c @ 1627 NONAME
+	_ZTV12crypto_md4_c @ 1628 NONAME
+	_ZTV12crypto_md5_c @ 1629 NONAME
+	_ZTV12crypto_rc4_c @ 1630 NONAME
+	_ZTV12crypto_rsa_c @ 1631 NONAME
+	_ZTV13crypto_hmac_c @ 1632 NONAME
+	_ZTV13crypto_sha1_c @ 1633 NONAME
+	_ZTV14eap_am_tools_c @ 1634 NONAME
+	_ZTV15EapMessageQueue @ 1635 NONAME
+	_ZTV15crypto_random_c @ 1636 NONAME
+	_ZTV15eap_base_type_c @ 1637 NONAME
+	_ZTV15eap_header_rd_c @ 1638 NONAME
+	_ZTV15eap_header_wr_c @ 1639 NONAME
+	_ZTV16EapMessageBuffer @ 1640 NONAME
+	_ZTV16EapServerStrings @ 1641 NONAME
+	_ZTV16TEapExpandedType @ 1642 NONAME
+	_ZTV16crypto_nt_hash_c @ 1643 NONAME
+	_ZTV16crypto_sha_256_c @ 1644 NONAME
+	_ZTV16crypto_tls_prf_c @ 1645 NONAME
+	_ZTV16eap_tlv_header_c @ 1646 NONAME
+	_ZTV17crypto_3des_ede_c @ 1647 NONAME
+	_ZTV17crypto_aes_wrap_c @ 1648 NONAME
+	_ZTV17eap_file_config_c @ 1649 NONAME
+	_ZTV17eap_header_base_c @ 1650 NONAME
+	_ZTV17eap_timer_queue_c @ 1651 NONAME
+	_ZTV17eapol_header_rd_c @ 1652 NONAME
+	_ZTV17eapol_header_wr_c @ 1653 NONAME
+	_ZTV18abs_eap_am_mutex_c @ 1654 NONAME
+	_ZTV18eap_buf_chain_rd_c @ 1655 NONAME
+	_ZTV18eap_buf_chain_wr_c @ 1656 NONAME
+	_ZTV18eap_config_value_c @ 1657 NONAME
+	_ZTV18eap_session_core_c @ 1658 NONAME
+	_ZTV19EapCertificateEntry @ 1659 NONAME
+	_ZTV19eap_am_crypto_md4_c @ 1660 NONAME
+	_ZTV19eap_am_crypto_rc4_c @ 1661 NONAME
+	_ZTV19eap_am_mutex_base_c @ 1662 NONAME
+	_ZTV19eap_am_network_id_c @ 1663 NONAME
+	_ZTV19eap_core_nak_info_c @ 1664 NONAME
+	_ZTV19eap_header_string_c @ 1665 NONAME
+	_ZTV19eap_method_values_c @ 1666 NONAME
+	_ZTV19eap_status_string_c @ 1667 NONAME
+	_ZTV19eap_variable_data_c @ 1668 NONAME
+	_ZTV19eapol_header_base_c @ 1669 NONAME
+	_ZTV19eapol_session_key_c @ 1670 NONAME
+	_ZTV20crypto_tls_md5_prf_c @ 1671 NONAME
+	_ZTV20eap_am_crypto_sha1_c @ 1672 NONAME
+	_ZTV20eap_buf_chain_base_c @ 1673 NONAME
+	_ZTV20eap_rogue_ap_entry_c @ 1674 NONAME
+	_ZTV20eap_type_selection_c @ 1675 NONAME
+	_ZTV21crypto_tls_base_prf_c @ 1676 NONAME
+	_ZTV21crypto_tls_sha1_prf_c @ 1677 NONAME
+	_ZTV21eap_am_memory_store_c @ 1678 NONAME
+	_ZTV21eap_method_settings_c @ 1679 NONAME
+	_ZTV21tls_peap_tlv_header_c @ 1680 NONAME
+	_ZTV22eap_am_mutex_symbian_c @ 1681 NONAME
+	_ZTV22eap_am_tools_symbian_c @ 1682 NONAME
+	_ZTV22eap_timer_queue_hash_c @ 1683 NONAME
+	_ZTV22eap_tlv_message_data_c @ 1684 NONAME
+	_ZTV23crypto_kd_hmac_sha256_c @ 1685 NONAME
+	_ZTV23eap_am_crypto_sha_256_c @ 1686 NONAME
+	_ZTV23eap_am_crypto_symbian_c @ 1687 NONAME
+	_ZTV23eap_certificate_entry_c @ 1688 NONAME
+	_ZTV23eap_session_core_base_c @ 1689 NONAME
+	_ZTV23eap_timer_queue_event_c @ 1690 NONAME
+	_ZTV23network_key_and_index_c @ 1691 NONAME
+	_ZTV24eap_am_mutex_reference_c @ 1692 NONAME
+	_ZTV24eap_master_session_key_c @ 1693 NONAME
+	_ZTV24eap_state_notification_c @ 1694 NONAME
+	_ZTV25eap_core_retransmission_c @ 1695 NONAME
+	_ZTV25eap_general_header_base_c @ 1696 NONAME
+	_ZTV25eap_network_id_selector_c @ 1697 NONAME
+	_ZTV26eapol_ethernet_header_rd_c @ 1698 NONAME
+	_ZTV26eapol_ethernet_header_wr_c @ 1699 NONAME
+	_ZTV26simple_config_credential_c @ 1700 NONAME
+	_ZTV27abs_crypto_hash_algorithm_c @ 1701 NONAME
+	_ZTV27abs_crypto_hmac_algorithm_c @ 1702 NONAME
+	_ZTV27eap_am_file_input_symbian_c @ 1703 NONAME
+	_ZTV28abs_crypto_block_algorithm_c @ 1704 NONAME
+	_ZTV28eapol_ethernet_header_base_c @ 1705 NONAME
+	_ZTV29abs_crypto_stream_algorithm_c @ 1706 NONAME
+	_ZTV30abs_eap_am_memory_store_data_c @ 1707 NONAME
+	_ZTV30crypto_wpa_psk_password_hash_c @ 1708 NONAME
+	_ZTV30eap_am_memory_store_tlv_data_c @ 1709 NONAME
+	_ZTV30eap_process_tlv_message_data_c @ 1710 NONAME
+	_ZTV31crypto_eap_fast_hmac_sha1_prf_c @ 1711 NONAME
+	_ZTV32abs_crypto_cbc_block_algorithm_c @ 1712 NONAME
+	_ZTV32eap_simple_config_trace_string_c @ 1713 NONAME
+	_ZTV33crypto_ephemeral_diffie_hellman_c @ 1714 NONAME
+	_ZThn12_N10eap_core_c12get_is_validEv @ 1715 NONAME
+	_ZThn12_N10eap_core_c12set_is_validEv @ 1716 NONAME
+	_ZThn12_N10eap_core_c14packet_processEPK19eap_am_network_id_cP25eap_general_header_base_cm @ 1717 NONAME
+	_ZThn12_N10eap_core_c8shutdownEv @ 1718 NONAME
+	_ZThn12_N10eap_core_c9configureEv @ 1719 NONAME
+	_ZThn12_N10eap_core_cD0Ev @ 1720 NONAME
+	_ZThn12_N10eap_core_cD1Ev @ 1721 NONAME
+	_ZThn12_N18eap_session_core_c12get_is_validEv @ 1722 NONAME
+	_ZThn12_N18eap_session_core_c12set_is_validEv @ 1723 NONAME
+	_ZThn12_N18eap_session_core_c14packet_processEPK19eap_am_network_id_cP25eap_general_header_base_cm @ 1724 NONAME
+	_ZThn12_N18eap_session_core_c8shutdownEv @ 1725 NONAME
+	_ZThn12_N18eap_session_core_c9configureEv @ 1726 NONAME
+	_ZThn12_N18eap_session_core_cD0Ev @ 1727 NONAME
+	_ZThn12_N18eap_session_core_cD1Ev @ 1728 NONAME
+	_ZThn16_N18eap_session_core_c12get_is_validEv @ 1729 NONAME
+	_ZThn16_N18eap_session_core_c14packet_processEPK19eap_am_network_id_cP25eap_general_header_base_cm @ 1730 NONAME
+	_ZThn16_N18eap_session_core_c15eap_acknowledgeEPK19eap_am_network_id_c @ 1731 NONAME
+	_ZThn16_N18eap_session_core_c18create_eap_sessionEPK19eap_am_network_id_c @ 1732 NONAME
+	_ZThn16_N18eap_session_core_c18remove_eap_sessionEbPK19eap_am_network_id_c @ 1733 NONAME
+	_ZThn16_N18eap_session_core_c23cancel_all_eap_sessionsEv @ 1734 NONAME
+	_ZThn16_N18eap_session_core_c25send_eap_identity_requestEPK19eap_am_network_id_c @ 1735 NONAME
+	_ZThn16_N18eap_session_core_c30get_802_11_authentication_modeEPK19eap_am_network_id_c31eapol_key_authentication_type_ePK19eap_variable_data_cS6_ @ 1736 NONAME
+	_ZThn16_N18eap_session_core_c33set_eap_database_reference_valuesEPK19eap_variable_data_c @ 1737 NONAME
+	_ZThn16_N18eap_session_core_c5resetEv @ 1738 NONAME
+	_ZThn16_N18eap_session_core_c8shutdownEv @ 1739 NONAME
+	_ZThn16_N18eap_session_core_c9configureEv @ 1740 NONAME
+	_ZThn16_N18eap_session_core_cD0Ev @ 1741 NONAME
+	_ZThn16_N18eap_session_core_cD1Ev @ 1742 NONAME
+	_ZThn4_N10eap_core_c11load_moduleE19eap_expanded_type_cS0_P19abs_eap_base_type_cPP15eap_base_type_cbPK19eap_am_network_id_c @ 1743 NONAME
+	_ZThn4_N10eap_core_c11packet_sendEPK19eap_am_network_id_cP18eap_buf_chain_wr_cmmm @ 1744 NONAME
+	_ZThn4_N10eap_core_c12add_rogue_apER11eap_array_cI20eap_rogue_ap_entry_cE @ 1745 NONAME
+	_ZThn4_N10eap_core_c12cancel_timerEP20abs_eap_base_timer_cm @ 1746 NONAME
+	_ZThn4_N10eap_core_c13unload_moduleE19eap_expanded_type_c @ 1747 NONAME
+	_ZThn4_N10eap_core_c14read_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 1748 NONAME
+	_ZThn4_N10eap_core_c15write_configureEPK25eap_configuration_field_cP19eap_variable_data_c @ 1749 NONAME
+	_ZThn4_N10eap_core_c17get_eap_type_listEP11eap_array_cI19eap_expanded_type_cE @ 1750 NONAME
+	_ZThn4_N10eap_core_c17get_header_offsetEPmS0_ @ 1751 NONAME
+	_ZThn4_N10eap_core_c18state_notificationEPK28abs_eap_state_notification_c @ 1752 NONAME
+	_ZThn4_N10eap_core_c19set_session_timeoutEm @ 1753 NONAME
+	_ZThn4_N10eap_core_c22get_saved_eap_identityEP19eap_variable_data_c @ 1754 NONAME
+	_ZThn4_N10eap_core_c22restart_authenticationEPK19eap_am_network_id_cb @ 1755 NONAME
+	_ZThn4_N10eap_core_c23check_is_valid_eap_typeE19eap_expanded_type_c @ 1756 NONAME
+	_ZThn4_N10eap_core_c23packet_data_crypto_keysEPK19eap_am_network_id_cPK24eap_master_session_key_c @ 1757 NONAME
+	_ZThn4_N10eap_core_c23set_authentication_roleEb @ 1758 NONAME
+	_ZThn4_N10eap_core_c27complete_eap_identity_queryEPK19eap_am_network_id_cPK19eap_variable_data_ch @ 1759 NONAME
+	_ZThn4_N10eap_core_c9set_timerEP20abs_eap_base_timer_cmPvm @ 1760 NONAME
+	_ZThn4_N10eap_core_cD0Ev @ 1761 NONAME
+	_ZThn4_N10eap_core_cD1Ev @ 1762 NONAME
+	_ZThn4_N14eap_am_tools_cD0Ev @ 1763 NONAME
+	_ZThn4_N14eap_am_tools_cD1Ev @ 1764 NONAME
+	_ZThn4_N18eap_session_core_cD0Ev @ 1765 NONAME
+	_ZThn4_N18eap_session_core_cD1Ev @ 1766 NONAME
+	_ZThn4_N21eap_am_memory_store_c13timer_expiredEmPv @ 1767 NONAME
+	_ZThn4_N21eap_am_memory_store_c17timer_delete_dataEmPv @ 1768 NONAME
+	_ZThn4_N21eap_am_memory_store_cD0Ev @ 1769 NONAME
+	_ZThn4_N21eap_am_memory_store_cD1Ev @ 1770 NONAME
+	_ZThn4_N22eap_am_mutex_symbian_cD0Ev @ 1771 NONAME
+	_ZThn4_N22eap_am_mutex_symbian_cD1Ev @ 1772 NONAME
+	_ZThn4_N22eap_am_tools_symbian_cD0Ev @ 1773 NONAME
+	_ZThn4_N22eap_am_tools_symbian_cD1Ev @ 1774 NONAME
+	_ZThn4_NK10eap_core_c19get_is_tunneled_eapEv @ 1775 NONAME
+	_ZThn536_N22eap_am_tools_symbian_cD0Ev @ 1776 NONAME
+	_ZThn536_N22eap_am_tools_symbian_cD1Ev @ 1777 NONAME
+	_ZThn8_N10eap_core_c13timer_expiredEmPv @ 1778 NONAME
+	_ZThn8_N10eap_core_c17timer_delete_dataEmPv @ 1779 NONAME
+	_ZThn8_N10eap_core_cD0Ev @ 1780 NONAME
+	_ZThn8_N10eap_core_cD1Ev @ 1781 NONAME
+	_ZThn8_N18eap_session_core_c13timer_expiredEmPv @ 1782 NONAME
+	_ZThn8_N18eap_session_core_c17timer_delete_dataEmPv @ 1783 NONAME
+	_ZThn8_N18eap_session_core_cD0Ev @ 1784 NONAME
+	_ZThn8_N18eap_session_core_cD1Ev @ 1785 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/tools/eabi/eaptraceu.def	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+	_Z22eap_trace_data_symbianPKcPKvj @ 1 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/tools/group/bld.inf	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,46 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Build information file for tools objects used by all other modules. This must be compiled first before any other module.
+*
+*/
+
+/*
+* %version: %
+*/
+
+#ifndef _EAP_TOOLS_GROUP_BLD_INF_
+#define _EAP_TOOLS_GROUP_BLD_INF_
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+
+PRJ_MMPFILES
+
+// Eap Trace
+eaptrace.mmp
+
+// Eap Tools
+eaptools.mmp
+
+// Eap Tools for Symbian
+eapsymbiantools.mmp
+
+#endif //#ifndef _EAP_TOOLS_GROUP_BLD_INF_
+
+// End of file.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/tools/group/eapsymbiantools.mmp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,86 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Project definition file for project EAPOL
+*
+*/
+
+/*
+* %version: %
+*/
+
+//-------------------------------------------------------------------
+
+#include <platform_paths.hrh>
+#include "../../group/eapol.mmh"
+
+//-------------------------------------------------------------------
+CAPABILITY ALL -TCB
+VENDORID VID_DEFAULT
+
+TARGET			eapsymbiantools.dll
+TARGETTYPE		dll
+UID			0x1000008d  0x20026fd0
+
+deffile eapsymbiantools.def
+
+SOURCEPATH ../../am/common/symbian
+SOURCE EapExpandedType.cpp
+SOURCE EapPluginTools.cpp
+
+///////////////////////////////////////////////////////////////////
+
+LANG	SC
+
+//USERINCLUDE ..
+USERINCLUDE ../../am/type/symbian/plugin/include
+USERINCLUDE ../../am/common
+USERINCLUDE ../../../eapol_common/am/common
+USERINCLUDE ../../am/include
+USERINCLUDE ../../../eapol_common/am/include
+USERINCLUDE ../../../eapol_common/include
+USERINCLUDE ../../../eapol_common/type
+USERINCLUDE ../../../eapol_common/am/common/DSS_random
+USERINCLUDE ../../../eapol_common/type/tls_peap/tls/include
+USERINCLUDE ../../../eapol_common/type/simple_config/simple_config/include
+USERINCLUDE ../../../eapol_common/type/simple_config/eap/include
+
+#if defined(EAP_USE_WPXM)
+USERINCLUDE ../../../eapol_common/wpx_include
+#endif //#if defined(EAP_USE_WPXM)
+USERINCLUDE ../../eap_if/include
+USERINCLUDE ../../eap_server/include
+
+
+SYSTEMINCLUDE	/epoc32/include/ecom
+SYSTEMINCLUDE	/epoc32/include/kernel 
+SYSTEMINCLUDE	/epoc32/include/libc
+SYSTEMINCLUDE	/epoc32/include/libc/netinet
+
+
+MW_LAYER_SYSTEMINCLUDE // For the MiddleWare domain headers.
+
+LIBRARY		eaptools.lib eaptrace.lib
+LIBRARY		ecom.lib 
+LIBRARY		euser.lib hash.lib random.lib cryptography.lib efsrv.lib asn1.lib edbms.lib
+LIBRARY     charconv.lib 
+
+MACRO USE_EAP_INTERFACE_EXPORTS
+
+// exports unfrozen in winscw
+#if defined(WINSCW)
+EXPORTUNFROZEN
+#endif
+
+//-------------------------------------------------------------------
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/tools/group/eaptools.mmp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,176 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Project definition file for project EAPOL
+*
+*/
+
+/*
+* %version: 10 %
+*/
+
+//-------------------------------------------------------------------
+
+#include <platform_paths.hrh>
+#include "../../group/eapol.mmh"
+
+//-------------------------------------------------------------------
+CAPABILITY ALL -TCB
+VENDORID VID_DEFAULT
+
+TARGET			eaptools.dll
+TARGETTYPE		dll
+UID			0x1000008d  0x20026FC8
+
+deffile eaptools.def
+
+SOURCEPATH ../../am/common/symbian 
+SOURCE dll_entry.cpp
+SOURCE eap_am_tools_symbian.cpp
+
+// This source uses Symbian crypto library.
+SOURCEPATH ../../am/common/symbian
+SOURCE eap_am_crypto_symbian.cpp
+SOURCE eap_am_mutex_symbian.cpp
+SOURCE EapConversion.cpp
+SOURCE EapExpandedType.cpp
+SOURCE EapMessageQueue.cpp
+SOURCE EapSettings.cpp
+
+SOURCEPATH ../../eap_server/src/
+SOURCE EapServerStrings.cpp
+
+SOURCEPATH	../../am/common/DSS_random
+SOURCE dss_random_symbian.cpp
+
+#if defined(USE_EAP_ASSERT_STACK_TRACE)
+SOURCEPATH ../../../eapol_common/am/common/stack
+SOURCE eap_am_stack_trace.cpp
+#endif //#if defined(USE_EAP_ASSERT_STACK_TRACE)
+
+SOURCEPATH	../../../eapol_common/am/common/crypto/md4
+SOURCE eap_am_crypto_md4.cpp
+
+SOURCEPATH	../../../eapol_common/am/common/crypto/rc4
+SOURCE eap_am_crypto_rc4.cpp
+
+SOURCEPATH	../../../eapol_common/am/common/crypto/sha1
+SOURCE eap_am_crypto_sha1.cpp
+
+SOURCEPATH	../../../eapol_common/am/common/crypto/sha-256
+SOURCE eap_am_crypto_sha_256.cpp
+
+SOURCEPATH	../../../eapol_common/am/common
+SOURCE eap_am_memory.cpp
+SOURCE eap_am_network_id.cpp
+SOURCE eap_am_tools.cpp
+SOURCE eap_timer_queue.cpp
+SOURCE eap_am_memory_store.cpp
+SOURCE eap_am_memory_store_data.cpp
+SOURCE abs_eap_am_mutex.cpp
+SOURCE eap_file_config.cpp
+
+SOURCEPATH	../../am/common/file_io/symbian
+SOURCE eap_am_file_input_symbian.cpp
+
+LIBRARY bafl.lib
+
+///////////////////////////////////////////////////////////////////
+
+LANG	SC
+
+SOURCEPATH	../../../eapol_common/common
+SOURCE eap_base_type.cpp
+SOURCE eap_buffer.cpp
+SOURCE eap_crypto_api.cpp
+SOURCE eap_header.cpp
+SOURCE eap_expanded_type.cpp
+SOURCE eap_header_string.cpp
+SOURCE eap_state_notification.cpp
+SOURCE eap_tools.cpp
+SOURCE eap_status_string.cpp
+SOURCE eap_variable_data.cpp
+SOURCE eap_master_session_key.cpp
+SOURCE eap_general_header_base.cpp
+SOURCE eap_rogue_ap_entry.cpp
+SOURCE eap_memory_store_variable_data.cpp
+SOURCE eapol_session_key.cpp
+SOURCE eap_network_id_selector.cpp
+SOURCE eapol_ethernet_header.cpp
+SOURCE eapol_header.cpp
+SOURCE eap_tlv_header.cpp
+SOURCE eap_tlv_message_data.cpp
+SOURCE eap_method_settings.cpp
+
+SOURCEPATH	../../../eapol_common/core
+SOURCE eap_core.cpp
+SOURCE eap_core_nak_info.cpp
+SOURCE eap_core_retransmission.cpp
+SOURCE eap_session_core.cpp
+SOURCE eap_type_selection.cpp
+SOURCE eap_process_tlv_message_data.cpp
+SOURCE eap_session_core_base.cpp
+
+SOURCEPATH	../../am/eap_test_timer/symbian 
+SOURCE eap_test_timer.cpp
+
+SOURCEPATH ../../../eapol_common/type/tls_peap/tls/src
+SOURCE tls_peap_tlv_header.cpp
+
+SOURCEPATH ../../../eapol_common/type/simple_config/simple_config/src
+SOURCE simple_config_credential.cpp
+SOURCE simple_config_types.cpp
+
+USERINCLUDE ..
+USERINCLUDE ../../am/type/symbian/plugin/include
+USERINCLUDE ../../am/common
+USERINCLUDE ../../../eapol_common/am/common
+USERINCLUDE ../../am/include
+USERINCLUDE ../../../eapol_common/am/include
+USERINCLUDE ../../../eapol_common/include
+USERINCLUDE ../../../eapol_common/type
+USERINCLUDE ../../../eapol_common/am/common/DSS_random
+USERINCLUDE ../../../eapol_common/type/tls_peap/tls/include
+USERINCLUDE ../../../eapol_common/type/simple_config/simple_config/include
+USERINCLUDE ../../../eapol_common/type/simple_config/eap/include
+
+#if defined(EAP_USE_WPXM)
+USERINCLUDE ../../../eapol_common/wpx_include
+#endif //#if defined(EAP_USE_WPXM)
+USERINCLUDE ../../eap_if/include
+USERINCLUDE ../../eap_server/include
+
+
+SYSTEMINCLUDE	/epoc32/include/ecom
+SYSTEMINCLUDE	/epoc32/include/kernel 
+SYSTEMINCLUDE	/epoc32/include/libc
+SYSTEMINCLUDE	/epoc32/include/libc/netinet
+
+
+MW_LAYER_SYSTEMINCLUDE // For the MiddleWare domain headers.
+
+// Note, do not add eapsymbiantools.lib here. This library cannot use eapsymbiantools.lib because eapsymbiantools.lib already uses eaptools.lib.
+LIBRARY		ecom.lib
+LIBRARY		eaptrace.lib
+LIBRARY		euser.lib hash.lib random.lib cryptography.lib efsrv.lib asn1.lib edbms.lib
+LIBRARY     charconv.lib
+
+MACRO USE_EAP_INTERFACE_EXPORTS
+
+// exports unfrozen in winscw
+#if defined(WINSCW) 
+EXPORTUNFROZEN
+#endif
+
+//-------------------------------------------------------------------
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/eapol/eapol_framework/eapol_symbian/tools/group/eaptrace.mmp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,81 @@
+/*
+* Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Project definition file for project EAPOL
+*
+*/
+
+/*
+* %version: %
+*/
+
+//-------------------------------------------------------------------
+
+#include <platform_paths.hrh>
+#include "../../group/eapol.mmh"
+
+//-------------------------------------------------------------------
+CAPABILITY ALL -TCB
+VENDORID VID_DEFAULT
+
+TARGET			eaptrace.dll
+TARGETTYPE		dll
+UID			0x1000008d  0x2002b38f
+
+deffile eaptrace.def
+
+SOURCEPATH ../../am/common/symbian
+SOURCE eap_am_trace_symbian.cpp
+
+///////////////////////////////////////////////////////////////////
+
+LANG	SC
+
+//USERINCLUDE ..
+USERINCLUDE ../../am/type/symbian/plugin/include
+USERINCLUDE ../../am/common
+USERINCLUDE ../../../eapol_common/am/common
+USERINCLUDE ../../am/include
+USERINCLUDE ../../../eapol_common/am/include
+USERINCLUDE ../../../eapol_common/include
+USERINCLUDE ../../../eapol_common/type
+USERINCLUDE ../../../eapol_common/am/common/DSS_random
+USERINCLUDE ../../../eapol_common/type/tls_peap/tls/include
+USERINCLUDE ../../../eapol_common/type/simple_config/simple_config/include
+USERINCLUDE ../../../eapol_common/type/simple_config/eap/include
+
+USERINCLUDE ../../eap_if/include
+USERINCLUDE ../../eap_server/include
+
+
+SYSTEMINCLUDE	/epoc32/include/ecom
+SYSTEMINCLUDE	/epoc32/include/kernel 
+SYSTEMINCLUDE	/epoc32/include/libc
+SYSTEMINCLUDE	/epoc32/include/libc/netinet
+
+
+MW_LAYER_SYSTEMINCLUDE // For the MiddleWare domain headers.
+
+LIBRARY		ecom.lib 
+LIBRARY		euser.lib hash.lib random.lib cryptography.lib efsrv.lib asn1.lib edbms.lib
+LIBRARY     charconv.lib 
+
+MACRO USE_EAP_INTERFACE_EXPORTS
+
+// exports unfrozen in winscw
+#if defined(WINSCW)
+EXPORTUNFROZEN
+#endif
+
+//-------------------------------------------------------------------
+// End of File
--- a/eapol/group/bld.inf	Thu May 13 22:51:27 2010 +0300
+++ b/eapol/group/bld.inf	Mon May 24 20:32:47 2010 +0300
@@ -25,6 +25,8 @@
 PRJ_EXPORTS
 
 PRJ_MMPFILES
+// Tools libraries are used by many other modules. Tools libraries must be build first.
+#include "../eapol_framework/eapol_symbian/tools/group/bld.inf"
 #include "../eapol_framework/eapol_symbian/group/bld.inf"
 
 PRJ_TESTMMPFILES
--- a/group/bld.inf	Thu May 13 22:51:27 2010 +0300
+++ b/group/bld.inf	Mon May 24 20:32:47 2010 +0300
@@ -1,23 +1,21 @@
 /*
-* Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
+* under the terms of the License "Symbian Foundation License v1.0"
 * which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
 *
 * Initial Contributors:
 * Nokia Corporation - initial contribution.
 *
 * Contributors:
 *
-* Description: Build information file for all project in eapol subsystem 
+* Description:  Build information file for all project in 
+*                eapol subsystem
 *
 */
 
-/*
-* %version: 8 %
-*/
 
 PRJ_PLATFORMS
 DEFAULT
@@ -25,7 +23,8 @@
 PRJ_EXPORTS
 
 PRJ_MMPFILES
+// Tools libraries are used by many other modules. Tools libraries must be build first.
 #include "../accesssec_plat/group/bld.inf"
 #include "../eapol/group/bld.inf"
 
-PRJ_TESTMMPFILES
\ No newline at end of file
+PRJ_TESTMMPFILES
--- a/layers.sysdef.xml	Thu May 13 22:51:27 2010 +0300
+++ b/layers.sysdef.xml	Mon May 24 20:32:47 2010 +0300
@@ -7,7 +7,6 @@
   <systemModel>
     <layer name="mw_layer">
       <module name="accesssec">
-        <unit unitID="netdo.accesssec" mrp="" bldFile="&layer_real_source_path;/group" name="accesssec" />
         <unit unitID="netdo.accesssecqt" mrp="" bldFile="&layer_real_source_path;" name="accesssecqt" proFile="accesssec.pro" qmakeArgs="-r"/>
      </module>
     </layer>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/cpeapuiplugins/cpeapsimakaui/cpeapsimakaui.pro	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,67 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#   Project info file for Control Panel SIM/AKA settings plugin. 
+#
+
+# %version:  9 %
+
+
+TEMPLATE = lib
+TARGET = cpeapsimakaui
+DEPENDPATH +=
+
+INCLUDEPATH += \
+    ../../inc
+
+CONFIG += hb \
+    plugin
+
+LIBS += -lcpframework \
+        -leapqtconfiginterface \
+        -leapqtplugininfo 
+
+MOC_DIR    = _moc
+RCC_DIR    = _rcc
+OBJECTS_DIR= _objects
+
+
+# Sources
+HEADERS +=  \
+    ../inc/eapuidefs.h \
+    inc/cpeapsimakaui.h \
+    inc/cpeapsimakaplugin.h   
+
+SOURCES += \ 
+    src/cpeapsimakaui.cpp \
+    src/cpeapsimakaplugin.cpp
+
+symbian: { 
+    TARGET.EPOCALLOWDLLDATA = 1
+    TARGET.UID3 = 0x2002C2F9  
+    TARGET.CAPABILITY = CAP_GENERAL_DLL
+
+    deploy.path = C:
+    qtplugins.path = /resource/qt/plugins/controlpanel/eapsecurity
+    qtplugins.sources += qmakepluginstubs/cpeapsimakaui.qtplugin
+
+    for(qtplugin, qtplugins.sources):BLD_INF_RULES.prj_exports += "./$$qtplugin $$deploy.path$$qtplugins.path/$$basename(qtplugin)"
+    
+    BLD_INF_RULES.prj_exports += \ 
+  		"rom/cpeapsimakaui.iby CORE_MW_LAYER_IBY_EXPORT_PATH(cpeapsimakaui.iby)"
+}
+
+plugin.sources += cpeapsimakaui.dll
+plugin.path = /resource/qt/plugins/controlpanel/eapsecurity
+DEPLOYMENT += plugin
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/cpeapuiplugins/cpeapsimakaui/inc/cpeapsimakaplugin.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   Control Panel QT plugin for EAP-SIM and EAP-AKA 
+ *   method configuration
+ *
+ */
+
+/*
+ * %version:  6 %
+ */
+
+#ifndef CPEAPSIMAKAPLUGIN_H
+#define CPEAPSIMAKAPLUGIN_H
+
+// System includes
+#include <QObject>
+// User includes
+#include "cpeapplugininterface.h"
+
+// Forward declarations
+
+// External data types
+
+// Constants
+
+/*!
+ * @addtogroup group_eap_ui_plugin_simaka
+ * @{
+ */
+class CpEapSimAkaPlugin: public QObject, public CpEapPluginInterface
+{
+    Q_OBJECT
+    Q_INTERFACES(CpEapPluginInterface)
+
+public:
+    CpEapSimAkaPlugin();
+    ~CpEapSimAkaPlugin();
+
+    void setSettingsReference(const EapQtConfigInterface::EapBearerType bearer, const int iapId);
+    QList<EapQtPluginInfo> pluginInfo();
+    CpBaseSettingView* uiInstance(const EapQtPluginHandle& outerHandle,
+        const EapQtPluginInfo &plugin);
+
+private:
+    EapQtConfigInterface::EapBearerType mBearer;
+    int mIapId;
+};
+
+/*! @} */
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/cpeapuiplugins/cpeapsimakaui/inc/cpeapsimakaui.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   Control Panel QT UI for EAP-SIM and EAP-AKA method configuration
+ *
+ */
+
+/*
+ * %version:  11 %
+ */
+
+#ifndef CPEAPSIMAKAUI_H
+#define CPEAPSIMAKAUI_H
+
+// System includes
+#include <cpbasesettingview.h>
+#include <eapqtconfiginterface.h>
+#include <eapqtplugininfo.h>
+#include <eapqtpluginhandle.h>
+
+// User includes
+
+// Forward declarations
+class HbDataForm;
+class HbDataFormModel;
+class CpSettingFormItemData;
+class EapQtValidator;
+
+// External data types
+
+// Constants
+
+/*!
+ * @addtogroup group_eap_ui_plugin_simaka
+ * @{
+ */
+
+class CpEapSimAkaUi: public CpBaseSettingView
+{
+Q_OBJECT
+
+public:
+    CpEapSimAkaUi(
+        const EapQtConfigInterface::EapBearerType bearer,
+        const int iapId,
+        const EapQtPluginInfo &plugin,
+        const EapQtPluginHandle& outerHandle);
+    ~CpEapSimAkaUi();
+
+protected:
+    void close();
+    
+private:
+    void initializeSimAkaUi();
+    bool checkStateToBool(const int state);
+    int boolToCheckState(const bool state);
+    void storeSettings();
+    bool validate();
+    bool validateGroup(CpSettingFormItemData *edit, CpSettingFormItemData *checkBox,
+        EapQtValidator* validator);
+
+private slots:
+    void setValidator(const QModelIndex);
+    void usernameAutomaticChanged(int state);
+    void realmAutomaticChanged(int state);
+
+private:
+    QScopedPointer <EapQtConfigInterface> mConfigIf;
+    EapQtPluginInfo mPluginInfo;
+    EapQtPluginHandle mOuterHandle;
+    HbDataForm *mForm;
+    HbDataFormModel *mModel;
+    CpSettingFormItemData *mUsernameAutomatic;
+    CpSettingFormItemData *mUsername;
+    CpSettingFormItemData *mRealmAutomatic;
+    CpSettingFormItemData *mRealm;
+
+    EapQtValidator *mValidatorRealm;
+    EapQtValidator *mValidatorUsername;
+};
+
+/*! @} */
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/cpeapuiplugins/cpeapsimakaui/rom/cpeapsimakaui.iby	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Image description file for SIM/AKA UI
+*
+*/
+
+/*
+ * %version:  3 %
+ */
+ 
+#ifndef CPEAPSIMAKAUI_IBY
+#define CPEAPSIMAKAUI_IBY
+
+#include <data_caging_paths_for_iby.hrh>
+#include <bldvariant.hrh>
+
+#ifdef __PROTOCOL_WLAN
+
+file=ABI_DIR\BUILD_DIR\cpeapsimakaui.dll SHARED_LIB_DIR\cpeapsimakaui.dll
+data=/epoc32/data/c/resource/qt/plugins/controlpanel/eapsecurity/cpeapsimakaui.qtplugin   resource/qt/plugins/controlpanel/eapsecurity/cpeapsimakaui.qtplugin 
+
+#endif // __PROTOCOL_WLAN
+
+#endif // CPEAPSIMAKAUI_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/cpeapuiplugins/cpeapsimakaui/src/cpeapsimakaplugin.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   Control Panel QT plugin for EAP-SIM and EAP-AKA 
+ *   method configuration
+ *
+ */
+
+/*
+ * %version:  8 %
+ */
+
+// System includes
+#include <eapqtpluginhandle.h>
+
+// User includes
+#include "cpeapsimakaplugin.h"
+#include "cpeapsimakaui.h"
+#include "eapuidefs.h"
+
+/*!
+ * \class CpEapSimAkaPlugin
+ * \brief Control Panel QT plugin for EAP-SIM and EAP-AKA method configuration. 
+ */
+
+// External function prototypes
+
+// Local constants
+
+// Order numbers
+static const int order_eapsim(60);
+static const int order_eapaka(70);
+
+Q_EXPORT_PLUGIN2(CpEapSimAkaPlugin, CpEapSimAkaPlugin)
+;
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+ * Constructor.
+ */
+CpEapSimAkaPlugin::CpEapSimAkaPlugin() :
+    mBearer(EapQtConfigInterface::EapBearerTypeWlan),
+    mIapId(EapQtConfigInterface::IapIdUndefined)
+{
+    // Nothing to be done
+    qDebug("CpEapSimAkaPlugin created");
+}
+
+/*!
+ * Destructor.
+ */
+CpEapSimAkaPlugin::~CpEapSimAkaPlugin()
+{
+    // Nothing to be done
+    // UI instances are owned and deallocated by CP framework
+    qDebug("CpEapSimAkaPlugin destroyed");
+}
+
+/*!
+ * See CpEapPluginInterface::setSettingsReference()
+ * 
+ * @param bearer Bearer of the accessed settings
+ * @param iapId ID of the accessed IAP
+ */
+void CpEapSimAkaPlugin::setSettingsReference(const EapQtConfigInterface::EapBearerType bearer,
+    const int iapId)
+{
+    mBearer = bearer;
+    mIapId = iapId;
+}
+
+/*!
+ * See CpEapPluginInterface::pluginInfo()
+ * 
+ * @return Plugin info (EAP-SIM and EAP-AKA)
+ */
+QList<EapQtPluginInfo> CpEapSimAkaPlugin::pluginInfo()
+{
+    qDebug("CpEapSimAkaPlugin: provide plugin info");
+    QList<EapQtPluginInfo> ret;
+
+    ret.append(EapQtPluginInfo(EapQtPluginHandle::PluginEapSim,  
+        EapUiStrings::EapSim, order_eapsim) );
+    
+    ret.append(EapQtPluginInfo(EapQtPluginHandle::PluginEapAka, 
+        EapUiStrings::EapAka, order_eapaka) );
+
+    return ret;
+}
+
+/*!
+ * See CpEapPluginInterface::uiInstance()
+ * 
+ * Creates UI instance
+ * 
+ * @param outerHandle Plugin handle to outer EAP type.
+ * @param plugin Plugin info
+ * 
+ * @return SIM/AKA UI instance
+ */
+CpBaseSettingView* CpEapSimAkaPlugin::uiInstance(
+    const EapQtPluginHandle& outerHandle,
+    const EapQtPluginInfo &plugin)
+{
+    qDebug("CpEapSimAkaPlugin: create UI instance");
+
+    Q_ASSERT(mIapId != EapQtConfigInterface::IapIdUndefined);
+
+    // instance is owned and deallocated by CP framework
+    return new CpEapSimAkaUi(mBearer, mIapId, plugin, outerHandle);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/cpeapuiplugins/cpeapsimakaui/src/cpeapsimakaui.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,359 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   Control Panel QT UI for EAP-SIM and EAP-AKA method configuration
+ *
+ */
+
+/*
+ * %version:  15 %
+ */
+
+// System includes
+#include <HbDataForm>
+#include <HbDataFormModel>
+#include <HbDataFormViewItem>
+#include <HbMessageBox> 
+#include <HbAction>
+#include <HbLineEdit>
+#include <cpsettingformitemdata.h>
+#include <cpitemdatahelper.h>
+#include <eapqtvalidator.h>
+#include <eapqtexpandedeaptype.h>
+
+// User includes
+#include "cpeapsimakaui.h"
+
+/*!
+ * \class CpEapSimAkaUi
+ * \brief Implementes EAP-SIM and EAP-AKA method configuration ui. 
+ */
+
+// External function prototypes
+
+// Local constants
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+ * Constructor.
+ * 
+ * @param bearer        Bearer type of the accessed configuration.
+ * @param iapId         IAP ID of the accessed configuration.
+ * @param plugin        Plugin.
+ * @param outerHandle   Outer handle.
+ */
+CpEapSimAkaUi::CpEapSimAkaUi(
+    const EapQtConfigInterface::EapBearerType bearer,
+    const int iapId,
+    const EapQtPluginInfo &plugin,
+    const EapQtPluginHandle& outerHandle) :
+        mConfigIf(new EapQtConfigInterface(bearer, iapId)),
+        mPluginInfo(plugin),
+        mOuterHandle(outerHandle),
+        mForm(NULL),
+        mModel(NULL),
+        mUsernameAutomatic(NULL),
+        mUsername(NULL),
+        mRealmAutomatic(NULL),
+        mRealm(NULL),
+        mValidatorRealm(NULL),
+        mValidatorUsername(NULL)
+{
+    qDebug("CpEapSimAkaUi::CpEapSimAkaUi");
+
+    // IAP must be valid in construction (check includes
+    // EapQtConfigInterface::IapIdUndefined)
+    if (iapId < 0) {
+        QT_THROW(std::bad_alloc());
+        // scoped pointer gets deleted automaticaly on exception
+    }
+
+    initializeSimAkaUi();
+}
+
+/*!
+ * Destructor.
+ */
+CpEapSimAkaUi::~CpEapSimAkaUi()
+{
+    qDebug("CpEapSimAkaUi::~CpEapSimAkaUi");
+
+    delete mValidatorRealm;
+    delete mValidatorUsername;
+
+    // mConfigIf: scoped pointer deleted automatically
+}
+
+/*!
+ * Initializes the sim-aka ui and initializes objects based on configuration
+ * read from the database.
+ */
+void CpEapSimAkaUi::initializeSimAkaUi()
+{
+    qDebug("CpEapSimAkaUi::initializeSimAkaUi");
+
+    CpItemDataHelper itemDataHelper;
+
+    // Read Configurations
+    EapQtConfig eapConfig;
+    bool configurationRead = mConfigIf->readConfiguration(mOuterHandle, mPluginInfo.pluginHandle(),
+        eapConfig);
+    if (!configurationRead) {
+        qDebug("CpEapSimAkaUi::initializeSimAkaUi - read configuration failed.");
+    }
+    
+    // Create UI objects and group 
+    mForm = new HbDataForm();
+    this->setWidget(mForm);
+    
+    mModel = new HbDataFormModel(mForm);
+    HbDataFormModelItem *groupItem = new HbDataFormModelItem(HbDataFormModelItem::GroupItem,
+        hbTrId("txt_occ_subhead_eap_module_settings").arg(mPluginInfo.localizationId()));
+    mModel->appendDataFormItem(groupItem);
+
+    // Connect signal to add validators when items get activated (visualization created).
+    bool connected = connect(mForm, SIGNAL( itemShown(const QModelIndex&) ), this,
+        SLOT( setValidator(const QModelIndex) ));
+    Q_ASSERT(connected);
+
+    // UsernameAutomatic
+    mUsernameAutomatic = new CpSettingFormItemData(HbDataFormModelItem::CheckBoxItem, hbTrId(
+        "txt_occ_setlabel_user_name"));
+    mUsernameAutomatic->setContentWidgetData("text", hbTrId(
+        "txt_occ_setlabel_user_name_val_generate_automatica"));
+    // Initialize the value from EapQtConfig
+    // Generate username automatically is selected by default
+    mUsernameAutomatic->setContentWidgetData("checkState", boolToCheckState(eapConfig.value(
+        EapQtConfig::UsernameAutomatic).toBool()));
+    // Connect signal to disable/enable username when usernameAutomatic changed   
+    mForm->addConnection(mUsernameAutomatic, SIGNAL(stateChanged(int)), this,
+        SLOT(usernameAutomaticChanged(int)));
+    groupItem->appendChild(mUsernameAutomatic);
+
+    //Username
+    mUsername = new CpSettingFormItemData(HbDataFormModelItem::TextItem, hbTrId(
+        "txt_occ_setlabel_user_name"));
+    mUsername->setContentWidgetData("text", eapConfig.value(EapQtConfig::Username));
+    // Dimmed username if usernameAutomatic selected
+    usernameAutomaticChanged(mUsernameAutomatic->contentWidgetData("checkState") == Qt::Checked);
+    groupItem->appendChild(mUsername);
+
+    // RealmAutomatic
+    mRealmAutomatic = new CpSettingFormItemData(HbDataFormModelItem::CheckBoxItem, hbTrId(
+        "txt_occ_setlabel_realm"));
+    mRealmAutomatic->setContentWidgetData("text", hbTrId(
+        "txt_occ_setlabel_realm_val_generate_automatically"));
+    // Initialize the value from EapQtConfig
+    // Generate realm automatically is selected by default
+    mRealmAutomatic->setContentWidgetData("checkState", boolToCheckState(eapConfig.value(
+        EapQtConfig::RealmAutomatic).toBool()));
+    // connect signal to disable/enable realm when realmAutomatic changed 
+    mForm->addConnection(mRealmAutomatic, SIGNAL(stateChanged(int)), this,
+        SLOT(realmAutomaticChanged(int)));
+    groupItem->appendChild(mRealmAutomatic);
+
+    //Realm
+    mRealm = new CpSettingFormItemData(HbDataFormModelItem::TextItem, hbTrId(
+        "txt_occ_setlabel_realm"));
+    mRealm->setContentWidgetData("text", eapConfig.value(EapQtConfig::Realm));
+    // Dimmed realm if realmAutomatic selected
+    realmAutomaticChanged(mRealmAutomatic->contentWidgetData("checkState") == Qt::Checked);
+    groupItem->appendChild(mRealm);
+
+    // Set the model
+    itemDataHelper.bindToForm(mForm);
+    mForm->setModel(mModel);
+
+    // Expand simakaui settings group
+    mForm->setExpanded(mModel->indexFromItem(groupItem), TRUE);
+}
+
+/*!
+ * Adds validators.
+ * 
+ * @param modelIndex Model index
+ */
+void CpEapSimAkaUi::setValidator(const QModelIndex modelIndex)
+{
+    qDebug("CpEapUserPasswordUi::itemActivated");
+
+    HbDataFormViewItem *viewItem = qobject_cast<HbDataFormViewItem *>
+        (mForm->itemByIndex(modelIndex));
+    HbDataFormModelItem *modelItem = mModel->itemFromIndex(modelIndex);
+    
+    if (modelItem == mUsername) {
+        // When username lineEdit is activated (shown) first time, validator is added
+        if (NULL == mValidatorUsername) {
+            mValidatorUsername = mConfigIf->validatorEap(mPluginInfo.pluginHandle().type(),
+                EapQtConfig::Username);           
+        }
+        HbLineEdit *edit = qobject_cast<HbLineEdit *> (viewItem->dataItemContentWidget());
+        mValidatorUsername->updateEditor(edit);
+    }
+    else if (modelItem == mRealm) {
+        // When realm lineEdit is activated (shown) first time, validator is added
+        if (NULL == mValidatorRealm) {
+            mValidatorRealm = mConfigIf->validatorEap(mPluginInfo.pluginHandle().type(),
+                EapQtConfig::Realm);           
+        }
+        HbLineEdit *edit = qobject_cast<HbLineEdit *> (viewItem->dataItemContentWidget());
+        mValidatorRealm->updateEditor(edit);
+    }
+}
+
+/*!
+ * This is called when user is about to exit the view.
+ * Validates configuration and saves settings.
+ * If configuration is not valid prompts question dialog.
+ * If user chooses "OK" leaves without saving.
+ * 
+ */
+void CpEapSimAkaUi::close()
+{
+    qDebug("CpEapSimAkaUi::close");
+    if (validate()) {
+        qDebug("CpEapSimAkaUi::close - Store settings and exit");
+        storeSettings();
+        CpBaseSettingView::close();
+    }
+    else {
+        qDebug("CpEapSimAkaUi::close - validation failed. Prompt question.");
+        HbMessageBox *note = new HbMessageBox(HbMessageBox::MessageTypeQuestion);
+        note->setAttribute(Qt::WA_DeleteOnClose);
+        note->setText(hbTrId("txt_occ_info_incomplete_details_return_without_sa"));
+        note->clearActions();
+        // Connect 'YES'-button to CpBaseSettingView 'aboutToClose'-signal
+        HbAction *okAction = new HbAction(hbTrId("txt_common_button_yes"));
+        note->addAction(okAction);
+        bool connected = connect(
+            okAction,
+            SIGNAL(triggered()),
+            this,
+            SIGNAL(aboutToClose()));
+        Q_ASSERT(connected);
+        // Clicking 'NO'-button does nothing
+        HbAction *cancelAction = new HbAction(hbTrId("txt_common_button_no"));
+        note->addAction(cancelAction);
+        note->setTimeout(HbPopup::NoTimeout);
+        note->open();
+    }
+}
+
+/*!
+ * Dims the realm if generate realm automatically has been selected.
+ * 
+ * @param state Tells is generate automatically checked.
+ */
+void CpEapSimAkaUi::realmAutomaticChanged(int state)
+{
+    qDebug("CpEapSimAkaUi::realmAutomaticChanged");
+
+    mRealm->setContentWidgetData("enabled", !checkStateToBool(state));
+}
+
+/*!
+ * Dims the username if generate username automatically has been selected.
+ * 
+ * @param state Tells is generate automatically checked.
+ */
+void CpEapSimAkaUi::usernameAutomaticChanged(int state)
+{
+    qDebug("CpEapSimAkaUi::usernameAutomaticChanged");
+
+    mUsername->setContentWidgetData("enabled", !checkStateToBool(state));
+}
+
+/*!
+ * Converts check box state to boolean.
+ * 
+ * @param state Check box state
+ * 
+ * @return true if Check box is checked, false otherwise.
+ */
+bool CpEapSimAkaUi::checkStateToBool(const int state)
+{
+    return (Qt::Unchecked == state ? false : true);
+}
+
+/*!
+ * Converts boolean to check box state.
+ * 
+ * @param state Tells is check box checked.
+ * 
+ * @return Qt check state
+ */
+int CpEapSimAkaUi::boolToCheckState(const bool state)
+{
+    return (false == state ? Qt::Unchecked : Qt::Checked);
+}
+
+/*!
+ * Validates settings configuration.
+ * 
+ * @return true if configuration OK, false otherwise.
+ */
+bool CpEapSimAkaUi::validate()
+{
+    bool valid = false;
+
+    if (validateGroup(mUsername, mUsernameAutomatic, mValidatorUsername) && validateGroup(mRealm,
+        mRealmAutomatic, mValidatorRealm)) {
+        valid = true;
+    }
+
+    return valid;
+}
+
+/*!
+ * Validates checkBox and lineEdit group.
+ * 
+ * @return true if OK, false otherwise.
+ */
+bool CpEapSimAkaUi::validateGroup(CpSettingFormItemData *edit, CpSettingFormItemData *checkBox,
+    EapQtValidator *validator)
+{
+    bool status = false;
+    // true if generate automatically is checked or given value is valid
+    if (checkBox->contentWidgetData("checkState") == Qt::Checked
+        || EapQtValidator::StatusOk == validator->validate(
+            edit->contentWidgetData("text"))) {
+        status = true;
+    }
+    return status;
+}
+
+/*!
+ * Stores settings given via SIM-AKA configuration UI
+ */
+void CpEapSimAkaUi::storeSettings()
+{
+    qDebug("CpEapSimAkaUi::storeSettings");
+
+    EapQtConfig eapConfig;
+
+    eapConfig.setValue(EapQtConfig::OuterType, qVariantFromValue(mOuterHandle));
+    eapConfig.setValue(EapQtConfig::UsernameAutomatic, checkStateToBool(
+        mUsernameAutomatic->contentWidgetData("checkState").toInt()));
+    eapConfig.setValue(EapQtConfig::Username, mUsername->contentWidgetData("text"));
+    eapConfig.setValue(EapQtConfig::RealmAutomatic, checkStateToBool(
+        mRealmAutomatic->contentWidgetData("checkState").toInt()));
+    eapConfig.setValue(EapQtConfig::Realm, mRealm->contentWidgetData("text"));
+
+    if (!mConfigIf->saveConfiguration(mPluginInfo.pluginHandle(), eapConfig)) {
+        qDebug("CpEapSimAkaUi::storeSettings - configuration saving failed.");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/cpeapuiplugins/cpeapuiplugins.pro	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,27 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#	Control Panel QT UIs for EAP method configuration
+#
+
+# %version: 4 %
+
+
+TEMPLATE = subdirs
+
+SUBDIRS = \
+		cpeapuserpasswordui \
+		cpeapsimakaui
+		
+CONFIG += ordered
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/cpeapuiplugins/cpeapuserpasswordui/cpeapuserpasswordui.pro	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,67 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#   Project info file for Control Panel username-password based EAP method
+#   settings plugin.  
+#
+
+# %version: 11 %
+
+
+TEMPLATE = lib
+TARGET = cpeapuserpasswordui
+DEPENDPATH +=
+INCLUDEPATH += \
+    ../../inc
+    
+
+CONFIG += hb \
+    plugin
+
+LIBS += -lcpframework \
+        -leapqtconfiginterface \
+        -leapqtplugininfo
+
+MOC_DIR    = _moc
+RCC_DIR    = _rcc
+OBJECTS_DIR= _objects
+
+# Sources
+HEADERS +=  \
+    ../inc/eapuidefs.h \
+    inc/cpeapuserpasswordui.h \
+    inc/cpeapuserpasswordplugin.h
+
+SOURCES += \ 
+    src/cpeapuserpasswordui.cpp \
+    src/cpeapuserpasswordplugin.cpp
+
+symbian: { 
+    TARGET.EPOCALLOWDLLDATA = 1
+    TARGET.UID3 = 0x2002C2FB
+    TARGET.CAPABILITY = CAP_GENERAL_DLL
+ 
+    deploy.path = C:
+    qtplugins.path = /resource/qt/plugins/controlpanel/eapsecurity
+    qtplugins.sources += qmakepluginstubs/cpeapuserpasswordui.qtplugin
+    
+    for(qtplugin, qtplugins.sources):BLD_INF_RULES.prj_exports += "./$$qtplugin $$deploy.path$$qtplugins.path/$$basename(qtplugin)"
+    
+    BLD_INF_RULES.prj_exports += \ 
+  		"rom/cpeapuserpasswordui.iby CORE_MW_LAYER_IBY_EXPORT_PATH(cpeapuserpasswordui.iby)"
+}
+
+plugin.sources += cpeapuserpasswordui.dll
+plugin.path = /resource/qt/plugins/controlpanel/eapsecurity
+DEPLOYMENT += plugin
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/cpeapuiplugins/cpeapuserpasswordui/inc/cpeapuserpasswordplugin.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   Control Panel QT plugin for username-password based 
+ *   EAP method configuration
+ *
+ */
+
+/*
+ * %version: 7 %
+ */
+
+#ifndef CPEAPUSERPASSWORDPLUGIN_H
+#define CPEAPUSERPASSWORDPLUGIN_H
+
+// System includes
+#include <QObject>
+// User includes
+#include "cpeapplugininterface.h"
+
+// Forward declarations
+
+// External data types
+
+// Constants
+
+/*!
+ * @addtogroup group_eap_ui_plugin_userpassword
+ * @{
+ */
+class CpEapUserPasswordPlugin: public QObject, public CpEapPluginInterface
+{
+    Q_OBJECT
+    Q_INTERFACES(CpEapPluginInterface)
+
+public:
+    CpEapUserPasswordPlugin();
+    ~CpEapUserPasswordPlugin();
+
+    void setSettingsReference(const EapQtConfigInterface::EapBearerType bearer, const int iapId);
+    QList<EapQtPluginInfo> pluginInfo();
+    CpBaseSettingView* uiInstance(const EapQtPluginHandle& outerHandle,
+        const EapQtPluginInfo &plugin);
+
+private:
+    EapQtConfigInterface::EapBearerType mBearer;
+    int mIapId;
+};
+
+/*! @} */
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/cpeapuiplugins/cpeapuserpasswordui/inc/cpeapuserpasswordui.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   Control Panel QT UI for username-password based EAP method configuration
+ *
+ */
+
+/*
+ * %version: 17 %
+ */
+
+#ifndef CPEAPUSERPASSWORDUI_H
+#define CPEAPUSERPASSWORDUI_H
+
+// System includes
+#include <cpbasesettingview.h>
+#include <eapqtplugininfo.h>
+#include <eapqtpluginhandle.h>
+#include <eapqtconfiginterface.h>
+
+// User includes
+
+// Forward declarations
+class HbDataForm;
+class HbDataFormModel;
+class CpSettingFormItemData;
+class HbLineEdit;
+class EapQtValidator;
+
+// External data types
+
+// Constants
+
+/*!
+ * @addtogroup group_eap_ui_plugin_userpassword
+ * @{
+ */
+
+class CpEapUserPasswordUi: public CpBaseSettingView
+{
+Q_OBJECT
+
+public:
+    CpEapUserPasswordUi(
+        const EapQtConfigInterface::EapBearerType bearer,
+        const int iapId,
+        const EapQtPluginInfo &plugin,
+        const EapQtPluginHandle& outerHandle);
+    ~CpEapUserPasswordUi();
+
+protected:
+    bool eventFilter(QObject *obj, QEvent *event);
+    void close();
+    
+private:
+    void initializeUserPasswordUi();
+    bool checkStateToBool(const int state);
+    int boolToCheckState(const bool state);
+    void storeSettings();
+    bool validate();
+    bool validatePasswordGroup();
+    
+private slots:
+    void setValidator(const QModelIndex);
+    void passwordPromptChanged(int state);
+    void passwordChanged();
+    
+private:
+    QScopedPointer <EapQtConfigInterface> mConfigIf;
+    EapQtPluginInfo mPluginInfo;
+    EapQtPluginHandle mOuterHandle;
+    HbDataForm *mForm;
+    HbDataFormModel *mModel;
+    CpSettingFormItemData *mUsername;
+    CpSettingFormItemData *mPasswordPrompt;
+    CpSettingFormItemData *mPassword;
+
+    EapQtValidator *mValidatorUsername;
+    EapQtValidator *mValidatorPassword;
+    
+    bool mPasswordStored;
+    bool mPasswordChanged;
+    HbLineEdit *mPasswordEdit;
+        
+};
+
+/*! @} */
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/cpeapuiplugins/cpeapuserpasswordui/resources/input_prompt_line_edit.docml	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<hbdocument version="0.8">
+    <widget name="inputPromptLineEdit" type="HbWidget">
+        <widget name="label" type="HbLabel">
+            <real name="z" value="3"/>
+            <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="MinimumExpanding" verticalStretch="0"/>
+            <sizehint height="3.9un" type="PREFERRED"/>
+            <string name="plainText" value="WidgetTitle"/>
+        </widget>
+        <widget name="checkbox" type="HbCheckBox">
+            <real name="z" value="2"/>
+            <string name="windowTitle" value=""/>
+            <string name="text" value="CheckboxName"/>
+        </widget>
+        <widget name="lineEdit" type="HbLineEdit">
+            <real name="z" value="1"/>
+            <sizehint type="PREFERRED" width="41.49254un"/>
+            <string name="text" value="LineEditDefaultValue"/>
+        </widget>
+        <real name="z" value="0"/>
+        <rect height="17.31343un" name="geometry" width="50un" x="1.86567un" y="39.10448un"/>
+        <sizepolicy horizontalPolicy="Maximum" horizontalStretch="0" verticalPolicy="Expanding" verticalStretch="0"/>
+        <sizehint height="17.31343un" type="PREFERRED" width="50un"/>
+        <string name="windowTitle" value=""/>
+        <layout orientation="Vertical" type="linear">
+            <contentsmargins bottom="var(hb-param-margin-gene-bottom)" left="var(hb-param-margin-gene-left)" right="var(hb-param-margin-gene-right)" top="var(hb-param-margin-gene-top)"/>
+            <linearitem itemname="label"/>
+            <linearitem itemname="checkbox"/>
+            <linearitem itemname="lineEdit"/>
+        </layout>
+    </widget>
+    <section name="landscape_section">
+        <widget name="inputPromptLineEdit" type="HbWidget">
+            <sizehint height="23.8806un" type="PREFERRED" width="39.70149un"/>
+        </widget>
+    </section>
+    <metadata activeUIState="portrait" display="QHD portrait" unit="un">
+        <uistate name="Common ui state" sections="#common"/>
+        <uistate name="landscape" sections="#common landscape_section"/>
+        <uistate name="portrait" sections="#common"/>
+    </metadata>
+</hbdocument>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/cpeapuiplugins/cpeapuserpasswordui/resources/resource.qrc	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC>
+<RCC version="1.0">
+	<qresource prefix="/docml">
+        <file>input_prompt_line_edit.docml</file>
+	</qresource>
+</RCC>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/cpeapuiplugins/cpeapuserpasswordui/rom/cpeapuserpasswordui.iby	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Image description file for userpassword UI
+*
+*/
+
+/*
+ * %version:  3 %
+ */
+ 
+#ifndef CPEAPUSERPASSWORDUI_IBY
+#define CPEAPUSERPASSWORDUI_IBY
+
+#include <data_caging_paths_for_iby.hrh>
+#include <bldvariant.hrh>
+
+#ifdef __PROTOCOL_WLAN
+
+file=ABI_DIR\BUILD_DIR\cpeapuserpasswordui.dll SHARED_LIB_DIR\cpeapuserpasswordui.dll
+data=/epoc32/data/c/resource/qt/plugins/controlpanel/eapsecurity/cpeapuserpasswordui.qtplugin   resource/qt/plugins/controlpanel/eapsecurity/cpeapuserpasswordui.qtplugin
+
+#endif // __PROTOCOL_WLAN
+
+#endif // CPEAPUSERPASSWORDUI_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/cpeapuiplugins/cpeapuserpasswordui/src/cpeapuserpasswordplugin.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,136 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   Control Panel QT plugin for username-password based 
+ *   EAP method configuration
+ *
+ */
+
+/*
+ * %version: 9 %
+ */
+
+// System includes
+// User includes
+#include "cpeapuserpasswordplugin.h"
+#include "cpeapuserpasswordui.h"
+#include "eapuidefs.h"
+
+/*!
+ * \class CpEapUserPasswordPlugin
+ * \brief Control Panel QT plugin for username-password based EAP method configuration. 
+ */
+
+// External function prototypes
+
+// Local constants
+
+// Order numbers
+static const int order_eapmschapv2(10);
+static const int order_pap(20);
+static const int order_plainmschapv2(30);
+static const int order_eapgtc(40);
+static const int order_leap(50);
+
+Q_EXPORT_PLUGIN2(CpEapUserPasswordPlugin, CpEapUserPasswordPlugin)
+;
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+ * Constructor.
+ */
+CpEapUserPasswordPlugin::CpEapUserPasswordPlugin() :
+    mBearer(EapQtConfigInterface::EapBearerTypeWlan),
+    mIapId(EapQtConfigInterface::IapIdUndefined)
+{
+    // Nothing to be done
+
+    qDebug("CpEapUserPasswordPlugin created");
+}
+
+/*!
+ * Destructor.
+ */
+CpEapUserPasswordPlugin::~CpEapUserPasswordPlugin()
+{
+    // Nothing to be done
+    // UI instances are owned and deallocated by CP framework
+
+    qDebug("CpEapUserPasswordPlugin destroyed");
+}
+
+/*!
+ * See CpEapPluginInterface::setSettingsReference()
+ * 
+ * @param bearer Bearer of the accessed settings
+ * @param iapId ID of the accessed IAP
+ */
+void CpEapUserPasswordPlugin::setSettingsReference(
+    const EapQtConfigInterface::EapBearerType bearer, const int iapId)
+{
+    mBearer = bearer;
+    mIapId = iapId;
+}
+
+/*!
+ * See CpEapPluginInterface::pluginInfo()
+ * 
+ * @return Plugin info
+ */
+QList<EapQtPluginInfo> CpEapUserPasswordPlugin::pluginInfo()
+{
+    qDebug("CpEapUserPasswordPlugin: provide plugin info");
+    QList<EapQtPluginInfo> ret;
+
+    ret.append(EapQtPluginInfo(EapQtPluginHandle::PluginEapMschapv2,  
+        EapUiStrings::EapMschapv2, order_eapmschapv2) );
+    
+    ret.append(EapQtPluginInfo(EapQtPluginHandle::PluginPap, 
+        EapUiStrings::Pap, order_pap) );
+
+    ret.append(EapQtPluginInfo(EapQtPluginHandle::PluginPlainMschapv2,
+        EapUiStrings::Mschapv2, order_plainmschapv2) );
+
+    ret.append(EapQtPluginInfo(EapQtPluginHandle::PluginEapGtc, 
+        EapUiStrings::EapGtc, order_eapgtc) );
+
+    ret.append(EapQtPluginInfo(EapQtPluginHandle::PluginLeap, 
+        EapUiStrings::Leap, order_leap) );
+
+    return ret;
+}
+
+/*!
+ * See CpEapPluginInterface::uiInstance()
+ * 
+ * Creates UI instance
+ * 
+ * @param outerHandle Plugin handle to outer EAP type.
+ * @param plugin Plugin info
+ * 
+ * @return username-password UI instance
+ */
+CpBaseSettingView* CpEapUserPasswordPlugin::uiInstance(const EapQtPluginHandle& outerHandle,
+    const EapQtPluginInfo &plugin)
+{
+    qDebug("CpEapUserPasswordPlugin: create UI instance");
+
+    Q_ASSERT(mIapId != EapQtConfigInterface::IapIdUndefined);
+
+    // instance is owned and deallocated by CP framework
+    return new CpEapUserPasswordUi(mBearer, mIapId, plugin, outerHandle);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/cpeapuiplugins/cpeapuserpasswordui/src/cpeapuserpasswordui.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,401 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   Control Panel QT UI for username-password based EAP method configuration
+ *
+ */
+
+/*
+ * %version: 23 %
+ */
+
+// System includes
+#include <HbDataForm>
+#include <HbDataFormModel>
+#include <HbDataFormViewItem>
+#include <HbMessageBox> 
+#include <HbAction>
+#include <HbLineEdit>
+#include <cpsettingformitemdata.h>
+#include <cpitemdatahelper.h>
+#include <eapqtvalidator.h>
+#include <eapqtexpandedeaptype.h>
+
+// User includes
+#include "cpeapuserpasswordui.h"
+
+/*!
+ * \class CpEapUserPasswordUi
+ * \brief Implementes username-password based EAP method configuration ui. 
+ */
+
+// External function prototypes
+
+// Local constants
+
+/*! 
+ * If password has already been stored into the database
+ * user is shown dummy password (fixed number of asterisks)
+ */
+static const QVariant passwordExistString = "xxxx";
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+ * Constructor.
+ * 
+ * @param bearer        Bearer type of the accessed configuration.
+ * @param iapId         IAP ID of the accessed configuration.
+ * @param plugin        Plugin.
+ * @param outerHandle   Outer handle.
+ */
+CpEapUserPasswordUi::CpEapUserPasswordUi(
+    const EapQtConfigInterface::EapBearerType bearer,
+    const int iapId,
+    const EapQtPluginInfo &plugin, 
+    const EapQtPluginHandle& outerHandle) :
+        mConfigIf(new EapQtConfigInterface(bearer, iapId)),
+        mPluginInfo(plugin), 
+        mOuterHandle(outerHandle), 
+        mForm(NULL),
+        mModel(NULL), 
+        mUsername(NULL), 
+        mPasswordPrompt(NULL), 
+        mPassword(NULL), 
+        mValidatorUsername(NULL),
+        mValidatorPassword(NULL), 
+        mPasswordStored(false), 
+        mPasswordChanged(false), 
+        mPasswordEdit(NULL)
+{
+    qDebug("CpEapUserPasswordUi::CpEapUserPasswordUi");
+
+    // IAP must be valid in construction (check includes
+    // EapQtConfigInterface::IapIdUndefined)
+    if (iapId < 0) {
+        QT_THROW(std::bad_alloc());
+        // scoped pointer gets deleted automaticaly on exception
+    }
+
+    initializeUserPasswordUi();
+}
+
+/*!
+ * Destructor.
+ */
+CpEapUserPasswordUi::~CpEapUserPasswordUi()
+{
+    qDebug("CpEapUserPasswordUi::~CpEapUserPasswordUi");
+
+    delete mValidatorUsername;
+    delete mValidatorPassword;
+
+    // mConfigIf: scoped pointer deleted automatically
+}
+
+/*!
+ * Initializes the password-username ui and initializes objects based on configuration
+ * read from the database.
+ */
+void CpEapUserPasswordUi::initializeUserPasswordUi()
+{
+    qDebug("CpEapUserPasswordUi::initializeUserPasswordUi");
+
+    CpItemDataHelper itemDataHelper;
+
+    // Read Configurations
+    EapQtConfig eapConfig;
+    bool configurationRead = mConfigIf->readConfiguration(mOuterHandle, mPluginInfo.pluginHandle(),
+        eapConfig);
+    if (!configurationRead) {
+        qDebug("CpEapUserPasswordUi::initializeUserPasswordUi - read configuration failed.");
+    }
+
+    // Create UI objects and group 
+    mForm = new HbDataForm();
+    this->setWidget(mForm);
+    
+    mModel = new HbDataFormModel;
+
+    HbDataFormModelItem *groupItem = new HbDataFormModelItem(HbDataFormModelItem::GroupItem,
+        hbTrId("txt_occ_subhead_eap_module_settings").arg(mPluginInfo.localizationId()));
+    mModel->appendDataFormItem(groupItem);
+
+    // Connect signal to add validators when items get activated (visualization created).
+    bool connected = connect(mForm, SIGNAL( itemShown(const QModelIndex&) ), this,
+        SLOT( setValidator(const QModelIndex) ));
+    Q_ASSERT(connected);
+    
+    // Username
+    mUsername = new CpSettingFormItemData(HbDataFormModelItem::TextItem, hbTrId(
+        "txt_occ_setlabel_username"));
+    // Initialize the value from EapQtConfig
+    mUsername->setContentWidgetData("text", eapConfig.value(EapQtConfig::Username));
+    groupItem->appendChild(mUsername);
+
+    // Password prompting
+    mPasswordPrompt = new CpSettingFormItemData(HbDataFormModelItem::CheckBoxItem, hbTrId(
+        "txt_occ_setlabel_password"));
+    mPasswordPrompt->setContentWidgetData("text", hbTrId("txt_occ_setlabel_password_val_prompt"));
+    mPasswordPrompt->setContentWidgetData("checkState", boolToCheckState(eapConfig.value(
+        EapQtConfig::PasswordPrompt).toBool()));
+    // Connect signal to disable/enable password when passwordPrompt changed 
+    mForm->addConnection(mPasswordPrompt, SIGNAL(stateChanged(int)), this,
+        SLOT(passwordPromptChanged(int)));
+    groupItem->appendChild(mPasswordPrompt);
+
+    // Password
+    mPassword = new CpSettingFormItemData(HbDataFormModelItem::TextItem, hbTrId(
+        "txt_occ_setlabel_password"));
+    mPasswordStored = eapConfig.value(EapQtConfig::PasswordStored).toBool();
+    // If password has already been stored into the databse
+    // fixed number of asterisks are shown in UI
+    if (mPasswordStored) {
+        mPassword->setContentWidgetData("text", passwordExistString);
+    }
+    // Set password echo mode
+    mPassword->setContentWidgetData("echoMode", HbLineEdit::Password);
+    // Dimmed password if passwordPrompt is selected
+    passwordPromptChanged(mPasswordPrompt->contentWidgetData("checkState") == Qt::Checked);
+    // Connect signal to get info that user has changed the password
+    mForm->addConnection(mPassword, SIGNAL(editingFinished()), this, SLOT(passwordChanged()));
+    groupItem->appendChild(mPassword);
+
+    // Set the model
+    mForm->setModel(mModel);
+    itemDataHelper.bindToForm(mForm);
+
+    // Expand userpasswordui settings group
+    mForm->setExpanded(mModel->indexFromItem(groupItem), TRUE);
+}
+
+/*!
+ * Adds validators and connects focusIn event to the Password.
+ * 
+ * @param modelIndex Model index
+ */
+void CpEapUserPasswordUi::setValidator(const QModelIndex modelIndex)
+{
+    qDebug("CpEapUserPasswordUi::itemActivated");
+
+    HbDataFormViewItem *viewItem = qobject_cast<HbDataFormViewItem *>
+        (mForm->itemByIndex(modelIndex));
+    HbDataFormModelItem *modelItem = mModel->itemFromIndex(modelIndex);
+    
+    if (modelItem == mUsername) {
+        // When username lineEdit is activated (shown) first time, validator is added
+        if (NULL == mValidatorUsername) {
+            mValidatorUsername = mConfigIf->validatorEap(mPluginInfo.pluginHandle().type(),
+                EapQtConfig::Username);
+        }
+        HbLineEdit *usernameEdit = qobject_cast<HbLineEdit *> (viewItem->dataItemContentWidget());
+        mValidatorUsername->updateEditor(usernameEdit);
+    }
+    else if (modelItem == mPassword) {
+        // When password lineEdit is activated (shown) first time, validator is added
+        if (NULL == mValidatorPassword){
+            mValidatorPassword = mConfigIf->validatorEap(mPluginInfo.pluginHandle().type(),
+                EapQtConfig::Password);            
+        }
+        mPasswordEdit = qobject_cast<HbLineEdit *> (viewItem->dataItemContentWidget());
+        mValidatorPassword->updateEditor(mPasswordEdit);
+        // Install event filter to clear dummy password, when password is started to edit.
+        mPasswordEdit->installEventFilter(this);
+    }
+}
+
+/*!
+ * This is called when user is about to exit the view.
+ * Validates configuration and saves settings.
+ * If configuration is not valid prompts question dialog.
+ * If user chooses "OK" leaves without saving.
+ * 
+ */
+void CpEapUserPasswordUi::close()
+{
+    qDebug("CpEapUserPasswordUi::close");
+    if (validate()) {
+        qDebug("CpEapUserPasswordUi::close - Store settings");
+        storeSettings();
+        qDebug("CpEapUserPasswordUi::close - Settings stored, exit");
+        CpBaseSettingView::close();
+    }
+    else {
+        qDebug("CpEapUserPasswordUi::close - validation failed. Prompt question.");
+        HbMessageBox *note = new HbMessageBox(HbMessageBox::MessageTypeQuestion);
+        note->setAttribute(Qt::WA_DeleteOnClose);
+        note->setText(hbTrId("txt_occ_info_incomplete_details_return_without_sa"));
+        note->clearActions();
+        // Connect 'YES'-button to CpBaseSettingView 'aboutToClose'-signal
+        HbAction *okAction = new HbAction(hbTrId("txt_common_button_yes"));
+        note->addAction(okAction);
+        bool connected = connect(
+            okAction,
+            SIGNAL(triggered()),
+            this,
+            SIGNAL(aboutToClose()));
+        Q_ASSERT(connected);
+        // Clicking 'NO'-button does nothing
+        HbAction *cancelAction = new HbAction(hbTrId("txt_common_button_no"));
+        note->addAction(cancelAction);
+        note->setTimeout(HbPopup::NoTimeout);
+        note->open();
+    }
+}
+
+/*!
+ * Converts check box state to boolean.
+ * 
+ * @param state Check box state
+ * 
+ * @return true if Check box is checked, false otherwise.
+ */
+bool CpEapUserPasswordUi::checkStateToBool(const int state)
+{
+    return (Qt::Unchecked == state ? false : true);
+}
+
+/*!
+ * Converts boolean to check box state.
+ * 
+ * @param state Tells is check box checked.
+ * 
+ * @return Qt check state
+ */
+int CpEapUserPasswordUi::boolToCheckState(const bool state)
+{
+    return (false == state ? Qt::Unchecked : Qt::Checked);
+}
+
+/*!
+ * Dims the password if passwordPrompt has been selected.
+ * 
+ * @param state Tells is password prompt checked.
+ */
+void CpEapUserPasswordUi::passwordPromptChanged(int state)
+{
+    qDebug("CpEapUserPasswordUi::passwordPromptChanged - state: %d", state);
+
+    mPassword->setContentWidgetData("enabled", !checkStateToBool(state));
+}
+
+/*!
+ * Saves information that password has been changed and must be stored.
+ * If the new password is not given, the stored password is kept (if exists).
+ */
+void CpEapUserPasswordUi::passwordChanged()
+{
+    if (mPassword->contentWidgetData("text") != "") {
+        // Stored password is considered as changed only if user
+        // gives new unempty password
+        qDebug("CpEapUserPasswordUi::passwordChanged");
+        mPasswordChanged = true;
+    }
+}
+
+/*!
+ * When a focus moves into the password editor, possible dummy password is cleared.
+ */
+bool CpEapUserPasswordUi::eventFilter(QObject *obj, QEvent *event)
+{
+    
+    if (obj == mPasswordEdit && event->type() == QEvent::FocusIn 
+        && mPasswordStored && !mPasswordChanged) {
+        qDebug("CpEapUserPasswordUi::eventFilter - mPasswordEdit and FocusIn");
+        mPassword->setContentWidgetData("text", "");
+    }
+    return false;
+}
+
+/*!
+ * Validates settings configuration.
+ * 
+ * @return true if configuration OK, false otherwise.
+ */
+bool CpEapUserPasswordUi::validate()
+{
+    qDebug("CpEapUserPasswordUi::validate");
+    bool valid = false;
+
+    if ((EapQtValidator::StatusOk == mValidatorUsername->validate(mUsername->contentWidgetData(
+        "text"))) && validatePasswordGroup()) {
+        qDebug("CpEapUserPasswordUi::validate - OK");
+        valid = true;
+    }
+
+    return valid;
+}
+
+/*!
+ * Validates password and passwordPrompt.
+ * 
+ * @return true if OK, false otherwise.
+ */
+bool CpEapUserPasswordUi::validatePasswordGroup()
+{
+    qDebug("CpEapUserPasswordUi::validatePasswordGroup");
+    bool status = false;
+    // true if password prompt is checked, stored password has not changed
+    // or changed/given passrword is valid
+    if (mPasswordPrompt->contentWidgetData("checkState") == Qt::Checked 
+        || (mPasswordStored && !mPasswordChanged) 
+        || (mPasswordStored && mPasswordChanged && EapQtValidator::StatusOk
+            == mValidatorPassword->validate(mPassword->contentWidgetData("text").toString()))
+        || (!mPasswordStored && EapQtValidator::StatusOk
+            == mValidatorPassword->validate(mPassword->contentWidgetData("text").toString()))) {
+        qDebug("CpEapUserPasswordUi::validatePasswordGroup - OK");
+        status = true;
+    }
+    return status;
+}
+
+/*!
+ * Stores settings given via username-password configuration UI
+ */
+void CpEapUserPasswordUi::storeSettings()
+{
+    qDebug("CpEapUserPasswordUi::storeSettings");
+
+    EapQtConfig eapConfig;
+
+    eapConfig.setValue(EapQtConfig::OuterType, qVariantFromValue(mOuterHandle));
+    eapConfig.setValue(EapQtConfig::Username, mUsername->contentWidgetData("text"));
+    eapConfig.setValue(EapQtConfig::PasswordPrompt, checkStateToBool(
+        mPasswordPrompt->contentWidgetData("checkState").toInt()));
+    if (mPasswordPrompt->contentWidgetData("checkState") == Qt::Checked) {
+        if(mPasswordStored) {
+            // Stored password is cleared if prompting has been enabled
+            eapConfig.setValue(EapQtConfig::PasswordClear, true);
+            eapConfig.setValue(EapQtConfig::Password, "");
+        }
+        // else do nothing (password is not saved)
+    }
+    else {
+        // Password prompt is disabled
+        if (!mPasswordChanged && mPasswordStored) {
+            // Stored password has not been changed
+            eapConfig.setValue(EapQtConfig::PasswordStored, true);
+        }
+        else if (mPasswordChanged || !mPasswordStored) {
+            // Store the new password
+            eapConfig.setValue(EapQtConfig::Password, mPassword->contentWidgetData("text").toString());
+        }
+    }
+    
+    if (!mConfigIf->saveConfiguration(mPluginInfo.pluginHandle(), eapConfig)) {
+        qDebug("CpEapUserPasswordUi::storeSettings - configuration saving failed.");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/cpeapuiplugins/inc/cpeapciphersuiteui.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,64 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*   Control Panel QT UI for TLS ciphersuite configiration in EAP methods
+*
+*/
+
+/*
+* %version: 2 %
+*/
+
+
+#ifndef CP_EAP_CIPHERSUITE_UI_H
+#define CP_EAP_CIPHERSUITE_UI_H
+
+/*!
+ * @addtogroup group_eap_cipher_suite
+ * @{
+ */
+
+#include <QVariant>
+#include "cpsettingformitemdata.h"
+
+
+#ifdef BUILD_CP_EAP_CIPHERSUITE_UI_DLL
+#define CP_EAP_CIPHERSUITE_UI_EXPORT Q_DECL_EXPORT
+#else
+#define CP_EAP_CIPHERSUITE_UI_EXPORT Q_DECL_IMPORT
+#endif
+
+class CpEapCiphersuiteUiPrivate;
+
+/*!
+ */
+class CP_EAP_CIPHERSUITE_UI_EXPORT CpEapCiphersuiteUi: public CpSettingFormItemData
+{
+public:
+    CpEapCiphersuiteUi(CpItemDataHelper &dataHelpper, QVariant &ciphersuites);
+    ~CpEapCiphersuiteUi();
+
+    QVariant ciphersuites();
+
+private:
+    Q_DISABLE_COPY(CpEapCiphersuiteUi)
+    CpEapCiphersuiteUi();
+    CpEapCiphersuiteUiPrivate* d_ptr;
+};
+
+
+/*! @} */
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/cpeapuiplugins/inc/eapuidefs.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   Constant definitions for EAP UIs
+ *
+ */
+
+/*
+ * %version: 5 %
+ */
+
+#ifndef EAPUIDEFS_H
+#define EAPUIDEFS_H
+
+#include <QString>
+
+namespace EapUiStrings
+{
+    static const QString EapAka       = "EAP-AKA";
+    static const QString EapFast      = "EAP-FAST";
+    static const QString EapGtc       = "EAP-GTC";
+    static const QString EapMschapv2  = "EAP-MSCHAPv2";
+    static const QString EapSim       = "EAP-SIM";
+    static const QString EapTls       = "EAP-TLS";
+    static const QString EapTtls      = "EAP-TTLS";
+    static const QString Leap         = "LEAP";
+    static const QString Mschapv2     = "MSCHAPv2";
+    static const QString Pap          = "PAP";
+    static const QString Peap         = "PEAP";
+}
+
+#endif /* EAPUIDEFS_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/cpwlansecurityuiplugins/bwins/cpwpacmnuiu.def	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,6 @@
+EXPORTS
+	?createUi@CpWpaCmnUi@@QAEPAVCpSettingFormItemData@@PAVEapQtConfigInterface@@PAVCmConnectionMethodShim@@@Z @ 1 NONAME ; class CpSettingFormItemData * CpWpaCmnUi::createUi(class EapQtConfigInterface *, class CmConnectionMethodShim *)
+	??0CpWpaCmnUi@@QAE@W4WlanSecMode@CMManagerShim@@AAVCpItemDataHelper@@@Z @ 2 NONAME ; CpWpaCmnUi::CpWpaCmnUi(enum CMManagerShim::WlanSecMode, class CpItemDataHelper &)
+	??1CpWpaCmnUi@@QAE@XZ @ 3 NONAME ; CpWpaCmnUi::~CpWpaCmnUi(void)
+	?validateSettings@CpWpaCmnUi@@QAE_NXZ @ 4 NONAME ; bool CpWpaCmnUi::validateSettings(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/cpwlansecurityuiplugins/cp802dot1xui/cp802dot1xui.pro	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,77 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# 	Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+# 	Control Panel UI for 802.1x security mode
+#
+# %version: 10 %
+#
+
+TEMPLATE = lib
+TARGET = cp802dot1xui
+
+DEPENDPATH += 
+
+INCLUDEPATH += \
+	$$MW_LAYER_SYSTEMINCLUDE \
+    $$OS_LAYER_SYSTEMINCLUDE \
+    ../inc
+    
+CONFIG += \
+	hb \
+    plugin
+    
+LIBS += \ 
+	-lcpframework \
+    -lcpwpacmnui \
+    -lconnection_settings_shim \
+    -leapqtconfiginterface
+		
+MOC_DIR = _moc
+RCC_DIR = _rcc
+OBJECTS_DIR = _obj
+
+# Input
+HEADERS += \
+	traces/OstTraceDefinitions.h \
+    inc/cp802dot1xui.h
+    
+SOURCES += src/cp802dot1xui.cpp
+
+symbian: 
+{ 
+	TARGET.CAPABILITY = CAP_GENERAL_DLL
+    TARGET.EPOCALLOWDLLDATA = 1
+    TARGET.UID3 = 0x2002DC72
+    
+    deploy.path = C:
+    qtplugins.path = /resource/qt/plugins/controlpanel/wlansecurity
+    qtplugins.sources += qmakepluginstubs/cp802dot1xui.qtplugin
+    for(qtplugin, qtplugins.sources):BLD_INF_RULES.prj_exports += "./$$qtplugin $$deploy.path$$qtplugins.path/$$basename(qtplugin)"
+    
+    BLD_INF_RULES.prj_exports += \ 
+    	"rom/cp802dot1xui.iby CORE_MW_LAYER_IBY_EXPORT_PATH(cp802dot1xui.iby)"
+}
+
+symbian:
+{
+    MMP_RULES += "USERINCLUDE traces"
+}
+
+# common translation file for all plugins
+TRANSLATIONS = cpwlansecsettingsplugin.ts
+
+plugin.sources += cp802dot1xui.dll
+plugin.path = /resource/qt/plugins/controlpanel
+
+DEPLOYMENT += plugin
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/cpwlansecurityuiplugins/cp802dot1xui/inc/cp802dot1xui.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: .
+ *    Control Panel QT UI for 802_Dot_1x configuration
+ *
+ */
+
+/*
+ * %version: 6 %
+ */
+
+#ifndef CP802DOT1XUI_H
+#define CP802DOT1XUI_H
+
+// System includes
+#include <cpsettingformitemdata.h>
+#include <cpwlansecurityplugininterface.h>
+
+// User includes
+
+
+// Forward declarations
+class EapQtConfigInterface;
+class CmConnectionMethodShim;
+class CpWpaCmnUi;
+class HbTranslator;
+
+/*!
+ * @addtogroup group_wlan_security_ui_plugin_802_Dot_1x
+ * @{
+ */
+
+/*! 
+ * Implements 802_Dot_1x plugin for Wlan security control panel  
+ */
+//Class Declaration
+class Cp802Dot1xUi : public QObject, public CpWlanSecurityPluginInterface
+{
+    Q_OBJECT
+    Q_INTERFACES(CpWlanSecurityPluginInterface)
+    
+    public:
+        Cp802Dot1xUi();
+        ~Cp802Dot1xUi();
+    
+    public:
+        // from CpWlanSecurityPluginInterface 
+    
+        CMManagerShim::WlanSecMode securityMode() const;
+            
+        QString securityModeTextId() const;
+            
+        void setReference(CmConnectionMethodShim *cmCm, uint id);
+            
+        int orderNumber() const;
+           
+        CpSettingFormItemData* uiInstance(
+                CpItemDataHelper &dataHelper);
+        
+        bool validateSettings();
+    
+    private:
+    
+        Q_DISABLE_COPY(Cp802Dot1xUi)      
+
+        //!WPA security group item
+        CpSettingFormItemData* mUi;   
+
+        //!Translator for all the localisation Text Id's
+        HbTranslator *mTranslator;
+
+        //! Connection Settings Shim connection method pointer    
+        CmConnectionMethodShim *mCmCM;    
+
+        //! Eap Plugin config interface
+        EapQtConfigInterface *mEapQtConfigInterface;
+
+        //!802.1x ui Implementer Interface
+        QScopedPointer <CpWpaCmnUi> m802Ui;
+
+};
+
+/*! @} */
+
+#endif //CP802DOT1XUI_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/cpwlansecurityuiplugins/cp802dot1xui/rom/cp802dot1xui.iby	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: IBY file for 802.1x control panel plugin
+*
+*/
+
+/*
+ * %version: 1 %
+ */
+
+#ifndef CP802DOT1XUI_IBY
+#define CP802DOT1XUI_IBY
+
+#include <data_caging_paths_for_iby.hrh>
+#include <bldvariant.hrh>
+
+#ifdef __PROTOCOL_WLAN
+
+file=ABI_DIR/BUILD_DIR/cp802dot1xui.dll SHARED_LIB_DIR/cp802dot1xui.dll
+data=/epoc32/data/c/resource/qt/plugins/controlpanel/wlansecurity/cp802dot1xui.qtplugin resource/qt/plugins/controlpanel/wlansecurity/cp802dot1xui.qtplugin
+
+#endif // __PROTOCOL_WLAN
+
+#endif // CP802DOT1XUI_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/cpwlansecurityuiplugins/cp802dot1xui/src/cp802dot1xui.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,173 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: .
+ *    Control Panel QT UI for 802_Dot_1x configuration
+ *
+ */
+
+/*
+ * %version: 7 %
+ */
+
+//User Includes
+#include "cp802dot1xui.h"
+#include "cpwpacmnui.h"
+#include "cpwpacmnui_global.h"
+
+//System Includes
+#include <cmmanagerdefines_shim.h>
+#include <cmconnectionmethod_shim.h>
+#include <eapqtconfiginterface.h>
+#include <QStringList>
+#include <HbTranslator>
+
+//Trace Definition
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cp802dot1xuiTraces.h"
+#endif
+
+/*!
+ \class Cp802Dot1xUi
+ \brief Cp802Dot1xUi implements the common Ui for 802.1x only 
+ Security Settings Control Panel Plugins,
+ which will allow viewing/editing of 802.1x Security Settings.
+ */
+//The order in which 802_Dot_1x only mode appears in the list of available 
+//security modes
+const int UI_ORDER_802_Dot_1x = 40;
+
+/*!
+ * Constructor
+ */
+
+Cp802Dot1xUi::Cp802Dot1xUi() :
+    mUi(NULL), 
+    mTranslator(new HbTranslator("cpwlansecsettingsplugin")),
+    mCmCM(NULL),
+    mEapQtConfigInterface(NULL),
+    m802Ui(NULL)
+{
+   
+}
+
+// Destructor
+Cp802Dot1xUi::~Cp802Dot1xUi()
+{
+    OstTraceFunctionEntry1(CP802DOT1XUI_CP802DOT1XUI_ENTRY,this);
+    delete mEapQtConfigInterface;
+    delete mTranslator;
+    OstTraceFunctionExit1(CP802DOT1XUI_CP802DOT1XUI_EXIT,this);
+}
+
+/*!
+ Getter for security mode.
+
+ \return Security mode identifier
+ */
+CMManagerShim::WlanSecMode Cp802Dot1xUi::securityMode() const
+{
+    OstTraceFunctionEntry1(CP802DOT1XUI_SECURITYMODE_ENTRY,this);
+    OstTraceFunctionExit1(CP802DOT1XUI_SECURITYMODE_EXIT,this);
+    //return security mode 
+    return CMManagerShim::WlanSecMode802_1x;
+}
+
+/*!
+ Getter for localization text identifier for the security mode,
+ f.ex. "txt_occ_setlabel_wlan_security_mode_val_8021x". This localized
+ text will be shown in the UI.
+ 
+ \return Localization text ID
+ */
+QString Cp802Dot1xUi::securityModeTextId() const
+{
+    OstTraceFunctionEntry1( CP802DOT1XUI_SECURITYMODETEXTID_ENTRY, this );
+    OstTraceFunctionExit1( CP802DOT1XUI_SECURITYMODETEXTID_EXIT, this );
+    return "txt_occ_setlabel_wlan_security_mode_val_8021x";
+}
+
+/*! 
+ Sets the database reference IAP id.
+
+ \param id Database reference
+ */
+void Cp802Dot1xUi::setReference(CmConnectionMethodShim *cmCm,uint id)
+{
+    OstTraceFunctionEntry1(CP802DOT1XUI_SETREFERENCE_ENTRY,this);    
+    if (!mEapQtConfigInterface) {
+           mEapQtConfigInterface = new EapQtConfigInterface(
+               EapQtConfigInterface::EapBearerTypeWlan, id);
+    } 
+    else {
+           mEapQtConfigInterface->setConfigurationReference(id);     
+    }
+    
+    //mCmCM is not deleted assuming mCmManager owns it.
+     mCmCM = cmCm;
+    
+    OstTraceFunctionExit1(CP802DOT1XUI_SETREFERENCE_EXIT,this);
+}
+
+/*!
+ Getter for order number. This order number is used by the client of
+ this interface to put the security modes in correct order in the list.
+
+ \return An order number
+ */
+int Cp802Dot1xUi::orderNumber() const
+{
+    OstTraceFunctionEntry1(CP802DOT1XUI_ORDERNUMBER_ENTRY,this);
+    OstTraceFunctionExit1(CP802DOT1XUI_ORDERNUMBER_EXIT,this);
+    return UI_ORDER_802_Dot_1x;
+}
+
+/*!
+ Creates an UI instance. Caller owns the object.
+ 
+ \param dataHelper Item data helper
+ \return Pointer to an UI object
+ */
+CpSettingFormItemData* Cp802Dot1xUi::uiInstance(CpItemDataHelper &dataHelpper)
+{
+    OstTraceFunctionEntry1(CP802DOT1XUI_UIINSTANCE_ENTRY,this);
+
+    //reset Common Ui ptr
+    m802Ui.reset(new CpWpaCmnUi(CMManagerShim::WlanSecMode802_1x, dataHelpper));
+        
+    mUi = m802Ui->createUi(mEapQtConfigInterface, mCmCM);
+      
+    OstTraceFunctionExit1(CP802DOT1XUI_UIINSTANCE_EXIT,this);
+    return mUi;
+}
+
+
+/*!
+   Validates current security settings. This function is called whenever
+   user tries to exit from the settings view. If the plugin determines
+   that some settings need editing before considered valid, it shall
+   return false. A dialog will be shown to the user indicating that
+   settings are still incomplete and asking if he/she wishes to exit
+   anyway.
+
+   \return True if security settings for 802.1x only are valid, false if not.
+*/
+bool Cp802Dot1xUi::validateSettings()
+    {    
+    return true;
+    }
+
+
+Q_EXPORT_PLUGIN2(Cp802Dot1xUi, Cp802Dot1xUi)
+;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/cpwlansecurityuiplugins/cp802dot1xui/traces/OstTraceDefinitions.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: TraceHeader ,includes the TraceAPI 
+ *   
+ *
+ */
+ 
+/*
+ * %version: 2 %
+ */
+ 
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+#include <opensystemtrace.h>
+#endif
--- a/securitysettings/cpwlansecurityuiplugins/cpwepui/cpwepui.pro	Thu May 13 22:51:27 2010 +0300
+++ b/securitysettings/cpwlansecurityuiplugins/cpwepui/cpwepui.pro	Mon May 24 20:32:47 2010 +0300
@@ -4,61 +4,73 @@
 # under the terms of the License "Eclipse Public License v1.0"
 # which accompanies this distribution, and is available
 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
 # Initial Contributors:
-# Nokia Corporation - initial contribution.
+# 	Nokia Corporation - initial contribution.
+#
 # Contributors:
+#
 # Description:
-# Control Panel QT UI for WEP configuration
-# %version: 8 %
+# 	Control Panel UI for WEP Security mode
+#
+# %version: tr1cfwln#14 %
+#
+
 TEMPLATE = lib
 TARGET = cpwepui
-DEPENDPATH += . \
-    ./src
-INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE \
+
+DEPENDPATH +=
+    
+INCLUDEPATH += \ 
+	$$MW_LAYER_SYSTEMINCLUDE \
     $$OS_LAYER_SYSTEMINCLUDE
-CONFIG += hb \
+    
+CONFIG += \
+	hb \
     plugin
-LIBS += -lcpframework \
+    
+LIBS += \ 
+	-lcpframework \
     -lconnection_settings_shim
+    
 MOC_DIR = _moc
 RCC_DIR = _rcc
 OBJECTS_DIR = _objects
 
 # Input
-HEADERS += inc/wepkeyvalidator.h \
+HEADERS += \
+	inc/wepkeyvalidator.h \
     traces/OstTraceDefinitions.h \
-    inc/wlansecuritycontrolpanelwepdefs.h \
     inc/cpwepui.h
-SOURCES += src/wepkeyvalidator.cpp \
+    
+SOURCES += \
+	src/wepkeyvalidator.cpp \
     src/cpwepui.cpp
-symbian: { 
+    
+symbian: 
+{ 
+	TARGET.CAPABILITY = CAP_GENERAL_DLL
     TARGET.EPOCALLOWDLLDATA = 1
     TARGET.UID3 = 0x2002C2FF
-    BLD_INF_RULES.prj_exports += "rom/cpwepui.iby CORE_MW_LAYER_IBY_EXPORT_PATH(cpwepui.iby)"
-}
-symbian { 
+
     deploy.path = C:
     qtplugins.path = /resource/qt/plugins/controlpanel/wlansecurity
     qtplugins.sources += qmakepluginstubs/cpwepui.qtplugin
-    
-    # This is for new exporting system coming in garden
+
     for(qtplugin, qtplugins.sources):BLD_INF_RULES.prj_exports += "./$$qtplugin $$deploy.path$$qtplugins.path/$$basename(qtplugin)"
+
+    BLD_INF_RULES.prj_exports += \
+    	"rom/cpwepui.iby CORE_MW_LAYER_IBY_EXPORT_PATH(cpwepui.iby)"
 }
 
-# Temporary solution to fix tracecompiler
-# When tracecompiler is fixed, this can be removed
-symbian: {
+symbian:
+{
     MMP_RULES += "USERINCLUDE traces"
 }
 
-# temporary not used; waiting for the latest .ts file ; accordingly export will change
-# translation file temporarily read as qt resource
-# TRANSLATIONS += /resource/qtwlan_en_GB.ts
+# common translation file for all plugins
+TRANSLATIONS = cpwlansecsettingsplugin.ts
 
-RESOURCES += resources/resource.qrc
-
-
-TARGET.CAPABILITY = CAP_GENERAL_DLL
 plugin.sources += cpwepui.dll
 plugin.path = /resource/qt/plugins/controlpanel
 DEPLOYMENT += plugin
--- a/securitysettings/cpwlansecurityuiplugins/cpwepui/inc/cpwepui.h	Thu May 13 22:51:27 2010 +0300
+++ b/securitysettings/cpwlansecurityuiplugins/cpwepui/inc/cpwepui.h	Mon May 24 20:32:47 2010 +0300
@@ -17,7 +17,7 @@
  */
 
 /*
- * %version: 13 %
+ * %version: 17 %
  */
 
 #ifndef CPWEPUI_H
@@ -27,23 +27,18 @@
 #include <cpsettingformitemdata.h>
 #include <QStringList>
 #include <HbMessageBox>
-//#include <HbTranslator>
-//#include <QSharedPointer>
-#include <QTranslator>
+#include <cpwlansecurityplugininterface.h>
 
 //User Includes
-#include "cpwlansecurityplugininterface.h"
-#include "wlansecuritycontrolpanelwepdefs.h"
-#include "wepkeyvalidator.h"
 
 // Forward declarations
-class QTranslator;
 class CmConnectionMethodShim;
-class CpWepKeyValidation;
-/*!
- * @addtogroup group_wlan_security_ui_plugin_wep
- * @{
- */
+class HbTranslator;
+class WepKeyValidator;
+
+//Constant declarations
+//!Maximum Number of Keys for WEP
+static const int KMaxNumberofKeys =  4;
 
 /*! 
  * Implements WEP plugin for Wlan security control panel  
@@ -71,8 +66,10 @@
     int orderNumber() const;
     
     CpSettingFormItemData* uiInstance(CpItemDataHelper &dataHelper);
+    
+    bool validateSettings();
 
-public:
+private:
 
     enum WEPKeyFormat
         {
@@ -110,6 +107,10 @@
         
     CMManagerShim::ConnectionMethodAttribute getWEPKeyEnum(int index);
     
+    void createWEPKeyGroup(int index);
+    
+    void addConnections(CpItemDataHelper &dataHelpper);
+    
 private slots:
 
     void wepKeyInUseChanged(int index);
@@ -121,6 +122,8 @@
     void wepKeyThreeChanged();
 
     void wepKeyFourChanged();
+    
+    void setEditorPreferences(const QModelIndex &modelIndex);
 
 private:
 
@@ -140,11 +143,11 @@
 
     //!Store the index of the current key in use   
     int mNewKeySelected;
+   
+    //!Translator for all the localisation Text Id's
+    HbTranslator* mTranslator;
 
-    //QSharedPointer<HbTranslator> mTranslator;
-    QTranslator* mTranslator;
-
-    //! Connection Settings Shim connection method pointer
+    //!Connection Settings Shim connection method pointer
     CmConnectionMethodShim *mCmCM;
 
     //! Connection method Id
@@ -155,6 +158,8 @@
 
     //! Store Formats of WEP keys
     WEPKeyFormat mkeyFormat[KMaxNumberofKeys];
+        
+    CpItemDataHelper* mItemDataHelper;
     
     
 
--- a/securitysettings/cpwlansecurityuiplugins/cpwepui/inc/wepkeyvalidator.h	Thu May 13 22:51:27 2010 +0300
+++ b/securitysettings/cpwlansecurityuiplugins/cpwepui/inc/wepkeyvalidator.h	Mon May 24 20:32:47 2010 +0300
@@ -17,7 +17,7 @@
  */
 
 /*
- * %version: 1 %
+ * %version: 4 %
  */
 
 #ifndef WEPKEYVALIDATOR_H
--- a/securitysettings/cpwlansecurityuiplugins/cpwepui/inc/wlansecuritycontrolpanelwepdefs.h	Thu May 13 22:51:27 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*    Control Panel QT UI for WEP configuration definitions
-*
-*/
-
-#ifndef WLANSECURITYCONTROLPANELWEPDEFS_H_
-#define WLANSECURITYCONTROLPANELWEPDEFS_H_
-
-
-//! Index of first WEP key
-static const int KFirstKey = 0;
-
-//! Index of second WEP key
-static const int KSecondKey = 1;
-
-//! Index of third WEP key
-static const int KThirdKey = 2;
-
-//! Index of fourth WEP key
-static const int KFourthKey = 3;
-
-//Maximum Number of Keys for WEP
-static const int KMaxNumberofKeys =  4;
-
-#endif /* WLANSECURITYCONTROLPANELWEPDEFS_H_ */
--- a/securitysettings/cpwlansecurityuiplugins/cpwepui/rom/cpwepui.iby	Thu May 13 22:51:27 2010 +0300
+++ b/securitysettings/cpwlansecurityuiplugins/cpwepui/rom/cpwepui.iby	Mon May 24 20:32:47 2010 +0300
@@ -11,18 +11,25 @@
 *
 * Contributors:
 *
-* Description:
+* Description:IBY file for WEP Ui
 *
 */
 
+/*
+ * %version: tr1cfwln#4 %
+ */
+
 #ifndef CPWEPUI_IBY
 #define CPWEPUI_IBY
 
 #include <data_caging_paths_for_iby.hrh>
 #include <bldvariant.hrh>
 
+#ifdef __PROTOCOL_WLAN
+
 file=ABI_DIR/BUILD_DIR/cpwepui.dll  SHARED_LIB_DIR/cpwepui.dll 
 data=/epoc32/data/c/resource/qt/plugins/controlpanel/wlansecurity/cpwepui.qtplugin   resource/qt/plugins/controlpanel/wlansecurity/cpwepui.qtplugin 
 
+#endif // __PROTOCOL_WLAN
 
 #endif // CPWEPUI_IBY
--- a/securitysettings/cpwlansecurityuiplugins/cpwepui/src/cpwepui.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/securitysettings/cpwlansecurityuiplugins/cpwepui/src/cpwepui.cpp	Mon May 24 20:32:47 2010 +0300
@@ -17,24 +17,24 @@
  */
 
 /*
- * %version: 16 %
+ * %version: 22 %
  */
 
 //User Includes
 #include "cpwepui.h"
+#include "wepkeyvalidator.h"
+
 
 // System includes
 #include <QStringList>
-#include <cpsettingformentryitemdata.h>
 #include <cpitemdatahelper.h>
-#include <HbDataForm> 
-#include <HbDeviceNotificationDialog> 
-#include <QLocale>
-#include <QCoreApplication>
 #include <cmconnectionmethod_shim.h>
-#include <cmpluginwlandef.h>
 #include <cmmanagerdefines_shim.h>
+#include <HbLineEdit>
+#include <HbTranslator>
+#include <HbEditorInterface>
 
+//Trace Definition
 #include "OstTraceDefinitions.h"
 #ifdef OST_TRACE_COMPILER_IN_USE
 #include "cpwepuiTraces.h"
@@ -45,6 +45,23 @@
 //security mode
 static const int UI_ORDER_WEP = 10;
 
+//! Index of first WEP key
+static const int KFirstKey = 0;
+
+//! Index of second WEP key
+static const int KSecondKey = 1;
+
+//! Index of third WEP key
+static const int KThirdKey = 2;
+
+//! Index of fourth WEP key
+static const int KFourthKey = 3;
+
+//!Maximum allowed length for WEP keys, in hex mode
+static const int KMaxKeyLength  = 26;
+
+
+
 /*!
  \class CpWepUi
  \brief CpWepUi implements the WEP Security Settings Control Panel Plugin
@@ -52,15 +69,20 @@
  */
 //Contructs WEP object
 CpWepUi::CpWepUi() :
-    mUi(NULL), mNewKeySelected(0), mTranslator(NULL), mCmCM(NULL), mCmId(0)
+    mUi(NULL),
+    mNewKeySelected(0), 
+    mTranslator(new HbTranslator("cpwlansecsettingsplugin")),
+    mCmCM(NULL), 
+    mCmId(0)    
 {
-    mTranslator = new QTranslator(this);
-    mTranslator->load(":/loc/wlan_en_GB.qm");
-    qApp->installTranslator(mTranslator);
-
-    /* Install localization
-     mTranslator = QSharedPointer<HbTranslator> (
-     new HbTranslator("wlan_en_GB"));*/
+    //Initialize array members
+    for(int index=0;index<KMaxNumberofKeys;index++)
+    {
+        mWepKey[index] = NULL;
+        mWepKeyText[index] = NULL;   
+        mkeyFormat[index] = EFormatHex;
+    }
+      
 }
 
 //Deletes all objects WEP owns
@@ -69,6 +91,7 @@
     OstTraceFunctionEntry1(CPWEPUI_CPWEPUI_ENTRY,this);
     //Elements like mUi and components that belong to it
     //, are taken care by the parent
+    delete mTranslator;
     OstTraceFunctionExit1(CPWEPUI_CPWEPUI_EXIT,this);
 }
 
@@ -82,8 +105,8 @@
  */
 CMManagerShim::WlanSecMode CpWepUi::securityMode() const
 {
-    OstTraceFunctionEntry1(CPWEPUI_MODE_ENTRY,this);
-    OstTraceFunctionExit1(CPWEPUI_MODE_EXIT,this);
+    OstTraceFunctionEntry1(CPWEPUI_SECURITYMODE_ENTRY,this);
+    OstTraceFunctionExit1(CPWEPUI_SECURITYMODE_EXIT,this);
     //return security mode
     return CMManagerShim::WlanSecModeWep;
 }
@@ -97,22 +120,19 @@
  */
 QString CpWepUi::securityModeTextId() const
 {
-    OstTraceFunctionEntry1(CPWEPUI_LOCALIZATION_ID_ENTRY,this);
-    OstTraceFunctionExit1(CPWEPUI_LOCALIZATION_ID_EXIT,this);
+    OstTraceFunctionEntry1( CPWEPUI_SECURITYMODETEXTID_ENTRY, this );
+    OstTraceFunctionExit1( CPWEPUI_SECURITYMODETEXTID_EXIT, this );
     return "txt_occ_setlabel_wlan_security_mode_val_wep";
 }
 
 /*! 
- Sets the database reference (WLAN Service Table ID).
+ Sets the database reference Iap id.
 
  \param id Database reference
  */
 void CpWepUi::setReference(CmConnectionMethodShim *cmCm, uint id)
 {
     OstTraceFunctionEntry1(CPWEPUI_SETREFERENCE_ENTRY,this);
-
-    // Assuming that id is the connection method Id/IAP Id.
-    //mCmId - Not used currently
     mCmId = id;
 
     //mCmCM is not deleted assuming CmManager owns it.
@@ -136,7 +156,7 @@
 /*!
  * Returns the fully constructed Ui Group , for WEP security plugin
  * 
- * \param \param dataHelper to add Connections
+ * \param dataHelper to add Connections
  * 
  * \return The WEP UI
  */
@@ -150,6 +170,9 @@
     if (err != KErrNone) {
         OstTrace1( TRACE_ERROR, CPWEPUI_UIINSTANCE, "LoadFromDataBase returned %d", err );
     }
+    
+    //Store the address of the Data Helper
+    mItemDataHelper = &dataHelpper;
 
     mUi = new CpSettingFormItemData(HbDataFormModelItem::GroupItem, hbTrId(
             "txt_occ_subhead_security_settings"));
@@ -169,115 +192,124 @@
             this, SLOT(wepKeyInUseChanged(int)));
     mUi->appendChild(wepKeyInUse);
 
-    createWEPKeyOneGroup(dataHelpper);
+    //Create Ui for all 4 WEP keys
+    createWEPKeyGroup(KFirstKey);
 
-    createWEPKeyTwoGroup(dataHelpper);
+    createWEPKeyGroup(KSecondKey);
 
-    createWEPKeyThreeGroup(dataHelpper);
+    createWEPKeyGroup(KThirdKey);
 
-    createWEPKeyFourGroup(dataHelpper);
+    createWEPKeyGroup(KFourthKey);
+    
+    //Add Connections(signals)
+    addConnections(dataHelpper);
 
     OstTraceFunctionExit1(CPWEPUI_UIINSTANCE_EXIT,this);
     return mUi;
 }
 
-/*!
- * Create Ui element with text edit for WEP KEY One
- * 
- * \param dataHelper to add Connections
- */
-void CpWepUi::createWEPKeyOneGroup(CpItemDataHelper &dataHelpper)
-    {
-    OstTraceFunctionEntry1(CPWEPUI_CREATEWEPKEYONEGROUP_ENTRY,this);
-    mWepKeyText[KFirstKey] = new CpSettingFormItemData(
-            HbDataFormModelItem::TextItem,
-            hbTrId("txt_occ_subhead_wep_key_1"), mUi);
-
-    if (mKeyData[KFirstKey].length() != 0) {
-        mWepKeyText[KFirstKey]->setContentWidgetData("text",
-                mKeyData[KFirstKey]);
-    }
-    mWepKeyText[KFirstKey]->setContentWidgetData("echoMode", 2);
-    mWepKeyText[KFirstKey]->setContentWidgetData("smileysEnabled", "false");
-
-    dataHelpper.addConnection(mWepKeyText[KFirstKey],
-            SIGNAL( editingFinished ()), this, SLOT(wepKeyOneChanged() ));
-
-    mUi->appendChild(mWepKeyText[KFirstKey]);
-    OstTraceFunctionExit1(CPWEPUI_CREATEWEPKEYONEGROUP_EXIT,this);
-    }
 
 /*!
- * Create Ui element with text edit for WEP KEY Two
- * \param dataHelper to add Connections
- */
-void CpWepUi::createWEPKeyTwoGroup(CpItemDataHelper &dataHelpper)
-{
-    OstTraceFunctionEntry1(CPWEPUI_CREATEWEPKEYTWOGROUP_ENTRY,this);
-    mWepKeyText[KSecondKey] = new CpSettingFormItemData(
-            HbDataFormModelItem::TextItem,
-            hbTrId("txt_occ_subhead_wep_key_2"), mUi);
+   Validates current security settings. This function is called whenever
+   user tries to exit from the settings view. If the plugin determines
+   that some settings need editing before considered valid, it shall
+   return false. A dialog will be shown to the user indicating that
+   settings are still incomplete and asking if he/she wishes to exit
+   anyway.
 
-    if (mKeyData[KSecondKey].length() != 0) {
-        mWepKeyText[KSecondKey]->setContentWidgetData("text",
-                mKeyData[KSecondKey]);
+   \return True if security settings for WEP are valid, false if not.
+*/
+bool CpWepUi::validateSettings()
+{
+    bool ret(false);
+    //Check the latest string entered for the WEP key in the text box
+    QVariant keyValue = mWepKeyText[mNewKeySelected]->contentWidgetData("text");
+    QString keyString = keyValue.toString();
+    
+    WepKeyValidator::KeyStatus keystatus = WepKeyValidator::validateWepKey(keyString);
+    
+    //Check if key is  valid and not of zero length 
+    if(keystatus==WepKeyValidator::KeyStatusOk) {
+        ret = true;
     }
-    mWepKeyText[KSecondKey]->setContentWidgetData("echoMode", 2);
-    mWepKeyText[KSecondKey]->setContentWidgetData("smileysEnabled", "false");
-    dataHelpper.addConnection(mWepKeyText[KSecondKey],
-            SIGNAL( editingFinished ()), this, SLOT(wepKeyTwoChanged() ));
-
-    mUi->appendChild(mWepKeyText[KSecondKey]);
-    OstTraceFunctionExit1(CPWEPUI_CREATEWEPKEYTWOGROUP_EXIT,this);
+    return ret;
 }
 
 /*!
- * Create Ui element with text edit for WEP KEY Three
- * \param dataHelper to add Connections
- */
-void CpWepUi::createWEPKeyThreeGroup(CpItemDataHelper &dataHelpper)
-{
-    OstTraceFunctionEntry1(CPWEPUI_CREATEWEPKEYTHREEGROUP_ENTRY,this);
-    mWepKeyText[KThirdKey] = new CpSettingFormItemData(
+ * Create Ui element with text edit for WEP KEYS
+ * 
+ * \param index of the WEP key
+ * */
+void CpWepUi::createWEPKeyGroup(int index)
+    {
+    OstTraceFunctionEntry1(CPWEPUI_CREATEWEPKEYGROUP_ENTRY,this);
+    QString textId;
+    
+    switch(index)
+        {
+        case KFirstKey:
+            textId  = hbTrId("txt_occ_subhead_wep_key_1");
+            break;
+            
+            
+        case KSecondKey:
+            textId  = hbTrId("txt_occ_subhead_wep_key_2");
+            break;
+            
+        case KThirdKey:
+            textId  = hbTrId("txt_occ_subhead_wep_key_3");
+            break;
+            
+        case KFourthKey:
+            textId  = hbTrId("txt_occ_subhead_wep_key_4");
+            break;
+        }
+        
+   
+    mWepKeyText[index] = new CpSettingFormItemData(
             HbDataFormModelItem::TextItem,
-            hbTrId("txt_occ_subhead_wep_key_3"), mUi);
+            textId, mUi);
 
-    if (mKeyData[KThirdKey].length() != 0) {
-        mWepKeyText[KThirdKey]->setContentWidgetData("text",
-                mKeyData[KThirdKey]);
+    if (mKeyData[index].length() != 0) {
+        mWepKeyText[index]->setContentWidgetData("text",
+                mKeyData[index]);
     }
-    mWepKeyText[KThirdKey]->setContentWidgetData("echoMode", 2);
-    mWepKeyText[KThirdKey]->setContentWidgetData("smileysEnabled", "false");
-    dataHelpper.addConnection(mWepKeyText[KThirdKey],
-            SIGNAL( editingFinished ()), this, SLOT(wepKeyThreeChanged() ));
+    mWepKeyText[index]->setContentWidgetData("echoMode",HbLineEdit::PasswordEchoOnEdit);
+    mWepKeyText[index]->setContentWidgetData("smileysEnabled", "false");
 
-    mUi->appendChild(mWepKeyText[KThirdKey]);
-    OstTraceFunctionExit1(CPWEPUI_CREATEWEPKEYTHREEGROUP_EXIT,this);
-}
+    
+    mUi->appendChild(mWepKeyText[index]);
+    OstTraceFunctionExit1(CPWEPUI_CREATEWEPKEYGROUP_EXIT,this);
+    }
+
 
 /*!
- * Create Ui element with text edit for WEP KEY  Four
- * \param dataHelper to add Connections
+ * Add signals to all the text Edit of WEP key groups.
+ *  
+ *  \param dataHelper ; to add Connections
  */
-void CpWepUi::createWEPKeyFourGroup(CpItemDataHelper &dataHelpper)
-{
-    OstTraceFunctionEntry1(CPWEPUI_CREATEWEPKEYFOURGROUP_ENTRY,this);
-    mWepKeyText[KFourthKey] = new CpSettingFormItemData(
-            HbDataFormModelItem::TextItem,
-            hbTrId("txt_occ_subhead_wep_key_4"), mUi);
+void CpWepUi::addConnections(CpItemDataHelper &dataHelpper)
+    {
+    OstTraceFunctionEntry1( CPWEPUI_ADDCONNECTIONS_ENTRY, this );
+    
+    dataHelpper.addConnection(mWepKeyText[KFirstKey],
+                SIGNAL( editingFinished ()), this, SLOT(wepKeyOneChanged() ));
+    
+    dataHelpper.addConnection(mWepKeyText[KSecondKey],
+               SIGNAL( editingFinished ()), this, SLOT(wepKeyTwoChanged() ));
+    
+    dataHelpper.addConnection(mWepKeyText[KThirdKey],
+               SIGNAL( editingFinished ()), this, SLOT(wepKeyThreeChanged() ));
+    
+    dataHelpper.addConnection(mWepKeyText[KFourthKey],
+                SIGNAL( editingFinished ()), this, SLOT(wepKeyFourChanged() ));
+    
+    dataHelpper.connectToForm(SIGNAL(itemShown (const QModelIndex &) ), 
+            this, SLOT(setEditorPreferences(const QModelIndex &)));
+ 
+    OstTraceFunctionExit1( CPWEPUI_ADDCONNECTIONS_EXIT, this );
+    }
 
-    if (mKeyData[KFourthKey].length() != 0) {
-        mWepKeyText[KFourthKey]->setContentWidgetData("text",
-                mKeyData[KFourthKey]);
-    }
-    mWepKeyText[KFourthKey]->setContentWidgetData("echoMode", 2);
-    mWepKeyText[KFourthKey]->setContentWidgetData("smileysEnabled", "false");
-    dataHelpper.addConnection(mWepKeyText[KFourthKey],
-            SIGNAL( editingFinished ()), this, SLOT(wepKeyFourChanged() ));
-
-    mUi->appendChild(mWepKeyText[KFourthKey]);
-    OstTraceFunctionExit1(CPWEPUI_CREATEWEPKEYFOURGROUP_EXIT,this);
-}
 
 /*!
  * Slot to handle , if a different wep key (index) 
@@ -295,6 +327,9 @@
         OstTrace1( TRACE_ERROR, CPWEPUI_WEPKEYINUSECHANGED, "Error wepKeyInUse returned %d", err );
     }
     tryUpdate();
+    
+    //Store the wep key in use
+    mNewKeySelected = wepKeyInUse;
     OstTraceFunctionExit1(CPWEPUI_WEPKEYINUSECHANGED_EXIT,this);
 }
 
@@ -400,6 +435,7 @@
         commitWEPkeys(index);
     }
     else {
+        OstTrace0( TRACE_ERROR, CPWEPUI_WEPKEYTEXTCHANGED_ERROR, "CpWepUi::wepKeyTextChanged Invalid WEP Key Input" );        
         showMessageBox(HbMessageBox::MessageTypeWarning, hbTrId(
                 "txt_occ_info_invalid_input"));
     }
@@ -407,6 +443,29 @@
 }
 
 /*!
+ * Slot that configures the editor settings for all WEP key fields.
+ * This slot is invoked whenever a new item(s) are shown in the current view 
+ * 
+ * \param modelIndex Index of the current item in the  model
+ */
+void CpWepUi::setEditorPreferences(const QModelIndex &modelIndex)
+{
+    
+    HbDataFormModelItem *item = mItemDataHelper->modelItemFromModelIndex(modelIndex);
+
+    HbSmileyTheme smiley;
+    /* Configure settings only for text fields*/
+    if(item->type() == HbDataFormModelItem::TextItem) {
+        HbLineEdit *edit = qobject_cast<HbLineEdit*>(mItemDataHelper->widgetFromModelIndex(modelIndex));           
+        HbEditorInterface editInterface(edit);    
+        editInterface.setInputConstraints(HbEditorConstraintLatinAlphabetOnly);
+        edit->setInputMethodHints(Qt::ImhNoPredictiveText);    
+        edit->setMaxLength(KMaxKeyLength);
+        }
+}
+
+
+/*!
  * Store the WEP key in Comms
  * \enumValue the right field represented by the enum value
  * \key the WEP key String to store
@@ -508,7 +567,7 @@
     mKeyData.insert(KFirstKey, mCmCM->getString8Attribute(
             CMManagerShim::WlanWepKey1InHex));
 
-    mKeyData.insert(KSecondKey, mCmCM->getString8Attribute(
+    mKeyData.insert(KSecondKey,mCmCM->getString8Attribute(
             CMManagerShim::WlanWepKey2InHex));
 
     mKeyData.insert(KThirdKey, mCmCM->getString8Attribute(
--- a/securitysettings/cpwlansecurityuiplugins/cpwepui/src/wepkeyvalidator.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/securitysettings/cpwlansecurityuiplugins/cpwepui/src/wepkeyvalidator.cpp	Mon May 24 20:32:47 2010 +0300
@@ -76,11 +76,7 @@
     else if (length == WepAscii64BitMaxLength || length == WepAscii128BitMaxLength) {
         ret = isAscii(key);
     }
-    
-    else if (length == WepKeyEmptyString) {
-       ret =  KeyStatusOk ;  
-    }
-    
+
     else {
         ret = KeyStatusWepInvalidLength;
     }
--- a/securitysettings/cpwlansecurityuiplugins/cpwepui/traces/OstTraceDefinitions.h	Thu May 13 22:51:27 2010 +0300
+++ b/securitysettings/cpwlansecurityuiplugins/cpwepui/traces/OstTraceDefinitions.h	Mon May 24 20:32:47 2010 +0300
@@ -11,7 +11,7 @@
  *
  * Contributors:
  *
- * Description: .
+ * Description: TraceHeader ,includes the TraceAPI 
  *   
  *
  */
--- a/securitysettings/cpwlansecurityuiplugins/cpwlansecurityuiplugins.pro	Thu May 13 22:51:27 2010 +0300
+++ b/securitysettings/cpwlansecurityuiplugins/cpwlansecurityuiplugins.pro	Mon May 24 20:32:47 2010 +0300
@@ -7,22 +7,29 @@
 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
 #
 # Initial Contributors:
-# Nokia Corporation - initial contribution.
+# 	Nokia Corporation - initial contribution.
 #
 # Contributors:
 #
 # Description: 
-# Control Panel QT UIs for WLAN security settings configuration
+# 	Control Panel QT UIs for WLAN security settings configuration
 #
-# %version: tr1cfwln#4.1.1 %
+# %version: tr1cfwln#10 %
+#
 
 TEMPLATE = subdirs
 
-SUBDIRS  += \
-		cpwepui \
-		cpwpaui \
-		cpwpa2ui \
-		cpwpacmnui
-		
+SUBDIRS += \
+	cpwepui \
+	cpwpacmnui \
+	cpwpaui \
+	cpwpa2ui
 
-CONFIG += ordered
\ No newline at end of file
+CONFIG += ordered
+
+# export common iby for the translation file
+symbian:
+{
+   	BLD_INF_RULES.prj_exports += \
+  		"rom/cpwlansecurityuiplugins_resources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(cpwlansecurityuiplugins_resources.iby)"
+}
\ No newline at end of file
--- a/securitysettings/cpwlansecurityuiplugins/cpwpa2ui/cpwpa2ui.pro	Thu May 13 22:51:27 2010 +0300
+++ b/securitysettings/cpwlansecurityuiplugins/cpwpa2ui/cpwpa2ui.pro	Mon May 24 20:32:47 2010 +0300
@@ -1,69 +1,78 @@
+# 
 # Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
 # which accompanies this distribution, and is available
 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
 # Initial Contributors:
-# Nokia Corporation - initial contribution.
+# 	Nokia Corporation - initial contribution.
+#
 # Contributors:
+#
 # Description:
-# %version: tr1cfwln#5 %
+#	Control Panel UI for WPA2 only security mode
+#
+# %version: 14 %
+#
+
 TEMPLATE = lib
 TARGET = cpwpa2ui
+
 DEPENDPATH += 
-INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE \
+
+INCLUDEPATH += \
+	$$MW_LAYER_SYSTEMINCLUDE \
     $$OS_LAYER_SYSTEMINCLUDE \
-    ../cpwpacmnui/inc \
-    ../../inc
+    ../inc
     
-CONFIG += hb \
+CONFIG += \
+	hb \
     plugin
-LIBS += -lcpframework \
-    -leapqtplugininfo \
+    
+LIBS += \ 
+	-lcpframework \    
     -lcpwpacmnui \
-    -lconnection_settings_shim
+    -lconnection_settings_shim \
+    -leapqtconfiginterface
+    
 MOC_DIR = _moc
 RCC_DIR = _rcc
 OBJECTS_DIR = _objects
 
 # Input
-HEADERS += inc/wpa2keyvalidator.h \
-    traces/OstTraceDefinitions.h \
+HEADERS += \ 
+	traces/OstTraceDefinitions.h \
     inc/cpwpa2ui.h
-SOURCES += src/wpa2keyvalidator.cpp \
-    src/cpwpa2ui.cpp
-symbian: { 
+    
+SOURCES += src/cpwpa2ui.cpp
+
+symbian: 
+{ 
+	TARGET.CAPABILITY = CAP_GENERAL_DLL
     TARGET.EPOCALLOWDLLDATA = 1
     TARGET.UID3 = 0x2002DC73
-    LIBS += -leapqtconfiginterface
-    BLD_INF_RULES.prj_exports += "rom/cpwpa2ui.iby CORE_MW_LAYER_IBY_EXPORT_PATH(cpwpa2ui.iby)"
-}
-symbian { 
+
     deploy.path = C:
     qtplugins.path = /resource/qt/plugins/controlpanel/wlansecurity
     qtplugins.sources += qmakepluginstubs/cpwpa2ui.qtplugin
-    
-    # This is for new exporting system coming in garden
     for(qtplugin, qtplugins.sources):BLD_INF_RULES.prj_exports += "./$$qtplugin $$deploy.path$$qtplugins.path/$$basename(qtplugin)"
+
+    BLD_INF_RULES.prj_exports += \ 
+    	"rom/cpwpa2ui.iby CORE_MW_LAYER_IBY_EXPORT_PATH(cpwpa2ui.iby)"
 }
 
-# Temporary solution to fix tracecompiler
-# When tracecompiler is fixed, this can be removed
-symbian: {
+symbian: 
+{
     MMP_RULES += "USERINCLUDE traces"
 }
 
-# temporary not used; waiting for the latest .ts file ; accordingly export will change
-# translation file temporarily read as qt resource
-# TRANSLATIONS += /resource/qtwlan_en_GB.ts
+# common translation file for all plugins
+TRANSLATIONS = cpwlansecsettingsplugin.ts
 
-RESOURCES += resources/resource.qrc
-
-TARGET.CAPABILITY = CAP_GENERAL_DLL
-dynamiclibrary.sources = cpwpacmnui.dll
-dynamiclibrary.path = /sys/bin
 plugin.sources += cpwpa2ui.dll
 plugin.path = /resource/qt/plugins/controlpanel
-DEPLOYMENT += plugin \
-    dynamiclibrary
+
+DEPLOYMENT += plugin 
+
--- a/securitysettings/cpwlansecurityuiplugins/cpwpa2ui/inc/cpwpa2ui.h	Thu May 13 22:51:27 2010 +0300
+++ b/securitysettings/cpwlansecurityuiplugins/cpwpa2ui/inc/cpwpa2ui.h	Mon May 24 20:32:47 2010 +0300
@@ -17,7 +17,7 @@
 */
 
 /*
-* %version: 10 %
+* %version: 14 %
 */
 
 
@@ -26,23 +26,17 @@
 
 // System includes
 #include <cpsettingformitemdata.h>
-#include <HbMessageBox>
-//#include <HbTranslator>
-//#include <QSharedPointer>
-#include <QTranslator>
-
+#include <cpwlansecurityplugininterface.h>
 
 // User includes
-#include "cpwlansecurityplugininterface.h"
+
 
 // Forward declarations
-class EapPluginInformation;
-class PluginInformation;
-class CpBaseSettingView;
 class EapQtConfigInterface;
-class EapEntyItemData;
 class CpWpaCmnUi;
 class CmConnectionMethodShim;
+class HbTranslator;
+
 
 /*!
  * @addtogroup group_wlan_security_ui_plugin_wpa2_only
@@ -74,39 +68,19 @@
               
        CpSettingFormItemData* uiInstance(
                CpItemDataHelper &dataHelper);
-    
-private:
        
-       bool tryUpdate();
-
-       void handleUpdateError();
-
-       void showMessageBox( HbMessageBox::MessageBoxType type,
-           const QString &text);
-
-       void updateWpaSettings();
-  
-private slots:
- 
-    //void currentEapPlugin(int currentPlugin);    
-    //void wpaTypeChanged(int pskEnable);
-    void pskKeyChanged(QString& key);
-    
+       bool validateSettings();
 
 private:
     
     Q_DISABLE_COPY(CpWpa2Ui)
         
     //!WPA security group item
-    CpSettingFormItemData* mUi;   
+    CpSettingFormItemData* mUi;  
+    
+    //!Translator for all the localisation Text Id's    
+   	HbTranslator* mTranslator;
 
-    //! Connection method Id
-    int mCmId;
-   
-    //!Translator for all the localisation Text Id's
-    //QSharedPointer<HbTranslator> mTranslator;
-    QTranslator* mTranslator;
-    
     //! Connection Settings Shim connection method pointer    
     CmConnectionMethodShim *mCmCM;    
     
@@ -115,9 +89,6 @@
 	
 	//!WPA ui Implementer Interface
     QScopedPointer <CpWpaCmnUi> mWpa2Ui;
-    
-    //! Message box for info notes
-    QSharedPointer<HbMessageBox> mMessageBox;
 
  };
 
--- a/securitysettings/cpwlansecurityuiplugins/cpwpa2ui/inc/wpa2keyvalidator.h	Thu May 13 22:51:27 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: 
- *   WLAN Wizard Utilities
- *
- */
-
-/*
- * %version: 1 %
- */
-
-#ifndef WPA2KEYVALIDATOR_H
-#define WPA2KEYVALIDATOR_H
-
-/*!
- * @addtogroup group_wpa_key_validator
- * @{
- */
-
-class Wpa2KeyValidator
-{
-public:
-    enum KeyStatus
-    {
-        KeyStatusOk,
-        KeyStatusIllegalCharacters,
-        KeyStatusWpa2TooShort,
-        KeyStatusWpa2TooLong,
-    };
-
-    static const int Wpa2MaxLenght = 64;
-    static const int Wpa2MinLenght = 8;
-    
-public:
-
-    static KeyStatus validateWpa2Key(const QString &key);
-    static KeyStatus isAscii(const QString &key);
-    static KeyStatus isHex(const QString &key);
-};
-
-/*! @} */
-
-#endif /* WPA2KEYVALIDATOR_H */
--- a/securitysettings/cpwlansecurityuiplugins/cpwpa2ui/rom/cpwpa2ui.iby	Thu May 13 22:51:27 2010 +0300
+++ b/securitysettings/cpwlansecurityuiplugins/cpwpa2ui/rom/cpwpa2ui.iby	Mon May 24 20:32:47 2010 +0300
@@ -7,22 +7,30 @@
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
 * Initial Contributors:
-* Nokia Corporation - initial contribution.
+* 	Nokia Corporation - initial contribution.
 *
 * Contributors:
 *
 * Description:
+* 	IBY file for WPA2 only control panel plugin
 *
 */
 
+/*
+ * %version: tr1cfwln#3 %
+ */
+
 #ifndef CPWPA2UI_IBY
 #define CPWPA2UI_IBY
 
 #include <data_caging_paths_for_iby.hrh>
 #include <bldvariant.hrh>
 
+#ifdef __PROTOCOL_WLAN
+
 file=ABI_DIR/BUILD_DIR/cpwpa2ui.dll SHARED_LIB_DIR/cpwpa2ui.dll
 data=/epoc32/data/c/resource/qt/plugins/controlpanel/wlansecurity/cpwpa2ui.qtplugin resource/qt/plugins/controlpanel/wlansecurity/cpwpa2ui.qtplugin
 
+#endif // __PROTOCOL_WLAN
 
 #endif // CPWPA2UI_IBY
--- a/securitysettings/cpwlansecurityuiplugins/cpwpa2ui/src/cpwpa2ui.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/securitysettings/cpwlansecurityuiplugins/cpwpa2ui/src/cpwpa2ui.cpp	Mon May 24 20:32:47 2010 +0300
@@ -16,23 +16,21 @@
  */
 
 /*
- * %version: 17 %
+ * %version: 22 %
  */
 
 // User includes
 #include "cpwpa2ui.h"
 #include "cpwpacmnui.h"
-#include "wpa2keyvalidator.h"
 
 // System includes
-#include <HbDeviceNotificationDialog>
 #include <cmmanagerdefines_shim.h>
 #include <cmconnectionmethod_shim.h>
 #include <eapqtconfiginterface.h>
 #include <QStringList>
-#include <QLocale>
-#include <QCoreApplication>
+#include <HbTranslator>
 
+//Trace Definition
 #include "OstTraceDefinitions.h"
 #ifdef OST_TRACE_COMPILER_IN_USE
 #include "cpwpa2uiTraces.h"
@@ -42,7 +40,7 @@
 // Constants
 //The order in which WPA2 only mode appears in the list of available 
 //security mode
-const int UI_ORDER_WPA2_ONLY = 50;
+const int UI_ORDER_WPA2_ONLY = 30;
 
 /*!
  \class CpWpa2Ui
@@ -50,26 +48,26 @@
  Security Settings Control Panel Plugin,
  which will allow viewing/editing of WPA2 only Security Settings.
  */
-//Contructs WPA2 object
+/*!
+ * Constructor
+ * 
+ */
 CpWpa2Ui::CpWpa2Ui() :
-    mUi(NULL),  mCmCM(NULL), mEapQtConfigInterface(NULL),
-            mWpa2Ui(NULL)
+    mUi(NULL), 
+    mTranslator(new HbTranslator("cpwlansecsettingsplugin")),
+    mCmCM(NULL),
+    mEapQtConfigInterface(NULL),
+    mWpa2Ui(NULL)
 {
-    mTranslator = new QTranslator(this);
-    mTranslator->load(":/loc/wlan_en_GB.qm");
-
-    qApp->installTranslator(mTranslator);
-    
-    /*mTranslator = QSharedPointer<HbTranslator> (
-               new HbTranslator("wlan_en_GB"));*/
 
 }
 
-//Deletes all objects WPA2 owns
+//Destructor
 CpWpa2Ui::~CpWpa2Ui()
 {
     OstTraceFunctionEntry1(CPWPA2UI_CPWPA2UI_ENTRY,this);
-    //delete mEapQtConfigInterface;
+    delete mEapQtConfigInterface;
+    delete mTranslator;
     OstTraceFunctionExit1(CPWPA2UI_CPWPA2UI_EXIT,this);
 }
 
@@ -82,8 +80,8 @@
  */
 CMManagerShim::WlanSecMode CpWpa2Ui::securityMode() const
 {
-    OstTraceFunctionEntry1(CPWPA2UI_MODE_ENTRY,this);
-    OstTraceFunctionExit1(CPWPA2UI_MODE_EXIT,this);
+    OstTraceFunctionEntry1(CPWPA2UI_SECURITYMODE_ENTRY,this);
+    OstTraceFunctionExit1(CPWPA2UI_SECURITYMODE_EXIT,this);
     //return security mode
     return CMManagerShim::WlanSecModeWpa2;
 }
@@ -97,28 +95,25 @@
  */
 QString CpWpa2Ui::securityModeTextId() const
 {
-    OstTraceFunctionEntry1(CPWPA2UI_LOCALIZATIONID_ENTRY,this);
-    OstTraceFunctionExit1(CPWPA2UI_LOCALIZATIONID_EXIT,this);
+    OstTraceFunctionEntry1(CPWPA2UI_SECURITYMODETEXTID_ENTRY,this);
+    OstTraceFunctionExit1(CPWPA2UI_SECURITYMODETEXTID_EXIT,this);
     return "txt_occ_setlabel_wlan_security_mode_val_wpa2_only";
 }
 
 /*! 
- Sets the database reference (WLAN Service Table ID).
+ Sets the database reference IAP id.
 
  \param id Database reference
  */
 void CpWpa2Ui::setReference(CmConnectionMethodShim *cmCm, uint id)
 {
     OstTraceFunctionEntry1(CPWPA2UI_SETREFERENCE_ENTRY,this);
-    // Assuming that id is the connection method Id/IAP Id.
-
-    mCmId = id;
-
-    /*if (!mEapQtConfigInterface) {
+    if (!mEapQtConfigInterface) {
         mEapQtConfigInterface = new EapQtConfigInterface(
-                EapQtConfigInterface::EapBearerTypeWlan, mCmId);
-        //fix, hangs
-    }*/
+            EapQtConfigInterface::EapBearerTypeWlan, id);
+    } else {
+        mEapQtConfigInterface->setConfigurationReference(id);     
+    }
 
     //mCmCM is not deleted assuming mCmManager owns it.
     mCmCM = cmCm;
@@ -148,160 +143,30 @@
 {
     OstTraceFunctionEntry1(CPWPA2UI_UIINSTANCE_ENTRY,this);
 
-		//reset the Common Ui Ptr
+	//reset the Common Ui Ptr
     mWpa2Ui.reset(new CpWpaCmnUi(CMManagerShim::WlanSecModeWpa2, dataHelpper));
 
     mUi = mWpa2Ui->createUi(mEapQtConfigInterface, mCmCM);
-
-    connect(mWpa2Ui.data(), SIGNAL(keyChanged(QString&)), this,
-            SLOT(pskKeyChanged(QString&)));
-
-    connect(mWpa2Ui.data(), SIGNAL(pskEapModeToggled(int)), this,
-            SLOT(wpaTypeChanged(int)));
-
-    connect(mWpa2Ui.data(), SIGNAL(eapPluginChanged(int)), this,
-            SLOT(currentEapPlugin(int)));
-
+    
     OstTraceFunctionExit1(CPWPA2UI_UIINSTANCE_EXIT,this);
     return mUi;
 }
 
-// ======== LOCAL FUNCTIONS ========
 /*!
- Slot to handle change in wpa mode :- PSK /EAP
-
- \param pskEnable the current mode chosen
- */
-/*void CpWpa2Ui::wpaTypeChanged(int pskEnable)
-{
-    int err;
-    OstTraceFunctionEntry1(CPWPA2UI_WPATYPECHANGED_ENTRY,this);
-
-    bool PskEnable = pskEnable ? ETrue : EFalse;
-
-    QT_TRYCATCH_ERROR(err,mCmCM->setBoolAttribute(CMManagerShim::WlanEnableWpaPsk, PskEnable));
-
-    if(err !=KErrNone) {
-          OstTrace1( TRACE_ERROR, CPWPA2UI_WPATYPECHANGED, "ERROR WPA2 only:wpatypereturned returned %d", err );
-    }
-    tryUpdate();
-    OstTraceFunctionExit1(CPWPA2UI_WPATYPECHANGED_EXIT,this);
-}*/
-
-/*!
- Slot to handle change in pre-shared key string
-
- \param key changed string for PSK
- */
-void CpWpa2Ui::pskKeyChanged(QString &key)
-{
-    int err;
-    OstTraceFunctionEntry1(CPWPA2UI_PSKKEYCHANGED_ENTRY,this);
-
-    //Check for Validity of Pre-shared Key
-    Wpa2KeyValidator::KeyStatus keystatus = Wpa2KeyValidator::validateWpa2Key(key);
-    
-    if (keystatus == Wpa2KeyValidator::KeyStatusOk) {
-        QT_TRYCATCH_ERROR(err, mCmCM->setString8Attribute(CMManagerShim::WlanWpaPreSharedKey, key));
-        if(err !=KErrNone) {
-                 OstTrace1( TRACE_ERROR, CPWPA2UI_PSKKEYCHANGED, "ERROR WPA2 only: pskKeyChanged returned %d", err );
-        }
-        tryUpdate();
-    }
-    
-    else {
-    showMessageBox(HbMessageBox::MessageTypeWarning, hbTrId(
-                   "txt_occ_info_invalid_input"));
-    }
-    OstTraceFunctionExit1(CPWPA2UI_PSKKEYCHANGED_EXIT,this);
-}
-
-/*!
- Slot to handle change in eap method in use
- \param currentplugin plugin number to indicate the
- eap method in use
- */
-/*void CpWpa2Ui::currentEapPlugin(int  currentPlugin  )
-{
-    OstTraceFunctionEntry1(CPWPA2UI_CURRENTEAPPLUGIN_ENTRY,this);
-
-    // define enum to store the current EAP type
-    //mCmCM->setIntAttribute( use appropriate enum to get the eap plugin index );
-    OstTraceFunctionExit1(CPWPA2UI_CURRENTEAPPLUGIN_EXIT,this);
-}*/
+   Validates current security settings. This function is called whenever
+   user tries to exit from the settings view. If the plugin determines
+   that some settings need editing before considered valid, it shall
+   return false. A dialog will be shown to the user indicating that
+   settings are still incomplete and asking if he/she wishes to exit
+   anyway.
 
-bool CpWpa2Ui::tryUpdate()
-{
-    OstTraceFunctionEntry1(CPWPA2UI_TRYUPDATE_ENTRY,this);
-    
-    // Try update
-    try {
-        mCmCM->update();
-    }
-    catch (const std::exception&) {
-        // Handle error
-        handleUpdateError();
-        
-        OstTraceFunctionExit1(CPWPA2UI_TRYUPDATE_EXIT,this);
-        return false;
-    }
-
-    OstTraceFunctionExit1(DUP1_CPWPA2UI_TRYUPDATE_EXIT,this);
-    return true;
-}
-
-/*!
-    Handles failed CommsDat update.
- */
-void CpWpa2Ui::handleUpdateError()
+   \return True if security settings for WPA2 only are valid, false if not.
+*/
+bool CpWpa2Ui::validateSettings()
 {
-    OstTraceFunctionEntry1(CPWPA2UI_HANDLEUPDATEERROR_ENTRY,this);
-    
-    // Show error note to user
-    showMessageBox(
-        HbMessageBox::MessageTypeWarning,
-        hbTrId("txt_occ_info_unable_to_save_setting"));
-    // Reload settings from CommsDat and update UI
-    try {
-        mCmCM->refresh();
-    }
-    catch (const std::exception&) {
-        // Ignore error from refresh. Most likely this will not happen, but
-        // if it does, there isn't very much we can do.
-        OstTrace0(
-            TRACE_ERROR,
-            CPWPA2UI_HANDLEUPDATEERROR,
-            "Refresh failed");
-    };
-    updateWpaSettings();
-    
-    OstTraceFunctionExit1(CPWPA2UI_HANDLEUPDATEERROR_EXIT,this);
-}
-
-/*!
-    Shows message box with "OK" button using given text.
-*/
-void CpWpa2Ui::showMessageBox(
-    HbMessageBox::MessageBoxType type,
-    const QString &text)
-{
-    OstTraceFunctionEntry1(CPWPA2UI_SHOWMESSAGEBOX_ENTRY,this);
-    
-    // Create a message box
-    mMessageBox = QSharedPointer<HbMessageBox>(new HbMessageBox(type));
-    mMessageBox->setText(text);
-    mMessageBox->open();
-    
-    OstTraceFunctionExit1(CPWPA2UI_SHOWMESSAGEBOX_EXIT,this);
+    return mWpa2Ui->validateSettings();
 }
 
 
-void CpWpa2Ui::updateWpaSettings()
-    {
-    OstTraceFunctionEntry1(CPWPA2UI_UPDATEWPASETTINGS_ENTRY,this);
-    mWpa2Ui->reset();
-    OstTraceFunctionExit1(CPWPA2UI_UPDATEWPASETTINGS_EXIT,this);
-    }
-
 Q_EXPORT_PLUGIN2(CpWpa2Ui, CpWpa2Ui)
 ;
--- a/securitysettings/cpwlansecurityuiplugins/cpwpa2ui/src/wpa2keyvalidator.cpp	Thu May 13 22:51:27 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
-/*
- * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: 
- *   Validate WPA2 only keys
- *
- */
-/*
- * %version: 1 %
- */
-
-#include <QString>
-#include "wpa2keyvalidator.h"
-
-/*!
-    \class Wpa2KeyValidator wpa2keyvalidator.cpp
-    \brief Utilities for WPA2 only key validations.
-    
-*/
-/*!
-    \enum Wpa2KeyValidator::KeyStatus
-    This enum defines the validation results.
-
-    \var Wpa2KeyValidator::KeyStatusOk
-    Key is valid.
-    
-    \var Wpa2KeyValidator::KeyStatusIllegalCharacters
-    Key contains illegal characters.
-    
-    \var Wpa2KeyValidator::KeyStatusWpa2TooShort
-    WPA key is too short. Minimum allowed length is 8. See 
-    WlanWizardUtils::validateWpaKey().
-    
-    \var Wpa2KeyValidator::KeyStatusWpa2TooLong
-    WPA key is too long. Minimum allowed length is 64 for hex key and 63 for 
-    ascii key. See WlanWizardUtils::validateWpaKey().
-*/
-
-/*! 
- * Process WPA2 key validation. A passphrase can contain from 8 to 63 ASCII
- * characters where each character MUST have a decimal encoding in the range of
- * 32 to 126, inclusive.
- *
- * A preshared key is stored as 64 character hex string.
- * 
- * @param key PSK to be validated
- * 
- * @return Following values are possible
- * - KeyStatusOk
- * - KeyStatusIllegalCharacters
- * - KeyStatusWpa2TooShort
- * - KeyStatusWpa2TooLong
- */
-Wpa2KeyValidator::KeyStatus Wpa2KeyValidator::validateWpa2Key(const QString &key)
-{
-    int length = key.length();
-    KeyStatus ret = KeyStatusOk;
-
-    if (length < Wpa2MinLenght) {
-        ret = KeyStatusWpa2TooShort;
-    }
-    else if (length > Wpa2MaxLenght) {
-        ret = KeyStatusWpa2TooLong;
-    }
-    // hex string
-    else if (length == Wpa2MaxLenght) {
-        ret = isHex(key);
-    }
-    else {
-        ret = isAscii(key);
-    }
-
-    return ret;
-}
-
-
-/*!
- * Process Ascii validation. Allowed characters are from 32 to 126.
- * 
- * @param key to be validated.
- * 
- * @return Following values are possible
- * - KeyStatusOk
- * - KeyStatusIllegalCharacters
- */
-Wpa2KeyValidator::KeyStatus Wpa2KeyValidator::isAscii(const QString &key)
-{
-    QChar ch32(32);
-    QChar ch126(126);
-
-    const QChar *data = key.data();
-    while (!data->isNull()) {
-        if ((*data) < ch32 || (*data) > ch126) {
-            return KeyStatusIllegalCharacters;
-        }
-        ++data;
-    }
-    return KeyStatusOk;
-}
-
-/*!
- * Process Hex validation. Allowed characters are
- * - from 0 to 9
- * - from a to f
- * - from A to F
- * 
- * @param key to be validated.
- * 
- * @return Following values are possible
- * - KeyStatusOk
- * - KeyStatusIllegalCharacters
- */
-Wpa2KeyValidator::KeyStatus Wpa2KeyValidator::isHex(const QString &key)
-{
-    QChar ch_A(65); // Character: A
-    QChar ch_F(70); // Character: F
-    QChar ch_a(97); // Character: a
-    QChar ch_f(102);// Character: f
-
-    const QChar *data = key.data();
-    while (!data->isNull()) {
-        if (data->isDigit() ||
-            (*data) >= ch_a && (*data) <= ch_f ||
-            (*data) >= ch_A && (*data) <= ch_F) {
-            ++data;
-        }
-        else {
-            return KeyStatusIllegalCharacters;
-        }
-    }
-    return KeyStatusOk;
-}
--- a/securitysettings/cpwlansecurityuiplugins/cpwpa2ui/traces/OstTraceDefinitions.h	Thu May 13 22:51:27 2010 +0300
+++ b/securitysettings/cpwlansecurityuiplugins/cpwpa2ui/traces/OstTraceDefinitions.h	Mon May 24 20:32:47 2010 +0300
@@ -11,16 +11,15 @@
  *
  * Contributors:
  *
- * Description: .
+ * Description: TraceHeader ,includes the TraceAPI 
  *   
  *
  */
  
+/*
+ * %version: 2 %
+ */
  
-/*
- * %version: 3 %
- */
-
 #ifndef __OSTTRACEDEFINITIONS_H__
 #define __OSTTRACEDEFINITIONS_H__
 #include <opensystemtrace.h>
--- a/securitysettings/cpwlansecurityuiplugins/cpwpacmnui/cpwpacmnui.pro	Thu May 13 22:51:27 2010 +0300
+++ b/securitysettings/cpwlansecurityuiplugins/cpwpacmnui/cpwpacmnui.pro	Mon May 24 20:32:47 2010 +0300
@@ -1,53 +1,74 @@
+# 
 # Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
 # under the terms of the License "Eclipse Public License v1.0"
 # which accompanies this distribution, and is available
 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
+# 
 # Initial Contributors:
-# Nokia Corporation - initial contribution.
+# 	Nokia Corporation - initial contribution.
+#
 # Contributors:
+# 
 # Description:
-# %version: 10 %
+# 	Common UI implementation for WPA/WPA2 ,802.1x and WPA2 only security modes
+#
+# %version: tr1cfwln#15 %
+#
+
+
 TEMPLATE = lib
 TARGET = cpwpacmnui
+
+DEFINES += WPAUI_LIBRARY
 DEPENDPATH += 
-INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE \
+
+INCLUDEPATH += \
+	$$MW_LAYER_SYSTEMINCLUDE \
     $$OS_LAYER_SYSTEMINCLUDE \
-    ../../inc
+    ../inc
     
 CONFIG += hb
-LIBS += -lcpframework \
+
+LIBS += \
+	-lcpframework \
     -leapqtplugininfo \
     -leapqtconfiginterface \
     -lconnection_settings_shim
+    
+MOC_DIR = _moc
+RCC_DIR = _rcc
+OBJECTS_DIR = _obj
 
 # Input
-HEADERS += traces/OstTraceDefinitions.h \
-    inc/cpwpacmnui_global.h \
-    inc/cpwpacmnui.h
-SOURCES += src/cpwpacmnui.cpp
-
-# QMAKE_EXTRA_TARGETS += copyheaders
-# directories
-#The actual path to be replaced later
-DESTDIR = HB_BUILD_DIR/lib
-win32:DLLDESTDIR = HB_BUILD_DIR/bin
-DEFINES += WPAUI_LIBRARY
+HEADERS += \
+	traces/OstTraceDefinitions.h \
+	inc/cpwpacmnui_p.h \
+	inc/wpakeyvalidator.h \
+	inc/cpwpacmneapui.h \
+    ../inc/cpwpacmnui_global.h \
+    ../inc/cpwpacmnui.h
+	
+SOURCES += \ 
+	src/cpwpacmnui.cpp \
+	src/cpwpacmnui_p.cpp \
+	src/wpakeyvalidator.cpp \
+	src/cpwpacmneapui.cpp
 
 defFilePath = ..
 
 symbian:
- { 
+{ 
+	TARGET.CAPABILITY = CAP_GENERAL_DLL
     TARGET.EPOCALLOWDLLDATA = 1
     TARGET.UID3 = 0x2002DC74
-    BLD_INF_RULES.prj_exports += "./rom/cpwpacmnui.iby $$CORE_MW_LAYER_IBY_EXPORT_PATH(cpwpacmnui.iby)"
+    
+    BLD_INF_RULES.prj_exports += \ 
+    	"./rom/cpwpacmnui.iby $$CORE_MW_LAYER_IBY_EXPORT_PATH(cpwpacmnui.iby)"
 }
 
-# Temporary solution to fix tracecompiler
-# When tracecompiler is fixed, this can be removed
-symbian: {
+symbian:
+{
     MMP_RULES += "USERINCLUDE traces"
 }
-
-TARGET.CAPABILITY = CAP_GENERAL_DLL
--- a/securitysettings/cpwlansecurityuiplugins/cpwpacmnui/inc/cpwpacmneapui.h	Thu May 13 22:51:27 2010 +0300
+++ b/securitysettings/cpwlansecurityuiplugins/cpwpacmnui/inc/cpwpacmneapui.h	Mon May 24 20:32:47 2010 +0300
@@ -12,7 +12,7 @@
  * Contributors:
  *
  * Description: 
- *    Control Panel QT EAP view for WPA/WPA2/802_Dot_1x/WPA2 only configuration
+ *    Control Panel WLAN Security EAP Entry item for WPA(2)/802.1x
  *
  */
 
@@ -23,29 +23,30 @@
 #ifndef CPWPACMNEAPUI_H_
 #define CPWPACMNEAPUI_H_
 
-class CpWpaCmnUi;
+// System includes
 #include <cpsettingformentryitemdata.h>
-/*! 
- * Implements the Ui EAP Plugin Loader for WPA/WPA2/802_Dot_1x/WPA2 only Security Modes  
- */
-class EapEntyItemData : public CpSettingFormEntryItemData
+
+// User includes
+
+// Forward declarations
+class CpWpaCmnUiPrivate;
+
+class EapEntryItemData : public CpSettingFormEntryItemData
 {
 public:
-    EapEntyItemData(CpWpaCmnUi* wpa, CpItemDataHelper &itemDataHelper,
-            const QString &text = QString(), const QString &description =
-                    QString(), const HbIcon &icon = HbIcon(),
-            const HbDataFormModelItem *parent = 0);
+    EapEntryItemData(
+        CpWpaCmnUiPrivate* wpa, 
+        CpItemDataHelper &itemDataHelper,
+        const QString &text = QString());
 
-    virtual ~EapEntyItemData();
+    virtual ~EapEntryItemData();
 
-    /*!
-     Implement CpSettingFormEntryItemData::createSettingView
-     */
     virtual CpBaseSettingView *createSettingView() const;
 
 private:
-
-    CpWpaCmnUi* mUi;
+    //! Pointer to WPA/WPA2/802.1x UI. 
+    CpWpaCmnUiPrivate* mUi;
+    // Dataitem helpper
     CpItemDataHelper& itemdatahelper;
 };
 
--- a/securitysettings/cpwlansecurityuiplugins/cpwpacmnui/inc/cpwpacmnui.h	Thu May 13 22:51:27 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,116 +0,0 @@
-/*
- * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: 
- *    Control Panel QT UI for WPA/WPA2/802_Dot_1x configuration
- *
- */
-
-/*
- * %version: 9 %
- */
-
-#ifndef CPWPACMNUI_H
-#define CPWPACMNUI_H
-
-// System includes
-#include <cpsettingformitemdata.h>
-#include <cpsettingformentryitemdata.h>
-#include <eapqtconfiginterface.h>
-#include <eapqtplugininfo.h>
-#include <cpitemdatahelper.h>
-#include <cpbasesettingview.h>
-
-// User includes
-#include "cpwpacmnui_global.h"
-#include "cpwlansecurityplugininterface.h"
-
-// Forward declarations
-class EapPluginInformation;
-class PluginInformation;
-class CpBaseSettingView;
-class EapQtConfigInterface;
-class EapEntyItemData;
-class CmConnectionMethodShim;
-
-/*! 
- * Implements the Ui for WPA/WPA2/802.1x Security Mode  
- */
-
-// Class declaration
-class WPAUI_EXPORT CpWpaCmnUi : public QObject
-{
-    Q_OBJECT
-    
-    
-    public:
-    
-        CpWpaCmnUi(CMManagerShim::WlanSecMode securityMode, CpItemDataHelper &dataHelpper);
-        ~CpWpaCmnUi();
-        CpSettingFormItemData* createUi(
-                EapQtConfigInterface *mEapQtConfigInterface,
-                CmConnectionMethodShim *cmCM);
-        //CpBaseSettingView *eapUiInstance();
-        
-        void reset();
-
-    signals:
-    
-        void keyChanged(QString& key);
-        void pskEapModeToggled(int pskEnable);
-        void eapPluginChanged(int eapPlugin);
-        void connectionStateChanged(int state);
-        
-    
-    private:
-    
-        //void loadWPAPskView();
-        //void loadWPAEapView();
-        //void removePskView();
-        //void removeEapView();
-        void loadUi();
-        void readValues();
-        void loadWPA_WPA2Fields();
-        //void load802Dot1xFields();
-    
-    private slots:
-    
-        //void wpaTypeChanged(int pskEnable);
-        void pskKeyChanged();
-        //void eapTypeChanged(int eapPlugin);
-        //void unencryptConnStateChanged(int state);
-    
-    private:
-        
-        Q_DISABLE_COPY(CpWpaCmnUi)
-        CpSettingFormItemData* mCmnUi;
-        CpItemDataHelper &mDataHelper;
-        CpSettingFormItemData* mPskKeyText;
-        CpSettingFormItemData* mEapPlugins;
-        CpSettingFormItemData* mUnencryptedConnection;
-        CpSettingFormItemData *mWpaEapItem;
-        QString mKeyData;
-        //QList<EapQtPluginInfo> mPlugins;
-        EapEntyItemData* mEapEntry;
-        EapQtConfigInterface *mEapQtConfigInterface;
-        int mPluginCurrent;
-        CMManagerShim::WlanSecMode mSecurityMode;
-        bool mEnablePskMode;
-        int mcurrentEapPlugin;
-        CmConnectionMethodShim* mConnMethod;
-        int unencryptStateChanged;
-};
-
-
-
-#endif//CPWPACMNUI_H
--- a/securitysettings/cpwlansecurityuiplugins/cpwpacmnui/inc/cpwpacmnui_global.h	Thu May 13 22:51:27 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: 
- *    
- *
- */
-
-/*
- * %version: 5 %
- */
-#ifndef CPWPACMNUI_GLOBAL_H_
-#define CPWPACMNUI_GLOBAL_H_
-
-
-#include <QtCore/QtGlobal>
- 
- #if defined(WPAUI_LIBRARY)
- #define WPAUI_EXPORT Q_DECL_EXPORT
- #else
- #if defined(WPAUI_NO_LIBRARY)
- #define WPAUI_EXPORT
- #else
- #define WPAUI_EXPORT Q_DECL_IMPORT
- #endif
- #endif
-
-
-#endif //CPWPACMNUI_GLOBAL_H_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/cpwlansecurityuiplugins/cpwpacmnui/inc/cpwpacmnui_p.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,159 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *    Private Implementation for Control Panel QT UI for WPA/WPA2/802_Dot_1x configuration
+ *
+ */
+
+/*
+ * %version: 6 %
+ */
+
+#ifndef CPWPACMNUI_P_H_
+#define CPWPACMNUI_P_H_
+
+// System includes
+#include <HbMessageBox>
+#include <cmmanagerdefines_shim.h>
+
+// User includes
+
+// Forward declarations
+class CpItemDataHelper;
+class CpSettingFormItemData;
+class EapQtConfigInterface;
+class CmConnectionMethodShim;
+class EapEntryItemData;
+class CpBaseSettingView;
+class EapQtPluginInfo;
+
+//class declaration
+class CpWpaCmnUiPrivate :public QObject
+    { 
+    Q_OBJECT  
+public:
+
+    CpWpaCmnUiPrivate(CMManagerShim::WlanSecMode securityMode,
+            CpItemDataHelper &dataHelpper);
+    ~CpWpaCmnUiPrivate();
+
+    CpSettingFormItemData* createUi(
+            EapQtConfigInterface *mEapQtConfigInterface,
+            CmConnectionMethodShim *cmCM);
+    
+    CpBaseSettingView *eapUiInstance();
+    
+    bool validateSettings();
+
+private:
+    
+    
+    CpSettingFormItemData* createWpaTypeSelector();
+    CpSettingFormItemData* createPskEditor();
+    CpSettingFormItemData* createEapSelector();
+    EapEntryItemData* createEapEntryItem();
+    CpSettingFormItemData *createUnencryptedBox();
+    void removeObjectFromView(CpSettingFormItemData *&object);
+
+    void loadWPAPskView();
+    void loadWPAEapView();       
+    void loadUi();
+    void loadWPA_WPA2Fields();
+    void load802Dot1xFields(); 
+    void loadEapConfigurations();
+    
+    void readValues();
+        
+    bool tryUpdate();
+    void handleUpdateError();
+    void showMessageBox(
+        HbMessageBox::MessageBoxType type,
+        const QString &text);      
+   
+    void updateWpaType(int pskEnable);
+    void updatePskKey(QString& key);
+    
+    void reset();  
+
+private slots:
+
+    void wpaTypeChanged(int pskEnable);
+    void pskKeyChanged();
+    void eapTypeChanged(int eapPlugin);
+    void unencryptConnStateChanged(int state);
+    
+    static bool pluginLessThan(
+        const EapQtPluginInfo &plugin1,
+        const EapQtPluginInfo &plugin2);
+
+    void setEditorPreferences(const QModelIndex &modelIndex);
+
+private:
+    Q_DISABLE_COPY(CpWpaCmnUiPrivate)
+    
+    //!Data Helper from CpWlan Interface
+    CpItemDataHelper &mDataHelper;
+    
+    //!Parent element encompassing all the Ui Setting Items   
+    CpSettingFormItemData *mCmnUi;
+    
+    //!ui element for Pre-Shared Key
+    CpSettingFormItemData *mPskKeyText;
+    
+    /*!ui element ,holding the list of EAP plugins 
+     * from which the user can choose
+     */
+    CpSettingFormItemData *mEapPlugins;
+    
+    /*!ui element to hold Encrypted Connection flag status, 
+     * for 802.1x mode
+     */
+    CpSettingFormItemData *mUnencryptedConnection;
+    
+    //!Opens a separate View for the EAPmode chosen 
+    CpSettingFormItemData *mWpaEapItem;
+    
+    //!Stores the Pre-Shared key value entered
+    QString mKeyData;
+    
+    //!List hthe EAP plugins
+    QList<EapQtPluginInfo> mPlugins;
+    
+    //!Pointer to API that returns the Ui instance for the EAP plugin 
+    EapEntryItemData *mEapEntry;
+    
+    //!Pointer to EAP interface 
+    EapQtConfigInterface *mEapQtConfigInterface;
+    
+    //!Current mode chosen
+    CMManagerShim::WlanSecMode mSecurityMode;   
+    
+    //! Connection Settings Shim connection method pointer    
+    CmConnectionMethodShim* mConnMethod;
+    
+    //!Flag to indicate if its the EAP/PSK mode
+    bool mEnablePskMode;
+    
+    //!The current EAP method chosen 
+    int mCurrentEapPlugin;
+    
+    //!Flag to indicate if Unecrypted Connection is enabled 
+   	bool mUnencryptState;
+
+    //! Message box for info notes
+    QSharedPointer<HbMessageBox> mMessageBox;
+
+    };
+
+#endif /* CPWPACMNUI_P_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/cpwlansecurityuiplugins/cpwpacmnui/inc/wpakeyvalidator.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   Validation methods for WPA/WPA2 & WPA2 only keys
+ *
+ */
+
+/*
+ * %version: 1 %
+ */
+
+#ifndef WPAKEYVALIDATOR_H
+#define WPAKEYVALIDATOR_H
+
+/*!
+ * @addtogroup group_wpa_key_validator
+ * @{
+ */
+
+class WpaKeyValidator
+{
+public:
+    enum KeyStatus
+    {
+        KeyStatusOk,
+        KeyStatusIllegalCharacters,
+        KeyStatusWpaTooShort,
+        KeyStatusWpaTooLong
+    };
+
+    static const int WpaMaxLenght = 64;
+    static const int WpaMinLenght = 8;
+    
+public:
+
+    static KeyStatus validateWpaKey(const QString &key);
+    static KeyStatus isAscii(const QString &key);
+    static KeyStatus isHex(const QString &key);
+};
+
+/*! @} */
+
+#endif /* WPAKEYVALIDATOR_H */
--- a/securitysettings/cpwlansecurityuiplugins/cpwpacmnui/rom/cpwpacmnui.iby	Thu May 13 22:51:27 2010 +0300
+++ b/securitysettings/cpwlansecurityuiplugins/cpwpacmnui/rom/cpwpacmnui.iby	Mon May 24 20:32:47 2010 +0300
@@ -7,18 +7,31 @@
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
 * Initial Contributors:
-* Nokia Corporation - initial contribution.
+* 	Nokia Corporation - initial contribution.
 *
 * Contributors:
 *
 * Description:
+* 	IBY file for common UI implementation for WPA/WPA2, WPA2 only and 802.1x
 *
 */
+
+/*
+ * %version: tr1cfwln#5 %
+ */
+
 #ifndef __CPWPACMNUI_IBY__
 #define __CPWPACMNUI_IBY__
 
+#include <data_caging_paths_for_iby.hrh>
+#include <bldvariant.hrh>
+
+#ifdef __PROTOCOL_WLAN
+
 //file content
-file=ABI_DIR\UREL\cpwpacmnui.DLL		SHARED_LIB_DIR\cpwpacmnui.DLL
+file=ABI_DIR\BUILD_DIR\cpwpacmnui.dll		SHARED_LIB_DIR\cpwpacmnui.dll
+
+#endif // __PROTOCOL_WLAN
 
 #endif
 
--- a/securitysettings/cpwlansecurityuiplugins/cpwpacmnui/src/cpwpacmneapui.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/securitysettings/cpwlansecurityuiplugins/cpwpacmnui/src/cpwpacmneapui.cpp	Mon May 24 20:32:47 2010 +0300
@@ -20,27 +20,47 @@
  * %version: 4 %
  */
 
+// System includes
+#include <HbDataFormModelItem>
+
+
+// User includes
 #include "cpwpacmneapui.h"
-#include "cpwpacmnui.h"
+#include "cpwpacmnui_p.h"
 
-#include <HbDataFormModelItem>
+//Trace Definition
 #include "OstTraceDefinitions.h"
 #ifdef OST_TRACE_COMPILER_IN_USE
 #include "cpwpacmneapuiTraces.h"
 #endif
 
-EapEntyItemData::EapEntyItemData(CpWpaCmnUi* wpa,
-        CpItemDataHelper &itemDataHelper, const QString &text,
-        const QString &description, const HbIcon &icon,
-        const HbDataFormModelItem *parent) :
-    CpSettingFormEntryItemData(itemDataHelper, text, description, icon,
-            parent),itemdatahelper(itemDataHelper)
+/*!
+  \class  
+  Implements the Ui EAP Plugin Loader for WPA/WPA2/802_Dot_1x/WPA2 only Security Modes  
+ */
+
+/*!
+   Constructor
+   
+   @param wpa Pointer to UI object
+   @param itemDataHelpper Control Panel Item data helpper object
+   @param text Text for entry button
+ */
+EapEntryItemData::EapEntryItemData(
+    CpWpaCmnUiPrivate* wpa,
+    CpItemDataHelper &itemDataHelper, 
+    const QString &text) :
+    CpSettingFormEntryItemData(CpSettingFormEntryItemData::ButtonEntryItem, 
+        itemDataHelper, text),
+    mUi(wpa),
+    itemdatahelper(itemDataHelper)
 {
-    mUi = wpa;
-
 }
 
-EapEntyItemData::~EapEntyItemData()
+/*!
+   Desctructor.
+ */
+EapEntryItemData::~EapEntryItemData()
 {
     OstTraceFunctionEntry1(EAPENTRYITEMDATA_EAPENTRYITEMDATA_ENTRY,this); 
     OstTraceFunctionExit1(EAPENTRYITEMDATA_EAPENTRYITEMDATA_EXIT,this);
@@ -49,7 +69,7 @@
 /*!
  Implement CpSettingFormEntryItemData::createSettingView
  */
-CpBaseSettingView* EapEntyItemData::createSettingView() const
+CpBaseSettingView* EapEntryItemData::createSettingView() const
 {
     OstTraceFunctionEntry1(EAPENTRYITEMDATA_CREATESETTING_VIEW_ENTRY,this); 
     OstTraceFunctionExit1(EAPENTRYITEMDATA_CREATESETTING_VIEW_EXIT,this);
--- a/securitysettings/cpwlansecurityuiplugins/cpwpacmnui/src/cpwpacmnui.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/securitysettings/cpwlansecurityuiplugins/cpwpacmnui/src/cpwpacmnui.cpp	Mon May 24 20:32:47 2010 +0300
@@ -17,19 +17,23 @@
  */
 
 /*
- * %version: 17 %
+ * %version: tr1cfwln#22 %
  */
 
 // System includes
 #include <QStringList>
-#include <eapqtconfiginterface.h>
+#include <cpsettingformitemdata.h>
+#include <cpitemdatahelper.h>
+#include <cpbasesettingview.h>
 #include <cmconnectionmethod_shim.h>
-#include <cmmanagerdefines_shim.h>
+#include <eapqtplugininfo.h>
+#include <eapqtconfiginterface.h>
 
 // User includes
 #include "cpwpacmnui.h"
-//#include "cpwpacmneapui.h"
+#include "cpwpacmnui_p.h"
 
+// Trace Definition
 #include "OstTraceDefinitions.h"
 #ifdef OST_TRACE_COMPILER_IN_USE
 #include "cpwpacmnuiTraces.h"
@@ -42,12 +46,10 @@
  which will allow viewing/editing of WPA/WPA2/802.1x/WPA2 Security Settings.
  */
 //Contructs Common Ui (WPA/WPA2/802.1x/WPA2only) object
-CpWpaCmnUi::CpWpaCmnUi(CMManagerShim::WlanSecMode securityMode, CpItemDataHelper &dataHelpper) :
-    mCmnUi(NULL), mDataHelper(dataHelpper), mPskKeyText(NULL), mEapPlugins(
-            NULL), mWpaEapItem(NULL), mEapEntry(NULL)
+CpWpaCmnUi::CpWpaCmnUi(CMManagerShim::WlanSecMode securityMode, CpItemDataHelper &dataHelpper)
+    
 {
-    mSecurityMode = securityMode;
-    mEnablePskMode = true;
+    d_ptr = new CpWpaCmnUiPrivate(securityMode,dataHelpper);
 }
 //Deletes objects owned by Common Ui
 CpWpaCmnUi::~CpWpaCmnUi()
@@ -55,11 +57,9 @@
     //delete all dynamically allocated objects
     OstTraceFunctionEntry1(CPWPACMNUI_CPWPACMNUI_ENTRY,this);
 
-    mCmnUi = NULL;
+    delete d_ptr;
     
-    mConnMethod = NULL;
-
-    OstTraceFunctionExit1(CPWPACMNUI_CPWPACMNUI_EXIT,this);
+   OstTraceFunctionExit1(CPWPACMNUI_CPWPACMNUI_EXIT,this);
 }
 
 // ======== MEMBER FUNCTIONS ========
@@ -78,371 +78,28 @@
         EapQtConfigInterface *eapQtConfigInterface,
         CmConnectionMethodShim *cmCM)
 {
-
     OstTraceFunctionEntry1(CPWPACMNUI_CREATEUI_ENTRY,this);
-    int err;
-
-    mConnMethod = cmCM;
-
-    //Read values From CommsDatbase
-    QT_TRYCATCH_ERROR(err, ( readValues()));
-    if(err !=KErrNone) {
-          OstTrace1( TRACE_ERROR, CPWPACMNUI_CREATEUI, "CPWPACMNUI ReadValues returned %d", err );
-    }
-
-    mCmnUi = new CpSettingFormItemData(HbDataFormModelItem::GroupItem,
-            hbTrId("txt_occ_subhead_security_settings"));
-
-    mEapQtConfigInterface = eapQtConfigInterface;
-    //mPlugins.append(mEapQtConfigInterface->supportedOuterTypes());
-
-    //PSK / EAP ?
-    mWpaEapItem = new CpSettingFormItemData(
-            HbDataFormModelItem::ComboBoxItem, hbTrId(
-                    "txt_occ_setlabel_wpawpa2"),mCmnUi);
-    QStringList wpatype;
-    //wpatype.append(hbTrId("txt_occ_setlabel_wpawpa2_val_eap"));
-    wpatype.append(hbTrId("txt_occ_setlabel_wpawpa2_val_preshared_key"));
-
-    mWpaEapItem->setContentWidgetData("items", wpatype);
-    mWpaEapItem->setContentWidgetData("currentIndex",0/*To use mEnablePskMode when both modes are available*/);
-
-    mDataHelper.addConnection(mWpaEapItem,
-            SIGNAL(currentIndexChanged(int)), this,
-            SLOT(wpaTypeChanged(int)));
-
-    //1.Pre-Shared Key
-    mPskKeyText = new CpSettingFormItemData(
-            HbDataFormModelItem::TextItem, hbTrId(
-                    "txt_occ_setlabel_preshared_key"),mCmnUi);
-
-    mPskKeyText->setContentWidgetData("text", mKeyData);
-    mPskKeyText->setContentWidgetData("echoMode", 2);
-
-    mPskKeyText->setContentWidgetData("smileysEnabled", "false");
-    mDataHelper.addConnection(mPskKeyText, SIGNAL( editingFinished ()),
-            this, SLOT(pskKeyChanged() ));
-
-    //2.EAP
-    /*  mEapPlugins = new CpSettingFormItemData(
-                HbDataFormModelItem::ComboBoxItem, hbTrId(
-                        "txt_occ_setlabel_eap_type"));
-
-        QStringList items;
-        for (int i = 0; i < mPlugins.length(); ++i)
-            {
-            items << mPlugins.at(i)->localizationId();
-            }
-        mPluginCurrent = 0;
-        mEapPlugins->setContentWidgetData("items", items);
-        //Set the last EAP chosen , by reading from CommsDb
-        mDataHelper.addConnection(mEapPlugins,
-                SIGNAL(currentIndexChanged(int)), this,
-                SLOT(eapTypeChanged(int)));
-
-        mEapEntry = new EapEntyItemData(this, mDataHelper, hbTrId(
-                "txt_occ_button_eap_type_settings"), QString(""));*/
-
-    mUnencryptedConnection = new CpSettingFormItemData(
-            HbDataFormModelItem::CheckBoxItem, hbTrId(
-                    "txt_occ_setlabel_unencrypted_connection"),mCmnUi);
-
-    mUnencryptedConnection->setContentWidgetData("text", hbTrId(
-            "txt_occ_setlabel_unencrypted_connection_val_allowe"));
-
-    //Kept Unchecked by default , but to be read from Comms DB
-    mUnencryptedConnection->setContentWidgetData("checkState",
-            "Unchecked");
-
-    mDataHelper.addConnection(mUnencryptedConnection,
-            SIGNAL( stateChanged(int)), this,
-            SLOT(unencryptConnStateChanged(int)));
-
-    //LoadUi based on the security mode 
-    loadUi();
-
-    OstTraceFunctionExit1(CPWPACMNUI_CREATEUI_EXIT,this);
-    return mCmnUi;
-
+    OstTraceFunctionExit1(CPWPACMNUI_CREATEUI_EXIT,this);    
+    return d_ptr->createUi(eapQtConfigInterface,cmCM);
 }
 
-// ======== LOCAL FUNCTIONS ========
-
-/*! 
- Load the CpSettingFormItemData components, based on the security 
- mode chosen. Only those components that are required by that security
- mode are loaded
- */
-void CpWpaCmnUi::loadUi()
-{
-    OstTraceFunctionEntry1(CPWPACMNUI_LOADUI_ENTRY,this);
-    int secMode = mSecurityMode;
-    switch (secMode)
-        {
-        case CMManagerShim::WlanSecModeWpa:
-        case CMManagerShim::WlanSecModeWpa2:
-            {
-                if (mEnablePskMode) {
-                    mCmnUi->appendChild(mWpaEapItem);
-                    mCmnUi->appendChild(mPskKeyText);
-                }
-                /*else {
-                    //do nothing, no EAP 
-                    mCmnUi->appendChild(mWpaEapItem);
-                    mCmnUi->appendChild(mEapPlugins);
-                    mCmnUi->appendChild(mEapEntry);
-                }*/
-
-            }
-            break;
-
-        /*case CMManagerShim::WlanSecMode802_1x:
-            {
-            mCmnUi->appendChild(mEapPlugins);
-            mCmnUi->appendChild(mEapEntry);
-            mCmnUi->appendChild(mUnencryptedConnection);
-            }
-            break;*/
-        default:
-            break;
-        } 
-    OstTraceFunctionExit1(CPWPACMNUI_LOADUI_EXIT,this);
-}
-
-/*! 
- Load the CpSettingFormItemData components,for the
- Pre-Shared key mode
- */
-/*void CpWpaCmnUi::loadWPAPskView()
-{
-    OstTraceFunctionEntry1(CPWPACMNUI_LOADWPAPSKVIEW_ENTRY,this);
-    mCmnUi->appendChild(mPskKeyText);
-    OstTraceFunctionExit1(CPWPACMNUI_LOADWPAPSKVIEW_EXIT,this);
-}*/
-
-/*! 
- Load the CpSettingFormItemData components,for the
- EAP  mode
- */
-/*void CpWpaCmnUi::loadWPAEapView()
-{
-    OstTraceFunctionEntry1(CPWPACMNUI_LOADWPAEAPVIEW_ENTRY,this);
-    mCmnUi->appendChild(mEapPlugins);
-    mCmnUi->appendChild(mEapEntry);
-    OstTraceFunctionExit1(CPWPACMNUI_LOADWPAEAPVIEW_EXIT,this);
-}*/
-
-/*! 
- Load the CpSettingFormItemData components,for the
- EAP  mode
- */
-/*CpBaseSettingView* CpWpaCmnUi::eapUiInstance()
-{
-    OstTraceFunctionEntry1(CPWPACMNUI_EAPUIINSTANCE_ENTRY,this); 
-    OstTraceFunctionExit1(CPWPACMNUI_EAPUIINSTANCE_EXIT,this);
-
-    return mEapQtConfigInterface->uiInstance(
-            mPlugins.at(mPluginCurrent)->pluginHandle());
-    return NULL;
-}*/
 
 /*!
- Slot to handle change in wpa mode :- PSK /EAP
- Emits a mode change signal to the  security plugin 
- to indicate the change
-
- \param pskEnable the current mode chosen
- */
-/*void CpWpaCmnUi::wpaTypeChanged(int pskEnable)
-{
-    OstTraceFunctionEntry1(CPWPACMNUI_WPATYPECHANGED_ENTRY,this);
-    switch (pskEnable)
-        {
-        case 0:
-            {
-            RemovePskView();
-            LoadWPAEapView();
-            }
-            break;
-
-        case 1:
-            {
-            RemoveEapView();
-            LoadWPAPskView();
-            }
-            break;
-        } //do nothing , only PSK mode, no EAP
-    OstTraceFunctionExit1(CPWPACMNUI_WPATYPECHANGED_EXIT,this);
-    //Emit signal back to plugin
-    emit pskEapModeToggled(pskEnable);
-}*/
-
-/*!
- * Unload components related to Pre-Shared key mode
- */
-/*void CpWpaCmnUi::removePskView()
-{
-    OstTraceFunctionEntry1(CPWPACMNUI_REMOVEPSKVIEW_ENTRY,this);
-    int indexOfPsk = mCmnUi->indexOf(mPskKeyText);
-    mCmnUi->removeChild(indexOfPsk);
-    OstTraceFunctionExit1(CPWPACMNUI_REMOVEPSKVIEW_EXIT,this);
-}*/
-
-/*!
- * Unload components related to EAP mode
- */
-/*void CpWpaCmnUi::removeEapView()
-{
-    OstTraceFunctionEntry1(CPWPACMNUI_REMOVEEAPVIEW_ENTRY,this);
-    int indexOfEapPlugin = mCmnUi->indexOf(mEapPlugins);
-    mCmnUi->removeChild(indexOfEapPlugin);
-
-    int indexOfEapEntry = mCmnUi->indexOf(mEapEntry);
-    mCmnUi->removeChild(indexOfEapEntry);
-    OstTraceFunctionExit1(CPWPACMNUI_REMOVEEAPVIEW_EXIT,this);
-}*/
-
-/*!
- Slot to handle change in eap method in use.
- Emits signal back to the security plugin to indicate 
- the change
- \param currentplugin plugin number to indicate the
- eap method in use
- */
-/*void CpWpaCmnUi::eapTypeChanged(int eapPlugin)
-{
-    OstTraceFunctionEntry1(CPWPACMNUI_EAPTYPECHANGED_ENTRY,this);
-    mPluginCurrent = eapPlugin;
-    OstTraceFunctionExit1(CPWPACMNUI_EAPTYPECHANGED_EXIT,this);
-    emit eapPluginChanged(mPluginCurrent);
-}*/
-
-/*!
- Slot to handle change in pre-shared key string
- Emits signal back to the security plugin to indicate 
- the change
-
- */
-void CpWpaCmnUi::pskKeyChanged()
-{
-    OstTraceFunctionEntry1(CPWPACMNUI_PSKKEYCHANGED_ENTRY,this);
-    QVariant keyValue = mPskKeyText->contentWidgetData("text");
-    QString keyString = keyValue.toString();
-    OstTraceFunctionExit1(CPWPACMNUI_PSKKEYCHANGED_EXIT,this);
-    //Emit signal back to plugin
-    emit keyChanged(keyString);
-}
+   Validates current security settings. This function is called whenever
+   user tries to exit from the settings view. If the plugin determines
+   that some settings need editing before considered valid, it shall
+   return false. A dialog will be shown to the user indicating that
+   settings are still incomplete and asking if he/she wishes to exit
+   anyway.
 
-/*!
- Slot to handle change in the state of unencrypted connection;
- to indicate if such a connection is allowed.
- Emits signal back to the security plugin to indicate 
- the change
- \param state checked-Allowed / Unchecked-Not allowed 
- */
-/*void CpWpaCmnUi::unencryptConnStateChanged(int state)
-{
-    OstTraceFunctionEntry1(CPWPACMNUI_UNENCRYPTCONNSTATECHANGED_ENTRY,this); emit
-    connectionStateChanged(state);
-    OstTraceFunctionExit1(CPWPACMNUI_UNENCRYPTCONNSTATECHANGED_EXIT,this);
-}*/
-
-/*!
- * Reads the wlan security fields from CommsDb 
- */
-void CpWpaCmnUi::readValues()
-{
-    OstTraceFunctionEntry1(CPWPACMNUI_READVALUES_ENTRY,this);
-    switch (mSecurityMode)
-        {
-        case CMManagerShim::WlanSecModeWpa:
-        case CMManagerShim::WlanSecModeWpa2:
-            {
-            loadWPA_WPA2Fields();
-            }
-            break;
-
-       /* case CMManagerShim::WlanSecMode802_1x:
-            {
-            load802Dot1xFields();
-            }
-            break;*/
-
-        default:
-            break;
-        } 
-    OstTraceFunctionExit1(CPWPACMNUI_READVALUES_EXIT,this);
-}
-
-/*!
- * Reads the wlan security wpa/wpa2 related fields from CommsDb 
- */
-void CpWpaCmnUi::loadWPA_WPA2Fields()
-{
-    OstTraceFunctionEntry1(CPWPACMNUI_LOADWPAFIELDS_ENTRY,this);
-    /*mEnablePskMode = mConnMethod->getIntAttribute(
-            CMManagerShim::WlanEnableWpaPsk);*/
-			
-	 //only PSK mode enabled(temporary);to be read from Comms later
-    mEnablePskMode = true ; 		
-    
-    //set the same to Comms(temporary) ; the mode to be set , depends on what user chooses 
-    //between PSK & EAP
-     mConnMethod->setBoolAttribute(CMManagerShim::WlanEnableWpaPsk,mEnablePskMode);
-			
-    if (mEnablePskMode) {
-        mKeyData = mConnMethod->getString8Attribute(
-                CMManagerShim::WlanWpaPreSharedKey);
-    }
-   /* else {
-        //mcurrentEapPlugin = mCMExtShim->GetIntAttribute( use appropriate enum to get the eap plugin index );
-    } */
-    OstTraceFunctionExit1(CPWPACMNUI_LOADWPAFIELDS_EXIT,this);
-}
-
-/*!
- * Reads the wlan security eap related fields from CommsDb 
- */
-/*void CpWpaCmnUi::load802Dot1xFields()
-{
-    OstTraceFunctionEntry1(CPWPACMNUI_LOAD802DOT1XFIELDS_ENTRY,this);
-    //mcurrentEapPlugin = mCMExtShim->GetIntAttribute(use appropriate enum to get the eap plugin index);
-
-    //unencryptStateChanged = mConnMethod->getIntAttribute(CMManagerShim::EWlan802_1xAllowUnencrypted);
-    OstTraceFunctionExit1(CPWPACMNUI_LOAD802DOT1XFIELDS_EXIT,this);
-}*/
-
-/*!
- * Reset the values on the corresponding Ui elements
- */
-void CpWpaCmnUi::reset()
+   \return True if security settings are valid, false if not.
+*/
+bool CpWpaCmnUi::validateSettings()
     {
-    OstTraceFunctionEntry1(CPWPACMNUI_RESET_ENTRY,this);
-    //Read values from Comms and update the Ui items
-    readValues();
-    
-    switch (mSecurityMode)
-          {
-          case CMManagerShim::WlanSecModeWpa:
-          case CMManagerShim::WlanSecModeWpa2:
-              {
-                  if(mEnablePskMode) {
-                      mPskKeyText->setContentWidgetData("text", mKeyData);
-                  }
-              }
-              break;
-
-          /*case CMManagerShim::WlanSecMode802_1x:
-              {
-              //Set appropriate value in widget for 802.1x
-              if(mEnablePskMode) {
-              mPskKeyText->setContentWidgetData("checkState", mKeyData);
-              }
-              break;*/
-
-          default:
-              break;
-          }
-    OstTraceFunctionExit1(CPWPACMNUI_RESET_EXIT,this);
+    return d_ptr->validateSettings();
     }
 
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/cpwlansecurityuiplugins/cpwpacmnui/src/cpwpacmnui_p.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,757 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *    Private Implementation for Control Panel QT UI for WPA/WPA2/802_Dot_1x configuration
+ *
+ */
+
+/*
+ * %version: tr1cfwln#11 %
+ */
+ 
+// User Includes
+#include "cpwpacmnui_p.h"
+#include "wpakeyvalidator.h"
+#include "cpwpacmneapui.h"
+
+// System Includes
+#include <QStringList>
+#include <cpsettingformitemdata.h>
+#include <cpitemdatahelper.h>
+#include <cmconnectionmethod_shim.h>
+#include <eapqtplugininfo.h>
+#include <eapqtpluginhandle.h>
+#include <eapqtconfiginterface.h>
+#include <HbLineEdit>
+#include <HbEditorInterface>
+
+// Trace Definition
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "cpwpacmnui_pTraces.h"
+#endif
+
+
+/*!
+ \class CpWpaCmnUiPrivate
+ \brief CpWpaCmnUiPrivate is a private class implementation the common Ui for WPA/WPA2/802.1x/WPA2 only 
+ Security Settings Control Panel Plugins,
+ which will allow viewing/editing of WPA/WPA2/802.1x/WPA2 Security Settings.
+ */
+/*!
+ * Constructor Common Ui (WPA/WPA2/802.1x/WPA2only) object
+ * 
+ * \param securityMode chosen by user , for which Ui is constructed and returned
+ * \param dataHelpper Control Panel Item data helpper object
+ * \param commonUi Pointer To public class for CpWpaCmnUiPrivate
+ */
+CpWpaCmnUiPrivate::CpWpaCmnUiPrivate(CMManagerShim::WlanSecMode securityMode,
+        CpItemDataHelper &dataHelpper) :
+    mDataHelper(dataHelpper), 
+    mCmnUi(NULL), 
+    mPskKeyText(NULL), 
+    mEapPlugins(NULL), 
+    mUnencryptedConnection(NULL),
+    mWpaEapItem(NULL),
+    mEapEntry(NULL),
+    mEapQtConfigInterface(NULL),  
+    mSecurityMode(securityMode),
+    mConnMethod(NULL),
+    mEnablePskMode(true),
+    mCurrentEapPlugin(0), 
+    mUnencryptState(false)
+{
+    Q_ASSERT(
+            mSecurityMode == CMManagerShim::WlanSecModeWpa ||
+            mSecurityMode == CMManagerShim::WlanSecModeWpa2 ||
+            mSecurityMode == CMManagerShim::WlanSecMode802_1x);
+    OstTrace1( TRACE_FLOW, DUP1_CPWPACMNUIPRIVATE_CPWPACMNUIPRIVATE, "CpWpaCmnUiPrivate::CpWpaCmnUiPrivate;mSecurityMode=%u", mSecurityMode );
+    
+}
+
+/*!
+ * Destructor - Deletes objects owned by Common Ui
+ */
+CpWpaCmnUiPrivate::~CpWpaCmnUiPrivate()
+{
+    OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_CPWPACMNUIPRIVATE_ENTRY, this );
+    //delete all dynamically allocated objects
+
+    mCmnUi = NULL;
+    mConnMethod = NULL;
+
+    OstTraceFunctionExit1( CPWPACMNUIPRIVATE_CPWPACMNUIPRIVATE_EXIT, this );
+}
+
+// ======== MEMBER FUNCTIONS ========
+
+/*!
+ * Creates the Ui instance based on the security mode;WPAWPA2/802.1x/WPA2 only 
+ * Owns the Ui instance
+ * 
+ * \param eapQtConfigInterface to list all eap plugins
+ * \param mCmCM Connection MethoD Qt interface
+ * 
+ * \return Ui instance for the security mode set
+ */
+
+CpSettingFormItemData* CpWpaCmnUiPrivate::createUi(
+        EapQtConfigInterface *eapQtConfigInterface,
+        CmConnectionMethodShim *cmCM)
+{
+    OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_CREATEUI_ENTRY, this );
+
+    // NOT OWNED
+    mConnMethod = cmCM;
+    mEapQtConfigInterface = eapQtConfigInterface;
+    mPlugins.append(mEapQtConfigInterface->supportedOuterTypes());
+    qSort(mPlugins.begin(), mPlugins.end(), CpWpaCmnUiPrivate::pluginLessThan);
+
+    mCmnUi = new CpSettingFormItemData(HbDataFormModelItem::GroupItem,
+            hbTrId("txt_occ_subhead_security_settings"));
+
+    //LoadUi based on the security mode
+    loadUi();
+
+    OstTraceFunctionExit1( CPWPACMNUIPRIVATE_CREATEUI_EXIT, this );
+    return mCmnUi;
+}
+
+/*! 
+ Load the CpSettingFormItemData components,for the
+ EAP  mode
+ */
+CpBaseSettingView* CpWpaCmnUiPrivate::eapUiInstance()
+{
+    OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_EAPUIINSTANCE_ENTRY, this );
+    
+    OstTraceFunctionExit1( CPWPACMNUIPRIVATE_EAPUIINSTANCE_EXIT, this );
+    return mEapQtConfigInterface->uiInstance(EapQtPluginHandle::PluginUndefined,
+            mPlugins.at(mCurrentEapPlugin).pluginHandle());
+}
+
+
+
+/*!
+ * Creates Combo box for PSK and EAP mode selection.
+ * 
+ * @return CompoBox object.
+ */
+CpSettingFormItemData* CpWpaCmnUiPrivate::createWpaTypeSelector()
+{
+    OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_CREATEWPATYPESELECTOR_ENTRY, this );
+
+    // In case of the object exists just update the data
+    if (!mWpaEapItem) {
+        mWpaEapItem = new CpSettingFormItemData(
+                HbDataFormModelItem::ComboBoxItem, hbTrId(
+                        "txt_occ_setlabel_wpawpa2"), mCmnUi);
+
+        QStringList wpatype;
+        wpatype.append(hbTrId("txt_occ_setlabel_wpawpa2_val_eap"));
+        wpatype.append(hbTrId("txt_occ_setlabel_wpawpa2_val_preshared_key"));
+
+        mWpaEapItem->setContentWidgetData("items", wpatype);
+
+        mDataHelper.addConnection(mWpaEapItem,
+                SIGNAL(currentIndexChanged(int)), this,
+                SLOT(wpaTypeChanged(int)));
+
+        mCmnUi->appendChild(mWpaEapItem);
+    }
+
+    mWpaEapItem->setContentWidgetData("currentIndex", mEnablePskMode ? 1 : 0);
+
+    OstTraceFunctionExit1( CPWPACMNUIPRIVATE_CREATEWPATYPESELECTOR_EXIT, this );
+    return mWpaEapItem;
+}
+
+/*!
+ * Creates LineEditor for WPA-PSK
+ * 
+ * @return LineEdit object.
+ */
+CpSettingFormItemData* CpWpaCmnUiPrivate::createPskEditor()
+{
+    OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_CREATEPSKEDITOR_ENTRY, this );
+
+    if (!mPskKeyText) {
+        mPskKeyText = new CpSettingFormItemData(
+                HbDataFormModelItem::TextItem, hbTrId(
+                        "txt_occ_setlabel_preshared_key"), mCmnUi);
+
+        mPskKeyText->setContentWidgetData("echoMode", HbLineEdit::PasswordEchoOnEdit);
+        mPskKeyText->setContentWidgetData("smileysEnabled", "false");
+        mDataHelper.addConnection(mPskKeyText, SIGNAL( editingFinished ()),
+                this, SLOT(pskKeyChanged() ));
+        
+        mDataHelper.connectToForm(SIGNAL(itemShown (const QModelIndex &) ), 
+                   this, SLOT(setEditorPreferences(const QModelIndex &)));
+
+        mCmnUi->appendChild(mPskKeyText);
+    }
+
+    mPskKeyText->setContentWidgetData("text", mKeyData);
+
+    OstTraceFunctionExit1( CPWPACMNUIPRIVATE_CREATEPSKEDITOR_EXIT, this );
+    return mPskKeyText;
+}
+
+/*!
+ * Creates Combo box for EAP outer type selection
+ * 
+ * @return CompoBox object.
+ */
+CpSettingFormItemData* CpWpaCmnUiPrivate::createEapSelector()
+{
+    OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_CREATEEAPSELECTOR_ENTRY, this );
+
+    if (!mEapPlugins) {
+        mEapPlugins = new CpSettingFormItemData(
+            HbDataFormModelItem::ComboBoxItem, 
+            hbTrId("txt_occ_setlabel_eap_type"));
+
+        QStringList list;
+        QList<EapQtPluginInfo>::iterator i;
+        for (i = mPlugins.begin() ; i != mPlugins.end() ; ++i){
+            list << i->localizationId();
+        }
+        
+        mEapPlugins->setContentWidgetData("items", list);
+
+        mDataHelper.addConnection(mEapPlugins,
+            SIGNAL(currentIndexChanged(int)), this,
+            SLOT(eapTypeChanged(int)));
+
+        mCmnUi->appendChild(mEapPlugins);
+    }
+
+    mEapPlugins->setContentWidgetData("currentIndex", mCurrentEapPlugin);
+
+    OstTraceFunctionExit1( CPWPACMNUIPRIVATE_CREATEEAPSELECTOR_EXIT, this );
+    return mEapPlugins;
+}
+
+/*!
+ * Creates a button for EAP configurations
+ * 
+ * @return EntryItem for EAP
+ */
+EapEntryItemData* CpWpaCmnUiPrivate::createEapEntryItem()
+{
+    OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_CREATEEAPENTRYITEM_ENTRY, this );
+
+    if (!mEapEntry) {
+        mEapEntry = new EapEntryItemData(this, mDataHelper, hbTrId(
+                "txt_occ_button_eap_type_settings"));
+
+        mCmnUi->appendChild(mEapEntry);
+    }
+
+    OstTraceFunctionExit1( CPWPACMNUIPRIVATE_CREATEEAPENTRYITEM_EXIT, this );
+    return mEapEntry;
+}
+
+/*!
+ * Creates Combo box for Unencrypted selection
+ * 
+ * @return CompoBox object.
+ */
+CpSettingFormItemData* CpWpaCmnUiPrivate::createUnencryptedBox()
+{
+    OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_CREATEUNENCRYPTEDBOX_ENTRY, this );
+
+    if (!mUnencryptedConnection) {
+        mUnencryptedConnection = new CpSettingFormItemData(
+                HbDataFormModelItem::CheckBoxItem, hbTrId(
+                        "txt_occ_setlabel_unencrypted_connection"), mCmnUi);
+
+        mUnencryptedConnection->setContentWidgetData("text", hbTrId(
+                "txt_occ_setlabel_unencrypted_connection_val_allowe"));
+
+        mDataHelper.addConnection(mUnencryptedConnection,
+                SIGNAL( stateChanged(int)), this,
+                SLOT(unencryptConnStateChanged(int)));
+
+        mCmnUi->appendChild(mUnencryptedConnection);
+   }
+
+    mUnencryptedConnection->setContentWidgetData("checkState",
+            mUnencryptState ? Qt::Checked : Qt::Unchecked);
+
+    OstTraceFunctionExit1( CPWPACMNUIPRIVATE_CREATEUNENCRYPTEDBOX_EXIT, this );
+    return mUnencryptedConnection;
+}
+
+/*!
+ Removes provided object from the UI if it exists there and sets the pointer
+ to NULL.
+ 
+ @param object object to be removed and nulled.
+ */
+void CpWpaCmnUiPrivate::removeObjectFromView(CpSettingFormItemData *&object)
+{
+    OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_REMOVEOBJECTFROMVIEW_ENTRY, this );
+
+    if (object) {
+        mCmnUi->removeChild(mCmnUi->indexOf(object));
+        object = NULL;
+    }
+    OstTraceFunctionExit1( CPWPACMNUIPRIVATE_REMOVEOBJECTFROMVIEW_EXIT, this );
+}
+
+
+/*! 
+ Load the CpSettingFormItemData components, based on the security 
+ mode chosen. Only those components that are required by that security
+ mode are loaded
+ */
+void CpWpaCmnUiPrivate::loadUi()
+{
+    OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_LOADUI_ENTRY, this );
+
+    //Read values From CommsDatbase
+    int err;
+    QT_TRYCATCH_ERROR(err, ( readValues()));
+    if (err != KErrNone) {
+        OstTrace1( TRACE_ERROR, CPWPACMNUIPRIVATE_CREATEUI, "CPWPACMNUI ReadValues returned %d", err );
+    }
+
+    switch (mSecurityMode)
+        {
+        case CMManagerShim::WlanSecModeWpa:
+        case CMManagerShim::WlanSecModeWpa2:
+            createWpaTypeSelector();
+            if (mEnablePskMode) {
+                loadWPAPskView();
+            }
+            else {
+                loadWPAEapView();
+            }
+            break;
+
+        case CMManagerShim::WlanSecMode802_1x:
+        default:
+            Q_ASSERT(mSecurityMode == CMManagerShim::WlanSecMode802_1x);
+            createEapSelector();
+            createEapEntryItem();
+            createUnencryptedBox();
+            break;
+        }
+
+    OstTraceFunctionExit1( CPWPACMNUIPRIVATE_LOADUI_EXIT, this );
+}
+
+/*! 
+ Load the CpSettingFormItemData components,for the
+ Pre-Shared key mode
+ */
+void CpWpaCmnUiPrivate::loadWPAPskView()
+{
+    OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_LOADWPAPSKVIEW_ENTRY, this );
+
+    removeObjectFromView(mEapPlugins);
+
+    if (mEapEntry) {
+        mCmnUi->removeChild(mCmnUi->indexOf(mEapEntry));
+        mEapEntry = NULL;
+        }
+    createPskEditor();
+
+    OstTraceFunctionExit1( CPWPACMNUIPRIVATE_LOADWPAPSKVIEW_EXIT, this );
+}
+
+/*! 
+ Load the CpSettingFormItemData components,for the
+ EAP  mode
+ */
+void CpWpaCmnUiPrivate::loadWPAEapView()
+{
+    OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_LOADWPAEAPVIEW_ENTRY, this );
+
+    removeObjectFromView(mPskKeyText);
+    createEapSelector();
+    createEapEntryItem();
+
+    OstTraceFunctionExit1( CPWPACMNUIPRIVATE_LOADWPAEAPVIEW_EXIT, this );
+}
+
+/*!
+ * Reads the wlan security wpa/wpa2 related fields from CommsDb 
+ */
+void CpWpaCmnUiPrivate::loadWPA_WPA2Fields()
+{
+    OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_LOADWPA_WPA2FIELDS_ENTRY, this );
+    
+    mEnablePskMode = mConnMethod->getBoolAttribute(
+            CMManagerShim::WlanEnableWpaPsk);
+    
+    mKeyData = mConnMethod->getString8Attribute(
+            CMManagerShim::WlanWpaPreSharedKey);
+    
+    loadEapConfigurations();
+    
+    OstTraceFunctionExit1( CPWPACMNUIPRIVATE_LOADWPA_WPA2FIELDS_EXIT, this );
+}
+
+/*!
+ Reads the WLAN security eap related fields from CommsDb and from EAP Qt 
+ Configuration Interface 
+ */
+void CpWpaCmnUiPrivate::load802Dot1xFields()
+{
+    OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_LOAD802DOT1XFIELDS_ENTRY, this );
+    
+    loadEapConfigurations();
+    
+    mUnencryptState
+            = mConnMethod->getBoolAttribute(CMManagerShim::Wlan802_1xAllowUnencrypted);
+    
+    OstTraceFunctionExit1( CPWPACMNUIPRIVATE_LOAD802DOT1XFIELDS_EXIT, this );
+    }
+
+/*!
+ Loads selected EAP method.
+ */
+void CpWpaCmnUiPrivate::loadEapConfigurations()
+{
+    OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_LOADEAPCONFIGURATIONS_ENTRY, this );
+    
+    QList<EapQtPluginHandle> types = mEapQtConfigInterface->selectedOuterTypes();
+    mCurrentEapPlugin = 0;
+    if (types.length() > 0) {
+        for (int i = 0; i < mPlugins.length(); ++i)
+            {
+            if (mPlugins.at(i).pluginHandle() == types.at(0)) {
+                mCurrentEapPlugin = i;
+                break;
+            }
+        }
+   }
+ 
+    else {
+        types.append(mPlugins.at(0).pluginHandle());
+        mEapQtConfigInterface->setSelectedOuterTypes(types);
+    }
+    OstTraceFunctionExit1( CPWPACMNUIPRIVATE_LOADEAPCONFIGURATIONS_EXIT, this );
+}
+
+
+/*!
+ * Reads the wlan security fields from CommsDb 
+ */
+void CpWpaCmnUiPrivate::readValues()
+{
+    OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_READVALUES_ENTRY, this );
+    
+    switch (mSecurityMode)
+        {
+        case CMManagerShim::WlanSecModeWpa:
+        case CMManagerShim::WlanSecModeWpa2:
+            loadWPA_WPA2Fields();
+            break;
+    
+        case CMManagerShim::WlanSecMode802_1x:
+        default:
+            Q_ASSERT(mSecurityMode == CMManagerShim::WlanSecMode802_1x);
+            load802Dot1xFields();
+            break;
+        }
+    
+    OstTraceFunctionExit1( CPWPACMNUIPRIVATE_READVALUES_EXIT, this );
+}
+
+
+
+/*!
+ * Tries an Update on Comms Db for the latest settings. 
+ * Catches and handles any exception while updating.
+ */
+bool CpWpaCmnUiPrivate::tryUpdate()
+{
+    OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_TRYUPDATE_ENTRY, this );
+    int ret(true);
+    // Try update
+    try {
+        mConnMethod->update();
+    }
+    catch (const std::exception&) {
+        // Handle error
+        handleUpdateError();
+        OstTraceFunctionExit1( CPWPACMNUIPRIVATE_TRYUPDATE_EXIT, this );
+        ret = false;
+    }
+    OstTraceFunctionExit1( DUP1_CPWPACMNUIPRIVATE_TRYUPDATE_EXIT, this );
+    return ret;
+}
+
+/*!
+ Handles failed CommsDat update.
+ */
+void CpWpaCmnUiPrivate::handleUpdateError()
+{
+    OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_HANDLEUPDATEERROR_ENTRY, this );
+    // Show error note to user
+    showMessageBox(HbMessageBox::MessageTypeWarning, hbTrId(
+            "txt_occ_info_unable_to_save_setting"));
+    // Reload settings from CommsDat and update UI
+    try {
+        mConnMethod->refresh();
+    }
+    catch (const std::exception&) {
+        // Ignore error from refresh. Most likely this will not happen, but
+        // if it does, there isn't very much we can do.
+        OstTrace0( TRACE_ERROR, CPWPACMNUIPRIVATE_HANDLEUPDATEERROR, "CpWpaCmnUiPrivate::handleUpdateError" );
+
+    };
+
+    //Call reset on Ui elements
+    reset();
+    OstTraceFunctionExit1( CPWPACMNUIPRIVATE_HANDLEUPDATEERROR_EXIT, this );
+}
+
+/*!
+ Shows message box with "OK" button using given text.
+ */
+void CpWpaCmnUiPrivate::showMessageBox(HbMessageBox::MessageBoxType type,
+    const QString &text)
+{
+    OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_SHOWMESSAGEBOX_ENTRY, this );
+    // Create a message box
+    mMessageBox = QSharedPointer<HbMessageBox> (new HbMessageBox(type));
+    mMessageBox->setText(text);
+    mMessageBox->open();
+    OstTraceFunctionExit1( CPWPACMNUIPRIVATE_SHOWMESSAGEBOX_EXIT, this );
+}
+
+/*!
+ * Resets all the Ui elements to their previous values,
+ * by reading values from DB 
+ */
+void CpWpaCmnUiPrivate::reset()
+{
+    OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_RESET_ENTRY, this );
+    
+    //Reload Ui with the previous settings (read from Comms )
+    loadUi();
+    
+    OstTraceFunctionExit1( CPWPACMNUIPRIVATE_RESET_EXIT, this );
+}
+
+/*!
+ Method to handle change in wpa mode :- PSK /EAP, 
+ Update Key in Comms
+
+ \param pskEnable the current mode chosen
+ */
+void CpWpaCmnUiPrivate::updateWpaType(int pskEnable)
+{
+    OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_UPDATEWPATYPE_ENTRY, this );
+    int err;
+    bool PskEnable = pskEnable ? true : false;
+    
+    QT_TRYCATCH_ERROR(err,mConnMethod->setBoolAttribute(CMManagerShim::WlanEnableWpaPsk, PskEnable));
+    
+    if (err != KErrNone) {
+        OstTrace1( TRACE_ERROR, CPWPACMNUIPRIVATE_UPDATEWPATYPE, "CpWpaCmnUiPrivate::updateWpaType;err=%d", err );
+    }
+    tryUpdate();
+    OstTraceFunctionExit1( CPWPACMNUIPRIVATE_UPDATEWPATYPE_EXIT, this );
+}
+
+/*!
+ Slot to handle change in pre-shared key string
+
+ \param key changed string for PSK
+ */
+void CpWpaCmnUiPrivate::updatePskKey(QString &key)
+{
+    OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_UPDATEPSKKEY_ENTRY, this );
+    int err;
+    //Check for Validity of Pre-shared Key
+    WpaKeyValidator::KeyStatus keystatus = WpaKeyValidator::validateWpaKey(key);
+    
+    if (keystatus == WpaKeyValidator::KeyStatusOk) {
+        QT_TRYCATCH_ERROR(err, mConnMethod->setString8Attribute(CMManagerShim::WlanWpaPreSharedKey, key));
+        if (err != KErrNone) {
+            OstTrace1( TRACE_ERROR, CPWPACMNUIPRIVATE_UPDATEPSKKEY, "CpWpaCmnUiPrivate::updatePskKey;err=%d", err );
+        }
+        tryUpdate();
+        
+        //Store the String that was just set
+        mKeyData = key;
+    }
+    else {
+        showMessageBox(HbMessageBox::MessageTypeWarning, hbTrId(
+                "txt_occ_info_invalid_input"));
+    }
+    OstTraceFunctionExit1( CPWPACMNUIPRIVATE_UPDATEPSKKEY_EXIT, this );
+}
+
+
+
+//====================== PRIVATE SLOTS===================================
+
+
+/*!
+ Slot to handle change in wpa mode :- PSK /EAP
+ Emits a mode change signal to the  security plugin 
+ to indicate the change
+
+ \param pskEnable the current mode chosen
+ */
+void CpWpaCmnUiPrivate::wpaTypeChanged(int pskEnable)
+{
+    OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_WPATYPECHANGED_ENTRY, this );
+    
+    mEnablePskMode = pskEnable == 0 ? false : true;
+    
+    if (mEnablePskMode) {
+        loadWPAPskView();
+    }
+    else {
+        loadWPAEapView();
+    }
+    
+    //Update pskEnable flag in DB
+    updateWpaType(pskEnable);
+
+    OstTraceFunctionExit1( CPWPACMNUIPRIVATE_WPATYPECHANGED_EXIT, this );
+}
+
+/*!
+ Slot to handle change in eap method in use.
+ Emits signal back to the security plugin to indicate 
+ the change
+ \param currentplugin plugin number to indicate the
+ eap method in use
+ */
+void CpWpaCmnUiPrivate::eapTypeChanged(int eapPlugin)
+{
+    OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_EAPTYPECHANGED_ENTRY, this );
+    
+    mCurrentEapPlugin = eapPlugin;
+    QList<EapQtPluginHandle> outerHandles;
+    outerHandles.append(mPlugins.at(mCurrentEapPlugin).pluginHandle());
+    mEapQtConfigInterface->setSelectedOuterTypes(outerHandles);
+    
+    OstTraceFunctionExit1( CPWPACMNUIPRIVATE_EAPTYPECHANGED_EXIT, this );
+}
+
+/*!
+ Slot to handle change in pre-shared key string
+ Emits signal back to the security plugin to indicate 
+ the change
+
+ */
+void CpWpaCmnUiPrivate::pskKeyChanged()
+{
+    OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_PSKKEYCHANGED_ENTRY, this );
+    
+    QVariant keyValue = mPskKeyText->contentWidgetData("text");
+    QString keyString = keyValue.toString();
+    
+    //Update Pre Shared key in DB
+    updatePskKey(keyString);
+    OstTraceFunctionExit1( CPWPACMNUIPRIVATE_PSKKEYCHANGED_EXIT, this );
+}
+
+/*!
+ Slot to handle change in the state of unencrypted connection;
+ to indicate if such a connection is allowed.
+ Emits signal back to the security plugin to indicate 
+ the change
+ \param state checked-Allowed / Unchecked-Not allowed 
+ */
+void CpWpaCmnUiPrivate::unencryptConnStateChanged(int state)
+{
+    OstTraceFunctionEntry1( CPWPACMNUIPRIVATE_UNENCRYPTCONNSTATECHANGED_ENTRY, this );
+    
+    bool checked  = (state == Qt::Checked) ? true : false;
+    mConnMethod->setBoolAttribute(
+            CMManagerShim::Wlan802_1xAllowUnencrypted,checked);
+    
+    tryUpdate();
+    
+    //store the Unencrypted Connection State
+    mUnencryptState  = checked;
+    
+    OstTraceFunctionExit1( CPWPACMNUIPRIVATE_UNENCRYPTCONNSTATECHANGED_EXIT, this );
+}
+
+/*!
+ * Slot that configures the editor settings for Pre-Shared Key Field.
+ * This slot is invoked whenever a new item(s) are shown in the current view 
+ * 
+ * \param modelIndex Index of the current item in the  model
+ */
+void CpWpaCmnUiPrivate::setEditorPreferences(const QModelIndex &modelIndex)
+{
+    
+    HbDataFormModelItem *item = mDataHelper.modelItemFromModelIndex(modelIndex);
+
+    /* Configure settings only for text fields*/
+    if(item->type() == HbDataFormModelItem::TextItem) {
+        HbLineEdit *edit = qobject_cast<HbLineEdit*>(mDataHelper.widgetFromModelIndex(modelIndex));           
+        HbEditorInterface editInterface(edit);    
+        editInterface.setInputConstraints(HbEditorConstraintLatinAlphabetOnly);
+        edit->setInputMethodHints(Qt::ImhNoPredictiveText);    
+        }
+}
+
+/*!
+   Validates current security settings. This function is called whenever
+   user tries to exit from the settings view. If the plugin determines
+   that some settings need editing before considered valid, it shall
+   return false. A dialog will be shown to the user indicating that
+   settings are still incomplete and asking if he/she wishes to exit
+   anyway.
+
+   \return True if security settings fpr WPA/WPA2 , WPA2 only are valid,
+    false if not.
+*/
+bool CpWpaCmnUiPrivate::validateSettings()
+{
+    bool ret(false);
+    if(mEnablePskMode) {
+        //Check the latest string entered for the Pre-Shared key in the text box
+        QVariant keyValue = mPskKeyText->contentWidgetData("text");
+        QString keyString = keyValue.toString();
+        WpaKeyValidator::KeyStatus keystatus = WpaKeyValidator::validateWpaKey(keyString);
+            
+            if (keystatus == WpaKeyValidator::KeyStatusOk && (!keyString.isEmpty())) {
+            ret= true;
+            }
+    }
+    else{
+    //return true if EAP mode
+    ret = true;
+    }
+    return ret;
+}
+
+/*!
+   comparator for qSort() method to sort Eap plugins based on ordernumber.
+   
+   @param plugin1 Plugin1
+   @param plugin2 Plugin2  
+ */
+bool CpWpaCmnUiPrivate::pluginLessThan(
+    const EapQtPluginInfo &plugin1,
+    const EapQtPluginInfo &plugin2)
+{
+    return plugin1.orderNumber() < plugin2.orderNumber(); 
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/cpwlansecurityuiplugins/cpwpacmnui/src/wpakeyvalidator.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,166 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   Validation methods for WPA/WPA2 & WPA2 only keys
+ *
+ */
+
+/*
+ * %version: 1 %
+ */
+
+//System Includes
+#include <QString>
+
+//User Includes
+#include "wpakeyvalidator.h"
+#include "OstTraceDefinitions.h"
+
+//Trace Definition
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "wpakeyvalidatorTraces.h"
+#endif
+
+/*!
+ \class WpaKeyValidator wpakeyvalidator.cpp
+ \brief Utilities for WPA/WPA2 key validations.
+ 
+ */
+/*!
+ \enum WpaKeyValidator::KeyStatus
+ This enum defines the validation results.
+
+ \var WpaKeyValidator::KeyStatusOk
+ Key is valid.
+ 
+ \var WpaKeyValidator::KeyStatusIllegalCharacters
+ Key contains illegal characters.
+ 
+ \var WpaKeyValidator::KeyStatusWpaTooShort
+ WPA key is too short. Minimum allowed length is 8. See 
+ WlanWizardUtils::validateWpaKey().
+ 
+ \var WpaKeyValidator::KeyStatusWpaTooLong
+ WPA key is too long. Minimum allowed length is 64 for hex key and 63 for 
+ ascii key. See WlanWizardUtils::validateWpaKey().
+ 
+ */
+
+/*! 
+ * Process WPA key validation. A passphrase can contain from 8 to 63 ASCII
+ * characters where each character MUST have a decimal encoding in the range of
+ * 32 to 126, inclusive.
+ *
+ * A preshared key is stored as 64 character hex string.
+ * 
+ * @param key PSK to be validated
+ * 
+ * @return Following values are possible
+ * - KeyStatusOk
+ * - KeyStatusIllegalCharacters
+ * - KeyStatusWpaTooShort
+ * - KeyStatusWpaTooLong
+ */
+WpaKeyValidator::KeyStatus WpaKeyValidator::validateWpaKey(const QString &key)
+{
+    OstTraceFunctionEntry0( WPAKEYVALIDATOR_VALIDATEWPAKEY_ENTRY );
+
+    int length = key.length();
+    KeyStatus ret = KeyStatusOk;
+
+    if (length < WpaMinLenght) {
+        ret = KeyStatusWpaTooShort;
+    }
+    else if (length > WpaMaxLenght) {
+        ret = KeyStatusWpaTooLong;
+    }
+    // hex string
+    else if (length == WpaMaxLenght) {
+        ret = isHex(key);
+    }
+    else {
+        ret = isAscii(key);
+    }
+
+    OstTraceFunctionExit0( WPAKEYVALIDATOR_VALIDATEWPAKEY_EXIT );
+    return ret;
+}
+
+/*!
+ * Process Ascii validation. Allowed characters are from 32 to 126.
+ * 
+ * @param key to be validated.
+ * 
+ * @return Following values are possible
+ * - KeyStatusOk
+ * - KeyStatusIllegalCharacters
+ */
+WpaKeyValidator::KeyStatus WpaKeyValidator::isAscii(const QString &key)
+{
+    OstTraceFunctionEntry0( WPAKEYVALIDATOR_ISASCII_ENTRY );
+
+    QChar ch32(32);
+    QChar ch126(126);
+
+    const QChar *data = key.data();
+    while (!data->isNull()) {
+        if ((*data) < ch32 || (*data) > ch126) {
+
+            OstTraceFunctionExit0( WPAKEYVALIDATOR_ISASCII_EXIT );
+            return KeyStatusIllegalCharacters;
+        }
+        ++data;
+    }
+
+    OstTraceFunctionExit0( DUP1_WPAKEYVALIDATOR_ISASCII_EXIT );
+    return KeyStatusOk;
+}
+
+/*!
+ * Process Hex validation. Allowed characters are
+ * - from 0 to 9
+ * - from a to f
+ * - from A to F
+ * 
+ * @param key to be validated.
+ * 
+ * @return Following values are possible
+ * - KeyStatusOk
+ * - KeyStatusIllegalCharacters
+ */
+WpaKeyValidator::KeyStatus WpaKeyValidator::isHex(const QString &key)
+{
+    OstTraceFunctionEntry0( WPAKEYVALIDATOR_ISHEX_ENTRY );
+
+    QChar ch_A(65); // Character: A
+    QChar ch_F(70); // Character: F
+    QChar ch_a(97); // Character: a
+    QChar ch_f(102);// Character: f
+
+    const QChar *data = key.data();
+    while (!data->isNull()) {
+        if (data->isDigit() || (*data) >= ch_a && (*data) <= ch_f || (*data)
+                >= ch_A && (*data) <= ch_F) {
+            ++data;
+        }
+        else {
+
+            OstTraceFunctionExit0( WPAKEYVALIDATOR_ISHEX_EXIT );
+            return KeyStatusIllegalCharacters;
+        }
+    }
+
+    OstTraceFunctionExit0( DUP1_WPAKEYVALIDATOR_ISHEX_EXIT );
+    return KeyStatusOk;
+}
--- a/securitysettings/cpwlansecurityuiplugins/cpwpacmnui/traces/OstTraceDefinitions.h	Thu May 13 22:51:27 2010 +0300
+++ b/securitysettings/cpwlansecurityuiplugins/cpwpacmnui/traces/OstTraceDefinitions.h	Mon May 24 20:32:47 2010 +0300
@@ -11,16 +11,15 @@
  *
  * Contributors:
  *
- * Description: .
+ * Description: TraceHeader ,includes the TraceAPI 
  *   
  *
  */
  
- 
 /*
  * %version: 2 %
  */
-
+ 
 #ifndef __OSTTRACEDEFINITIONS_H__
 #define __OSTTRACEDEFINITIONS_H__
 #include <opensystemtrace.h>
--- a/securitysettings/cpwlansecurityuiplugins/cpwpaui/cpwpaui.pro	Thu May 13 22:51:27 2010 +0300
+++ b/securitysettings/cpwlansecurityuiplugins/cpwpaui/cpwpaui.pro	Mon May 24 20:32:47 2010 +0300
@@ -4,68 +4,74 @@
 # under the terms of the License "Eclipse Public License v1.0"
 # which accompanies this distribution, and is available
 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
 # Initial Contributors:
-# Nokia Corporation - initial contribution.
+# 	Nokia Corporation - initial contribution.
+#
 # Contributors:
+#
 # Description:
-# Control Panel QT UI for WPA configuration
-# %version: tr1cfwln#7 %
+# 	Control Panel UI for WPA/WPA2 only Security mode
+#
+# %version: 15 %
+#
+
 TEMPLATE = lib
 TARGET = cpwpaui
+
 DEPENDPATH += 
-INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE \
+
+INCLUDEPATH += \ 
+	$$MW_LAYER_SYSTEMINCLUDE \
     $$OS_LAYER_SYSTEMINCLUDE \
-    ../cpwpacmnui/inc \
-    ../../inc
+    ../inc
     
-CONFIG += hb \
+CONFIG += \
+	hb \
     plugin
-LIBS += -lcpframework \
-    -leapqtplugininfo \
+    
+LIBS += \
+	-lcpframework \
     -lcpwpacmnui \
-    -lconnection_settings_shim
+    -lconnection_settings_shim \
+    -leapqtconfiginterface
+    
 MOC_DIR = _moc
 RCC_DIR = _rcc
 OBJECTS_DIR = _objects
 
 # Input
-HEADERS += inc/wpakeyvalidator.h \
-    traces/OstTraceDefinitions.h \
+HEADERS += \
+	traces/OstTraceDefinitions.h \
     inc/cpwpaui.h
-SOURCES += src/wpakeyvalidator.cpp \
-    src/cpwpaui.cpp
-symbian: { 
+    
+SOURCES += src/cpwpaui.cpp
+
+symbian: 
+{ 
+	TARGET.CAPABILITY = CAP_GENERAL_DLL
     TARGET.EPOCALLOWDLLDATA = 1
     TARGET.UID3 = 0x2002C301
-    LIBS += -leapqtconfiginterface
-    BLD_INF_RULES.prj_exports += "rom/cpwpaui.iby CORE_MW_LAYER_IBY_EXPORT_PATH(cpwpaui.iby)"
-}
-symbian { 
+
     deploy.path = C:
     qtplugins.path = /resource/qt/plugins/controlpanel/wlansecurity
     qtplugins.sources += qmakepluginstubs/cpwpaui.qtplugin
+    for(qtplugin, qtplugins.sources):BLD_INF_RULES.prj_exports += "./$$qtplugin $$deploy.path$$qtplugins.path/$$basename(qtplugin)"
     
-    # This is for new exporting system coming in garden
-    for(qtplugin, qtplugins.sources):BLD_INF_RULES.prj_exports += "./$$qtplugin $$deploy.path$$qtplugins.path/$$basename(qtplugin)"
+    BLD_INF_RULES.prj_exports += \
+    	"rom/cpwpaui.iby CORE_MW_LAYER_IBY_EXPORT_PATH(cpwpaui.iby)"
 }
 
-# temporary not used; waiting for the latest .ts file ; accordingly export will change
-# translation file temporarily read as qt resource
-# TRANSLATIONS += /resource/qtwlan_en_GB.ts
-
-# Temporary solution to fix tracecompiler
-# When tracecompiler is fixed, this can be removed
-symbian: {
+symbian:
+{
     MMP_RULES += "USERINCLUDE traces"
 }
 
-RESOURCES += resources/resource.qrc
+# common translation file for all plugins
+TRANSLATIONS = cpwlansecsettingsplugin.ts
 
-TARGET.CAPABILITY = CAP_GENERAL_DLL
-dynamiclibrary.sources = cpwpacmnui.dll
-dynamiclibrary.path = /sys/bin
 plugin.sources += cpwpaui.dll
 plugin.path = /resource/qt/plugins/controlpanel
-DEPLOYMENT += plugin \
-    dynamiclibrary
 
+DEPLOYMENT += plugin
+
--- a/securitysettings/cpwlansecurityuiplugins/cpwpaui/inc/cpwpaui.h	Thu May 13 22:51:27 2010 +0300
+++ b/securitysettings/cpwlansecurityuiplugins/cpwpaui/inc/cpwpaui.h	Mon May 24 20:32:47 2010 +0300
@@ -17,7 +17,7 @@
 */
 
 /*
-* %version: tr1cfwln#11.1.1 %
+* %version: 16 %
 */
 
 
@@ -26,21 +26,17 @@
 
 // System includes
 #include <cpsettingformitemdata.h>
-#include <hbglobal.h>
-#include <HbMessageBox>
+#include <cpwlansecurityplugininterface.h>
 
 // User includes
-#include "cpwlansecurityplugininterface.h"
+
 
 // Forward declarations
-class EapPluginInformation;
-class PluginInformation;
-class CpBaseSettingView;
 class EapQtConfigInterface;
-class EapEntyItemData;
 class CpWpaCmnUi;
 class CmConnectionMethodShim;
-class QTranslator;
+class HbTranslator;
+
 
 /*!
  * @addtogroup group_wlan_security_ui_plugin_wpa/wpa2
@@ -72,24 +68,8 @@
     CpSettingFormItemData* uiInstance(
             CpItemDataHelper &dataHelper);
     
-private:
-    
-    bool tryUpdate();
-
-    void handleUpdateError();
-
-    void showMessageBox( HbMessageBox::MessageBoxType type,
-            const QString &text);
+    bool validateSettings();
     
-    void updateWpaSettings();
-    
-  
-private slots:
- 
-    //void currentEapPlugin(int plugin);    
-    //void wpaTypeChanged(int pskEnable);
-    void pskKeyChanged(QString& key);
-         
 
 private:
     
@@ -98,11 +78,8 @@
     //!WPA security group item
     CpSettingFormItemData* mUi;   
 
-    //! Connection method Id
-    int mCmId;
-   
     //!Translator for all the localisation Text Id's
-    QTranslator *mTranslator;
+    HbTranslator *mTranslator;
     
     //! Connection Settings Shim connection method pointer    
     CmConnectionMethodShim *mCmCM;    
@@ -113,9 +90,6 @@
     //!WPA ui Implementer Interface
     QScopedPointer <CpWpaCmnUi> mWpaUi;
     
-    //! Message box for info notes
-    QSharedPointer<HbMessageBox> mMessageBox;
-    
  };
 
 /*! @} */
--- a/securitysettings/cpwlansecurityuiplugins/cpwpaui/inc/wpakeyvalidator.h	Thu May 13 22:51:27 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: 
- *   WLAN Wizard Utilities
- *
- */
-
-/*
- * %version: 1 %
- */
-
-#ifndef WPAKEYVALIDATOR_H
-#define WPAKEYVALIDATOR_H
-
-/*!
- * @addtogroup group_wpa_key_validator
- * @{
- */
-
-class WpaKeyValidator
-{
-public:
-    enum KeyStatus
-    {
-        KeyStatusOk,
-        KeyStatusIllegalCharacters,
-        KeyStatusWpaTooShort,
-        KeyStatusWpaTooLong
-    };
-
-    static const int WpaMaxLenght = 64;
-    static const int WpaMinLenght = 8;
-    
-public:
-
-    static KeyStatus validateWpaKey(const QString &key);
-    static KeyStatus isAscii(const QString &key);
-    static KeyStatus isHex(const QString &key);
-};
-
-/*! @} */
-
-#endif /* WPAKEYVALIDATOR_H */
--- a/securitysettings/cpwlansecurityuiplugins/cpwpaui/rom/cpwpaui.iby	Thu May 13 22:51:27 2010 +0300
+++ b/securitysettings/cpwlansecurityuiplugins/cpwpaui/rom/cpwpaui.iby	Mon May 24 20:32:47 2010 +0300
@@ -7,22 +7,30 @@
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
 *
 * Initial Contributors:
-* Nokia Corporation - initial contribution.
+* 	Nokia Corporation - initial contribution.
 *
 * Contributors:
 *
 * Description:
+*	IBY file for WPA/WPA2 only Ui
 *
 */
 
+/*
+ * %version: tr1cfwln#3 %
+ */
+
 #ifndef CPWPAUI_IBY
 #define CPWPAUI_IBY
 
 #include <data_caging_paths_for_iby.hrh>
 #include <bldvariant.hrh>
 
+#ifdef __PROTOCOL_WLAN
+
 file=ABI_DIR/BUILD_DIR/cpwpaui.dll SHARED_LIB_DIR/cpwpaui.dll
 data=/epoc32/data/c/resource/qt/plugins/controlpanel/wlansecurity/cpwpaui.qtplugin resource/qt/plugins/controlpanel/wlansecurity/cpwpaui.qtplugin
 
+#endif // __PROTOCOL_WLAN
 
 #endif // CPWPAUI_IBY
--- a/securitysettings/cpwlansecurityuiplugins/cpwpaui/src/cpwpaui.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/securitysettings/cpwlansecurityuiplugins/cpwpaui/src/cpwpaui.cpp	Mon May 24 20:32:47 2010 +0300
@@ -17,23 +17,20 @@
  */
 
 /*
- * %version: tr1cfwln#21.1.1 %
+ * %version: 27 %
  */
 //User Includes
 #include "cpwpaui.h"
 #include "cpwpacmnui.h"
-#include "wpakeyvalidator.h"
 
 // System includes
 #include <QStringList>
-#include <HbDeviceNotificationDialog>
-#include <QLocale>
-#include <qtranslator.h>
-#include <QCoreApplication>
 #include <cmconnectionmethod_shim.h>
 #include <cmmanagerdefines_shim.h>
 #include <eapqtconfiginterface.h>
+#include <HbTranslator>
 
+//Trace Definition
 #include "OstTraceDefinitions.h"
 #ifdef OST_TRACE_COMPILER_IN_USE
 #include "cpwpauiTraces.h"
@@ -42,29 +39,33 @@
 //Constants
 //The order in which WPA/WPA2 only mode appears in the list of available 
 //security modes
-const int UI_ORDER_WPA_WPA2 = 40;
+const int UI_ORDER_WPA_WPA2 = 20;
 /*!
  \class CpWpaUi
  \brief CpWpaUi implements the common Ui for WPA/WPA2 
  Security Settings Control Panel Plugins,
  which will allow viewing/editing of WPA/WPA2 Security Settings.
  */
-//Contructs WPA/WPA2 object
+/*!
+ * Constructor
+ */
 CpWpaUi::CpWpaUi() :
-    mUi(NULL), mCmCM(NULL), mEapQtConfigInterface(NULL)
+   mUi(NULL), 
+   mTranslator(new HbTranslator("cpwlansecsettingsplugin")),
+   mCmCM(NULL),
+   mEapQtConfigInterface(NULL),
+   mWpaUi(NULL)
 {
-    mTranslator = new QTranslator(this);
-    mTranslator->load(":/loc/wlan_en_GB.qm");
-
-    qApp->installTranslator(mTranslator);
+    
 
 }
 
-//Deletes all objects WPA/WPA2 owns
+//Destructor
 CpWpaUi::~CpWpaUi()
 {
     OstTraceFunctionEntry1(CPWPAUI_CPWPAUI_ENTRY,this);
-    //delete mEapQtConfigInterface;
+    delete mEapQtConfigInterface;
+    delete mTranslator;
     OstTraceFunctionExit1(CPWPAUI_CPWPAUI_EXIT,this);
 }
 
@@ -77,8 +78,8 @@
  */
 CMManagerShim::WlanSecMode CpWpaUi::securityMode() const
 {
-    OstTraceFunctionEntry1(CPWPAUI_MODE_ENTRY,this);
-    OstTraceFunctionExit1(CPWPAUI_MODE_EXIT,this);
+    OstTraceFunctionEntry1(CPWPAUI_SECURITYMODE_ENTRY,this);
+    OstTraceFunctionExit1(CPWPAUI_SECURITYMODE_EXIT,this);
     //return security mode
     return CMManagerShim::WlanSecModeWpa;
 }
@@ -92,27 +93,26 @@
  */
 QString CpWpaUi::securityModeTextId() const
 {
-    OstTraceFunctionEntry1(CPWPAUI_LOCALIZATIONID_ENTRY,this); 
-    OstTraceFunctionExit1(CPWPAUI_LOCALIZATIONID_EXIT,this);
+    OstTraceFunctionEntry1( CPWPAUI_SECURITYMODETEXTID_ENTRY, this );
+    OstTraceFunctionExit1( CPWPAUI_SECURITYMODETEXTID_EXIT, this );
     return "txt_occ_setlabel_wlan_security_mode_val_wpawpa2";
 }
 
 /*! 
- Sets the database reference (WLAN Service Table ID).
+ Sets the database reference IAP id.
 
  \param id Database reference
  */
 void CpWpaUi::setReference(CmConnectionMethodShim *cmCm, uint id)
 {
     OstTraceFunctionEntry1(CPWPAUI_SETREFERENCE_ENTRY,this);
-    // Assuming that id is the connection method Id/IAP Id.
-    mCmId = id;
-
-    /*if (!mEapQtConfigInterface) {
-     mEapQtConfigInterface = new EapQtConfigInterface(
-     EapQtConfigInterface::EapBearerTypeWlan, mCmId);
-     // fix, hangs
-     }*/
+    if (!mEapQtConfigInterface) {
+       mEapQtConfigInterface = new EapQtConfigInterface(
+               EapQtConfigInterface::EapBearerTypeWlan, id);
+    } 
+    else {
+       mEapQtConfigInterface->setConfigurationReference(id);     
+    }
 
     //mCmCM is not deleted assuming mCmManager owns it.
     mCmCM = cmCm;
@@ -146,149 +146,24 @@
     mWpaUi.reset(new CpWpaCmnUi(CMManagerShim::WlanSecModeWpa, dataHelper));
 
     mUi = mWpaUi->createUi(mEapQtConfigInterface, mCmCM);
-
-    connect(mWpaUi.data(), SIGNAL(keyChanged(QString&)), this, SLOT(pskKeyChanged(QString&)));
-
-    connect(mWpaUi.data(), SIGNAL(pskEapModeToggled(int)), this, SLOT(wpaTypeChanged(int)));
-
-    connect(mWpaUi.data(), SIGNAL(eapPluginChanged(int)), this, SLOT(currentEapPlugin(int)));
-    //}
+    
     OstTraceFunctionExit1(CPWPAUI_UIINSTANCE_EXIT,this);
     return mUi;
 }
 
-
-// ======== LOCAL FUNCTIONS ========
-
 /*!
- Slot to handle change in wpa mode :- PSK /EAP
-
- \param pskEnable the current mode chosen
- */
-/*void CpWpaUi::wpaTypeChanged(int pskEnable)
-{
-    int err;
-    OstTraceFunctionEntry1(CPWPAUI_WPATYPECHANGED_ENTRY,this);
-
-    bool PskEnable = pskEnable ? ETrue : EFalse;
-
-    QT_TRYCATCH_ERROR(err,mCmCM->setBoolAttribute(CMManagerShim::WlanEnableWpaPsk, PskEnable));
-    
-    if(err !=KErrNone) {
-              OstTrace1( TRACE_ERROR, CPWPAUI_WPATYPECHANGED, "ERROR WPA/WPA2 wpatypereturned returned %d", err );
-    }
-    tryUpdate();
-    OstTraceFunctionExit1(CPWPAUI_WPATYPECHANGED_EXIT,this);
-}*/
-
-/*!
- Slot to handle change in pre-shared key string
-
- \param key changed string for PSK
- */
-void CpWpaUi::pskKeyChanged(QString &key)
-{
-    int err;
-    OstTraceFunctionEntry1(CPWPAUI_PSKKEYCHANGED_ENTRY,this);
-    //Store to native s60 type for validation 
-    TPtrC ptrName(reinterpret_cast<const TText*> (key.constData()));
-
-    //Check for Validity of Pre-shared Key
-    WpaKeyValidator::KeyStatus keystatus = WpaKeyValidator::validateWpaKey(key);
-
-    if (keystatus == WpaKeyValidator::KeyStatusOk) {
-
-        QT_TRYCATCH_ERROR(err,mCmCM->setString8Attribute(CMManagerShim::WlanWpaPreSharedKey, key));
-        if(err !=KErrNone) {
-          OstTrace1( TRACE_ERROR,CPWPAUI_PSKKEYCHANGED, "ERROR WPA/WPA2: pskKeyChanged returned %d", err );
-        }
-        tryUpdate();
-    }
-    else {
-    showMessageBox(HbMessageBox::MessageTypeWarning, hbTrId(
-                      "txt_occ_info_invalid_input"));
-    }
-    OstTraceFunctionExit1(CPWPAUI_PSKKEYCHANGED_EXIT,this);
-}
-
-/*!
- Slot to handle change in eap method in use
- \param currentplugin plugin number to indicate the
- eap method in use
- */
-/*void CpWpaUi::currentEapPlugin(int  plugin )
-{
-    OstTraceFunctionEntry1(CPWPAUI_CURRENTEAPPLUGIN_ENTRY,this);
+   Validates current security settings. This function is called whenever
+   user tries to exit from the settings view. If the plugin determines
+   that some settings need editing before considered valid, it shall
+   return false. A dialog will be shown to the user indicating that
+   settings are still incomplete and asking if he/she wishes to exit
+   anyway.
 
-    //define enum to store the current EAP type
-    //mCmCM->setIntAttribute( use appropriate enum to get the eap plugin index );
-    OstTraceFunctionExit1(CPWPAUI_CURRENTEAPPLUGIN_EXIT,this);
-}*/
-
-bool CpWpaUi::tryUpdate()
-{
-    OstTraceFunctionEntry1(CPWPAUI_TRYUPDATE_ENTRY,this);
-
-    // Try update
-    try {
-        mCmCM->update();
-    } catch (const std::exception&) {
-        // Handle error
-        handleUpdateError();
-
-        OstTraceFunctionExit1(CPWPAUI_TRYUPDATE_EXIT,this);
-        return false;
-    }
-
-    OstTraceFunctionExit1(DUP1_CPWPAUI_TRYUPDATE_EXIT,this);
-    return true;
-}
-
-/*!
- Handles failed CommsDat update.
- */
-void CpWpaUi::handleUpdateError()
+   \return True if security settings for WPA/WPA2 are valid, false if not.
+*/
+bool CpWpaUi::validateSettings()
 {
-    OstTraceFunctionEntry1(CPWPAUI_HANDLEUPDATEERROR_ENTRY,this);
-
-    // Show error note to user
-    showMessageBox(HbMessageBox::MessageTypeWarning, hbTrId("txt_occ_info_unable_to_save_setting"));
-    // Reload settings from CommsDat and update UI
-    try {
-        mCmCM->refresh();
-    } catch (const std::exception&) {
-        // Ignore error from refresh. Most likely this will not happen, but
-        // if it does, there isn't very much we can do.
-        OstTrace0(
-            TRACE_ERROR,
-            CPWPAUI_HANDLEUPDATEERROR,
-            "Refresh failed");
-    };
-    updateWpaSettings();
-
-    OstTraceFunctionExit1(CPWPAUI_HANDLEUPDATEERROR_EXIT,this);
-}
-
-/*!
- Shows message box with "OK" button using given text.
- */
-void CpWpaUi::showMessageBox(HbMessageBox::MessageBoxType type, const QString &text)
-{
-    OstTraceFunctionEntry1(CPWPAUI_SHOWMESSAGEBOX_ENTRY,this);
-
-    // Create a message box
-    mMessageBox = QSharedPointer<HbMessageBox> (new HbMessageBox(type));
-    mMessageBox->setText(text);
-    mMessageBox->open();
-
-    OstTraceFunctionExit1(CPWPAUI_SHOWMESSAGEBOX_EXIT,this);
-}
-
-void CpWpaUi::updateWpaSettings()
-{
-    OstTraceFunctionEntry1(CPWPAUI_UPDATEWPASETTINGS_ENTRY,this);
-    mWpaUi->reset();
-    OstTraceFunctionExit1(CPWPAUI_UPDATEWPASETTINGS_EXIT,this);
+    return mWpaUi->validateSettings();
 }
 
 Q_EXPORT_PLUGIN2(CpWpaUi, CpWpaUi)
--- a/securitysettings/cpwlansecurityuiplugins/cpwpaui/src/wpakeyvalidator.cpp	Thu May 13 22:51:27 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,144 +0,0 @@
-/*
- * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: 
- *   Validate WPA/WPA2 & WPA2 only keys
- *
- */
-
-/*
- * %version: 1 %
- */
-
-#include <QString>
-#include "wpakeyvalidator.h"
-
-/*!
-    \class WpaKeyValidator wpakeyvalidator.cpp
-    \brief Utilities for WPA/WPA2 key validations.
-    
-*/
-/*!
-    \enum WpaKeyValidator::KeyStatus
-    This enum defines the validation results.
-
-    \var WpaKeyValidator::KeyStatusOk
-    Key is valid.
-    
-    \var WpaKeyValidator::KeyStatusIllegalCharacters
-    Key contains illegal characters.
-    
-    \var WpaKeyValidator::KeyStatusWpaTooShort
-    WPA key is too short. Minimum allowed length is 8. See 
-    WlanWizardUtils::validateWpaKey().
-    
-    \var WpaKeyValidator::KeyStatusWpaTooLong
-    WPA key is too long. Minimum allowed length is 64 for hex key and 63 for 
-    ascii key. See WlanWizardUtils::validateWpaKey().
-      
-*/
-
-/*! 
- * Process WPA key validation. A passphrase can contain from 8 to 63 ASCII
- * characters where each character MUST have a decimal encoding in the range of
- * 32 to 126, inclusive.
- *
- * A preshared key is stored as 64 character hex string.
- * 
- * @param key PSK to be validated
- * 
- * @return Following values are possible
- * - KeyStatusOk
- * - KeyStatusIllegalCharacters
- * - KeyStatusWpaTooShort
- * - KeyStatusWpaTooLong
- */
-WpaKeyValidator::KeyStatus WpaKeyValidator::validateWpaKey(const QString &key)
-{
-    int length = key.length();
-    KeyStatus ret = KeyStatusOk;
-
-    if (length < WpaMinLenght) {
-        ret = KeyStatusWpaTooShort;
-    }
-    else if (length > WpaMaxLenght) {
-        ret = KeyStatusWpaTooLong;
-    }
-    // hex string
-    else if (length == WpaMaxLenght) {
-        ret = isHex(key);
-    }
-    else {
-        ret = isAscii(key);
-    }
-
-    return ret;
-}
-
-
-/*!
- * Process Ascii validation. Allowed characters are from 32 to 126.
- * 
- * @param key to be validated.
- * 
- * @return Following values are possible
- * - KeyStatusOk
- * - KeyStatusIllegalCharacters
- */
-WpaKeyValidator::KeyStatus WpaKeyValidator::isAscii(const QString &key)
-{
-    QChar ch32(32);
-    QChar ch126(126);
-
-    const QChar *data = key.data();
-    while (!data->isNull()) {
-        if ((*data) < ch32 || (*data) > ch126) {
-            return KeyStatusIllegalCharacters;
-        }
-        ++data;
-    }
-    return KeyStatusOk;
-}
-
-/*!
- * Process Hex validation. Allowed characters are
- * - from 0 to 9
- * - from a to f
- * - from A to F
- * 
- * @param key to be validated.
- * 
- * @return Following values are possible
- * - KeyStatusOk
- * - KeyStatusIllegalCharacters
- */
-WpaKeyValidator::KeyStatus WpaKeyValidator::isHex(const QString &key)
-{
-    QChar ch_A(65); // Character: A
-    QChar ch_F(70); // Character: F
-    QChar ch_a(97); // Character: a
-    QChar ch_f(102);// Character: f
-
-    const QChar *data = key.data();
-    while (!data->isNull()) {
-        if (data->isDigit() ||
-            (*data) >= ch_a && (*data) <= ch_f ||
-            (*data) >= ch_A && (*data) <= ch_F) {
-            ++data;
-        }
-        else {
-            return KeyStatusIllegalCharacters;
-        }
-    }
-    return KeyStatusOk;
-}
--- a/securitysettings/cpwlansecurityuiplugins/cpwpaui/traces/OstTraceDefinitions.h	Thu May 13 22:51:27 2010 +0300
+++ b/securitysettings/cpwlansecurityuiplugins/cpwpaui/traces/OstTraceDefinitions.h	Mon May 24 20:32:47 2010 +0300
@@ -11,18 +11,16 @@
  *
  * Contributors:
  *
- * Description: .
+ * Description: TraceHeader ,includes the TraceAPI 
  *   
  *
  */
  
- 
 /*
  * %version: 2 %
  */
-
+ 
 #ifndef __OSTTRACEDEFINITIONS_H__
 #define __OSTTRACEDEFINITIONS_H__
 #include <opensystemtrace.h>
 #endif
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/cpwlansecurityuiplugins/eabi/cpwpacmnuiu.def	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,8 @@
+EXPORTS
+	_ZN10CpWpaCmnUi16validateSettingsEv @ 1 NONAME
+	_ZN10CpWpaCmnUi8createUiEP20EapQtConfigInterfaceP22CmConnectionMethodShim @ 2 NONAME
+	_ZN10CpWpaCmnUiC1EN13CMManagerShim11WlanSecModeER16CpItemDataHelper @ 3 NONAME
+	_ZN10CpWpaCmnUiC2EN13CMManagerShim11WlanSecModeER16CpItemDataHelper @ 4 NONAME
+	_ZN10CpWpaCmnUiD1Ev @ 5 NONAME
+	_ZN10CpWpaCmnUiD2Ev @ 6 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/cpwlansecurityuiplugins/inc/cpwpacmnui.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *    Control Panel QT UI for WPA/WPA2/802_Dot_1x configuration
+ *
+ */
+
+/*
+ * %version: tr1cfwln#14 %
+ */
+
+#ifndef CPWPACMNUI_H
+#define CPWPACMNUI_H
+
+// System includes
+#include <cmmanagerdefines_shim.h>
+
+// User includes
+#include "cpwpacmnui_global.h"
+
+// Forward Declarations
+class CpItemDataHelper;
+class CpSettingFormItemData;
+class EapQtConfigInterface;
+class CpWpaCmnUiPrivate;
+
+/*! 
+ * Implements the Ui for WPA/WPA2/802.1x Security Mode  
+ */
+
+// Class declaration
+class WPAUI_EXPORT CpWpaCmnUi
+{
+    public:
+    
+        CpWpaCmnUi(CMManagerShim::WlanSecMode securityMode, CpItemDataHelper &dataHelpper);
+        ~CpWpaCmnUi();
+
+        CpSettingFormItemData* createUi(
+                EapQtConfigInterface *mEapQtConfigInterface,
+                CmConnectionMethodShim *cmCM);
+
+        bool validateSettings();
+    
+    private:
+        
+        Q_DISABLE_COPY(CpWpaCmnUi)
+        
+        // Pointer to Private Implementation
+        CpWpaCmnUiPrivate* d_ptr;
+ 
+};
+
+
+
+#endif//CPWPACMNUI_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/cpwlansecurityuiplugins/inc/cpwpacmnui_global.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: Export Declaration for CpWpaCmnUi DLL - common Ui
+ * for WPA/WPA2, WPA2 only and 802.1x  Security modes
+ *    
+ *
+ */
+
+/*
+ * %version: 5 %
+ */
+#ifndef CPWPACMNUI_GLOBAL_H_
+#define CPWPACMNUI_GLOBAL_H_
+
+
+#include <QtCore/QtGlobal>
+ 
+ //If WPAUI_LIBRARY macro is defined in the project file,
+ //The dll is exported, 
+ //otherwise, 
+ //the dll will be imported(used)
+ #if defined(WPAUI_LIBRARY)
+ #define WPAUI_EXPORT Q_DECL_EXPORT
+ #else
+ #if defined(WPAUI_NO_LIBRARY)
+ #define WPAUI_EXPORT
+ #else
+ #define WPAUI_EXPORT Q_DECL_IMPORT
+ #endif
+ #endif
+
+
+#endif //CPWPACMNUI_GLOBAL_H_
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/cpwlansecurityuiplugins/rom/cpwlansecurityuiplugins_resources.iby	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+* 	Common IBY file for WLAN security UI plugin resources
+*
+*/
+
+/*
+ * %version: 1 %
+ */
+
+#ifndef CPWLANSECPLUGINS_RES_IBY
+#define CPWLANSECPLUGINS_RES_IBY
+
+#include <data_caging_paths_for_iby.hrh>
+#include <bldvariant.hrh>
+
+#ifdef __PROTOCOL_WLAN
+
+data=DATAZ_/QT_TRANSLATIONS_DIR/cpwlansecsettingsplugin.qm QT_TRANSLATIONS_DIR/cpwlansecsettingsplugin.qm
+
+#endif // __PROTOCOL_WLAN
+
+#endif // CPWLANSECPLUGINS_RES_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/eapqtdialogs/eapqtdialogs.pro	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,53 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: EAP Dialog build file
+#
+#
+
+TEMPLATE = lib
+TARGET = eapdialogplugin
+CONFIG += hb plugin
+
+# directories
+INCLUDEPATH += .
+DEPENDPATH += .
+DESTDIR = $${HB_BUILD_DIR}/plugins/devicedialogs
+
+# directories for generated files
+MOC_DIR     = _moc
+RCC_DIR     = _rcc
+OBJECTS_DIR = _obj
+HEADERS += inc/eapdialogplugin.h \
+           inc/eapusernamepwddialog.h  \ 
+           traces/OstTraceDefinitions.h
+
+SOURCES += src/eapdialogplugin.cpp \
+           src/eapusernamepwddialog.cpp
+
+symbian: {
+    TARGET.EPOCALLOWDLLDATA = 1
+    TARGET.CAPABILITY = CAP_GENERAL_DLL
+    TARGET.UID3 = 0x2002E6F2
+    BLD_INF_RULES.prj_exports += "rom/eapdialogplugin.iby CORE_APP_LAYER_IBY_EXPORT_PATH(eapdialogplugin.iby)"
+    BLD_INF_RULES.prj_exports += "rom/eapdialogplugin_resources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(eapdialogplugin_resources.iby)"
+
+    pluginstub.sources = eapdialogplugin.dll
+    pluginstub.path = /resource/plugins/devicedialogs
+    DEPLOYMENT += pluginstub
+}
+TRANSLATIONS = cellularpromptdialog.ts
+
+LIBS  += -leapqtconfiginterface -leapqtplugininfo
+
+# RESOURCES += res/eapdialog.qrc
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/eapqtdialogs/inc/eapdialogplugin.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,66 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef ____EAPDIALOG_H__PLUGIN_H__
+#define ____EAPDIALOG_H__PLUGIN_H__
+
+#include <QObject>
+#include <hbdevicedialogplugin.h>
+
+class EapUsernamePwdDialog;
+
+class EapDialogPlugin : public HbDeviceDialogPlugin
+{
+    Q_OBJECT
+
+public:
+    
+    /* Constructor */
+    EapDialogPlugin();
+    /* Destructor */
+    ~EapDialogPlugin();
+    
+    /* Check whether access is allowed, true is always returned */
+    bool accessAllowed(const QString &deviceDialogType,
+        const QVariantMap &parameters, const QVariantMap &securityInfo) const;
+    
+    /* Creates the dialog widget */
+    HbDeviceDialogInterface *createDeviceDialog(const QString &deviceDialogType,
+        const QVariantMap &parameters);
+    
+    /* Returns the device dialog type */
+    bool deviceDialogInfo(const QString &deviceDialogType,
+        const QVariantMap &parameters, DeviceDialogInfo *info) const;
+    
+    /* Returns a list of dialog types that this plugin implements.
+     * Only one dialog type is supported.
+     */
+    QStringList deviceDialogTypes() const;
+    
+    /* Returns the possible plugin flags, there are none */
+    PluginFlags pluginFlags() const;
+    
+    /* Not supported */
+    int error() const;
+
+private:
+    Q_DISABLE_COPY(EapDialogPlugin)
+
+};
+
+#endif // ___EAPDIALOG_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/eapqtdialogs/inc/eapfastcreatemasterkeyquerydialog.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,105 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __EAPFASTCREATEMASTERKEYQUERYDIALOG_H__
+#define __EAPFASTCREATEMASTERKEYQUERYDIALOG_H__
+
+#include <HbTranslator>
+#include <HbInputDialog>
+#include <HbLineEdit>
+#include <HbAction>
+#include <hbdevicedialoginterface.h>
+
+class EapQtValidator;
+
+class EapFastCreateMasterKeyQueryDialog: public HbInputDialog, public HbDeviceDialogInterface
+    {
+    Q_OBJECT
+
+    public:
+        /* Constructor */
+        EapFastCreateMasterKeyQueryDialog(const QVariantMap &parameters);
+        /* Destructor */
+        ~EapFastCreateMasterKeyQueryDialog();
+        
+        /* Function creates the actual dialog widget */
+        void createDialog( const QVariantMap &parameters );
+        
+        /* Device dialog parameters to be set while dialog is displayed.
+         * Not supported.
+         */
+        bool setDeviceDialogParameters(const QVariantMap &parameters);
+        
+        /* Not supported */
+        int deviceDialogError() const;
+        
+        /* Closes the device dialog */
+        void closeDeviceDialog(bool byClient);
+        
+        /* Returns a pointer to this dialog widget */
+        HbPopup *deviceDialogWidget() const;
+                
+    signals:
+        /* Signal is emitted when the dialog is closed */
+        void deviceDialogClosed();
+    
+        /* Data is emitted in QVariantMap when Ok Action button is selected */
+        void deviceDialogData(QVariantMap data);
+        
+    private slots:
+        /* Slot that is mapped to the Ok Action button's triggered signal */
+        void okPressed();
+                
+        /* Slot that is mapped to the Cancel Action button's triggered signal */
+        void cancelPressed();
+        
+        /* Slot that is mapped to the signal that indicates to closing of the dialog */
+        void closingDialog();
+               
+    private:
+        
+        bool validate() const;
+        
+        Q_DISABLE_COPY(EapFastCreateMasterKeyQueryDialog)
+   
+    private:
+        /* Pointer to the line edit 1 object */
+        HbLineEdit *mEdit1;
+        
+        /* Pointer to the line edit 2 object */
+        HbLineEdit *mEdit2;
+                
+        /* Pointer to the password validator object */
+        EapQtValidator *mPwdValidator;
+        
+        /* Pointer to the Ok action button */
+        HbAction* mActionOk;
+        
+        /* Pointer to the HbTranslator */
+        QScopedPointer<HbTranslator> mTranslator;
+        
+        /* Tells whether close has already been called for the dialog */
+        bool mClose;
+        
+        /* Tells whether Ok Action has already been pressed */
+        bool mOkActionPressed;
+    };
+
+
+#endif // __EAPFASTCREATEMASTERKEYQUERYDIALOG_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/eapqtdialogs/inc/eapfastinstallpacquerydialog.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,89 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+#ifndef __EAPFASTINSTALLQUERYDIALOG_H__
+#define __EAPFASTINSTALLQUERYDIALOG_H__
+
+#include <HbTranslator>
+#include <HbMessageBox>
+#include <HbAction>
+#include <hbdevicedialoginterface.h>
+
+class EapQtValidator;
+
+class EapFastInstallPacQueryDialog: public HbMessageBox, public HbDeviceDialogInterface
+    {
+    Q_OBJECT
+
+    public:
+        /* Constructor */
+        EapFastInstallPacQueryDialog(const QVariantMap &parameters);
+        /* Destructor */
+        ~EapFastInstallPacQueryDialog();
+        
+        /* Function creates the actual dialog widget */
+        void createDialog(const QVariantMap &parameters );
+        
+        /* Device dialog parameters to be set while dialog is displayed.
+         * Not supported.
+         */
+        bool setDeviceDialogParameters(const QVariantMap &parameters);
+        
+        /* Not supported */
+        int deviceDialogError() const;
+        
+        /* Closes the device dialog */
+        void closeDeviceDialog(bool byClient);
+        
+        /* Returns a pointer to this dialog widget */
+        HbPopup *deviceDialogWidget() const;
+                
+    signals:
+        /* Signal is emitted when the dialog is closed */
+        void deviceDialogClosed();
+        
+        /* Data is emitted in QVariantMap when Ok Action button is selected */
+        void deviceDialogData(QVariantMap data);
+            
+    private slots:
+        /* Slot that is mapped to the Yes Action button's triggered signal */
+        void yesPressed();
+        
+        /* Slot that is mapped to the No Action button's triggered signal */
+        void noPressed();
+        
+        /* Slot that is mapped to the signal that indicates to closing of the dialog */
+        void closingDialog();
+               
+    private:
+                
+        Q_DISABLE_COPY(EapFastInstallPacQueryDialog)
+   
+    private:
+        /* Pointer to the Yes action button */
+        HbAction* mActionYes;
+        
+        /* Pointer to the HbTranslator */
+        QScopedPointer<HbTranslator> mTranslator;
+        
+        /* Tells whether close has already been called for the dialog */
+        bool mClose;
+        
+        /* Tells whether Yes Action has already been pressed */
+        bool mYesActionPressed;
+    };
+
+#endif // __EAPFASTINSTALLQUERYDIALOG_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/eapqtdialogs/inc/eapfastpacfilepwquerydialog.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,99 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __EAPFASTPACFILEPWQUERYDIALOG_H__
+#define __EAPFASTPACFILEPWQUERYDIALOG_H__
+
+#include <HbTranslator>
+#include <HbInputDialog>
+#include <HbAction>
+#include <hbdevicedialoginterface.h>
+
+class EapQtValidator;
+
+class EapFastPacFilePwQueryDialog: public HbInputDialog, public HbDeviceDialogInterface
+    {
+    Q_OBJECT
+
+    public:
+        /* Constructor */
+        EapFastPacFilePwQueryDialog(const QVariantMap &parameters);
+        /* Destructor */
+        ~EapFastPacFilePwQueryDialog();
+        
+        /* Function creates the actual dialog widget */
+        void createDialog( const QVariantMap &parameters );
+        
+        /* Device dialog parameters to be set while dialog is displayed.
+         * Not supported.
+         */
+        bool setDeviceDialogParameters(const QVariantMap &parameters);
+        
+        /* Not supported */
+        int deviceDialogError() const;
+        
+        /* Closes the device dialog */
+        void closeDeviceDialog(bool byClient);
+        
+        /* Returns a pointer to this dialog widget */
+        HbPopup *deviceDialogWidget() const;
+                
+    signals:
+        /* Signal is emitted when the dialog is closed */
+        void deviceDialogClosed();
+    
+        /* Data is emitted in QVariantMap when Ok Action button is selected */
+        void deviceDialogData(QVariantMap data);
+        
+    private slots:
+        /* Slot that is mapped to the Ok Action button's triggered signal */
+        void okPressed();
+                
+        /* Slot that is mapped to the Cancel Action button's triggered signal */
+        void cancelPressed();
+        
+        /* Slot that is mapped to the signal that indicates to closing of the dialog */
+        void closingDialog();
+               
+    private:
+        
+        bool validate() const;
+        
+        Q_DISABLE_COPY(EapFastPacFilePwQueryDialog)
+   
+    private:
+        /* Pointer to the line edit object */
+        HbLineEdit *mEdit;
+                
+        /* Pointer to the password validator object */
+        EapQtValidator *mPwdValidator;
+        
+        /* Pointer to the Ok action button */
+        HbAction* mActionOk;
+        
+        /* Pointer to the HbTranslator */
+        QScopedPointer<HbTranslator> mTranslator;
+        
+        /* Tells whether close has already been called for the dialog */
+        bool mClose;
+    };
+
+
+#endif // __EAPFASTPACFILEPWQUERYDIALOG_H__
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/eapqtdialogs/inc/eapfastpacstorepwquerydialog.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,99 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __EAPFASTPACSTOREPWQUERYDIALOG_H__
+#define __EAPFASTPACSTOREPWQUERYDIALOG_H__
+
+#include <HbInputDialog>
+#include <HbAction>
+#include <HbTranslator>
+#include <hbdevicedialoginterface.h>
+
+class EapQtValidator;
+
+class EapFastPacStorePwQueryDialog: public HbInputDialog, public HbDeviceDialogInterface
+    {
+    Q_OBJECT
+
+    public:
+        /* Constructor */
+        EapFastPacStorePwQueryDialog(const QVariantMap &parameters);
+        /* Destructor */
+        ~EapFastPacStorePwQueryDialog();
+        
+        /* Function creates the actual dialog widget */
+        void createDialog( const QVariantMap &parameters );
+        
+        /* Device dialog parameters to be set while dialog is displayed.
+         * Not supported.
+         */
+        bool setDeviceDialogParameters(const QVariantMap &parameters);
+        
+        /* Not supported */
+        int deviceDialogError() const;
+        
+        /* Closes the device dialog */
+        void closeDeviceDialog(bool byClient);
+        
+        /* Returns a pointer to this dialog widget */
+        HbPopup *deviceDialogWidget() const;
+                
+    signals:
+        /* Signal is emitted when the dialog is closed */
+        void deviceDialogClosed();
+    
+        /* Data is emitted in QVariantMap when Ok Action button is selected */
+        void deviceDialogData(QVariantMap data);
+        
+    private slots:
+        /* Slot that is mapped to the Ok Action button's triggered signal */
+        void okPressed();
+                
+        /* Slot that is mapped to the Cancel Action button's triggered signal */
+        void cancelPressed();
+        
+        /* Slot that is mapped to the signal that indicates to closing of the dialog */
+        void closingDialog();
+               
+    private:
+        
+        bool validate() const;
+        
+        Q_DISABLE_COPY(EapFastPacStorePwQueryDialog)
+   
+    private:
+        /* Pointer to the line edit object */
+        HbLineEdit *mEdit;
+                
+        /* Pointer to the password validator object */
+        EapQtValidator *mPwdValidator;
+        
+        /* Pointer to the Ok action button */
+        HbAction* mActionOk;
+        
+        /* Pointer to the HbTranslator */
+        QScopedPointer<HbTranslator> mTranslator;
+        
+        /* Tells whether close has already been called for the dialog */
+        bool mClose;
+        
+    };
+
+
+#endif // __EAPFASTPACSTOREPWQUERYDIALOG_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/eapqtdialogs/inc/eapfastprovnotsuccessnotedialog.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,82 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+#ifndef __EAPFASTPROVNOTSUCCESSNOTEDIALOG_H__
+#define __EAPFASTPROVNOTSUCCESSNOTEDIALOG_H__
+
+#include <HbAction>
+#include <HbMessageBox>
+#include <HbTranslator>
+#include <hbdevicedialoginterface.h>
+
+
+class EapFastProvNotSuccessNoteDialog: public HbMessageBox, public HbDeviceDialogInterface
+    {
+    Q_OBJECT
+
+    public:
+        /* Constructor */
+        EapFastProvNotSuccessNoteDialog(const QVariantMap &parameters);
+        /* Destructor */
+        ~EapFastProvNotSuccessNoteDialog();
+        
+        /* Function creates the actual dialog widget */
+        void createDialog(const QVariantMap &parameters );
+        
+        /* Device dialog parameters to be set while dialog is displayed.
+         * Not supported.
+         */
+        bool setDeviceDialogParameters(const QVariantMap &parameters);
+        
+        /* Not supported */
+        int deviceDialogError() const;
+        
+        /* Closes the device dialog */
+        void closeDeviceDialog(bool byClient);
+        
+        /* Returns a pointer to this dialog widget */
+        HbPopup *deviceDialogWidget() const;
+                
+    signals:
+        /* Signal is emitted when the dialog is closed */
+        void deviceDialogClosed();
+        
+        /* Data is emitted in QVariantMap when Ok Action button is selected */
+        void deviceDialogData(QVariantMap data);
+            
+    private slots:
+        /* Slot that is mapped to the Ok Action button's triggered signal */
+        void okPressed();
+        
+        /* Slot that is mapped to the signal that indicates to closing of the dialog */
+        void closingDialog();
+               
+    private:
+                
+        Q_DISABLE_COPY(EapFastProvNotSuccessNoteDialog)
+   
+    private:
+        /* Pointer to the Ok action button */
+        HbAction* mActionOk;
+        
+        /* Pointer to the HbTranslator */
+        QScopedPointer<HbTranslator> mTranslator;
+                
+        /* Tells whether Ok Action has already been pressed */
+        bool mOkActionPressed;
+    };
+
+#endif // __EAPFASTPROVNOTSUCCESSNOTEDIALOG_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/eapqtdialogs/inc/eapfastprovwaitnotedialog.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,74 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+#ifndef __EAPFASTPROVWAITNOTEDIALOG_H__
+#define __EAPFASTPROVWAITNOTEDIALOG_H__
+
+#include <HbTranslator>
+#include <HbNotificationDialog>
+#include <hbdevicedialoginterface.h>
+
+
+class EapFastProvWaitNoteDialog: public HbNotificationDialog, public HbDeviceDialogInterface
+    {
+    Q_OBJECT
+
+    public:
+        /* Constructor */
+        EapFastProvWaitNoteDialog(const QVariantMap &parameters);
+        
+        /* Destructor */
+        ~EapFastProvWaitNoteDialog();
+        
+        /* Function creates the actual dialog widget */
+        void createDialog(const QVariantMap &parameters );
+        
+        /* Device dialog parameters to be set while dialog is displayed.
+         * Not supported.
+         */
+        bool setDeviceDialogParameters(const QVariantMap &parameters);
+        
+        /* Not supported */
+        int deviceDialogError() const;
+        
+        /* Closes the device dialog */
+        void closeDeviceDialog(bool byClient);
+        
+        /* Returns a pointer to this dialog widget */
+        HbPopup *deviceDialogWidget() const;
+                
+    signals:
+        /* Signal is emitted when the dialog is closed */
+        void deviceDialogClosed();
+        
+        /* Data is emitted in QVariantMap when Ok Action button is selected */
+        void deviceDialogData(QVariantMap data);
+            
+    private slots:
+        
+        /* Slot that is mapped to the signal that indicates to closing of the dialog */
+        void closingDialog();
+               
+    private:
+                
+        Q_DISABLE_COPY(EapFastProvWaitNoteDialog)
+        
+        /* Pointer to the HbTranslator */
+        QScopedPointer<HbTranslator> mTranslator;
+   
+    };
+
+#endif // __EAPFASTPROVWAITNOTEDIALOG_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/eapqtdialogs/inc/eapmschapv2newpwddialog.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,103 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __EAPMSCHAPV2NEWPWDDIALOG_H__
+#define __EAPMSCHAPV2NEWPWDDIALOG_H__
+
+
+#include <HbTranslator>
+#include <HbInputDialog>
+#include <HbLineEdit>
+#include <HbAction>
+#include <hbdevicedialoginterface.h>
+
+class EapQtValidator;
+
+class EapMschapv2NewPwdDialog: public HbInputDialog, public HbDeviceDialogInterface
+    {
+    Q_OBJECT
+
+    public:
+        /* Constructor */
+        EapMschapv2NewPwdDialog(const QVariantMap &parameters);
+        /* Destructor */
+        ~EapMschapv2NewPwdDialog();
+        
+        /* Function creates the actual dialog widget */
+        void createDialog( const QVariantMap &parameters );
+        
+        /* Device dialog parameters to be set while dialog is displayed.
+         * Not supported.
+         */
+        bool setDeviceDialogParameters(const QVariantMap &parameters);
+        
+        /* Not supported */
+        int deviceDialogError() const;
+        
+        /* Closes the device dialog */
+        void closeDeviceDialog(bool byClient);
+        
+        /* Returns a pointer to this dialog widget */
+        HbPopup *deviceDialogWidget() const;
+                
+    signals:
+        /* Signal is emitted when the dialog is closed */
+        void deviceDialogClosed();
+    
+        /* Data is emitted in QVariantMap when Ok Action button is selected */
+        void deviceDialogData(QVariantMap data);
+        
+    private slots:
+        /* Slot that is mapped to the Ok Action button's triggered signal */
+        void okPressed();
+                
+        /* Slot that is mapped to the Cancel Action button's triggered signal */
+        void cancelPressed();
+        
+        /* Slot that is mapped to the signal that indicates to closing of the dialog */
+        void closingDialog();
+               
+    private:
+        
+        bool validate() const;
+        
+        Q_DISABLE_COPY(EapMschapv2NewPwdDialog)
+   
+    private:
+        /* Pointer to the line edit 1 object */
+        HbLineEdit *mEdit1;
+        
+        /* Pointer to the line edit 2 object */
+        HbLineEdit *mEdit2;
+                
+        /* Pointer to the password validator object */
+        EapQtValidator *mPwdValidator;
+        
+        /* Pointer to the Ok action button */
+        HbAction* mActionOk;
+        
+        /* Pointer to the HbTranslator */
+        QScopedPointer<HbTranslator> mTranslator;
+        
+        /* Tells whether close has already been called for the dialog */
+        bool mClose;        
+    };
+
+
+#endif // __EAPMSCHAPV2NEWPWDDIALOG_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/eapqtdialogs/inc/eapmschapv2oldpwddialog.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,99 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __EAPMSCHAPV2OLDPWDDIALOG_H__
+#define __EAPMSCHAPV2OLDPWDDIALOG_H__
+
+#include <HbTranslator>
+#include <HbInputDialog>
+#include <HbAction>
+#include <hbdevicedialoginterface.h>
+
+class EapQtValidator;
+
+class EapMschapv2OldPwdDialog: public HbInputDialog, public HbDeviceDialogInterface
+    {
+    Q_OBJECT
+
+    public:
+        /* Constructor */
+        EapMschapv2OldPwdDialog(const QVariantMap &parameters);
+        
+        /* Destructor */
+        ~EapMschapv2OldPwdDialog();
+        
+        /* Function creates the actual dialog widget */
+        void createDialog( const QVariantMap &parameters );
+        
+        /* Device dialog parameters to be set while dialog is displayed.
+         * Not supported.
+         */
+        bool setDeviceDialogParameters(const QVariantMap &parameters);
+        
+        /* Not supported */
+        int deviceDialogError() const;
+        
+        /* Closes the device dialog */
+        void closeDeviceDialog(bool byClient);
+        
+        /* Returns a pointer to this dialog widget */
+        HbPopup *deviceDialogWidget() const;
+                
+    signals:
+        /* Signal is emitted when the dialog is closed */
+        void deviceDialogClosed();
+    
+        /* Data is emitted in QVariantMap when Ok Action button is selected */
+        void deviceDialogData(QVariantMap data);
+        
+    private slots:
+        /* Slot that is mapped to the Ok Action button's triggered signal */
+        void okPressed();
+                
+        /* Slot that is mapped to the Cancel Action button's triggered signal */
+        void cancelPressed();
+        
+        /* Slot that is mapped to the signal that indicates to closing of the dialog */
+        void closingDialog();
+                       
+    private:
+         
+        bool validate() const;
+        
+        Q_DISABLE_COPY(EapMschapv2OldPwdDialog)
+    
+    private:
+        /* Pointer to the line edit object */
+        HbLineEdit *mEdit;
+                
+        /* Pointer to the password validator object */
+        EapQtValidator *mPwdValidator;
+        
+        /* Pointer to the Ok action button */
+        HbAction* mActionOk;
+        
+        /* Pointer to the HbTranslator */
+        QScopedPointer<HbTranslator> mTranslator;
+        
+        /* Tells whether close has already been called for the dialog */
+        bool mClose;
+    };
+
+
+#endif // __EAPMSCHAPV2OLDPWDDIALOG_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/eapqtdialogs/inc/eapmschapv2pwdexpirednotedialog.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,83 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+#ifndef __EAPMSCHAPV2PWDEXPNOTEDIALOG_H__
+#define __EAPMSCHAPV2PWDEXPNOTEDIALOG_H__
+
+#include <HbTranslator>
+#include <HbMessageBox>
+#include <HbAction>
+#include <hbdevicedialoginterface.h>
+
+
+
+class EapMschapv2PwdExpNoteDialog: public HbMessageBox, public HbDeviceDialogInterface
+    {
+    Q_OBJECT
+
+    public:
+        /* Constructor */
+        EapMschapv2PwdExpNoteDialog(const QVariantMap &parameters);
+        /* Destructor */
+        ~EapMschapv2PwdExpNoteDialog();
+        
+        /* Function creates the actual dialog widget */
+        void createDialog(const QVariantMap &parameters );
+        
+        /* Device dialog parameters to be set while dialog is displayed.
+         * Not supported.
+         */
+        bool setDeviceDialogParameters(const QVariantMap &parameters);
+        
+        /* Not supported */
+        int deviceDialogError() const;
+        
+        /* Closes the device dialog */
+        void closeDeviceDialog(bool byClient);
+        
+        /* Returns a pointer to this dialog widget */
+        HbPopup *deviceDialogWidget() const;
+                
+    signals:
+        /* Signal is emitted when the dialog is closed */
+        void deviceDialogClosed();
+        
+        /* Data is emitted in QVariantMap when Ok Action button is selected */
+        void deviceDialogData(QVariantMap data);
+            
+    private slots:
+        /* Slot that is mapped to the Ok Action button's triggered signal */
+        void okPressed();
+        
+        /* Slot that is mapped to the signal that indicates to closing of the dialog */
+        void closingDialog();
+               
+    private:
+                
+        Q_DISABLE_COPY(EapMschapv2PwdExpNoteDialog)
+   
+    private:
+        /* Pointer to the Ok action button */
+        HbAction* mActionOk;
+        
+        /* Pointer to the HbTranslator */
+        QScopedPointer<HbTranslator> mTranslator;
+        
+        /* Tells whether Ok Action has already been pressed */
+        bool mOkActionPressed;
+    };
+
+#endif // __EAPMSCHAPV2PWDEXPNOTEDIALOG_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/eapqtdialogs/inc/eappasswordquerydialog.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,99 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __EAPPASSWORDQUERYDIALOG_H__
+#define __EAPPASSWORDQUERYDIALOG_H__
+
+#include <HbTranslator>
+#include <HbInputDialog>
+#include <HbLineEdit>
+#include <HbAction>
+#include <hbdevicedialoginterface.h>
+
+class EapQtValidator;
+
+class EapPasswordQueryDialog: public HbInputDialog, public HbDeviceDialogInterface
+    {
+    Q_OBJECT
+
+    public:
+        /* Constructor */
+        EapPasswordQueryDialog(const QVariantMap &parameters);
+        /* Destructor */
+        ~EapPasswordQueryDialog();
+        
+        /* Function creates the actual dialog widget */
+        void createDialog( const QVariantMap &parameters );
+        
+        /* Device dialog parameters to be set while dialog is displayed.
+         * Not supported.
+         */
+        bool setDeviceDialogParameters(const QVariantMap &parameters);
+        
+        /* Not supported */
+        int deviceDialogError() const;
+        
+        /* Closes the device dialog */
+        void closeDeviceDialog(bool byClient);
+        
+        /* Returns a pointer to this dialog widget */
+        HbPopup *deviceDialogWidget() const;
+                
+    signals:
+        /* Signal is emitted when the dialog is closed */
+        void deviceDialogClosed();
+    
+        /* Data is emitted in QVariantMap when Ok Action button is selected */
+        void deviceDialogData(QVariantMap data);
+        
+    private slots:
+        /* Slot that is mapped to the Ok Action button's triggered signal */
+        void okPressed();
+                
+        /* Slot that is mapped to the Cancel Action button's triggered signal */
+        void cancelPressed();
+        
+        /* Slot that is mapped to the signal that indicates to closing of the dialog */
+        void closingDialog();
+                
+    private:
+        
+        bool validate() const;
+        
+        Q_DISABLE_COPY(EapPasswordQueryDialog)
+   
+    private:
+        /* Pointer to the line edit 1 object */
+        HbLineEdit *mEdit;
+                
+        /* Pointer to the password validator object */
+        EapQtValidator *mPwdValidator;
+        
+        /* Pointer to the Ok action button */
+        HbAction* mActionOk;
+        
+        /* Tells whether close has already been called for the dialog */
+        bool mClose;
+        
+        /* Tells whether Ok Action has already been pressed */
+        bool mOkActionPressed;
+    };
+
+
+#endif // __EAPPASSWORDQUERYDIALOG_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/eapqtdialogs/inc/eapquerydialog.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,83 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+#ifndef __EAPQUERYDIALOG_H__
+#define __EAPQUERYDIALOG_H__
+
+#include <HbTranslator>
+#include <HbMessageBox>
+#include <HbAction>
+#include <hbdevicedialoginterface.h>
+
+class EapQtValidator;
+
+class EapQueryDialog: public HbMessageBox, public HbDeviceDialogInterface
+    {
+    Q_OBJECT
+
+    public:
+        /* Constructor */
+        EapQueryDialog(const QVariantMap &parameters);
+        /* Destructor */
+        ~EapQueryDialog();
+        
+        /* Function creates the actual dialog widget */
+        void createDialog(const QVariantMap &parameters );
+        
+        /* Device dialog parameters to be set while dialog is displayed.
+         * Not supported.
+         */
+        bool setDeviceDialogParameters(const QVariantMap &parameters);
+        
+        /* Not supported */
+        int deviceDialogError() const;
+        
+        /* Closes the device dialog */
+        void closeDeviceDialog(bool byClient);
+        
+        /* Returns a pointer to this dialog widget */
+        HbPopup *deviceDialogWidget() const;
+                
+    signals:
+        /* Signal is emitted when the dialog is closed */
+        void deviceDialogClosed();
+        
+        /* Data is emitted in QVariantMap when Ok Action button is selected */
+        void deviceDialogData(QVariantMap data);
+            
+    private slots:
+        /* Slot that is mapped to the Ok Action button's triggered signal */
+        void okPressed();
+        
+        /* Slot that is mapped to the signal that indicates to closing of the dialog */
+        void closingDialog();
+               
+    private:
+                
+        Q_DISABLE_COPY(EapQueryDialog)
+   
+    private:
+        /* Pointer to the Ok action button */
+        HbAction* mActionOk;
+        
+        /* Pointer to the HbTranslator */
+        QScopedPointer<HbTranslator> mTranslator;
+        
+        /* Tells whether Ok Action has already been pressed */
+        bool mOkActionPressed;
+    };
+
+#endif // __EAPQUERYDIALOG_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/eapqtdialogs/inc/eapusernamepwddialog.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,105 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+#ifndef __EAPUSERNAMEPWDDIALOG_H__
+#define __EAPUSERNAMEPWDDIALOG_H__
+
+#include <HbTranslator>
+#include <HbInputDialog>
+#include <HbLineEdit>
+#include <HbAction>
+#include <hbdevicedialoginterface.h>
+
+class EapQtValidator;
+
+class EapUsernamePwdDialog: public HbInputDialog, public HbDeviceDialogInterface
+    {
+    Q_OBJECT
+
+    public:
+        /* Constructor */
+        EapUsernamePwdDialog(const QVariantMap &parameters);
+        /* Destructor */
+        ~EapUsernamePwdDialog();
+        
+        /* Function creates the actual dialog widget */
+        void createDialog( const QVariantMap &parameters );
+        
+        /* Device dialog parameters to be set while dialog is displayed.
+         * Not supported.
+         */
+        bool setDeviceDialogParameters(const QVariantMap &parameters);
+        
+        /* Not supported */
+        int deviceDialogError() const;
+        
+        /* Closes the device dialog */
+        void closeDeviceDialog(bool byClient);
+        
+        /* Returns a pointer to this dialog widget */
+        HbPopup *deviceDialogWidget() const;
+        
+    signals:
+        /* Signal is emitted when the dialog is closed */
+        void deviceDialogClosed();
+    
+        /* Data is emitted in QVariantMap when Ok Action button is selected */
+        void deviceDialogData(QVariantMap data);
+        
+    private slots:
+        /* Slot that is mapped to the Ok Action button's triggered signal */
+        void okPressed();
+                
+        /* Slot that is mapped to the Cancel Action button's triggered signal */
+        void cancelPressed();
+        
+        /* Slot that is mapped to the signal that indicates to closing of the dialog */
+        void closingDialog();
+               
+    private:
+        
+        bool validate() const;
+        
+        Q_DISABLE_COPY(EapUsernamePwdDialog)
+   
+    private:
+        /* Pointer to the line edit 1 object */
+        HbLineEdit *mEdit1;
+        
+        /* Pointer to the line edit 2 object */
+        HbLineEdit *mEdit2;
+        
+        /* Pointer to the user name validator object */
+        EapQtValidator *mUnameValidator;
+                
+        /* Pointer to the password validator object */
+        EapQtValidator *mPwdValidator;
+                
+        /* Pointer to the HbTranslator */
+        QScopedPointer<HbTranslator> mTranslator;
+        
+        /* Tells whether close has already been called for the dialog */
+        bool mClose;
+        
+        /* Tells whether Ok Action has already been pressed */
+        bool mOkActionPressed;
+    };
+
+
+#endif // __EAPUSERNAMEPWDDIALOG_H__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/eapqtdialogs/rom/eapdialogplugin.iby	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ * 
+ */
+ 
+#ifndef __EAPDIALOGPLUGIN_IBY__
+#define __EAPDIALOGPLUGIN_IBY__
+
+#include <bldvariant.hrh>
+
+#define HB_PLUGIN_STUB(NAME, SUBDIR) data=\epoc32\data\z\resource\plugins\##SUBDIR##\##NAME##.qtplugin RESOURCE_FILES_DIR\plugins\##SUBDIR##\##NAME##.qtplugin
+
+file=ABI_DIR\BUILD_DIR\EapDialogPlugin.dll                  SHARED_LIB_DIR\eapdialogplugin.dll
+HB_PLUGIN_STUB(eapdialogplugin, devicedialogs)
+
+#endif
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/eapqtdialogs/rom/eapdialogplugin_resources.iby	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ * 
+ */
+
+#ifndef EAPDIALOGPLUGIN_RESOURCES_IBY
+#define EAPDIALOGPLUGIN_RESOURCES_IBY
+
+#include <bldvariant.hrh>
+#include <data_caging_paths_for_iby.hrh> 
+
+#ifdef __PROTOCOL_WLAN
+
+data=DATAZ_/QT_TRANSLATIONS_DIR/eapprompts.qm QT_TRANSLATIONS_DIR/eapprompts.qm 
+
+#endif // __PROTOCOL_WLAN
+
+#endif // EAPDIALOGPLUGIN_RESOURCES_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/eapqtdialogs/src/eapdialogplugin.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,170 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Prompt Dialog plugin implementation
+*
+*/
+
+
+#include <hbdevicedialoginterface.h>
+#include <QVariantMap>
+#include "eapdialogplugin.h"
+#include "eapusernamepwddialog.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#endif
+
+
+Q_EXPORT_PLUGIN2(eapdialogplugin, EapDialogPlugin)
+
+
+// This plugin implements one device dialog type
+static const struct {
+    const char *mTypeString;
+} dialogInfos[] = {
+    {"com.nokia.eap.usernamepassworddialog/1.0"},
+    {"com.nokia.eap.querydialog/1.0"},
+    {"com.nokia.eap.passwordquerydialog/1.0"},
+    {"com.nokia.eap.fastinstallpacquerydialog/1.0"},
+    {"com.nokia.eap.fastpacstorepwquerydialog/1.0"},
+    {"com.nokia.eap.fastcreatemasterkeyquerydialog/1.0"},
+    {"com.nokia.eap.fastpacfilepwquerydialog/1.0"},
+    {"com.nokia.eap.fastprovwaitnotedialog/1.0"},
+    {"com.nokia.eap.mschapv2passwordexpirednotedialog/1.0"},
+    {"com.nokia.eap.mschapv2oldpassworddialog/1.0"},
+    {"com.nokia.eap.mschapv2newpassworddialog/1.0"},
+    {"com.nokia.eap.fastshowprovnotsuccessnotedialog/1.0"}
+};
+
+/**
+ * Constructor
+ */ 
+EapDialogPlugin::EapDialogPlugin()
+{
+    OstTraceFunctionEntry0( EAPDIALOGPLUGIN_EAPDIALOGPLUGIN_ENTRY );
+    qDebug("EapDialogPlugin::EapDialogPlugin");
+        
+    OstTraceFunctionExit0( EAPDIALOGPLUGIN_EAPDIALOGPLUGIN_EXIT );
+}
+
+/**
+ * Destructor
+ */ 
+EapDialogPlugin::~EapDialogPlugin()
+{
+    OstTraceFunctionEntry0( DUP1_EAPDIALOGPLUGIN_DEAPDIALOGPLUGIN_ENTRY );
+      
+    OstTraceFunctionExit0( EAPDIALOGPLUGIN_DEAPDIALOGPLUGIN_EXIT );
+}
+
+/**
+ * Create device dialog widget
+ */ 
+HbDeviceDialogInterface *EapDialogPlugin::createDeviceDialog(
+    const QString &deviceDialogType,
+    const QVariantMap &parameters)
+{  
+    OstTraceFunctionEntry0( EAPDIALOGPLUGIN_CREATEDEVICEDIALOG_ENTRY );
+    qDebug("EapDialogPlugin::createDeviceDialog ENTER");
+        
+    if ( deviceDialogType.compare("com.nokia.eap.usernamepassworddialog/1.0") == 0 ) 
+        {
+        qDebug("EapDialogPlugin::createDeviceDialog: new EapUsernamePwdDialog");
+        return ( new EapUsernamePwdDialog(parameters) );
+        }
+    else 
+        {
+        qDebug("EapDialogPlugin::createDeviceDialog: ELSE --> ERRORISMO");
+        }       
+    OstTraceFunctionExit0( EAPDIALOGPLUGIN_CREATEDEVICEDIALOG_EXIT );
+    qDebug("EapDialogPlugin::createDeviceDialog EXIT");
+    
+    return NULL;
+}
+
+/**
+ * Check if client is allowed to use device dialog widget
+ */
+bool EapDialogPlugin::accessAllowed(const QString &deviceDialogType,
+    const QVariantMap &parameters, const QVariantMap &securityInfo) const
+{
+    OstTraceFunctionEntry0( EAPDIALOGPLUGIN_ACCESSALLOWED_ENTRY );
+    
+    Q_UNUSED(deviceDialogType)
+    Q_UNUSED(parameters)
+    Q_UNUSED(securityInfo)
+
+    // This plugin doesn't perform operations that may compromise security.
+    // All clients are allowed to use.
+    return true;
+}
+
+/**
+ * Return information of device dialog the plugin creates
+ */ 
+bool EapDialogPlugin::deviceDialogInfo(const QString &deviceDialogType,
+    const QVariantMap &parameters, DeviceDialogInfo *info) const
+{
+    OstTraceFunctionEntry0( EAPDIALOGPLUGIN_DEVICEDIALOGINFO_ENTRY );
+    qDebug("EapDialogPlugin::deviceDialogInfo");
+    
+    Q_UNUSED(parameters)
+    Q_UNUSED(deviceDialogType)
+    
+    info->group = GenericDeviceDialogGroup;
+    info->flags = NoDeviceDialogFlags;
+    info->priority = DefaultPriority;
+    
+    OstTraceFunctionExit0( EAPDIALOGPLUGIN_DEVICEDIALOGINFO_EXIT );
+    qDebug("EapDialogPlugin::deviceDialogInfo EXIT");
+    return true;
+}
+
+/**
+ * Return device dialog types this plugin implements
+ */ 
+QStringList EapDialogPlugin::deviceDialogTypes() const
+{
+    OstTraceFunctionEntry0( EAPDIALOGPLUGIN_DEVICEDIALOGTYPES_ENTRY );
+    qDebug("EapDialogPlugin::deviceDialogTypes");
+    
+    QStringList types;
+    const int numTypes = sizeof(dialogInfos) / sizeof(dialogInfos[0]);
+    for(int i = 0; i < numTypes; i++) {
+        types.append(dialogInfos[i].mTypeString);
+    }
+    
+    OstTraceFunctionExit0( EAPDIALOGPLUGIN_DEVICEDIALOGTYPES_EXIT );
+    return types;
+}
+
+/**
+ * Return plugin flags
+ */ 
+EapDialogPlugin::PluginFlags EapDialogPlugin::pluginFlags() const
+{
+    OstTraceFunctionEntry0( EAPDIALOGPLUGIN_PLUGINFLAGS_ENTRY );   
+    OstTraceFunctionExit0( EAPDIALOGPLUGIN_PLUGINFLAGS_EXIT );
+    return NoPluginFlags;
+}
+
+/**
+ * The last error is not stored, not supported
+ */ 
+int EapDialogPlugin::error() const
+{
+    OstTraceFunctionEntry0( EAPDIALOGPLUGIN_ERROR_ENTRY );
+    OstTraceFunctionExit0( EAPDIALOGPLUGIN_ERROR_EXIT );
+    return 0;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/eapqtdialogs/src/eapfastcreatemasterkeyquerydialog.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,268 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Prompt Dialog implementation
+*
+*/
+
+#include <HbMessageBox>
+#include <eapqtvalidator.h>
+#include <eapqtexpandedeaptype.h>
+#include <eapqtconfiginterface.h>
+#include <eapqtconfig.h>
+#include "eapfastcreatemasterkeyquerydialog.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#endif
+
+
+/**
+ * The constructor
+ */
+EapFastCreateMasterKeyQueryDialog::EapFastCreateMasterKeyQueryDialog(const QVariantMap &parameters) 
+ :mEdit1(NULL), 
+  mEdit2(NULL), 
+  mPwdValidator(NULL),
+  mActionOk(NULL),
+  mTranslator(new HbTranslator("eapprompts"))
+{
+    OstTraceFunctionEntry0( EAPFASTCREATEMASTERKEYQUERYDIALOG_EAPFASTCREATEMASTERKEYQUERYDIALOG_ENTRY );
+    qDebug("EapFastCreateMasterKeyQueryDialog::EapFastCreateMasterKeyQueryDialog ENTER");
+       
+    createDialog(parameters);
+    
+    mClose = false;
+    mOkActionPressed = false;
+    
+    OstTraceFunctionExit0( EAPFASTCREATEMASTERKEYQUERYDIALOG_EAPFASTCREATEMASTERKEYQUERYDIALOG_EXIT );
+    qDebug("EapFastCreateMasterKeyQueryDialog::EapFastCreateMasterKeyQueryDialog EXIT");
+}
+    
+/**
+ * The construction of the dialog
+ */ 
+void EapFastCreateMasterKeyQueryDialog::createDialog(const QVariantMap &parameters )
+{
+    OstTraceFunctionEntry0( EAPFASTCREATEMASTERKEYQUERYDIALOG_CREATEDIALOG_ENTRY );
+    qDebug("EapFastCreateMasterKeyQueryDialog::createDialog ENTER");
+    
+    Q_UNUSED(parameters)
+    
+    QString labelText1 = QString(hbTrId("txt_occ_dialog_create_password_for_encrypted_pac_s"));
+    QString labelText2 = QString(hbTrId("txt_occ_dialog_verify_password"));
+        
+    //Set the dialog to be on the screen until user reacts
+    //by pressing any of the Action buttons
+    this->setModal(true);
+    this->setTimeout(HbPopup::NoTimeout);
+    this->setDismissPolicy(HbPopup::NoDismiss);    
+    this->setAdditionalRowVisible(true);
+    
+    this->setPromptText(labelText1, 0);   
+    mEdit1 = this->lineEdit(0);
+    mEdit1->setEchoMode(HbLineEdit::Password);
+    
+    this->setPromptText(labelText2, 1);   
+    mEdit2 = this->lineEdit(1);        
+    mEdit2->setEchoMode(HbLineEdit::Password);
+    
+    EapQtConfigInterface eap_config_if;
+    
+    mPwdValidator = eap_config_if.validatorEap(EapQtExpandedEapType::TypeEapFast,
+                EapQtConfig::Password);  
+    mPwdValidator->updateEditor(mEdit1);
+    
+    QList<QAction*> action_list = this->actions();
+        
+    for ( int i = 0; i < action_list.count(); i++ ) {
+        this->removeAction(action_list.at(i));
+        } 
+    
+    mActionOk = new HbAction(hbTrId("txt_common_button_ok"),this); 
+    this->addAction(mActionOk);
+    
+    HbAction* actionCancel = new HbAction(hbTrId("txt_common_button_cancel"),this);
+    this->addAction(actionCancel);    
+     
+    disconnect(mActionOk, SIGNAL(triggered()),this, SLOT(close()));
+    bool connected = connect(mActionOk, SIGNAL(triggered()), this, SLOT(okPressed()));
+    Q_ASSERT(connected == true);
+    
+    disconnect(actionCancel, SIGNAL(triggered()),this, SLOT(close()));
+    connected = connect(actionCancel, SIGNAL(triggered()), this, SLOT(cancelPressed()));
+    Q_ASSERT(connected == true);
+    
+    // Connect the about to close and hide signals, so that we are able to inform 
+    // the caller that the dialog was closed   
+    connected = connect(this, SIGNAL(aboutToClose()), this, SLOT(closingDialog()));
+    Q_ASSERT(connected == true);
+    connected = connect(this, SIGNAL(aboutToHide()), this, SLOT(closingDialog()));
+    Q_ASSERT(connected == true);
+   
+    OstTraceFunctionExit0( DUP1_EAPFASTCREATEMASTERKEYQUERYDIALOG_CREATEDIALOG_EXIT );
+    qDebug("EapFastCreateMasterKeyQueryDialog::createDialog EXIT");
+}
+
+/**
+ * Destructor
+ */
+EapFastCreateMasterKeyQueryDialog::~EapFastCreateMasterKeyQueryDialog()
+{
+    OstTraceFunctionEntry0( EAPFASTCREATEMASTERKEYQUERYDIALOG_DEAPFASTCREATEMASTERKEYQUERYDIALOG_ENTRY );
+    qDebug("EapFastCreateMasterKeyQueryDialog::~EapFastCreateMasterKeyQueryDialog");
+    
+    //The dialog widgets are deleted as the dialog is deleted
+    delete mPwdValidator;
+    
+    OstTraceFunctionExit0( EAPFASTCREATEMASTERKEYQUERYDIALOG_DEAPFASTCREATEMASTERKEYQUERYDIALOG_EXIT );
+}
+
+/**
+ * Line edit validator
+ */
+bool EapFastCreateMasterKeyQueryDialog::validate() const
+{
+    qDebug("EapFastCreateMasterKeyQueryDialog::validate");
+    
+    bool valid = false;
+    
+    EapQtValidator::Status test_status = mPwdValidator->validate(mEdit1->text());
+    
+    if ( mPwdValidator->validate(mEdit1->text())== EapQtValidator::StatusOk &&
+        mEdit1->text() == mEdit2->text()) {
+        qDebug("EapFastCreateMasterKeyQueryDialog::validate: ret val: TRUE");
+        valid = true;
+    }
+    return valid;
+}
+
+/**
+ * Function is called when the Ok Action button is pressed
+ */
+void EapFastCreateMasterKeyQueryDialog::okPressed()
+{
+    OstTraceFunctionEntry0( EAPFASTCREATEMASTERKEYQUERYDIALOG_FIRSTBUTTONPRESSED_ENTRY );
+    qDebug("EapFastCreateMasterKeyQueryDialog::okPressed ENTER");
+    
+    if ( validate() == true ) {
+         
+            QVariantMap data;
+    
+            QString editStr1 = mEdit1->text();
+         
+            QVariant variant1(editStr1);
+   
+            data["password"] = variant1;
+      
+            qDebug("EapFastCreateMasterKeyQueryDialog::okPressed: emit deviceDialogData");
+    
+            emit deviceDialogData(data); 
+            closeDeviceDialog(true);
+        }
+    else {
+        HbMessageBox *box = 
+            new HbMessageBox(hbTrId("txt_occ_info_passwords_do_not_match_try_again"),
+            HbMessageBox::MessageTypeInformation);
+        box->setAttribute(Qt::WA_DeleteOnClose);
+        box->open();       
+        }
+    OstTraceFunctionExit0( EAPFASTCREATEMASTERKEYQUERYDIALOG_FIRSTBUTTONPRESSED_EXIT );
+    qDebug("EapFastCreateMasterKeyQueryDialog::okPressed EXIT");
+}
+
+/**
+ * Function is called when the Cancel Action button is pressed
+ */
+void EapFastCreateMasterKeyQueryDialog::cancelPressed()
+{
+    OstTraceFunctionEntry0( EAPFASTCREATEMASTERKEYQUERYDIALOG_CANCELPRESSED_ENTRY );
+    qDebug("EapFastCreateMasterKeyQueryDialog::cancelPressed ENTER");
+    
+    if (!mClose) {
+        mClose = true;
+        closeDeviceDialog(true);
+    }   
+    qDebug("EapFastCreateMasterKeyQueryDialog::cancelPressed EXIT");
+    OstTraceFunctionExit0( EAPFASTCREATEMASTERKEYQUERYDIALOG_CANCELPRESSED_EXIT );
+}
+
+/**
+ * Function is called when the dialog is about to close
+ * 
+ */
+void EapFastCreateMasterKeyQueryDialog::closingDialog()
+{
+    OstTraceFunctionEntry0( EAPFASTCREATEMASTERKEYQUERYDIALOG_CLOSINGDIALOG_ENTRY );
+    qDebug("EapFastCreateMasterKeyQueryDialog::closingDialog ENTER");
+ 
+    closeDeviceDialog(false);
+    
+    qDebug("EapFastCreateMasterKeyQueryDialog::closingDialog EXIT");
+    OstTraceFunctionExit0( EAPFASTCREATEMASTERKEYQUERYDIALOG_CLOSINGDIALOG_EXIT );
+}
+
+/**
+ * Updating the dialog during its showing is not allowed.
+ */ 
+bool EapFastCreateMasterKeyQueryDialog::setDeviceDialogParameters
+                (const QVariantMap &parameters)
+{
+    OstTraceFunctionEntry0( EAPFASTCREATEMASTERKEYQUERYDIALOG_SETDEVICEDIALOGPARAMETERS_ENTRY );
+    
+    Q_UNUSED(parameters)
+    // changing the dialog after presenting it is not supported.
+    
+    OstTraceFunctionExit0( EAPFASTCREATEMASTERKEYQUERYDIALOG_SETDEVICEDIALOGPARAMETERS_EXIT );
+    return true;
+}
+
+/**
+ * Not supported, 0 always returned
+ */
+int EapFastCreateMasterKeyQueryDialog::deviceDialogError() const
+{
+    OstTraceFunctionEntry0( EAPFASTCREATEMASTERKEYQUERYDIALOG_DEVICEDIALOGERROR_ENTRY );
+    OstTraceFunctionExit0( EAPFASTCREATEMASTERKEYQUERYDIALOG_DEVICEDIALOGERROR_EXIT);
+    return 0;
+}
+
+/**
+ * Dialog is closed and the signal about closing is emitted
+ */
+void EapFastCreateMasterKeyQueryDialog::closeDeviceDialog(bool byClient)
+{   
+    OstTraceFunctionEntry0( EAPFASTCREATEMASTERKEYQUERYDIALOG_CLOSEDEVICEDIALOG_ENTRY );
+    qDebug("EapFastCreateMasterKeyQueryDialog::closeDeviceDialog ENTER");
+        
+    //If the user closes the dialog, then the deviceDialogClosed is emitted
+    if ( byClient == true )
+        {
+        qDebug("EapFastCreateMasterKeyQueryDialog::closeDeviceDialog: emit deviceDialogClosed");
+        emit deviceDialogClosed();
+        }
+    
+    qDebug("EapFastCreateMasterKeyQueryDialog::closeDeviceDialog EXIT");
+    OstTraceFunctionExit0( EAPFASTCREATEMASTERKEYQUERYDIALOG_CLOSEDEVICEDIALOG_EXIT );
+}
+
+/**
+ * This dialog widget is returned to the caller
+ */
+HbPopup *EapFastCreateMasterKeyQueryDialog::deviceDialogWidget() const
+{
+    OstTraceFunctionEntry0( EAPFASTCREATEMASTERKEYQUERYDIALOG_DEVICEDIALOGWIDGET_ENTRY );
+    OstTraceFunctionExit0( EAPFASTCREATEMASTERKEYQUERYDIALOG_DEVICEDIALOGWIDGET_EXIT );
+    
+    return const_cast<EapFastCreateMasterKeyQueryDialog*>(this);
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/eapqtdialogs/src/eapfastinstallpacquerydialog.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,230 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Prompt Dialog implementation
+*
+*/
+
+#include "eapfastinstallpacquerydialog.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#endif
+
+// The index numbers of the button of the dialog
+const int yesButtonIndex = 1;
+
+/**
+ * The constructor
+ */
+EapFastInstallPacQueryDialog::EapFastInstallPacQueryDialog(const QVariantMap &parameters)
+:HbMessageBox("default text...",HbMessageBox::MessageTypeQuestion),
+mActionYes(NULL),
+mTranslator(new HbTranslator("eapprompts"))
+{
+    OstTraceFunctionEntry0( EAPGTCQUERYDIALOG_EAPGTCQUERYDIALOG_ENTRY );
+    qDebug("EapFastInstallPacQueryDialog::EapFastInstallPacQueryDialog ENTER");
+        
+    createDialog( parameters );
+    
+    mClose = false;
+    mYesActionPressed = false;
+    
+    OstTraceFunctionExit0( EAPGTCQUERYDIALOG_EAPGTCQUERYDIALOG_EXIT );
+    qDebug("EapFastInstallPacQueryDialog::EapFastInstallPacQueryDialog EXIT");
+}
+    
+/**
+ * The construction of the dialog
+ */ 
+void EapFastInstallPacQueryDialog::createDialog(const QVariantMap &parameters )
+{
+    OstTraceFunctionEntry0( EAPGTCQUERYDIALOG_CREATEDIALOG_ENTRY );
+    qDebug("EapFastInstallPacQueryDialog::createDialog ENTER");
+         
+    QString servername = QString("foobar");
+    QString key = QString("pacservername");
+       
+    if ( parameters.empty() == false ) {
+        if ( parameters.contains(key) ) {
+            QVariant variant = parameters.value(key);
+            servername = variant.toString();
+            }
+        }  
+    
+    QString mainText = QString(hbTrId("txt_occ_info_install_pac_from_server_1").arg(servername));
+    
+    //Set the dialog to be on the screen until user reacts
+    //by pressing any of the Action buttons
+    this->setModal(true);
+    this->setTimeout(HbPopup::NoTimeout);
+    this->setDismissPolicy(HbPopup::NoDismiss);
+               
+    this->setText(mainText);    
+    this->setIconVisible(true);
+        
+    QList<QAction*> action_list = this->actions();
+        
+    for ( int i = 0; i < action_list.count(); i++ ) {
+        this->removeAction(action_list.at(i));
+        }
+    
+    mActionYes = new HbAction(hbTrId("txt_common_button_yes"),this); 
+    this->addAction(mActionYes);
+    
+    HbAction* actionNo = new HbAction(hbTrId("txt_common_button_no"),this);
+    this->addAction(actionNo);    
+    
+    disconnect(mActionYes, SIGNAL(triggered()),this, SLOT(close()));
+    bool connected = connect(mActionYes, SIGNAL(triggered()), this, SLOT(yesPressed()));
+    Q_ASSERT(connected == true);
+    
+    disconnect(actionNo, SIGNAL(triggered()),this, SLOT(close()));
+    connected = connect(actionNo, SIGNAL(triggered()), this, SLOT(noPressed()));
+    Q_ASSERT(connected == true);
+        
+    // Connect the about to close and hide signals, so that we are able to inform 
+    // the caller that the dialog was closed    
+    connected = connect(this, SIGNAL(aboutToClose()), this, SLOT(closingDialog()));
+    Q_ASSERT(connected == true);
+    connected = connect(this, SIGNAL(aboutToHide()), this, SLOT(closingDialog()));
+    Q_ASSERT(connected == true);
+   
+    OstTraceFunctionExit0( DUP1_EAPGTCQUERYDIALOG_CREATEDIALOG_EXIT );
+    qDebug("EapFastInstallPacQueryDialog::createDialog EXIT");
+}
+
+/**
+ * Destructor
+ */
+EapFastInstallPacQueryDialog::~EapFastInstallPacQueryDialog()
+{
+    OstTraceFunctionEntry0( EAPGTCQUERYDIALOG_DEAPGTCQUERYDIALOG_ENTRY );
+    
+    // The dialog widgets are deleted as the dialog is deleted
+    
+    OstTraceFunctionExit0( EAPGTCQUERYDIALOG_DEAPGTCQUERYDIALOG_EXIT );
+}
+
+/**
+ * Function is called when the Yes Action button is pressed
+ */
+void EapFastInstallPacQueryDialog::yesPressed()
+{
+    OstTraceFunctionEntry0( EAPFASTINSTALLPACQUERYDIALOG_YESBUTTONPRESSED_ENTRY );
+    qDebug("EapFastInstallPacQueryDialog::yesPressed ENTER");
+    
+    if ( mYesActionPressed == false ) {
+        
+         mYesActionPressed = true;
+            
+         QVariantMap data;
+         QVariant variant(yesButtonIndex);
+         data.insert("yesbutton", variant);
+         // emit the data of the selected button and close the dialog
+         qDebug("EapFastInstallPacQueryDialog::yesPressed: emit deviceDialogData");
+         emit deviceDialogData(data);   
+         closeDeviceDialog(true);
+    }
+    OstTraceFunctionExit0( EAPFASTINSTALLPACQUERYDIALOG_YESBUTTONPRESSED_EXIT );
+    qDebug("EapFastInstallPacQueryDialog::yesPressed EXIT");
+}
+
+/**
+ * Function is called when the No Action button is pressed
+ */
+void EapFastInstallPacQueryDialog::noPressed()
+{
+    OstTraceFunctionEntry0( EAPFASTINSTALLPACQUERYDIALOG_NOPRESSED_ENTRY );
+    qDebug("EapFastInstallPacQueryDialog::noPressed ENTER");
+    
+    if (!mClose) {
+        mClose = true;
+        closeDeviceDialog(true);
+    }   
+    qDebug("EapFastInstallPacQueryDialog::noPressed EXIT");
+    OstTraceFunctionExit0( EAPFASTINSTALLPACQUERYDIALOG_NOPRESSED_EXIT );
+}
+
+/**
+ * Function is called when the dialog is about to close
+ * 
+ */
+void EapFastInstallPacQueryDialog::closingDialog()
+{
+    OstTraceFunctionEntry0( EAPFASTINSTALLPACQUERYDIALOG_CLOSINGDIALOG_ENTRY );
+    qDebug("EapFastInstallPacQueryDialog::closingDialog ENTER");
+ 
+    closeDeviceDialog(false);
+    
+    qDebug("EapFastInstallPacQueryDialog::closingDialog EXIT");
+    OstTraceFunctionExit0( EAPFASTINSTALLPACQUERYDIALOG_CLOSINGDIALOG_EXIT );
+}
+
+/**
+ * Updating the dialog during its showing is not allowed.
+ */ 
+bool EapFastInstallPacQueryDialog::setDeviceDialogParameters
+                (const QVariantMap &parameters)
+{
+    OstTraceFunctionEntry0( EAPFASTINSTALLPACQUERYDIALOG_SETDEVICEDIALOGPARAMETERS_ENTRY );
+    
+    Q_UNUSED(parameters)
+    // changing the dialog after presenting it is not supported.
+    
+    OstTraceFunctionExit0( EAPFASTINSTALLPACQUERYDIALOG_SETDEVICEDIALOGPARAMETERS_EXIT );
+    return true;
+}
+
+/**
+ * Not supported, 0 always returned
+ */
+int EapFastInstallPacQueryDialog::deviceDialogError() const
+{
+    OstTraceFunctionEntry0( EAPFASTINSTALLPACQUERYDIALOG_DEVICEDIALOGERROR_ENTRY );
+    OstTraceFunctionExit0( EAPFASTINSTALLPACQUERYDIALOG_DEVICEDIALOGERROR_EXIT);
+    return 0;
+}
+
+/**
+ * Dialog is closed and the signal about closing is emitted
+ */
+void EapFastInstallPacQueryDialog::closeDeviceDialog(bool byClient)
+{   
+    OstTraceFunctionEntry0( EAPFASTINSTALLPACQUERYDIALOG_CLOSEDEVICEDIALOG_ENTRY );
+    qDebug("EapFastInstallPacQueryDialog::closeDeviceDialog ENTER");
+            
+    //If the user closes the dialog, then the deviceDialogClosed is emitted
+    if ( byClient == true )
+        {
+        qDebug("EapFastInstallPacQueryDialog::closeDeviceDialog: emit deviceDialogClosed");
+        emit deviceDialogClosed();
+        }
+    
+    qDebug("EapFastInstallPacQueryDialog::closeDeviceDialog EXIT");
+    OstTraceFunctionExit0( EAPFASTINSTALLPACQUERYDIALOG_CLOSEDEVICEDIALOG_EXIT );
+}
+
+/**
+ * This dialog widget is returned to the caller
+ */
+HbPopup *EapFastInstallPacQueryDialog::deviceDialogWidget() const
+{
+    OstTraceFunctionEntry0( EAPFASTINSTALLPACQUERYDIALOG_DEVICEDIALOGWIDGET_ENTRY );
+    qDebug("EapFastInstallPacQueryDialog::deviceDialogWidget ENTER");
+    
+    qDebug("EapFastInstallPacQueryDialog::deviceDialogWidget EXIT");
+    OstTraceFunctionExit0( EAPFASTINSTALLPACQUERYDIALOG_DEVICEDIALOGWIDGET_EXIT );
+    
+    return const_cast<EapFastInstallPacQueryDialog*>(this);
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/eapqtdialogs/src/eapfastpacfilepwquerydialog.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,268 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Prompt Dialog implementation
+*
+*/
+
+
+#include <HbMessageBox>
+#include <eapqtvalidator.h>
+#include <eapqtexpandedeaptype.h>
+#include <eapqtconfiginterface.h>
+#include <eapqtconfig.h>
+#include "eapfastpacfilepwquerydialog.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#endif
+
+
+/**
+ * The constructor
+ */
+EapFastPacFilePwQueryDialog::EapFastPacFilePwQueryDialog(const QVariantMap &parameters) 
+ :mEdit(NULL), 
+ mPwdValidator(NULL),
+ mActionOk(NULL),
+ mTranslator(new HbTranslator("eapprompts"))
+{
+    OstTraceFunctionEntry0( EAPFASTPACFILEQUERYDIALOG_EAPFASTPACFILEQUERYDIALOG_ENTRY );
+    qDebug("EapFastPacFilePwQueryDialog::EapFastPacFilePwQueryDialog ENTER");
+        
+    createDialog(parameters);
+    
+    mClose = false;
+    
+    OstTraceFunctionExit0( EAPFASTPACFILEQUERYDIALOG_EAPFASTPACFILEQUERYDIALOG_EXIT );
+    qDebug("EapFastPacFilePwQueryDialog::EapFastPacFilePwQueryDialog EXIT");
+}
+    
+/**
+ * The construction of the dialog
+ */ 
+void EapFastPacFilePwQueryDialog::createDialog(const QVariantMap &parameters )
+{
+    OstTraceFunctionEntry0( EAPFASTPACFILEQUERYDIALOG_CREATEDIALOG_ENTRY );
+    qDebug("EapFastPacFilePwQueryDialog::createDialog ENTER");
+    
+    QString filename = QString("foobar"); //default        
+    QString key = QString("pacfilename");
+       
+    if ( parameters.empty() == false ) {
+        if ( parameters.contains(key) ) {
+            QVariant variant = parameters.value(key);
+            filename = variant.toString();
+            }
+        }  
+
+    QString mainText = 
+        QString(hbTrId("txt_occ_dialog_pac_file_password_for_1").arg(filename));
+    
+    // Set the dialog to be on the screen for 60 seconds, unless
+    // the user reacts earlier
+    this->setModal(true);
+    this->setTimeout(60000);
+    this->setDismissPolicy(HbPopup::NoDismiss);
+    this->setPromptText(mainText, 0);   
+    mEdit = this->lineEdit(0);
+    mEdit->setEchoMode(HbLineEdit::Password);
+      
+    EapQtConfigInterface eap_config_if;
+        
+    mPwdValidator = eap_config_if.validatorEap(EapQtExpandedEapType::TypeEapFast, 
+                EapQtConfig::PacStorePasswordConfirmation);    
+    mPwdValidator->updateEditor(mEdit);
+        
+    QList<QAction*> action_list = this->actions();
+        
+    for ( int i = 0; i < action_list.count(); i++ ) {
+        this->removeAction(action_list.at(i));
+        } 
+    
+    mActionOk = new HbAction(hbTrId("txt_common_button_ok"),this); 
+    this->addAction(mActionOk);
+    
+    HbAction* actionCancel = new HbAction(hbTrId("txt_common_button_cancel"),this);
+    this->addAction(actionCancel);    
+     
+    disconnect(mActionOk, SIGNAL(triggered()),this, SLOT(close()));
+    bool connected = connect(mActionOk, SIGNAL(triggered()), this, SLOT(okPressed()));
+    Q_ASSERT(connected == true);
+    
+    disconnect(actionCancel, SIGNAL(triggered()),this, SLOT(close()));
+    connected = connect(actionCancel, SIGNAL(triggered()), this, SLOT(cancelPressed()));
+    Q_ASSERT(connected == true);
+    
+    // Connect the about to close and hide signals, so that we are able to inform 
+    // the caller that the dialog was closed   
+    connected = connect(this, SIGNAL(aboutToClose()), this, SLOT(closingDialog()));
+    Q_ASSERT(connected == true);
+    connected = connect(this, SIGNAL(aboutToHide()), this, SLOT(closingDialog()));
+    Q_ASSERT(connected == true);
+   
+    OstTraceFunctionExit0( DUP1_EAPFASTPACFILEQUERYDIALOG_CREATEDIALOG_EXIT );
+    qDebug("EapFastPacFilePwQueryDialog::createDialog EXIT");
+}
+
+/**
+ * Destructor
+ */
+EapFastPacFilePwQueryDialog::~EapFastPacFilePwQueryDialog()
+{
+    OstTraceFunctionEntry0( EAPFASTPACFILEQUERYDIALOG_DEAPFASTPACFILEQUERYDIALOG_ENTRY );
+    
+    // The dialog widgets are deleted as the dialog is deleted        
+    delete mPwdValidator;
+    
+    OstTraceFunctionExit0( EAPFASTPACFILEQUERYDIALOG_DEAPFASTPACFILEQUERYDIALOG_EXIT );
+}
+
+/**
+ * Line edit validator
+ */
+bool EapFastPacFilePwQueryDialog::validate() const
+{
+    qDebug("EapFastPacFilePwQueryDialog::validate");
+    
+    bool valid = false;
+
+    if ( mPwdValidator->validate(mEdit->text())== EapQtValidator::StatusOk ) {
+        qDebug("EapFastPacFilePwQueryDialog::validate: returns TRUE");
+        valid = true;
+    }
+    return valid;
+}
+
+/**
+ * Function is called when the Ok Action button is pressed
+ */
+void EapFastPacFilePwQueryDialog::okPressed()
+{
+    OstTraceFunctionEntry0( EAPFASTPACFILEQUERYDIALOG_FIRSTBUTTONPRESSED_ENTRY );
+    qDebug("EapFastPacFilePwQueryDialog::okPressed ENTER");
+    
+    if ( validate() == true ) {
+            
+        QVariantMap data;
+    
+        QString editStr = mEdit->text();
+            
+        QVariant variant(editStr);    
+        
+        data["password"] = variant;
+      
+        qDebug("EapFastPacFilePwQueryDialog::okPressed: emit deviceDialogData");
+    
+        emit deviceDialogData(data); 
+        closeDeviceDialog(true);
+        }
+    else {
+        HbMessageBox *box = 
+            new HbMessageBox(
+            hbTrId("txt_occ_info_incorrect_password_msg_box"),
+            HbMessageBox::MessageTypeInformation);
+        
+        box->setAttribute(Qt::WA_DeleteOnClose);
+        box->open();       
+        }
+        
+    OstTraceFunctionExit0( EAPFASTPACFILEQUERYDIALOG_FIRSTBUTTONPRESSED_EXIT );
+    qDebug("EapFastPacFilePwQueryDialog::okPressed EXIT");
+}
+
+/**
+ * Function is called when the Cancel Action button is pressed
+ */
+void EapFastPacFilePwQueryDialog::cancelPressed()
+{
+    OstTraceFunctionEntry0( EAPFASTPACFILEQUERYDIALOG_CANCELPRESSED_ENTRY );
+    qDebug("EapFastPacFilePwQueryDialog::cancelPressed ENTER");
+    
+    if (!mClose) {
+        mClose = true;
+        closeDeviceDialog(true);
+    }   
+    qDebug("EapFastPacFilePwQueryDialog::cancelPressed EXIT");
+    OstTraceFunctionExit0( EAPFASTPACFILEQUERYDIALOG_CANCELPRESSED_EXIT );
+}
+
+/**
+ * Function is called when the dialog is about to close
+ * 
+ */
+void EapFastPacFilePwQueryDialog::closingDialog()
+{
+    OstTraceFunctionEntry0( EAPFASTPACFILEQUERYDIALOG_CLOSINGDIALOG_ENTRY );
+    qDebug("EapFastPacFilePwQueryDialog::closingDialog ENTER");
+ 
+    closeDeviceDialog(false);
+    
+    qDebug("EapFastPacFilePwQueryDialog::closingDialog EXIT");
+    OstTraceFunctionExit0( EAPFASTPACFILEQUERYDIALOG_CLOSINGDIALOG_EXIT );
+}
+
+/**
+ * Updating the dialog during its showing is not allowed.
+ */ 
+bool EapFastPacFilePwQueryDialog::setDeviceDialogParameters
+                (const QVariantMap &parameters)
+{
+    OstTraceFunctionEntry0( EAPFASTPACFILEQUERYDIALOG_SETDEVICEDIALOGPARAMETERS_ENTRY );
+    
+    Q_UNUSED(parameters)
+    // changing the dialog after presenting it is not supported.
+    
+    OstTraceFunctionExit0( EAPFASTPACFILEQUERYDIALOG_SETDEVICEDIALOGPARAMETERS_EXIT );
+    return true;
+}
+
+/**
+ * Not supported, 0 always returned
+ */
+int EapFastPacFilePwQueryDialog::deviceDialogError() const
+{
+    OstTraceFunctionEntry0( EAPFASTPACFILEQUERYDIALOG_DEVICEDIALOGERROR_ENTRY );
+    OstTraceFunctionExit0( EAPFASTPACFILEQUERYDIALOG_DEVICEDIALOGERROR_EXIT);
+    return 0;
+}
+
+/**
+ * Dialog is closed and the signal about closing is emitted
+ */
+void EapFastPacFilePwQueryDialog::closeDeviceDialog(bool byClient)
+{   
+    OstTraceFunctionEntry0( EAPFASTPACFILEQUERYDIALOG_CLOSEDEVICEDIALOG_ENTRY );
+    qDebug("EapFastPacFilePwQueryDialog::closeDeviceDialog ENTER");
+        
+    //If the user closes the dialog, then the deviceDialogClosed is emitted
+    if ( byClient == true )
+        {
+        qDebug("EapFastPacFilePwQueryDialog::closeDeviceDialog: emit deviceDialogClosed");
+        emit deviceDialogClosed();
+        }
+    
+    qDebug("EapFastPacFilePwQueryDialog::closeDeviceDialog EXIT");
+    OstTraceFunctionExit0( EAPFASTPACFILEQUERYDIALOG_CLOSEDEVICEDIALOG_EXIT );
+}
+
+/**
+ * This dialog widget is returned to the caller
+ */
+HbPopup *EapFastPacFilePwQueryDialog::deviceDialogWidget() const
+{
+    OstTraceFunctionEntry0( EAPFASTPACFILEQUERYDIALOG_DEVICEDIALOGWIDGET_ENTRY );
+    OstTraceFunctionExit0( EAPFASTPACFILEQUERYDIALOG_DEVICEDIALOGWIDGET_EXIT );
+    
+    return const_cast<EapFastPacFilePwQueryDialog*>(this);
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/eapqtdialogs/src/eapfastpacstorepwquerydialog.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,258 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Prompt Dialog implementation
+*
+*/
+
+#include <HbMessageBox>
+#include <eapqtvalidator.h>
+#include <eapqtexpandedeaptype.h>
+#include <eapqtconfiginterface.h>
+#include <eapqtconfig.h>
+#include "eapfastpacstorepwquerydialog.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#endif
+
+
+/**
+ * The constructor
+ */
+EapFastPacStorePwQueryDialog::EapFastPacStorePwQueryDialog(const QVariantMap &parameters) 
+ :mEdit(NULL), 
+ mPwdValidator(NULL),
+ mActionOk(NULL),
+ mTranslator(new HbTranslator("eapprompts"))
+{
+    OstTraceFunctionEntry0( EAPFASTPACSTOREQUERYDIALOG_EAPFASTPACSTOREQUERYDIALOG_ENTRY );
+    qDebug("EapFastPacStorePwQueryDialog::EapFastPacStorePwQueryDialog ENTER");
+          
+    createDialog(parameters);
+    
+    mClose = false;
+    
+    OstTraceFunctionExit0( EAPFASTPACSTOREQUERYDIALOG_EAPFASTPACSTOREQUERYDIALOG_EXIT );
+    qDebug("EapFastPacStorePwQueryDialog::EapFastPacStorePwQueryDialog EXIT");
+}
+    
+/**
+ * The construction of the dialog
+ */ 
+void EapFastPacStorePwQueryDialog::createDialog(const QVariantMap &parameters )
+{
+    OstTraceFunctionEntry0( EAPFASTPACSTOREQUERYDIALOG_CREATEDIALOG_ENTRY );
+    qDebug("EapFastPacStorePwQueryDialog::createDialog ENTER");
+
+    QString labelText = QString(hbTrId("txt_occ_dialog_pac_store_password"));
+    
+    Q_UNUSED(parameters)
+
+    // Set the dialog to be on the screen for 60 seconds, unless
+    // the user reacts earlier
+    this->setModal(true);
+    this->setTimeout(60000);
+    this->setDismissPolicy(HbPopup::NoDismiss);
+    this->setPromptText(labelText, 0);  
+    
+    mEdit = this->lineEdit(0);
+    mEdit->setEchoMode(HbLineEdit::Password);
+      
+    EapQtConfigInterface eap_config_if;
+        
+    mPwdValidator = eap_config_if.validatorEap(EapQtExpandedEapType::TypeEapFast, 
+                EapQtConfig::PacStorePasswordConfirmation);    
+    mPwdValidator->updateEditor(mEdit);
+        
+    QList<QAction*> action_list = this->actions();
+        
+    for ( int i = 0; i < action_list.count(); i++ ) {
+        this->removeAction(action_list.at(i));
+        } 
+    
+    mActionOk = new HbAction(hbTrId("txt_common_button_ok"),this); 
+    this->addAction(mActionOk);
+    
+    HbAction* actionCancel = new HbAction(hbTrId("txt_common_button_cancel"),this);
+    this->addAction(actionCancel);    
+     
+    disconnect(mActionOk, SIGNAL(triggered()),this, SLOT(close()));
+    bool connected = connect(mActionOk, SIGNAL(triggered()), this, SLOT(okPressed()));
+    Q_ASSERT(connected == true);
+    
+    disconnect(actionCancel, SIGNAL(triggered()),this, SLOT(close()));
+    connected = connect(actionCancel, SIGNAL(triggered()), this, SLOT(cancelPressed()));
+    Q_ASSERT(connected == true);
+    
+    // Connect the about to close and hide signals, so that we are able to inform 
+    // the caller that the dialog was closed   
+    connected = connect(this, SIGNAL(aboutToClose()), this, SLOT(closingDialog()));
+    Q_ASSERT(connected == true);
+    connected = connect(this, SIGNAL(aboutToHide()), this, SLOT(closingDialog()));
+    Q_ASSERT(connected == true);
+   
+    OstTraceFunctionExit0( DUP1_EAPFASTPACSTOREQUERYDIALOG_CREATEDIALOG_EXIT );
+    qDebug("EapFastPacStorePwQueryDialog::createDialog EXIT");
+}
+
+/**
+ * Destructor
+ */
+EapFastPacStorePwQueryDialog::~EapFastPacStorePwQueryDialog()
+{
+    OstTraceFunctionEntry0( EAPFASTPACSTOREQUERYDIALOG_DEAPFASTPACSTOREQUERYDIALOG_ENTRY );
+    
+    // The dialog widgets are deleted as the dialog is deleted        
+    delete mPwdValidator;
+    
+    OstTraceFunctionExit0( EAPFASTPACSTOREQUERYDIALOG_DEAPFASTPACSTOREQUERYDIALOG_EXIT );
+}
+
+/**
+ * Line edit validator
+ */
+bool EapFastPacStorePwQueryDialog::validate() const
+{
+    qDebug("EapFastPacStorePwQueryDialog::validate");
+    
+    bool valid = false;
+
+    if ( mPwdValidator->validate(mEdit->text())== EapQtValidator::StatusOk ) {
+        qDebug("EapFastPacStorePwQueryDialog::validate: returns TRUE");
+        valid = true;
+    }
+    return valid;
+}
+
+/**
+ * Function is called when the Ok Action button is pressed
+ */
+void EapFastPacStorePwQueryDialog::okPressed()
+{
+    OstTraceFunctionEntry0( EAPFASTPACSTOREQUERYDIALOG_OKPRESSED_ENTRY );
+    qDebug("EapFastPacStorePwQueryDialog::okPressed ENTER");
+    
+    if ( validate() == true ) {
+            
+        QVariantMap data;
+    
+        QString editStr = mEdit->text();
+            
+        QVariant variant(editStr);
+    
+        data["password"] = variant;
+      
+        qDebug("EapFastPacStorePwQueryDialog::okPressed: emit deviceDialogData");
+    
+        emit deviceDialogData(data); 
+        closeDeviceDialog(true);
+        }
+    else {
+        HbMessageBox *box = 
+            new HbMessageBox(hbTrId("txt_occ_info_incorrect_password_msg_box"),
+            HbMessageBox::MessageTypeInformation);
+        
+        box->setAttribute(Qt::WA_DeleteOnClose);
+        box->open();       
+        }
+        
+    OstTraceFunctionExit0( EAPFASTPACSTOREQUERYDIALOG_OKPRESSED_EXIT );
+    qDebug("EapFastPacStorePwQueryDialog::okPressed EXIT");
+}
+
+/**
+ * Function is called when the Cancel Action button is pressed
+ */
+void EapFastPacStorePwQueryDialog::cancelPressed()
+{
+    OstTraceFunctionEntry0( EAPFASTPACSTOREQUERYDIALOG_CANCELPRESSED_ENTRY );
+    qDebug("EapFastPacStorePwQueryDialog::cancelPressed ENTER");
+    
+    if (!mClose) {
+        mClose = true;
+        closeDeviceDialog(true);
+    }   
+    qDebug("EapFastPacStorePwQueryDialog::cancelPressed EXIT");
+    OstTraceFunctionExit0( EAPFASTPACSTOREQUERYDIALOG_CANCELPRESSED_EXIT );
+}
+
+/**
+ * Function is called when the dialog is about to close
+ * 
+ */
+void EapFastPacStorePwQueryDialog::closingDialog()
+{
+    OstTraceFunctionEntry0( EAPFASTPACSTOREQUERYDIALOG_CLOSINGDIALOG_ENTRY );
+    qDebug("EapFastPacStorePwQueryDialog::closingDialog ENTER");
+ 
+    closeDeviceDialog(false);
+    
+    qDebug("EapFastPacStorePwQueryDialog::closingDialog EXIT");
+    OstTraceFunctionExit0( EAPFASTPACSTOREQUERYDIALOG_CLOSINGDIALOG_EXIT );
+}
+
+/**
+ * Updating the dialog during its showing is not allowed.
+ */ 
+bool EapFastPacStorePwQueryDialog::setDeviceDialogParameters
+                (const QVariantMap &parameters)
+{
+    OstTraceFunctionEntry0( EAPFASTPACSTOREQUERYDIALOG_SETDEVICEDIALOGPARAMETERS_ENTRY );
+    
+    Q_UNUSED(parameters)
+    // changing the dialog after presenting it is not supported.
+    
+    OstTraceFunctionExit0( EAPFASTPACSTOREQUERYDIALOG_SETDEVICEDIALOGPARAMETERS_EXIT );
+    return true;
+}
+
+/**
+ * Not supported, 0 always returned
+ */
+int EapFastPacStorePwQueryDialog::deviceDialogError() const
+{
+    OstTraceFunctionEntry0( EAPFASTPACSTOREQUERYDIALOG_DEVICEDIALOGERROR_ENTRY );
+    OstTraceFunctionExit0( EAPFASTPACSTOREQUERYDIALOG_DEVICEDIALOGERROR_EXIT);
+    return 0;
+}
+
+/**
+ * Dialog is closed and the signal about closing is emitted
+ */
+void EapFastPacStorePwQueryDialog::closeDeviceDialog(bool byClient)
+{   
+    OstTraceFunctionEntry0( EAPFASTPACSTOREQUERYDIALOG_CLOSEDEVICEDIALOG_ENTRY );
+    qDebug("EapFastPacStorePwQueryDialog::closeDeviceDialog ENTER");
+        
+    //If the user closes the dialog, then the deviceDialogClosed is emitted
+    if ( byClient == true )
+        {
+        qDebug("EapFastPacFilePwQueryDialog::closeDeviceDialog: emit deviceDialogClosed");
+        emit deviceDialogClosed();
+        }
+    
+    qDebug("EapFastPacStorePwQueryDialog::closeDeviceDialog EXIT");
+    OstTraceFunctionExit0( EAPFASTPACSTOREQUERYDIALOG_CLOSEDEVICEDIALOG_EXIT );
+}
+
+/**
+ * This dialog widget is returned to the caller
+ */
+HbPopup *EapFastPacStorePwQueryDialog::deviceDialogWidget() const
+{
+    OstTraceFunctionEntry0( EAPFASTPACSTOREQUERYDIALOG_DEVICEDIALOGWIDGET_ENTRY );
+    OstTraceFunctionExit0( EAPFASTPACSTOREQUERYDIALOG_DEVICEDIALOGWIDGET_EXIT );
+    
+    return const_cast<EapFastPacStorePwQueryDialog*>(this);
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/eapqtdialogs/src/eapfastprovnotsuccessnotedialog.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,197 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Prompt Dialog implementation
+*
+*/
+
+#include "eapfastprovnotsuccessnotedialog.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#endif
+
+// The index numbers of the button of the dialog
+const int okButtonIndex = 1;
+
+/**
+ * The constructor
+ */
+EapFastProvNotSuccessNoteDialog::EapFastProvNotSuccessNoteDialog(const QVariantMap &parameters)
+:HbMessageBox("default text...",HbMessageBox::MessageTypeWarning),    
+mActionOk(NULL),
+mTranslator(new HbTranslator("eapprompts"))
+{
+    OstTraceFunctionEntry0( EAPMSCHAPV2PWDEXPNOTEDIALOG_EAPMSCHAPV2PWDEXPNOTEDIALOG_ENTRY );
+    qDebug("EapFastProvNotSuccessNoteDialog::EapFastProvNotSuccessNoteDialog ENTER");
+
+    createDialog( parameters );
+    
+    mOkActionPressed = false;
+    
+    OstTraceFunctionExit0( EAPMSCHAPV2PWDEXPNOTEDIALOG_EAPMSCHAPV2PWDEXPNOTEDIALOG_EXIT );
+    qDebug("EapFastProvNotSuccessNoteDialog::EapFastProvNotSuccessNoteDialog EXIT");
+}
+
+    
+/**
+ * The construction of the dialog
+ */ 
+void EapFastProvNotSuccessNoteDialog::createDialog(const QVariantMap &parameters )
+{
+    OstTraceFunctionEntry0( EAPMSCHAPV2PWDEXPNOTEDIALOG_CREATEDIALOG_ENTRY );
+    qDebug("EapFastProvNotSuccessNoteDialog::createDialog ENTER");
+     
+    QString text = QString(hbTrId("txt_occ_info_provisioning_not_successful_reactiv"));
+    
+    Q_UNUSED(parameters)
+        
+    //Set the dialog to be on the screen until user reacts
+    //by pressing the Action button
+    this->setModal(true);
+    this->setTimeout(HbPopup::NoTimeout);
+    this->setDismissPolicy(HbPopup::NoDismiss);
+                   
+    this->setText(text);    
+    this->setIconVisible(true);
+        
+    QList<QAction*> action_list = this->actions();
+        
+    for ( int i = 0; i < action_list.count(); i++ ) {
+        this->removeAction(action_list.at(i));
+        }
+    
+    mActionOk = new HbAction(hbTrId("txt_common_button_ok_single_dialog"),this); 
+    this->addAction(mActionOk);
+    
+    disconnect(mActionOk, SIGNAL(triggered()),this, SLOT(close()));
+    bool connected = connect(mActionOk, SIGNAL(triggered()), this, SLOT(okPressed()));
+    Q_ASSERT(connected == true);
+        
+    // Connect the about to close and hide signals, so that we are able to inform 
+    // the caller that the dialog was closed    
+    connected = connect(this, SIGNAL(aboutToClose()), this, SLOT(closingDialog()));
+    Q_ASSERT(connected == true);
+    connected = connect(this, SIGNAL(aboutToHide()), this, SLOT(closingDialog()));
+    Q_ASSERT(connected == true);
+   
+    OstTraceFunctionExit0( DUP1_EAPMSCHAPV2PWDEXPNOTEDIALOG_CREATEDIALOG_EXIT );
+    qDebug("EapFastProvNotSuccessNoteDialog::createDialog EXIT");
+}
+
+/**
+ * Destructor
+ */
+EapFastProvNotSuccessNoteDialog::~EapFastProvNotSuccessNoteDialog()
+{
+    OstTraceFunctionEntry0( EAPMSCHAPV2PWDEXPNOTEDIALOG_DEAPMSCHAPV2PWDEXPNOTEDIALOG_ENTRY );
+    
+    // The dialog widgets are deleted as the dialog is deleted
+    
+    OstTraceFunctionExit0( EAPMSCHAPV2PWDEXPNOTEDIALOG_DEAPMSCHAPV2PWDEXPNOTEDIALOG_EXIT );
+}
+
+/**
+ * Function is called when the Ok Action button is pressed
+ */
+void EapFastProvNotSuccessNoteDialog::okPressed()
+{
+    OstTraceFunctionEntry0( EAPMSCHAPV2PWDEXPNOTEDIALOG_OKBUTTONPRESSED_ENTRY );
+    qDebug("EapFastProvNotSuccessNoteDialog::okPressed ENTER");
+    
+    if ( mOkActionPressed == false ) {
+        
+            mOkActionPressed = true;
+            
+            QVariantMap data;
+            QVariant variant(okButtonIndex);
+            data.insert("okbutton", variant);
+            // emit the data of the selected button and close the dialog
+            qDebug("EapFastProvNotSuccessNoteDialog::okPressed: emit deviceDialogData");
+            emit deviceDialogData(data);
+    
+            closeDeviceDialog(true);
+    }
+    OstTraceFunctionExit0( EAPMSCHAPV2PWDEXPNOTEDIALOG_OKBUTTONPRESSED_EXIT );
+    qDebug("EapFastProvNotSuccessNoteDialog::okPressed EXIT");
+}
+
+/**
+ * Function is called when the dialog is about to close
+ * 
+ */
+void EapFastProvNotSuccessNoteDialog::closingDialog()
+{
+    OstTraceFunctionEntry0( EAPMSCHAPV2PWDEXPNOTEDIALOG_CLOSINGDIALOG_ENTRY );
+    qDebug("EapFastProvNotSuccessNoteDialog::closingDialog ENTER");
+ 
+    closeDeviceDialog(false);
+    
+    qDebug("EapFastProvNotSuccessNoteDialog::closingDialog EXIT");
+    OstTraceFunctionExit0( EAPMSCHAPV2PWDEXPNOTEDIALOG_CLOSINGDIALOG_EXIT );
+}
+
+/**
+ * Updating the dialog during its showing is not allowed.
+ */ 
+bool EapFastProvNotSuccessNoteDialog::setDeviceDialogParameters
+                (const QVariantMap &parameters)
+{
+    OstTraceFunctionEntry0( EAPMSCHAPV2PWDEXPNOTEDIALOG_SETDEVICEDIALOGPARAMETERS_ENTRY );
+    
+    Q_UNUSED(parameters)
+    // changing the dialog after presenting it is not supported.
+    
+    OstTraceFunctionExit0( EAPMSCHAPV2PWDEXPNOTEDIALOG_SETDEVICEDIALOGPARAMETERS_EXIT );
+    return true;
+}
+
+/**
+ * Not supported, 0 always returned
+ */
+int EapFastProvNotSuccessNoteDialog::deviceDialogError() const
+{
+    OstTraceFunctionEntry0( EAPMSCHAPV2PWDEXPNOTEDIALOG_DEVICEDIALOGERROR_ENTRY );
+    OstTraceFunctionExit0( EAPMSCHAPV2PWDEXPNOTEDIALOG_DEVICEDIALOGERROR_EXIT);
+    return 0;
+}
+
+/**
+ * Dialog is closed and the signal about closing is emitted
+ */
+void EapFastProvNotSuccessNoteDialog::closeDeviceDialog(bool byClient)
+{   
+    OstTraceFunctionEntry0( EAPMSCHAPV2PWDEXPNOTEDIALOG_CLOSEDEVICEDIALOG_ENTRY );
+    qDebug("EapFastProvNotSuccessNoteDialog::closeDeviceDialog ENTER");
+            
+    if ( byClient == true ) {
+        emit deviceDialogClosed(); 
+        }
+    
+    qDebug("EapFastProvNotSuccessNoteDialog::closeDeviceDialog EXIT");
+    OstTraceFunctionExit0( EAPMSCHAPV2PWDEXPNOTEDIALOG_CLOSEDEVICEDIALOG_EXIT );
+}
+
+/**
+ * This dialog widget is returned to the caller
+ */
+HbPopup *EapFastProvNotSuccessNoteDialog::deviceDialogWidget() const
+{
+    OstTraceFunctionEntry0( EAPMSCHAPV2PWDEXPNOTEDIALOG_DEVICEDIALOGWIDGET_ENTRY );
+    qDebug("EapFastProvNotSuccessNoteDialog::deviceDialogWidget ENTER");
+    
+    qDebug("EapFastProvNotSuccessNoteDialog::deviceDialogWidget EXIT");
+    OstTraceFunctionExit0( EAPMSCHAPV2PWDEXPNOTEDIALOG_DEVICEDIALOGWIDGET_EXIT );
+    
+    return const_cast<EapFastProvNotSuccessNoteDialog*>(this);
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/eapqtdialogs/src/eapfastprovwaitnotedialog.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,164 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Prompt Dialog implementation
+*
+*/
+
+#include "eapfastprovwaitnotedialog.h"
+#include "OstTraceDefinitions.h"
+#include <QGraphicsLinearLayout>
+#ifdef OST_TRACE_COMPILER_IN_USE
+#endif
+
+/**
+ * The constructor
+ */
+EapFastProvWaitNoteDialog::EapFastProvWaitNoteDialog(const QVariantMap &parameters)
+:mTranslator(new HbTranslator("eapprompts"))
+{
+    OstTraceFunctionEntry0( EAPFASTPROVWAITNOTEDIALOG_EAPFASTPROVWAITNOTEDIALOG_ENTRY );
+    qDebug("EapFastProvWaitNoteDialog::EapFastProvWaitNoteDialog ENTER");
+
+    createDialog( parameters );
+        
+    OstTraceFunctionExit0( EAPFASTPROVWAITNOTEDIALOG_EAPFASTPROVWAITNOTEDIALOG_EXIT );
+    qDebug("EapFastProvWaitNoteDialog::EapFastProvWaitNoteDialog EXIT");
+}
+
+    
+/**
+ * The construction of the dialog
+ */ 
+void EapFastProvWaitNoteDialog::createDialog(const QVariantMap &parameters )
+{
+    OstTraceFunctionEntry0( EAPFASTPROVWAITNOTEDIALOG_CREATEDIALOG_ENTRY );
+    qDebug("EapFastProvWaitNoteDialog::createDialog ENTER");
+    
+    QString mainText;    
+    QString key = QString("notificationtxt");
+    
+    bool authProvWaitNote = false;
+    
+    if ( parameters.empty() == false ) {
+        if ( parameters.contains(key) ) {
+            QVariant variant = parameters.value(key);
+            authProvWaitNote = variant.toBool();
+            }
+        }      
+    
+    if ( authProvWaitNote ) {
+        mainText = QString(hbTrId("txt_occ_dpopinfo_authenticated_provisioning_in_pro"));       
+    } else {
+        mainText = QString(hbTrId("txt_occ_dpopinfo_unauthenticated_provisioning_in_p"));
+    }
+       
+    // Set the dialog to be on the screen for 4 seconds.
+    this->setTimeout(4000);
+    this->setTitle(mainText);  
+   
+    // Connect the about to close and hide signals, so that we are able to inform 
+    // the caller that the dialog was closed        
+    bool connected = connect(this, SIGNAL(aboutToClose()), this, SLOT(closingDialog()));
+    Q_ASSERT(connected == true);
+    connected = connect(this, SIGNAL(aboutToHide()), this, SLOT(closingDialog()));
+    Q_ASSERT(connected == true);
+   
+    OstTraceFunctionExit0( DUP1_EAPFASTPROVWAITNOTEDIALOG_CREATEDIALOG_EXIT );
+    qDebug("EapFastProvWaitNoteDialog::createDialog EXIT");
+}
+
+/**
+ * Destructor
+ */
+EapFastProvWaitNoteDialog::~EapFastProvWaitNoteDialog()
+{
+    OstTraceFunctionEntry0( EAPFASTPROVWAITNOTEDIALOG_DEAPFASTPROVWAITNOTEDIALOG_ENTRY );
+    qDebug("EapFastProvWaitNoteDialog::~EapFastProvWaitNoteDialog ENTER");
+    
+    // The dialog widgets are deleted as the dialog is deleted
+
+    qDebug("EapFastProvWaitNoteDialog::~EapFastProvWaitNoteDialog EXIT");
+    OstTraceFunctionExit0( EAPFASTPROVWAITNOTEDIALOG_DEAPFASTPROVWAITNOTEDIALOG_EXIT );
+}
+
+/**
+ * Function is called when the dialog is about to close
+ * 
+ */
+void EapFastProvWaitNoteDialog::closingDialog()
+{
+    OstTraceFunctionEntry0( EAPFASTPROVWAITNOTEDIALOG_CLOSINGDIALOG_ENTRY );
+    qDebug("EapFastProvWaitNoteDialog::closingDialog ENTER");
+ 
+    closeDeviceDialog(false);
+    
+    qDebug("EapFastProvWaitNoteDialog::closingDialog EXIT");
+    OstTraceFunctionExit0( EAPFASTPROVWAITNOTEDIALOG_CLOSINGDIALOG_EXIT );
+}
+
+/**
+ * Updating the dialog during its showing is not allowed.
+ */ 
+bool EapFastProvWaitNoteDialog::setDeviceDialogParameters
+                (const QVariantMap &parameters)
+{
+    OstTraceFunctionEntry0( EAPFASTPROVWAITNOTEDIALOG_SETDEVICEDIALOGPARAMETERS_ENTRY );
+    
+    Q_UNUSED(parameters)
+    // changing the dialog after presenting it is not supported.
+    
+    OstTraceFunctionExit0( EAPFASTPROVWAITNOTEDIALOG_SETDEVICEDIALOGPARAMETERS_EXIT );
+    return true;
+}
+
+/**
+ * Not supported, 0 always returned
+ */
+int EapFastProvWaitNoteDialog::deviceDialogError() const
+{
+    OstTraceFunctionEntry0( EAPFASTPROVWAITNOTEDIALOG_DEVICEDIALOGERROR_ENTRY );
+    OstTraceFunctionExit0( EAPFASTPROVWAITNOTEDIALOG_DEVICEDIALOGERROR_EXIT);
+    return 0;
+}
+
+/**
+ * Dialog is closed and the signal about closing is emitted
+ */
+void EapFastProvWaitNoteDialog::closeDeviceDialog(bool byClient)
+{   
+    OstTraceFunctionEntry0( EAPFASTPROVWAITNOTEDIALOG_CLOSEDEVICEDIALOG_ENTRY );
+    qDebug("EapFastProvWaitNoteDialog::closeDeviceDialog ENTER");
+        
+    Q_UNUSED(byClient)
+    
+    emit deviceDialogClosed();
+    
+    qDebug("EapFastProvWaitNoteDialog::closeDeviceDialog EXIT");
+    OstTraceFunctionExit0( EAPFASTPROVWAITNOTEDIALOG_CLOSEDEVICEDIALOG_EXIT );
+}
+
+/**
+ * This dialog widget is returned to the caller
+ */
+HbPopup *EapFastProvWaitNoteDialog::deviceDialogWidget() const
+{
+    OstTraceFunctionEntry0( EAPFASTPROVWAITNOTEDIALOG_DEVICEDIALOGWIDGET_ENTRY );
+    qDebug("EapFastProvWaitNoteDialog::deviceDialogWidget ENTER");
+    
+    qDebug("EapFastProvWaitNoteDialog::deviceDialogWidget EXIT");
+    OstTraceFunctionExit0( EAPFASTPROVWAITNOTEDIALOG_DEVICEDIALOGWIDGET_EXIT );
+    
+    return const_cast<EapFastProvWaitNoteDialog*>(this);
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/eapqtdialogs/src/eapmschapv2newpwddialog.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,268 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Dialog implementation
+*
+*/
+
+
+#include <HbMessageBox>
+#include <eapqtvalidator.h>
+#include <eapqtexpandedeaptype.h>
+#include <eapqtconfiginterface.h>
+#include <eapqtconfig.h>
+#include "eapmschapv2newpwddialog.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#endif
+
+
+/**
+ * The constructor
+ */
+EapMschapv2NewPwdDialog::EapMschapv2NewPwdDialog(const QVariantMap &parameters) 
+ :mEdit1(NULL), 
+ mEdit2(NULL), 
+ mPwdValidator(NULL),
+ mActionOk(NULL),
+ mTranslator(new HbTranslator("eapprompts"))
+{
+    OstTraceFunctionEntry0( EAPMSCHAPV2NEWPWDDIALOG_EAPMSCHAPV2NEWPWDDIALOG_ENTRY );
+    qDebug("EapMschapv2NewPwdDialog::EapMschapv2NewPwdDialog ENTER");
+
+    createDialog(parameters);
+    
+    mClose = false;
+    
+    OstTraceFunctionExit0( EAPMSCHAPV2NEWPWDDIALOG_EAPMSCHAPV2NEWPWDDIALOG_EXIT );
+    qDebug("EapMschapv2NewPwdDialog::EapMschapv2NewPwdDialog EXIT");
+}
+    
+/**
+ * The construction of the dialog
+ */ 
+void EapMschapv2NewPwdDialog::createDialog(const QVariantMap &parameters )
+{
+    OstTraceFunctionEntry0( EAPMSCHAPV2NEWPWDDIALOG_CREATEDIALOG_ENTRY );
+    qDebug("EapMschapv2NewPwdDialog::createDialog ENTER");
+    
+    Q_UNUSED(parameters)
+    
+    QString labelText1 = QString(hbTrId("txt_occ_dialog_new_eapmschapv2_password"));
+    QString labelText2 = QString(hbTrId("txt_occ_dialog_verify_password"));
+        
+    //Set the dialog to be on the screen until user reacts
+    //by pressing any of the Action buttons
+    this->setModal(true);
+    this->setTimeout(HbPopup::NoTimeout);
+    this->setDismissPolicy(HbPopup::NoDismiss);    
+    this->setAdditionalRowVisible(true);
+    
+    this->setPromptText(labelText1, 0);   
+    mEdit1 = this->lineEdit(0);
+    mEdit1->setEchoMode(HbLineEdit::Password);
+    
+    this->setPromptText(labelText2, 1);   
+    mEdit2 = this->lineEdit(1);        
+    mEdit2->setEchoMode(HbLineEdit::Password);
+    
+    EapQtConfigInterface eap_config_if;
+    
+    mPwdValidator = eap_config_if.validatorEap(EapQtExpandedEapType::TypeEapMschapv2,
+                EapQtConfig::Password );  
+    mPwdValidator->updateEditor(mEdit1);
+    
+    QList<QAction*> action_list = this->actions();
+        
+    for ( int i = 0; i < action_list.count(); i++ ) {
+        this->removeAction(action_list.at(i));
+        } 
+    
+    mActionOk = new HbAction(hbTrId("txt_common_button_ok"),this); 
+    this->addAction(mActionOk);
+    
+    HbAction* actionCancel = new HbAction(hbTrId("txt_common_button_cancel"),this);
+    this->addAction(actionCancel);    
+     
+    disconnect(mActionOk, SIGNAL(triggered()),this, SLOT(close()));
+    bool connected = connect(mActionOk, SIGNAL(triggered()), this, SLOT(okPressed()));
+    Q_ASSERT(connected == true);
+    
+    disconnect(actionCancel, SIGNAL(triggered()),this, SLOT(close()));
+    connected = connect(actionCancel, SIGNAL(triggered()), this, SLOT(cancelPressed()));
+    Q_ASSERT(connected == true);
+    
+    // Connect the about to close and hide signals, so that we are able to inform 
+    // the caller that the dialog was closed   
+    connected = connect(this, SIGNAL(aboutToClose()), this, SLOT(closingDialog()));
+    Q_ASSERT(connected == true);
+    connected = connect(this, SIGNAL(aboutToHide()), this, SLOT(closingDialog()));
+    Q_ASSERT(connected == true);
+   
+    OstTraceFunctionExit0( DUP1_EAPMSCHAPV2NEWPWDDIALOG_CREATEDIALOG_EXIT );
+    qDebug("EapMschapv2NewPwdDialog::createDialog EXIT");
+}
+
+/**
+ * Destructor
+ */
+EapMschapv2NewPwdDialog::~EapMschapv2NewPwdDialog()
+{
+    OstTraceFunctionEntry0( EAPMSCHAPV2NEWPWDDIALOG_DEAPMSCHAPV2NEWPWDDIALOG_ENTRY );
+    qDebug("EapMschapv2NewPwdDialog::~EapMschapv2NewPwdDialog");
+    
+    //The dialog widgets are deleted as the dialog is deleted
+    delete mPwdValidator;
+    
+    OstTraceFunctionExit0( EAPMSCHAPV2NEWPWDDIALOG_DEAPMSCHAPV2NEWPWDDIALOG_EXIT );
+}
+
+/**
+ * Line edit validator
+ */
+bool EapMschapv2NewPwdDialog::validate() const
+{
+    qDebug("EapMschapv2NewPwdDialog::validate");
+    
+    bool valid = false;
+    
+    EapQtValidator::Status test_status = mPwdValidator->validate(mEdit1->text());
+    
+    if ( mPwdValidator->validate(mEdit1->text())== EapQtValidator::StatusOk &&
+        mEdit1->text() == mEdit2->text()) {
+        qDebug("EapMschapv2NewPwdDialog::validate: ret val: TRUE");
+        valid = true;
+    }
+    return valid;
+}
+
+/**
+ * Function is called when the Ok Action button is pressed
+ */
+void EapMschapv2NewPwdDialog::okPressed()
+{
+    OstTraceFunctionEntry0( EAPMSCHAPV2NEWPWDDIALOG_FIRSTBUTTONPRESSED_ENTRY );
+    qDebug("EapMschapv2NewPwdDialog::okPressed ENTER");
+    
+    if ( validate() == true ) {
+         
+        QVariantMap data;
+    
+        QString editStr = mEdit1->text();
+         
+        QVariant variant(editStr);
+   
+        data["password"] = variant;
+      
+        qDebug("EapMschapv2NewPwdDialog::okPressed: emit deviceDialogData");
+    
+        emit deviceDialogData(data); 
+        closeDeviceDialog(true);
+        }
+    else {
+        HbMessageBox *box = 
+            new HbMessageBox(hbTrId("txt_occ_info_passwords_do_not_match_try_again"),
+            HbMessageBox::MessageTypeInformation);
+        
+        box->setAttribute(Qt::WA_DeleteOnClose);
+        box->open();       
+        }
+    OstTraceFunctionExit0( EAPMSCHAPV2NEWPWDDIALOG_FIRSTBUTTONPRESSED_EXIT );
+    qDebug("EapMschapv2NewPwdDialog::okPressed EXIT");
+}
+
+/**
+ * Function is called when the Cancel Action button is pressed
+ */
+void EapMschapv2NewPwdDialog::cancelPressed()
+{
+    OstTraceFunctionEntry0( EAPMSCHAPV2NEWPWDDIALOG_CANCELPRESSED_ENTRY );
+    qDebug("EapMschapv2NewPwdDialog::cancelPressed ENTER");
+    
+    if (!mClose) {
+        mClose = true;
+        closeDeviceDialog(true);
+    }   
+    qDebug("EapMschapv2NewPwdDialog::cancelPressed EXIT");
+    OstTraceFunctionExit0( EAPMSCHAPV2NEWPWDDIALOG_CANCELPRESSED_EXIT );
+}
+
+/**
+ * Function is called when the dialog is about to close
+ * 
+ */
+void EapMschapv2NewPwdDialog::closingDialog()
+{
+    OstTraceFunctionEntry0( EAPMSCHAPV2NEWPWDDIALOG_CLOSINGDIALOG_ENTRY );
+    qDebug("EapMschapv2NewPwdDialog::closingDialog ENTER");
+ 
+    closeDeviceDialog(false);
+    
+    qDebug("EapMschapv2NewPwdDialog::closingDialog EXIT");
+    OstTraceFunctionExit0( EAPMSCHAPV2NEWPWDDIALOG_CLOSINGDIALOG_EXIT );
+}
+
+/**
+ * Updating the dialog during its showing is not allowed.
+ */ 
+bool EapMschapv2NewPwdDialog::setDeviceDialogParameters
+                (const QVariantMap &parameters)
+{
+    OstTraceFunctionEntry0( EAPMSCHAPV2NEWPWDDIALOG_SETDEVICEDIALOGPARAMETERS_ENTRY );
+    
+    Q_UNUSED(parameters)
+    // changing the dialog after presenting it is not supported.
+    
+    OstTraceFunctionExit0( EAPMSCHAPV2NEWPWDDIALOG_SETDEVICEDIALOGPARAMETERS_EXIT );
+    return true;
+}
+
+/**
+ * Not supported, 0 always returned
+ */
+int EapMschapv2NewPwdDialog::deviceDialogError() const
+{
+    OstTraceFunctionEntry0( EAPMSCHAPV2NEWPWDDIALOG_DEVICEDIALOGERROR_ENTRY );
+    OstTraceFunctionExit0( EAPMSCHAPV2NEWPWDDIALOG_DEVICEDIALOGERROR_EXIT);
+    return 0;
+}
+
+/**
+ * Dialog is closed and the signal about closing is emitted
+ */
+void EapMschapv2NewPwdDialog::closeDeviceDialog(bool byClient)
+{   
+    OstTraceFunctionEntry0( EAPMSCHAPV2NEWPWDDIALOG_CLOSEDEVICEDIALOG_ENTRY );
+    qDebug("EapMschapv2NewPwdDialog::closeDeviceDialog ENTER");
+            
+    //If the user closes the dialog, then the deviceDialogClosed is emitted
+    if( byClient == true ) {
+        qDebug("EapMschapv2NewPwdDialog::closeDeviceDialog: emit deviceDialogClosed");
+        emit deviceDialogClosed();
+        }
+    
+    qDebug("EapMschapv2NewPwdDialog::closeDeviceDialog EXIT");
+    OstTraceFunctionExit0( EAPMSCHAPV2NEWPWDDIALOG_CLOSEDEVICEDIALOG_EXIT );
+}
+
+/**
+ * This dialog widget is returned to the caller
+ */
+HbPopup *EapMschapv2NewPwdDialog::deviceDialogWidget() const
+{
+    OstTraceFunctionEntry0( EAPMSCHAPV2NEWPWDDIALOG_DEVICEDIALOGWIDGET_ENTRY );
+    OstTraceFunctionExit0( EAPMSCHAPV2NEWPWDDIALOG_DEVICEDIALOGWIDGET_EXIT );
+    
+    return const_cast<EapMschapv2NewPwdDialog*>(this);
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/eapqtdialogs/src/eapmschapv2oldpwddialog.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,247 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Prompt Dialog implementation
+*
+*/
+
+#include <eapqtvalidator.h>
+#include <eapqtexpandedeaptype.h>
+#include <eapqtconfiginterface.h>
+#include <eapqtconfig.h>
+#include "eapmschapv2oldpwddialog.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#endif
+
+
+/**
+ * The constructor
+ */
+EapMschapv2OldPwdDialog::EapMschapv2OldPwdDialog(const QVariantMap &parameters) 
+ :mEdit(NULL), 
+ mPwdValidator(NULL),
+ mActionOk(NULL),
+ mTranslator(new HbTranslator("eapprompts"))
+{
+    OstTraceFunctionEntry0( EAPFASTPACSTOREQUERYDIALOG_EAPFASTPACSTOREQUERYDIALOG_ENTRY );
+    qDebug("EapMschapv2OldPwdDialog::EapMschapv2OldPwdDialog ENTER");
+        
+    createDialog(parameters);
+    
+    mClose = false;
+    
+    OstTraceFunctionExit0( EAPFASTPACSTOREQUERYDIALOG_EAPFASTPACSTOREQUERYDIALOG_EXIT );
+    qDebug("EapMschapv2OldPwdDialog::EapMschapv2OldPwdDialog EXIT");
+}
+    
+/**
+ * The construction of the dialog
+ */ 
+void EapMschapv2OldPwdDialog::createDialog(const QVariantMap &parameters )
+{
+    OstTraceFunctionEntry0( EAPFASTPACSTOREQUERYDIALOG_CREATEDIALOG_ENTRY );
+    qDebug("EapMschapv2OldPwdDialog::createDialog ENTER");
+
+    QString labelText1 = QString(hbTrId("txt_occ_dialog_old_eapmschapv2_password"));
+    
+    Q_UNUSED(parameters)
+    
+    //Set the dialog to be on the screen until user reacts
+    //by pressing any of the Action buttons
+    this->setModal(true);
+    this->setTimeout(HbPopup::NoTimeout);
+    this->setDismissPolicy(HbPopup::NoDismiss);    
+    this->setPromptText(labelText1, 0);      
+    mEdit = this->lineEdit(0);
+    mEdit->setEchoMode(HbLineEdit::Password);
+      
+    EapQtConfigInterface eap_config_if;
+    
+    mPwdValidator = eap_config_if.validatorEap(EapQtExpandedEapType::TypeEapMschapv2, 
+               EapQtConfig::Password );      
+    mPwdValidator->updateEditor(mEdit);
+            
+    QList<QAction*> action_list = this->actions();
+        
+    for ( int i = 0; i < action_list.count(); i++ ) {
+        this->removeAction(action_list.at(i));
+        } 
+    
+    mActionOk = new HbAction(hbTrId("txt_common_button_ok"),this); 
+    this->addAction(mActionOk);
+    
+    HbAction* actionCancel = new HbAction(hbTrId("txt_common_button_cancel"),this);
+    this->addAction(actionCancel);    
+     
+    disconnect(mActionOk, SIGNAL(triggered()),this, SLOT(close()));
+    bool connected = connect(mActionOk, SIGNAL(triggered()), this, SLOT(okPressed()));
+    Q_ASSERT(connected == true);
+    
+    disconnect(actionCancel, SIGNAL(triggered()),this, SLOT(close()));
+    connected = connect(actionCancel, SIGNAL(triggered()), this, SLOT(cancelPressed()));
+    Q_ASSERT(connected == true);
+    
+    // Connect the about to close and hide signals, so that we are able to inform 
+    // the caller that the dialog was closed   
+    connected = connect(this, SIGNAL(aboutToClose()), this, SLOT(closingDialog()));
+    Q_ASSERT(connected == true);
+    connected = connect(this, SIGNAL(aboutToHide()), this, SLOT(closingDialog()));
+    Q_ASSERT(connected == true);
+   
+    OstTraceFunctionExit0( DUP1_EAPFASTPACSTOREQUERYDIALOG_CREATEDIALOG_EXIT );
+    qDebug("EapMschapv2OldPwdDialog::createDialog EXIT");
+}
+
+/**
+ * Destructor
+ */
+EapMschapv2OldPwdDialog::~EapMschapv2OldPwdDialog()
+{
+    OstTraceFunctionEntry0( EAPFASTPACSTOREQUERYDIALOG_DEAPFASTPACSTOREQUERYDIALOG_ENTRY );
+    
+    // The dialog widgets are deleted as the dialog is deleted
+    delete mPwdValidator;
+    
+    OstTraceFunctionExit0( EAPFASTPACSTOREQUERYDIALOG_DEAPFASTPACSTOREQUERYDIALOG_EXIT );
+}
+
+/**
+ * Line edit validator
+ */
+bool EapMschapv2OldPwdDialog::validate() const
+{
+    qDebug("EapMschapv2OldPwdDialog::validate");
+    
+    bool valid = false;
+
+    if ( mPwdValidator->validate(mEdit->text())== EapQtValidator::StatusOk ) {
+        qDebug("EapMschapv2OldPwdDialog::validate: returns TRUE");
+        valid = true;
+    }
+    return valid;
+}
+
+/**
+ * Function is called when the Ok Action button is pressed
+ */
+void EapMschapv2OldPwdDialog::okPressed()
+{
+    OstTraceFunctionEntry0( EAPFASTPACSTOREQUERYDIALOG_FIRSTBUTTONPRESSED_ENTRY );
+    qDebug("EapMschapv2OldPwdDialog::okPressed ENTER");
+    
+    if ( validate() == true ) {
+            
+        QVariantMap data;
+    
+        QString editStr = mEdit->text();
+            
+        QVariant variant(editStr);
+    
+        data["password"] = variant;
+      
+        qDebug("EapMschapv2OldPwdDialog::okPressed: emit deviceDialogData");
+    
+        emit deviceDialogData(data); 
+        closeDeviceDialog(true);
+        }
+
+    OstTraceFunctionExit0( EAPFASTPACSTOREQUERYDIALOG_FIRSTBUTTONPRESSED_EXIT );
+    qDebug("EapMschapv2OldPwdDialog::okPressed EXIT");
+}
+
+/**
+ * Function is called when the Cancel Action button is pressed
+ */
+void EapMschapv2OldPwdDialog::cancelPressed()
+{
+    OstTraceFunctionEntry0( EAPFASTPACSTOREQUERYDIALOG_CANCELPRESSED_ENTRY );
+    qDebug("EapMschapv2OldPwdDialog::cancelPressed ENTER");
+    
+    if (!mClose) {
+        mClose = true;
+        closeDeviceDialog(true);
+    }   
+    qDebug("EapMschapv2OldPwdDialog::cancelPressed EXIT");
+    OstTraceFunctionExit0( EAPFASTPACSTOREQUERYDIALOG_CANCELPRESSED_EXIT );
+}
+
+/**
+ * Function is called when the dialog is about to close
+ * 
+ */
+void EapMschapv2OldPwdDialog::closingDialog()
+{
+    OstTraceFunctionEntry0( EAPFASTPACSTOREQUERYDIALOG_CLOSINGDIALOG_ENTRY );
+    qDebug("EapMschapv2OldPwdDialog::closingDialog ENTER");
+ 
+    closeDeviceDialog(false);
+    
+    qDebug("EapMschapv2OldPwdDialog::closingDialog EXIT");
+    OstTraceFunctionExit0( EAPFASTPACSTOREQUERYDIALOG_CLOSINGDIALOG_EXIT );
+}
+
+/**
+ * Updating the dialog during its showing is not allowed.
+ */ 
+bool EapMschapv2OldPwdDialog::setDeviceDialogParameters
+                (const QVariantMap &parameters)
+{
+    OstTraceFunctionEntry0( EAPFASTPACSTOREQUERYDIALOG_SETDEVICEDIALOGPARAMETERS_ENTRY );
+    
+    Q_UNUSED(parameters)
+    // changing the dialog after presenting it is not supported.
+    
+    OstTraceFunctionExit0( EAPFASTPACSTOREQUERYDIALOG_SETDEVICEDIALOGPARAMETERS_EXIT );
+    return true;
+}
+
+/**
+ * Not supported, 0 always returned
+ */
+int EapMschapv2OldPwdDialog::deviceDialogError() const
+{
+    OstTraceFunctionEntry0( EAPFASTPACSTOREQUERYDIALOG_DEVICEDIALOGERROR_ENTRY );
+    OstTraceFunctionExit0( EAPFASTPACSTOREQUERYDIALOG_DEVICEDIALOGERROR_EXIT);
+    return 0;
+}
+
+/**
+ * Dialog is closed and the signal about closing is emitted
+ */
+void EapMschapv2OldPwdDialog::closeDeviceDialog(bool byClient)
+{   
+    OstTraceFunctionEntry0( EAPFASTPACSTOREQUERYDIALOG_CLOSEDEVICEDIALOG_ENTRY );
+    qDebug("EapMschapv2OldPwdDialog::closeDeviceDialog ENTER");
+            
+    //If the user closes the dialog, then the deviceDialogClosed is emitted
+    if ( byClient == true ) {  
+        qDebug("EapMschapv2OldPwdDialog::closeDeviceDialog: emit deviceDialogClosed");  
+        emit deviceDialogClosed(); 
+        }
+    
+    qDebug("EapMschapv2OldPwdDialog::closeDeviceDialog EXIT");
+    OstTraceFunctionExit0( EAPFASTPACSTOREQUERYDIALOG_CLOSEDEVICEDIALOG_EXIT );
+}
+
+/**
+ * This dialog widget is returned to the caller
+ */
+HbPopup *EapMschapv2OldPwdDialog::deviceDialogWidget() const
+{
+    OstTraceFunctionEntry0( EAPFASTPACSTOREQUERYDIALOG_DEVICEDIALOGWIDGET_ENTRY );
+    OstTraceFunctionExit0( EAPFASTPACSTOREQUERYDIALOG_DEVICEDIALOGWIDGET_EXIT );
+    
+    return const_cast<EapMschapv2OldPwdDialog*>(this);
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/eapqtdialogs/src/eapmschapv2pwdexpirednotedialog.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,198 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Prompt Dialog implementation
+*
+*/
+
+#include "eapmschapv2pwdexpirednotedialog.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#endif
+
+// The index numbers of the button of the dialog
+const int okButtonIndex = 1;
+
+/**
+ * The constructor
+ */
+EapMschapv2PwdExpNoteDialog::EapMschapv2PwdExpNoteDialog(const QVariantMap &parameters)
+:HbMessageBox("default text...",HbMessageBox::MessageTypeInformation),    
+mActionOk(NULL),
+mTranslator(new HbTranslator("eapprompts"))
+{
+    OstTraceFunctionEntry0( EAPMSCHAPV2PWDEXPNOTEDIALOG_EAPMSCHAPV2PWDEXPNOTEDIALOG_ENTRY );
+    qDebug("EapMschapv2PwdExpNoteDialog::EapMschapv2PwdExpNoteDialog ENTER");
+
+    createDialog( parameters );
+    
+    mOkActionPressed = false;
+    
+    OstTraceFunctionExit0( EAPMSCHAPV2PWDEXPNOTEDIALOG_EAPMSCHAPV2PWDEXPNOTEDIALOG_EXIT );
+    qDebug("EapMschapv2PwdExpNoteDialog::EapMschapv2PwdExpNoteDialog EXIT");
+}
+
+    
+/**
+ * The construction of the dialog
+ */ 
+void EapMschapv2PwdExpNoteDialog::createDialog(const QVariantMap &parameters )
+{
+    OstTraceFunctionEntry0( EAPMSCHAPV2PWDEXPNOTEDIALOG_CREATEDIALOG_ENTRY );
+    qDebug("EapMschapv2PwdExpNoteDialog::createDialog ENTER");
+     
+    QString text = QString(hbTrId("txt_occ_info_eapmschapv2_password_has_expired_yo"));
+    
+    Q_UNUSED(parameters)
+        
+    //Set the dialog to be on the screen until user reacts
+    //by pressing any of the Action buttons
+    this->setModal(true);
+    this->setTimeout(HbPopup::NoTimeout);
+    this->setDismissPolicy(HbPopup::NoDismiss);
+                   
+    this->setText(text);    
+    this->setIconVisible(true);
+        
+    QList<QAction*> action_list = this->actions();
+        
+    for ( int i = 0; i < action_list.count(); i++ ) {
+        this->removeAction(action_list.at(i));
+        }
+    
+    mActionOk = new HbAction(hbTrId("txt_common_button_ok_single_dialog"),this); 
+    this->addAction(mActionOk);
+    
+    disconnect(mActionOk, SIGNAL(triggered()),this, SLOT(close()));
+    bool connected = connect(mActionOk, SIGNAL(triggered()), this, SLOT(okPressed()));
+    Q_ASSERT(connected == true);
+        
+    // Connect the about to close and hide signals, so that we are able to inform 
+    // the caller that the dialog was closed    
+    connected = connect(this, SIGNAL(aboutToClose()), this, SLOT(closingDialog()));
+    Q_ASSERT(connected == true);
+    connected = connect(this, SIGNAL(aboutToHide()), this, SLOT(closingDialog()));
+    Q_ASSERT(connected == true);
+   
+    OstTraceFunctionExit0( DUP1_EAPMSCHAPV2PWDEXPNOTEDIALOG_CREATEDIALOG_EXIT );
+    qDebug("EapMschapv2PwdExpNoteDialog::createDialog EXIT");
+}
+
+/**
+ * Destructor
+ */
+EapMschapv2PwdExpNoteDialog::~EapMschapv2PwdExpNoteDialog()
+{
+    OstTraceFunctionEntry0( EAPMSCHAPV2PWDEXPNOTEDIALOG_DEAPMSCHAPV2PWDEXPNOTEDIALOG_ENTRY );
+    
+    // The dialog widgets are deleted as the dialog is deleted
+    
+    OstTraceFunctionExit0( EAPMSCHAPV2PWDEXPNOTEDIALOG_DEAPMSCHAPV2PWDEXPNOTEDIALOG_EXIT );
+}
+
+/**
+ * Function is called when the Ok Action button is pressed
+ */
+void EapMschapv2PwdExpNoteDialog::okPressed()
+{
+    OstTraceFunctionEntry0( EAPMSCHAPV2PWDEXPNOTEDIALOG_OKBUTTONPRESSED_ENTRY );
+    qDebug("EapMschapv2PwdExpNoteDialog::okPressed ENTER");
+    
+    if ( mOkActionPressed == false ) {
+        
+            mOkActionPressed = true;
+            
+            QVariantMap data;
+            QVariant variant(okButtonIndex);
+            data.insert("okbutton", variant);
+            // emit the data of the selected button and close the dialog
+            qDebug("EapMschapv2PwdExpNoteDialog::okPressed: emit deviceDialogData");
+            emit deviceDialogData(data);
+    
+            closeDeviceDialog(true);
+    }
+    OstTraceFunctionExit0( EAPMSCHAPV2PWDEXPNOTEDIALOG_OKBUTTONPRESSED_EXIT );
+    qDebug("EapMschapv2PwdExpNoteDialog::okPressed EXIT");
+}
+
+/**
+ * Function is called when the dialog is about to close
+ * 
+ */
+void EapMschapv2PwdExpNoteDialog::closingDialog()
+{
+    OstTraceFunctionEntry0( EAPMSCHAPV2PWDEXPNOTEDIALOG_CLOSINGDIALOG_ENTRY );
+    qDebug("EapMschapv2PwdExpNoteDialog::closingDialog ENTER");
+ 
+    closeDeviceDialog(false);
+    
+    qDebug("EapMschapv2PwdExpNoteDialog::closingDialog EXIT");
+    OstTraceFunctionExit0( EAPMSCHAPV2PWDEXPNOTEDIALOG_CLOSINGDIALOG_EXIT );
+}
+
+/**
+ * Updating the dialog during its showing is not allowed.
+ */ 
+bool EapMschapv2PwdExpNoteDialog::setDeviceDialogParameters
+                (const QVariantMap &parameters)
+{
+    OstTraceFunctionEntry0( EAPMSCHAPV2PWDEXPNOTEDIALOG_SETDEVICEDIALOGPARAMETERS_ENTRY );
+    
+    Q_UNUSED(parameters)
+    // changing the dialog after presenting it is not supported.
+    
+    OstTraceFunctionExit0( EAPMSCHAPV2PWDEXPNOTEDIALOG_SETDEVICEDIALOGPARAMETERS_EXIT );
+    return true;
+}
+
+/**
+ * Not supported, 0 always returned
+ */
+int EapMschapv2PwdExpNoteDialog::deviceDialogError() const
+{
+    OstTraceFunctionEntry0( EAPMSCHAPV2PWDEXPNOTEDIALOG_DEVICEDIALOGERROR_ENTRY );
+    OstTraceFunctionExit0( EAPMSCHAPV2PWDEXPNOTEDIALOG_DEVICEDIALOGERROR_EXIT);
+    return 0;
+}
+
+/**
+ * Dialog is closed and the signal about closing is emitted
+ */
+void EapMschapv2PwdExpNoteDialog::closeDeviceDialog(bool byClient)
+{   
+    OstTraceFunctionEntry0( EAPMSCHAPV2PWDEXPNOTEDIALOG_CLOSEDEVICEDIALOG_ENTRY );
+    qDebug("EapMschapv2PwdExpNoteDialog::closeDeviceDialog ENTER");
+        
+    if ( byClient == true ) {
+        qDebug("EapMschapv2PwdExpNoteDialog::closeDeviceDialog: emit deviceDialogClosed");  
+        emit deviceDialogClosed(); 
+        }
+    
+    qDebug("EapMschapv2PwdExpNoteDialog::closeDeviceDialog EXIT");
+    OstTraceFunctionExit0( EAPMSCHAPV2PWDEXPNOTEDIALOG_CLOSEDEVICEDIALOG_EXIT );
+}
+
+/**
+ * This dialog widget is returned to the caller
+ */
+HbPopup *EapMschapv2PwdExpNoteDialog::deviceDialogWidget() const
+{
+    OstTraceFunctionEntry0( EAPMSCHAPV2PWDEXPNOTEDIALOG_DEVICEDIALOGWIDGET_ENTRY );
+    qDebug("EapMschapv2PwdExpNoteDialog::deviceDialogWidget ENTER");
+    
+    qDebug("EapMschapv2PwdExpNoteDialog::deviceDialogWidget EXIT");
+    OstTraceFunctionExit0( EAPMSCHAPV2PWDEXPNOTEDIALOG_DEVICEDIALOGWIDGET_EXIT );
+    
+    return const_cast<EapMschapv2PwdExpNoteDialog*>(this);
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/eapqtdialogs/src/eappasswordquerydialog.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,271 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Prompt Dialog implementation
+*
+*/
+
+#include <eapqtvalidator.h>
+#include <eapqtexpandedeaptype.h>
+#include <eapqtconfiginterface.h>
+#include <eapqtconfig.h>
+#include "eappasswordquerydialog.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#endif
+
+
+/**
+ * The constructor
+ */
+EapPasswordQueryDialog::EapPasswordQueryDialog(const QVariantMap &parameters) 
+ :mEdit(NULL), 
+ mPwdValidator(NULL),
+ mActionOk(NULL)
+{
+    OstTraceFunctionEntry0( EAPPASSWORDQUERYDIALOG_EAPPASSWORDQUERYDIALOG_ENTRY );
+    qDebug("EapPasswordQueryDialog::EapPasswordQueryDialog ENTER");
+
+    createDialog(parameters);
+    
+    mClose = false;
+    mOkActionPressed = false;
+    
+    OstTraceFunctionExit0( EAPPASSWORDQUERYDIALOG_EAPPASSWORDQUERYDIALOG_EXIT );
+    qDebug("EapPasswordQueryDialog::EapPasswordQueryDialog EXIT");
+}
+    
+/**
+ * The construction of the dialog
+ */ 
+void EapPasswordQueryDialog::createDialog(const QVariantMap &parameters )
+{
+    OstTraceFunctionEntry0( EAPPASSWORDQUERYDIALOG_CREATEDIALOG_ENTRY );
+    qDebug("EapPasswordQueryDialog::createDialog ENTER");
+         
+    QString keyeaptype = QString("eaptype"); 
+    QString keyauthmethod = QString("authmethod");    
+    QString authMethodstr = QString("FOO");
+       
+    if ( parameters.empty() == false ) {
+        if ( parameters.contains(keyauthmethod) ) {
+            QVariant variant = parameters.value(keyauthmethod);
+            authMethodstr = variant.toString();
+            }    
+        } 
+    QString labelText = QString(hbTrId("txt_occ_dialog_1_password").arg(authMethodstr));
+    
+    //Set the dialog to be on the screen until user reacts
+    //by pressing any of the Action buttons
+    this->setModal(true);
+    this->setTimeout(HbPopup::NoTimeout);
+    this->setDismissPolicy(HbPopup::NoDismiss);
+    this->setPromptText(labelText, 0);   
+    mEdit = this->lineEdit(0);
+    mEdit->setEchoMode(HbLineEdit::Password);
+    
+    QByteArray ba;
+    
+    if ( parameters.contains(keyeaptype) ) {
+        QVariant variant3 = parameters.value(keyeaptype);
+        ba = variant3.toByteArray();
+        } 
+    Q_ASSERT( ba.isEmpty() == false );
+    
+    EapQtExpandedEapType e_type(ba);
+    EapQtConfigInterface eap_config_if;
+         
+    mPwdValidator = eap_config_if.validatorEap(e_type,
+                EapQtConfig::Password); 
+    
+    mPwdValidator->updateEditor(mEdit);
+                
+    QList<QAction*> action_list = this->actions();
+        
+    for ( int i = 0; i < action_list.count(); i++ ) {
+        this->removeAction(action_list.at(i));
+        } 
+    
+    mActionOk = new HbAction(hbTrId("txt_common_button_ok"),this); 
+    this->addAction(mActionOk);
+    
+    HbAction* actionCancel = new HbAction(hbTrId("txt_common_button_cancel"),this);
+    this->addAction(actionCancel);    
+     
+    disconnect(mActionOk, SIGNAL(triggered()),this, SLOT(close()));
+    bool connected = connect(mActionOk, SIGNAL(triggered()), this, SLOT(okPressed()));
+    Q_ASSERT(connected == true);
+    
+    disconnect(actionCancel, SIGNAL(triggered()),this, SLOT(close()));
+    connected = connect(actionCancel, SIGNAL(triggered()), this, SLOT(cancelPressed()));
+    Q_ASSERT(connected == true);
+    
+    // Connect the about to close and hide signals, so that we are able to inform 
+    // the caller that the dialog was closed   
+    connected = connect(this, SIGNAL(aboutToClose()), this, SLOT(closingDialog()));
+    Q_ASSERT(connected == true);
+    connected = connect(this, SIGNAL(aboutToHide()), this, SLOT(closingDialog()));
+    Q_ASSERT(connected == true);
+   
+    OstTraceFunctionExit0( DUP1_EAPPASSWORDQUERYDIALOG_CREATEDIALOG_EXIT );
+    qDebug("EapPasswordQueryDialog::createDialog EXIT");
+}
+
+/**
+ * Destructor
+ */
+EapPasswordQueryDialog::~EapPasswordQueryDialog()
+{
+    OstTraceFunctionEntry0( EAPPASSWORDQUERYDIALOG_DEAPPASSWORDQUERYDIALOG_ENTRY );
+    
+    // The dialog widgets are deleted as the dialog is deleted        
+    delete mPwdValidator;
+    
+    OstTraceFunctionExit0( EAPPASSWORDQUERYDIALOG_DEAPPASSWORDQUERYDIALOG_EXIT );
+}
+
+/**
+ * Line edit validator
+ */
+bool EapPasswordQueryDialog::validate() const
+{
+    qDebug("EapPasswordQueryDialog::validate ENTER");
+    
+    bool valid = false;
+
+    if ( mPwdValidator->validate(mEdit->text())== EapQtValidator::StatusOk ) {
+        
+        qDebug("EapPasswordQueryDialog::validate(): returns TRUE");
+        valid = true;
+    }
+    
+    qDebug("EapPasswordQueryDialog::validate EXIT");
+    return valid;
+}
+
+
+/**
+ * Function is called when the Ok Action button is pressed
+ */
+void EapPasswordQueryDialog::okPressed()
+{
+    OstTraceFunctionEntry0( EAPPASSWORDQUERYDIALOG_OKPRESSED_ENTRY );
+    qDebug("EapPasswordQueryDialog::okPressed ENTER");
+    
+    if ( validate() == true && mOkActionPressed == false ) {
+        
+            mOkActionPressed = true;
+            
+            QVariantMap data;
+    
+            QString editStr = mEdit->text();
+            
+            QVariant variant(editStr);
+    
+            data["password"] = variant;
+      
+            qDebug("EapPasswordQueryDialog::okPressed: emit deviceDialogData");
+    
+            emit deviceDialogData(data); 
+            closeDeviceDialog(true);
+    }
+    OstTraceFunctionExit0( EAPPASSWORDQUERYDIALOG_OKPRESSED_EXIT );
+    qDebug("EapPasswordQueryDialog::okPressed EXIT");
+}
+
+/**
+ * Function is called when the Cancel Action button is pressed
+ */
+void EapPasswordQueryDialog::cancelPressed()
+{
+    OstTraceFunctionEntry0( EAPPASSWORDQUERYDIALOG_CANCELPRESSED_ENTRY );
+    qDebug("EapPasswordQueryDialog::cancelPressed ENTER");
+    
+    if (!mClose) {
+        mClose = true;
+        closeDeviceDialog(true);
+    }   
+    qDebug("EapPasswordQueryDialog::cancelPressed EXIT");
+    OstTraceFunctionExit0( EAPPASSWORDQUERYDIALOG_CANCELPRESSED_EXIT );
+}
+
+/**
+ * Function is called when the dialog is about to close
+ * 
+ */
+void EapPasswordQueryDialog::closingDialog()
+{
+    OstTraceFunctionEntry0( EAPPASSWORDQUERYDIALOG_CLOSINGDIALOG_ENTRY );
+    qDebug("EapPasswordQueryDialog::closingDialog ENTER");
+ 
+    closeDeviceDialog(false);
+    
+    qDebug("EapPasswordQueryDialog::closingDialog EXIT");
+    OstTraceFunctionExit0( EAPPASSWORDQUERYDIALOG_CLOSINGDIALOG_EXIT );
+}
+
+/**
+ * Updating the dialog during its showing is not allowed.
+ */ 
+bool EapPasswordQueryDialog::setDeviceDialogParameters
+                (const QVariantMap &parameters)
+{
+    OstTraceFunctionEntry0( EAPPASSWORDQUERYDIALOG_SETDEVICEDIALOGPARAMETERS_ENTRY );
+    
+    Q_UNUSED(parameters)
+    // changing the dialog after presenting it is not supported.
+    
+    OstTraceFunctionExit0( EAPPASSWORDQUERYDIALOG_SETDEVICEDIALOGPARAMETERS_EXIT );
+    return true;
+}
+
+/**
+ * Not supported, 0 always returned
+ */
+int EapPasswordQueryDialog::deviceDialogError() const
+{
+    OstTraceFunctionEntry0( EAPPASSWORDQUERYDIALOG_DEVICEDIALOGERROR_ENTRY );
+    OstTraceFunctionExit0( EAPPASSWORDQUERYDIALOG_DEVICEDIALOGERROR_EXIT);
+    return 0;
+}
+
+/**
+ * Dialog is closed and the signal about closing is emitted
+ */
+void EapPasswordQueryDialog::closeDeviceDialog(bool byClient)
+{   
+    OstTraceFunctionEntry0( EAPPASSWORDQUERYDIALOG_CLOSEDEVICEDIALOG_ENTRY );
+    qDebug("EapPasswordQueryDialog::closeDeviceDialog ENTER");
+        
+    //If the user closes the dialog, then the deviceDialogClosed is emitted
+    if ( byClient == true )
+        {
+        qDebug("EapUsernamePwdDialog::closeDeviceDialog: emit deviceDialogClosed");
+        emit deviceDialogClosed();
+        }
+    
+    qDebug("EapPasswordQueryDialog::closeDeviceDialog EXIT");
+    OstTraceFunctionExit0( EAPPASSWORDQUERYDIALOG_CLOSEDEVICEDIALOG_EXIT );
+}
+
+/**
+ * This dialog widget is returned to the caller
+ */
+HbPopup *EapPasswordQueryDialog::deviceDialogWidget() const
+{
+    OstTraceFunctionEntry0( EAPPASSWORDQUERYDIALOG_DEVICEDIALOGWIDGET_ENTRY );
+    OstTraceFunctionExit0( EAPPASSWORDQUERYDIALOG_DEVICEDIALOGWIDGET_EXIT );
+    
+    return const_cast<EapPasswordQueryDialog*>(this);
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/eapqtdialogs/src/eapquerydialog.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,221 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Prompt Dialog implementation
+*
+*/
+
+#include <HbLabel>
+#include "eapquerydialog.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#endif
+
+// The index numbers of the button of the dialog
+const int okButtonIndex = 1;
+
+/**
+ * The constructor
+ */
+EapQueryDialog::EapQueryDialog(const QVariantMap &parameters)
+:mActionOk(NULL),
+mTranslator(new HbTranslator("eapprompts"))
+{
+    OstTraceFunctionEntry0( EAPQUERYDIALOG_EAPQUERYDIALOG_ENTRY );
+    qDebug("EapQueryDialog::EapQueryDialog ENTER");
+        
+    createDialog( parameters );
+    
+    mOkActionPressed = false;
+    
+    OstTraceFunctionExit0( EAPQUERYDIALOG_EAPQUERYDIALOG_EXIT );
+    qDebug("EapQueryDialog::EapQueryDialog EXIT");
+}
+
+    
+/**
+ * The construction of the dialog
+ */ 
+void EapQueryDialog::createDialog(const QVariantMap &parameters )
+{
+    OstTraceFunctionEntry0( EAPQUERYDIALOG_CREATEDIALOG_ENTRY );
+    qDebug("EapQueryDialog::createDialog ENTER");
+     
+    QString message  = QString("");  ;    
+    QString keyauthmethod = QString("authmethod");  
+    QString keymessage = QString("messagetxt");    
+    QString authMethodstr = QString("FOO");
+       
+    if ( parameters.empty() == false ) {
+      
+        if ( parameters.contains(keyauthmethod) ) {
+            QVariant variant1 = parameters.value(keyauthmethod);
+            authMethodstr = variant1.toString();
+            }  
+        if ( parameters.contains(keymessage) ) {
+            QVariant variant2 = parameters.value(keymessage);
+            message = variant2.toString();
+            }
+        }    
+    
+    QString labelText1 = QString(hbTrId("txt_occ_title_1_message").arg(authMethodstr));
+    QString labelText2 = message; 
+    
+    //Set the dialog to be on the screen until user reacts
+    //by pressing any of the Action buttons
+    this->setModal(true);
+    this->setTimeout(HbPopup::NoTimeout);
+    this->setDismissPolicy(HbPopup::NoDismiss);
+               
+    HbLabel* label1 = new HbLabel;
+    Q_ASSERT(label1 != NULL);
+    label1->setPlainText(labelText1);
+    label1->setFontSpec(HbFontSpec(HbFontSpec::Primary));
+    label1->setTextWrapping(Hb::TextWrapAnywhere);
+    
+    this->setHeadingWidget(label1);       
+    this->setText(labelText2);    
+    this->setIconVisible(false);
+        
+    QList<QAction*> action_list = this->actions();
+        
+    for ( int i = 0; i < action_list.count(); i++ ) {
+        this->removeAction(action_list.at(i));
+        }
+    
+    mActionOk = new HbAction(tr("Ok"),this); 
+    this->addAction(mActionOk);
+    
+    disconnect(mActionOk, SIGNAL(triggered()),this, SLOT(close()));
+    bool connected = connect(mActionOk, SIGNAL(triggered()), this, SLOT(okPressed()));
+    Q_ASSERT(connected == true);
+        
+    // Connect the about to close and hide signals, so that we are able to inform 
+    // the caller that the dialog was closed    
+    connected = connect(this, SIGNAL(aboutToClose()), this, SLOT(closingDialog()));
+    Q_ASSERT(connected == true);
+    connected = connect(this, SIGNAL(aboutToHide()), this, SLOT(closingDialog()));
+    Q_ASSERT(connected == true);
+   
+    OstTraceFunctionExit0( DUP1_EAPQUERYDIALOG_CREATEDIALOG_EXIT );
+    qDebug("EapQueryDialog::createDialog EXIT");
+}
+
+/**
+ * Destructor
+ */
+EapQueryDialog::~EapQueryDialog()
+{
+    OstTraceFunctionEntry0( EAPQUERYDIALOG_DEAPQUERYDIALOG_ENTRY );
+    
+    // The dialog widgets are deleted as the dialog is deleted
+    
+    OstTraceFunctionExit0( EAPQUERYDIALOG_DEAPQUERYDIALOG_EXIT );
+}
+
+/**
+ * Function is called when the Ok Action button is pressed
+ */
+void EapQueryDialog::okPressed()
+{
+    OstTraceFunctionEntry0( EAPQUERYDIALOG_OKPRESSED_ENTRY );
+    qDebug("EapQueryDialog::okPressed ENTER");
+    
+    if ( mOkActionPressed == false ) {
+        
+            mOkActionPressed = true;
+            
+            QVariantMap data;
+            QVariant variant(okButtonIndex);
+            data.insert("okbutton", variant);
+            // emit the data of the selected button and close the dialog
+            qDebug("EapQueryDialog::okPressed: emit deviceDialogData");
+            emit deviceDialogData(data);
+    
+            closeDeviceDialog(true);
+    }
+    OstTraceFunctionExit0( EAPQUERYDIALOG_OKPRESSED_EXIT );
+    qDebug("EapQueryDialog::okPressed EXIT");
+}
+
+/**
+ * Function is called when the dialog is about to close
+ * 
+ */
+void EapQueryDialog::closingDialog()
+{
+    OstTraceFunctionEntry0( EAPQUERYDIALOG_CLOSINGDIALOG_ENTRY );
+    qDebug("EapQueryDialog::closingDialog ENTER");
+ 
+    closeDeviceDialog(false);
+    
+    qDebug("EapQueryDialog::closingDialog EXIT");
+    OstTraceFunctionExit0( EAPQUERYDIALOG_CLOSINGDIALOG_EXIT );
+}
+
+/**
+ * Updating the dialog during its showing is not allowed.
+ */ 
+bool EapQueryDialog::setDeviceDialogParameters
+                (const QVariantMap &parameters)
+{
+    OstTraceFunctionEntry0( EAPQUERYDIALOG_SETDEVICEDIALOGPARAMETERS_ENTRY );
+    
+    Q_UNUSED(parameters)
+    // changing the dialog after presenting it is not supported.
+    
+    OstTraceFunctionExit0( EAPQUERYDIALOG_SETDEVICEDIALOGPARAMETERS_EXIT );
+    return true;
+}
+
+/**
+ * Not supported, 0 always returned
+ */
+int EapQueryDialog::deviceDialogError() const
+{
+    OstTraceFunctionEntry0( EAPQUERYDIALOG_DEVICEDIALOGERROR_ENTRY );
+    OstTraceFunctionExit0( EAPQUERYDIALOG_DEVICEDIALOGERROR_EXIT);
+    return 0;
+}
+
+/**
+ * Dialog is closed and the signal about closing is emitted
+ */
+void EapQueryDialog::closeDeviceDialog(bool byClient)
+{   
+    OstTraceFunctionEntry0( EAPQUERYDIALOG_CLOSEDEVICEDIALOG_ENTRY );
+    qDebug("EapQueryDialog::closeDeviceDialog ENTER");
+        
+    //If the user closes the dialog, then the deviceDialogClosed is emitted
+    if ( byClient == true ) {
+        emit deviceDialogClosed();
+    }
+    
+    qDebug("EapQueryDialog::closeDeviceDialog EXIT");
+    OstTraceFunctionExit0( EAPQUERYDIALOG_CLOSEDEVICEDIALOG_EXIT );
+}
+
+/**
+ * This dialog widget is returned to the caller
+ */
+HbPopup *EapQueryDialog::deviceDialogWidget() const
+{
+    OstTraceFunctionEntry0( EAPQUERYDIALOG_DEVICEDIALOGWIDGET_ENTRY );
+    qDebug("EapQueryDialog::deviceDialogWidget ENTER");
+    
+    qDebug("EapQueryDialog::deviceDialogWidget EXIT");
+    OstTraceFunctionExit0( EAPQUERYDIALOG_DEVICEDIALOGWIDGET_EXIT );
+    
+    return const_cast<EapQueryDialog*>(this);
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/eapqtdialogs/src/eapusernamepwddialog.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,296 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Dialog implementation
+*
+*/
+
+#include <eapqtvalidator.h>
+#include <eapqtexpandedeaptype.h>
+#include <eapqtconfiginterface.h>
+#include <eapqtconfig.h>
+#include "eapusernamepwddialog.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+
+#endif
+
+/**
+ * The constructor
+ */
+EapUsernamePwdDialog::EapUsernamePwdDialog(const QVariantMap &parameters) 
+ :mEdit1(NULL), 
+ mEdit2(NULL), 
+ mUnameValidator(NULL),
+ mPwdValidator(NULL),
+ mTranslator(new HbTranslator("eapprompts"))
+{
+    OstTraceFunctionEntry0( EAPUSERNAMEPWDDIALOG_EAPUSERNAMEPWDDIALOG_ENTRY );
+    qDebug("EapUsernamePwdDialog::EapUsernamePwdDialog ENTER");
+        
+    createDialog(parameters);
+    
+    mClose = false;
+    mOkActionPressed = false;
+    
+    OstTraceFunctionExit0( EAPUSERNAMEPWDDIALOG_EAPUSERNAMEPWDDIALOG_EXIT );
+    qDebug("EapUsernamePwdDialog::EapUsernamePwdDialog EXIT");
+}
+    
+/**
+ * The construction of the dialog
+ */ 
+void EapUsernamePwdDialog::createDialog(const QVariantMap &parameters )
+{
+    OstTraceFunctionEntry0( EAPUSERNAMEPWDDIALOG_CREATEDIALOG_ENTRY );
+    qDebug("EapUsernamePwdDialog::createDialog ENTER");
+     
+    QString keyauthmethod = QString("authmethod");    
+    QString keyuname = QString("username");
+    QString keyeaptype = QString("eaptype");
+        
+    QString unamestr = QString("");
+    QString authMethodstr = QString("FOO");
+       
+    if ( parameters.empty() == false ) {
+        if ( parameters.contains(keyuname) ) {
+            QVariant variant = parameters.value(keyuname);
+            unamestr = variant.toString();
+            }
+        if ( parameters.contains(keyauthmethod) ) {
+            QVariant variant = parameters.value(keyauthmethod);
+            authMethodstr = variant.toString();
+            }    
+        } 
+    
+    QString labelText1 = QString(hbTrId("txt_occ_dialog_1_user_name").arg(authMethodstr));
+    QString labelText2 = QString(hbTrId("txt_occ_dialog_password"));
+    
+    //Set the dialog to be on the screen until user reacts
+    //by pressing any of the Action buttons
+    this->setModal(true);
+    this->setTimeout(HbPopup::NoTimeout);
+    this->setDismissPolicy(HbPopup::NoDismiss);    
+    this->setAdditionalRowVisible(true);
+    
+    this->setPromptText(labelText1, 0);   
+    mEdit1 = this->lineEdit(0);
+    mEdit1->setText(unamestr);
+    
+    this->setPromptText(labelText2, 1);   
+    mEdit2 = this->lineEdit(1);        
+            
+    QByteArray ba;
+    
+    if ( parameters.contains(keyeaptype) ) {
+        QVariant variant = parameters.value(keyeaptype);
+        ba = variant.toByteArray();
+        } 
+    Q_ASSERT( ba.isEmpty() == false );
+    
+    EapQtExpandedEapType e_type(ba);
+    EapQtConfigInterface eap_config_if;
+    
+    mUnameValidator = eap_config_if.validatorEap(e_type,
+                EapQtConfig::Username);
+    mUnameValidator->updateEditor(mEdit1);
+        
+    mPwdValidator = eap_config_if.validatorEap(e_type,
+                EapQtConfig::Password);    
+    mPwdValidator->updateEditor(mEdit2);
+        
+    QList<QAction*> action_list = this->actions();
+        
+    for ( int i = 0; i < action_list.count(); i++ ) {
+        this->removeAction(action_list.at(i));
+        } 
+    
+    HbAction* actionOk = new HbAction(hbTrId("txt_common_button_ok"),this); 
+    this->addAction(actionOk);
+    HbAction* actionCancel = new HbAction(hbTrId("txt_common_button_cancel"),this);
+    this->addAction( actionCancel );    
+     
+    disconnect(actionOk, SIGNAL(triggered()),this, SLOT(close()));
+    bool connected = connect(actionOk, SIGNAL(triggered()), this, SLOT(okPressed()));
+    Q_ASSERT(connected == true);
+    
+    disconnect(actionCancel, SIGNAL(triggered()),this, SLOT(close()));
+    connected = connect(actionCancel, SIGNAL(triggered()), this, SLOT(cancelPressed()));
+    Q_ASSERT(connected == true);
+    
+    // Connect the about to close and hide signals, so that we are able to inform 
+    // the caller that the dialog was closed   
+    connected = connect(this, SIGNAL(aboutToClose()), this, SLOT(closingDialog()));
+    Q_ASSERT(connected == true);
+    connected = connect(this, SIGNAL(aboutToHide()), this, SLOT(closingDialog()));
+    Q_ASSERT(connected == true);
+   
+    OstTraceFunctionExit0( DUP1_EAPUSERNAMEPWDDIALOG_CREATEDIALOG_EXIT );
+    qDebug("EapUsernamePwdDialog::createDialog EXIT");
+}
+
+/**
+ * Destructor
+ */
+EapUsernamePwdDialog::~EapUsernamePwdDialog()
+{
+    OstTraceFunctionEntry0( EAPUSERNAMEPWDDIALOG_DEAPUSERNAMEPWDDIALOG_ENTRY );
+    qDebug("EapUsernamePwdDialog::~EapUsernamePwdDialog");
+    
+    //The dialog widgets are deleted as the dialog is deleted
+    delete mPwdValidator;
+    delete mUnameValidator;
+    
+    OstTraceFunctionExit0( EAPUSERNAMEPWDDIALOG_DEAPUSERNAMEPWDDIALOG_EXIT );
+}
+
+/**
+ * Line edit validator
+ */
+bool EapUsernamePwdDialog::validate() const
+{
+    qDebug("EapUsernamePwdDialog::validate ENTER");
+    
+    bool valid = false;
+
+    if ( mUnameValidator->validate(mEdit1->text())== EapQtValidator::StatusOk   && 
+         mPwdValidator->validate(mEdit2->text()) == EapQtValidator::StatusOk ) {
+    
+        qDebug("EapUsernamePwdDialog::validate(): returns TRUE");
+        valid = true;
+    }
+
+    qDebug("EapUsernamePwdDialog::validate EXIT");
+    return valid;
+}
+
+/**
+ * Function is called when the Ok Action button is pressed
+ */
+void EapUsernamePwdDialog::okPressed()
+{
+    OstTraceFunctionEntry0( EAPUSERNAMEPWDDIALOG_OKPRESSED_ENTRY );
+    qDebug("EapUsernamePwdDialog::okPressed ENTER");
+    
+    if ( validate() == true && mOkActionPressed == false ) {
+        
+            mOkActionPressed = true;
+            
+            QVariantMap data;
+    
+            QString editStr1 = mEdit1->text();
+    
+            QString editStr2 = mEdit2->text();
+        
+            QVariant variant1(editStr1);
+    
+            QVariant variant2(editStr2);
+    
+            data["username"] = variant1;
+            data["password"] = variant2;
+      
+            qDebug("EapUsernamePwdDialog::okPressed: emit deviceDialogData");
+    
+            emit deviceDialogData(data); 
+            closeDeviceDialog(true);
+    }
+    OstTraceFunctionExit0( EAPUSERNAMEPWDDIALOG_OKPRESSED_EXIT );
+    qDebug("EapUsernamePwdDialog::okPressed EXIT");
+}
+
+/**
+ * Function is called when the Cancel Action button is pressed
+ */
+void EapUsernamePwdDialog::cancelPressed()
+{
+    OstTraceFunctionEntry0( EAPUSERNAMEPWDDIALOG_CANCELPRESSED_ENTRY );
+    qDebug("EapUsernamePwdDialog::cancelPressed ENTER");
+    
+    if (!mClose) {
+        mClose = true;
+        closeDeviceDialog(true);
+    }   
+    qDebug("EapUsernamePwdDialog::cancelPressed EXIT");
+    OstTraceFunctionExit0( EAPUSERNAMEPWDDIALOG_CANCELPRESSED_EXIT );
+}
+
+/**
+ * Function is called when the dialog is about to close
+ * 
+ */
+void EapUsernamePwdDialog::closingDialog()
+{
+    OstTraceFunctionEntry0( EAPUSERNAMEPWDDIALOG_CLOSINGDIALOG_ENTRY );
+    qDebug("EapUsernamePwdDialog::closingDialog ENTER");
+ 
+    closeDeviceDialog(false);
+    
+    qDebug("EapUsernamePwdDialog::closingDialog EXIT");
+    OstTraceFunctionExit0( EAPUSERNAMEPWDDIALOG_CLOSINGDIALOG_EXIT );
+}
+
+/**
+ * Updating the dialog during its showing is not allowed.
+ */ 
+bool EapUsernamePwdDialog::setDeviceDialogParameters
+                (const QVariantMap &parameters)
+{
+    OstTraceFunctionEntry0( EAPUSERNAMEPWDDIALOG_SETDEVICEDIALOGPARAMETERS_ENTRY );
+    
+    Q_UNUSED(parameters)
+    // changing the dialog after presenting it is not supported.
+    
+    OstTraceFunctionExit0( EAPUSERNAMEPWDDIALOG_SETDEVICEDIALOGPARAMETERS_EXIT );
+    return true;
+}
+
+/**
+ * Not supported, 0 always returned
+ */
+int EapUsernamePwdDialog::deviceDialogError() const
+{
+    OstTraceFunctionEntry0( EAPUSERNAMEPWDDIALOG_DEVICEDIALOGERROR_ENTRY );
+    OstTraceFunctionExit0( EAPUSERNAMEPWDDIALOG_DEVICEDIALOGERROR_EXIT);
+    return 0;
+}
+
+/**
+ * Dialog is closed and the signal about closing is emitted
+ */
+void EapUsernamePwdDialog::closeDeviceDialog(bool byClient)
+{   
+    OstTraceFunctionEntry0( EAPUSERNAMEPWDDIALOG_CLOSEDEVICEDIALOG_ENTRY );
+    qDebug("EapUsernamePwdDialog::closeDeviceDialog ENTER");
+        
+    //If the user closes the dialog, then the deviceDialogClosed is emitted
+    if ( byClient == true )
+        {
+        qDebug("EapUsernamePwdDialog::closeDeviceDialog: emit deviceDialogClosed");
+        emit deviceDialogClosed();
+        }
+    
+    qDebug("EapUsernamePwdDialog::closeDeviceDialog EXIT");
+    OstTraceFunctionExit0( EAPUSERNAMEPWDDIALOG_CLOSEDEVICEDIALOG_EXIT );
+}
+
+/**
+ * This dialog widget is returned to the caller
+ */
+HbPopup *EapUsernamePwdDialog::deviceDialogWidget() const
+{
+    OstTraceFunctionEntry0( EAPUSERNAMEPWDDIALOG_DEVICEDIALOGWIDGET_ENTRY );
+    OstTraceFunctionExit0( EAPUSERNAMEPWDDIALOG_DEVICEDIALOGWIDGET_EXIT );
+    
+    return const_cast<EapUsernamePwdDialog*>(this);
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/eapqtdialogs/traces/OstTraceDefinitions.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,21 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+#ifndef __OSTTRACEDEFINITIONS_H__
+#define __OSTTRACEDEFINITIONS_H__
+#include <opensystemtrace.h>
+#endif
--- a/securitysettings/inc/cpeapplugininterface.h	Thu May 13 22:51:27 2010 +0300
+++ b/securitysettings/inc/cpeapplugininterface.h	Mon May 24 20:32:47 2010 +0300
@@ -1,54 +1,66 @@
 /*
-* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: 
-*   Control Panel plug-in interface for EAP method configuration QT UIs
-*
-*/
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *   Control Panel plug-in interface for EAP method configuration QT UIs
+ *
+ */
 
 /*
-* %version: 1 %
-*/
-
+ * %version: 2 %
+ */
 
 #ifndef CPEAPPLUGININTERFACE_H
 #define CPEAPPLUGININTERFACE_H
 
 #include <QtPlugin>
-#include "eapqtplugininfo.h"
+#include <eapqtconfiginterface.h>
 
 class CpBaseSettingView;
-class EapQtConfigInterface;
+class EapQtPluginInfo;
+class EapQtPluginHandle;
 
+/*!
+ * @addtogroup group_eap_ui_plugin
+ * @{
+ */
 
+/*! Qt Plugin interface for EAP settings in Control Panel application.
+ * 
+ * All plugin stubs MUST be in 
+ * /resource/qt/plugins/controlpanel/eapsettings
+ */
 class CpEapPluginInterface
 {
 public:
+    /*! Destructor */
     virtual ~CpEapPluginInterface()
     {
     }
     ;
 
-    virtual void setEapQtConfigInterface(EapQtConfigInterface* configIf) = 0;
+    virtual void setSettingsReference(const EapQtConfigInterface::EapBearerType bearer,
+        const int iapId) = 0;
 
     virtual QList<EapQtPluginInfo> pluginInfo() = 0;
 
-    virtual CpBaseSettingView* uiInstance(
-        const EapQtPluginInfo &plugin) = 0;
+    virtual CpBaseSettingView* uiInstance(const EapQtPluginHandle& outerHandle,
+        const EapQtPluginInfo& plugin) = 0;
 };
 
 Q_DECLARE_INTERFACE(CpEapPluginInterface,
     "com.nokia.plugin.controlpanel.eap.platform.interface/1.0");
 
+/*! @} */
 
 #endif
--- a/securitysettings/inc/eapqtconfiginterface.h	Thu May 13 22:51:27 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: 
- *   EAP method configuration QT interface
- *
- */
-
-/*
- * %version: 1 %
- */
-
-#ifndef EAPQTCONFIGINTERFACE_H
-#define EAPQTCONFIGINTERFACE_H
-
-#include <qglobal.h>
-
-#ifdef BUILD_EAP_QT_CONFIG_INTERFACE_DLL
-#define EAP_QT_CONFIG_INTERFACE_EXPORT Q_DECL_EXPORT
-#else
-#define EAP_QT_CONFIG_INTERFACE_EXPORT Q_DECL_IMPORT
-#endif
-
-class EapQtPluginInfo;
-class EapQtPluginHandle;
-class CpBaseSettingView;
-
-class EAP_QT_CONFIG_INTERFACE_EXPORT EapQtConfigInterface
-{
-public:
-    enum EapBearerType
-    {
-        EapBearerTypeWlan, EapBearerTypeVpn,
-    };
-public:
-    EapQtConfigInterface(const EapBearerType bearerType, const int databaseIndex);
-    ~EapQtConfigInterface();
-
-    QList<EapQtPluginInfo> supportedOuterTypes() const;
-
-    CpBaseSettingView *uiInstance(const EapQtPluginHandle& pluginInfo) const;
-
-private:
-};
-
-#endif
-
--- a/securitysettings/inc/eapqtpluginhandle.h	Thu May 13 22:51:27 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: 
- *   Control Panel EAP plugin information
- *
- */
-
-/*
- * %version: 1 %
- */
-
-#ifndef EAPQTPLUGINHANDLE_H
-#define EAPQTPLUGINHANDLE_H
-
-#include <qglobal.h>
-
-#ifdef BUILD_EAP_QT_PLUGIN_INFO_DLL
-#define EAP_QT_PLUGIN_HANDLE_EXPORT Q_DECL_EXPORT
-#else
-#define EAP_QT_PLUGIN_HANDLE_EXPORT Q_DECL_IMPORT
-#endif
-
-class EAP_QT_PLUGIN_HANDLE_EXPORT EapQtPluginHandle
-{
-
-public:
-
-    EapQtPluginHandle();
-    ~EapQtPluginHandle();
-
-private:
-
-};
-
-#endif /* EAPQTPLUGINHANDLE_H */
--- a/securitysettings/inc/eapqtplugininfo.h	Thu May 13 22:51:27 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of the License "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: 
- *   Control Panel EAP plugin information
- *
- */
-
-/*
- * %version: 1 %
- */
-
-#ifndef EAPQTPLUGININFO_H
-#define EAPQTPLUGININFO_H
-
-#include "eapqtpluginhandle.h"
-
-#ifdef BUILD_EAP_QT_PLUGIN_INFO_DLL
-#define EAP_QT_PLUGIN_INFO_EXPORT Q_DECL_EXPORT
-#else
-#define EAP_QT_PLUGIN_INFO_EXPORT Q_DECL_IMPORT
-#endif
-
-class EAP_QT_PLUGIN_INFO_EXPORT EapQtPluginInfo
-{
-public:
-    EapQtPluginInfo(EapQtPluginHandle id, QString locId, int orderNumber );
-    ~EapQtPluginInfo();
-
-    EapQtPluginHandle pluginHandle() const;
-    QString localizationId() const;
-    int orderNumber() const;
-    
-private:
-    EapQtPluginInfo();
-
-private:
-};
-
-#endif
--- a/securitysettings/qtconfigutils/eapqtconfiginterface/eapqtconfiginterface.pro	Thu May 13 22:51:27 2010 +0300
+++ b/securitysettings/qtconfigutils/eapqtconfiginterface/eapqtconfiginterface.pro	Mon May 24 20:32:47 2010 +0300
@@ -7,7 +7,7 @@
 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
 #
 # Initial Contributors:
-# Nokia Corporation - initial contribution.
+# 	Nokia Corporation - initial contribution.
 #
 # Contributors:
 #
@@ -15,58 +15,77 @@
 #	EAP method configuration QT interface
 #
 
-# %version: 1 %
+# %version: 17 %
 
 
 TEMPLATE            = lib
 TARGET              = eapqtconfiginterface
-TARGET.CAPABILITY   = CAP_GENERAL_DLL
+
+# to export the public class
 DEFINES             += BUILD_EAP_QT_CONFIG_INTERFACE_DLL
 DEPENDPATH          += . 
 
-# Store generated files to their own directories
-MOC_DIR     = _moc
-RCC_DIR     = _rcc
-OBJECTS_DIR = _objects
-
-# hb config needed when hb classes are used
+# for using hb classes
 CONFIG += hb
 
-LIBS += \
-    -leapqtplugininfo
+# translations
+TRANSLATIONS = cpeapuiplugins.ts
+
+# Storage for generated files
+MOC_DIR     = _build
+RCC_DIR     = _build
+OBJECTS_DIR = _build
+
+# path to def files
+defFilePath = .
 
 INCLUDEPATH += \
-	../../inc \
-    $$MW_LAYER_SYSTEMINCLUDE \
-    $$OS_LAYER_SYSTEMINCLUDE
-    
-HEADERS += 
-
+    ../../inc
+   
+HEADERS += \
+    inc/eapqtcertificateinfo_p.h \
+    inc/eapqtconfig_p.h \
+    inc/eapqtconfiginterface_p.h \
+    inc/eapqtvalidatorpassword.h \
+    inc/eapqtvalidatorrealm.h \
+    inc/eapqtvalidatorusername.h
+     
 SOURCES += \
-    src/eapqtconfiginterface.cpp
+    src/eapqtconfiginterface.cpp \
+    src/eapqtconfiginterface_p.cpp \
+    src/eapqtcertificateinfo.cpp \
+    src/eapqtcertificateinfo_p.cpp \
+    src/eapqtconfig.cpp \
+    src/eapqtconfig_p.cpp \
+    src/eapqtvalidatorpassword.cpp \
+    src/eapqtvalidatorrealm.cpp \
+    src/eapqtvalidatorusername.cpp
     
-defFilePath = ..
-
+# qt libs
+LIBS += \
+    -leapqtplugininfo
+    
 symbian { 
-    # no Symbian only headers
-    HEADERS += 
     
-    # no Symbian only sources
-    SOURCES += 
+    # symbian libs
+    LIBS += \
+        -leapsymbiantools \
+        -leaptools \
+        -leaptrace \
+        -lecom \
+        -lcmmanager
     
-    # add needed Symbian libs here
-    LIBS += 
-        
     TARGET.UID3 = 0x2002C2FC
     TARGET.EPOCALLOWDLLDATA = 1
     
     TARGET.CAPABILITY = CAP_GENERAL_DLL
     
-    # exports not frozen yet
-    # MMP_RULES += EXPORTUNFROZEN
-    BLD_INF_RULES.prj_exports += \
-        "$${LITERAL_HASH}include <platform_paths.hrh>"
-        
+    # TODO: exports not frozen yet
+    MMP_RULES += EXPORTUNFROZEN
+            
     BLD_INF_RULES.prj_exports += \ 
   		"rom/eapqtconfiginterface.iby CORE_MW_LAYER_IBY_EXPORT_PATH(eapqtconfiginterface.iby)"
+
+    BLD_INF_RULES.prj_exports += \ 
+  		"rom/eapqtconfiginterface_resources.iby LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(eapqtconfiginterface_resources.iby)"
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/eapqtconfiginterface/inc/eapqtcertificateinfo_p.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   Certificate information data structure for EAP QT configuration interface
+ *
+ */
+
+/*
+ * %version: 2 %
+ */
+
+#ifndef EAPQTCERTIFICATEINFO_P_H
+#define EAPQTCERTIFICATEINFO_P_H
+
+#include <QHash>
+#include <QVariant>
+
+class EapQtCertificateInfoPrivate
+{
+public:
+
+    EapQtCertificateInfoPrivate();
+    ~EapQtCertificateInfoPrivate();
+    
+    // copy constructor
+    EapQtCertificateInfoPrivate(const EapQtCertificateInfoPrivate &certInfo);
+    // assignment operator
+    EapQtCertificateInfoPrivate &operator=(const EapQtCertificateInfoPrivate &certInfo);
+
+    QVariant value(int id);
+    void setValue(int id, QVariant newValue);
+
+private:
+
+    QHash<int, QVariant> mCerts;
+
+};
+
+#endif /* EAPQTCERTIFICATEINFO_P_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/eapqtconfiginterface/inc/eapqtconfig_p.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   EAP method QT configuration
+ *
+ */
+
+/*
+ * %version: 4 %
+ */
+
+#ifndef EAPQTCONFIG_P_H
+#define EAPQTCONFIG_P_H
+
+#include <QHash>
+#include <QVariant>
+
+class EapQtConfigPrivate
+{
+    friend class EapQtConfig;
+
+public:
+    EapQtConfigPrivate();
+    ~EapQtConfigPrivate();
+
+private:
+    Q_DISABLE_COPY(EapQtConfigPrivate)
+    QHash<int, QVariant> mSettings;
+};
+
+#endif /* EAPQTCONFIG_P_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/eapqtconfiginterface/inc/eapqtconfiginterface_p.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,181 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   EAP method configuration QT interface private implementation
+ *
+ */
+
+/*
+ * %version: 28 %
+ */
+
+#ifndef EAPQTCONFIGINTERFACEPRIVATE_H
+#define EAPQTCONFIGINTERFACEPRIVATE_H
+
+#include <qglobal.h>
+#include <EapSettings.h>
+#include <EapTypeDefinitions.h>
+#include <eapqtconfig.h>
+#include <eapqtpluginhandle.h>
+#include <eapqtconfiginterface.h>
+
+/*!
+ * @addtogroup group_eap_config_if_impl
+ * @{
+ */
+class HbTranslator;
+class CEapType;
+class CEapGeneralSettings;
+class CpEapPluginInterface;
+class EapQtConfigInterface;
+
+class EapQtConfigInterfacePrivate
+{
+public:
+
+    // TODO: check all certificate fields. Are they treated correctly, unicode vs. ascii vs. binary?
+
+    // maximum lenghts (number of characters) for UTF-16 strings copied to EAP settings
+    static const unsigned int StringMaxLength = KGeneralStringMaxLength;
+    static const unsigned int CertLabelMaxLength = KMaxCertLabelLength;
+    static const unsigned int CertThumbprintMaxLength = KThumbprintMaxLength;
+    static const unsigned int CertSubjectKeyIdLength = KSHA1HashLengthBytes;
+
+public:
+
+    // the constructor can only be used for validators
+    // any other call trows an exception
+    EapQtConfigInterfacePrivate();
+
+    // this is the constructor for using the interface for accessing settings etc.
+    // if iapId is negative, it must be later set to correct value with setConfigurationReference
+    // to be able to use the methods:
+    // - selectedOuterTypes
+    // - readConfiguration
+    // - saveConfiguration
+    // - deleteConfiguration
+    // other methods are usable with negative iapId
+    EapQtConfigInterfacePrivate(const EapQtConfigInterface::EapBearerType bearerType,
+        const int iapId);
+
+    ~EapQtConfigInterfacePrivate();
+
+    QList<EapQtPluginInfo> supportedOuterTypes();
+    QList<EapQtPluginInfo> supportedInnerTypes(const EapQtPluginHandle &outerType);
+
+    bool isSupportedOuterType(const EapQtPluginHandle& handle);
+    bool isSupportedInnerType(const EapQtPluginHandle& outerHandle,
+        const EapQtPluginHandle& innerHandle);
+
+    QList<EapQtCertificateInfo> certificateAuthorityCertificates();
+    QList<EapQtCertificateInfo> userCertificates();
+
+    EapQtValidator *validatorEap(EapQtExpandedEapType type, EapQtConfig::SettingsId id);
+
+    CpBaseSettingView *uiInstance(const EapQtPluginHandle& outerHandle,
+        const EapQtPluginHandle& pluginHandle);
+
+    // if iapId was negative in the constructor, this method must be called before
+    // calling the following methods
+    bool setConfigurationReference(const int iapId);
+
+    QList<EapQtPluginHandle> selectedOuterTypes();
+    bool setSelectedOuterTypes(const QList<EapQtPluginHandle>& outerHandles);
+
+    bool readConfiguration(const EapQtPluginHandle& outerHandle,
+        const EapQtPluginHandle& pluginHandle, EapQtConfig &config);
+    bool saveConfiguration(const EapQtPluginHandle& pluginHandle, EapQtConfig &config);
+
+    bool deleteConfiguration();
+
+private:
+
+    void loadPlugins();
+
+    bool fetchCertificates(QList<EapQtCertificateInfo>* const caInfos,
+        QList<EapQtCertificateInfo>* const clientInfos);
+
+    void copyCertificateInfo(const RPointerArray<EapCertificateEntry>* const certEntries, QList<
+        EapQtCertificateInfo>* const certInfos);
+
+    void appendCertificateInfo(bool isCaCertificate, const EapQtCertificateInfo& certInfo,
+        RPointerArray<EapCertificateEntry>* const certList);
+
+    void appendEapTypes(const RArray<TEapExpandedType>* const eapTypes,
+        QList<QByteArray>* const eapList);
+
+    void getEapTypeIf(const EapQtPluginHandle& pluginHandle);
+
+    void copyFromEapSettings(EAPSettings& eapSettings, EapQtConfig& config);
+
+    void copyToEapSettings(EapQtConfig& config, EAPSettings& eapSettings);
+
+    TBool convertToTbool(bool value);
+    bool convertToBool(TBool value);
+
+    bool isUiSupported(const QByteArray &eapType, int &pluginIndex) const;
+
+    void checkInstanceThrowing() const;
+
+    bool setEapDbIndex(const int iapId);
+    bool setEapWlanDbIndex(const int iapId);
+
+    void shutdown();
+
+    EapQtConfigInterface::EapBearerType getEapBearer();
+
+private:
+
+    Q_DISABLE_COPY(EapQtConfigInterfacePrivate)
+
+    const bool mValidatorInstance;
+
+    // list of available EAP UIs
+    QList<CpEapPluginInterface*> mPlugins;
+
+    // list of EAPs supported by UI
+    QList<EapQtPluginInfo> mPluginInfos;
+
+    // list of supported outer EAP methods,
+    // combination of UI and EAP server support
+    QList<EapQtPluginInfo> mSupportedOuterTypes;
+
+    // list of supported inner EAP methods queried last time,
+    // combination of UI and EAP server support
+    QList<EapQtPluginInfo> mSupportedInnerTypes;
+    EapQtPluginHandle mLastOuterHandle;
+
+    QScopedPointer<HbTranslator> mTranslator;
+
+private:
+
+    QScopedPointer<CEapGeneralSettings> mEapGsIf;
+    QScopedPointer<CEapType> mEapTypeIf;
+
+    int mIapId;
+    TIndexType mEapBearer;
+    TInt mEapDbIndex;
+    bool mEapDbIndexValid;
+    TEapExpandedType mCurrentServerEapType;
+
+    // EAP server lists of its supported outer EAP methods
+    RArray<TEapExpandedType> mOuterEapsOn;
+    RArray<TEapExpandedType> mOuterEapsOff;
+
+};
+
+/*! @} */
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/eapqtconfiginterface/inc/eapqtvalidatorpacstorepassword.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   EAP method validator: PAC Store password
+ *
+ */
+
+/*
+ * %version: 4 %
+ */
+
+#ifndef EAPQTVALIDATOR_PACSTOREPASSWORD_H
+#define EAPQTVALIDATOR_PACSTOREPASSWORD_H
+
+#include <eapqtvalidator.h>
+
+/*!
+ * @addtogroup group_eap_config_if_impl
+ * @{
+ */
+/*!
+ */
+class EapQtValidatorPacStorePassword : public EapQtValidator
+{
+public:
+    EapQtValidatorPacStorePassword();
+    ~EapQtValidatorPacStorePassword();
+
+    virtual EapQtValidator::Status validate(QVariant value);
+    
+    virtual void updateEditor(HbLineEdit *edit);
+private:
+    Q_DISABLE_COPY(EapQtValidatorPacStorePassword)
+    // TODO: handle to some object to validate password with EAP Server
+};
+
+/*! @} */
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/eapqtconfiginterface/inc/eapqtvalidatorpacstorepasswordconfirm.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   EAP method validator: PAC Store password confirmation
+ *
+ */
+
+/*
+ * %version: 3 %
+ */
+
+#ifndef EAPQTVALIDATOR_PACSTOREPASSWORDCONFIRM_H
+#define EAPQTVALIDATOR_PACSTOREPASSWORDCONFIRM_H
+
+#include <eapqtvalidator.h>
+
+/*!
+ * @addtogroup group_eap_config_if_impl
+ * @{
+ */
+/*!
+ */
+class EapQtValidatorPacStorePasswordConfirm : public EapQtValidator
+{
+public:
+    EapQtValidatorPacStorePasswordConfirm();
+    ~EapQtValidatorPacStorePasswordConfirm();
+
+    virtual EapQtValidator::Status validate(QVariant value);
+    
+    virtual void updateEditor(HbLineEdit *edit);
+private:
+    Q_DISABLE_COPY(EapQtValidatorPacStorePasswordConfirm)
+    // TODO: handle to some object to validate password with EAP Server
+};
+
+/*! @} */
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/eapqtconfiginterface/inc/eapqtvalidatorpassword.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   EAP method validator: password 
+ *
+ */
+
+/*
+ * %version: 3 %
+ */
+
+#ifndef EAPQTVALIDATOR_PASSWORD_H
+#define EAPQTVALIDATOR_PASSWORD_H
+
+#include <eapqtvalidator.h>
+#include <eapqtexpandedeaptype.h>
+
+/*!
+ * @addtogroup group_eap_config_if_impl
+ * @{
+ */
+/*!
+ */
+class EapQtValidatorPassword : public EapQtValidator
+{
+public:
+
+    EapQtValidatorPassword(EapQtExpandedEapType type);
+    ~EapQtValidatorPassword();
+
+    // from EapQtValidator
+    EapQtValidator::Status validate(QVariant value);
+    void updateEditor(HbLineEdit *edit);
+
+private:
+
+    EapQtValidatorPassword();
+    Q_DISABLE_COPY(EapQtValidatorPassword)
+
+    EapQtValidator::Status validateGeneral(QVariant value);
+    void updateEditorGeneral(HbLineEdit *edit);
+
+private:
+    EapQtExpandedEapType mEapType;
+
+};
+
+/*! @} */
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/eapqtconfiginterface/inc/eapqtvalidatorrealm.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   EAP method validator: realm
+ *
+ */
+
+/*
+ * %version: 3 %
+ */
+
+#ifndef EAPQTVALIDATOR_REALM_H
+#define EAPQTVALIDATOR_REALM_H
+
+#include <eapqtvalidator.h>
+#include <eapqtexpandedeaptype.h>
+
+/*!
+ * @addtogroup group_eap_config_if_impl
+ * @{
+ */
+/*!
+ */
+class EapQtValidatorRealm : public EapQtValidator
+{
+public:
+
+    EapQtValidatorRealm(EapQtExpandedEapType type);
+    ~EapQtValidatorRealm();
+
+    // from EapQtValidator
+    EapQtValidator::Status validate(QVariant value);
+    void updateEditor(HbLineEdit *edit);
+
+private:
+
+    EapQtValidatorRealm();
+    Q_DISABLE_COPY(EapQtValidatorRealm)
+
+    EapQtValidator::Status validateGeneral(QVariant value);
+    void updateEditorGeneral(HbLineEdit *edit);
+
+private:
+    EapQtExpandedEapType mEapType;
+
+};
+
+/*! @} */
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/eapqtconfiginterface/inc/eapqtvalidatorusername.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   EAP method validator: username
+ *
+ */
+
+/*
+ * %version: 3 %
+ */
+
+#ifndef EAPQTVALIDATOR_USERNAME_H
+#define EAPQTVALIDATOR_USERNAME_H
+
+#include <eapqtvalidator.h>
+#include <eapqtexpandedeaptype.h>
+
+/*!
+ * @addtogroup group_eap_config_if_impl
+ * @{
+ */
+/*!
+ */
+class EapQtValidatorUsername: public EapQtValidator
+{
+public:
+
+    EapQtValidatorUsername(EapQtExpandedEapType type);
+    ~EapQtValidatorUsername();
+
+    // from EapQtValidator
+    EapQtValidator::Status validate(QVariant value);
+    void updateEditor(HbLineEdit *edit);
+
+private:
+
+    EapQtValidatorUsername();
+    Q_DISABLE_COPY(EapQtValidatorUsername)
+
+    EapQtValidator::Status validateGeneral(QVariant value);
+    void updateEditorGeneral(HbLineEdit *edit);
+
+private:
+    EapQtExpandedEapType mEapType;
+
+};
+
+/*! @} */
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/eapqtconfiginterface/inc/pacstoreconfig.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *   PAC store configuration data
+ *
+ */
+
+/*
+ * %version: 1 %
+ */
+
+#ifndef EAPQTPACSTORECONFIG_H
+#define EAPQTPACSTORECONFIG_H
+
+#include <QList>
+#include <QVariant>
+
+#ifdef BUILD_EAP_QT_CONFIG_INTERFACE_DLL
+#define EAP_QT_CONFIG_EXPORT Q_DECL_EXPORT
+#else
+#define EAP_QT_CONFIG_EXPORT Q_DECL_IMPORT
+#endif
+
+class EapQtPacStoreConfigPrivate;
+
+class EAP_QT_CONFIG_EXPORT EapQtPacStoreConfig
+{
+public:
+
+    enum PacStoreState {
+        PacStoreStateNotExists = 0,
+        PacStoreStatePasswordConfirmationRequired,
+        PacStoreStateConfirmed,
+    };
+
+    enum PacStoreSettings {
+        /*! TODO: PAC Store API, see EapFastPacStore.h */
+        /*! write-only: QString, sets the state to PacStoreStateConfirmed */
+        PacStorePassword,
+        /*! write-only: invalid QVariant */
+        PacStoreReset,
+        /*! read-only: int (PacStoreState) */
+        PacStoreState,
+        /*! no write nor read operation. for validator only */
+        PacStorePasswordConfirmation,
+    };
+
+public:
+    EapQtPacStoreConfig();
+    ~EapQtPacStoreConfig();
+
+    QVariant value(PacStoreSettings id);
+    void setValue(PacStoreSettings id, QVariant newValue);
+    void clear();
+
+private:
+    Q_DISABLE_COPY(EapQtPacStoreConfig)
+    QScopedPointer<EapQtPacStoreConfigPrivate> d_ptr;
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/eapqtconfiginterface/rom/eapqtconfiginterface.iby	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*   EAP method configuration QT interface
+*
+*/
+
+/*
+* %version: 4 %
+*/
+
+#ifndef EAPQTCONFIGINTERFACE_IBY
+#define EAPQTCONFIGINTERFACE_IBY
+
+#include <data_caging_paths_for_iby.hrh>
+#include <bldvariant.hrh>
+
+#ifdef __PROTOCOL_WLAN
+
+file=ABI_DIR\BUILD_DIR\eapqtconfiginterface.dll 	SHARED_LIB_DIR\eapqtconfiginterface.dll
+
+#endif  // __PROTOCOL_WLAN
+
+#endif  // EAPQTCONFIGINTERFACE_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/eapqtconfiginterface/rom/eapqtconfiginterface_resources.iby	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,35 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*   EAP method configuration QT interface
+*
+*/
+
+/*
+* %version: 1 %
+*/
+
+#ifndef EAPQTCONFIGINTERFACE_RES_IBY
+#define EAPQTCONFIGINTERFACE_RES_IBY
+
+#include <data_caging_paths_for_iby.hrh>
+#include <bldvariant.hrh>
+
+#ifdef __PROTOCOL_WLAN
+
+data=DATAZ_/QT_TRANSLATIONS_DIR/cpeapuiplugins.qm 	QT_TRANSLATIONS_DIR/cpeapuiplugins.qm 
+
+#endif  // __PROTOCOL_WLAN
+
+#endif  // EAPQTCONFIGINTERFACE_RES_IBY
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/eapqtconfiginterface/src/eapqtcertificateinfo.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   Certificate information data structure for EAP QT configuration interface
+ *
+ */
+
+/*
+ * %version: 5 %
+ */
+
+#include "eapqtcertificateinfo.h"
+#include "eapqtcertificateinfo_p.h"
+
+//----------------------------------------------------------------------------
+//              EapQtCertificateInfo                
+//----------------------------------------------------------------------------
+
+
+EapQtCertificateInfo::EapQtCertificateInfo() :
+    d_ptr(new EapQtCertificateInfoPrivate)
+{
+}
+
+EapQtCertificateInfo::~EapQtCertificateInfo()
+{
+    // scoped pointer deleted automatically
+}
+
+EapQtCertificateInfo::EapQtCertificateInfo(const EapQtCertificateInfo &certInfo) :
+    d_ptr(new EapQtCertificateInfoPrivate(*(certInfo.d_ptr)))
+{
+}
+
+EapQtCertificateInfo& EapQtCertificateInfo::operator=(const EapQtCertificateInfo &certInfo)
+{
+    // check if assigning to myself
+    if (this != &certInfo) {
+        d_ptr.reset(new EapQtCertificateInfoPrivate(*(certInfo.d_ptr)));
+    }
+    return *this;
+}
+
+QVariant EapQtCertificateInfo::value(ItemId id) const
+{
+    // check for valid range, otherwise memory is consumed for no reason
+    if(id >= ItemIdLast) {
+        qDebug("ERROR: EapQtCertificateInfo::value - invalid id!");
+        return QVariant::Invalid;
+    }
+    return d_ptr->value(id);
+}
+
+void EapQtCertificateInfo::setValue(ItemId id, QVariant newValue)
+{
+    // check for valid range, otherwise memory is consumed for no reason
+    if(id < ItemIdLast) {
+        d_ptr->setValue(id, newValue);
+    } else {
+        qDebug("ERROR: EapQtCertificateInfo::setValue - invalid id!");
+    }
+    return;
+
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/eapqtconfiginterface/src/eapqtcertificateinfo_p.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   Certificate information data structure for EAP QT configuration interface
+ *
+ */
+
+/*
+ * %version: 4 %
+ */
+
+#include "eapqtcertificateinfo_p.h"
+
+//----------------------------------------------------------------------------
+//              EapQtCertificateInfoPrivate                
+//----------------------------------------------------------------------------
+
+EapQtCertificateInfoPrivate::EapQtCertificateInfoPrivate()
+{
+}
+
+EapQtCertificateInfoPrivate::~EapQtCertificateInfoPrivate()
+{
+}
+
+EapQtCertificateInfoPrivate::EapQtCertificateInfoPrivate(
+    const EapQtCertificateInfoPrivate &certInfo)
+{
+    mCerts = certInfo.mCerts;
+}
+
+EapQtCertificateInfoPrivate& EapQtCertificateInfoPrivate::operator=(
+    const EapQtCertificateInfoPrivate &certInfo)
+{
+    // check if assigning to myself
+    if(this != &certInfo) 
+    {
+        mCerts = certInfo.mCerts;
+    }
+    return *this;
+}
+
+QVariant EapQtCertificateInfoPrivate::value(int id)
+{
+    return mCerts[id];
+}
+
+void EapQtCertificateInfoPrivate::setValue(int id, QVariant newValue)
+{
+    mCerts[id] = newValue;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/eapqtconfiginterface/src/eapqtconfig.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,153 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   EAP method QT configuration
+ *
+ */
+
+/*
+ * %version: 8 %
+ */
+
+#include "eapqtconfig.h"
+#include "eapqtconfig_p.h"
+
+//----------------------------------------------------------------------------
+//              EapQtConfig                
+//----------------------------------------------------------------------------
+
+/*!
+ * TODO: check the list
+ * 
+ * EAP-SIM (TypeEapSim), EAP-AKA (TypeEapAka)
+ * - UsernameAutomatic
+ * - Username
+ * - RealmAutomatic
+ * - Realm
+ * - UsePseudonyms
+ * - SessionValidityTime
+ * - Notifications
+ * 
+ * EAP-GTC (TypeEapGtc), LEAP (TypeLeap), 
+ * EAP-MSCHAPv2 (TypeEapMschapv2), Plain MSCHAPv2 (TypePlainMschapv2),
+ * PAP (TypePap)
+ * - Username
+ * - PasswordPrompt
+ * - Password
+ * - Notifications
+ * 
+ * EAP-TLS (TypeEapTls)
+ * - AuthorityCertificateAutomatic
+ * - AuthorityCertificate
+ * - UserCertificate
+ * - UsernameAutomatic
+ * - Username
+ * - RealmAutomatic
+ * - Realm
+ * - TlsPrivacy
+ * - Notifications
+ * - CipherSuites
+ * 
+ * EAP-TTLS (TypeEapTtls)
+ * - AuthorityCertificateAutomatic
+ * - AuthorityCertificate
+ * - UserCertificate
+ * - UsernameAutomatic
+ * - Username
+ * - RealmAutomatic
+ * - Realm
+ * - TlsPrivacy
+ * - InnerType
+ * - Notifications
+ * - CipherSuites
+ * 
+ * EAP-FAST (TypeEapFast)
+ * - ProvisioningModeAuthenticated
+ * - ProvisioningModeUnAuthenticated
+ * - AuthorityCertificateAutomatic
+ * - AuthorityCertificate
+ * - UserCertificate
+ * - UsernameAutomatic
+ * - Username
+ * - RealmAutomatic
+ * - Realm
+ * - ServerNameVerify
+ * - ServerName
+ * - TlsPrivacy
+ * - InnerType
+ * - PacStorePassword
+ * - PacStoreReset
+ * - CipherSuites
+ * 
+ * PEAP (TypePeap)
+ * - AuthorityCertificateAutomatic
+ * - AuthorityCertificate
+ * - UserCertificate
+ * - UsernameAutomatic
+ * - Username
+ * - RealmAutomatic
+ * - Realm
+ * - ServerNameVerify
+ * - ServerName
+ * - TlsPrivacy
+ * - PeapVersion
+ * - InnerType
+ * - Notifications
+ * - CipherSuites
+ */
+EapQtConfig::EapQtConfig() :
+    d_ptr(new EapQtConfigPrivate)
+{
+}
+
+EapQtConfig::~EapQtConfig()
+{
+    // scoped pointer deleted automatically
+}
+
+QVariant EapQtConfig::value(SettingsId id)
+{
+    // check for valid range, otherwise memory is consumed for no reason
+    if(id >= SettingsIdLast) {
+        qDebug("ERROR: EapQtConfig::value - invalid id!");
+        return QVariant::Invalid;
+    }
+    return d_ptr->mSettings[id];
+}
+
+void EapQtConfig::setValue(SettingsId id, QVariant newValue)
+{
+    // check for valid range, otherwise memory is consumed for no reason
+    if(id < SettingsIdLast) {
+        d_ptr->mSettings[id] = newValue;
+    } else {
+        qDebug("ERROR: EapQtConfig::setValue - invalid id!");
+    }
+    return;
+}
+
+void EapQtConfig::clear() {
+    d_ptr->mSettings.clear();
+    return;
+}
+
+QList<EapQtConfig::SettingsId> EapQtConfig::validate(
+    QList<EapQtConfig::SettingsId> ids)
+{
+    // TODO: allow validation only for 0 < id < SettingsIdLast
+    Q_UNUSED(ids);
+    return QList<EapQtConfig::SettingsId>();
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/eapqtconfiginterface/src/eapqtconfig_p.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   EAP method QT configuration
+ *
+ */
+
+/*
+ * %version: 2 %
+ */
+
+#include "eapqtconfig_p.h"
+
+//----------------------------------------------------------------------------
+//              EapConfigurationPrivate                
+//----------------------------------------------------------------------------
+EapQtConfigPrivate::EapQtConfigPrivate()
+{
+}
+
+EapQtConfigPrivate::~EapQtConfigPrivate()
+{
+}
--- a/securitysettings/qtconfigutils/eapqtconfiginterface/src/eapqtconfiginterface.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/securitysettings/qtconfigutils/eapqtconfiginterface/src/eapqtconfiginterface.cpp	Mon May 24 20:32:47 2010 +0300
@@ -17,38 +17,108 @@
  */
 
 /*
- * %version: 1 %
+ * %version: 21 %
  */
 
 #include <QList>
 
-#include "eapqtconfiginterface.h"
+#include <eapqtconfiginterface.h>
+#include <eapqtexpandedeaptype.h>
+
+#include "eapqtconfiginterface_p.h"
 #include "cpeapplugininterface.h"
-#include "eapqtplugininfo.h"
 
 //----------------------------------------------------------------------------
 //              EapQtConfigInterface
 //----------------------------------------------------------------------------
 
-// stub implementation for now
 
-EapQtConfigInterface::EapQtConfigInterface(const EapBearerType /* bearerType */, const int /* databaseIndex */)
+EapQtConfigInterface::EapQtConfigInterface() :
+    d_ptr(new EapQtConfigInterfacePrivate)
+{
+}
+
+EapQtConfigInterface::EapQtConfigInterface(const EapBearerType bearerType, const int iapId) :
+    d_ptr(new EapQtConfigInterfacePrivate(bearerType, iapId))
 {
 }
 
 EapQtConfigInterface::~EapQtConfigInterface()
 {
+    // d_ptr is scoped pointer, deleted automatically
+}
+
+bool EapQtConfigInterface::setConfigurationReference(const int iapId) const
+{
+    return d_ptr->setConfigurationReference(iapId);
 }
 
 QList<EapQtPluginInfo> EapQtConfigInterface::supportedOuterTypes() const
 {
-    // stub
-    QList<EapQtPluginInfo> tmp;
-    return tmp;
+    return d_ptr->supportedOuterTypes();
+}
+
+QList<EapQtPluginInfo> EapQtConfigInterface::supportedInnerTypes(const EapQtPluginHandle outerType) const
+{
+    return d_ptr->supportedInnerTypes(outerType);
+}
+
+QList<EapQtCertificateInfo> EapQtConfigInterface::certificateAuthorityCertificates() const
+{
+    return d_ptr->certificateAuthorityCertificates();
+}
+
+QList<EapQtCertificateInfo> EapQtConfigInterface::userCertificates() const
+{
+    return d_ptr->userCertificates();
+}
+
+CpBaseSettingView *EapQtConfigInterface::uiInstance(const EapQtPluginHandle& outerHandle,
+    const EapQtPluginHandle &pluginHandle) const
+{
+    return d_ptr->uiInstance(outerHandle, pluginHandle);
+}
+
+QList<EapQtPluginHandle> EapQtConfigInterface::selectedOuterTypes() const
+{
+    return d_ptr->selectedOuterTypes();
+}
+
+bool EapQtConfigInterface::isSupportedOuterType(const EapQtPluginHandle& handle) const
+{
+    return d_ptr->isSupportedOuterType(handle);
 }
 
-CpBaseSettingView *EapQtConfigInterface::uiInstance(const EapQtPluginHandle& /* pluginInfo */) const
+bool EapQtConfigInterface::isSupportedInnerType(const EapQtPluginHandle& outerHandle,
+    const EapQtPluginHandle& innerHandle) const
+{
+    return d_ptr->isSupportedInnerType(outerHandle, innerHandle);
+}
+
+bool EapQtConfigInterface::setSelectedOuterTypes(const QList<EapQtPluginHandle>& outerHandles) const
+{
+    return d_ptr->setSelectedOuterTypes(outerHandles);
+}
+
+bool EapQtConfigInterface::readConfiguration(const EapQtPluginHandle& outerHandle,
+    const EapQtPluginHandle& pluginHandle, EapQtConfig &config) const
 {
-    // stub
-    return NULL;
+    return d_ptr->readConfiguration(outerHandle, pluginHandle, config);
+}
+
+bool EapQtConfigInterface::saveConfiguration(const EapQtPluginHandle& pluginInfo,
+    EapQtConfig &config) const
+{
+    return d_ptr->saveConfiguration(pluginInfo, config);
 }
+
+bool EapQtConfigInterface::deleteConfiguration() const
+{
+    return d_ptr->deleteConfiguration();
+}
+
+EapQtValidator *EapQtConfigInterface::validatorEap(EapQtExpandedEapType type,
+    EapQtConfig::SettingsId id)
+{
+    return d_ptr->validatorEap(type, id);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/eapqtconfiginterface/src/eapqtconfiginterface_p.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,1801 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   EAP method configuration QT interface
+ *
+ */
+
+/*
+ * %version: 39 %
+ */
+
+#include <QDir>
+#include <QList>
+#include <QVariant>
+#include <QPluginLoader>
+#include <HbTranslator>
+#include <QLocale>
+#include <QCoreApplication>
+#include <QDebug>
+
+#include <cmmanager.h>
+#include <cmpluginwlandef.h>
+#include <EapGeneralSettings.h>
+
+#include <eapqtplugininfo.h>
+#include <eapqtcertificateinfo.h>
+
+#include "cpeapplugininterface.h"
+#include "eapqtconfiginterface_p.h"
+
+// validators
+#include "eapqtvalidatorpassword.h"
+#include "eapqtvalidatorusername.h"
+#include "eapqtvalidatorrealm.h"
+
+static const QString eapPluginDir("\\resource\\qt\\plugins\\controlpanel\\eapsecurity");
+static const QString eapTranslationFile("cpeapuiplugins");
+
+EapQtConfigInterfacePrivate::EapQtConfigInterfacePrivate() :
+  mValidatorInstance(true),
+  mLastOuterHandle(EapQtPluginHandle::PluginUndefined),
+  mTranslator(NULL),
+  mEapGsIf(NULL), 
+  mEapTypeIf(NULL),
+  mIapId(0),
+  mEapBearer(ELan),
+  mEapDbIndex(EapQtConfigInterface::IapIdUndefined),
+  mEapDbIndexValid(false)
+{
+    qDebug("EapQtConfigInterfacePrivate() - created validator instance, this = 0x%08x", this);
+
+}
+
+EapQtConfigInterfacePrivate::EapQtConfigInterfacePrivate(/* EapQtConfigInterface *configIf, */
+    const EapQtConfigInterface::EapBearerType bearerType, const int iapId) :  
+  mValidatorInstance(false),
+  mLastOuterHandle(EapQtPluginHandle::PluginUndefined),
+  mTranslator(NULL), 
+  mEapGsIf(NULL), 
+  mEapTypeIf(NULL),
+  mIapId(iapId),
+  mEapBearer(ELan),
+  mEapDbIndex(EapQtConfigInterface::IapIdUndefined),
+  mEapDbIndexValid(false)
+{
+    qDebug("EapQtConfigInterfacePrivate() - creating non-validator instance, this = 0x%08x", this);
+
+
+    switch (bearerType) {
+    case EapQtConfigInterface::EapBearerTypeVpn:
+        mEapBearer = EVpn;
+        break;
+    default:
+        // All others default to EapQtConfigInterface::EapBearerTypeWlan i.e. ELan
+        mEapBearer = ELan;
+    }
+
+    if (!setEapDbIndex(iapId)) {
+        qDebug("ERROR: EapQtConfigInterfacePrivate() - setIapId failed, bearer = %d, index = %d",
+            mEapBearer, iapId);
+        shutdown();
+        // throw an exception
+        qt_symbian_throwIfError(KErrNotFound);
+    }
+
+    // load plugins after everything else is ok
+    qDebug("EapQtConfigInterfacePrivate() - load plugins");
+    loadPlugins();
+
+    qDebug("EapQtConfigInterfacePrivate() - ends");
+}
+
+EapQtConfigInterfacePrivate::~EapQtConfigInterfacePrivate()
+{
+    qDebug("EapQtConfigInterfacePrivate::~EapQtConfigInterfacePrivate(), this = 0x%08x", this);
+
+    shutdown();
+}
+
+void EapQtConfigInterfacePrivate::shutdown()
+{
+    qDebug("EapQtConfigInterfacePrivate::shutdown(), this = 0x%08x", this);
+
+
+    mOuterEapsOn.Close();
+    mOuterEapsOff.Close();
+
+    // cleanup Ecom
+    REComSession::FinalClose();
+
+    // mTranslator gets deleted automatically (QScopedPointer)
+    // mEapTypeIf gets deleted automatically (QScopedPointer)
+    // mEapGsIf gets deleted automatically (QScopedPointer)
+}
+
+bool EapQtConfigInterfacePrivate::setConfigurationReference(const int iapId)
+{
+    qDebug("EapQtConfigInterfacePrivate::setConfigurationReference - requested id: %d, this = 0x%08x", iapId, this);
+
+    checkInstanceThrowing();
+    return setEapDbIndex(iapId);
+}
+
+bool EapQtConfigInterfacePrivate::setEapDbIndex(const int iapId)
+{
+
+    qDebug("EapQtConfigInterfacePrivate::setIapId - requested id: %d, this = 0x%08x", iapId, this);
+
+
+    // optimization: do not re-create the interface if the reference does
+    // not change and mEapGsIf exists already
+
+    // WLAN reference is checked after setEapWlanDbIndex below since iapId may be
+    // different than WLAN service ID
+
+    // case for EapQtConfigInterface::IapIdUndefined i.e. setIapId was called
+    // with a negative id last time and now again
+    if (!mEapDbIndexValid && !mEapGsIf.isNull() && iapId < 0) {
+        qDebug(
+            "EapQtConfigInterfacePrivate::setIapId - interface created for IapIdUndefined already");
+        return true;
+    }
+
+    // case for VPN (or any other bearer) in which iap id equals EAP db index
+    if (mEapBearer != ELan && mEapDbIndexValid && !mEapGsIf.isNull() && iapId == mEapDbIndex) {
+        qDebug(
+            "EapQtConfigInterfacePrivate::setIapId - interface created for requested IAP ID for VPN already");
+        return true;
+    }
+
+    // save the current id for checking if WLAN reference changes or not
+    TInt previousEapDbIndex = mEapDbIndex;
+    bool wlanIndexOk = true;
+
+    // allow accessing certain methods with negative iapId
+    if (iapId < 0) {
+        // set to zero to be able to create EAP server instances
+        mEapDbIndex = 0;
+        mEapDbIndexValid = false;
+    }
+    // for real usage iapId must not be negative
+    else {
+        // for VPN
+        mIapId = iapId;
+        mEapDbIndex = iapId;
+        mEapDbIndexValid = true;
+
+        // for WLAN
+        if (mEapBearer == ELan) {
+            // get WLAN service ID as the reference
+            mEapDbIndexValid = setEapWlanDbIndex(iapId);
+            wlanIndexOk = mEapDbIndexValid;
+            // do not re-create if the interface is ok for the new (i.e. same) index already
+            if (!mEapGsIf.isNull() && mEapDbIndex == previousEapDbIndex) {
+                qDebug() << "EapQtConfigInterfacePrivate::setIapId - interface"
+                    << "created for requested IAP ID for WLAN already";
+                return true;
+            }
+
+        }
+    }
+
+    // delete possibly existing instances
+    mEapGsIf.reset(NULL);
+    mEapTypeIf.reset(NULL);
+
+    mCurrentServerEapType = *EapExpandedTypeNone.GetType();
+    mLastOuterHandle = EapQtPluginHandle::PluginUndefined;
+
+    if (!wlanIndexOk && mEapBearer == ELan) {
+        // setEapWlanDbIndex was called and failed
+        qDebug("ERROR: EapQtConfigInterfacePrivate::setIapId() - setEapWlanDbIndex failed");
+        return false;
+    }
+
+    qDebug(
+        "EapQtConfigInterfacePrivate::setIapId() - calls CEapGeneralSettings::NewL(), bearer = %d, index = %d",
+        mEapBearer, mEapDbIndex);
+
+    // load EAP general settings interface
+    CEapGeneralSettings* tmp = NULL;
+    TRAPD(err, tmp = CEapGeneralSettings::NewL(mEapBearer, mEapDbIndex));
+    if (err != KErrNone) {
+        qDebug("ERROR: EapQtConfigInterfacePrivate::setIapId - CEapGeneralSettings::NewL() failed");
+        mEapDbIndexValid = false;
+        return false;
+    }
+
+    // set to the created instance
+    mEapGsIf.reset(tmp);
+
+    return true;
+}
+
+bool EapQtConfigInterfacePrivate::setEapWlanDbIndex(const int iapId)
+{
+    qDebug("EapQtConfigInterfacePrivate::setEapWlanDbIndex - requested id: %d, this = 0x%08x", iapId, this);
+
+
+    RCmManager cmm;
+    TRAPD(err, cmm.OpenL());
+    if (err != KErrNone) {
+        qDebug("ERROR: EapQtConfigInterfacePrivate::setEapWlanDbIndex - cmm.OpenL() failed",
+            mEapBearer, iapId);
+        mEapDbIndex = EapQtConfigInterface::IapIdUndefined;
+        mIapId = 0;
+        return false;
+    }
+
+    TRAP(err, mEapDbIndex = cmm.GetConnectionMethodInfoIntL(iapId, CMManager::EWlanServiceId));
+    if (err != KErrNone) {
+        qDebug(
+            "ERROR: EapQtConfigInterfacePrivate::setEapWlanDbIndex - cmm.GetConnectionMethodInfoIntL() failed",
+            mEapBearer, iapId);
+        cmm.Close();
+        mEapDbIndex = EapQtConfigInterface::IapIdUndefined;
+        mIapId = 0;
+        return false;
+    }
+
+    cmm.Close();
+
+    qDebug("EapQtConfigInterfacePrivate::setEapWlanDbIndex - obtained WLAN service id: %d",
+        mEapDbIndex);
+
+    return true;
+}
+
+void EapQtConfigInterfacePrivate::checkInstanceThrowing() const
+{
+    qDebug() << "EapQtConfigInterfacePrivate::checkInstanceThrowing() - mValidatorInstance:"
+        << mValidatorInstance;
+
+    if (mValidatorInstance) {
+        qDebug(
+            "ERROR: EapQtConfigInterfacePrivate::checkInstanceThrowing - method not supported by this instance");
+        qt_symbian_throwIfError(KErrNotSupported);
+    }
+}
+
+void EapQtConfigInterfacePrivate::appendEapTypes(const RArray<TEapExpandedType>* const eapTypes,
+    QList<QByteArray>* const eapList)
+{
+    qDebug("EapQtConfigInterfacePrivate::appendEapTypes(), this = 0x%08x", this);
+
+
+    Q_ASSERT(eapTypes);
+    Q_ASSERT(eapList);
+
+    qDebug("EapQtConfigInterfacePrivate - appendEapTypes, EAP count = %d", eapTypes->Count());
+
+    QByteArray tmpEap;
+    for (int ind = 0; ind < eapTypes->Count(); ind++) {
+        tmpEap.append(reinterpret_cast<const char*> ((*eapTypes)[ind].GetValue().Ptr()),
+            (*eapTypes)[ind].GetValue().Length());
+        eapList->append(tmpEap);
+        qDebug() << "EapQtConfigInterfacePrivate - appendEapTypes added EAP: " << tmpEap.toHex();
+        tmpEap.clear();
+    }
+}
+
+QList<EapQtPluginInfo> EapQtConfigInterfacePrivate::supportedOuterTypes()
+{
+    qDebug("EapQtConfigInterfacePrivate::supportedOuterTypes(), this = 0x%08x", this);
+
+
+    checkInstanceThrowing();
+
+    if (mEapGsIf.isNull()) {
+        qDebug("ERROR: EapQtConfigInterfacePrivate::supportedOuterTypes() - mEapGsIf is NULL");
+        mOuterEapsOn.Reset();
+        mOuterEapsOff.Reset();
+        // return empty list
+        mSupportedOuterTypes.clear();
+        return mSupportedOuterTypes;
+    }
+
+    // get outer EAPs from EAP server,
+    // returned in two lists: enabled and disabled outer EAPs
+    // do this always as the list might have changed and mOuterEapsOn/Off are needed in
+    // other methods
+
+    mOuterEapsOn.Reset();
+    mOuterEapsOff.Reset();
+
+    qDebug("EapQtConfigInterfacePrivate::supportedOuterTypes() - calls GetEapMethods()");
+
+    TUint err = mEapGsIf->GetEapMethods(mOuterEapsOn, mOuterEapsOff);
+    if (err != KErrNone) {
+        qDebug("ERROR: EapQtConfigInterfacePrivate::supportedOuterTypes() - GetEapMethods failed");
+        mOuterEapsOn.Reset();
+        mOuterEapsOff.Reset();
+        // return empty list
+        mSupportedOuterTypes.clear();
+        return mSupportedOuterTypes;
+    }
+
+    // optimization: collect the list only once per instance life time
+    // since no new EAPs will appear to the combination of mOuterEapsOn and mOuterEapsOff
+    if (mSupportedOuterTypes.count() > 0) {
+        qDebug(
+            "EapQtConfigInterfacePrivate - supportedOuterTypes: supported EAPs already listed, return stored list");
+        return mSupportedOuterTypes;
+    }
+
+    qDebug("EapQtConfigInterfacePrivate - supportedOuterTypes: copy response to QList");
+
+    // copy response to qlist for easier comparison
+    QList<QByteArray> outerEaps;
+
+    appendEapTypes(&mOuterEapsOn, &outerEaps);
+    appendEapTypes(&mOuterEapsOff, &outerEaps);
+
+    qDebug("EapQtConfigInterfacePrivate - supportedOuterTypes: EAP server outer type count: %d",
+        outerEaps.count());
+
+    qDebug("EapQtConfigInterfacePrivate - supportedOuterTypes: collected UI plugin count: %d",
+        mPluginInfos.count());
+
+    // set mSupportedOuterTypes to contain only EAPs that both UI and EAP server support
+    QByteArray tmpEap;
+    for (int ind = 0; ind < mPluginInfos.count(); ind++) {
+        tmpEap = mPluginInfos[ind].pluginHandle().type().eapExpandedData();
+        if (outerEaps.contains(tmpEap)) {
+            mSupportedOuterTypes.append(mPluginInfos[ind]);
+            qDebug() << "EapQtConfigInterfacePrivate - supportedOuterTypes: appended EAP: "
+                << tmpEap.toHex();
+        }
+    }
+
+    qDebug("EapQtConfigInterfacePrivate - supportedOuterTypes: supported EAP count: %d",
+        mSupportedOuterTypes.count());
+
+    return mSupportedOuterTypes;
+}
+
+// checks if UI plugins support supplied eapType and returns the
+// index (in mPluginInfos) of the supporting plugin
+bool EapQtConfigInterfacePrivate::isUiSupported(const QByteArray &eapType, int &pluginIndex) const
+{
+    qDebug("EapQtConfigInterfacePrivate::isUiSupported(), this = 0x%08x", this);
+
+    bool ret = false;
+    for (int ind = 0; ind < mPluginInfos.count(); ind++) {
+        qDebug("EapQtConfigInterfacePrivate::isUiSupported() - checking index: %d", ind);
+        pluginIndex = ind;
+        if (eapType == mPluginInfos[ind].pluginHandle().type().eapExpandedData()) {
+            qDebug("EapQtConfigInterfacePrivate::isUiSupported() - ui supported!");
+            ret = true;
+            break;
+        }
+    }
+    return ret;
+}
+
+QList<EapQtPluginInfo> EapQtConfigInterfacePrivate::supportedInnerTypes(
+    const EapQtPluginHandle& outer)
+{
+    qDebug("EapQtConfigInterfacePrivate::supportedInnerTypes(), this = 0x%08x", this);
+
+
+    checkInstanceThrowing();
+
+    // check if we already have up-to-date data
+    if (mLastOuterHandle == outer) {
+        return mSupportedInnerTypes;
+    }
+
+    // clear previous query result
+    mSupportedInnerTypes.clear();
+    mLastOuterHandle = EapQtPluginHandle::PluginUndefined;
+
+    qDebug()
+        << "EapQtConfigInterfacePrivate::supportedInnerTypes() - calls isSupportedOuterType for: "
+        << outer.type().eapExpandedData().toHex();
+
+    // check if the queried outer EAP is supported
+    if (!isSupportedOuterType(outer)) {
+        qDebug()
+            << "ERROR: EapQtConfigInterfacePrivate::supportedInnerTypes() - queried outer type not supported: "
+            << outer.type().eapExpandedData().toHex();
+        // return empty list
+        return mSupportedInnerTypes;
+    }
+
+    qDebug("EapQtConfigInterfacePrivate::supportedInnerTypes() - calls getEapTypeIf");
+
+    // get outer EAP settings interface
+    getEapTypeIf(outer);
+    if (mEapTypeIf.isNull()) {
+        qDebug("ERROR: EapQtConfigInterfacePrivate::supportedInnerTypes() - getEapTypeIf failed");
+        // return empty list
+        return mSupportedInnerTypes;
+    }
+
+    // get outer EAP settings
+    EAPSettings eapSettings;
+    TRAPD(err, mEapTypeIf->GetConfigurationL(eapSettings));
+    // getEapTypeIf has set mCurrentServerEapType correctly for comparison
+    if (err != KErrNone || eapSettings.iEAPExpandedType != mCurrentServerEapType) {
+        qDebug("ERROR: EapQtConfigInterfacePrivate::supportedInnerTypes - GetConfigurationL failed");
+        // clear the instance so that the next attempt starts from scratch
+        mEapTypeIf.reset(NULL);
+        // return empty list
+        return mSupportedInnerTypes;
+    }
+
+    // store inner EAPs supported by EAP server
+    QList<QByteArray> innerEaps;
+    appendEapTypes(&(eapSettings.iEnabledEncapsulatedEAPExpandedTypes), &innerEaps);
+    appendEapTypes(&(eapSettings.iDisabledEncapsulatedEAPExpandedTypes), &innerEaps);
+
+    int pluginIndex = 0;
+    for (int ind = 0; ind < innerEaps.count(); ind++) {
+        // report only EAPs which do have an UI plugin
+        if (isUiSupported(innerEaps[ind], pluginIndex)) {
+            mSupportedInnerTypes.append(mPluginInfos[pluginIndex]);
+            qDebug() << "EapQtConfigInterfacePrivate::supportedInnerTypes - added inner EAP: "
+                << innerEaps[ind].toHex();
+        }
+    }
+
+    mLastOuterHandle = outer;
+
+    return mSupportedInnerTypes;
+}
+
+void EapQtConfigInterfacePrivate::copyCertificateInfo(
+    const RPointerArray<EapCertificateEntry>* const certEntries,
+    QList<EapQtCertificateInfo>* const certInfos)
+{
+    qDebug("EapQtConfigInterfacePrivate::copyCertificateInfo(), this = 0x%08x", this);
+
+
+    Q_ASSERT(certEntries);
+    Q_ASSERT(certInfos);
+
+    certInfos->clear();
+
+    EapQtCertificateInfo cert;
+    TKeyIdentifier subjectKeyId;
+    const TDes* text = 0;
+    int ind = 0;
+
+    for (ind = 0; ind < certEntries->Count(); ind++) {
+
+        qDebug() << "EapQtConfigInterfacePrivate - copyCertificateInfo *** certificate starts *** ";
+
+        if ((*certEntries)[ind]->GetSubjectNamePresent() != EFalse) {
+
+            text = (*certEntries)[ind]->GetSubjectName();
+            cert.setValue(EapQtCertificateInfo::SubjectName, QString::fromUtf16(text->Ptr(),
+                text->Length()));
+
+            qDebug() << "EapQtConfigInterfacePrivate - copyCertificateInfo SubjectName: "
+                << QString::fromUtf16(text->Ptr(), text->Length());
+        }
+        if ((*certEntries)[ind]->GetIssuerNamePresent() != EFalse) {
+
+            text = (*certEntries)[ind]->GetIssuerName();
+            cert.setValue(EapQtCertificateInfo::IssuerName, QString::fromUtf16(text->Ptr(),
+                text->Length()));
+
+            qDebug() << "EapQtConfigInterfacePrivate - copyCertificateInfo IssuerName: "
+                << QString::fromUtf16(text->Ptr(), text->Length());
+        }
+        if ((*certEntries)[ind]->GetSerialNumberPresent() != EFalse) {
+
+            text = (*certEntries)[ind]->GetSerialNumber();
+            cert.setValue(EapQtCertificateInfo::SerialNumber, QString::fromUtf16(text->Ptr(),
+                text->Length()));
+
+            qDebug() << "EapQtConfigInterfacePrivate - copyCertificateInfo SerialNumber: "
+                << QString::fromUtf16(text->Ptr(), text->Length());
+        }
+        if ((*certEntries)[ind]->GetSubjectKeyIdPresent() != EFalse) {
+
+            subjectKeyId = (*certEntries)[ind]->GetSubjectKeyId();
+            cert.setValue(EapQtCertificateInfo::SubjectKeyId, QByteArray(
+                reinterpret_cast<const char*> (subjectKeyId.Ptr()), subjectKeyId.Length()));
+
+            qDebug() << "EapQtConfigInterfacePrivate - copyCertificateInfo SubjectKeyId: "
+                << (QByteArray(reinterpret_cast<const char*> (subjectKeyId.Ptr()),
+                    subjectKeyId.Length())).toHex();
+        }
+        if ((*certEntries)[ind]->GetThumbprintPresent() != EFalse) {
+
+            text = (*certEntries)[ind]->GetThumbprint();
+            cert.setValue(EapQtCertificateInfo::ThumbPrint, QString::fromUtf16(text->Ptr(),
+                text->Length()));
+
+            qDebug() << "EapQtConfigInterfacePrivate - copyCertificateInfo ThumbPrint: "
+                << QString::fromUtf16(text->Ptr(), text->Length());
+        }
+        if ((*certEntries)[ind]->GetLabelPresent() != EFalse) {
+
+            text = (*certEntries)[ind]->GetLabel();
+            cert.setValue(EapQtCertificateInfo::CertificateLabel, QString::fromUtf16(text->Ptr(),
+                text->Length()));
+
+            qDebug() << "EapQtConfigInterfacePrivate - copyCertificateInfo CertificateLabel: "
+                << QString::fromUtf16(text->Ptr(), text->Length());
+        }
+
+        qDebug() << "EapQtConfigInterfacePrivate - copyCertificateInfo *** certificate ends *** ";
+
+        certInfos->append(cert);
+
+    }
+}
+
+bool EapQtConfigInterfacePrivate::fetchCertificates(QList<EapQtCertificateInfo>* const caInfos,
+    QList<EapQtCertificateInfo>* const clientInfos)
+{
+    qDebug("EapQtConfigInterfacePrivate::fetchCertificates(), this = 0x%08x", this);
+
+
+    Q_ASSERT(caInfos != NULL || clientInfos != NULL || !mEapGsIf.isNull());
+
+    TInt err(KErrNone);
+    RPointerArray<EapCertificateEntry> clientCerts;
+    RPointerArray<EapCertificateEntry> caCerts;
+
+    // lists are always queried again as the user might have installed new certificates
+    // during the life time of the object
+    err = mEapGsIf->GetCertificateLists(clientCerts, caCerts);
+    if (err != KErrNone) {
+        qDebug("EapQtConfigInterfacePrivate - fetchCertificates failed: %d", err);
+        caCerts.ResetAndDestroy();
+        clientCerts.ResetAndDestroy();
+        return false;
+    }
+
+    qDebug("user cert count: %d, CA cert count: %d", clientCerts.Count(), caCerts.Count());
+
+    if (caInfos != NULL) {
+        copyCertificateInfo(&caCerts, caInfos);
+    }
+    if (clientInfos != NULL) {
+        copyCertificateInfo(&clientCerts, clientInfos);
+    }
+
+    caCerts.ResetAndDestroy();
+    clientCerts.ResetAndDestroy();
+    return true;
+}
+
+QList<EapQtCertificateInfo> EapQtConfigInterfacePrivate::certificateAuthorityCertificates()
+{
+    qDebug("EapQtConfigInterfacePrivate::certificateAuthorityCertificates(), this = 0x%08x", this);
+
+
+    checkInstanceThrowing();
+
+    QList<EapQtCertificateInfo> list;
+    if (!fetchCertificates(&list, 0)) {
+        // query failed
+        list.clear();
+    }
+    return list;
+}
+
+QList<EapQtCertificateInfo> EapQtConfigInterfacePrivate::userCertificates()
+{
+    qDebug("EapQtConfigInterfacePrivate::userCertificates(), this = 0x%08x", this);
+
+
+    checkInstanceThrowing();
+
+    QList<EapQtCertificateInfo> list;
+    if (!fetchCertificates(0, &list)) {
+        // query failed
+        list.clear();
+    }
+    return list;
+}
+
+void EapQtConfigInterfacePrivate::getEapTypeIf(const EapQtPluginHandle& pluginHandle)
+{
+    qDebug("EapQtConfigInterfacePrivate::getEapTypeIf(), this = 0x%08x", this);
+
+
+    // dig up the EAP type in TEapExpandedType format
+    TEapExpandedType eapServerType;
+    QByteArray eapType = pluginHandle.type().eapExpandedData();
+    TInt err(KErrNone);
+
+    qDebug() << "EapQtConfigInterfacePrivate - getEapTypeIf: wanted EAP type: " << eapType.toHex();
+
+    // no need to check if this is successful,
+    // CEapType::NewL call will handle errors
+    (void) eapServerType.SetValue(eapType.data(), eapType.length());
+
+    // slight optimization, load interface only if it does not exist or the EAP type changes
+    if (mEapTypeIf.isNull() || mCurrentServerEapType != eapServerType) {
+
+        qDebug("EapQtConfigInterfacePrivate - getEapTypeIf deletes previous instance");
+
+        // delete previous instance
+        mEapTypeIf.reset(NULL);
+        mCurrentServerEapType = eapServerType;
+
+        qDebug("EapQtConfigInterfacePrivate - getEapTypeIf calls CEapType::NewL()");
+
+        // trap all leaves
+        CEapType* tmp = NULL;
+        TRAP(err, tmp = CEapType::NewL(mEapBearer, mEapDbIndex, mCurrentServerEapType));
+        if (err != KErrNone) {
+            qDebug(
+                "ERROR: EapQtConfigInterfacePrivate - getEapTypeIf CEapType::NewL failed with error: %d",
+                err);
+            mCurrentServerEapType = *EapExpandedTypeNone.GetType();
+        }
+        mEapTypeIf.reset(tmp);
+    }
+
+    // always clear the tunnelling type state just in case some earlier call has set it
+    if (!mEapTypeIf.isNull()) {
+        mEapTypeIf->SetTunnelingType(*EapExpandedTypeNone.GetType());
+    }
+
+}
+
+// in config:
+// if OuterType is defined, the configuration for pluginHandle is set inside this OuterType
+// if OuterType is not defined, pluginHandle is for an outer type
+// if InnerType is defined, the defined inner types in config are activated for pluginHandle
+// if InnerType is not defined, the pluginHandle does not activate any inner type (or they do not exist)
+bool EapQtConfigInterfacePrivate::saveConfiguration(const EapQtPluginHandle& pluginHandle,
+    EapQtConfig& config)
+{
+    qDebug("EapQtConfigInterfacePrivate::saveConfiguration(), this = 0x%08x", this);
+
+
+    checkInstanceThrowing();
+
+    if (!mEapDbIndexValid) {
+        qDebug() << "ERROR: Database reference not valid, call setConfigurationReference first!";
+        return false;
+    }
+
+    // only check if EAP ui is supported here,
+    // getEapTypeIf checks the EAP server support
+    int dummy = 0;
+    if (!isUiSupported(pluginHandle.type().eapExpandedData(), dummy)) {
+        qDebug(
+            "ERROR: EapQtConfigInterfacePrivate::saveConfiguration() - UI not supported for the requested EAP");
+        return false;
+    }
+
+    getEapTypeIf(pluginHandle);
+    if (mEapTypeIf.isNull()) {
+        qDebug("ERROR: EapQtConfigInterfacePrivate::saveConfiguration() - getEapTypeIf failed");
+        return false;
+    }
+
+    // set tunneling type
+    // if we are configuring outer type, OuterType == Invalid or EapQtPluginHandle::PluginUndefined
+
+    EapQtPluginHandle tmpOuterHandle;
+    QVariant varValue = config.value(EapQtConfig::OuterType);
+    if (varValue != QVariant::Invalid) {
+        tmpOuterHandle = varValue.value<EapQtPluginHandle> ();
+    }
+    else {
+        tmpOuterHandle = EapQtPluginHandle::PluginUndefined;
+    }
+
+    TEapExpandedType tmpOuterEap;
+    tmpOuterEap.SetValue(tmpOuterHandle.type().eapExpandedData().data(),
+        tmpOuterHandle.type().eapExpandedData().length());
+
+    qDebug() << "EapQtConfigInterfacePrivate::saveConfiguration() - sets tunnelling type to: "
+        << tmpOuterHandle.type().eapExpandedData().toHex();
+
+    mEapTypeIf->SetTunnelingType(tmpOuterEap);
+
+    // set EAP type here
+    QByteArray eapType = pluginHandle.type().eapExpandedData();
+
+    // copy config to EAP settings,
+    // no need to check if this is successful,
+    // SetConfigurationL call will handle errors
+    EAPSettings eapSettings;
+    (void) eapSettings.iEAPExpandedType.SetValue(eapType.data(), eapType.length());
+
+    // copy the rest of the settings in the function
+    copyToEapSettings(config, eapSettings);
+    // store settings
+    TRAPD(err, mEapTypeIf->SetConfigurationL(eapSettings));
+    if (err != KErrNone) {
+        qDebug("ERROR: EapQtConfigInterfacePrivate - saveConfiguration: SetConfigurationL failed");
+        // clear the instance so that the next attempt starts from scratch
+        mEapTypeIf.reset(NULL);
+        mCurrentServerEapType = *EapExpandedTypeNone.GetType();
+        return false;
+    }
+
+    return true;
+}
+
+// config must be empty when calling
+bool EapQtConfigInterfacePrivate::readConfiguration(const EapQtPluginHandle& outerHandle,
+    const EapQtPluginHandle& pluginHandle, EapQtConfig& config)
+{
+    qDebug("EapQtConfigInterfacePrivate::readConfiguration(), this = 0x%08x", this);
+
+
+    // clear input
+    config.clear();
+
+    checkInstanceThrowing();
+
+    if (!mEapDbIndexValid) {
+        qDebug() << "ERROR: Database reference not valid, call setConfigurationReference first!";
+        return false;
+    }
+
+    // only check if UI is supported for pluginHandle here,
+    // getEapTypeIf checks the EAP server support
+    int dummy = 0;
+    if (!isUiSupported(pluginHandle.type().eapExpandedData(), dummy)) {
+        qDebug(
+            "ERROR: EapQtConfigInterfacePrivate::readConfiguration - UI not supported for the requested EAP");
+        return false;
+    }
+
+    getEapTypeIf(pluginHandle);
+    if (mEapTypeIf.isNull()) {
+        qDebug("ERROR: EapQtConfigInterfacePrivate::readConfiguration - getEapTypeIf failed");
+        return false;
+    }
+
+    // set tunneling type
+    // if we are configuring outer type, outerHandle == EapQtPluginHandle::PluginUndefined
+    // and calling SetTunnelingType is also ok
+    TEapExpandedType tmpEap;
+    tmpEap.SetValue(outerHandle.type().eapExpandedData().data(),
+        outerHandle.type().eapExpandedData().length());
+
+    qDebug() << "EapQtConfigInterfacePrivate::readConfiguration - sets tunnelling type to: "
+        << outerHandle.type().eapExpandedData().toHex();
+
+    mEapTypeIf->SetTunnelingType(tmpEap);
+
+    // always set OuterType,
+    // set to EapQtPluginHandle::PluginUndefined if no outer type specified
+    config.setValue(EapQtConfig::OuterType, qVariantFromValue(outerHandle));
+
+    qDebug("EapQtConfigInterfacePrivate::readConfiguration - calls GetConfigurationL()");
+
+    // trap all leaves
+    EAPSettings eapSettings;
+    TRAPD(err, mEapTypeIf->GetConfigurationL(eapSettings));
+
+    // check if failed or something strange happened (incorrect EAP type settings received)  
+    if (err != KErrNone || eapSettings.iEAPExpandedType != mCurrentServerEapType) {
+        qDebug("ERROR: EapQtConfigInterfacePrivate - readConfiguration: GetConfigurationL failed");
+        // clear the instance so that the next attempt starts from scratch
+        mEapTypeIf.reset(NULL);
+        mCurrentServerEapType = *EapExpandedTypeNone.GetType();
+        // nothing to be set to config
+        return false;
+    }
+    copyFromEapSettings(eapSettings, config);
+    return true;
+}
+
+bool EapQtConfigInterfacePrivate::convertToBool(TBool value)
+{
+    return (value != EFalse ? true : false);
+}
+
+TBool EapQtConfigInterfacePrivate::convertToTbool(bool value)
+{
+    return (value ? ETrue : EFalse);
+}
+
+void EapQtConfigInterfacePrivate::copyToEapSettings(EapQtConfig& config, EAPSettings& eapSettings)
+{
+    // TODO:
+    // - fix & add validation
+    // - check if there are something missing still defined in EapSettings.h
+    // - pac store parameters from eapqtconfig.h
+
+    qDebug("EapQtConfigInterfacePrivate::copyToEapSettings(), this = 0x%08x", this);
+
+
+    int ind = 0;
+
+    QVariant varValue = config.value(EapQtConfig::UsernameAutomatic);
+    if (varValue.type() == QVariant::Bool) {
+        eapSettings.iUseAutomaticUsernamePresent = ETrue;
+        eapSettings.iUseAutomaticUsername = convertToTbool(varValue.toBool());
+        qDebug() << "EapQtConfigInterfacePrivate - copyToEapSettings UsernameAutomatic: "
+            << varValue.toBool();
+    }
+
+    varValue = config.value(EapQtConfig::AuthorityCertificateAutomatic);
+    if (varValue.type() == QVariant::Bool) {
+        eapSettings.iUseAutomaticCACertificatePresent = ETrue;
+        eapSettings.iUseAutomaticCACertificate = convertToTbool(varValue.toBool());
+        qDebug()
+            << "EapQtConfigInterfacePrivate - copyToEapSettings AuthorityCertificateAutomatic: "
+            << varValue.toBool();
+    }
+
+    varValue = config.value(EapQtConfig::Username);
+    // do not copy if too large string
+    if (varValue.type() == QVariant::String && varValue.toString().count() <= StringMaxLength) {
+        // QString::utf16 returns a null terminated string
+        eapSettings.iUsername.Copy(varValue.toString().utf16());
+        eapSettings.iUsernamePresent = ETrue;
+        qDebug() << "EapQtConfigInterfacePrivate - copyToEapSettings Username: "
+            << varValue.toString();
+    }
+
+    varValue = config.value(EapQtConfig::PasswordPrompt);
+    if (varValue.type() == QVariant::Bool) {
+        eapSettings.iShowPassWordPromptPresent = ETrue;
+        eapSettings.iShowPassWordPrompt = convertToTbool(varValue.toBool());
+        qDebug() << "EapQtConfigInterfacePrivate - copyToEapSettings PasswordPrompt: "
+            << varValue.toBool();
+    }
+
+    varValue = config.value(EapQtConfig::Password);
+    // do not copy if too large string
+    if (varValue.type() == QVariant::String && varValue.toString().count() <= StringMaxLength) {
+        //QString::utf16 returns a null terminated string
+        eapSettings.iPassword.Copy(varValue.toString().utf16());
+        eapSettings.iPasswordPresent = ETrue;
+        qDebug() << "EapQtConfigInterfacePrivate - copyToEapSettings Password: "
+            << varValue.toString();
+    }
+
+    varValue = config.value(EapQtConfig::PasswordClear);
+    if (varValue.type() == QVariant::Bool) {
+        eapSettings.iPasswordExistPresent = ETrue;
+        eapSettings.iPasswordExist = convertToTbool(varValue.toBool());
+        qDebug() << "EapQtConfigInterfacePrivate - copyToEapSettings PasswordClear: "
+            << varValue.toBool();
+    }
+
+    varValue = config.value(EapQtConfig::RealmAutomatic);
+    if (varValue.type() == QVariant::Bool) {
+        eapSettings.iUseAutomaticRealmPresent = ETrue;
+        eapSettings.iUseAutomaticRealm = convertToTbool(varValue.toBool());
+        qDebug() << "EapQtConfigInterfacePrivate - copyToEapSettings RealmAutomatic: "
+            << varValue.toBool();
+    }
+
+    varValue = config.value(EapQtConfig::Realm);
+    // do not copy if too large string
+    if (varValue.type() == QVariant::String && varValue.toString().count() <= StringMaxLength) {
+        // QString::utf16 returns a null terminated string
+        eapSettings.iRealm.Copy(varValue.toString().utf16());
+        eapSettings.iRealmPresent = ETrue;
+        qDebug() << "EapQtConfigInterfacePrivate - copyToEapSettings Realm: "
+            << varValue.toString();
+    }
+
+    varValue = config.value(EapQtConfig::UsePseudonyms);
+    if (varValue.type() == QVariant::Bool) {
+        eapSettings.iUsePseudonymsPresent = ETrue;
+        eapSettings.iUsePseudonyms = convertToTbool(varValue.toBool());
+        qDebug() << "EapQtConfigInterfacePrivate - copyToEapSettings UsePseudonyms: "
+            << varValue.toBool();
+    }
+
+    varValue = config.value(EapQtConfig::VerifyServerRealm);
+    if (varValue.type() == QVariant::Bool) {
+        eapSettings.iVerifyServerRealmPresent = ETrue;
+        eapSettings.iVerifyServerRealm = convertToTbool(varValue.toBool());
+        qDebug() << "EapQtConfigInterfacePrivate - copyToEapSettings VerifyServerRealm: "
+            << varValue.toBool();
+    }
+
+    varValue = config.value(EapQtConfig::ClientAuthenticationRequired);
+    if (varValue.type() == QVariant::Bool) {
+        eapSettings.iRequireClientAuthenticationPresent = ETrue;
+        eapSettings.iRequireClientAuthentication = convertToTbool(varValue.toBool());
+        qDebug()
+            << "EapQtConfigInterfacePrivate - copyToEapSettings ClientAuthenticationRequired: "
+            << varValue.toBool();
+    }
+
+    varValue = config.value(EapQtConfig::SessionValidityTime);
+    if (varValue.type() == QVariant::UInt) {
+        eapSettings.iSessionValidityTimePresent = ETrue;
+        eapSettings.iSessionValidityTime = varValue.toUInt();
+        qDebug() << "EapQtConfigInterfacePrivate - copyToEapSettings SessionValidityTime: "
+            << varValue.toUInt();
+    }
+
+    varValue = config.value(EapQtConfig::PeapVersion0Allowed);
+    if (varValue.type() == QVariant::Bool) {
+        eapSettings.iPEAPVersionsPresent = ETrue;
+        eapSettings.iPEAPv0Allowed = convertToTbool(varValue.toBool());
+        qDebug() << "EapQtConfigInterfacePrivate - copyToEapSettings PeapVersion0Allowed: "
+            << varValue.toBool();
+    }
+
+    varValue = config.value(EapQtConfig::PeapVersion1Allowed);
+    if (varValue.type() == QVariant::Bool) {
+        eapSettings.iPEAPVersionsPresent = ETrue;
+        eapSettings.iPEAPv1Allowed = convertToTbool(varValue.toBool());
+        qDebug() << "EapQtConfigInterfacePrivate - copyToEapSettings PeapVersion1Allowed: "
+            << varValue.toBool();
+    }
+
+    varValue = config.value(EapQtConfig::PeapVersion2Allowed);
+    if (varValue.type() == QVariant::Bool) {
+        eapSettings.iPEAPVersionsPresent = ETrue;
+        eapSettings.iPEAPv2Allowed = convertToTbool(varValue.toBool());
+        qDebug() << "EapQtConfigInterfacePrivate - copyToEapSettings PeapVersion2Allowed: "
+            << varValue.toBool();
+    }
+
+    varValue = config.value(EapQtConfig::ProvisioningModeAuthenticated);
+    if (varValue.type() == QVariant::Bool) {
+        eapSettings.iAuthProvModeAllowedPresent = ETrue;
+        eapSettings.iAuthProvModeAllowed = convertToTbool(varValue.toBool());
+        qDebug()
+            << "EapQtConfigInterfacePrivate - copyToEapSettings ProvisioningModeAuthenticated: "
+            << varValue.toBool();
+    }
+
+    varValue = config.value(EapQtConfig::ProvisioningModeUnauthenticated);
+    if (varValue.type() == QVariant::Bool) {
+        eapSettings.iUnauthProvModeAllowedPresent = ETrue;
+        eapSettings.iUnauthProvModeAllowed = convertToTbool(varValue.toBool());
+        qDebug()
+            << "EapQtConfigInterfacePrivate - copyToEapSettings ProvisioningModeUnauthenticated: "
+            << varValue.toBool();
+    }
+
+    varValue = config.value(EapQtConfig::PACGroupReference);
+    // do not copy if too large string
+    if (varValue.type() == QVariant::String && varValue.toString().count() <= StringMaxLength) {
+        // TODO: what is the format (ascii/unicode?) of iPACGroupReference?
+        qDebug() << "EapQtConfigInterfacePrivate - copyToEapSettings PACGroupReference: "
+            << varValue.toString();
+    }
+
+    varValue = config.value(EapQtConfig::WarnADHPNoPAC);
+    if (varValue.type() == QVariant::Bool) {
+        eapSettings.iWarnADHPNoPACPresent = ETrue;
+        eapSettings.iWarnADHPNoPAC = convertToTbool(varValue.toBool());
+        qDebug() << "EapQtConfigInterfacePrivate - copyToEapSettings WarnADHPNoPAC: "
+            << varValue.toBool();
+    }
+
+    varValue = config.value(EapQtConfig::WarnADHPNoMatchingPAC);
+    if (varValue.type() == QVariant::Bool) {
+        eapSettings.iWarnADHPNoMatchingPACPresent = ETrue;
+        eapSettings.iWarnADHPNoMatchingPAC = convertToTbool(varValue.toBool());
+        qDebug() << "EapQtConfigInterfacePrivate - copyToEapSettings WarnADHPNoMatchingPAC: "
+            << varValue.toBool();
+    }
+
+    varValue = config.value(EapQtConfig::WarnNotDefaultServer);
+    if (varValue.type() == QVariant::Bool) {
+        eapSettings.iWarnNotDefaultServerPresent = ETrue;
+        eapSettings.iWarnNotDefaultServer = convertToTbool(varValue.toBool());
+        qDebug() << "EapQtConfigInterfacePrivate - copyToEapSettings WarnNotDefaultServer: "
+            << varValue.toBool();
+    }
+
+    varValue = config.value(EapQtConfig::UseIdentityPrivacy);
+    if (varValue.type() == QVariant::Bool) {
+        eapSettings.iUseIdentityPrivacyPresent = ETrue;
+        eapSettings.iUseIdentityPrivacy = convertToTbool(varValue.toBool());
+        qDebug() << "EapQtConfigInterfacePrivate - copyToEapSettings UseIdentityPrivacy: "
+            << varValue.toBool();
+    }
+
+    varValue = config.value(EapQtConfig::InnerType);
+    if (varValue.type() == QVariant::List) {
+
+        // not need to set disable inner types
+        // EAP server takes care of them internally
+
+        qDebug() << "EapQtConfigInterfacePrivate::copyToEapSettings() - InnerType present";
+
+        QList<QVariant> varList = varValue.toList();
+        TEapExpandedType tmpEap;
+        EapQtPluginHandle tmpHandle;
+
+        for (ind = 0; ind < varList.count(); ind++) {
+            if (varList[ind].canConvert<EapQtPluginHandle> ()) {
+                // set to true only if at least one item is ok
+                eapSettings.iEnabledEncapsulatedEAPExpandedTypesPresent = ETrue;
+
+                tmpHandle = varList[ind].value<EapQtPluginHandle> ();
+                tmpEap.SetValue(tmpHandle.type().eapExpandedData().data(),
+                    tmpHandle.type().eapExpandedData().length());
+                eapSettings.iEnabledEncapsulatedEAPExpandedTypes.Append(tmpEap);
+
+                qDebug()
+                    << "EapQtConfigInterfacePrivate::copyToEapSettings() - Added to InnerType: "
+                    << tmpHandle.type().eapExpandedData().toHex();
+            }
+        }
+    }
+
+    varValue = config.value(EapQtConfig::CipherSuites);
+    if (varValue.type() == QVariant::List) {
+
+        qDebug() << "EapQtConfigInterfacePrivate::copyToEapSettings() - CipherSuites present";
+        QList<QVariant> varCiphers = varValue.toList();
+
+        for (ind = 0; ind < varCiphers.count(); ind++) {
+            // check that the item is of correct type (int also accepted to not be too strict)
+            if (varCiphers[ind].type() == QVariant::UInt || varCiphers[ind].type() == QVariant::Int) {
+                // set to true only if at least item cipher is ok
+                eapSettings.iCipherSuitesPresent = ETrue;
+                eapSettings.iCipherSuites.Append(varCiphers[ind].toUInt());
+                qDebug(
+                    "EapQtConfigInterfacePrivate::copyToEapSettings() - CipherSuites at %d: 0x%08x",
+                    ind, varCiphers[ind].toUInt());
+            }
+        }
+    }
+
+    varValue = config.value(EapQtConfig::AuthorityCertificate);
+    if (varValue.type() == QVariant::List) {
+
+        qDebug()
+            << "EapQtConfigInterfacePrivate::copyToEapSettings() - AuthorityCertificate present";
+
+        QList<QVariant> varCerts = varValue.toList();
+        for (ind = 0; ind < varCerts.count(); ind++) {
+            // check that the item is of correct type
+            if (varCerts[ind].canConvert<EapQtCertificateInfo> ()) {
+                // set to true only if at least one item is ok
+                eapSettings.iCertificatesPresent = ETrue;
+                appendCertificateInfo(true, varCerts[ind].value<EapQtCertificateInfo> (),
+                    &(eapSettings.iCertificates));
+                qDebug()
+                    << "EapQtConfigInterfacePrivate::copyToEapSettings() - AuthorityCertificate appended";
+            }
+        }
+    }
+
+    varValue = config.value(EapQtConfig::UserCertificate);
+    if (varValue.type() == QVariant::List) {
+
+        qDebug() << "EapQtConfigInterfacePrivate::copyToEapSettings() - UserCertificate present";
+
+        QList<QVariant> varCerts = varValue.toList();
+        for (ind = 0; ind < varCerts.count(); ind++) {
+            // check that the item is of correct type
+            if (varCerts[ind].canConvert<EapQtCertificateInfo> ()) {
+                // set to true only if at least one item is ok
+                eapSettings.iCertificatesPresent = ETrue;
+                appendCertificateInfo(false, varCerts[ind].value<EapQtCertificateInfo> (),
+                    &(eapSettings.iCertificates));
+                qDebug()
+                    << "EapQtConfigInterfacePrivate::copyToEapSettings() - AuthorityCertificate appended";
+            }
+        }
+    }
+
+}
+
+// caller takes care of deallocating resulting data in certList
+void EapQtConfigInterfacePrivate::appendCertificateInfo(bool isCaCertificate,
+    const EapQtCertificateInfo& certInfo, RPointerArray<EapCertificateEntry>* const certList)
+{
+    qDebug("EapQtConfigInterfacePrivate::appendCertificateInfo(), this = 0x%08x", this);
+
+
+    Q_ASSERT(certList);
+
+    // use scoped pointer to make sure memory is not leaked in failures
+    QScopedPointer<EapCertificateEntry> certEntry(new EapCertificateEntry);
+
+    // set certificate enabled in EAP settings
+    certEntry->SetIsEnabledPresent();
+    certEntry->SetIsEnabled(ETrue);
+
+    if (isCaCertificate) {
+        qDebug("EapQtConfigInterfacePrivate::appendCertificateInfo() - CA certificate");
+        certEntry->SetCertType(EapCertificateEntry::ECA);
+    }
+    else {
+        qDebug("EapQtConfigInterfacePrivate::appendCertificateInfo() - Client certificate");
+        certEntry->SetCertType(EapCertificateEntry::EUser);
+    }
+
+    qDebug("EapQtConfigInterfacePrivate::appendCertificateInfo() - *** Adding cert data");
+
+    TBuf<KGeneralStringMaxLength> certText;
+
+    QVariant varValue = certInfo.value(EapQtCertificateInfo::SubjectName);
+    if (varValue.type() == QVariant::String && varValue.toString().count() <= StringMaxLength) {
+        certEntry->SetSubjectNamePresent();
+        certText.Copy(varValue.toString().utf16());
+        certEntry->SetSubjectName(certText);
+
+        qDebug() << "EapQtConfigInterfacePrivate::appendCertificateInfo() - SubjectName: "
+            << varValue.toString();
+    }
+
+    varValue = certInfo.value(EapQtCertificateInfo::IssuerName);
+    if (varValue.type() == QVariant::String && varValue.toString().count() <= StringMaxLength) {
+        certEntry->SetIssuerNamePresent();
+        certText.Copy(varValue.toString().utf16());
+        certEntry->SetIssuerName(certText);
+
+        qDebug() << "EapQtConfigInterfacePrivate::appendCertificateInfo() - IssuerName: "
+            << varValue.toString();
+    }
+
+    varValue = certInfo.value(EapQtCertificateInfo::SerialNumber);
+    if (varValue.type() == QVariant::String && varValue.toString().count() <= StringMaxLength) {
+        certEntry->SetSerialNumberPresent();
+        certText.Copy(varValue.toString().utf16());
+        certEntry->SetSerialNumber(certText);
+
+        qDebug() << "EapQtConfigInterfacePrivate::appendCertificateInfo() - SerialNumber: "
+            << varValue.toString();
+    }
+
+    TCertLabel certLabel;
+
+    varValue = certInfo.value(EapQtCertificateInfo::CertificateLabel);
+    if (varValue.type() == QVariant::String && varValue.toString().count() <= CertLabelMaxLength) {
+        certEntry->SetLabelPresent();
+        certLabel.Copy(varValue.toString().utf16());
+        certEntry->SetLabel(certLabel);
+
+        qDebug() << "EapQtConfigInterfacePrivate::appendCertificateInfo() - CertificateLabel: "
+            << varValue.toString();
+    }
+
+    TBuf<KThumbprintMaxLength> thumbPrint;
+
+    varValue = certInfo.value(EapQtCertificateInfo::ThumbPrint);
+    if (varValue.type() == QVariant::String && varValue.toString().count()
+        <= CertThumbprintMaxLength) {
+        certEntry->SetThumbprintPresent();
+        thumbPrint.Copy(varValue.toString().utf16());
+        certEntry->SetThumbprint(thumbPrint);
+
+        qDebug() << "EapQtConfigInterfacePrivate::appendCertificateInfo() - ThumbPrint: "
+            << varValue.toString();
+    }
+
+    TKeyIdentifier keyId;
+
+    varValue = certInfo.value(EapQtCertificateInfo::SubjectKeyId);
+    if (varValue.type() == QVariant::ByteArray && varValue.toByteArray().count()
+        <= CertSubjectKeyIdLength) {
+        certEntry->SetSubjectKeyIdPresent();
+        keyId.Copy(reinterpret_cast<unsigned char*> (varValue.toByteArray().data()),
+            varValue.toByteArray().size());
+        certEntry->SetSubjectKeyId(keyId);
+
+        qDebug() << "EapQtConfigInterfacePrivate::appendCertificateInfo() - SubjectKeyId: "
+            << varValue.toByteArray().toHex();
+    }
+
+    // EapSettings destructor takes care of deallocating the entry
+    certList->Append(certEntry.data());
+
+    qDebug()
+        << "EapQtConfigInterfacePrivate::appendCertificateInfo()"
+        << "- *** certificate appended to list";
+
+    // all ok, remove the ownerhsip from scoped pointer
+    (void) certEntry.take();
+}
+
+void EapQtConfigInterfacePrivate::copyFromEapSettings(EAPSettings& eapSettings, EapQtConfig& config)
+{
+    // TODO:
+    // - add validation?
+    // - check if there are something missing still defined in EaPSettings.h
+    // - pac store parameters from eapqtconfig.h
+    qDebug("EapQtConfigInterfacePrivate::copyFromEapSettings(), this = 0x%08x", this);
+
+
+    int ind = 0;
+
+    // automatic username
+    if (eapSettings.iUseAutomaticUsernamePresent) {
+        config.setValue(EapQtConfig::UsernameAutomatic, convertToBool(
+            eapSettings.iUseAutomaticUsername));
+        qDebug() << "EapQtConfigInterfacePrivate - copyFromEapSettings UsernameAutomatic: "
+            << config.value(EapQtConfig::UsernameAutomatic).toBool();
+    }
+
+    // automatic CA certificate
+    if (eapSettings.iUseAutomaticCACertificatePresent) {
+        config.setValue(EapQtConfig::AuthorityCertificateAutomatic, convertToBool(
+            eapSettings.iUseAutomaticCACertificate));
+        qDebug()
+            << "EapQtConfigInterfacePrivate - copyFromEapSettings AuthorityCertificateAutomatic: "
+            << config.value(EapQtConfig::AuthorityCertificateAutomatic).toBool();
+    }
+
+    // username
+    if (eapSettings.iUsernamePresent) {
+        config.setValue(EapQtConfig::Username, QString::fromUtf16(eapSettings.iUsername.Ptr(),
+            eapSettings.iUsername.Length()));
+        qDebug() << "EapQtConfigInterfacePrivate - copyFromEapSettings Username: " << config.value(
+            EapQtConfig::Username).toString();
+    }
+
+    // password existence check, password itself is write-only, cannot be read
+    if (eapSettings.iPasswordExistPresent) {
+        // report to caller if password exists in the database
+        config.setValue(EapQtConfig::PasswordStored, convertToBool(eapSettings.iPasswordExist));
+
+        qDebug() << "EapQtConfigInterfacePrivate - copyFromEapSettings PasswordStored: "
+            << config.value(EapQtConfig::PasswordStored).toBool();
+    }
+
+    // password prompt
+    if (eapSettings.iShowPassWordPromptPresent) {
+        config.setValue(EapQtConfig::PasswordPrompt, convertToBool(eapSettings.iShowPassWordPrompt));
+
+        qDebug() << "EapQtConfigInterfacePrivate - copyFromEapSettings PasswordPrompt: "
+            << config.value(EapQtConfig::PasswordPrompt).toBool();
+    }
+
+    // automatic realm
+    if (eapSettings.iUseAutomaticRealmPresent) {
+        config.setValue(EapQtConfig::RealmAutomatic, convertToBool(eapSettings.iUseAutomaticRealm));
+        qDebug() << "EapQtConfigInterfacePrivate - copyFromEapSettings RealmAutomatic: "
+            << config.value(EapQtConfig::RealmAutomatic).toBool();
+    }
+
+    // realm
+    if (eapSettings.iRealmPresent) {
+        config.setValue(EapQtConfig::Realm, QString::fromUtf16(eapSettings.iRealm.Ptr(),
+            eapSettings.iRealm.Length()));
+        qDebug() << "EapQtConfigInterfacePrivate - copyFromEapSettings Realm: " << config.value(
+            EapQtConfig::Realm).toString();
+    }
+
+    // server name
+    if (eapSettings.iVerifyServerRealmPresent) {
+        config.setValue(EapQtConfig::VerifyServerRealm, convertToBool(
+            eapSettings.iVerifyServerRealm));
+        qDebug() << "EapQtConfigInterfacePrivate - copyFromEapSettings VerifyServerRealm: "
+            << config.value(EapQtConfig::VerifyServerRealm).toBool();
+    }
+
+    // pseudonym
+    if (eapSettings.iUsePseudonymsPresent) {
+        config.setValue(EapQtConfig::UsePseudonyms, convertToBool(eapSettings.iUsePseudonyms));
+
+        qDebug() << "EapQtConfigInterfacePrivate - copyFromEapSettings UsePseudonyms: "
+            << config.value(EapQtConfig::UsePseudonyms).toBool();
+    }
+
+    // policy: server must require client authentication
+    if (eapSettings.iRequireClientAuthenticationPresent) {
+        config.setValue(EapQtConfig::ClientAuthenticationRequired, convertToBool(
+            eapSettings.iRequireClientAuthentication));
+
+        qDebug()
+            << "EapQtConfigInterfacePrivate - copyFromEapSettings ClientAuthenticationRequired: "
+            << config.value(EapQtConfig::ClientAuthenticationRequired).toBool();
+    }
+
+    // session validity time
+    if (eapSettings.iSessionValidityTimePresent) {
+        config.setValue(EapQtConfig::SessionValidityTime, eapSettings.iSessionValidityTime);
+
+        qDebug() << "EapQtConfigInterfacePrivate - copyFromEapSettings SessionValidityTime: "
+            << config.value(EapQtConfig::SessionValidityTime).toUInt();
+    }
+
+    // TLS ciphersuites
+    if (eapSettings.iCipherSuitesPresent) {
+        QList<QVariant> ciphers; // QVariant has a constructor for uint
+        for (ind = 0; ind < eapSettings.iCipherSuites.Count(); ind++) {
+            ciphers.append(eapSettings.iCipherSuites[ind]);
+            qDebug("EapQtConfigInterfacePrivate - copyFromEapSettings CipherSuites at %d: 0x%08x",
+                ind, ciphers[ind].toUInt());
+        }
+        config.setValue(EapQtConfig::CipherSuites, ciphers);
+    }
+
+    // certificates
+    if (eapSettings.iCertificatesPresent) {
+
+        QList<EapQtCertificateInfo> caCerts;
+        QList<EapQtCertificateInfo> clientCerts;
+        RPointerArray<EapCertificateEntry> serverCaCerts;
+        RPointerArray<EapCertificateEntry> serverClientCerts;
+
+        // separate CA and client certs to their own lists
+        for (ind = 0; ind < eapSettings.iCertificates.Count(); ind++) {
+
+            qDebug() << "EapQtConfigInterfacePrivate - copyFromEapSettings certificates, "
+                << "cert type: " << eapSettings.iCertificates[ind]->GetCertType() << ", enabled: "
+                << convertToBool(eapSettings.iCertificates[ind]->GetIsEnabled());
+
+            // only enabled certificates are reported
+            if (eapSettings.iCertificates[ind]->GetCertType() == EapCertificateEntry::EUser
+                && eapSettings.iCertificates[ind]->GetIsEnabled() != EFalse) {
+                serverClientCerts.Append(eapSettings.iCertificates[ind]);
+            }
+            // only enabled certificates are reported
+            else if (eapSettings.iCertificates[ind]->GetCertType() == EapCertificateEntry::ECA
+                && eapSettings.iCertificates[ind]->GetIsEnabled() != EFalse) {
+                serverCaCerts.Append(eapSettings.iCertificates[ind]);
+            }
+            else {
+                qDebug()
+                    << "WARNING: EapQtConfigInterfacePrivate - copyFromEapSettings certificates, "
+                    << "unknown certificate type in the list or certificate not enabled";
+            }
+        }
+
+        // copy to lists of our type
+        qDebug() << "EapQtConfigInterfacePrivate - copyFromEapSettings AuthorityCertificates";
+        copyCertificateInfo(&serverCaCerts, &caCerts);
+        qDebug() << "EapQtConfigInterfacePrivate - copyFromEapSettings UserCertificates";
+        copyCertificateInfo(&serverClientCerts, &clientCerts);
+
+        // reset the arrays, data is owned by EapSettings.h,
+        // must not be destroyed here
+        serverCaCerts.Reset();
+        serverClientCerts.Reset();
+
+        // we still need to convert QList<EapQtCertificateInfo> to QList<QVariant>
+        // to be able to store to config
+        QVariant tmp;
+        QList<QVariant> varCaCerts;
+        QList<QVariant> varClientCerts;
+
+        for (ind = 0; ind < caCerts.count(); ind++) {
+            tmp.setValue(caCerts[ind]);
+            varCaCerts.append(tmp);
+        }
+        for (ind = 0; ind < clientCerts.count(); ind++) {
+            tmp.setValue(clientCerts[ind]);
+            varClientCerts.append(tmp);
+        }
+
+        // finally copy to config
+        config.setValue(EapQtConfig::AuthorityCertificate, varCaCerts);
+        config.setValue(EapQtConfig::UserCertificate, varClientCerts);
+    }
+
+    // PEAP specific
+    if (eapSettings.iPEAPVersionsPresent) {
+        config.setValue(EapQtConfig::PeapVersion0Allowed, convertToBool(eapSettings.iPEAPv0Allowed));
+        config.setValue(EapQtConfig::PeapVersion1Allowed, convertToBool(eapSettings.iPEAPv1Allowed));
+        config.setValue(EapQtConfig::PeapVersion2Allowed, convertToBool(eapSettings.iPEAPv2Allowed));
+
+        qDebug() << "EapQtConfigInterfacePrivate - copyFromEapSettings PeapVersion0Allowed: "
+            << config.value(EapQtConfig::PeapVersion0Allowed).toBool();
+        qDebug() << "EapQtConfigInterfacePrivate - copyFromEapSettings PeapVersion1Allowed: "
+            << config.value(EapQtConfig::PeapVersion1Allowed).toBool();
+        qDebug() << "EapQtConfigInterfacePrivate - copyFromEapSettings PeapVersion2Allowed: "
+            << config.value(EapQtConfig::PeapVersion2Allowed).toBool();
+    }
+
+    // TLS privacy
+    if (eapSettings.iUseIdentityPrivacyPresent) {
+        config.setValue(EapQtConfig::UseIdentityPrivacy, convertToBool(
+            eapSettings.iUseIdentityPrivacy));
+
+        qDebug() << "EapQtConfigInterfacePrivate - copyFromEapSettings UseIdentityPrivacy: "
+            << config.value(EapQtConfig::UseIdentityPrivacy).toBool();
+    }
+
+    // EAP-FAST specific
+    if (eapSettings.iAuthProvModeAllowedPresent) {
+        config.setValue(EapQtConfig::ProvisioningModeAuthenticated, convertToBool(
+            eapSettings.iAuthProvModeAllowed));
+
+        qDebug()
+            << "EapQtConfigInterfacePrivate - copyFromEapSettings ProvisioningModeAuthenticated: "
+            << config.value(EapQtConfig::ProvisioningModeAuthenticated).toBool();
+    }
+    if (eapSettings.iUnauthProvModeAllowedPresent) {
+        config.setValue(EapQtConfig::ProvisioningModeUnauthenticated, convertToBool(
+            eapSettings.iUnauthProvModeAllowed));
+
+        qDebug()
+            << "EapQtConfigInterfacePrivate - copyFromEapSettings ProvisioningModeUnauthenticated: "
+            << config.value(EapQtConfig::ProvisioningModeUnauthenticated).toBool();
+    }
+    if (eapSettings.iWarnADHPNoPACPresent) {
+        config.setValue(EapQtConfig::WarnADHPNoPAC, convertToBool(eapSettings.iWarnADHPNoPAC));
+
+        qDebug() << "EapQtConfigInterfacePrivate - copyFromEapSettings WarnADHPNoPAC: "
+            << config.value(EapQtConfig::WarnADHPNoPAC).toBool();
+    }
+    if (eapSettings.iWarnADHPNoMatchingPACPresent) {
+        config.setValue(EapQtConfig::WarnADHPNoMatchingPAC, convertToBool(
+            eapSettings.iWarnADHPNoMatchingPAC));
+
+        qDebug() << "EapQtConfigInterfacePrivate - copyFromEapSettings WarnADHPNoMatchingPAC: "
+            << config.value(EapQtConfig::WarnADHPNoMatchingPAC).toBool();
+    }
+    if (eapSettings.iWarnNotDefaultServerPresent) {
+        config.setValue(EapQtConfig::WarnNotDefaultServer, convertToBool(
+            eapSettings.iWarnNotDefaultServer));
+
+        qDebug() << "EapQtConfigInterfacePrivate - copyFromEapSettings WarnNotDefaultServer: "
+            << config.value(EapQtConfig::WarnNotDefaultServer).toBool();
+    }
+    if (eapSettings.iPACGroupReferencePresent) {
+        config.setValue(EapQtConfig::PACGroupReference, QString::fromUtf16(
+            eapSettings.iPACGroupReference.Ptr(), eapSettings.iPACGroupReference.Length()));
+        qDebug() << "EapQtConfigInterfacePrivate - copyFromEapSettings PACGroupReference: "
+            << config.value(EapQtConfig::PACGroupReference).toString();
+    }
+
+    // enabled inner EAPs
+    if (eapSettings.iEnabledEncapsulatedEAPExpandedTypesPresent) {
+
+        qDebug("EapQtConfigInterfacePrivate - copyFromEapSettings InnerType, enabled count %d",
+            eapSettings.iEnabledEncapsulatedEAPExpandedTypes.Count());
+
+        QList<QByteArray> innerEapsOn;
+        appendEapTypes(&(eapSettings.iEnabledEncapsulatedEAPExpandedTypes), &innerEapsOn);
+
+        // convert to QList<QVariant> to be able to store to config
+        QVariant varTmp;
+        QList<QVariant> varInnerEapsOn;
+        int dummy = 0;
+
+        for (ind = 0; ind < innerEapsOn.count(); ind++) {
+            // report only EAPs which do have an UI plugin
+            if (isUiSupported(innerEapsOn[ind], dummy)) {
+                // create plugin handle from EAP type with constructors
+                // calls: EapQtExpandedEapType(const QByteArray data) -> EapQtPluginHandle(EapQtExpandedEapType type)
+                varTmp.setValue(EapQtPluginHandle(EapQtExpandedEapType(innerEapsOn[ind])));
+                varInnerEapsOn.append(varTmp);
+                qDebug()
+                    << "EapQtConfigInterfacePrivate - copyFromEapSettings InnerType: added EAP: "
+                    << innerEapsOn[ind].toHex();
+            }
+        }
+
+        // copy to config
+        config.setValue(EapQtConfig::InnerType, varInnerEapsOn);
+    }
+
+    // disabled inner EAPs
+    if (eapSettings.iDisabledEncapsulatedEAPExpandedTypesPresent) {
+        // setting is not needed, enabled are enough
+        qDebug(
+            "EapQtConfigInterfacePrivate - copyFromEapSettings InnerType: disabled count %d (not needed for anything here)",
+            eapSettings.iDisabledEncapsulatedEAPExpandedTypes.Count());
+    }
+
+}
+
+QList<EapQtPluginHandle> EapQtConfigInterfacePrivate::selectedOuterTypes()
+{
+    qDebug("EapQtConfigInterfacePrivate::selectedOuterTypes(), this = 0x%08x", this);
+
+
+    checkInstanceThrowing();
+
+    if (!mEapDbIndexValid) {
+        qDebug() << "ERROR: Database reference not valid, call setConfigurationReference first!";
+        return QList<EapQtPluginHandle> ();
+    }
+
+    // call to make sure the members (mOuterEapsOn and mSupportedOuterTypes) are up-to-date
+    (void) supportedOuterTypes();
+
+    QList<EapQtPluginHandle> selectedOuterTypes;
+
+    QList<QByteArray> tmpEaps;
+    appendEapTypes(&mOuterEapsOn, &tmpEaps);
+
+    // report only the ones that also have an UI, i.e. listed in mSupportedOuterTypes
+    for (int ind = 0; ind < mSupportedOuterTypes.count(); ind++) {
+        if (tmpEaps.contains(mSupportedOuterTypes[ind].pluginHandle().type().eapExpandedData())) {
+            selectedOuterTypes.append(mSupportedOuterTypes[ind].pluginHandle());
+        }
+    }
+
+    qDebug("EapQtConfigInterfacePrivate - selected outer type count: %d",
+        selectedOuterTypes.count());
+
+    return selectedOuterTypes;
+}
+
+bool EapQtConfigInterfacePrivate::isSupportedOuterType(const EapQtPluginHandle& handle)
+{
+    qDebug("EapQtConfigInterfacePrivate::isSupportedOuterType(), this = 0x%08x", this);
+
+
+    checkInstanceThrowing();
+
+    // check if mSupportedOuterTypes is up-to-date
+    if (mSupportedOuterTypes.count() <= 0) {
+        // update mSupportedOuterTypes
+        (void) supportedOuterTypes();
+    }
+
+    bool ret = false;
+    for (int ind = 0; ind < mSupportedOuterTypes.count(); ind++) {
+        if (mSupportedOuterTypes[ind].pluginHandle() == handle) {
+            ret = true;
+        }
+    }
+    return ret;
+}
+
+bool EapQtConfigInterfacePrivate::setSelectedOuterTypes(
+    const QList<EapQtPluginHandle>& outerHandles)
+{
+    qDebug("EapQtConfigInterfacePrivate::setSelectedOuterTypes()");
+
+
+    checkInstanceThrowing();
+
+    if (!mEapDbIndexValid || mEapGsIf.isNull()) {
+        qDebug()
+            << "ERROR: Database reference not valid (or mEapGsIf is NULL), call setConfigurationReference first!";
+        return false;
+    }
+
+    // check if mSupportedOuterTypes is up-to-date
+    if (mSupportedOuterTypes.count() <= 0) {
+        // update mSupportedOuterTypes
+        (void) supportedOuterTypes();
+    }
+
+    // clear arrays
+    mOuterEapsOn.Reset();
+    mOuterEapsOff.Reset();
+
+    // pick only the supported ones from outerHandles
+    TEapExpandedType tmpEap;
+    for (int ind = 0; ind < mSupportedOuterTypes.count(); ind++) {
+        if (outerHandles.contains(mSupportedOuterTypes[ind].pluginHandle())) {
+
+            // convert to TEapExpandedType
+            tmpEap.SetValue(
+                mSupportedOuterTypes[ind].pluginHandle().type().eapExpandedData().data(),
+                mSupportedOuterTypes[ind].pluginHandle().type().eapExpandedData().length());
+
+            // add to mOuterEapsOn
+            mOuterEapsOn.Append(tmpEap);
+
+            qDebug()
+                << "EapQtConfigInterfacePrivate - setSelectedOuterTypes adding to enabledOuterHandles: "
+                << mSupportedOuterTypes[ind].pluginHandle().type().eapExpandedData().toHex();
+        }
+    }
+
+    bool ret = true;
+
+    // set selection to EAP server, no need to have correct content in mOuterEapsOff,  
+    // EAP server handles it, mOuterEapsOn is only important
+    TUint err = mEapGsIf->SetEapMethods(mOuterEapsOn, mOuterEapsOff);
+    if (err != KErrNone) {
+        qDebug("EapQtConfigInterfacePrivate::setSelectedOuterTypes() - SetEapMethods failed: %d",
+            err);
+        // nothing we can do to recover, just exit
+        ret = false;
+    }
+    return ret;
+}
+
+bool EapQtConfigInterfacePrivate::isSupportedInnerType(const EapQtPluginHandle& outerHandle,
+    const EapQtPluginHandle& innerHandle)
+{
+    qDebug("EapQtConfigInterfacePrivate::isSupportedInnerType(), this = 0x%08x", this);
+
+
+    checkInstanceThrowing();
+
+    // update mSupportedInnerTypes
+    (void) supportedInnerTypes(outerHandle);
+
+    for (int ind = 0; ind < mSupportedInnerTypes.count(); ind++) {
+        if (mSupportedInnerTypes[ind].pluginHandle() == innerHandle) {
+            return true;
+        }
+    }
+    return false;
+}
+
+bool EapQtConfigInterfacePrivate::deleteConfiguration()
+{
+    qDebug("EapQtConfigInterfacePrivate::deleteConfiguration(), this = 0x%08x", this);
+
+
+    checkInstanceThrowing();
+
+    if (!mEapDbIndexValid || mEapGsIf.isNull()) {
+        qDebug()
+            << "ERROR: Database reference not valid (or mEapGsIf is NULL), call setConfigurationReference first!";
+        return false;
+    }
+
+    bool ret = true;
+    TInt err = mEapGsIf->DeleteAllEapSettings();
+    if (err != KErrNone) {
+        ret = false;
+    }
+    return ret;
+}
+
+void EapQtConfigInterfacePrivate::loadPlugins()
+{
+    qDebug("EapQtConfigInterfacePrivate::loadPlugins(), this = 0x%08x", this);
+
+    checkInstanceThrowing();
+
+    QDir pluginsDir(eapPluginDir);
+    foreach( QString fileName, pluginsDir.entryList(QDir::Files) )
+        {
+            QPluginLoader loader(pluginsDir.absoluteFilePath(fileName));
+            QObject *tmp = loader.instance();
+            if (tmp) {
+                CpEapPluginInterface *plugin = qobject_cast<CpEapPluginInterface*> (tmp);
+                if (plugin) {
+                    mPlugins.append(plugin);
+                }
+            }
+        }
+
+    // collect UI plugin infos
+    QList<CpEapPluginInterface*>::iterator iter;
+    for (iter = mPlugins.begin(); iter != mPlugins.end(); ++iter) {
+        mPluginInfos.append((*iter)->pluginInfo());
+    }
+}
+
+CpBaseSettingView *EapQtConfigInterfacePrivate::uiInstance(const EapQtPluginHandle& outerHandle,
+    const EapQtPluginHandle& pluginHandle)
+{
+    qDebug("EapQtConfigInterfacePrivate::uiInstance(), this = 0x%08x", this);
+
+
+    checkInstanceThrowing();
+
+    // if outer type UI is requested, outerHandle must be undefined and pluginHandle
+    // must be supported as outer type
+    if (outerHandle == EapQtPluginHandle::PluginUndefined) {
+        if (!isSupportedOuterType(pluginHandle)) {
+            qDebug() << "ERROR: EapQtConfigInterfacePrivate::uiInstance() -"
+                << "plugin not supported as outer type";
+            return NULL;
+        }
+    }
+    else {
+        // outerHandle defined, pluginHandle must be supported inside outerHandle
+        if (!isSupportedInnerType(outerHandle, pluginHandle)) {
+            qDebug() << "ERROR: EapQtConfigInterfacePrivate::uiInstance() -"
+                << "plugin not supported as the inner type of the specified outer type";
+            return NULL;
+        }
+    }
+
+    if (mTranslator.isNull()) {
+        // install translations for EAP UI plugins
+        mTranslator.reset(new HbTranslator(eapTranslationFile));
+    }
+
+    // go through all interfaces (dlls)
+    QList<CpEapPluginInterface*>::iterator iter;
+    for (iter = mPlugins.begin(); iter != mPlugins.end(); ++iter) {
+        QList<EapQtPluginInfo> plugins;
+        plugins.append((*iter)->pluginInfo());
+
+        // go through all plugings inside the interface implementation
+        QList<EapQtPluginInfo>::iterator j;
+        for (j = plugins.begin(); j != plugins.end(); ++j) {
+            if ((*j).pluginHandle() == pluginHandle) {
+                qDebug("EapQtConfigInterfacePrivate::uiInstance() - found plugin");
+                // indicate configured IAP to plugin
+                (*iter)->setSettingsReference(getEapBearer(), mIapId);
+                return (*iter)->uiInstance(outerHandle, *j);
+            }
+        }
+
+    }
+    qDebug("ERROR: EapQtConfigInterfacePrivate::uiInstance() - plugin not found");
+    return NULL;
+}
+
+EapQtConfigInterface::EapBearerType EapQtConfigInterfacePrivate::getEapBearer()
+{
+    EapQtConfigInterface::EapBearerType ret(EapQtConfigInterface::EapBearerTypeWlan);
+
+    switch (mEapBearer) {
+    case EVpn:
+        ret = EapQtConfigInterface::EapBearerTypeVpn;
+        break;
+    default:
+        ret = EapQtConfigInterface::EapBearerTypeWlan;
+        break;
+    }
+    return ret;
+}
+
+EapQtValidator *EapQtConfigInterfacePrivate::validatorEap(EapQtExpandedEapType type,
+    EapQtConfig::SettingsId id)
+{
+    qDebug("EapQtConfigInterfacePrivate::validatorEap(), this = 0x%08x", this);
+
+
+    EapQtValidator *ret = NULL;
+
+    switch (id) {
+
+    case EapQtConfig::Username:
+        switch (type.type()) {
+        case EapQtExpandedEapType::TypeEapAka:
+        case EapQtExpandedEapType::TypeEapFast:
+        case EapQtExpandedEapType::TypeEapGtc:
+        case EapQtExpandedEapType::TypeLeap:
+        case EapQtExpandedEapType::TypeEapMschapv2:
+        case EapQtExpandedEapType::TypePeap:
+        case EapQtExpandedEapType::TypeEapSim:
+        case EapQtExpandedEapType::TypeEapTls:
+        case EapQtExpandedEapType::TypeEapTtls:
+        case EapQtExpandedEapType::TypePap:
+        case EapQtExpandedEapType::TypePlainMschapv2:
+            ret = new EapQtValidatorUsername(type);
+            break;
+        default:
+            ret = NULL;
+        }
+        break;
+
+    case EapQtConfig::Password:
+        switch (type.type()) {
+        case EapQtExpandedEapType::TypeEapGtc:
+        case EapQtExpandedEapType::TypeLeap:
+        case EapQtExpandedEapType::TypeEapMschapv2:
+        case EapQtExpandedEapType::TypePap:
+        case EapQtExpandedEapType::TypePlainMschapv2:
+            ret = new EapQtValidatorPassword(type);
+            break;
+        default:
+            ret = NULL;
+        }
+        break;
+
+    case EapQtConfig::Realm:
+        switch (type.type()) {
+        case EapQtExpandedEapType::TypeEapAka:
+        case EapQtExpandedEapType::TypeEapFast:
+        case EapQtExpandedEapType::TypePeap:
+        case EapQtExpandedEapType::TypeEapSim:
+        case EapQtExpandedEapType::TypeEapTls:
+        case EapQtExpandedEapType::TypeEapTtls:
+            ret = new EapQtValidatorRealm(type);
+            break;
+        default:
+            ret = NULL;
+        }
+        break;
+
+    default:
+        ret = NULL;
+
+    }
+
+    return ret;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/eapqtconfiginterface/src/eapqtvalidatorpacstorepassword.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   EAP method validator: PAC Store password
+ *
+ */
+
+/*
+ * %version: 4 %
+ */
+
+#include <HbEditorInterface>
+#include <HbLineEdit>
+#include "eapqtvalidatorpacstorepassword.h"
+
+EapQtValidatorPacStorePassword::EapQtValidatorPacStorePassword()
+{
+}
+
+EapQtValidatorPacStorePassword::~EapQtValidatorPacStorePassword()
+{
+}
+
+EapQtValidator::Status EapQtValidatorPacStorePassword::validate(QVariant value)
+{
+    // TODO: implement this
+    if (value.toString().length() > 0) {
+        return EapQtValidator::StatusOk;
+    }   
+    return EapQtValidator::StatusInvalid;
+}
+
+void EapQtValidatorPacStorePassword::updateEditor(HbLineEdit *edit)
+{
+    HbEditorInterface editInterface(edit);
+    editInterface.setInputConstraints(HbEditorConstraintLatinAlphabetOnly);
+    edit->setInputMethodHints(Qt::ImhNoPredictiveText | Qt::ImhPreferLowercase);
+    // TODO:
+    edit->setMaxLength(1000);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/eapqtconfiginterface/src/eapqtvalidatorpacstorepasswordconfirm.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   EAP method validator: PAC Store password confirmation
+ *
+ */
+
+/*
+ * %version: 3 %
+ */
+
+#include <HbEditorInterface>
+#include <HbLineEdit>
+#include "eapqtvalidatorpacstorepasswordconfirm.h"
+
+EapQtValidatorPacStorePasswordConfirm::EapQtValidatorPacStorePasswordConfirm()
+{
+}
+
+EapQtValidatorPacStorePasswordConfirm::~EapQtValidatorPacStorePasswordConfirm()
+{
+}
+
+EapQtValidator::Status EapQtValidatorPacStorePasswordConfirm::validate(QVariant value)
+{
+    // TODO: implement this
+    if (value == QVariant("1234")){
+        return EapQtValidator::StatusOk;
+    }
+    return EapQtValidator::StatusInvalid;
+}
+
+void EapQtValidatorPacStorePasswordConfirm::updateEditor(HbLineEdit *edit)
+{
+    HbEditorInterface editInterface(edit);
+    editInterface.setInputConstraints(HbEditorConstraintLatinAlphabetOnly);
+    edit->setInputMethodHints(Qt::ImhNoPredictiveText | Qt::ImhPreferLowercase);
+    // TODO:
+    edit->setMaxLength(1000);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/eapqtconfiginterface/src/eapqtvalidatorpassword.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   EAP method validator: password
+ *
+ */
+
+/*
+ * %version: 6 %
+ */
+
+#include <HbEditorInterface>
+#include <HbLineEdit>
+
+#include "eapqtvalidatorpassword.h"
+#include "eapqtconfiginterface_p.h"
+
+EapQtValidatorPassword::EapQtValidatorPassword(EapQtExpandedEapType type) :
+    mEapType(type)
+{
+    qDebug("EapQtValidatorPassword::EapQtValidatorPassword()");
+}
+
+EapQtValidatorPassword::~EapQtValidatorPassword()
+{
+    qDebug("EapQtValidatorPassword::~EapQtValidatorPassword()");
+}
+
+EapQtValidator::Status EapQtValidatorPassword::validate(QVariant value)
+{
+    Status status(StatusOk);
+
+    switch (mEapType.type()) {
+    case EapQtExpandedEapType::TypeEapGtc:
+    case EapQtExpandedEapType::TypeEapMschapv2:
+    case EapQtExpandedEapType::TypeLeap:
+    case EapQtExpandedEapType::TypePap:
+    case EapQtExpandedEapType::TypePlainMschapv2:
+        status = validateGeneral(value);
+        break;
+    default:
+        // for methods that do not have a password
+        status = StatusInvalid;
+    }
+
+    return status;
+}
+
+EapQtValidator::Status EapQtValidatorPassword::validateGeneral(QVariant value)
+{
+    Status status(StatusOk);
+    QString str = value.toString();
+
+    // input must be of correct type
+    if (value.type() != QVariant::String) {
+        status = StatusInvalid;
+    }
+    // zero length password is not ok
+    else if (str.length() == 0) {
+        status = StatusTooShort;
+    }
+    // check maximum length
+    else if (str.length() > EapQtConfigInterfacePrivate::StringMaxLength) {
+        status = StatusTooLong;
+    }
+
+    // any character is ok for passwords
+    qDebug("EapQtValidatorPassword::validateGeneral - return status: %d", status);
+
+    return status;
+}
+
+void EapQtValidatorPassword::updateEditor(HbLineEdit *edit)
+{
+    switch (mEapType.type()) {
+    case EapQtExpandedEapType::TypeEapGtc:
+    case EapQtExpandedEapType::TypeEapMschapv2:
+    case EapQtExpandedEapType::TypeLeap:
+    case EapQtExpandedEapType::TypePap:
+    case EapQtExpandedEapType::TypePlainMschapv2:
+        updateEditorGeneral(edit);
+        // falls through on purpose
+    default:
+        // nothing for methods that do not have a password
+        break;
+    }
+}
+
+void EapQtValidatorPassword::updateEditorGeneral(HbLineEdit *edit)
+{
+    qDebug("EapQtValidatorPassword::updateEditorGeneral()");
+
+    edit->setMaxLength(EapQtConfigInterfacePrivate::StringMaxLength);
+    edit->setInputMethodHints(Qt::ImhNoAutoUppercase | Qt::ImhPreferLowercase
+        | Qt::ImhNoPredictiveText);
+
+    // do not set editor class or auto completing since they might leak the pwd
+    HbEditorInterface editInterface(edit);
+    editInterface.setSmileyTheme(HbSmileyTheme());
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/eapqtconfiginterface/src/eapqtvalidatorrealm.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,121 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   EAP method validator: realm
+ *
+ */
+
+/*
+ * %version: 5 %
+ */
+
+#include <HbEditorInterface>
+#include <HbLineEdit>
+
+#include "eapqtvalidatorrealm.h"
+#include "eapqtconfiginterface_p.h"
+
+EapQtValidatorRealm::EapQtValidatorRealm(EapQtExpandedEapType type) :
+    mEapType(type)
+{
+}
+
+EapQtValidatorRealm::~EapQtValidatorRealm()
+{
+}
+
+EapQtValidator::Status EapQtValidatorRealm::validate(QVariant value)
+{
+    Status status(StatusOk);
+
+    switch (mEapType.type()) {
+    case EapQtExpandedEapType::TypeEapAka:
+    case EapQtExpandedEapType::TypeEapFast:
+    case EapQtExpandedEapType::TypeEapGtc:
+    case EapQtExpandedEapType::TypeEapMschapv2:
+    case EapQtExpandedEapType::TypeEapSim:
+    case EapQtExpandedEapType::TypeEapTls:
+    case EapQtExpandedEapType::TypeEapTtls:
+    case EapQtExpandedEapType::TypeLeap:
+    case EapQtExpandedEapType::TypePeap:
+        status = validateGeneral(value);
+        break;
+    default:
+        // for methods that do not have a realm
+        status = StatusInvalid;
+    }
+
+    return status;
+}
+
+EapQtValidator::Status EapQtValidatorRealm::validateGeneral(QVariant value)
+{
+    Status status(StatusOk);
+    QString str = value.toString();
+
+    // input must be of correct type
+    if (value.type() != QVariant::String) {
+        status = StatusInvalid;
+    }
+    // zero length realm is ok
+    else if (str.length() > EapQtConfigInterfacePrivate::StringMaxLength) {
+        status = StatusTooLong;
+    }
+    // username and realm are separated with @, not allowed to be part of realm
+    else if (str.contains(QChar('@'), Qt::CaseInsensitive)) {
+        status = StatusInvalidCharacters;
+    }
+
+    qDebug("EapQtValidatorRealm::validateGeneral - return status: %d", status);
+
+    return status;
+}
+
+void EapQtValidatorRealm::updateEditor(HbLineEdit *edit)
+{
+    switch (mEapType.type()) {
+    case EapQtExpandedEapType::TypeEapAka:
+    case EapQtExpandedEapType::TypeEapFast:
+    case EapQtExpandedEapType::TypeEapGtc:
+    case EapQtExpandedEapType::TypeEapMschapv2:
+    case EapQtExpandedEapType::TypeEapSim:
+    case EapQtExpandedEapType::TypeEapTls:
+    case EapQtExpandedEapType::TypeEapTtls:
+    case EapQtExpandedEapType::TypeLeap:
+    case EapQtExpandedEapType::TypePeap:
+        updateEditorGeneral(edit);
+        // falls through on purpose
+    default:
+        // no realm for other types
+        break;
+    }
+}
+
+void EapQtValidatorRealm::updateEditorGeneral(HbLineEdit *edit)
+{
+    qDebug("EapQtValidatorRealm::updateEditorGeneral()");
+
+    edit->setMaxLength(EapQtConfigInterfacePrivate::StringMaxLength);
+    edit->setInputMethodHints(Qt::ImhNoAutoUppercase | Qt::ImhPreferLowercase
+        | Qt::ImhNoPredictiveText);
+
+    HbEditorInterface editInterface(edit);
+    editInterface.setEditorClass(HbInputEditorClassNetworkDomain);
+
+    HbEditorConstraints constraints = HbEditorConstraintAutoCompletingField;
+    editInterface.setInputConstraints(constraints);
+
+    // no smileys :)
+    editInterface.setSmileyTheme(HbSmileyTheme());
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/eapqtconfiginterface/src/eapqtvalidatorusername.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,121 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   EAP method validator: username
+ *
+ */
+
+/*
+ * %version: 5 %
+ */
+
+#include <HbEditorInterface>
+#include <HbLineEdit>
+
+#include "eapqtvalidatorusername.h"
+#include "eapqtconfiginterface_p.h"
+
+EapQtValidatorUsername::EapQtValidatorUsername(EapQtExpandedEapType type) :
+    mEapType(type)
+{
+}
+
+EapQtValidatorUsername::~EapQtValidatorUsername()
+{
+}
+
+EapQtValidator::Status EapQtValidatorUsername::validate(QVariant value)
+{
+    Status status(StatusOk);
+
+    switch (mEapType.type()) {
+    case EapQtExpandedEapType::TypeEapAka:
+    case EapQtExpandedEapType::TypeEapFast:
+    case EapQtExpandedEapType::TypeEapGtc:
+    case EapQtExpandedEapType::TypeEapMschapv2:
+    case EapQtExpandedEapType::TypeEapSim:
+    case EapQtExpandedEapType::TypeEapTls:
+    case EapQtExpandedEapType::TypeEapTtls:
+    case EapQtExpandedEapType::TypeLeap:
+    case EapQtExpandedEapType::TypePeap:
+        status = validateGeneral(value);
+        break;
+    default:
+        // for methods that do not have a realm
+        status = StatusInvalid;
+    }
+
+    return status;
+}
+
+EapQtValidator::Status EapQtValidatorUsername::validateGeneral(QVariant value)
+{
+    Status status(StatusOk);
+    QString str = value.toString();
+
+    // input must be of correct type
+    if (value.type() != QVariant::String) {
+        status = StatusInvalid;
+    }
+    // zero length username is ok
+    else if (str.length() > EapQtConfigInterfacePrivate::StringMaxLength) {
+        status = StatusTooLong;
+    }
+    // username and realm are separated with @, not allowed to be part of username
+    else if (str.contains(QChar('@'), Qt::CaseInsensitive)) {
+        status = StatusInvalidCharacters;
+    }
+
+    qDebug("EapQtValidatorUsername::validateGeneral - return status: %d", status);
+
+    return status;
+}
+
+void EapQtValidatorUsername::updateEditor(HbLineEdit *edit)
+{
+    switch (mEapType.type()) {
+    case EapQtExpandedEapType::TypeEapAka:
+    case EapQtExpandedEapType::TypeEapFast:
+    case EapQtExpandedEapType::TypeEapGtc:
+    case EapQtExpandedEapType::TypeEapMschapv2:
+    case EapQtExpandedEapType::TypeEapSim:
+    case EapQtExpandedEapType::TypeEapTls:
+    case EapQtExpandedEapType::TypeEapTtls:
+    case EapQtExpandedEapType::TypeLeap:
+    case EapQtExpandedEapType::TypePeap:
+        updateEditorGeneral(edit);
+        // falls through on purpose
+    default:
+        // no realm for other types
+        break;
+    }
+}
+
+void EapQtValidatorUsername::updateEditorGeneral(HbLineEdit *edit)
+{
+    qDebug("EapQtValidatorUsername::updateEditorGeneral()");
+
+    edit->setMaxLength(EapQtConfigInterfacePrivate::StringMaxLength);
+    edit->setInputMethodHints(Qt::ImhNoAutoUppercase | Qt::ImhPreferLowercase
+        | Qt::ImhNoPredictiveText);
+
+    HbEditorInterface editInterface(edit);
+    editInterface.setEditorClass(HbInputEditorClassUsername);
+
+    HbEditorConstraints constraints = HbEditorConstraintAutoCompletingField;
+    editInterface.setInputConstraints(constraints);
+
+    // no smileys :)
+    editInterface.setSmileyTheme(HbSmileyTheme());
+}
--- a/securitysettings/qtconfigutils/eapqtplugininfo/eapqtplugininfo.pro	Thu May 13 22:51:27 2010 +0300
+++ b/securitysettings/qtconfigutils/eapqtplugininfo/eapqtplugininfo.pro	Mon May 24 20:32:47 2010 +0300
@@ -15,44 +15,45 @@
 #   QT EAP plugin information handling component
 #
 
-# %version: 1 %
+# %version: 9 %
 
 
 TEMPLATE            = lib
 TARGET              = eapqtplugininfo
-TARGET.CAPABILITY   = CAP_GENERAL_DLL
+
 DEFINES             += BUILD_EAP_QT_PLUGIN_INFO_DLL
 DEPENDPATH          += . 
 
-# Store generated files to their own directories
-MOC_DIR     = _moc
-RCC_DIR     = _rcc
-OBJECTS_DIR = _objects
+# Storage for generated files
+MOC_DIR     = _build
+RCC_DIR     = _build
+OBJECTS_DIR = _build
 
-# hb config needed when hb classes are used
+# hb config
 CONFIG += hb
 
-INCLUDEPATH += \
-	../../inc \
-    $$MW_LAYER_SYSTEMINCLUDE
+# path to def files
+defFilePath = .
+
+INCLUDEPATH +=
     
-HEADERS += 
+HEADERS += inc
 
 SOURCES += \
     src/eapqtplugininfo.cpp \
-    src/eapqtpluginhandle.cpp
-    
-defFilePath = ..
+    src/eapqtplugininfo_p.cpp \
+    src/eapqtexpandedeaptype.cpp \
+    src/eapqtexpandedeaptype_p.cpp \
+    src/eapqtpluginhandle.cpp \
+    src/eapqtpluginhandle_p.cpp
 
 symbian { 
-    # no Symbian only headers
-    HEADERS += 
     
-    # no Symbian only sources
-    SOURCES += 
-    
-    # add needed Symbian libs here
-    LIBS +=
+    # symbian libs
+    LIBS += \
+        -leapsymbiantools \
+        -leaptools \
+        -leaptrace
     
     TARGET.UID3 = 0x2002C2FD
     TARGET.EPOCALLOWDLLDATA = 1
@@ -60,9 +61,7 @@
     TARGET.CAPABILITY = CAP_GENERAL_DLL
     
     # exports not frozen yet
-    # MMP_RULES += EXPORTUNFROZEN
-    BLD_INF_RULES.prj_exports += \
-        "$${LITERAL_HASH}include <platform_paths.hrh>"
+    MMP_RULES += EXPORTUNFROZEN
         
     BLD_INF_RULES.prj_exports += \ 
   		"rom/eapqtplugininfo.iby CORE_MW_LAYER_IBY_EXPORT_PATH(eapqtplugininfo.iby)"        
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/eapqtplugininfo/inc/eapqtexpandedeaptype_p.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,46 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*   Expanded EAP type QT data structure
+*
+*/
+
+/*
+* %version: 3 %
+*/
+
+#ifndef EAPQTEXPANDEDEAPTYPE_P_H
+#define EAPQTEXPANDEDEAPTYPE_P_H
+
+#include <QByteArray>
+#include "eapqtexpandedeaptype.h"
+
+class EapQtExpandedEapTypePrivate
+{
+    friend class EapQtExpandedEapType;
+
+public:
+    EapQtExpandedEapTypePrivate();
+    EapQtExpandedEapTypePrivate(const EapQtExpandedEapType::Type type);
+    EapQtExpandedEapTypePrivate(const QByteArray data);
+    
+    ~EapQtExpandedEapTypePrivate();
+
+private:
+    Q_DISABLE_COPY(EapQtExpandedEapTypePrivate)
+    QByteArray mData;
+    EapQtExpandedEapType::Type mType;
+};
+
+#endif /* EAPQTEXPANDEDEAPTYPE_P_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/eapqtplugininfo/inc/eapqtpluginhandle_p.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   Control Panel EAP plugin information
+ *
+ */
+
+/*
+ * %version: 2 %
+ */
+
+
+#ifndef EAPQTPLUGINHANDLE_P_H
+#define EAPQTPLUGINHANDLE_P_H
+
+#include "eapqtexpandedeaptype.h"
+
+class EapQtPluginHandlePrivate
+{
+    friend class EapQtPluginHandle;
+
+public:
+    EapQtPluginHandlePrivate(EapQtExpandedEapType type, int uid);
+    ~EapQtPluginHandlePrivate();
+
+private:
+    EapQtPluginHandlePrivate();
+    Q_DISABLE_COPY(EapQtPluginHandlePrivate)
+    EapQtExpandedEapType mType;
+    int mProtocolImplementationUid;
+};
+
+#endif /* EAPQTPLUGINHANDLE_P_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/eapqtplugininfo/inc/eapqtplugininfo_p.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   Control Panel EAP plugin information
+ *
+ */
+
+/*
+ * %version: 3 %
+ */
+
+#ifndef EAPQTPLUGININFO_P_H
+#define EAPQTPLUGININFO_P_H
+
+#include <QString>
+#include "eapqtpluginhandle.h"
+
+class EapQtPluginInfoPrivate
+{
+    friend class EapQtPluginInfo;
+
+public:
+    EapQtPluginInfoPrivate(EapQtPluginHandle mHandle, QString locId, int orderNumber);
+    ~EapQtPluginInfoPrivate();
+
+private:
+    EapQtPluginInfoPrivate();
+    Q_DISABLE_COPY(EapQtPluginInfoPrivate)
+    EapQtPluginHandle mHandle;
+    QString mLocId;
+    int mOrderNumber;
+};
+
+#endif /* EAPPLUGININFO_P_H */
--- a/securitysettings/qtconfigutils/eapqtplugininfo/rom/eapqtplugininfo.iby	Thu May 13 22:51:27 2010 +0300
+++ b/securitysettings/qtconfigutils/eapqtplugininfo/rom/eapqtplugininfo.iby	Mon May 24 20:32:47 2010 +0300
@@ -20,12 +20,16 @@
 * %version: 2 %
 */
 
-#ifndef __EAPQTPLUGININFO_IBY__
-#define __EAPQTPLUGININFO_IBY__
+#ifndef EAPQTPLUGININFO_IBY
+#define EAPQTPLUGININFO_IBY
 
-#include <bldvariant.hrh>
 #include <data_caging_paths_for_iby.hrh>
+#include <bldvariant.hrh>
 
-file=ABI_DIR\BUILD_DIR\eapqtplugininfo.dll SHARED_LIB_DIR\eapqtplugininfo.dll
+#ifdef __PROTOCOL_WLAN
+
+file=ABI_DIR\BUILD_DIR\eapqtplugininfo.dll 	SHARED_LIB_DIR\eapqtplugininfo.dll
 
-#endif
+#endif  // __PROTOCOL_WLAN
+
+#endif  // EAPQTPLUGININFO_IBY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/eapqtplugininfo/src/eapqtexpandedeaptype.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   Expanded EAP type QT data structure
+ *
+ */
+
+/*
+ * %version: 12 %
+ */
+
+#include "eapqtexpandedeaptype.h"
+#include "eapqtexpandedeaptype_p.h"
+
+//----------------------------------------------------------------------------
+//              EapQtExpandedEapType                
+//----------------------------------------------------------------------------
+
+EapQtExpandedEapType::EapQtExpandedEapType() :
+    d_ptr(new EapQtExpandedEapTypePrivate)
+{
+}
+
+EapQtExpandedEapType::EapQtExpandedEapType(const Type type) :
+    d_ptr(new EapQtExpandedEapTypePrivate(type))
+{
+}
+
+EapQtExpandedEapType::EapQtExpandedEapType(const QByteArray data) :
+    d_ptr(new EapQtExpandedEapTypePrivate(data))
+{
+}
+
+EapQtExpandedEapType::EapQtExpandedEapType(const EapQtExpandedEapType & type) :
+    d_ptr(new EapQtExpandedEapTypePrivate)
+{
+    d_ptr->mData = type.d_ptr->mData;
+    d_ptr->mType = type.d_ptr->mType;
+}
+
+EapQtExpandedEapType::~EapQtExpandedEapType()
+{
+    // scoped pointer delete
+}
+
+QByteArray EapQtExpandedEapType::eapExpandedData() const
+{
+    return d_ptr->mData;
+}
+
+EapQtExpandedEapType::Type EapQtExpandedEapType::type() const
+{
+    return d_ptr->mType;
+}
+
+bool EapQtExpandedEapType::operator ==(const EapQtExpandedEapType &right_type_value) const
+{
+    return (d_ptr->mData == right_type_value.d_ptr->mData) && (d_ptr->mType == right_type_value.d_ptr->mType);
+}
+
+bool EapQtExpandedEapType::operator !=(const EapQtExpandedEapType &right_type_value) const
+{
+    return (d_ptr->mData != right_type_value.d_ptr->mData) || (d_ptr->mType != right_type_value.d_ptr->mType);
+}
+
+EapQtExpandedEapType& EapQtExpandedEapType::operator=(const EapQtExpandedEapType &type)
+{
+    // check if assigning to myself
+    if (this != &type) {
+        d_ptr.reset(new EapQtExpandedEapTypePrivate);
+        d_ptr->mData = type.d_ptr->mData;
+        d_ptr->mType = type.d_ptr->mType;
+    }
+    return *this;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/eapqtplugininfo/src/eapqtexpandedeaptype_p.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,195 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   Expanded EAP type QT data structure
+ *
+ */
+
+/*
+ * %version: 4 %
+ */
+
+#include "eapqtexpandedeaptype_p.h"
+#include <EapExpandedType.h>
+
+//----------------------------------------------------------------------------
+//              EapQtExpandedEapTypePrivate                
+//----------------------------------------------------------------------------
+
+EapQtExpandedEapTypePrivate::EapQtExpandedEapTypePrivate()
+{
+    mData.clear();
+    mType = EapQtExpandedEapType::TypeUndefined;
+}
+
+EapQtExpandedEapTypePrivate::EapQtExpandedEapTypePrivate(const EapQtExpandedEapType::Type type)
+{
+    TBuf8<KEapExpandedTypeLength> tmpType;
+    TEapExpandedType tmpEapType;
+
+    mType = type;
+    mData.clear();
+
+    // little bit playing with the types and constructors below to convert to QByteArray
+
+    switch (type) {
+    case EapQtExpandedEapType::TypeEapAka:
+    {
+        TEapExpandedType localTmpEapType(*EapExpandedTypeAka.GetType());
+        tmpEapType = localTmpEapType;
+    }
+        break;
+    case EapQtExpandedEapType::TypeEapFast:
+    {
+        TEapExpandedType localTmpEapType(*EapExpandedTypeFast.GetType());
+        tmpEapType = localTmpEapType;
+    }
+        break;
+    case EapQtExpandedEapType::TypeEapGtc:
+    {
+        TEapExpandedType localTmpEapType(*EapExpandedTypeGtc.GetType());
+        tmpEapType = localTmpEapType;
+    }
+        break;
+    case EapQtExpandedEapType::TypeLeap:
+    {
+        TEapExpandedType localTmpEapType(*EapExpandedTypeLeap.GetType());
+        tmpEapType = localTmpEapType;
+    }
+        break;
+    case EapQtExpandedEapType::TypeEapMschapv2:
+    {
+        TEapExpandedType localTmpEapType(*EapExpandedTypeMsChapv2.GetType());
+        tmpEapType = localTmpEapType;
+    }
+        break;
+    case EapQtExpandedEapType::TypePeap:
+    {
+        TEapExpandedType localTmpEapType(*EapExpandedTypePeap.GetType());
+        tmpEapType = localTmpEapType;
+    }
+        break;
+    case EapQtExpandedEapType::TypeEapSim:
+    {
+        TEapExpandedType localTmpEapType(*EapExpandedTypeSim.GetType());
+        tmpEapType = localTmpEapType;
+    }
+        break;
+    case EapQtExpandedEapType::TypeEapTls:
+    {
+        TEapExpandedType localTmpEapType(*EapExpandedTypeTls.GetType());
+        tmpEapType = localTmpEapType;
+    }
+        break;
+    case EapQtExpandedEapType::TypeEapTtls:
+    {
+        TEapExpandedType localTmpEapType(*EapExpandedTypeTtls.GetType());
+        tmpEapType = localTmpEapType;
+    }
+        break;
+    case EapQtExpandedEapType::TypeProtectedSetup:
+    {
+        TEapExpandedType localTmpEapType(*EapExpandedTypeProtectedSetup.GetType());
+        tmpEapType = localTmpEapType;
+    }
+        break;
+    case EapQtExpandedEapType::TypePap:
+    {
+        TEapExpandedType localTmpEapType(*EapExpandedTypeTtlsPap.GetType());
+        tmpEapType = localTmpEapType;
+    }
+        break;
+    case EapQtExpandedEapType::TypePlainMschapv2:
+    {
+        TEapExpandedType localTmpEapType(*EapExpandedPlainMsChapv2.GetType());
+        tmpEapType = localTmpEapType;
+    }
+        break;
+    case EapQtExpandedEapType::TypeUndefined:
+    default:
+    {
+        TEapExpandedType localTmpEapType(*EapExpandedTypeNone.GetType());
+        tmpEapType = localTmpEapType;
+        mType = EapQtExpandedEapType::TypeUndefined;
+    }
+        break;
+    }
+
+    tmpType = tmpEapType.GetValue();
+    mData.append(reinterpret_cast<const char*> (tmpType.Ptr()), tmpType.Length());
+}
+
+EapQtExpandedEapTypePrivate::EapQtExpandedEapTypePrivate(const QByteArray data)
+{
+    mData = data;
+
+    TEapExpandedType tmpType;
+    tmpType.SetValue(data.data(), data.size());
+
+    if (tmpType.GetValue() == *(EapExpandedTypeGtc.GetType())) {
+        mType = EapQtExpandedEapType::TypeEapGtc;
+
+    }
+    else if (tmpType.GetValue() == *(EapExpandedTypeTls.GetType())) {
+        mType = EapQtExpandedEapType::TypeEapTls;
+
+    }
+    else if (tmpType.GetValue() == *(EapExpandedTypeLeap.GetType())) {
+        mType = EapQtExpandedEapType::TypeLeap;
+
+    }
+    else if (tmpType.GetValue() == *(EapExpandedTypeSim.GetType())) {
+        mType = EapQtExpandedEapType::TypeEapSim;
+
+    }
+    else if (tmpType.GetValue() == *(EapExpandedTypeAka.GetType())) {
+        mType = EapQtExpandedEapType::TypeEapAka;
+
+    }
+    else if (tmpType.GetValue() == *(EapExpandedTypeTtls.GetType())) {
+        mType = EapQtExpandedEapType::TypeEapTtls;
+
+    }
+    else if (tmpType.GetValue() == *(EapExpandedTypePeap.GetType())) {
+        mType = EapQtExpandedEapType::TypePeap;
+
+    }
+    else if (tmpType.GetValue() == *(EapExpandedTypeMsChapv2.GetType())) {
+        mType = EapQtExpandedEapType::TypeEapMschapv2;
+
+    }
+    else if (tmpType.GetValue() == *(EapExpandedTypeFast.GetType())) {
+        mType = EapQtExpandedEapType::TypeEapFast;
+
+    }
+    else if (tmpType.GetValue() == *(EapExpandedTypeProtectedSetup.GetType())) {
+        mType = EapQtExpandedEapType::TypeProtectedSetup;
+
+    }
+    else if (tmpType.GetValue() == *(EapExpandedTypeTtlsPap.GetType())) {
+        mType = EapQtExpandedEapType::TypePap;
+
+    }
+    else if (tmpType.GetValue() == *(EapExpandedPlainMsChapv2.GetType())) {
+        mType = EapQtExpandedEapType::TypePlainMschapv2;
+    }
+    else {
+        mType = EapQtExpandedEapType::TypeUndefined;
+    }
+    qDebug("EapQtExpandedEapTypePrivate(const QByteArray data) - mType: %d", mType);
+}
+
+EapQtExpandedEapTypePrivate::~EapQtExpandedEapTypePrivate()
+{
+}
--- a/securitysettings/qtconfigutils/eapqtplugininfo/src/eapqtpluginhandle.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/securitysettings/qtconfigutils/eapqtplugininfo/src/eapqtpluginhandle.cpp	Mon May 24 20:32:47 2010 +0300
@@ -17,21 +17,119 @@
  */
 
 /*
- * %version: 1 %
+ * %version: 14 %
  */
 
 #include "eapqtpluginhandle.h"
+#include "eapqtpluginhandle_p.h"
+
+struct EapQtPluginHandleMapper
+{
+    EapQtExpandedEapType::Type mType;
+    int mUid;
+};
+
+static const EapQtPluginHandleMapper handleMapper[EapQtPluginHandle::PluginLast] = { 
+    {EapQtExpandedEapType::TypeUndefined,     0x00000000},
+    {EapQtExpandedEapType::TypeEapAka,        0x102073c2},
+    {EapQtExpandedEapType::TypeEapFast,       0x2000BF12},
+    {EapQtExpandedEapType::TypeEapGtc,        0x101f8e80},
+    {EapQtExpandedEapType::TypeLeap,          0x101f8ea7},
+    {EapQtExpandedEapType::TypeEapMschapv2,   0x101f8e67},
+    {EapQtExpandedEapType::TypePeap,          0x101f8e4e},
+    {EapQtExpandedEapType::TypeEapSim,        0x101f8e4b},
+    {EapQtExpandedEapType::TypeEapTls,        0x101f8e4d},
+    {EapQtExpandedEapType::TypeEapTtls,       0x101f8e4f},
+    {EapQtExpandedEapType::TypePap,           0x2001B2F2},
+    {EapQtExpandedEapType::TypePlainMschapv2, 0x101f8e7b}
+};
+
+static const EapQtPluginHandle::Plugin typeMapper[EapQtExpandedEapType::TypeLast] = {
+    EapQtPluginHandle::PluginUndefined, 
+    EapQtPluginHandle::PluginEapAka,
+    EapQtPluginHandle::PluginEapFast, 
+    EapQtPluginHandle::PluginEapGtc,
+    EapQtPluginHandle::PluginLeap, 
+    EapQtPluginHandle::PluginEapMschapv2,
+    EapQtPluginHandle::PluginPeap, 
+    EapQtPluginHandle::PluginEapSim,
+    EapQtPluginHandle::PluginEapTls, 
+    EapQtPluginHandle::PluginEapTtls,
+    EapQtPluginHandle::PluginUndefined, /* no wps plugin */ 
+    EapQtPluginHandle::PluginPap,
+    EapQtPluginHandle::PluginPlainMschapv2 
+};
 
 //----------------------------------------------------------------------------
 //              EapQtPluginHandle
 //----------------------------------------------------------------------------
+EapQtPluginHandle::EapQtPluginHandle() :
+    d_ptr(new EapQtPluginHandlePrivate(handleMapper[PluginUndefined].mType,
+        handleMapper[PluginUndefined].mUid))
+{
+}
 
-// stub implementation for now
+EapQtPluginHandle::EapQtPluginHandle(Plugin id) :
+    d_ptr(NULL)
+{
+    Plugin local_id;
+    if (id < PluginLast) {
+        local_id = id;
+    }
+    else {
+        local_id = PluginUndefined;
+    }
+    d_ptr.reset(new EapQtPluginHandlePrivate(handleMapper[local_id].mType,
+        handleMapper[local_id].mUid));
+}
 
-EapQtPluginHandle::EapQtPluginHandle()
+EapQtPluginHandle::EapQtPluginHandle(EapQtExpandedEapType type, int uid) :
+    d_ptr(new EapQtPluginHandlePrivate(type, uid))
+{
+}
+
+EapQtPluginHandle::EapQtPluginHandle(EapQtExpandedEapType type) :
+    d_ptr(new EapQtPluginHandlePrivate(type, handleMapper[typeMapper[type.type()]].mUid))
+{
+}
+
+EapQtPluginHandle::EapQtPluginHandle(const EapQtPluginHandle& handle) :
+    d_ptr(new EapQtPluginHandlePrivate(handle.type(), handle.protocolImplementationUid()))
 {
 }
 
 EapQtPluginHandle::~EapQtPluginHandle()
 {
+    // scoped pointer delete
 }
+
+EapQtExpandedEapType EapQtPluginHandle::type() const
+{
+    return d_ptr->mType;
+}
+
+int EapQtPluginHandle::protocolImplementationUid() const
+{
+    return d_ptr->mProtocolImplementationUid;
+}
+
+EapQtPluginHandle::Plugin EapQtPluginHandle::pluginId() const
+{
+    return typeMapper[d_ptr->mType.type()];
+}
+
+bool EapQtPluginHandle::operator==(const EapQtPluginHandle &other) const
+{
+    return (other.d_ptr->mProtocolImplementationUid == d_ptr->mProtocolImplementationUid)
+        && (other.d_ptr->mType == d_ptr->mType);
+}
+
+EapQtPluginHandle& EapQtPluginHandle::operator=(const EapQtPluginHandle &handle)
+{
+    // check if assigning to myself
+    if (this != &handle) {
+        d_ptr.reset(new EapQtPluginHandlePrivate(handle.type(), handle.protocolImplementationUid()));
+    }
+    return *this;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/eapqtplugininfo/src/eapqtpluginhandle_p.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   Control Panel EAP plugin information
+ *
+ */
+
+/*
+ * %version: 1 %
+ */
+
+#include "eapqtpluginhandle_p.h"
+
+//----------------------------------------------------------------------------
+//              EapQtPluginHandlePrivate
+//----------------------------------------------------------------------------
+
+
+EapQtPluginHandlePrivate::EapQtPluginHandlePrivate(EapQtExpandedEapType type, int uid) :
+    mType(type), mProtocolImplementationUid(uid)
+{
+}
+
+EapQtPluginHandlePrivate::~EapQtPluginHandlePrivate()
+{
+    // release resources
+}
--- a/securitysettings/qtconfigutils/eapqtplugininfo/src/eapqtplugininfo.cpp	Thu May 13 22:51:27 2010 +0300
+++ b/securitysettings/qtconfigutils/eapqtplugininfo/src/eapqtplugininfo.cpp	Mon May 24 20:32:47 2010 +0300
@@ -17,40 +17,58 @@
  */
 
 /*
- * %version: 1 %
+ * %version: 5 %
  */
 
 #include <QList>
 #include <QVariant>
 
-#include "eapqtplugininfo.h"
+#include <eapqtpluginhandle.h>
+#include <eapqtplugininfo.h>
+
+#include "eapqtplugininfo_p.h"
 
 //----------------------------------------------------------------------------
 //              EapQtPluginInfo
 //----------------------------------------------------------------------------
 
-// stub implementation for now
+EapQtPluginInfo::EapQtPluginInfo(EapQtPluginHandle id, QString locId, int orderNumber) :
+    d_ptr(new EapQtPluginInfoPrivate(id, locId, orderNumber))
+{
+}
 
-EapQtPluginInfo::EapQtPluginInfo(EapQtPluginHandle /* id */, QString /* locId */, int /* orderNumber */)
+EapQtPluginInfo::EapQtPluginInfo(const EapQtPluginInfo & info) :
+    d_ptr(
+        new EapQtPluginInfoPrivate(info.pluginHandle(), info.localizationId(), info.orderNumber()))
 {
 }
 
+EapQtPluginInfo& EapQtPluginInfo::operator=(const EapQtPluginInfo &info)
+{
+    // check if assigning to myself
+    if (this != &info) {
+        d_ptr.reset(new EapQtPluginInfoPrivate(info.pluginHandle(), info.localizationId(),
+            info.orderNumber()));
+    }
+    return *this;
+}
+
 EapQtPluginInfo::~EapQtPluginInfo()
 {
+    // scoped pointer delete
 }
 
 EapQtPluginHandle EapQtPluginInfo::pluginHandle() const
 {
-    EapQtPluginHandle tmp;
-    return tmp;
+    return d_ptr->mHandle;
 }
 
 QString EapQtPluginInfo::localizationId() const
 {
-    return QString();
+    return d_ptr->mLocId;
 }
 
 int EapQtPluginInfo::orderNumber() const
 {
-    return 0;
+    return d_ptr->mOrderNumber;
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/eapqtplugininfo/src/eapqtplugininfo_p.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of the License "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: 
+ *   Control Panel EAP plugin information
+ *
+ */
+
+/*
+ * %version: 1 %
+ */
+
+#include "eapqtplugininfo_p.h"
+
+//----------------------------------------------------------------------------
+//              EapQtPluginInfoPrivate
+//----------------------------------------------------------------------------
+
+EapQtPluginInfoPrivate::EapQtPluginInfoPrivate(EapQtPluginHandle handle, QString locId,
+    int orderNumber) :
+    mHandle(handle), mLocId(locId), mOrderNumber(orderNumber)
+{
+
+}
+
+EapQtPluginInfoPrivate::~EapQtPluginInfoPrivate()
+{
+}
--- a/securitysettings/qtconfigutils/qtconfigutils.pro	Thu May 13 22:51:27 2010 +0300
+++ b/securitysettings/qtconfigutils/qtconfigutils.pro	Mon May 24 20:32:47 2010 +0300
@@ -15,8 +15,8 @@
 #    EAP QT utility components
 #
 
-# %version: 1 %
+# %version: 4 %
 
 TEMPLATE = subdirs
 SUBDIRS = eapqtplugininfo eapqtconfiginterface
-CONFIG += ordered
\ No newline at end of file
+CONFIG += ordered
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/tsrc/run_wst.bat	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,151 @@
+::=============================================================================
+:: Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+:: All rights reserved.
+:: This component and the accompanying materials are made available
+:: under the terms of "Eclipse Public License v1.0"
+:: which accompanies this distribution, and is available
+:: at the URL "http://www.eclipse.org/legal/epl-v10.html".
+::
+:: Initial Contributors:
+:: Nokia Corporation - initial contribution.
+::
+:: Contributors:
+::
+:: Description:
+::
+::=============================================================================
+
+:: Script(s) uses following environment settings:
+:: - CD
+:: - DATE
+:: - TIME
+:: - TEMP
+
+
+::-----------------------------------------------------------------------------
+:: Do the preparations:
+:: - Don't show the commands
+:: - Use local parameters -- don't pollute the global one
+:: - Dim the lights for time of script execution
+:: - Store the current working directory
+::-----------------------------------------------------------------------------
+
+@echo off
+:: echo *** RUN_WST: START:
+setlocal
+color 08
+pushd .
+if not exist run_wst.bat goto INVALID_DIR
+
+
+::-----------------------------------------------------------------------------
+:: Set the local variables
+::-----------------------------------------------------------------------------
+
+::echo *** RUN_WST: SET VARIABLES:
+set wst_root_dir=%cd%
+set wst_log_dir=%wst_root_dir%\wst_log
+set log_file=%wst_log_dir%\wst_log.txt
+set build_script=%wst_root_dir%\wst_script\wst_make.bat
+
+::-----------------------------------------------------------------------------
+:: Check that script exists
+::-----------------------------------------------------------------------------
+
+::echo *** RUN_WST: SOME CHECKS:
+if not exist %build_script% goto INVALID_DIR
+:: Create output directory if it does not exist
+if not exist %wst_log_dir% mkdir %wst_log_dir%
+:: Create log file
+echo *** WST_LOG: BEGIN *** > %log_file%
+
+
+::-----------------------------------------------------------------------------
+:: Check parameters
+::-----------------------------------------------------------------------------
+
+set command=ERROR
+if [%1]==[] set command=CLEAN_OLD_FILES COMPILE_QTCONFIGUTILS COMPILE_TEST_CASES RUN_TEST_CASES GENERATE_REPORTS SHOW_RESULTS
+if [%1]==[CLEAN_OLD] set command=CLEAN_OLD_FILES
+if [%1]==[COMPILE] set command=COMPILE_QTCONFIGUTILS
+if [%1]==[CASES] set command=COMPILE_TEST_CASES
+if [%1]==[RUN] set command=RUN_TEST_CASES
+if [%1]==[REPORTS] set command=GENERATE_REPORTS
+if [%1]==[RESULTS] set command=SHOW_RESULTS
+if [%1]==[BROWSE] set command=START_BROWSER
+if [%1]==[/?] goto HELP
+if [%1]==[HELP] goto HELP
+if [%1]==[/h] goto HELP
+if [%1]==[-h] goto HELP
+
+::-----------------------------------------------------------------------------
+:PARSE_COMMANDS
+::-----------------------------------------------------------------------------
+
+:: echo *** RUN_WST: COMMAND: %command%
+:: echo *** RUN_WST: CALL SCRIPT:
+for %%i IN ( %command% ) DO (
+    call %build_script% %wst_root_dir% wst_log.txt %%i
+    for /f "tokens=3 delims= " %%x in ('find /C " Error " %log_file%') do (
+        if not [%%x]==[0] goto ERROR
+    )
+)
+
+goto THE_END
+
+
+::-----------------------------------------------------------------------------
+:INVALID_DIR
+::-----------------------------------------------------------------------------
+
+echo *** RUN_WST: INVALID DIR:
+echo *** Test script sub-script not found!
+echo *** Please be sure to run the script in same directory,
+echo *** i.e. .\run_wst.bat , and NOT .\wst\run_wst.bat
+
+goto THE_END
+
+
+::-----------------------------------------------------------------------------
+:ERROR
+::-----------------------------------------------------------------------------
+
+echo *** RUN_WST: ERROR:
+color 48
+echo Error in compilation:
+findstr /C:" Error " < %log_file%
+echo.
+Echo Quitting WST.
+
+goto THE_END
+
+
+::-----------------------------------------------------------------------------
+:HELP
+::-----------------------------------------------------------------------------
+
+echo *** RUN_WST: HELP:
+echo Run EAP Qt Configuration Utilities Workstation Testing
+echo.
+echo RUN_WST [param]
+echo.
+echo   param
+echo     [none]  - Do all, from CLEAN_OLD to RESULTS
+echo.
+echo     CLEAN_OLD - Clean metrics and other generated files
+echo     COMPILE - Build EAP QT configuration utilities (qtconfigutils)
+echo     CASES   - Build only Tester components
+echo     RUN     - Run Tester
+echo     REPORTS - Generate reports
+echo     RESULTS - Show results
+echo     BROWSE  - Start browser
+echo.
+
+
+::-----------------------------------------------------------------------------
+:THE_END
+::-----------------------------------------------------------------------------
+
+echo *** RUN_WST: Completed:
+color
+popd
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/tsrc/src/testqtconfigutils.cpp	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,889 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ * This is the source file for testing EAP Configuration Interface.
+ */
+
+/*
+ * %version: 8 %
+ */
+
+#ifdef INCLUDE_UI_CASES
+#warning UI cases included, cases cannot be run in Emulator textshell.
+#endif
+
+// System includes
+#include <QtCore>
+#include <QTest>
+#include <cmmanager_shim.h>
+#include <cmmanagerdefines_shim.h>
+#include <cmconnectionmethod_shim.h>
+#include <eapqtconfiginterface.h>
+#include <eapqtplugininfo.h>
+#include <eapqtvalidator.h>
+#include <eapqtpluginhandle.h>
+#include <eapqtexpandedeaptype.h>
+#include <eapqtcertificateinfo.h>
+
+#ifdef INCLUDE_UI_CASES
+#include <cpbasesettingview.h>
+#endif
+
+// User includes
+#include "testqtconfigutils.h"
+
+// External function prototypes
+
+// Local constants
+static const int global_pluginOrder = 10;
+static const char global_wpsType[] = { 0xfe, 0x00, 0x37, 0x2a, 0x00, 0x00, 0x00, 0x01 };
+static const int global_invalidIap = 9999;
+static int global_undefinedIap = EapQtConfigInterface::IapIdUndefined;
+static int global_wlanIap = -2;
+
+// ======== LOCAL FUNCTIONS ========
+
+// ======== MEMBER FUNCTIONS ========
+
+// ---------------------------------------------------------
+// FRAMEWORK FUNCTIONS
+// ---------------------------------------------------------
+
+/**
+ * This function will be called before the first test function is executed.
+ */
+void TestQtConfigUtils::initTestCase()
+{
+    mEapConfigIf = new EapQtConfigInterface(EapQtConfigInterface::EapBearerTypeWlan,
+        global_undefinedIap);
+
+    mCmm = new CmManagerShim();
+    mCmmShim = mCmm->createConnectionMethod(CMManagerShim::BearerTypeWlan);
+    mCmmShim->setStringAttribute(CMManagerShim::CmName, QString("EAP unit test"));
+    mCmmShim->update();
+    global_wlanIap = mCmmShim->getIntAttribute(CMManagerShim::CmIapId);
+}
+
+/**
+ * This function will be called after the last test function was executed.
+ */
+void TestQtConfigUtils::cleanupTestCase()
+{
+    qDebug("calling mEapConfigIf->setConfigurationReference(global_wlanIap)");
+    mEapConfigIf->setConfigurationReference(global_wlanIap);
+
+    qDebug("calling mEapConfigIf->deleteConfiguration()");
+    mEapConfigIf->deleteConfiguration();
+
+    qDebug("calling delete mEapConfigIf");
+    delete mEapConfigIf;
+
+    qDebug("calling mCmmShim->deleteConnectionMethod()");
+
+    int error;
+    try {
+        mCmmShim->deleteConnectionMethod();
+    } catch (const std::exception &ex) {
+        error = qt_symbian_exception2Error(ex);
+        qDebug("mCmmShim->deleteConnectionMethod() failed with error: %d", error);
+    }
+
+    qDebug("calling delete mCmmShim");
+    try {
+        delete mCmmShim;
+    } catch (const std::exception &ex) {
+        error = qt_symbian_exception2Error(ex);
+        qDebug("delete mCmmShim failed with error: ", error);
+    }
+
+    delete mCmm;
+}
+
+/**
+ * This function will be called before each test function is executed.
+ */
+void TestQtConfigUtils::init()
+{
+
+}
+
+/**
+ * This function will be called after each test function is executed.
+ */
+void TestQtConfigUtils::cleanup()
+{
+
+}
+
+// ---------------------------------------------------------
+// TEST CASES
+// ---------------------------------------------------------
+
+// ---------------------------------------------------------
+// test EapQtPluginInfo
+// ---------------------------------------------------------
+#if 1
+void TestQtConfigUtils::testEapQtPluginInfoPluginUndefined()
+{
+    QString pluginName("PluginUndefined");
+    EapQtPluginInfo info(EapQtPluginHandle::PluginUndefined, pluginName, global_pluginOrder);
+    QVERIFY(info.pluginHandle() == EapQtPluginHandle::PluginUndefined);
+    QVERIFY(info.localizationId() == pluginName);
+    QVERIFY(info.orderNumber() == global_pluginOrder);
+}
+
+void TestQtConfigUtils::testEapQtPluginInfoPluginEapAka()
+{
+    QString pluginName("PluginEapAka");
+    EapQtPluginInfo info(EapQtPluginHandle::PluginEapAka, pluginName, global_pluginOrder);
+    QVERIFY(info.pluginHandle() == EapQtPluginHandle::PluginEapAka);
+    QVERIFY(info.localizationId() == pluginName);
+    QVERIFY(info.orderNumber() == global_pluginOrder);
+}
+
+void TestQtConfigUtils::testEapQtPluginInfoPluginEapFast()
+{
+    QString pluginName("PluginEapFast");
+    EapQtPluginInfo info(EapQtPluginHandle::PluginEapFast, pluginName, global_pluginOrder);
+    QVERIFY(info.pluginHandle() == EapQtPluginHandle::PluginEapFast);
+    QVERIFY(info.localizationId() == pluginName);
+    QVERIFY(info.orderNumber() == global_pluginOrder);
+}
+
+void TestQtConfigUtils::testEapQtPluginInfoPluginEapGtc()
+{
+    QString pluginName("PluginEapGtc");
+    EapQtPluginInfo info(EapQtPluginHandle::PluginEapGtc, pluginName, global_pluginOrder);
+    QVERIFY(info.pluginHandle() == EapQtPluginHandle::PluginEapGtc);
+    QVERIFY(info.localizationId() == pluginName);
+    QVERIFY(info.orderNumber() == global_pluginOrder);
+}
+
+void TestQtConfigUtils::testEapQtPluginInfoPluginLeap()
+{
+    QString pluginName("PluginLeap");
+    EapQtPluginInfo info(EapQtPluginHandle::PluginLeap, pluginName, global_pluginOrder);
+    QVERIFY(info.pluginHandle() == EapQtPluginHandle::PluginLeap);
+    QVERIFY(info.localizationId() == pluginName);
+    QVERIFY(info.orderNumber() == global_pluginOrder);
+}
+
+void TestQtConfigUtils::testEapQtPluginInfoPluginEapMschapv2()
+{
+    QString pluginName("PluginEapMschapv2");
+    EapQtPluginInfo info(EapQtPluginHandle::PluginEapMschapv2, pluginName, global_pluginOrder);
+    QVERIFY(info.pluginHandle() == EapQtPluginHandle::PluginEapMschapv2);
+    QVERIFY(info.localizationId() == pluginName);
+    QVERIFY(info.orderNumber() == global_pluginOrder);
+}
+
+void TestQtConfigUtils::testEapQtPluginInfoPluginPeap()
+{
+    QString pluginName("PluginPeap");
+    EapQtPluginInfo info(EapQtPluginHandle::PluginPeap, pluginName, global_pluginOrder);
+    QVERIFY(info.pluginHandle() == EapQtPluginHandle::PluginPeap);
+    QVERIFY(info.localizationId() == pluginName);
+    QVERIFY(info.orderNumber() == global_pluginOrder);
+}
+
+void TestQtConfigUtils::testEapQtPluginInfoPluginEapSim()
+{
+    QString pluginName("PluginEapSim");
+    EapQtPluginInfo info(EapQtPluginHandle::PluginEapSim, pluginName, global_pluginOrder);
+    QVERIFY(info.pluginHandle() == EapQtPluginHandle::PluginEapSim);
+    QVERIFY(info.localizationId() == pluginName);
+    QVERIFY(info.orderNumber() == global_pluginOrder);
+}
+
+void TestQtConfigUtils::testEapQtPluginInfoPluginEapTls()
+{
+    QString pluginName("PluginEapTls");
+    EapQtPluginInfo info(EapQtPluginHandle::PluginEapTls, pluginName, global_pluginOrder);
+    QVERIFY(info.pluginHandle() == EapQtPluginHandle::PluginEapTls);
+    QVERIFY(info.localizationId() == pluginName);
+    QVERIFY(info.orderNumber() == global_pluginOrder);
+}
+
+void TestQtConfigUtils::testEapQtPluginInfoPluginEapTtls()
+{
+    QString pluginName("PluginEapTtls");
+    EapQtPluginInfo info(EapQtPluginHandle::PluginEapTtls, pluginName, global_pluginOrder);
+    QVERIFY(info.pluginHandle() == EapQtPluginHandle::PluginEapTtls);
+    QVERIFY(info.localizationId() == pluginName);
+    QVERIFY(info.orderNumber() == global_pluginOrder);
+}
+
+void TestQtConfigUtils::testEapQtPluginInfoPluginPap()
+{
+    QString pluginName("PluginPap");
+    EapQtPluginInfo info(EapQtPluginHandle::PluginPap, pluginName, global_pluginOrder);
+    QVERIFY(info.pluginHandle() == EapQtPluginHandle::PluginPap);
+    QVERIFY(info.localizationId() == pluginName);
+    QVERIFY(info.orderNumber() == global_pluginOrder);
+}
+
+void TestQtConfigUtils::testEapQtPluginInfoPluginPlainMschapv2()
+{
+    QString pluginName("PluginPlainMschapv2");
+    EapQtPluginInfo info(EapQtPluginHandle::PluginPlainMschapv2, pluginName, global_pluginOrder);
+    QVERIFY(info.pluginHandle() == EapQtPluginHandle::PluginPlainMschapv2);
+    QVERIFY(info.localizationId() == pluginName);
+    QVERIFY(info.orderNumber() == global_pluginOrder);
+}
+
+void TestQtConfigUtils::testEapQtPluginInfoAssignment()
+{
+    QString pluginName1("PluginPlainMschapv2");
+    QString pluginName2("PluginEapTtls");
+
+    EapQtPluginInfo info1(EapQtPluginHandle::PluginPlainMschapv2, pluginName1, global_pluginOrder);
+    EapQtPluginInfo info2(EapQtPluginHandle::PluginEapTtls, pluginName2, global_pluginOrder + 1);
+
+    info1 = info2;
+
+    QVERIFY(info1.pluginHandle() == info2.pluginHandle());
+    QVERIFY(info1.localizationId() == info2.localizationId());
+    QVERIFY(info1.orderNumber() == info2.orderNumber());
+}
+
+void TestQtConfigUtils::testEapQtPluginInfoSelfAssignment()
+{
+    QString pluginName("PluginEapSim");
+    EapQtPluginInfo info(EapQtPluginHandle::PluginEapSim, pluginName, global_pluginOrder);
+    info = info;
+
+    QVERIFY(info.pluginHandle() == EapQtPluginHandle::PluginEapSim);
+    QVERIFY(info.localizationId() == pluginName);
+    QVERIFY(info.orderNumber() == global_pluginOrder);
+}
+
+// ---------------------------------------------------------
+// test EapQtPluginHandle
+// ---------------------------------------------------------
+
+void TestQtConfigUtils::testEapQtPluginHandleDefaultConstructor()
+{
+    EapQtPluginHandle handle;
+    QVERIFY(handle == EapQtPluginHandle::PluginUndefined);
+}
+
+void TestQtConfigUtils::testEapQtPluginHandlePluginLastConstructor()
+{
+    EapQtPluginHandle handle(EapQtPluginHandle::PluginLast);
+    QVERIFY(handle.pluginId() == EapQtPluginHandle::PluginUndefined);
+}
+
+void TestQtConfigUtils::testEapQtPluginHandleEapTypeConstructor()
+{
+    EapQtPluginHandle handle(EapQtExpandedEapType::TypeEapAka);
+    QVERIFY(handle.pluginId() == EapQtPluginHandle::PluginEapAka);
+}
+
+void TestQtConfigUtils::testEapQtPluginHandleEapTypeUidConstructor()
+{
+    int uid(0x12345678);
+    EapQtPluginHandle handle(EapQtExpandedEapType::TypePeap, uid);
+    QVERIFY(handle.pluginId() == EapQtPluginHandle::PluginPeap);
+    QVERIFY(handle.protocolImplementationUid() == uid);
+}
+
+void TestQtConfigUtils::testEapQtPluginHandleSelfAssignment()
+{
+    EapQtPluginHandle handle(EapQtPluginHandle::PluginEapTls);
+    handle = handle;
+    QVERIFY(handle.pluginId() == EapQtPluginHandle::PluginEapTls);
+}
+
+// ---------------------------------------------------------
+// test EapQtExpandedEapType
+// ---------------------------------------------------------
+
+void TestQtConfigUtils::testEapQtExpandedEapTypeDefaultConstructor()
+{
+    EapQtExpandedEapType eapType;
+    QVERIFY(eapType.type() == EapQtExpandedEapType::TypeUndefined);
+    QVERIFY(eapType.eapExpandedData().count() == 0);
+}
+
+void TestQtConfigUtils::testEapQtExpandedEapTypeLastConstructor()
+{
+    EapQtExpandedEapType eapType(EapQtExpandedEapType::TypeLast);
+    QVERIFY(eapType.type() == EapQtExpandedEapType::TypeUndefined);
+}
+
+void TestQtConfigUtils::testEapQtExpandedEapTypeConstructorWpsType()
+{
+    EapQtExpandedEapType eapType(EapQtExpandedEapType::TypeProtectedSetup);
+    QVERIFY(eapType.type() == EapQtExpandedEapType::TypeProtectedSetup);
+    QVERIFY(eapType.eapExpandedData() == QByteArray(global_wpsType, sizeof(global_wpsType)));
+}
+
+void TestQtConfigUtils::testEapQtExpandedEapTypeConstructorWpsByteArray()
+{
+    QByteArray wpsArray(global_wpsType, sizeof(global_wpsType));
+    EapQtExpandedEapType eapType(wpsArray);
+
+    QVERIFY(eapType.type() == EapQtExpandedEapType::TypeProtectedSetup);
+    QVERIFY(eapType.eapExpandedData() == wpsArray);
+}
+
+void TestQtConfigUtils::testEapQtExpandedEapTypeAssignment()
+{
+    EapQtExpandedEapType eapType1;
+    EapQtExpandedEapType eapType2(EapQtExpandedEapType::TypePlainMschapv2);
+    eapType1 = eapType2;
+
+    QVERIFY(eapType1.type() == eapType2.type());
+    QVERIFY(eapType1.eapExpandedData() == eapType2.eapExpandedData());
+    QVERIFY(eapType1 == eapType2);
+}
+
+void TestQtConfigUtils::testEapQtExpandedEapTypeSelfAssignment()
+{
+    EapQtExpandedEapType eapType(EapQtExpandedEapType::TypeEapTtls);
+    eapType = eapType;
+
+    QVERIFY(eapType == EapQtExpandedEapType::TypeEapTtls);
+    // to test != operator as well
+    QVERIFY(eapType != EapQtExpandedEapType::TypeUndefined);
+}
+
+// ---------------------------------------------------------
+// test EapQtConfigInterface
+// ---------------------------------------------------------
+
+void TestQtConfigUtils::testDefaultConstructor()
+{
+    EapQtConfigInterface localEapConfigIf;
+
+    QScopedPointer<EapQtValidator> val(localEapConfigIf.validatorEap(
+        EapQtExpandedEapType::TypeEapAka, EapQtConfig::Username));
+
+    EapQtValidator::Status status = val->validate(QString("test"));
+    QVERIFY(status == EapQtValidator::StatusOk);
+
+    status = val->validate(QString());
+    QVERIFY(status == EapQtValidator::StatusOk);
+
+    status = val->validate(QByteArray());
+    QVERIFY(status == EapQtValidator::StatusInvalid);
+
+    status = val->validate(QString("pwd@realm"));
+    QVERIFY(status == EapQtValidator::StatusInvalidCharacters);
+
+    status = val->validate(QString("@"));
+    QVERIFY(status == EapQtValidator::StatusInvalidCharacters);
+
+    status = val->validate(QString("X"));
+    QVERIFY(status == EapQtValidator::StatusOk);
+
+    status = val->validate(QString("uSerNäme"));
+    QVERIFY(status == EapQtValidator::StatusOk);
+
+    status = val->validate(QString("as0d7fg9µ8a&&¤%GSB*^ü~||><:M;_-§][6{]{[]£"));
+    QVERIFY(status == EapQtValidator::StatusOk);
+
+    QString veryLong(254, QChar('Z'));
+
+    status = val->validate(veryLong);
+    QVERIFY(status == EapQtValidator::StatusOk);
+
+    veryLong.append("}");
+
+    status = val->validate(veryLong);
+    QVERIFY(status == EapQtValidator::StatusOk);
+
+    veryLong.append("K");
+
+    status = val->validate(veryLong);
+    QVERIFY(status == EapQtValidator::StatusTooLong);
+
+    // this one should throw since not supported for validator instance
+    bool pass(false);
+    try {
+        localEapConfigIf.setConfigurationReference(global_wlanIap);
+    } catch (const std::exception&) {
+        pass = true;
+    }
+    QVERIFY(pass == true);
+}
+
+void TestQtConfigUtils::testParallelInstances()
+{
+    EapQtConfigInterface localEapConfigIf(EapQtConfigInterface::EapBearerTypeWlan,
+        global_undefinedIap);
+    QVERIFY(localEapConfigIf.isSupportedOuterType(EapQtPluginHandle::PluginEapAka) == true);
+    QVERIFY(mEapConfigIf->isSupportedOuterType(EapQtPluginHandle::PluginPeap) == true);
+}
+
+void TestQtConfigUtils::testConstructorThrowing()
+{
+    // this one should throw since IAP id is invalid
+    bool pass(false);
+    try {
+        EapQtConfigInterface localEapConfigIf(EapQtConfigInterface::EapBearerTypeWlan,
+            global_invalidIap);
+    } catch (const std::exception&) {
+        pass = true;
+    }
+    QVERIFY(pass == true);
+}
+
+void TestQtConfigUtils::testSetConfigurationReferenceUndefinedAgain()
+{
+    // set the same again (global_undefinedIap)
+    QVERIFY(mEapConfigIf->setConfigurationReference(global_undefinedIap) == true);
+}
+
+void TestQtConfigUtils::testSetConfigurationReferenceFailure()
+{
+    // fails since referred IAP does not exist
+    QVERIFY(mEapConfigIf->setConfigurationReference(global_invalidIap) == false);
+    // change back to correct
+    QVERIFY(mEapConfigIf->setConfigurationReference(global_undefinedIap) == true);
+}
+
+void TestQtConfigUtils::testCertificateAuthorityCertificates()
+{
+    mCaCertInfo = mEapConfigIf->certificateAuthorityCertificates();
+    QVERIFY(mCaCertInfo.count() > 0);
+}
+
+void TestQtConfigUtils::testUserCertificates()
+{
+    mUserCertInfo = mEapConfigIf->userCertificates();
+    QEXPECT_FAIL("", "No user certificates installed?", Continue);
+    QVERIFY(mUserCertInfo.count() > 0);
+}
+
+void TestQtConfigUtils::testSupportedOuterTypes()
+{
+    QList<EapQtPluginInfo> plugins;
+    plugins = mEapConfigIf->supportedOuterTypes();
+
+    QVERIFY(plugins.count() > 0);
+
+    QList<EapQtPluginHandle> handles;
+    for (int i = 0; i < plugins.count(); i++) {
+        handles.append(plugins[i].pluginHandle());
+    }
+
+    // check that handles contain outer types
+    QVERIFY(handles.contains(EapQtPluginHandle::PluginEapAka) == true);
+    QVERIFY(handles.contains(EapQtPluginHandle::PluginPeap) == true);
+    QVERIFY(handles.contains(EapQtPluginHandle::PluginEapSim) == true);
+    QVERIFY(handles.contains(EapQtPluginHandle::PluginEapTls) == true);
+    QVERIFY(handles.contains(EapQtPluginHandle::PluginEapTtls) == true);
+
+    // and no inner types
+    QVERIFY(handles.contains(EapQtPluginHandle::PluginEapGtc) == false);
+    QVERIFY(handles.contains(EapQtPluginHandle::PluginEapMschapv2) == false);
+    QVERIFY(handles.contains(EapQtPluginHandle::PluginPap) == false);
+    QVERIFY(handles.contains(EapQtPluginHandle::PluginPlainMschapv2) == false);
+    QVERIFY(handles.contains(EapQtPluginHandle::PluginUndefined) == false);
+}
+
+void TestQtConfigUtils::testSupportedInnerTypesPeap()
+{
+    QList<EapQtPluginInfo> plugins;
+    plugins = mEapConfigIf->supportedInnerTypes(EapQtPluginHandle::PluginPeap);
+
+    QVERIFY(plugins.count() > 0);
+
+    QList<EapQtPluginHandle> handles;
+    for (int i = 0; i < plugins.count(); i++) {
+        handles.append(plugins[i].pluginHandle());
+    }
+
+    // check that handles contain correct types
+    QVERIFY(handles.contains(EapQtPluginHandle::PluginEapAka) == true);
+    QVERIFY(handles.contains(EapQtPluginHandle::PluginEapGtc) == true);
+    QVERIFY(handles.contains(EapQtPluginHandle::PluginEapMschapv2) == true);
+    QVERIFY(handles.contains(EapQtPluginHandle::PluginEapSim) == true);
+    QVERIFY(handles.contains(EapQtPluginHandle::PluginEapTls) == true);
+
+    // and other types
+    QVERIFY(handles.contains(EapQtPluginHandle::PluginUndefined) == false);
+    QVERIFY(handles.contains(EapQtPluginHandle::PluginPeap) == false);
+    QVERIFY(handles.contains(EapQtPluginHandle::PluginEapTtls) == false);
+    QVERIFY(handles.contains(EapQtPluginHandle::PluginPap) == false);
+    QVERIFY(handles.contains(EapQtPluginHandle::PluginPlainMschapv2) == false);
+}
+
+void TestQtConfigUtils::testIsSupportedOuterTypePeap()
+{
+    QVERIFY(mEapConfigIf->isSupportedOuterType(EapQtPluginHandle::PluginPeap) == true);
+}
+
+void TestQtConfigUtils::testIsSupportedInnerTypePeap()
+{
+    QVERIFY(mEapConfigIf->isSupportedInnerType(EapQtPluginHandle::PluginPeap,
+            EapQtPluginHandle::PluginPeap) == false);
+    QVERIFY(mEapConfigIf->isSupportedInnerType(EapQtPluginHandle::PluginPeap,
+            EapQtPluginHandle::PluginEapGtc) == true);
+}
+
+void TestQtConfigUtils::testSetConfigurationReferenceValidWlanIap()
+{
+    QVERIFY(mEapConfigIf->setConfigurationReference(global_wlanIap) == true);
+}
+
+void TestQtConfigUtils::testTestAgainForValidWlanIap()
+{
+    testCertificateAuthorityCertificates();
+    testUserCertificates();
+    testSupportedOuterTypes();
+    testSupportedInnerTypesPeap();
+    testIsSupportedOuterTypePeap();
+    testIsSupportedInnerTypePeap();
+}
+
+void TestQtConfigUtils::testSelectedOuterTypes()
+{
+    QList<EapQtPluginHandle> outers;
+    outers = mEapConfigIf->selectedOuterTypes();
+
+    QVERIFY(outers.count() == 0);
+
+    outers.clear();
+    outers.append(EapQtPluginHandle::PluginPeap);
+    outers.append(EapQtPluginHandle::PluginEapTls);
+    // this must not be set when reading again
+    outers.append(EapQtPluginHandle::PluginEapGtc);
+
+    QVERIFY(mEapConfigIf->setSelectedOuterTypes(outers) == true);
+
+    outers.clear();
+    outers = mEapConfigIf->selectedOuterTypes();
+
+    QVERIFY(outers.count() == 2);
+
+    QVERIFY(outers.contains(EapQtPluginHandle::PluginPeap) == true);
+    QVERIFY(outers.contains(EapQtPluginHandle::PluginEapTls) == true);
+    QVERIFY(outers.contains(EapQtPluginHandle::PluginEapGtc) == false);
+}
+
+void TestQtConfigUtils::testIsSupportedTypeNewInstance()
+{
+    EapQtConfigInterface localEapConfigIf1(EapQtConfigInterface::EapBearerTypeWlan, global_wlanIap);
+    QVERIFY(localEapConfigIf1.isSupportedOuterType(EapQtPluginHandle::PluginEapAka) == true);
+    QVERIFY(localEapConfigIf1.isSupportedInnerType(EapQtPluginHandle::PluginEapTtls, EapQtPluginHandle::PluginEapAka) == true);
+
+    EapQtConfigInterface localEapConfigIf2(EapQtConfigInterface::EapBearerTypeWlan, global_wlanIap);
+    QVERIFY(localEapConfigIf2.isSupportedInnerType(EapQtPluginHandle::PluginPeap, EapQtPluginHandle::PluginEapMschapv2) == true);
+    QVERIFY(localEapConfigIf2.isSupportedOuterType(EapQtPluginHandle::PluginEapMschapv2) == false);
+}
+
+void TestQtConfigUtils::testSaveConfigurationFull()
+{
+    int i = 0;
+
+    QString peap_user("testuser");
+    QString peap_pwd("testpwd");
+    QString peap_realm("testrealm.org");
+    QString peap_pacref("testpacgroupreference");
+    uint peap_validity_time(15);
+
+    QList<uint> peap_ciphers;
+    peap_ciphers.append(0x0004);
+    peap_ciphers.append(0x002F);
+    peap_ciphers.append(0x0033);
+    peap_ciphers.append(0x0034);
+
+    QString peap_subject("Test PEAP subject");
+    QString peap_issuer("Test PEAP subject");
+    QString peap_serialnum("Test PEAP subject");
+    QString peap_label("Test PEAP label");
+    QString peap_thumbprint("Test PEAP subject");
+    QByteArray peap_subjectkey =
+        mCaCertInfo[0].value(EapQtCertificateInfo::SubjectKeyId).toByteArray();
+
+    EapQtCertificateInfo peap_ca_cert;
+    peap_ca_cert.setValue(EapQtCertificateInfo::SubjectName, peap_subject);
+    peap_ca_cert.setValue(EapQtCertificateInfo::IssuerName, peap_issuer);
+    peap_ca_cert.setValue(EapQtCertificateInfo::SerialNumber, peap_serialnum);
+    peap_ca_cert.setValue(EapQtCertificateInfo::SubjectKeyId, peap_subjectkey);
+    peap_ca_cert.setValue(EapQtCertificateInfo::ThumbPrint, peap_thumbprint);
+    peap_ca_cert.setValue(EapQtCertificateInfo::CertificateLabel, peap_label);
+
+    QString peap_subject_user("Test PEAP user subject");
+    QString peap_issuer_user("Test PEAP user subject");
+    QString peap_serialnum_user("Test PEAP user subject");
+    QString peap_label_user("Test PEAP user label");
+    QString peap_thumbprint_user("Test PEAP user subject");
+    QByteArray peap_subjectkey_user =
+        mCaCertInfo[1].value(EapQtCertificateInfo::SubjectKeyId).toByteArray();
+
+    EapQtCertificateInfo peap_user_cert;
+    peap_user_cert.setValue(EapQtCertificateInfo::SubjectName, peap_subject_user);
+    peap_user_cert.setValue(EapQtCertificateInfo::IssuerName, peap_issuer_user);
+    peap_user_cert.setValue(EapQtCertificateInfo::SerialNumber, peap_serialnum_user);
+    peap_user_cert.setValue(EapQtCertificateInfo::SubjectKeyId, peap_subjectkey_user);
+    peap_user_cert.setValue(EapQtCertificateInfo::ThumbPrint, peap_thumbprint_user);
+    peap_user_cert.setValue(EapQtCertificateInfo::CertificateLabel, peap_label_user);
+
+    EapQtPluginHandle handle_peap(EapQtPluginHandle::PluginPeap);
+    EapQtPluginHandle handle_gtc(EapQtPluginHandle::PluginEapGtc);
+    EapQtPluginHandle handle_mschap(EapQtPluginHandle::PluginEapMschapv2);
+    EapQtPluginHandle handle_undef(EapQtPluginHandle::PluginUndefined);
+
+    // **** config outer type (PEAP)
+    EapQtConfig peap_config;
+    peap_config.setValue(EapQtConfig::UsernameAutomatic, true);
+    peap_config.setValue(EapQtConfig::Username, peap_user);
+    peap_config.setValue(EapQtConfig::PasswordPrompt, true);
+    peap_config.setValue(EapQtConfig::Password, peap_pwd);
+    peap_config.setValue(EapQtConfig::PasswordStored, false);
+    peap_config.setValue(EapQtConfig::RealmAutomatic, true);
+    peap_config.setValue(EapQtConfig::Realm, peap_realm);
+    peap_config.setValue(EapQtConfig::UsePseudonyms, true);
+    peap_config.setValue(EapQtConfig::VerifyServerRealm, true);
+    peap_config.setValue(EapQtConfig::SessionValidityTime, peap_validity_time);
+    peap_config.setValue(EapQtConfig::PeapVersion0Allowed, true);
+    peap_config.setValue(EapQtConfig::PeapVersion1Allowed, true);
+    peap_config.setValue(EapQtConfig::PeapVersion2Allowed, true);
+    peap_config.setValue(EapQtConfig::ProvisioningModeAuthenticated, true);
+    peap_config.setValue(EapQtConfig::ProvisioningModeUnauthenticated, true);
+    peap_config.setValue(EapQtConfig::PACGroupReference, peap_pacref);
+    peap_config.setValue(EapQtConfig::WarnADHPNoPAC, true);
+    peap_config.setValue(EapQtConfig::WarnADHPNoMatchingPAC, true);
+    peap_config.setValue(EapQtConfig::WarnNotDefaultServer, true);
+    peap_config.setValue(EapQtConfig::UseIdentityPrivacy, true);
+    peap_config.setValue(EapQtConfig::AuthorityCertificateAutomatic, true);
+    peap_config.setValue(EapQtConfig::ClientAuthenticationRequired, true);
+
+    QList<QVariant> varList;
+    for (i = 0; i < peap_ciphers.count(); i++) {
+        varList.append(peap_ciphers[i]);
+    }
+    peap_config.setValue(EapQtConfig::CipherSuites, varList);
+    varList.clear();
+
+    varList.append(qVariantFromValue(peap_ca_cert));
+    peap_config.setValue(EapQtConfig::AuthorityCertificate, varList);
+    varList.clear();
+
+    varList.append(qVariantFromValue(peap_user_cert));
+    peap_config.setValue(EapQtConfig::UserCertificate, varList);
+    varList.clear();
+
+    // activate inner types (EAP-GTC & EAP-MSCHAPv2)
+    varList.append(qVariantFromValue(handle_gtc));
+    varList.append(qVariantFromValue(handle_mschap));
+    peap_config.setValue(EapQtConfig::InnerType, varList);
+
+    // OuterType is unset, i.e. QVariant::Invalid
+
+    bool ok(false);
+    ok = mEapConfigIf->saveConfiguration(handle_peap, peap_config);
+    QVERIFY(ok);
+
+    // *** config gtc
+    QString gtc_user("testgtcuser");
+    QString gtc_pwd("testgtcpwd");
+
+    EapQtConfig gtc_config;
+
+    gtc_config.setValue(EapQtConfig::Username, gtc_user);
+    gtc_config.setValue(EapQtConfig::PasswordPrompt, true);
+    gtc_config.setValue(EapQtConfig::Password, gtc_pwd);
+    gtc_config.setValue(EapQtConfig::PasswordStored, false);
+    gtc_config.setValue(EapQtConfig::OuterType, qVariantFromValue(handle_peap));
+
+    // InnerType is unset, i.e. QVariant::Invalid
+
+    ok = mEapConfigIf->saveConfiguration(handle_gtc, gtc_config);
+    QVERIFY(ok);
+
+    // *** config mschapv2
+    QString mschap_user("testmschapuser");
+    QString mschap_pwd("testmschappwd");
+
+    EapQtConfig mschap_config;
+    mschap_config.setValue(EapQtConfig::Username, mschap_user);
+    mschap_config.setValue(EapQtConfig::PasswordPrompt, false);
+    mschap_config.setValue(EapQtConfig::Password, mschap_pwd);
+    mschap_config.setValue(EapQtConfig::PasswordStored, false);
+    mschap_config.setValue(EapQtConfig::OuterType, qVariantFromValue(handle_peap));
+
+    // InnerType is unset, i.e. QVariant::Invalid
+
+    ok = mEapConfigIf->saveConfiguration(handle_mschap, mschap_config);
+    QVERIFY(ok);
+
+    // *****************************************
+    // read back the values to check correctness
+    // *****************************************
+
+    // *** gtc
+    EapQtPluginHandle read_handle;
+    EapQtConfig read_config;
+    ok = mEapConfigIf->readConfiguration(handle_peap, handle_gtc, read_config);
+    QVERIFY(ok);
+
+    QVERIFY(false == read_config.value(EapQtConfig::UsernameAutomatic).toBool());
+    QVERIFY(gtc_config.value(EapQtConfig::Username) == read_config.value(EapQtConfig::Username));
+    QVERIFY(gtc_config.value(EapQtConfig::PasswordPrompt) == read_config.value(EapQtConfig::PasswordPrompt));
+    QVERIFY(true == read_config.value(EapQtConfig::PasswordStored).toBool());
+
+    QVariant tmp = read_config.value(EapQtConfig::OuterType);
+    read_handle = tmp.value<EapQtPluginHandle> ();
+    QVERIFY(handle_peap == read_handle);
+
+    // *** mschap
+    read_config.clear();
+
+    ok = mEapConfigIf->readConfiguration(handle_peap, handle_mschap, read_config);
+    QVERIFY(ok);
+
+    QVERIFY(false == read_config.value(EapQtConfig::UsernameAutomatic).toBool());
+    QVERIFY(mschap_config.value(EapQtConfig::Username) == read_config.value(EapQtConfig::Username));
+    QVERIFY(mschap_config.value(EapQtConfig::PasswordPrompt) == read_config.value(EapQtConfig::PasswordPrompt));
+    QVERIFY(true == read_config.value(EapQtConfig::PasswordStored).toBool());
+
+    tmp = read_config.value(EapQtConfig::OuterType);
+    read_handle = tmp.value<EapQtPluginHandle> ();
+    QVERIFY(handle_peap == read_handle);
+
+    // *** PEAP
+    read_config.clear();
+
+    ok = mEapConfigIf->readConfiguration(handle_undef, handle_peap, read_config);
+    QVERIFY(ok);
+
+    // check only the valid PEAP parameters
+    QVERIFY(peap_config.value(EapQtConfig::UsernameAutomatic) == read_config.value(EapQtConfig::UsernameAutomatic));
+    QVERIFY(peap_config.value(EapQtConfig::Username) == read_config.value(EapQtConfig::Username));
+    QVERIFY(peap_config.value(EapQtConfig::RealmAutomatic) == read_config.value(EapQtConfig::RealmAutomatic));
+    QVERIFY(peap_config.value(EapQtConfig::Realm) == read_config.value(EapQtConfig::Realm));
+    QVERIFY(peap_config.value(EapQtConfig::VerifyServerRealm) == read_config.value(EapQtConfig::VerifyServerRealm));
+    QVERIFY(peap_config.value(EapQtConfig::SessionValidityTime) == read_config.value(EapQtConfig::SessionValidityTime));
+    QVERIFY(peap_config.value(EapQtConfig::PeapVersion0Allowed) == read_config.value(EapQtConfig::PeapVersion0Allowed));
+    QVERIFY(peap_config.value(EapQtConfig::PeapVersion1Allowed) == read_config.value(EapQtConfig::PeapVersion1Allowed));
+    QVERIFY(peap_config.value(EapQtConfig::PeapVersion2Allowed) == read_config.value(EapQtConfig::PeapVersion2Allowed));
+    QVERIFY(peap_config.value(EapQtConfig::UseIdentityPrivacy) == read_config.value(EapQtConfig::UseIdentityPrivacy));
+    QVERIFY(peap_config.value(EapQtConfig::AuthorityCertificateAutomatic) == read_config.value(EapQtConfig::AuthorityCertificateAutomatic));
+    QVERIFY(peap_config.value(EapQtConfig::ClientAuthenticationRequired) == read_config.value(EapQtConfig::ClientAuthenticationRequired));
+    QVERIFY(peap_config.value(EapQtConfig::OuterType) == QVariant::Invalid);
+
+    // ciphers
+    QList<QVariant> varListWrite = peap_config.value(EapQtConfig::CipherSuites).toList();
+    QList<QVariant> varListRead = read_config.value(EapQtConfig::CipherSuites).toList();
+
+    QVERIFY(varListRead.count() == varListWrite.count());
+
+    for (i = 0; i < peap_ciphers.count(); i++) {
+        QVERIFY(varListRead.contains(varListWrite[i]) == true);
+    }
+
+    //  ca cert
+    varListWrite = peap_config.value(EapQtConfig::AuthorityCertificate).toList();
+    varListRead = read_config.value(EapQtConfig::AuthorityCertificate).toList();
+
+    QVERIFY(varListRead.count() == varListWrite.count() == 1);
+
+    QVERIFY(peap_ca_cert.value(EapQtCertificateInfo::SubjectName) == (varListRead[0].value<EapQtCertificateInfo>()).value(EapQtCertificateInfo::SubjectName));
+    QVERIFY(peap_ca_cert.value(EapQtCertificateInfo::SerialNumber) == (varListRead[0].value<EapQtCertificateInfo>()).value(EapQtCertificateInfo::SerialNumber));
+    QVERIFY(peap_ca_cert.value(EapQtCertificateInfo::SubjectKeyId) == (varListRead[0].value<EapQtCertificateInfo>()).value(EapQtCertificateInfo::SubjectKeyId));
+    QVERIFY(peap_ca_cert.value(EapQtCertificateInfo::ThumbPrint) == (varListRead[0].value<EapQtCertificateInfo>()).value(EapQtCertificateInfo::ThumbPrint));
+    // label is not stored, hence invalid in read
+    QVERIFY(QVariant::Invalid == (varListRead[0].value<EapQtCertificateInfo>()).value(EapQtCertificateInfo::CertificateLabel));
+
+    //  user cert
+    varListWrite = peap_config.value(EapQtConfig::UserCertificate).toList();
+    varListRead = read_config.value(EapQtConfig::UserCertificate).toList();
+
+    QVERIFY(varListRead.count() == varListWrite.count() == 1);
+
+    QVERIFY(peap_user_cert.value(EapQtCertificateInfo::SubjectName) == (varListRead[0].value<EapQtCertificateInfo>()).value(EapQtCertificateInfo::SubjectName));
+    QVERIFY(peap_user_cert.value(EapQtCertificateInfo::SerialNumber) == (varListRead[0].value<EapQtCertificateInfo>()).value(EapQtCertificateInfo::SerialNumber));
+    QVERIFY(peap_user_cert.value(EapQtCertificateInfo::SubjectKeyId) == (varListRead[0].value<EapQtCertificateInfo>()).value(EapQtCertificateInfo::SubjectKeyId));
+    QVERIFY(peap_user_cert.value(EapQtCertificateInfo::ThumbPrint) == (varListRead[0].value<EapQtCertificateInfo>()).value(EapQtCertificateInfo::ThumbPrint));
+    // label is not stored, hence invalid in read
+    QVERIFY(QVariant::Invalid == (varListRead[0].value<EapQtCertificateInfo>()).value(EapQtCertificateInfo::CertificateLabel));
+
+    // inner types
+    varListWrite = peap_config.value(EapQtConfig::InnerType).toList();
+    varListRead = read_config.value(EapQtConfig::InnerType).toList();
+    QVERIFY(varListRead.count() == varListWrite.count() == 2);
+
+    QList<EapQtPluginHandle> read_handle_list;
+    read_handle_list.append(varListRead[0].value<EapQtPluginHandle> ());
+    read_handle_list.append(varListRead[1].value<EapQtPluginHandle> ());
+
+    QVERIFY(read_handle_list.contains(handle_mschap) && read_handle_list.contains(handle_gtc));
+}
+
+void TestQtConfigUtils::testSaveConfigurationEapTtls()
+{
+    // EAP-TTLS/MSCHAPv2
+}
+#endif
+
+void TestQtConfigUtils::testUiInstance()
+{
+#ifdef INCLUDE_UI_CASES
+
+    QVERIFY(mEapConfigIf->setConfigurationReference(global_wlanIap) == true);
+
+    // make sure there is a stored state in mEapConfigIf (EAP IF plugins loaded)
+    mEapConfigIf->isSupportedInnerType(EapQtPluginHandle::PluginPeap,
+            EapQtPluginHandle::PluginPeap) == false;
+    mEapConfigIf->isSupportedInnerType(EapQtPluginHandle::PluginPeap,
+            EapQtPluginHandle::PluginEapGtc) == true;
+
+    QScopedPointer<CpBaseSettingView> ui(NULL);
+
+    qDebug("creating AKA UI");
+    ui.reset(mEapConfigIf->uiInstance(EapQtPluginHandle::PluginUndefined, EapQtPluginHandle::PluginEapAka));
+    qDebug("AKA UI created");
+    QVERIFY(!ui.isNull());
+
+    qDebug("creating SIM UI");
+    ui.reset(mEapConfigIf->uiInstance(EapQtPluginHandle::PluginUndefined, EapQtPluginHandle::PluginEapSim));
+    qDebug("SIM UI created");
+    QVERIFY(!ui.isNull());
+
+    qDebug("creating LEAP UI");
+    ui.reset(mEapConfigIf->uiInstance(EapQtPluginHandle::PluginUndefined, EapQtPluginHandle::PluginLeap));
+    qDebug("LEAP UI created");
+    QVERIFY(!ui.isNull());
+
+    qDebug("creating 1");
+    ui.reset(mEapConfigIf->uiInstance(EapQtPluginHandle::PluginUndefined, EapQtPluginHandle::PluginUndefined));
+    qDebug("created 1");
+    QVERIFY(ui.isNull());
+
+    qDebug("creating 2");
+    ui.reset(mEapConfigIf->uiInstance(EapQtPluginHandle::PluginEapAka, EapQtPluginHandle::PluginEapSim));
+    qDebug("created 2");
+    QVERIFY(ui.isNull());
+
+    qDebug("creating 3");
+    ui.reset(mEapConfigIf->uiInstance(EapQtPluginHandle::PluginEapSim, EapQtPluginHandle::PluginEapAka));
+    qDebug("created 3");
+    QVERIFY(ui.isNull());
+
+    qDebug("creating 4");
+    ui.reset(mEapConfigIf->uiInstance(EapQtPluginHandle::PluginEapAka, EapQtPluginHandle::PluginEapAka));
+    qDebug("created 4");
+    QVERIFY(ui.isNull());
+
+#else
+    QWARN("UI cases not included");
+#endif
+}
+
+// Create main function using QTest marco.
+QTEST_MAIN( TestQtConfigUtils)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/tsrc/src/testqtconfigutils.h	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,121 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* This is the header file for testing EAP Configuration Interface.
+*/
+
+/*
+ * %version: 5 %
+ */
+
+#ifndef TESTQTCONFIGUTILS_H_
+#define TESTQTCONFIGUTILS_H_
+
+// System includes
+#include <QObject>
+
+// User includes
+
+// Forward declarations
+class QSignalSpy;
+class EapQtConfigInterface;
+class EapQtPluginHandle;
+class EapQtCertificateInfo;
+class CmManagerShim;
+class CmConnectionMethodShim;
+
+// External data types
+
+// Constants
+
+class TestQtConfigUtils: public QObject
+{
+    Q_OBJECT
+    
+private slots:
+
+    // Functions from QTest framework.
+    void initTestCase();
+    void cleanupTestCase();
+    void init();
+    void cleanup();
+
+#if 1
+    // test EapQtPluginInfo
+    void testEapQtPluginInfoPluginUndefined();
+    void testEapQtPluginInfoPluginEapAka();
+    void testEapQtPluginInfoPluginEapFast();
+    void testEapQtPluginInfoPluginEapGtc();
+    void testEapQtPluginInfoPluginLeap();
+    void testEapQtPluginInfoPluginEapMschapv2();
+    void testEapQtPluginInfoPluginPeap();
+    void testEapQtPluginInfoPluginEapSim();
+    void testEapQtPluginInfoPluginEapTls();
+    void testEapQtPluginInfoPluginEapTtls();
+    void testEapQtPluginInfoPluginPap();
+    void testEapQtPluginInfoPluginPlainMschapv2();
+    void testEapQtPluginInfoAssignment();
+    void testEapQtPluginInfoSelfAssignment();
+
+    // test EapQtPluginHandle (for coverage in addition to the onces above)
+    void testEapQtPluginHandleDefaultConstructor();
+    void testEapQtExpandedEapTypeLastConstructor();
+    void testEapQtPluginHandlePluginLastConstructor();
+    void testEapQtPluginHandleEapTypeConstructor();
+    void testEapQtPluginHandleEapTypeUidConstructor();
+    void testEapQtPluginHandleSelfAssignment();
+
+    // test EapQtExpandedEapType (for coverage in addition to the onces above)
+    void testEapQtExpandedEapTypeDefaultConstructor();
+    void testEapQtExpandedEapTypeConstructorWpsType();
+    void testEapQtExpandedEapTypeConstructorWpsByteArray();
+    void testEapQtExpandedEapTypeAssignment();
+    void testEapQtExpandedEapTypeSelfAssignment();
+
+    // test EapQtConfigInterface
+    void testDefaultConstructor();
+    void testConstructorThrowing();
+    void testParallelInstances();
+    void testSetConfigurationReferenceUndefinedAgain();
+    void testSetConfigurationReferenceFailure();
+    void testCertificateAuthorityCertificates();
+    void testUserCertificates();
+    void testSupportedOuterTypes();
+    void testSupportedInnerTypesPeap();
+    void testIsSupportedOuterTypePeap();
+    void testIsSupportedInnerTypePeap();
+    // this must be executed before the rest of the tests
+    void testSetConfigurationReferenceValidWlanIap();
+    void testTestAgainForValidWlanIap();
+    void testSelectedOuterTypes();
+    void testIsSupportedTypeNewInstance();
+    void testSaveConfigurationFull();
+    void testSaveConfigurationEapTtls();
+#endif
+
+    void testUiInstance();
+    
+private:
+
+private:
+    EapQtConfigInterface* mEapConfigIf;
+    QList<EapQtCertificateInfo> mCaCertInfo;
+    QList<EapQtCertificateInfo> mUserCertInfo;
+    CmManagerShim* mCmm;
+    CmConnectionMethodShim* mCmmShim;
+
+};
+
+#endif /* TESTQTCONFIGUTILS_H_ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/tsrc/tsrc.pro	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,59 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# This is the build file for testing EAP Configuration Interface.
+
+#
+# %version: 5 %
+#
+
+CONFIG += debug include_ui_tests
+
+QT += testlib
+QT -= gui
+
+TEMPLATE = app
+TARGET = t_qtconfigutils
+
+DEPENDPATH += .
+MOC_DIR = _moc
+INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE \
+               $$OS_LAYER_SYSTEMINCLUDE
+
+# use this to include ui related cases in the tests
+include_ui_tests: {
+	message(*** Build with UI tests. Cannot use textshell emulator.)
+	CONFIG  += hb
+	DEFINES += INCLUDE_UI_CASES
+}
+
+HEADERS += src/testqtconfigutils.h
+SOURCES += src/testqtconfigutils.cpp
+
+LIBS += \
+    -leapqtplugininfo \
+    -leapqtconfiginterface \
+    -lconnection_settings_shim
+    
+symbian: {
+	TARGET.CAPABILITY = ALL -TCB 
+}
+
+coverage_test: {
+	message(*** Coverage test mode build - no OST traces.)
+	#NO_OST_TRACES flag is set
+}
+else {
+	message(*** Normal Symbian-mode build.)
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/securitysettings/qtconfigutils/tsrc/wst_script/wst_make.bat	Mon May 24 20:32:47 2010 +0300
@@ -0,0 +1,196 @@
+::=============================================================================
+:: Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+:: All rights reserved.
+:: This component and the accompanying materials are made available
+:: under the terms of "Eclipse Public License v1.0"
+:: which accompanies this distribution, and is available
+:: at the URL "http://www.eclipse.org/legal/epl-v10.html".
+::
+:: Initial Contributors:
+:: Nokia Corporation - initial contribution.
+::
+:: Contributors:
+::
+:: Description:
+::
+::=============================================================================
+::
+:: Following commands are implemented:
+:: - CLEAN_OLD_FILES
+:: - COMPILE_QTCONFIGUTILS
+:: - COMPILE_TEST_CASES
+:: - RUN_TEST_CASES
+:: - GENERATE_REPORTS
+:: - SHOW_RESULTS
+:: - START_BROWSER
+::=============================================================================
+
+::-----------------------------------------------------------------------------
+:: Do the preparations:
+:: - Don't show the commands
+:: - Use local parameters -- don't pollute the global one
+::-----------------------------------------------------------------------------
+@echo off
+
+::echo *** WST_MAKE: START:
+setlocal
+
+::-----------------------------------------------------------------------------
+:: Check input
+:: 
+:: Parameters that are required:
+:: 1) wst_root_dir
+:: 2) log_file_name
+:: 3) the command
+::-----------------------------------------------------------------------------
+
+:: (1)
+if not exist %1 goto ERROR
+if [%1]==[] goto ERROR
+set wst_root_dir=%1
+set wst_log_dir=%1\wst_log
+set qtconfigutils_root_dir=%1\..
+set qtconfigutils_test_dir=%1\
+
+:: (2)
+if [%2]==[] goto ERROR
+set log_file_name=%2
+set log_file=%wst_log_dir%\%log_file_name%
+if not exist %log_file% goto ERROR
+echo *** DATE AND TIME: %date%, %time% >> %log_file%
+echo *** WST_MAKE: INFO: qtconfigutils root dir: %qtconfigutils_root_dir%
+echo *** WST_MAKE: INFO: qtconfigutils test dir: %qtconfigutils_test_dir%
+echo *** WST_MAKE: INFO: WST log dir:            %wst_log_dir%
+echo *** WST_MAKE: INFO: WST log file:           %log_file%
+
+:: (3)
+if [%3]==[] goto ERROR
+goto %3
+
+:: Error if label not found.
+goto ERROR
+
+::-----------------------------------------------------------------------------
+:CLEAN_OLD_FILES
+::-----------------------------------------------------------------------------
+
+echo *** WST_MAKE: CLEAN_OLD_FILES:
+echo *** WST_LOG: CLEAN_OLD_FILES >> %log_file%
+
+move %wst_log_dir%\%log_file_name% %wst_root_dir%
+del /F /S /Q %wst_log_dir%\*
+rmdir /S /Q %wst_log_dir%\CMTHTML
+rmdir /S /Q %wst_log_dir%\CTCHTML
+move %wst_root_dir%\%log_file_name% %wst_log_dir% 
+del \epoc32\winscw\c\data\qtconfigutils_qtext_log.txt
+
+goto THE_END
+
+::-----------------------------------------------------------------------------
+:COMPILE_QTCONFIGUTILS
+::-----------------------------------------------------------------------------
+
+echo *** WST_MAKE: COMPILE_QTCONFIGUTILS:
+echo *** WST_LOG: COMPILE_QTCONFIGUTILS >> %log_file%
+
+cd %qtconfigutils_root_dir%
+call qmake "CONFIG += coverage_test debug" >> %log_file% 2>&1
+call sbs -c winscw REALLYCLEAN >> %log_file% 2>&1
+:: Call CTC instrumentation script. Source directories hard coded, because NO_EXCLUDE does not like % characters...
+call ctcwrap -C EXCLUDE=* -C NO_EXCLUDE=.\eapqtconfiginterface\src\*.cpp,.\eapqtplugininfo\src\*.cpp -2comp -n %wst_log_dir%\MON.sym -i d -v sbs -c winscw_udeb >> %log_file% 2>&1
+
+
+goto THE_END
+
+::-----------------------------------------------------------------------------
+:COMPILE_TEST_CASES
+::-----------------------------------------------------------------------------
+
+echo *** WST_MAKE: COMPILE_TEST_CASES:
+echo *** WST_LOG: COMPILE_TEST_CASES >> %log_file%
+
+cd %qtconfigutils_test_dir%
+call qmake "CONFIG += debug include_ui_tests" >> %log_file% 2>&1
+call sbs -c winscw REALLYCLEAN >> %log_file% 2>&1
+call sbs -c winscw_udeb >> %log_file% 2>&1
+
+goto THE_END
+
+::-----------------------------------------------------------------------------
+:RUN_TEST_CASES
+::-----------------------------------------------------------------------------
+
+echo *** WST_MAKE: RUN_TEST_CASES:
+echo *** WST_LOG: RUN_TEST_CASES >> %log_file%
+
+call \epoc32\release\winscw\udeb\t_qtconfigutils.exe -o c:\data\qtconfigutils_qtext_log.txt
+
+goto THE_END
+
+::-----------------------------------------------------------------------------
+:GENERATE_REPORTS
+::-----------------------------------------------------------------------------
+
+echo *** WST_MAKE: GENERATE_REPORTS:
+echo *** WST_LOG: GENERATE_REPORTS >> %log_file%
+
+cd %wst_log_dir%
+
+call ctcpost -p %wst_log_dir%\ctc_coverage.txt
+call ctc2html -nsb -i %wst_log_dir%\ctc_coverage.txt
+
+call dir /s /b %qtconfigutils_root_dir%\*.cpp > %wst_log_dir%\raw_filelist.txt
+
+call findstr /I /V "moc_" %wst_log_dir%\raw_filelist.txt > %wst_log_dir%\filelist.txt
+call cmt -f %wst_log_dir%\filelist.txt -o cmt_metrics.txt  >> %log_file%
+call cmt2html -nsb -i cmt_metrics.txt
+
+:: Clean up temp files
+call del %wst_log_dir%\*filelist.txt
+
+echo *** WST_MAKE: COPY LOGS:
+call copy %TEMP%\epocwind.out %wst_log_dir%\epocwind.txt
+
+goto THE_END
+
+::-----------------------------------------------------------------------------
+:SHOW_RESULTS
+::-----------------------------------------------------------------------------
+
+echo *** WST_MAKE: SHOW_RESULTS:
+echo *** WST_LOG: SHOW_RESULTS >> %log_file%
+echo *** Module tests:
+call findstr /C:"Totals: " \epoc32\winscw\c\data\qtconfigutils_qtext_log.txt
+echo *** Coverage:
+call findstr /C:"Number of " %wst_log_dir%\ctc_coverage.txt
+call findstr /C:"TER       " %wst_log_dir%\ctc_coverage.txt
+
+goto THE_END 
+
+::-----------------------------------------------------------------------------
+:START_BROWSER
+::-----------------------------------------------------------------------------
+
+echo *** WST_MAKE: START_BROWSER:
+echo *** WST_LOG: START_BROWSER >> %log_file%
+echo.
+echo Starting up browser to show the results
+
+start %wst_log_dir%\coverage.html
+
+goto THE_END
+
+::-----------------------------------------------------------------------------
+:ERROR
+::-----------------------------------------------------------------------------
+
+echo *** WST_MAKE: ERROR:
+endlocal
+echo wst_make *** Error (unknown parameter) >> %log_file%
+
+goto THE_END
+
+::-----------------------------------------------------------------------------
+:THE_END
+::-----------------------------------------------------------------------------
+:: echo *** WST_MAKE: END:
--- a/securitysettings/securitysettings.pro	Thu May 13 22:51:27 2010 +0300
+++ b/securitysettings/securitysettings.pro	Mon May 24 20:32:47 2010 +0300
@@ -14,10 +14,14 @@
 # Description:
 #
 
-# %version: 2 %
+# %version: 6 %
 
 TEMPLATE = subdirs
 
-SUBDIRS  += qtconfigutils cpwlansecurityuiplugins
+SUBDIRS += \
+  qtconfigutils \
+  cpwlansecurityuiplugins \
+  cpeapuiplugins \
+  eapqtdialogs
 
 CONFIG += ordered