eapol/eapol_framework/eapol_common/common/eap_state_notification.cpp
changeset 0 c8830336c852
child 2 1c7bc153c08e
equal deleted inserted replaced
-1:000000000000 0:c8830336c852
       
     1 /*
       
     2 * Copyright (c) 2001-2006 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  EAP and WLAN authentication protocols.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // This is enumeration of EAPOL source code.
       
    20 #if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
       
    21 	#undef EAP_FILE_NUMBER_ENUM
       
    22 	#define EAP_FILE_NUMBER_ENUM 37 
       
    23 	#undef EAP_FILE_NUMBER_DATE 
       
    24 	#define EAP_FILE_NUMBER_DATE 1127594498 
       
    25 #endif //#if defined(USE_EAP_MINIMUM_RELEASE_TRACES)
       
    26 
       
    27 
       
    28 
       
    29 #include "eap_state_notification.h"
       
    30 #include "eap_am_tools.h"
       
    31 #include "eap_tools.h"
       
    32 #include "eapol_key_types.h"
       
    33 
       
    34 
       
    35 EAP_FUNC_EXPORT eap_state_notification_c::~eap_state_notification_c()
       
    36 {
       
    37 }
       
    38 
       
    39 EAP_FUNC_EXPORT eap_state_notification_c::eap_state_notification_c(
       
    40 	abs_eap_am_tools_c * const tools,
       
    41 	const eap_am_network_id_c * const send_network_id,
       
    42 	bool is_client,
       
    43 	eap_state_notification_generic_e,
       
    44 	eap_protocol_layer_e layer,
       
    45 	u32_t protocol,
       
    46 	u32_t previous_state,
       
    47 	u32_t current_state,
       
    48 	u8_t eap_identifier,
       
    49 	bool allow_send_eap_success)
       
    50 	: m_am_tools(tools)
       
    51 	, m_layer(layer)
       
    52 	, m_notification_string(tools)
       
    53 	, m_needs_confirmation_from_user(false)
       
    54 	, m_protocol(protocol)
       
    55 	, m_eap_type(eap_type_none)
       
    56 	, m_previous_state(previous_state)
       
    57 	, m_current_state(current_state)
       
    58 	, m_send_network_id(send_network_id)
       
    59 	, m_is_client(is_client)
       
    60 	, m_eap_identifier(eap_identifier)
       
    61 	, m_allow_send_eap_success(allow_send_eap_success)
       
    62 	, m_authentication_error(eap_status_ok)
       
    63 {
       
    64 }
       
    65 
       
    66 #if defined(USE_EAP_EXPANDED_TYPES)
       
    67 
       
    68 EAP_FUNC_EXPORT eap_state_notification_c::eap_state_notification_c(
       
    69 	abs_eap_am_tools_c * const tools,
       
    70 	const eap_am_network_id_c * const send_network_id,
       
    71 	bool is_client,
       
    72 	eap_state_notification_eap_e,
       
    73 	eap_protocol_layer_e layer,
       
    74 	eap_type_value_e eap_type,
       
    75 	u32_t previous_state,
       
    76 	u32_t current_state,
       
    77 	u8_t eap_identifier,
       
    78 	bool allow_send_eap_success)
       
    79 	: m_am_tools(tools)
       
    80 	, m_layer(layer)
       
    81 	, m_notification_string(tools)
       
    82 	, m_needs_confirmation_from_user(false)
       
    83 	, m_protocol(0ul)
       
    84 	, m_eap_type(eap_type)
       
    85 	, m_previous_state(previous_state)
       
    86 	, m_current_state(current_state)
       
    87 	, m_send_network_id(send_network_id)
       
    88 	, m_is_client(is_client)
       
    89 	, m_eap_identifier(eap_identifier)
       
    90 	, m_allow_send_eap_success(allow_send_eap_success)
       
    91 	, m_authentication_error(eap_status_ok)
       
    92 {
       
    93 }
       
    94 
       
    95 #endif //#if defined(USE_EAP_EXPANDED_TYPES)
       
    96 
       
    97 
       
    98 EAP_FUNC_EXPORT eap_state_notification_c::eap_state_notification_c(
       
    99 	abs_eap_am_tools_c * const tools,
       
   100 	const eap_am_network_id_c * const send_network_id,
       
   101 	bool is_client,
       
   102 	eap_state_notification_eap_e,
       
   103 	eap_protocol_layer_e layer,
       
   104 	eap_type_ietf_values_e eap_type,
       
   105 	u32_t previous_state,
       
   106 	u32_t current_state,
       
   107 	u8_t eap_identifier,
       
   108 	bool allow_send_eap_success)
       
   109 	: m_am_tools(tools)
       
   110 	, m_layer(layer)
       
   111 	, m_notification_string(tools)
       
   112 	, m_needs_confirmation_from_user(false)
       
   113 	, m_protocol(0ul)
       
   114 	, m_eap_type(eap_type)
       
   115 	, m_previous_state(previous_state)
       
   116 	, m_current_state(current_state)
       
   117 	, m_send_network_id(send_network_id)
       
   118 	, m_is_client(is_client)
       
   119 	, m_eap_identifier(eap_identifier)
       
   120 	, m_allow_send_eap_success(allow_send_eap_success)
       
   121 	, m_authentication_error(eap_status_ok)
       
   122 {
       
   123 }
       
   124 
       
   125 EAP_FUNC_EXPORT const eap_am_network_id_c * eap_state_notification_c::get_send_network_id() const
       
   126 {
       
   127 	return m_send_network_id;
       
   128 }
       
   129 
       
   130 EAP_FUNC_EXPORT eap_protocol_layer_e eap_state_notification_c::get_protocol_layer() const
       
   131 {
       
   132 	return m_layer;
       
   133 }
       
   134 
       
   135 EAP_FUNC_EXPORT u32_t eap_state_notification_c::get_protocol() const
       
   136 {
       
   137 	return m_protocol;
       
   138 }
       
   139 
       
   140 EAP_FUNC_EXPORT eap_type_value_e eap_state_notification_c::get_eap_type() const
       
   141 {
       
   142 	return m_eap_type;
       
   143 }
       
   144 
       
   145 EAP_FUNC_EXPORT u32_t eap_state_notification_c::get_previous_state() const
       
   146 {
       
   147 	return m_previous_state;
       
   148 }
       
   149 
       
   150 EAP_FUNC_EXPORT u32_t eap_state_notification_c::get_current_state() const
       
   151 {
       
   152 	return m_current_state;
       
   153 }
       
   154 
       
   155 EAP_FUNC_EXPORT eap_const_string eap_state_notification_c::get_state_string(const u32_t protocol_layer, const u32_t state)
       
   156 {
       
   157 
       
   158 #if defined(USE_EAP_TRACE_STRINGS)
       
   159 
       
   160 	if (protocol_layer == eap_protocol_layer_general)
       
   161 	{
       
   162 		EAP_IF_RETURN_STRING(state, eap_general_state_none)
       
   163 		else EAP_IF_RETURN_STRING(state, eap_general_state_show_notification_string)
       
   164 		else EAP_IF_RETURN_STRING(state, eap_general_state_configuration_error)
       
   165 		else EAP_IF_RETURN_STRING(state, eap_general_state_authentication_cancelled)
       
   166 		else EAP_IF_RETURN_STRING(state, eap_general_state_authentication_error)
       
   167 		else EAP_IF_RETURN_STRING(state, eap_general_state_immediate_reconnect)
       
   168 		else EAP_IF_RETURN_STRING(state, eap_general_state_last_mark)
       
   169 		else
       
   170 		{
       
   171 			return EAPL("Unknown general state");
       
   172 		}
       
   173 	}
       
   174 	else if (protocol_layer == eap_protocol_layer_internal_type
       
   175 		|| protocol_layer == eap_protocol_layer_am_eap_type
       
   176 		|| protocol_layer == eap_protocol_layer_eap_type
       
   177 		|| protocol_layer == eap_protocol_layer_eap)
       
   178 	{
       
   179 		EAP_IF_RETURN_STRING(state, eap_state_none)
       
   180 		else EAP_IF_RETURN_STRING(state, eap_state_identity_request_sent)
       
   181 		else EAP_IF_RETURN_STRING(state, eap_state_identity_request_received)
       
   182 		else EAP_IF_RETURN_STRING(state, eap_state_identity_response_received)
       
   183 		else EAP_IF_RETURN_STRING(state, eap_state_eap_response_sent)
       
   184 		else EAP_IF_RETURN_STRING(state, eap_state_tppd_peapv1_authentication_finished_successfully_with_tunneled_eap_success)
       
   185 		else EAP_IF_RETURN_STRING(state, eap_state_authentication_finished_successfully)
       
   186 		else EAP_IF_RETURN_STRING(state, eap_state_authentication_terminated_unsuccessfully)
       
   187 		else EAP_IF_RETURN_STRING(state, eap_state_authentication_wait_tppd_peapv1_empty_acknowledge)
       
   188 		else EAP_IF_RETURN_STRING(state, eap_state_use_eap_failure_in_termination)
       
   189 		else EAP_IF_RETURN_STRING(state, eap_state_inner_eap_method_skipped)
       
   190 		else EAP_IF_RETURN_STRING(state, eap_state_authentication_wait_eap_fast_empty_acknowledge)
       
   191 		else EAP_IF_RETURN_STRING(state, eap_state_wait_plain_eap_success)
       
   192 		else
       
   193 		{
       
   194 			return EAPL("Unknown EAP state");
       
   195 		}
       
   196 	}
       
   197 	else if (protocol_layer == eap_protocol_layer_eapol)
       
   198 	{
       
   199 		EAP_IF_RETURN_STRING(state, eapol_state_none)
       
   200 		else EAP_IF_RETURN_STRING(state, eapol_state_start_sent)
       
   201 		else EAP_IF_RETURN_STRING(state, eapol_state_no_start_response)
       
   202 		else
       
   203 		{
       
   204 			return EAPL("Unknown EAPOL state");
       
   205 		}
       
   206 	}
       
   207 	else if (protocol_layer == eap_protocol_layer_eapol_key)
       
   208 	{
       
   209 		EAP_IF_RETURN_STRING(state, eapol_key_state_none)
       
   210 		else EAP_IF_RETURN_STRING(state, eapol_key_state_preauthenticated)
       
   211 		else EAP_IF_RETURN_STRING(state, eapol_key_state_eap_authentication_running)
       
   212 		else EAP_IF_RETURN_STRING(state, eapol_key_state_wait_4_way_handshake_start)
       
   213 		else EAP_IF_RETURN_STRING(state, eapol_key_state_wait_4_way_handshake_message_1)
       
   214 		else EAP_IF_RETURN_STRING(state, eapol_key_state_wait_4_way_handshake_message_2)
       
   215 		else EAP_IF_RETURN_STRING(state, eapol_key_state_wait_4_way_handshake_message_3)
       
   216 		else EAP_IF_RETURN_STRING(state, eapol_key_state_wait_4_way_handshake_message_4)
       
   217 		else EAP_IF_RETURN_STRING(state, eapol_key_state_4_way_handshake_running)
       
   218 		else EAP_IF_RETURN_STRING(state, eapol_key_state_4_way_handshake_failed)
       
   219 		else EAP_IF_RETURN_STRING(state, eapol_key_state_4_way_handshake_successfull)
       
   220 		else EAP_IF_RETURN_STRING(state, eapol_key_state_wait_group_key_handshake_message_1)
       
   221 		else EAP_IF_RETURN_STRING(state, eapol_key_state_wait_group_key_handshake_message_2)
       
   222 		else EAP_IF_RETURN_STRING(state, eapol_key_state_group_key_handshake_failed)
       
   223 		else EAP_IF_RETURN_STRING(state, eapol_key_state_group_key_handshake_successfull)
       
   224 		else EAP_IF_RETURN_STRING(state, eapol_key_state_wait_rc4_key_message)
       
   225 		else EAP_IF_RETURN_STRING(state, eapol_key_state_802_11i_authentication_terminated_unsuccessfull)
       
   226 		else EAP_IF_RETURN_STRING(state, eapol_key_state_802_11i_authentication_finished_successfull)
       
   227 		else EAP_IF_RETURN_STRING(state, eapol_key_state_reassociation_failed)
       
   228 #if defined(EAP_USE_WPXM)
       
   229 		else EAP_IF_RETURN_STRING(state, eapol_key_state_wpxm_reassociation_finished_successfull)
       
   230 #endif //#if defined(EAP_USE_WPXM)
       
   231 		else
       
   232 		{
       
   233 			return EAPL("Unknown EAPOL state");
       
   234 		}
       
   235 	}
       
   236 #if defined(USE_WAPI_CORE)
       
   237 	else if (protocol_layer == eap_protocol_layer_wapi)
       
   238 	{
       
   239 		EAP_IF_RETURN_STRING(state, eapol_wlan_authentication_state_none)
       
   240 		else EAP_IF_RETURN_STRING(state, eapol_wlan_authentication_state_this_ap_failed)
       
   241 		else EAP_IF_RETURN_STRING(state, eapol_wlan_authentication_state_authentication_successfull)
       
   242 		else EAP_IF_RETURN_STRING(state, eapol_wlan_authentication_state_wapi_authentication_running)
       
   243 		else
       
   244 		{
       
   245 			return EAPL("Unknown WAPI state");
       
   246 		}
       
   247 	}
       
   248 	else if (protocol_layer == eap_protocol_layer_wai)
       
   249 	{
       
   250 		EAP_IF_RETURN_STRING(state, eapol_key_state_none)
       
   251 		else EAP_IF_RETURN_STRING(state, eapol_key_state_wapi_authentication_terminated_unsuccessfull)
       
   252 		else EAP_IF_RETURN_STRING(state, eapol_key_state_wapi_authentication_finished_successfull)
       
   253 		else EAP_IF_RETURN_STRING(state, eapol_key_state_wapi_authentication_running)
       
   254 		else
       
   255 		{
       
   256 			return EAPL("Unknown WAI state");
       
   257 		}
       
   258 	}
       
   259 #endif //#if defined(USE_WAPI_CORE)
       
   260 	else if (protocol_layer == eap_protocol_layer_ethernet)
       
   261 	{
       
   262 		return EAPL("Unknown ethernet state");
       
   263 	}
       
   264 	else if (protocol_layer == eap_protocol_layer_wlan_authentication)
       
   265 	{
       
   266 		EAP_IF_RETURN_STRING(state, eapol_wlan_authentication_state_none)
       
   267 		else EAP_IF_RETURN_STRING(state, eapol_wlan_authentication_state_association_ok)
       
   268 		else EAP_IF_RETURN_STRING(state, eapol_wlan_authentication_state_this_ap_failed)
       
   269 		else EAP_IF_RETURN_STRING(state, eapol_wlan_authentication_state_failed_completely)
       
   270 		else EAP_IF_RETURN_STRING(state, eapol_wlan_authentication_state_802_11_auth_algorithm_not_supported)
       
   271 		else EAP_IF_RETURN_STRING(state, eapol_wlan_authentication_state_authenticating)
       
   272 		else EAP_IF_RETURN_STRING(state, eapol_wlan_authentication_state_eap_authentication_running)
       
   273 		else EAP_IF_RETURN_STRING(state, eapol_wlan_authentication_state_no_response)
       
   274 		else EAP_IF_RETURN_STRING(state, eapol_wlan_authentication_state_4_way_handshake_running)
       
   275 		else EAP_IF_RETURN_STRING(state, eapol_wlan_authentication_state_authentication_successfull)
       
   276 		else EAP_IF_RETURN_STRING(state, eapol_wlan_authentication_state_authentication_cancelled)
       
   277 		else EAP_IF_RETURN_STRING(state, eapol_wlan_authentication_state_immediate_reconnect)
       
   278 		else
       
   279 		{
       
   280 			return EAPL("Unknown wauth state");
       
   281 		}
       
   282 	}
       
   283 #endif // #if defined(USE_EAP_TRACE_STRINGS)
       
   284 	{
       
   285 		EAP_UNREFERENCED_PARAMETER(protocol_layer);
       
   286 		EAP_UNREFERENCED_PARAMETER(state);
       
   287 
       
   288 		return EAPL("Unknown state");
       
   289 	}
       
   290 }
       
   291 
       
   292 EAP_FUNC_EXPORT eap_const_string eap_state_notification_c::get_current_state_string() const
       
   293 {
       
   294 	return get_state_string(m_layer, m_current_state);
       
   295 }
       
   296 
       
   297 EAP_FUNC_EXPORT eap_const_string eap_state_notification_c::get_previous_state_string() const
       
   298 {
       
   299 	return get_state_string(m_layer, m_previous_state);
       
   300 }
       
   301 
       
   302 EAP_FUNC_EXPORT eap_const_string eap_state_notification_c::get_protocol_layer_string(const u32_t protocol_layer)
       
   303 {
       
   304 
       
   305 #if defined(USE_EAP_TRACE_STRINGS)
       
   306 
       
   307 	EAP_IF_RETURN_STRING(protocol_layer, eap_protocol_layer_none)
       
   308 	else EAP_IF_RETURN_STRING(protocol_layer, eap_protocol_layer_general)
       
   309 	else EAP_IF_RETURN_STRING(protocol_layer, eap_protocol_layer_internal_type)
       
   310 	else EAP_IF_RETURN_STRING(protocol_layer, eap_protocol_layer_am_eap_type)
       
   311 	else EAP_IF_RETURN_STRING(protocol_layer, eap_protocol_layer_radius)
       
   312 	else EAP_IF_RETURN_STRING(protocol_layer, eap_protocol_layer_eap_type)
       
   313 	else EAP_IF_RETURN_STRING(protocol_layer, eap_protocol_layer_eap)
       
   314 	else EAP_IF_RETURN_STRING(protocol_layer, eap_protocol_layer_eapol)
       
   315 	else EAP_IF_RETURN_STRING(protocol_layer, eap_protocol_layer_eapol_key)
       
   316 	else EAP_IF_RETURN_STRING(protocol_layer, eap_protocol_layer_ethernet)
       
   317 	else EAP_IF_RETURN_STRING(protocol_layer, eap_protocol_layer_wlan_authentication)
       
   318 	else EAP_IF_RETURN_STRING(protocol_layer, eap_protocol_layer_authentication_server)
       
   319 #if defined(USE_WAPI_CORE)
       
   320 	else EAP_IF_RETURN_STRING(protocol_layer, eap_protocol_layer_wapi)
       
   321 	else EAP_IF_RETURN_STRING(protocol_layer, eap_protocol_layer_wai)
       
   322 #endif //#if defined(USE_WAPI_CORE)
       
   323 
       
   324 #endif // #if defined(USE_EAP_TRACE_STRINGS)
       
   325 	{
       
   326 		EAP_UNREFERENCED_PARAMETER(protocol_layer);
       
   327 
       
   328 		return EAPL("Unknown protocol layer");
       
   329 	}
       
   330 }
       
   331 
       
   332 EAP_FUNC_EXPORT eap_const_string eap_state_notification_c::get_protocol_layer_string() const
       
   333 {
       
   334 	return get_protocol_layer_string(m_layer);
       
   335 }
       
   336 
       
   337 EAP_FUNC_EXPORT eap_const_string eap_state_notification_c::get_protocol_string(const u32_t protocol_layer, const u32_t protocol)
       
   338 {
       
   339 
       
   340 #if defined(USE_EAP_TRACE_STRINGS)
       
   341 
       
   342 	if (protocol_layer == eap_protocol_layer_general)
       
   343 	{
       
   344 		return EAPL("No general protocol");
       
   345 	}
       
   346 	else if (protocol_layer == eap_protocol_layer_internal_type
       
   347 		|| protocol_layer == eap_protocol_layer_am_eap_type
       
   348 		|| protocol_layer == eap_protocol_layer_eap_type
       
   349 		|| protocol_layer == eap_protocol_layer_eap)
       
   350 	{
       
   351 		return EAPL("No EAP protocol");
       
   352 	}
       
   353 	else if (protocol_layer == eap_protocol_layer_eapol)
       
   354 	{
       
   355 		return EAPL("No EAPOL protocol");
       
   356 	}
       
   357 	else if (protocol_layer == eap_protocol_layer_eapol_key)
       
   358 	{
       
   359 		EAP_IF_RETURN_STRING(protocol, eapol_key_handshake_type_none)
       
   360 		else EAP_IF_RETURN_STRING(protocol, eapol_key_handshake_type_4_way_handshake)
       
   361 		else EAP_IF_RETURN_STRING(protocol, eapol_key_handshake_type_group_key_handshake)
       
   362 		else EAP_IF_RETURN_STRING(protocol, eapol_key_handshake_type_STAKey_handshake)
       
   363 		else EAP_IF_RETURN_STRING(protocol, eapol_key_handshake_type_802_11i_handshake)
       
   364 		else EAP_IF_RETURN_STRING(protocol, eapol_key_handshake_type_dynamic_WEP)
       
   365 #if defined(EAP_USE_WPXM)
       
   366 		else EAP_IF_RETURN_STRING(protocol, eapol_key_handshake_type_WPXM_reassociation)
       
   367 #endif //#if defined(EAP_USE_WPXM)
       
   368 #if defined(USE_WAPI_CORE)
       
   369 		else EAP_IF_RETURN_STRING(protocol, eapol_key_handshake_type_wai_handshake)
       
   370 #endif //#if defined(USE_WAPI_CORE)
       
   371 		else
       
   372 		{
       
   373 			return EAPL("Unknown EAPOL protocol");
       
   374 		}
       
   375 	}
       
   376 	else if (protocol_layer == eap_protocol_layer_ethernet)
       
   377 	{
       
   378 		return EAPL("No ethernet protocol");
       
   379 	}
       
   380 	else if (protocol_layer == eap_protocol_layer_wlan_authentication)
       
   381 	{
       
   382 		{
       
   383 			return EAPL("No wauth protocol");
       
   384 		}
       
   385 	}
       
   386 #if defined(USE_WAPI_CORE)
       
   387 	else if (protocol_layer == eap_protocol_layer_wapi)
       
   388 	{
       
   389 		EAP_IF_RETURN_STRING(protocol, eapol_key_handshake_type_none)
       
   390 		else EAP_IF_RETURN_STRING(protocol, eapol_key_handshake_type_wai_handshake)
       
   391 		else
       
   392 		{
       
   393 			return EAPL("Unknown WAPI protocol");
       
   394 		}
       
   395 	}
       
   396 	else if (protocol_layer == eap_protocol_layer_wai)
       
   397 	{
       
   398 		EAP_IF_RETURN_STRING(protocol, eapol_key_handshake_type_none)
       
   399 		else EAP_IF_RETURN_STRING(protocol, eapol_key_handshake_type_wai_handshake)
       
   400 		else
       
   401 		{
       
   402 			return EAPL("Unknown WAI protocol");
       
   403 		}
       
   404 	}
       
   405 #endif //#if defined(USE_WAPI_CORE)
       
   406 #endif // #if defined(USE_EAP_TRACE_STRINGS)
       
   407 	{
       
   408 		EAP_UNREFERENCED_PARAMETER(protocol_layer);
       
   409 		EAP_UNREFERENCED_PARAMETER(protocol);
       
   410 
       
   411 		return EAPL("Unknown protocol");
       
   412 	}
       
   413 }
       
   414 
       
   415 EAP_FUNC_EXPORT eap_const_string eap_state_notification_c::get_protocol_string() const
       
   416 {
       
   417 	return get_protocol_string(m_layer, m_protocol);
       
   418 }
       
   419 
       
   420 EAP_FUNC_EXPORT bool eap_state_notification_c::get_is_client() const
       
   421 {
       
   422 	return m_is_client;
       
   423 }
       
   424 
       
   425 EAP_FUNC_EXPORT u8_t eap_state_notification_c::get_eap_identifier() const
       
   426 {
       
   427 	return m_eap_identifier;
       
   428 }
       
   429 
       
   430 EAP_FUNC_EXPORT bool eap_state_notification_c::get_allow_send_eap_success() const
       
   431 {
       
   432 	return m_allow_send_eap_success;
       
   433 }
       
   434 
       
   435 EAP_FUNC_EXPORT eap_status_e eap_state_notification_c::set_notification_string(
       
   436 	const eap_variable_data_c * const notification_string,
       
   437 	const bool needs_confirmation_from_user)
       
   438 {
       
   439 	eap_status_e status = m_notification_string.set_copy_of_buffer(notification_string);
       
   440 	if (status != eap_status_ok)
       
   441 	{
       
   442 		return EAP_STATUS_RETURN(m_am_tools, status);
       
   443 	}
       
   444 
       
   445 	m_needs_confirmation_from_user = needs_confirmation_from_user;
       
   446 
       
   447 	return EAP_STATUS_RETURN(m_am_tools, status);
       
   448 }
       
   449 
       
   450 EAP_FUNC_EXPORT const eap_variable_data_c * eap_state_notification_c::get_notification_string() const
       
   451 {
       
   452 	return &m_notification_string;
       
   453 }
       
   454 
       
   455 EAP_FUNC_EXPORT bool eap_state_notification_c::get_needs_confirmation_from_user() const
       
   456 {
       
   457 	return m_needs_confirmation_from_user;
       
   458 }
       
   459 
       
   460 
       
   461 EAP_FUNC_EXPORT void eap_state_notification_c::set_authentication_error(const eap_status_e error)
       
   462 {
       
   463 	m_authentication_error = error;
       
   464 }
       
   465 
       
   466 EAP_FUNC_EXPORT eap_status_e eap_state_notification_c::get_authentication_error() const
       
   467 {
       
   468 	return m_authentication_error;
       
   469 }
       
   470 
       
   471 //--------------------------------------------------
       
   472 
       
   473 
       
   474 
       
   475 // End.