--- a/eapol/eapol_framework/eapol_common/core/eapol_key_state_client.cpp Thu Aug 19 09:58:27 2010 +0300
+++ b/eapol/eapol_framework/eapol_common/core/eapol_key_state_client.cpp Tue Aug 31 15:16:37 2010 +0300
@@ -16,7 +16,7 @@
*/
/*
-* %version: 61 %
+* %version: 57.1.6 %
*/
// This is enumeration of EAPOL source code.
@@ -45,7 +45,7 @@
//--------------------------------------------------
//
-eap_status_e eapol_key_state_c::create_4_way_handshake_message_2(
+EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::create_4_way_handshake_message_2(
eap_buf_chain_wr_c * const sent_packet,
const u32_t eapol_header_offset,
u32_t * const data_length,
@@ -260,7 +260,7 @@
//--------------------------------------------------
//
-eap_status_e eapol_key_state_c::create_4_way_handshake_message_4(
+EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::create_4_way_handshake_message_4(
eap_buf_chain_wr_c * const sent_packet,
const u32_t eapol_header_offset,
u32_t * const data_length,
@@ -411,7 +411,7 @@
//--------------------------------------------------
//
-eap_status_e eapol_key_state_c::process_4_way_handshake_message_1(
+EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::process_4_way_handshake_message_1(
const eap_am_network_id_c * const receive_network_id,
eapol_RSNA_key_header_c * const eapol_key_message,
const u32_t /* packet_length */)
@@ -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);
@@ -769,7 +770,7 @@
//--------------------------------------------------
//
-eap_status_e eapol_key_state_c::process_4_way_handshake_message_3_payloads_a(
+EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::process_4_way_handshake_message_3_payloads_a(
const eap_am_network_id_c * const receive_network_id,
eapol_RSNA_key_header_c * const eapol_key_message,
const u32_t packet_length,
@@ -962,7 +963,7 @@
//--------------------------------------------------
//
-eap_status_e eapol_key_state_c::process_4_way_handshake_message_3_payloads_b(
+EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::process_4_way_handshake_message_3_payloads_b(
const eap_am_network_id_c * const receive_network_id,
eapol_RSNA_key_header_c * const eapol_key_message,
const u32_t /* packet_length */,
@@ -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);
@@ -1138,7 +1137,7 @@
//--------------------------------------------------
//
-eap_status_e eapol_key_state_c::process_4_way_handshake_message_3(
+EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::process_4_way_handshake_message_3(
const eap_am_network_id_c * const receive_network_id,
eapol_RSNA_key_header_c * const eapol_key_message,
const u32_t packet_length)
@@ -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())));
}
@@ -1448,7 +1442,7 @@
//--------------------------------------------------
//
-eap_status_e eapol_key_state_c::create_eapol_key_handshake_message_0(
+EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::create_eapol_key_handshake_message_0(
const bool true_when_4_way_handshake, ///< With false initiates Group Key Handshake.
eap_buf_chain_wr_c * const sent_packet,
const u32_t eapol_header_offset,
@@ -1578,7 +1572,7 @@
//--------------------------------------------------
//
-eap_status_e eapol_key_state_c::create_group_key_handshake_message_2(
+EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::create_group_key_handshake_message_2(
eap_buf_chain_wr_c * const sent_packet,
const u32_t eapol_header_offset,
u32_t * const data_length,
@@ -1721,7 +1715,7 @@
//--------------------------------------------------
//
-eap_status_e eapol_key_state_c::process_group_key_handshake_message_1(
+EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::process_group_key_handshake_message_1(
const eap_am_network_id_c * const receive_network_id,
eapol_RSNA_key_header_c * const eapol_key_message,
const u32_t packet_length)
@@ -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);
@@ -2161,7 +2151,7 @@
//--------------------------------------------------
//
-eap_status_e eapol_key_state_c::process_RC4_key_descriptor(
+EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::process_RC4_key_descriptor(
const eap_am_network_id_c * const receive_network_id,
eap_general_header_base_c * const packet_data,
const u32_t packet_length)
@@ -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);
@@ -2561,7 +2549,7 @@
//--------------------------------------------------
//
-eap_status_e eapol_key_state_c::initialize_4_way_handshake(
+EAP_FUNC_EXPORT eap_status_e eapol_key_state_c::initialize_4_way_handshake(
const eap_am_network_id_c * const receive_network_id,
const eapol_protocol_version_e used_eapol_version)
{
@@ -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);