MSCHAPv2 stub added - it's a PAP clone, so selecting it does PAP really
This commit is contained in:
@@ -265,19 +265,21 @@ eap::credentials* eap::config_method_ttls::make_credentials() const
|
||||
eap::config_method_with_cred* eap::config_method_ttls::make_config_method(_In_ winstd::eap_type_t eap_type) const
|
||||
{
|
||||
switch (eap_type) {
|
||||
case eap_type_tls : return new config_method_tls (m_module);
|
||||
case eap_type_ttls: return new config_method_ttls(m_module);
|
||||
case eap_type_pap : return new config_method_pap (m_module);
|
||||
default : throw invalid_argument(__FUNCTION__ " Unsupported inner authentication method.");
|
||||
case eap_type_tls : return new config_method_tls (m_module);
|
||||
case eap_type_ttls : return new config_method_ttls (m_module);
|
||||
case eap_type_legacy_pap : return new config_method_pap (m_module);
|
||||
case eap_type_legacy_mschapv2: return new config_method_mschapv2(m_module);
|
||||
default : throw invalid_argument(__FUNCTION__ " Unsupported inner authentication method.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
eap::config_method_with_cred* eap::config_method_ttls::make_config_method(_In_ const wchar_t *eap_type) const
|
||||
{
|
||||
if (_wcsicmp(eap_type, L"EAP-TLS" ) == 0) return new config_method_tls (m_module);
|
||||
else if (_wcsicmp(eap_type, L"EAP-TTLS") == 0) return new config_method_ttls(m_module);
|
||||
else if (_wcsicmp(eap_type, L"PAP" ) == 0) return new config_method_pap (m_module);
|
||||
if (_wcsicmp(eap_type, L"EAP-TLS" ) == 0) return new config_method_tls (m_module);
|
||||
else if (_wcsicmp(eap_type, L"EAP-TTLS") == 0) return new config_method_ttls (m_module);
|
||||
else if (_wcsicmp(eap_type, L"PAP" ) == 0) return new config_method_pap (m_module);
|
||||
else if (_wcsicmp(eap_type, L"MSCHAPv2") == 0) return new config_method_mschapv2(m_module);
|
||||
else throw invalid_argument(__FUNCTION__ " Unsupported inner authentication method.");
|
||||
}
|
||||
|
||||
|
@@ -75,8 +75,9 @@ void eap::method_ttls::begin_session(
|
||||
|
||||
// Initialize inner method.
|
||||
switch (m_cfg.m_inner->get_method_id()) {
|
||||
case eap_type_pap: m_inner.reset(new method_pap(m_module, (config_method_pap&)*m_cfg.m_inner, (credentials_pap&)*m_cred.m_inner.get()));
|
||||
default: invalid_argument(__FUNCTION__ " Unsupported inner authentication method.");
|
||||
case eap_type_legacy_pap : m_inner.reset(new method_pap (m_module, (config_method_pap &)*m_cfg.m_inner, (credentials_pap &)*m_cred.m_inner.get())); break;
|
||||
case eap_type_legacy_mschapv2: m_inner.reset(new method_mschapv2(m_module, (config_method_mschapv2&)*m_cfg.m_inner, (credentials_mschapv2&)*m_cred.m_inner.get())); break;
|
||||
default: throw invalid_argument(__FUNCTION__ " Unsupported inner authentication method.");
|
||||
}
|
||||
m_inner->begin_session(dwFlags, pAttributeArray, hTokenImpersonateUser, m_size_inner_packet_max = dwMaxSendPacketSize); // TODO: Maximum inner packet size should have subtracted TLS overhead
|
||||
m_inner_packet_id = 0;
|
||||
|
@@ -30,6 +30,10 @@
|
||||
#include "../../PAP/include/Credentials.h"
|
||||
#include "../../PAP/include/Method.h"
|
||||
|
||||
#include "../../MSCHAPv2/include/Config.h"
|
||||
#include "../../MSCHAPv2/include/Credentials.h"
|
||||
#include "../../MSCHAPv2/include/Method.h"
|
||||
|
||||
#include "../../EAPBase/include/EAPXML.h"
|
||||
|
||||
#include <WinStd/EAP.h>
|
||||
|
Reference in New Issue
Block a user