EAP-GTC implementation started

This commit is contained in:
2017-01-30 13:42:51 +01:00
parent 5fada1b6a9
commit bd73ea7914
34 changed files with 1791 additions and 28 deletions

View File

@@ -268,6 +268,7 @@ eap::config_method* eap::config_method_ttls::make_config_method(_In_ winstd::eap
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);
case eap_type_mschapv2 : return new config_method_eapmschapv2(m_module, m_level + 1);
case eap_type_gtc : return new config_method_eapgtc (m_module, m_level + 1);
#ifdef EAP_INNER_EAPHOST
default : return new config_method_eaphost (m_module, m_level + 1); // EapHost peer method handles all other method types
#endif
@@ -281,6 +282,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"EAP-MSCHAPv2") == 0) return new config_method_eapmschapv2(m_module, m_level + 1);
else if (_wcsicmp(eap_type, L"EAP-GTC" ) == 0) return new config_method_eapgtc (m_module, m_level + 1);
#ifdef EAP_INNER_EAPHOST
else if (_wcsicmp(eap_type, L"EapHost" ) == 0) return new config_method_eaphost (m_module, m_level + 1);
#endif

View File

@@ -252,6 +252,10 @@ EAP_SESSION_HANDLE eap::peer_ttls::begin_session(
new method_eapmsg (*this, cred_inner->get_identity().c_str(),
new method_eap (*this, eap_type_mschapv2,
new method_mschapv2(*this, dynamic_cast<config_method_mschapv2&>(*cfg_inner), dynamic_cast<credentials_pass&>(*cred_inner))))); break;
case eap_type_gtc : meth_inner.reset(
new method_eapmsg (*this, cred_inner->get_identity().c_str(),
new method_eap (*this, eap_type_gtc,
new method_gtc (*this, dynamic_cast<config_method_eapgtc&>(*cfg_inner))))); break;
default: throw invalid_argument(__FUNCTION__ " Unsupported inner authentication method.");
}
}

View File

@@ -32,6 +32,9 @@
#include "../../MSCHAPv2/include/Method.h"
#include "../../MSCHAPv2/include/MSCHAPv2.h"
#include "../../GTC/include/Config.h"
#include "../../GTC/include/Method.h"
#include "../../EapHost/include/Config.h"
#include "../../EapHost/include/Method.h"