From 0ec0e3579eda31620f980c12fe3d5efa09815052 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Thu, 2 Feb 2017 10:22:43 +0100 Subject: [PATCH] EAP-GTC event logging and clean-up --- lib/Events/res/EventsETW.man | Bin 121104 -> 122246 bytes lib/GTC/include/Method.h | 4 ++-- lib/GTC/src/Method.cpp | 42 ++++++++++++++++++++--------------- 3 files changed, 26 insertions(+), 20 deletions(-) diff --git a/lib/Events/res/EventsETW.man b/lib/Events/res/EventsETW.man index 4599aef93e26b9fb15acf09548106238335912e4..504eb4a9832dfe6762c31b09da1facbf0f622251 100644 GIT binary patch delta 337 zcmbQRiM?$%d&3q+J;6!)*w}R$+!;a`oF{*Oku48qF~lr%%%%(mlPBJrKiTfLn>0jy5JM_MF+%}EK0_XmP6g^tWhk6{@Vuuu4)Z|fFq%#- z{PJ8Bs|nNnjTlw8>j^S8C^8ytUvI?NITfE((*>6?N=_Hq$S5XS3U)vdg91Yl!co)h z%^3BkA6UZ3BaFqm>Hi}brKfM$%E%@eicL32Y size_max) throw invalid_argument(string_printf(__FUNCTION__ " This method does not support packet fragmentation, but the data size is too big to fit in one packet (packet: %u, maximum: %u).", sizeof(sanitizing_string::value_type)*reply_utf8.length(), size_max)); @@ -126,8 +130,8 @@ void eap::method_gtc::get_ui_context(_Out_ sanitizing_blob &context_data) { // Return authenticator string. context_data.assign( - reinterpret_cast(m_message.data() ), - reinterpret_cast(m_message.data() + m_message.length())); + reinterpret_cast(m_challenge.data() ), + reinterpret_cast(m_challenge.data() + m_challenge.length())); } @@ -135,12 +139,14 @@ EapPeerMethodResponseAction eap::method_gtc::set_ui_context( _In_count_(dwUIContextDataSize) const BYTE *pUIContextData, _In_ DWORD dwUIContextDataSize) { - // Save GTC reply. - m_reply.assign( + m_module.log_event(&EAPMETHOD_GTC_RESPONSE, event_data((unsigned int)eap_type_gtc), event_data::blank); + + // Save GTC response. + m_response.assign( reinterpret_cast(pUIContextData ), reinterpret_cast(pUIContextData + dwUIContextDataSize)); - // Send the reply. + // Send the response. m_cfg.m_last_status = config_method::status_cred_invalid; // Blame "credentials" if we fail beyond this point. return EapPeerMethodResponseActionSend; }