Inner EAP method support progress continues...
This commit is contained in:
parent
2bc6d97ab0
commit
dab9e69dd3
@ -66,11 +66,18 @@ void eap::method_ttls::begin_session(
|
||||
// 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) {
|
||||
// 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;
|
||||
case eap_type_legacy_mschapv2: m_inner.reset(new method_mschapv2(m_module, dynamic_cast<config_method_mschapv2&>(*cfg_inner), dynamic_cast<credentials_pass&>(*cred_inner))); break;
|
||||
default: throw invalid_argument(__FUNCTION__ " Unsupported inner authentication method.");
|
||||
}
|
||||
} else {
|
||||
// EapHost inner method
|
||||
m_inner.reset(new method_eapmsg(m_module, *cfg_inner_eapmsg, dynamic_cast<credentials_eapmsg&>(*cred_inner)));
|
||||
}
|
||||
m_inner->begin_session(dwFlags, pAttributeArray, hTokenImpersonateUser, MAXDWORD);
|
||||
}
|
||||
|
||||
|
@ -33,6 +33,9 @@
|
||||
#include "../../MSCHAPv2/include/Method.h"
|
||||
#include "../../MSCHAPv2/include/MSCHAPv2.h"
|
||||
|
||||
#include "../../EAPMsg/include/Config.h"
|
||||
#include "../../EAPMsg/include/Method.h"
|
||||
|
||||
#include "../../EAPBase/include/EAPXML.h"
|
||||
|
||||
#include <WinStd/EAP.h>
|
||||
|
@ -238,15 +238,15 @@ bool wxTTLSConfigWindow::TransferDataToWindow()
|
||||
|
||||
auto *cfg_inner_eapmsg = dynamic_cast<eap::config_method_eapmsg*>(cfg_ttls.m_inner.get());
|
||||
if (!cfg_inner_eapmsg) {
|
||||
// Legacy inner methods
|
||||
// Native inner methods
|
||||
switch (cfg_ttls.m_inner->get_method_id()) {
|
||||
case winstd::eap_type_legacy_pap:
|
||||
m_cfg_pap = *(eap::config_method_pap*)cfg_ttls.m_inner.get();
|
||||
m_cfg_pap = dynamic_cast<eap::config_method_pap&>(*cfg_ttls.m_inner);
|
||||
m_inner_type->SetSelection(0); // 0=PAP
|
||||
break;
|
||||
|
||||
case winstd::eap_type_legacy_mschapv2:
|
||||
m_cfg_mschapv2 = *(eap::config_method_mschapv2*)cfg_ttls.m_inner.get();
|
||||
m_cfg_mschapv2 = dynamic_cast<eap::config_method_mschapv2&>(*cfg_ttls.m_inner);
|
||||
m_inner_type->SetSelection(1); // 1=MSCHAPv2
|
||||
break;
|
||||
|
||||
@ -254,7 +254,7 @@ bool wxTTLSConfigWindow::TransferDataToWindow()
|
||||
wxFAIL_MSG(wxT("Unsupported inner authentication method type."));
|
||||
}
|
||||
} else {
|
||||
// EAP inner method
|
||||
// EapHost inner method
|
||||
m_cfg_eapmsg = *cfg_inner_eapmsg;
|
||||
m_inner_type->SetSelection(2); // 2=EAP
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user