EAPMsg >> EapHost
This commit is contained in:
@@ -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,
|
||||
|
@@ -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>
|
||||
|
||||
|
@@ -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:
|
||||
|
Reference in New Issue
Block a user