EAPMsg >> EapHost

This commit is contained in:
2016-10-25 08:51:13 +02:00
parent abf54ad342
commit 65ea47eb4e
38 changed files with 204 additions and 204 deletions

View File

@@ -97,7 +97,7 @@
<ProjectReference Include="..\..\lib\EAPBase\build\EAPBase.vcxproj">
<Project>{ad6816a0-9600-4e01-8c49-39d03d1e791f}</Project>
</ProjectReference>
<ProjectReference Include="..\..\lib\EAPMsg\build\EAPMsg.vcxproj">
<ProjectReference Include="..\..\lib\EapHost\build\EapHost.vcxproj">
<Project>{b385ec2b-c3f4-48bb-9bac-8b996de7f754}</Project>
</ProjectReference>
<ProjectReference Include="..\..\lib\Events\build\Events.vcxproj">

View File

@@ -100,10 +100,10 @@
<ProjectReference Include="..\..\lib\EAPBase_UI\build\EAPBase_UI.vcxproj">
<Project>{d4b54856-be1f-4937-a8f7-495125be76be}</Project>
</ProjectReference>
<ProjectReference Include="..\..\lib\EAPMsg\build\EAPMsg.vcxproj">
<ProjectReference Include="..\..\lib\EapHost\build\EapHost.vcxproj">
<Project>{b385ec2b-c3f4-48bb-9bac-8b996de7f754}</Project>
</ProjectReference>
<ProjectReference Include="..\..\lib\EAPMsg_UI\build\EAPMsg_UI.vcxproj">
<ProjectReference Include="..\..\lib\EapHost_UI\build\EapHost_UI.vcxproj">
<Project>{13d2d8b5-f6aa-459d-b5f7-29b95dd9d583}</Project>
</ProjectReference>
<ProjectReference Include="..\..\lib\Events\build\Events.vcxproj">

View File

@@ -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 ""

View File

@@ -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

View File

@@ -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

View File

@@ -20,7 +20,7 @@
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{B385EC2B-C3F4-48BB-9BAC-8B996DE7F754}</ProjectGuid>
<RootNamespace>EAPMsg</RootNamespace>
<RootNamespace>EapHost</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@@ -52,25 +52,25 @@
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\include\Win32.props" />
<Import Project="..\..\..\include\Debug.props" />
<Import Project="EAPMsg.props" />
<Import Project="EapHost.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\include\x64.props" />
<Import Project="..\..\..\include\Debug.props" />
<Import Project="EAPMsg.props" />
<Import Project="EapHost.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\include\Win32.props" />
<Import Project="..\..\..\include\Release.props" />
<Import Project="EAPMsg.props" />
<Import Project="EapHost.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\include\x64.props" />
<Import Project="..\..\..\include\Release.props" />
<Import Project="EAPMsg.props" />
<Import Project="EapHost.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup />

View File

@@ -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

View File

@@ -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

View File

@@ -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
/// @{

View File

@@ -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);
}

View File

@@ -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<const config_method_eapmsg*>(&cfg);
auto cfg_eaphost = dynamic_cast<const config_method_eaphost*>(&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,

View File

@@ -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);

View File

@@ -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<config_method_eapmsg&>(m_cfg);
auto &cred = dynamic_cast<credentials_eapmsg &>(m_cred);
auto &cfg = dynamic_cast<config_method_eaphost&>(m_cfg);
auto &cred = dynamic_cast<credentials_eaphost &>(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<config_method_eapmsg&>(m_cfg).m_cfg_blob.assign(result.pConnectionData, result.pConnectionData + result.dwSizeofConnectionData);
dynamic_cast<config_method_eaphost&>(m_cfg).m_cfg_blob.assign(result.pConnectionData, result.pConnectionData + result.dwSizeofConnectionData);
if (result.fSaveUserData)
dynamic_cast<credentials_eapmsg &>(m_cred).m_cred_blob.assign(result.pUserData, result.pUserData + result.dwSizeofUserData);
dynamic_cast<credentials_eaphost &>(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)
{

View File

@@ -20,7 +20,7 @@
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{13D2D8B5-F6AA-459D-B5F7-29B95DD9D583}</ProjectGuid>
<RootNamespace>EAPMsg_UI</RootNamespace>
<RootNamespace>EapHost_UI</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@@ -52,25 +52,25 @@
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\include\Win32.props" />
<Import Project="..\..\..\include\Debug.props" />
<Import Project="EAPMsg_UI.props" />
<Import Project="EapHost_UI.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\include\x64.props" />
<Import Project="..\..\..\include\Debug.props" />
<Import Project="EAPMsg_UI.props" />
<Import Project="EapHost_UI.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\include\Win32.props" />
<Import Project="..\..\..\include\Release.props" />
<Import Project="EAPMsg_UI.props" />
<Import Project="EapHost_UI.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\include\x64.props" />
<Import Project="..\..\..\include\Release.props" />
<Import Project="EAPMsg_UI.props" />
<Import Project="EapHost_UI.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
@@ -79,13 +79,13 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<ItemGroup>
<ClInclude Include="..\include\EAPMsg_UI.h" />
<ClInclude Include="..\res\wxEAPMsg_UI.h" />
<ClInclude Include="..\include\EapHost_UI.h" />
<ClInclude Include="..\res\wxEapHost_UI.h" />
<ClInclude Include="..\src\StdAfx.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\res\wxEAPMsg_UI.cpp" />
<ClCompile Include="..\src\EAPMsg_UI.cpp" />
<ClCompile Include="..\res\wxEapHost_UI.cpp" />
<ClCompile Include="..\src\EapHost_UI.cpp" />
<ClCompile Include="..\src\StdAfx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
@@ -99,7 +99,7 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="..\res\wxEAPMsg_UI.fbp" />
<None Include="..\res\wxEapHost_UI.fbp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

View File

@@ -18,10 +18,10 @@
<ClInclude Include="..\src\StdAfx.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\EAPMsg_UI.h">
<ClInclude Include="..\include\EapHost_UI.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\res\wxEAPMsg_UI.h">
<ClInclude Include="..\res\wxEapHost_UI.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
@@ -29,15 +29,15 @@
<ClCompile Include="..\src\StdAfx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\EAPMsg_UI.cpp">
<ClCompile Include="..\src\EapHost_UI.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\res\wxEAPMsg_UI.cpp">
<ClCompile Include="..\res\wxEapHost_UI.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\res\wxEAPMsg_UI.fbp">
<None Include="..\res\wxEapHost_UI.fbp">
<Filter>Resource Files</Filter>
</None>
</ItemGroup>

View File

@@ -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<eap::credentials_pass, wxPasswordCredentialsPanel<eap::credentials_pass, wxPasswordCredentialsPanelBase> > wxEAPMsgCredentialsConfigPanel;
typedef wxEAPCredentialsConfigPanel<eap::credentials_pass, wxPasswordCredentialsPanel<eap::credentials_pass, wxPasswordCredentialsPanelBase> > 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 <wx/panel.h>
#include <wx/stattext.h>
@@ -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
};

View File

@@ -7,11 +7,11 @@
#include <StdAfx.h>
#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 );
}

View File

@@ -11,11 +11,11 @@
<property name="embedded_files_path">.</property>
<property name="encoding">UTF-8</property>
<property name="event_generation">connect</property>
<property name="file">wxEAPMsg_UI</property>
<property name="file">wxEapHost_UI</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="internationalize">1</property>
<property name="name">wxEAPMsg_UI</property>
<property name="name">wxEapHost_UI</property>
<property name="namespace"></property>
<property name="path">.</property>
<property name="precompiled_header">#include &lt;StdAfx.h&gt;</property>
@@ -40,7 +40,7 @@
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">wxEAPMsgMethodConfigPanelBase</property>
<property name="name">wxEapHostMethodConfigPanelBase</property>
<property name="pos"></property>
<property name="size">500,-1</property>
<property name="subclass"></property>

View File

@@ -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 <wx/artprov.h>
#include <wx/xrc/xmlres.h>
@@ -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__

View File

@@ -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)

View File

@@ -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 <WinStd/EAP.h>

Binary file not shown.

View File

@@ -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.");
}

View File

@@ -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<config_method_ttls &>(m_cfg ).m_inner.get();
auto cred_inner = dynamic_cast<credentials_ttls &>(m_cred).m_inner.get();
auto cfg_inner_eapmsg = dynamic_cast<config_method_eapmsg*>(cfg_inner);
if (!cfg_inner_eapmsg) {
auto cfg_inner = dynamic_cast<config_method_ttls &>(m_cfg ).m_inner.get();
auto cred_inner = dynamic_cast<credentials_ttls &>(m_cred).m_inner.get();
auto cfg_inner_eaphost = dynamic_cast<config_method_eaphost*>(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<config_method_pap &>(*cfg_inner), dynamic_cast<credentials_pass&>(*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<credentials_eapmsg&>(*cred_inner)));
m_inner.reset(new method_eaphost(m_module, *cfg_inner_eaphost, dynamic_cast<credentials_eaphost&>(*cred_inner)));
}
m_inner->begin_session(dwFlags, pAttributeArray, hTokenImpersonateUser, MAXDWORD);
}

View File

@@ -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();
}

View File

@@ -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"

View File

@@ -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
};

View File

@@ -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<config_method_eapmsg*>(cfg_method->m_inner.get());
if (!cfg_inner_eapmsg) {
auto cfg_inner_eaphost = dynamic_cast<config_method_eaphost*>(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<eap::credentials_eapmsg*>(cred->m_inner.get());
auto cred_inner = dynamic_cast<eap::credentials_eaphost*>(cred->m_inner.get());
DWORD cred_data_size = 0;
winstd::eap_blob cred_data;
unique_ptr<WCHAR[], EapHostPeerFreeRuntimeMemory_delete> 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,

View File

@@ -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 <wxex/common.h>

View File

@@ -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<eap::config_method_ttls&>(m_cfg);
auto cfg_inner_eapmsg = dynamic_cast<eap::config_method_eapmsg*>(cfg_ttls.m_inner.get());
if (!cfg_inner_eapmsg) {
auto cfg_inner_eaphost = dynamic_cast<eap::config_method_eaphost*>(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: