EAPMsg >> EapHost
This commit is contained in:
@@ -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.");
|
||||
}
|
||||
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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();
|
||||
}
|
||||
|
||||
|
@@ -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"
|
||||
|
||||
|
Reference in New Issue
Block a user