From 65ea47eb4e4009a14a06a70a591fe030aa3390fc Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Tue, 25 Oct 2016 08:51:13 +0200 Subject: [PATCH] EAPMsg >> EapHost --- EAPMethods/EAPTTLS/EAPTTLS.vcxproj | 2 +- EAPMethods/EAPTTLSUI/EAPTTLSUI.vcxproj | 4 +- EAPMethods/locale/EAPMethods.pot | 8 +-- VS10Solution.sln | 4 +- lib/EAPBase/include/Credentials.h | 4 +- lib/{EAPMsg => EapHost}/build/.gitignore | 0 .../build/EapHost.props} | 0 .../build/EapHost.vcxproj} | 10 ++-- .../build/EapHost.vcxproj.filters} | 0 lib/{EAPMsg => EapHost}/include/Config.h | 16 +++--- lib/{EAPMsg => EapHost}/include/Credentials.h | 20 +++---- lib/{EAPMsg => EapHost}/include/Method.h | 14 ++--- lib/{EAPMsg => EapHost}/src/Config.cpp | 36 ++++++------ lib/{EAPMsg => EapHost}/src/Credentials.cpp | 54 +++++++++--------- .../EAPMsg.cpp => EapHost/src/EapHost.cpp} | 12 ++-- lib/{EAPMsg => EapHost}/src/Method.cpp | 34 +++++------ lib/{EAPMsg => EapHost}/src/StdAfx.cpp | 0 lib/{EAPMsg => EapHost}/src/StdAfx.h | 0 .../build/.gitignore | 0 .../build/EapHost_UI.props} | 0 .../build/EapHost_UI.vcxproj} | 20 +++---- .../build/EapHost_UI.vcxproj.filters} | 10 ++-- .../include/EapHost_UI.h} | 28 ++++----- .../res/wxEapHost_UI.cpp} | 14 ++--- .../res/wxEapHost_UI.fbp} | 6 +- .../res/wxEapHost_UI.h} | 14 ++--- .../src/EapHost_UI.cpp} | 38 ++++++------ lib/{EAPMsg_UI => EapHost_UI}/src/StdAfx.cpp | 0 lib/{EAPMsg_UI => EapHost_UI}/src/StdAfx.h | 2 +- lib/Events/res/EventsETW.man | Bin 105042 -> 105046 bytes lib/TTLS/src/Config.cpp | 4 +- lib/TTLS/src/Method.cpp | 10 ++-- lib/TTLS/src/Module.cpp | 4 +- lib/TTLS/src/StdAfx.h | 4 +- lib/TTLS_UI/include/TTLS_UI.h | 4 +- lib/TTLS_UI/src/Module.cpp | 10 ++-- lib/TTLS_UI/src/StdAfx.h | 4 +- lib/TTLS_UI/src/TTLS_UI.cpp | 18 +++--- 38 files changed, 204 insertions(+), 204 deletions(-) rename lib/{EAPMsg => EapHost}/build/.gitignore (100%) rename lib/{EAPMsg/build/EAPMsg.props => EapHost/build/EapHost.props} (100%) rename lib/{EAPMsg/build/EAPMsg.vcxproj => EapHost/build/EapHost.vcxproj} (94%) rename lib/{EAPMsg/build/EAPMsg.vcxproj.filters => EapHost/build/EapHost.vcxproj.filters} (100%) rename lib/{EAPMsg => EapHost}/include/Config.h (85%) rename lib/{EAPMsg => EapHost}/include/Credentials.h (87%) rename lib/{EAPMsg => EapHost}/include/Method.h (92%) rename lib/{EAPMsg => EapHost}/src/Config.cpp (74%) rename lib/{EAPMsg => EapHost}/src/Credentials.cpp (86%) rename lib/{EAPMsg/src/EAPMsg.cpp => EapHost/src/EapHost.cpp} (68%) rename lib/{EAPMsg => EapHost}/src/Method.cpp (86%) rename lib/{EAPMsg => EapHost}/src/StdAfx.cpp (100%) rename lib/{EAPMsg => EapHost}/src/StdAfx.h (100%) rename lib/{EAPMsg_UI => EapHost_UI}/build/.gitignore (100%) rename lib/{EAPMsg_UI/build/EAPMsg_UI.props => EapHost_UI/build/EapHost_UI.props} (100%) rename lib/{EAPMsg_UI/build/EAPMsg_UI.vcxproj => EapHost_UI/build/EapHost_UI.vcxproj} (90%) rename lib/{EAPMsg_UI/build/EAPMsg_UI.vcxproj.filters => EapHost_UI/build/EapHost_UI.vcxproj.filters} (82%) rename lib/{EAPMsg_UI/include/EAPMsg_UI.h => EapHost_UI/include/EapHost_UI.h} (73%) rename lib/{EAPMsg_UI/res/wxEAPMsg_UI.cpp => EapHost_UI/res/wxEapHost_UI.cpp} (74%) rename lib/{EAPMsg_UI/res/wxEAPMsg_UI.fbp => EapHost_UI/res/wxEapHost_UI.fbp} (98%) rename lib/{EAPMsg_UI/res/wxEAPMsg_UI.h => EapHost_UI/res/wxEapHost_UI.h} (73%) rename lib/{EAPMsg_UI/src/EAPMsg_UI.cpp => EapHost_UI/src/EapHost_UI.cpp} (79%) rename lib/{EAPMsg_UI => EapHost_UI}/src/StdAfx.cpp (100%) rename lib/{EAPMsg_UI => EapHost_UI}/src/StdAfx.h (93%) diff --git a/EAPMethods/EAPTTLS/EAPTTLS.vcxproj b/EAPMethods/EAPTTLS/EAPTTLS.vcxproj index 987a287..7d63be6 100644 --- a/EAPMethods/EAPTTLS/EAPTTLS.vcxproj +++ b/EAPMethods/EAPTTLS/EAPTTLS.vcxproj @@ -97,7 +97,7 @@ {ad6816a0-9600-4e01-8c49-39d03d1e791f} - + {b385ec2b-c3f4-48bb-9bac-8b996de7f754} diff --git a/EAPMethods/EAPTTLSUI/EAPTTLSUI.vcxproj b/EAPMethods/EAPTTLSUI/EAPTTLSUI.vcxproj index 70874a4..3a8beaa 100644 --- a/EAPMethods/EAPTTLSUI/EAPTTLSUI.vcxproj +++ b/EAPMethods/EAPTTLSUI/EAPTTLSUI.vcxproj @@ -100,10 +100,10 @@ {d4b54856-be1f-4937-a8f7-495125be76be} - + {b385ec2b-c3f4-48bb-9bac-8b996de7f754} - + {13d2d8b5-f6aa-459d-b5f7-29b95dd9d583} diff --git a/EAPMethods/locale/EAPMethods.pot b/EAPMethods/locale/EAPMethods.pot index 6fdcfeb..7c2a202 100644 --- a/EAPMethods/locale/EAPMethods.pot +++ b/EAPMethods/locale/EAPMethods.pot @@ -14,7 +14,7 @@ msgstr "" "X-Poedit-SourceCharset: UTF-8\n" "X-Poedit-KeywordsList: _\n" "X-Poedit-SearchPath-0: lib/EAPBase_UI\n" -"X-Poedit-SearchPath-1: lib/EAPMsg_UI\n" +"X-Poedit-SearchPath-1: lib/EapHost_UI\n" "X-Poedit-SearchPath-2: lib/MSCHAPv2_UI\n" "X-Poedit-SearchPath-3: lib/PAP_UI\n" "X-Poedit-SearchPath-4: lib/TLS_UI\n" @@ -272,15 +272,15 @@ msgstr "" msgid "Please, make sure your credentials are correct, or try again later." msgstr "" -#: lib/EAPMsg_UI/res/wxEAPMsg_UI.cpp:17 +#: lib/EapHost_UI/res/wxEapHost_UI.cpp:17 msgid "Inner EAP Method" msgstr "" -#: lib/EAPMsg_UI/res/wxEAPMsg_UI.cpp:28 +#: lib/EapHost_UI/res/wxEapHost_UI.cpp:28 msgid "Select and configure inner EAP method" msgstr "" -#: lib/EAPMsg_UI/res/wxEAPMsg_UI.cpp:40 +#: lib/EapHost_UI/res/wxEapHost_UI.cpp:40 msgid "&Settings" msgstr "" diff --git a/VS10Solution.sln b/VS10Solution.sln index 608ebe6..59358c1 100644 --- a/VS10Solution.sln +++ b/VS10Solution.sln @@ -51,9 +51,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MSCHAPv2", "lib\MSCHAPv2\bu EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MSCHAPv2_UI", "lib\MSCHAPv2_UI\build\MSCHAPv2_UI.vcxproj", "{7AF5B922-7C17-428A-97E0-09E3B41A684D}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EAPMsg", "lib\EAPMsg\build\EAPMsg.vcxproj", "{B385EC2B-C3F4-48BB-9BAC-8B996DE7F754}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EapHost", "lib\EapHost\build\EapHost.vcxproj", "{B385EC2B-C3F4-48BB-9BAC-8B996DE7F754}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EAPMsg_UI", "lib\EAPMsg_UI\build\EAPMsg_UI.vcxproj", "{13D2D8B5-F6AA-459D-B5F7-29B95DD9D583}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EapHost_UI", "lib\EapHost_UI\build\EapHost_UI.vcxproj", "{13D2D8B5-F6AA-459D-B5F7-29B95DD9D583}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/lib/EAPBase/include/Credentials.h b/lib/EAPBase/include/Credentials.h index f82da6a..3948f40 100644 --- a/lib/EAPBase/include/Credentials.h +++ b/lib/EAPBase/include/Credentials.h @@ -421,8 +421,8 @@ namespace eap /// /// \param[in] dwFlags A combination of [EAP flags](https://msdn.microsoft.com/en-us/library/windows/desktop/bb891975.aspx) that describe the EAP authentication session behavior /// \param[in] hTokenImpersonateUser Impersonation token for a logged-on user to collect user-related information - /// \param[in] cred_cached Cached credentials (optional, can be \c NULL, must be credentials_eapmsg* type) - /// \param[in] cfg Method configuration (unused, as must be as config_method_eapmsg is not derived from config_method_with_cred) + /// \param[in] cred_cached Cached credentials (optional, can be \c NULL, must be credentials_eaphost* type) + /// \param[in] cfg Method configuration (unused, as must be as config_method_eaphost is not derived from config_method_with_cred) /// \param[in] pszTargetName The name in Windows Credential Manager to retrieve credentials from (optional, can be \c NULL) /// /// \returns diff --git a/lib/EAPMsg/build/.gitignore b/lib/EapHost/build/.gitignore similarity index 100% rename from lib/EAPMsg/build/.gitignore rename to lib/EapHost/build/.gitignore diff --git a/lib/EAPMsg/build/EAPMsg.props b/lib/EapHost/build/EapHost.props similarity index 100% rename from lib/EAPMsg/build/EAPMsg.props rename to lib/EapHost/build/EapHost.props diff --git a/lib/EAPMsg/build/EAPMsg.vcxproj b/lib/EapHost/build/EapHost.vcxproj similarity index 94% rename from lib/EAPMsg/build/EAPMsg.vcxproj rename to lib/EapHost/build/EapHost.vcxproj index 2efa6ab..a32bfe4 100644 --- a/lib/EAPMsg/build/EAPMsg.vcxproj +++ b/lib/EapHost/build/EapHost.vcxproj @@ -20,7 +20,7 @@ {B385EC2B-C3F4-48BB-9BAC-8B996DE7F754} - EAPMsg + EapHost @@ -52,25 +52,25 @@ - + - + - + - + diff --git a/lib/EAPMsg/build/EAPMsg.vcxproj.filters b/lib/EapHost/build/EapHost.vcxproj.filters similarity index 100% rename from lib/EAPMsg/build/EAPMsg.vcxproj.filters rename to lib/EapHost/build/EapHost.vcxproj.filters diff --git a/lib/EAPMsg/include/Config.h b/lib/EapHost/include/Config.h similarity index 85% rename from lib/EAPMsg/include/Config.h rename to lib/EapHost/include/Config.h index cb97321..19cbcbd 100644 --- a/lib/EAPMsg/include/Config.h +++ b/lib/EapHost/include/Config.h @@ -23,9 +23,9 @@ namespace eap { /// - /// EAPMsg configuration + /// EapHost peer method configuration /// - class config_method_eapmsg; + class config_method_eaphost; } #pragma once @@ -39,7 +39,7 @@ namespace eap namespace eap { - class config_method_eapmsg : public config_method + class config_method_eaphost : public config_method { public: /// @@ -48,21 +48,21 @@ namespace eap /// \param[in] mod EAP module to use for global services /// \param[in] level Config level (0=outer, 1=inner, 2=inner-inner...) /// - config_method_eapmsg(_In_ module &mod, _In_ unsigned int level); + config_method_eaphost(_In_ module &mod, _In_ unsigned int level); /// /// Copies configuration /// /// \param[in] other Configuration to copy from /// - config_method_eapmsg(_In_ const config_method_eapmsg &other); + config_method_eaphost(_In_ const config_method_eaphost &other); /// /// Moves configuration /// /// \param[in] other Configuration to move from /// - config_method_eapmsg(_Inout_ config_method_eapmsg &&other); + config_method_eaphost(_Inout_ config_method_eaphost &&other); /// /// Copies configuration @@ -71,7 +71,7 @@ namespace eap /// /// \returns Reference to this object /// - config_method_eapmsg& operator=(_In_ const config_method_eapmsg &other); + config_method_eaphost& operator=(_In_ const config_method_eaphost &other); /// /// Moves configuration @@ -80,7 +80,7 @@ namespace eap /// /// \returns Reference to this object /// - config_method_eapmsg& operator=(_Inout_ config_method_eapmsg &&other); + config_method_eaphost& operator=(_Inout_ config_method_eaphost &&other); /// /// Clones configuration diff --git a/lib/EAPMsg/include/Credentials.h b/lib/EapHost/include/Credentials.h similarity index 87% rename from lib/EAPMsg/include/Credentials.h rename to lib/EapHost/include/Credentials.h index 84009a7..41372c4 100644 --- a/lib/EAPMsg/include/Credentials.h +++ b/lib/EapHost/include/Credentials.h @@ -23,9 +23,9 @@ namespace eap { /// - /// EAPMsg credentials + /// EapHost peer method credentials /// - class credentials_eapmsg; + class credentials_eaphost; } #pragma once @@ -42,7 +42,7 @@ namespace eap namespace eap { - class credentials_eapmsg : public credentials + class credentials_eaphost : public credentials { public: /// @@ -50,21 +50,21 @@ namespace eap /// /// \param[in] mod EAP module to use for global services /// - credentials_eapmsg(_In_ module &mod); + credentials_eaphost(_In_ module &mod); /// /// Copies credentials /// /// \param[in] other Credentials to copy from /// - credentials_eapmsg(_In_ const credentials_eapmsg &other); + credentials_eaphost(_In_ const credentials_eaphost &other); /// /// Moves credentials /// /// \param[in] other Credentials to move from /// - credentials_eapmsg(_Inout_ credentials_eapmsg &&other); + credentials_eaphost(_Inout_ credentials_eaphost &&other); /// /// Copies credentials @@ -73,7 +73,7 @@ namespace eap /// /// \returns Reference to this object /// - credentials_eapmsg& operator=(_In_ const credentials_eapmsg &other); + credentials_eaphost& operator=(_In_ const credentials_eaphost &other); /// /// Moves credentials @@ -82,7 +82,7 @@ namespace eap /// /// \returns Reference to this object /// - credentials_eapmsg& operator=(_Inout_ credentials_eapmsg &&other); + credentials_eaphost& operator=(_Inout_ credentials_eaphost &&other); /// /// Clones credentials @@ -191,8 +191,8 @@ namespace eap /// /// \param[in] dwFlags A combination of [EAP flags](https://msdn.microsoft.com/en-us/library/windows/desktop/bb891975.aspx) that describe the EAP authentication session behavior /// \param[in] hTokenImpersonateUser Impersonation token for a logged-on user to collect user-related information - /// \param[in] cred_cached Cached credentials (optional, can be \c NULL, must be credentials_eapmsg* type) - /// \param[in] cfg Method configuration (unused, as must be as config_method_eapmsg is not derived from config_method_with_cred) + /// \param[in] cred_cached Cached credentials (optional, can be \c NULL, must be credentials_eaphost* type) + /// \param[in] cfg Method configuration (unused, as must be as config_method_eaphost is not derived from config_method_with_cred) /// \param[in] pszTargetName The name in Windows Credential Manager to retrieve credentials from (optional, can be \c NULL) /// /// \returns diff --git a/lib/EAPMsg/include/Method.h b/lib/EapHost/include/Method.h similarity index 92% rename from lib/EAPMsg/include/Method.h rename to lib/EapHost/include/Method.h index 57f2ed7..c510983 100644 --- a/lib/EAPMsg/include/Method.h +++ b/lib/EapHost/include/Method.h @@ -21,9 +21,9 @@ namespace eap { /// - /// EAPMsg method + /// EapHost peer method /// - class method_eapmsg; + class method_eaphost; } @@ -37,9 +37,9 @@ namespace eap namespace eap { - class method_eapmsg : public method_noneap + class method_eaphost : public method_noneap { - WINSTD_NONCOPYABLE(method_eapmsg) + WINSTD_NONCOPYABLE(method_eaphost) public: /// @@ -49,14 +49,14 @@ namespace eap /// \param[in] cfg Method configuration /// \param[in] cred User credentials /// - method_eapmsg(_In_ module &module, _In_ config_method_eapmsg &cfg, _In_ credentials_eapmsg &cred); + method_eaphost(_In_ module &module, _In_ config_method_eaphost &cfg, _In_ credentials_eaphost &cred); /// /// Moves an EAP method /// /// \param[in] other EAP method to move from /// - method_eapmsg(_Inout_ method_eapmsg &&other); + method_eaphost(_Inout_ method_eaphost &&other); /// /// Moves an EAP method @@ -65,7 +65,7 @@ namespace eap /// /// \returns Reference to this object /// - method_eapmsg& operator=(_Inout_ method_eapmsg &&other); + method_eaphost& operator=(_Inout_ method_eaphost &&other); /// \name Packet processing /// @{ diff --git a/lib/EAPMsg/src/Config.cpp b/lib/EapHost/src/Config.cpp similarity index 74% rename from lib/EAPMsg/src/Config.cpp rename to lib/EapHost/src/Config.cpp index 289d918..e4dbaa2 100644 --- a/lib/EAPMsg/src/Config.cpp +++ b/lib/EapHost/src/Config.cpp @@ -25,16 +25,16 @@ using namespace winstd; ////////////////////////////////////////////////////////////////////// -// eap::config_method_eapmsg +// eap::config_method_eaphost ////////////////////////////////////////////////////////////////////// -eap::config_method_eapmsg::config_method_eapmsg(_In_ module &mod, _In_ unsigned int level) : config_method(mod, level) +eap::config_method_eaphost::config_method_eaphost(_In_ module &mod, _In_ unsigned int level) : config_method(mod, level) { memset(&m_type, 0, sizeof(EAP_METHOD_TYPE)); } -eap::config_method_eapmsg::config_method_eapmsg(_In_ const config_method_eapmsg &other) : +eap::config_method_eaphost::config_method_eaphost(_In_ const config_method_eaphost &other) : m_type (other.m_type ), m_cfg_blob (other.m_cfg_blob), config_method(other ) @@ -42,7 +42,7 @@ eap::config_method_eapmsg::config_method_eapmsg(_In_ const config_method_eapmsg } -eap::config_method_eapmsg::config_method_eapmsg(_Inout_ config_method_eapmsg &&other) : +eap::config_method_eaphost::config_method_eaphost(_Inout_ config_method_eaphost &&other) : m_type (std::move(other.m_type )), m_cfg_blob (std::move(other.m_cfg_blob)), config_method(std::move(other )) @@ -50,7 +50,7 @@ eap::config_method_eapmsg::config_method_eapmsg(_Inout_ config_method_eapmsg &&o } -eap::config_method_eapmsg& eap::config_method_eapmsg::operator=(_In_ const config_method_eapmsg &other) +eap::config_method_eaphost& eap::config_method_eaphost::operator=(_In_ const config_method_eaphost &other) { if (this != &other) { (config_method&)*this = other; @@ -62,7 +62,7 @@ eap::config_method_eapmsg& eap::config_method_eapmsg::operator=(_In_ const confi } -eap::config_method_eapmsg& eap::config_method_eapmsg::operator=(_Inout_ config_method_eapmsg &&other) +eap::config_method_eaphost& eap::config_method_eaphost::operator=(_Inout_ config_method_eaphost &&other) { if (this != &other) { (config_method&&)*this = std::move(other ); @@ -74,13 +74,13 @@ eap::config_method_eapmsg& eap::config_method_eapmsg::operator=(_Inout_ config_m } -eap::config* eap::config_method_eapmsg::clone() const +eap::config* eap::config_method_eaphost::clone() const { - return new config_method_eapmsg(*this); + return new config_method_eaphost(*this); } -void eap::config_method_eapmsg::save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *pConfigRoot) const +void eap::config_method_eaphost::save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *pConfigRoot) const { assert(pDoc); assert(pConfigRoot); @@ -108,7 +108,7 @@ void eap::config_method_eapmsg::save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNod } -void eap::config_method_eapmsg::load(_In_ IXMLDOMNode *pConfigRoot) +void eap::config_method_eaphost::load(_In_ IXMLDOMNode *pConfigRoot) { assert(pConfigRoot); @@ -133,7 +133,7 @@ void eap::config_method_eapmsg::load(_In_ IXMLDOMNode *pConfigRoot) } -void eap::config_method_eapmsg::operator<<(_Inout_ cursor_out &cursor) const +void eap::config_method_eaphost::operator<<(_Inout_ cursor_out &cursor) const { config_method::operator<<(cursor); cursor << m_type ; @@ -141,7 +141,7 @@ void eap::config_method_eapmsg::operator<<(_Inout_ cursor_out &cursor) const } -size_t eap::config_method_eapmsg::get_pk_size() const +size_t eap::config_method_eaphost::get_pk_size() const { return config_method::get_pk_size() + @@ -150,7 +150,7 @@ size_t eap::config_method_eapmsg::get_pk_size() const } -void eap::config_method_eapmsg::operator>>(_Inout_ cursor_in &cursor) +void eap::config_method_eaphost::operator>>(_Inout_ cursor_in &cursor) { config_method::operator>>(cursor); cursor >> m_type ; @@ -158,20 +158,20 @@ void eap::config_method_eapmsg::operator>>(_Inout_ cursor_in &cursor) } -eap_type_t eap::config_method_eapmsg::get_method_id() const +eap_type_t eap::config_method_eaphost::get_method_id() const { return (eap_type_t)m_type.eapType.type; } -const wchar_t* eap::config_method_eapmsg::get_method_str() const +const wchar_t* eap::config_method_eaphost::get_method_str() const { // TODO: Query registry for EAP method name (PeerFriendlyName using RegLoadMUIString()). - return L"EAPMsg"; + return L"EapHost"; } -eap::credentials* eap::config_method_eapmsg::make_credentials() const +eap::credentials* eap::config_method_eaphost::make_credentials() const { - return new credentials_eapmsg(m_module); + return new credentials_eaphost(m_module); } diff --git a/lib/EAPMsg/src/Credentials.cpp b/lib/EapHost/src/Credentials.cpp similarity index 86% rename from lib/EAPMsg/src/Credentials.cpp rename to lib/EapHost/src/Credentials.cpp index be20d7b..c5ea645 100644 --- a/lib/EAPMsg/src/Credentials.cpp +++ b/lib/EapHost/src/Credentials.cpp @@ -27,29 +27,29 @@ using namespace winstd; ////////////////////////////////////////////////////////////////////// -// eap::credentials_eapmsg +// eap::credentials_eaphost ////////////////////////////////////////////////////////////////////// -eap::credentials_eapmsg::credentials_eapmsg(_In_ module &mod) : credentials(mod) +eap::credentials_eaphost::credentials_eaphost(_In_ module &mod) : credentials(mod) { } -eap::credentials_eapmsg::credentials_eapmsg(_In_ const credentials_eapmsg &other) : +eap::credentials_eaphost::credentials_eaphost(_In_ const credentials_eaphost &other) : m_cred_blob(other.m_cred_blob), credentials(other ) { } -eap::credentials_eapmsg::credentials_eapmsg(_Inout_ credentials_eapmsg &&other) : +eap::credentials_eaphost::credentials_eaphost(_Inout_ credentials_eaphost &&other) : m_cred_blob(std::move(other.m_cred_blob)), credentials(std::move(other )) { } -eap::credentials_eapmsg& eap::credentials_eapmsg::operator=(_In_ const credentials_eapmsg &other) +eap::credentials_eaphost& eap::credentials_eaphost::operator=(_In_ const credentials_eaphost &other) { if (this != &other) { (credentials&)*this = other; @@ -60,7 +60,7 @@ eap::credentials_eapmsg& eap::credentials_eapmsg::operator=(_In_ const credentia } -eap::credentials_eapmsg& eap::credentials_eapmsg::operator=(_Inout_ credentials_eapmsg &&other) +eap::credentials_eaphost& eap::credentials_eaphost::operator=(_Inout_ credentials_eaphost &&other) { if (this != &other) { (credentials&)*this = std::move(other); @@ -71,26 +71,26 @@ eap::credentials_eapmsg& eap::credentials_eapmsg::operator=(_Inout_ credentials_ } -eap::config* eap::credentials_eapmsg::clone() const +eap::config* eap::credentials_eaphost::clone() const { - return new credentials_eapmsg(*this); + return new credentials_eaphost(*this); } -void eap::credentials_eapmsg::clear() +void eap::credentials_eaphost::clear() { credentials::clear(); m_cred_blob.clear(); } -bool eap::credentials_eapmsg::empty() const +bool eap::credentials_eaphost::empty() const { return m_cred_blob.empty(); } -void eap::credentials_eapmsg::save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *pConfigRoot) const +void eap::credentials_eaphost::save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode *pConfigRoot) const { assert(pDoc); assert(pConfigRoot); @@ -105,7 +105,7 @@ void eap::credentials_eapmsg::save(_In_ IXMLDOMDocument *pDoc, _In_ IXMLDOMNode } -void eap::credentials_eapmsg::load(_In_ IXMLDOMNode *pConfigRoot) +void eap::credentials_eaphost::load(_In_ IXMLDOMNode *pConfigRoot) { assert(pConfigRoot); HRESULT hr; @@ -123,14 +123,14 @@ void eap::credentials_eapmsg::load(_In_ IXMLDOMNode *pConfigRoot) } -void eap::credentials_eapmsg::operator<<(_Inout_ cursor_out &cursor) const +void eap::credentials_eaphost::operator<<(_Inout_ cursor_out &cursor) const { credentials::operator<<(cursor); cursor << m_cred_blob; } -size_t eap::credentials_eapmsg::get_pk_size() const +size_t eap::credentials_eaphost::get_pk_size() const { return credentials::get_pk_size() + @@ -138,14 +138,14 @@ size_t eap::credentials_eapmsg::get_pk_size() const } -void eap::credentials_eapmsg::operator>>(_Inout_ cursor_in &cursor) +void eap::credentials_eaphost::operator>>(_Inout_ cursor_in &cursor) { credentials::operator>>(cursor); cursor >> m_cred_blob; } -void eap::credentials_eapmsg::store(_In_z_ LPCTSTR pszTargetName, _In_ unsigned int level) const +void eap::credentials_eaphost::store(_In_z_ LPCTSTR pszTargetName, _In_ unsigned int level) const { // TODO: Finish! UNREFERENCED_PARAMETER(pszTargetName); @@ -186,7 +186,7 @@ void eap::credentials_eapmsg::store(_In_z_ LPCTSTR pszTargetName, _In_ unsigned } -void eap::credentials_eapmsg::retrieve(_In_z_ LPCTSTR pszTargetName, _In_ unsigned int level) +void eap::credentials_eaphost::retrieve(_In_z_ LPCTSTR pszTargetName, _In_ unsigned int level) { // TODO: Finish! UNREFERENCED_PARAMETER(pszTargetName); @@ -225,13 +225,13 @@ void eap::credentials_eapmsg::retrieve(_In_z_ LPCTSTR pszTargetName, _In_ unsign } -LPCTSTR eap::credentials_eapmsg::target_suffix() const +LPCTSTR eap::credentials_eaphost::target_suffix() const { return _T("BLOB"); } -std::wstring eap::credentials_eapmsg::get_identity() const +std::wstring eap::credentials_eaphost::get_identity() const { if (!m_identity.empty()) { return m_identity; @@ -244,7 +244,7 @@ std::wstring eap::credentials_eapmsg::get_identity() const } -eap::credentials::source_t eap::credentials_eapmsg::combine( +eap::credentials::source_t eap::credentials_eaphost::combine( _In_ DWORD dwFlags, _In_ HANDLE hTokenImpersonateUser, _In_opt_ const credentials *cred_cached, @@ -260,14 +260,14 @@ eap::credentials::source_t eap::credentials_eapmsg::combine( if (cred_cached) { // Using EAP service cached credentials. - *this = *(credentials_eapmsg*)cred_cached; + *this = *(credentials_eaphost*)cred_cached; m_module.log_event(&EAPMETHOD_TRACE_EVT_CRED_CACHED2, event_data((unsigned int)cfg.get_method_id()), event_data(get_name()), event_data(pszTargetName), event_data::blank); src = source_cache; } //if (src == source_unknown && pszTargetName) { // try { - // credentials_eapmsg cred_loaded(m_module); + // credentials_eaphost cred_loaded(m_module); // cred_loaded.retrieve(pszTargetName, cfg.m_level); // // Using stored credentials. @@ -279,7 +279,7 @@ eap::credentials::source_t eap::credentials_eapmsg::combine( // } //} - auto cfg_eapmsg = dynamic_cast(&cfg); + auto cfg_eaphost = dynamic_cast(&cfg); BOOL fInvokeUI = FALSE; DWORD cred_data_size = 0; eap_blob_runtime cred_data; @@ -288,8 +288,8 @@ eap::credentials::source_t eap::credentials_eapmsg::combine( DWORD dwResult = EapHostPeerGetIdentity( 0, dwFlags, - cfg_eapmsg->m_type, - (DWORD)cfg_eapmsg->m_cfg_blob.size(), cfg_eapmsg->m_cfg_blob.data(), + cfg_eaphost->m_type, + (DWORD)cfg_eaphost->m_cfg_blob.size(), cfg_eaphost->m_cfg_blob.data(), src != source_unknown ? (DWORD)m_cred_blob.size() : 0, src != source_unknown ? m_cred_blob.data() : NULL, hTokenImpersonateUser, &fInvokeUI, @@ -303,7 +303,7 @@ eap::credentials::source_t eap::credentials_eapmsg::combine( m_identity = identity.get(); m_cred_blob.assign(cred_data.get(), cred_data.get() + cred_data_size); SecureZeroMemory(cred_data.get(), cred_data_size); - m_module.log_event(&EAPMETHOD_TRACE_EVT_CRED_EAPMSG, event_data((unsigned int)cfg.get_method_id()), event_data(get_name()), event_data(pszTargetName), event_data::blank); + m_module.log_event(&EAPMETHOD_TRACE_EVT_CRED_EAPHOST, event_data((unsigned int)cfg.get_method_id()), event_data(get_name()), event_data(pszTargetName), event_data::blank); return source_lower; } else SecureZeroMemory(cred_data.get(), cred_data_size); @@ -319,7 +319,7 @@ eap::credentials::source_t eap::credentials_eapmsg::combine( } -const unsigned char eap::credentials_eapmsg::s_entropy[1024] = { +const unsigned char eap::credentials_eaphost::s_entropy[1024] = { 0xe6, 0x01, 0x7b, 0x5f, 0xe5, 0x32, 0xee, 0x8c, 0x57, 0x41, 0x52, 0x95, 0xab, 0xe5, 0x65, 0xdd, 0xb3, 0x12, 0x7c, 0xcb, 0xdb, 0x37, 0x03, 0x76, 0xfc, 0x53, 0x4a, 0xf9, 0x3f, 0xf1, 0xd8, 0x7e, 0x60, 0x9a, 0x49, 0x93, 0xeb, 0x2e, 0x18, 0xd0, 0xfb, 0x40, 0xa9, 0x95, 0x66, 0x8a, 0xdd, 0x99, diff --git a/lib/EAPMsg/src/EAPMsg.cpp b/lib/EapHost/src/EapHost.cpp similarity index 68% rename from lib/EAPMsg/src/EAPMsg.cpp rename to lib/EapHost/src/EapHost.cpp index f74e5fa..5759e1d 100644 --- a/lib/EAPMsg/src/EAPMsg.cpp +++ b/lib/EapHost/src/EapHost.cpp @@ -22,27 +22,27 @@ ////////////////////////////////////////////////////////////////////// -// eap::credentials_eapmsg +// eap::credentials_eaphost ////////////////////////////////////////////////////////////////////// -eap::credentials_eapmsg::credentials_eapmsg(_In_ module &mod) : credentials_pass(mod) +eap::credentials_eaphost::credentials_eaphost(_In_ module &mod) : credentials_pass(mod) { } -eap::credentials_eapmsg::credentials_eapmsg(_In_ const credentials_eapmsg &other) : +eap::credentials_eaphost::credentials_eaphost(_In_ const credentials_eaphost &other) : credentials_pass(other) { } -eap::credentials_eapmsg::credentials_eapmsg(_Inout_ credentials_eapmsg &&other) : +eap::credentials_eaphost::credentials_eaphost(_Inout_ credentials_eaphost &&other) : credentials_pass(std::move(other)) { } -eap::credentials_eapmsg& eap::credentials_eapmsg::operator=(_In_ const credentials_eapmsg &other) +eap::credentials_eaphost& eap::credentials_eaphost::operator=(_In_ const credentials_eaphost &other) { if (this != &other) (credentials_pass&)*this = other; @@ -51,7 +51,7 @@ eap::credentials_eapmsg& eap::credentials_eapmsg::operator=(_In_ const credentia } -eap::credentials_eapmsg& eap::credentials_eapmsg::operator=(_Inout_ credentials_eapmsg &&other) +eap::credentials_eaphost& eap::credentials_eaphost::operator=(_Inout_ credentials_eaphost &&other) { if (this != &other) (credentials_pass&&)*this = std::move(other); diff --git a/lib/EAPMsg/src/Method.cpp b/lib/EapHost/src/Method.cpp similarity index 86% rename from lib/EAPMsg/src/Method.cpp rename to lib/EapHost/src/Method.cpp index c63e8e4..ed4f3b6 100644 --- a/lib/EAPMsg/src/Method.cpp +++ b/lib/EapHost/src/Method.cpp @@ -25,24 +25,24 @@ using namespace winstd; ////////////////////////////////////////////////////////////////////// -// eap::method_eapmsg +// eap::method_eaphost ////////////////////////////////////////////////////////////////////// -eap::method_eapmsg::method_eapmsg(_In_ module &module, _In_ config_method_eapmsg &cfg, _In_ credentials_eapmsg &cred) : +eap::method_eaphost::method_eaphost(_In_ module &module, _In_ config_method_eaphost &cfg, _In_ credentials_eaphost &cred) : m_session_id(0), method_noneap(module, cfg, cred) { } -eap::method_eapmsg::method_eapmsg(_Inout_ method_eapmsg &&other) : +eap::method_eaphost::method_eaphost(_Inout_ method_eaphost &&other) : m_session_id (std::move(other.m_session_id)), method_noneap(std::move(other )) { } -eap::method_eapmsg& eap::method_eapmsg::operator=(_Inout_ method_eapmsg &&other) +eap::method_eaphost& eap::method_eaphost::operator=(_Inout_ method_eaphost &&other) { if (this != std::addressof(other)) { (method_noneap&)*this = std::move(other ); @@ -53,15 +53,15 @@ eap::method_eapmsg& eap::method_eapmsg::operator=(_Inout_ method_eapmsg &&other) } -void eap::method_eapmsg::begin_session( +void eap::method_eaphost::begin_session( _In_ DWORD dwFlags, _In_ const EapAttributes *pAttributeArray, _In_ HANDLE hTokenImpersonateUser, _In_opt_ DWORD dwMaxSendPacketSize) { // Create EapHost peer session using available connection data (m_cfg) and user data (m_cred). - auto &cfg = dynamic_cast(m_cfg); - auto &cred = dynamic_cast(m_cred); + auto &cfg = dynamic_cast(m_cfg); + auto &cred = dynamic_cast(m_cred); eap_error_runtime error; DWORD dwResult = EapHostPeerBeginSession( dwFlags, @@ -88,7 +88,7 @@ void eap::method_eapmsg::begin_session( } -void eap::method_eapmsg::end_session() +void eap::method_eaphost::end_session() { // End EapHost peer session. eap_error_runtime error; @@ -102,7 +102,7 @@ void eap::method_eapmsg::end_session() } -void eap::method_eapmsg::process_request_packet( +void eap::method_eaphost::process_request_packet( _In_bytecount_(dwReceivedPacketSize) const void *pReceivedPacket, _In_ DWORD dwReceivedPacketSize, _Out_ EapPeerMethodOutput *pEapOutput) @@ -131,7 +131,7 @@ void eap::method_eapmsg::process_request_packet( } -void eap::method_eapmsg::get_response_packet( +void eap::method_eaphost::get_response_packet( _Inout_bytecap_(*dwSendPacketSize) void *pSendPacket, _Inout_ DWORD *pdwSendPacketSize) { @@ -157,7 +157,7 @@ void eap::method_eapmsg::get_response_packet( } -void eap::method_eapmsg::get_result( +void eap::method_eaphost::get_result( _In_ EapPeerMethodResultReason reason, _Inout_ EapPeerMethodResult *pResult) { @@ -180,10 +180,10 @@ void eap::method_eapmsg::get_result( pResult->pEapError = result.pEapError; if (result.fSaveConnectionData) - dynamic_cast(m_cfg).m_cfg_blob.assign(result.pConnectionData, result.pConnectionData + result.dwSizeofConnectionData); + dynamic_cast(m_cfg).m_cfg_blob.assign(result.pConnectionData, result.pConnectionData + result.dwSizeofConnectionData); if (result.fSaveUserData) - dynamic_cast(m_cred).m_cred_blob.assign(result.pUserData, result.pUserData + result.dwSizeofUserData); + dynamic_cast(m_cred).m_cred_blob.assign(result.pUserData, result.pUserData + result.dwSizeofUserData); } else if (error) throw eap_runtime_error(*error , __FUNCTION__ " EapHostPeerGetResult failed."); else @@ -192,7 +192,7 @@ void eap::method_eapmsg::get_result( } -void eap::method_eapmsg::get_ui_context( +void eap::method_eaphost::get_ui_context( _Inout_ BYTE **ppUIContextData, _Inout_ DWORD *pdwUIContextDataSize) { @@ -212,7 +212,7 @@ void eap::method_eapmsg::get_ui_context( } -void eap::method_eapmsg::set_ui_context( +void eap::method_eaphost::set_ui_context( _In_count_(dwUIContextDataSize) const BYTE *pUIContextData, _In_ DWORD dwUIContextDataSize, _Out_ EapPeerMethodOutput *pEapOutput) @@ -238,7 +238,7 @@ void eap::method_eapmsg::set_ui_context( } -void eap::method_eapmsg::get_response_attributes(_Inout_ EapAttributes *pAttribs) +void eap::method_eaphost::get_response_attributes(_Inout_ EapAttributes *pAttribs) { // Get response attributes from EapHost peer. eap_error_runtime error; @@ -255,7 +255,7 @@ void eap::method_eapmsg::get_response_attributes(_Inout_ EapAttributes *pAttribs } -void eap::method_eapmsg::set_response_attributes( +void eap::method_eaphost::set_response_attributes( _In_ const EapAttributes *pAttribs, _Out_ EapPeerMethodOutput *pEapOutput) { diff --git a/lib/EAPMsg/src/StdAfx.cpp b/lib/EapHost/src/StdAfx.cpp similarity index 100% rename from lib/EAPMsg/src/StdAfx.cpp rename to lib/EapHost/src/StdAfx.cpp diff --git a/lib/EAPMsg/src/StdAfx.h b/lib/EapHost/src/StdAfx.h similarity index 100% rename from lib/EAPMsg/src/StdAfx.h rename to lib/EapHost/src/StdAfx.h diff --git a/lib/EAPMsg_UI/build/.gitignore b/lib/EapHost_UI/build/.gitignore similarity index 100% rename from lib/EAPMsg_UI/build/.gitignore rename to lib/EapHost_UI/build/.gitignore diff --git a/lib/EAPMsg_UI/build/EAPMsg_UI.props b/lib/EapHost_UI/build/EapHost_UI.props similarity index 100% rename from lib/EAPMsg_UI/build/EAPMsg_UI.props rename to lib/EapHost_UI/build/EapHost_UI.props diff --git a/lib/EAPMsg_UI/build/EAPMsg_UI.vcxproj b/lib/EapHost_UI/build/EapHost_UI.vcxproj similarity index 90% rename from lib/EAPMsg_UI/build/EAPMsg_UI.vcxproj rename to lib/EapHost_UI/build/EapHost_UI.vcxproj index bd2bcbd..6abb627 100644 --- a/lib/EAPMsg_UI/build/EAPMsg_UI.vcxproj +++ b/lib/EapHost_UI/build/EapHost_UI.vcxproj @@ -20,7 +20,7 @@ {13D2D8B5-F6AA-459D-B5F7-29B95DD9D583} - EAPMsg_UI + EapHost_UI @@ -52,25 +52,25 @@ - + - + - + - + @@ -79,13 +79,13 @@ - - + + - - + + Create Create @@ -99,7 +99,7 @@ - + diff --git a/lib/EAPMsg_UI/build/EAPMsg_UI.vcxproj.filters b/lib/EapHost_UI/build/EapHost_UI.vcxproj.filters similarity index 82% rename from lib/EAPMsg_UI/build/EAPMsg_UI.vcxproj.filters rename to lib/EapHost_UI/build/EapHost_UI.vcxproj.filters index 4b7b8cd..868b90d 100644 --- a/lib/EAPMsg_UI/build/EAPMsg_UI.vcxproj.filters +++ b/lib/EapHost_UI/build/EapHost_UI.vcxproj.filters @@ -18,10 +18,10 @@ Header Files - + Header Files - + Header Files @@ -29,15 +29,15 @@ Source Files - + Source Files - + Source Files - + Resource Files diff --git a/lib/EAPMsg_UI/include/EAPMsg_UI.h b/lib/EapHost_UI/include/EapHost_UI.h similarity index 73% rename from lib/EAPMsg_UI/include/EAPMsg_UI.h rename to lib/EapHost_UI/include/EapHost_UI.h index 1ef81e2..06254c1 100644 --- a/lib/EAPMsg_UI/include/EAPMsg_UI.h +++ b/lib/EapHost_UI/include/EapHost_UI.h @@ -19,7 +19,7 @@ */ #include "../../EAPBase_UI/include/EAP_UI.h" -#include "../../EAPMsg/include/Config.h" +#include "../../EapHost/include/Config.h" /// /// Helper class for auto-destroyable EAP_METHOD_TYPE used in wxWidget's item containers @@ -29,21 +29,21 @@ class wxEAPMethodTypeClientData; /// /// Inner EAP method config panel /// -class wxEAPMsgMethodConfigPanel; +class wxEapHostMethodConfigPanel; /// -/// EAPMsg credential configuration panel +/// EapHost peer method credential configuration panel /// -typedef wxEAPCredentialsConfigPanel > wxEAPMsgCredentialsConfigPanel; +typedef wxEAPCredentialsConfigPanel > wxEapHostCredentialsConfigPanel; /// -/// EAPMsg configuration panel +/// EapHost peer method configuration panel /// -class wxEAPMsgConfigPanel; +class wxEapHostConfigPanel; #pragma once -#include "../res/wxEAPMsg_UI.h" +#include "../res/wxEapHost_UI.h" #include #include @@ -66,7 +66,7 @@ public: }; -class wxEAPMsgMethodConfigPanel : public wxEAPMsgMethodConfigPanelBase +class wxEapHostMethodConfigPanel : public wxEapHostMethodConfigPanelBase { public: /// @@ -76,7 +76,7 @@ public: /// \param[inout] cfg Configuration data /// \param[in ] parent Parent window /// - wxEAPMsgMethodConfigPanel(const eap::config_provider &prov, eap::config_method_eapmsg &cfg, wxWindow *parent); + wxEapHostMethodConfigPanel(const eap::config_provider &prov, eap::config_method_eaphost &cfg, wxWindow *parent); protected: /// \cond internal @@ -87,11 +87,11 @@ protected: /// \endcond protected: - eap::config_method_eapmsg &m_cfg; ///< Method configuration + eap::config_method_eaphost &m_cfg; ///< Method configuration }; -class wxEAPMsgConfigPanel : public wxPanel +class wxEapHostConfigPanel : public wxPanel { public: /// @@ -101,12 +101,12 @@ public: /// \param[inout] cfg Configuration data /// \param[in ] parent Parent window /// - wxEAPMsgConfigPanel(const eap::config_provider &prov, eap::config_method_eapmsg &cfg, wxWindow* parent); + wxEapHostConfigPanel(const eap::config_provider &prov, eap::config_method_eaphost &cfg, wxWindow* parent); /// /// Destructs the configuration panel /// - virtual ~wxEAPMsgConfigPanel(); + virtual ~wxEapHostConfigPanel(); protected: /// \cond internal @@ -114,5 +114,5 @@ protected: /// \endcond protected: - wxEAPMsgMethodConfigPanel *m_method; ///< Method configuration panel + wxEapHostMethodConfigPanel *m_method; ///< Method configuration panel }; diff --git a/lib/EAPMsg_UI/res/wxEAPMsg_UI.cpp b/lib/EapHost_UI/res/wxEapHost_UI.cpp similarity index 74% rename from lib/EAPMsg_UI/res/wxEAPMsg_UI.cpp rename to lib/EapHost_UI/res/wxEapHost_UI.cpp index d5a476b..cad9d41 100644 --- a/lib/EAPMsg_UI/res/wxEAPMsg_UI.cpp +++ b/lib/EapHost_UI/res/wxEapHost_UI.cpp @@ -7,11 +7,11 @@ #include -#include "wxEAPMsg_UI.h" +#include "wxEapHost_UI.h" /////////////////////////////////////////////////////////////////////////// -wxEAPMsgMethodConfigPanelBase::wxEAPMsgMethodConfigPanelBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) +wxEapHostMethodConfigPanelBase::wxEapHostMethodConfigPanelBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style ) { wxStaticBoxSizer* sb_method; sb_method = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Inner EAP Method") ), wxVERTICAL ); @@ -54,14 +54,14 @@ wxEAPMsgMethodConfigPanelBase::wxEAPMsgMethodConfigPanelBase( wxWindow* parent, this->Layout(); // Connect Events - this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( wxEAPMsgMethodConfigPanelBase::OnUpdateUI ) ); - m_settings->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxEAPMsgMethodConfigPanelBase::OnSettings ), NULL, this ); + this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( wxEapHostMethodConfigPanelBase::OnUpdateUI ) ); + m_settings->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxEapHostMethodConfigPanelBase::OnSettings ), NULL, this ); } -wxEAPMsgMethodConfigPanelBase::~wxEAPMsgMethodConfigPanelBase() +wxEapHostMethodConfigPanelBase::~wxEapHostMethodConfigPanelBase() { // Disconnect Events - this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( wxEAPMsgMethodConfigPanelBase::OnUpdateUI ) ); - m_settings->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxEAPMsgMethodConfigPanelBase::OnSettings ), NULL, this ); + this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( wxEapHostMethodConfigPanelBase::OnUpdateUI ) ); + m_settings->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxEapHostMethodConfigPanelBase::OnSettings ), NULL, this ); } diff --git a/lib/EAPMsg_UI/res/wxEAPMsg_UI.fbp b/lib/EapHost_UI/res/wxEapHost_UI.fbp similarity index 98% rename from lib/EAPMsg_UI/res/wxEAPMsg_UI.fbp rename to lib/EapHost_UI/res/wxEapHost_UI.fbp index 026ccdf..3673237 100644 --- a/lib/EAPMsg_UI/res/wxEAPMsg_UI.fbp +++ b/lib/EapHost_UI/res/wxEapHost_UI.fbp @@ -11,11 +11,11 @@ . UTF-8 connect - wxEAPMsg_UI + wxEapHost_UI 1000 none 1 - wxEAPMsg_UI + wxEapHost_UI . #include <StdAfx.h> @@ -40,7 +40,7 @@ wxID_ANY - wxEAPMsgMethodConfigPanelBase + wxEapHostMethodConfigPanelBase 500,-1 diff --git a/lib/EAPMsg_UI/res/wxEAPMsg_UI.h b/lib/EapHost_UI/res/wxEapHost_UI.h similarity index 73% rename from lib/EAPMsg_UI/res/wxEAPMsg_UI.h rename to lib/EapHost_UI/res/wxEapHost_UI.h index 1b855bc..ae707e6 100644 --- a/lib/EAPMsg_UI/res/wxEAPMsg_UI.h +++ b/lib/EapHost_UI/res/wxEapHost_UI.h @@ -5,8 +5,8 @@ // PLEASE DO "NOT" EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// -#ifndef __WXEAPMSG_UI_H__ -#define __WXEAPMSG_UI_H__ +#ifndef __WXEAPHOST_UI_H__ +#define __WXEAPHOST_UI_H__ #include #include @@ -30,9 +30,9 @@ /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// -/// Class wxEAPMsgMethodConfigPanelBase +/// Class wxEapHostMethodConfigPanelBase /////////////////////////////////////////////////////////////////////////////// -class wxEAPMsgMethodConfigPanelBase : public wxPanel +class wxEapHostMethodConfigPanelBase : public wxPanel { private: @@ -49,9 +49,9 @@ class wxEAPMsgMethodConfigPanelBase : public wxPanel public: - wxEAPMsgMethodConfigPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,-1 ), long style = wxTAB_TRAVERSAL ); - ~wxEAPMsgMethodConfigPanelBase(); + wxEapHostMethodConfigPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,-1 ), long style = wxTAB_TRAVERSAL ); + ~wxEapHostMethodConfigPanelBase(); }; -#endif //__WXEAPMSG_UI_H__ +#endif //__WXEAPHOST_UI_H__ diff --git a/lib/EAPMsg_UI/src/EAPMsg_UI.cpp b/lib/EapHost_UI/src/EapHost_UI.cpp similarity index 79% rename from lib/EAPMsg_UI/src/EAPMsg_UI.cpp rename to lib/EapHost_UI/src/EapHost_UI.cpp index ba0f87f..b8f76b4 100644 --- a/lib/EAPMsg_UI/src/EAPMsg_UI.cpp +++ b/lib/EapHost_UI/src/EapHost_UI.cpp @@ -24,7 +24,7 @@ ////////////////////////////////////////////////////////////////////// -// wxEAPMsgMethodConfigPanel +// wxEapHostMethodConfigPanel ////////////////////////////////////////////////////////////////////// wxEAPMethodTypeClientData::wxEAPMethodTypeClientData(const EAP_METHOD_TYPE &type, DWORD properties) : @@ -35,12 +35,12 @@ wxEAPMethodTypeClientData::wxEAPMethodTypeClientData(const EAP_METHOD_TYPE &type ////////////////////////////////////////////////////////////////////// -// wxEAPMsgMethodConfigPanel +// wxEapHostMethodConfigPanel ////////////////////////////////////////////////////////////////////// -wxEAPMsgMethodConfigPanel::wxEAPMsgMethodConfigPanel(const eap::config_provider &prov, eap::config_method_eapmsg &cfg, wxWindow *parent) : +wxEapHostMethodConfigPanel::wxEapHostMethodConfigPanel(const eap::config_provider &prov, eap::config_method_eaphost &cfg, wxWindow *parent) : m_cfg(cfg), - wxEAPMsgMethodConfigPanelBase(parent) + wxEapHostMethodConfigPanelBase(parent) { UNREFERENCED_PARAMETER(prov); @@ -62,7 +62,7 @@ wxEAPMsgMethodConfigPanel::wxEAPMsgMethodConfigPanel(const eap::config_provider } -bool wxEAPMsgMethodConfigPanel::TransferDataToWindow() +bool wxEapHostMethodConfigPanel::TransferDataToWindow() { if (m_method->HasClientObjectData()) { // Find configured method and set its selection and configuration BLOB. @@ -75,13 +75,13 @@ bool wxEAPMsgMethodConfigPanel::TransferDataToWindow() } } - return wxEAPMsgMethodConfigPanelBase::TransferDataToWindow(); + return wxEapHostMethodConfigPanelBase::TransferDataToWindow(); } -bool wxEAPMsgMethodConfigPanel::TransferDataFromWindow() +bool wxEapHostMethodConfigPanel::TransferDataFromWindow() { - wxCHECK(wxEAPMsgMethodConfigPanelBase::TransferDataFromWindow(), false); + wxCHECK(wxEapHostMethodConfigPanelBase::TransferDataFromWindow(), false); int sel = m_method->GetSelection(); const wxEAPMethodTypeClientData *data = @@ -98,9 +98,9 @@ bool wxEAPMsgMethodConfigPanel::TransferDataFromWindow() } -void wxEAPMsgMethodConfigPanel::OnUpdateUI(wxUpdateUIEvent& event) +void wxEapHostMethodConfigPanel::OnUpdateUI(wxUpdateUIEvent& event) { - wxEAPMsgMethodConfigPanelBase::OnUpdateUI(event); + wxEapHostMethodConfigPanelBase::OnUpdateUI(event); int sel = m_method->GetSelection(); const wxEAPMethodTypeClientData *data = @@ -111,9 +111,9 @@ void wxEAPMsgMethodConfigPanel::OnUpdateUI(wxUpdateUIEvent& event) } -void wxEAPMsgMethodConfigPanel::OnSettings(wxCommandEvent& event) +void wxEapHostMethodConfigPanel::OnSettings(wxCommandEvent& event) { - wxEAPMsgMethodConfigPanelBase::OnSettings(event); + wxEapHostMethodConfigPanelBase::OnSettings(event); int sel = m_method->GetSelection(); wxEAPMethodTypeClientData *data = @@ -139,33 +139,33 @@ void wxEAPMsgMethodConfigPanel::OnSettings(wxCommandEvent& event) ////////////////////////////////////////////////////////////////////// -// wxEAPMsgConfigPanel +// wxEapHostConfigPanel ////////////////////////////////////////////////////////////////////// -wxEAPMsgConfigPanel::wxEAPMsgConfigPanel(const eap::config_provider &prov, eap::config_method_eapmsg &cfg, wxWindow* parent) : wxPanel(parent) +wxEapHostConfigPanel::wxEapHostConfigPanel(const eap::config_provider &prov, eap::config_method_eaphost &cfg, wxWindow* parent) : wxPanel(parent) { wxBoxSizer* sb_content; sb_content = new wxBoxSizer( wxVERTICAL ); - m_method = new wxEAPMsgMethodConfigPanel(prov, cfg, this); + m_method = new wxEapHostMethodConfigPanel(prov, cfg, this); sb_content->Add(m_method, 0, wxEXPAND, 5); this->SetSizer(sb_content); this->Layout(); // Connect Events - this->Connect(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(wxEAPMsgConfigPanel::OnInitDialog)); + this->Connect(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(wxEapHostConfigPanel::OnInitDialog)); } -wxEAPMsgConfigPanel::~wxEAPMsgConfigPanel() +wxEapHostConfigPanel::~wxEapHostConfigPanel() { // Disconnect Events - this->Disconnect(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(wxEAPMsgConfigPanel::OnInitDialog)); + this->Disconnect(wxEVT_INIT_DIALOG, wxInitDialogEventHandler(wxEapHostConfigPanel::OnInitDialog)); } -void wxEAPMsgConfigPanel::OnInitDialog(wxInitDialogEvent& event) +void wxEapHostConfigPanel::OnInitDialog(wxInitDialogEvent& event) { // Forward the event to child panels. if (m_method) diff --git a/lib/EAPMsg_UI/src/StdAfx.cpp b/lib/EapHost_UI/src/StdAfx.cpp similarity index 100% rename from lib/EAPMsg_UI/src/StdAfx.cpp rename to lib/EapHost_UI/src/StdAfx.cpp diff --git a/lib/EAPMsg_UI/src/StdAfx.h b/lib/EapHost_UI/src/StdAfx.h similarity index 93% rename from lib/EAPMsg_UI/src/StdAfx.h rename to lib/EapHost_UI/src/StdAfx.h index efe89b9..ff11ed9 100644 --- a/lib/EAPMsg_UI/src/StdAfx.h +++ b/lib/EapHost_UI/src/StdAfx.h @@ -22,7 +22,7 @@ #define _CRT_SECURE_NO_WARNINGS // Prevent warnings from wxWidgets headers -#include "../include/EAPMsg_UI.h" +#include "../include/EapHost_UI.h" #include diff --git a/lib/Events/res/EventsETW.man b/lib/Events/res/EventsETW.man index 83723adbcf029f15360d3ecc1f790fe7b340e0ae..dc3ae1581be0a32a7fd8cc614893a46f33878bd6 100644 GIT binary patch delta 70 zcmcb#h3(oFwhbCbSv?s18G67Q26xzJ!n7~Ga Q@N`FWM(OPz${Ev?08Vcgx&QzG diff --git a/lib/TTLS/src/Config.cpp b/lib/TTLS/src/Config.cpp index 7c14b96..6576ccf 100644 --- a/lib/TTLS/src/Config.cpp +++ b/lib/TTLS/src/Config.cpp @@ -267,7 +267,7 @@ eap::config_method* eap::config_method_ttls::make_config_method(_In_ winstd::eap switch (eap_type) { case eap_type_legacy_pap : return new config_method_pap (m_module, m_level + 1); case eap_type_legacy_mschapv2: return new config_method_mschapv2(m_module, m_level + 1); - default : return new config_method_eapmsg (m_module, m_level + 1); // EAPMsg handles all other method types + default : return new config_method_eaphost (m_module, m_level + 1); // EapHost peer method handles all other method types } } @@ -276,7 +276,7 @@ eap::config_method* eap::config_method_ttls::make_config_method(_In_ const wchar { if (_wcsicmp(eap_type, L"PAP" ) == 0) return new config_method_pap (m_module, m_level + 1); else if (_wcsicmp(eap_type, L"MSCHAPv2") == 0) return new config_method_mschapv2(m_module, m_level + 1); - else if (_wcsicmp(eap_type, L"EAPMsg" ) == 0) return new config_method_eapmsg (m_module, m_level + 1); + else if (_wcsicmp(eap_type, L"EapHost" ) == 0) return new config_method_eaphost (m_module, m_level + 1); else throw invalid_argument(__FUNCTION__ " Unsupported inner authentication method."); } diff --git a/lib/TTLS/src/Method.cpp b/lib/TTLS/src/Method.cpp index 1c9e3b2..c26b68f 100644 --- a/lib/TTLS/src/Method.cpp +++ b/lib/TTLS/src/Method.cpp @@ -64,10 +64,10 @@ void eap::method_ttls::begin_session( method_tls::begin_session(dwFlags, pAttributeArray, hTokenImpersonateUser, dwMaxSendPacketSize); // Initialize inner method. - auto cfg_inner = dynamic_cast(m_cfg ).m_inner.get(); - auto cred_inner = dynamic_cast(m_cred).m_inner.get(); - auto cfg_inner_eapmsg = dynamic_cast(cfg_inner); - if (!cfg_inner_eapmsg) { + auto cfg_inner = dynamic_cast(m_cfg ).m_inner.get(); + auto cred_inner = dynamic_cast(m_cred).m_inner.get(); + auto cfg_inner_eaphost = dynamic_cast(cfg_inner); + if (!cfg_inner_eaphost) { // Native inner methods switch (cfg_inner->get_method_id()) { case eap_type_legacy_pap : m_inner.reset(new method_pap (m_module, dynamic_cast(*cfg_inner), dynamic_cast(*cred_inner))); break; @@ -76,7 +76,7 @@ void eap::method_ttls::begin_session( } } else { // EapHost inner method - m_inner.reset(new method_eapmsg(m_module, *cfg_inner_eapmsg, dynamic_cast(*cred_inner))); + m_inner.reset(new method_eaphost(m_module, *cfg_inner_eaphost, dynamic_cast(*cred_inner))); } m_inner->begin_session(dwFlags, pAttributeArray, hTokenImpersonateUser, MAXDWORD); } diff --git a/lib/TTLS/src/Module.cpp b/lib/TTLS/src/Module.cpp index c094e09..6a44cc6 100644 --- a/lib/TTLS/src/Module.cpp +++ b/lib/TTLS/src/Module.cpp @@ -53,7 +53,7 @@ void eap::peer_ttls::initialize() MsiUseFeature(_T(PRODUCT_VERSION_GUID), _T("featEAPTTLS")); #endif - // Initialize EapHost for EAPMsg based inner authentication methods. + // Initialize EapHost based inner authentication methods. DWORD dwResult = EapHostPeerInitialize(); if (dwResult != ERROR_SUCCESS) throw win_runtime_error(dwResult, __FUNCTION__ " EapHostPeerConfigBlob2Xml failed."); @@ -62,7 +62,7 @@ void eap::peer_ttls::initialize() void eap::peer_ttls::shutdown() { - // Uninitialize EapHost. It was initialized for EAPMsg based inner authentication methods. + // Uninitialize EapHost. It was initialized for EapHost based inner authentication methods. EapHostPeerUninitialize(); } diff --git a/lib/TTLS/src/StdAfx.h b/lib/TTLS/src/StdAfx.h index b6575f2..2c8306d 100644 --- a/lib/TTLS/src/StdAfx.h +++ b/lib/TTLS/src/StdAfx.h @@ -33,8 +33,8 @@ #include "../../MSCHAPv2/include/Method.h" #include "../../MSCHAPv2/include/MSCHAPv2.h" -#include "../../EAPMsg/include/Config.h" -#include "../../EAPMsg/include/Method.h" +#include "../../EapHost/include/Config.h" +#include "../../EapHost/include/Method.h" #include "../../EAPBase/include/EAPXML.h" diff --git a/lib/TTLS_UI/include/TTLS_UI.h b/lib/TTLS_UI/include/TTLS_UI.h index fd6f9e2..cd0720b 100644 --- a/lib/TTLS_UI/include/TTLS_UI.h +++ b/lib/TTLS_UI/include/TTLS_UI.h @@ -35,7 +35,7 @@ class wxTTLSConfigWindow; #include "../../TLS_UI/include/TLS_UI.h" #include "../../TTLS/include/Config.h" -#include "../../EAPMsg/include/Config.h" +#include "../../EapHost/include/Config.h" #include "../../PAP/include/Config.h" #include "../../MSCHAPv2/include/Config.h" @@ -104,5 +104,5 @@ protected: // Temporary inner method configurations to hold data until applied eap::config_method_pap m_cfg_pap; ///< PAP configuration eap::config_method_mschapv2 m_cfg_mschapv2; ///< MSCHAPv2 configuration - eap::config_method_eapmsg m_cfg_eapmsg; ///< Inner EAP configuration + eap::config_method_eaphost m_cfg_eaphost; ///< Inner EAP configuration }; diff --git a/lib/TTLS_UI/src/Module.cpp b/lib/TTLS_UI/src/Module.cpp index 728ccec..d82e271 100644 --- a/lib/TTLS_UI/src/Module.cpp +++ b/lib/TTLS_UI/src/Module.cpp @@ -278,8 +278,8 @@ void eap::peer_ttls_ui::invoke_identity_ui( src_inner != eap::credentials::source_config && eap::config_method::status_cred_begin <= cfg_method->m_inner->m_last_status && cfg_method->m_inner->m_last_status < eap::config_method::status_cred_end) { // Prompt for inner credentials. - auto cfg_inner_eapmsg = dynamic_cast(cfg_method->m_inner.get()); - if (!cfg_inner_eapmsg) { + auto cfg_inner_eaphost = dynamic_cast(cfg_method->m_inner.get()); + if (!cfg_inner_eaphost) { // Native inner methods. Build dialog to prompt for inner credentials. wxEAPCredentialsDialog dlg(*cfg_prov, &parent); if (eap::config_method::status_cred_begin <= cfg_method->m_inner->m_last_status && cfg_method->m_inner->m_last_status < eap::config_method::status_cred_end) @@ -316,17 +316,17 @@ void eap::peer_ttls_ui::invoke_identity_ui( } } else { // EapHost inner method - auto cred_inner = dynamic_cast(cred->m_inner.get()); + auto cred_inner = dynamic_cast(cred->m_inner.get()); DWORD cred_data_size = 0; winstd::eap_blob cred_data; unique_ptr identity; winstd::eap_error error; DWORD dwResult = EapHostPeerInvokeIdentityUI( 0, - cfg_inner_eapmsg->m_type, + cfg_inner_eaphost->m_type, dwFlags, hwndParent, - (DWORD)cfg_inner_eapmsg->m_cfg_blob.size(), cfg_inner_eapmsg->m_cfg_blob.data(), + (DWORD)cfg_inner_eaphost->m_cfg_blob.size(), cfg_inner_eaphost->m_cfg_blob.data(), (DWORD)cred_inner->m_cred_blob.size(), cred_inner->m_cred_blob.data(), &cred_data_size, &cred_data._Myptr, &identity._Myptr, diff --git a/lib/TTLS_UI/src/StdAfx.h b/lib/TTLS_UI/src/StdAfx.h index a80716e..3f8b959 100644 --- a/lib/TTLS_UI/src/StdAfx.h +++ b/lib/TTLS_UI/src/StdAfx.h @@ -25,11 +25,11 @@ #include "../include/Module.h" #include "../include/TTLS_UI.h" -#include "../../EAPMsg_UI/include/EAPMsg_UI.h" +#include "../../EapHost_UI/include/EapHost_UI.h" #include "../../PAP_UI/include/PAP_UI.h" #include "../../MSCHAPv2_UI/include/MSCHAPv2_UI.h" -#include "../../EAPMsg/include/Credentials.h" +#include "../../EapHost/include/Credentials.h" #include diff --git a/lib/TTLS_UI/src/TTLS_UI.cpp b/lib/TTLS_UI/src/TTLS_UI.cpp index 3ce428d..acec863 100644 --- a/lib/TTLS_UI/src/TTLS_UI.cpp +++ b/lib/TTLS_UI/src/TTLS_UI.cpp @@ -98,7 +98,7 @@ void wxTTLSConfigPanel::OnUpdateUI(wxUpdateUIEvent& event) wxTTLSConfigWindow::wxTTLSConfigWindow(eap::config_provider &prov, eap::config_method &cfg, wxWindow* parent) : m_cfg_pap (cfg.m_module, cfg.m_level + 1), m_cfg_mschapv2(cfg.m_module, cfg.m_level + 1), - m_cfg_eapmsg (cfg.m_module, cfg.m_level + 1), + m_cfg_eaphost (cfg.m_module, cfg.m_level + 1), wxEAPConfigWindow(prov, cfg, parent) { wxBoxSizer* sb_content; @@ -118,8 +118,8 @@ wxTTLSConfigWindow::wxTTLSConfigWindow(eap::config_provider &prov, eap::config_m m_inner_type->AddPage(panel_pap, _("PAP")); wxMSCHAPv2ConfigPanel *panel_mschapv2 = new wxMSCHAPv2ConfigPanel(m_prov, m_cfg_mschapv2, m_inner_type); m_inner_type->AddPage(panel_mschapv2, _("MSCHAPv2")); - wxEAPMsgConfigPanel *panel_eapmsg = new wxEAPMsgConfigPanel(m_prov, m_cfg_eapmsg, m_inner_type); - m_inner_type->AddPage(panel_eapmsg, _("EAP")); + wxEapHostConfigPanel *panel_eaphost = new wxEapHostConfigPanel(m_prov, m_cfg_eaphost, m_inner_type); + m_inner_type->AddPage(panel_eaphost, _("Other EAP methods...")); sb_content->Add(m_inner_type, 0, wxALL|wxEXPAND, 5); sb_content->Add(20, 20, 1, wxALL|wxEXPAND, 5); @@ -163,8 +163,8 @@ bool wxTTLSConfigWindow::TransferDataToWindow() { auto &cfg_ttls = dynamic_cast(m_cfg); - auto cfg_inner_eapmsg = dynamic_cast(cfg_ttls.m_inner.get()); - if (!cfg_inner_eapmsg) { + auto cfg_inner_eaphost = dynamic_cast(cfg_ttls.m_inner.get()); + if (!cfg_inner_eaphost) { // Native inner methods switch (cfg_ttls.m_inner->get_method_id()) { case winstd::eap_type_legacy_pap: @@ -182,8 +182,8 @@ bool wxTTLSConfigWindow::TransferDataToWindow() } } else { // EapHost inner method - m_cfg_eapmsg = *cfg_inner_eapmsg; - m_inner_type->SetSelection(2); // 2=EAP + m_cfg_eaphost = *cfg_inner_eaphost; + m_inner_type->SetSelection(2); // 2=EapHost } // Do not invoke inherited TransferDataToWindow(), as it will call others TransferDataToWindow(). @@ -209,8 +209,8 @@ bool wxTTLSConfigWindow::TransferDataFromWindow() cfg_ttls.m_inner.reset(new eap::config_method_mschapv2(m_cfg_mschapv2)); break; - case 2: // 2=EAP - cfg_ttls.m_inner.reset(new eap::config_method_eapmsg(m_cfg_eapmsg)); + case 2: // 2=EapHost + cfg_ttls.m_inner.reset(new eap::config_method_eaphost(m_cfg_eaphost)); break; default: