diff --git a/lib/EAPBase_UI/include/EAP_UI.h b/lib/EAPBase_UI/include/EAP_UI.h index 8927d61..f2c94b8 100644 --- a/lib/EAPBase_UI/include/EAP_UI.h +++ b/lib/EAPBase_UI/include/EAP_UI.h @@ -486,11 +486,11 @@ protected: /// \endcond protected: - const eap::config_provider &m_prov; ///< Provider configuration + const eap::config_provider &m_prov; ///< Provider configuration const eap::config_method_with_cred &m_cfg; ///< Method configuration - _Tcred &m_cred; ///< Credentials - winstd::tstring m_target; ///< Credential Manager target - bool m_is_config; ///< Is this a configuration dialog? + _Tcred &m_cred; ///< Credentials + winstd::tstring m_target; ///< Credential Manager target + bool m_is_config; ///< Is this a configuration dialog? }; diff --git a/lib/TLS_UI/src/TLS_UI.cpp b/lib/TLS_UI/src/TLS_UI.cpp index 135cbd0..29c4689 100644 --- a/lib/TLS_UI/src/TLS_UI.cpp +++ b/lib/TLS_UI/src/TLS_UI.cpp @@ -365,13 +365,13 @@ bool wxTLSCredentialsPanel::TransferDataToWindow() bool wxTLSCredentialsPanel::TransferDataFromWindow() { if (m_cert_none->GetValue()) - m_cred.clear(); + m_cred.m_cert.free(); else { const wxCertificateClientData *data = dynamic_cast(m_cert_select_val->GetClientObject(m_cert_select_val->GetSelection())); if (data) m_cred.m_cert.attach_duplicated(data->m_cert); else - m_cred.clear(); + m_cred.m_cert.free(); } // Inherited TransferDataFromWindow() calls m_cred.store(). diff --git a/lib/TTLS_UI/src/TTLS_UI.cpp b/lib/TTLS_UI/src/TTLS_UI.cpp index dab6852..fabb335 100644 --- a/lib/TTLS_UI/src/TTLS_UI.cpp +++ b/lib/TTLS_UI/src/TTLS_UI.cpp @@ -227,8 +227,9 @@ wxTTLSCredentialsPanel::wxTTLSCredentialsPanel(const eap::config_provider &prov, assert(m_cfg.m_inner); const eap::config_method_pap *cfg_inner_pap = dynamic_cast(m_cfg.m_inner.get()); if (cfg_inner_pap) { - if (!((eap::credentials_ttls&)cred).m_inner) ((eap::credentials_ttls&)cred).m_inner.reset(new eap::credentials_pap(cred.m_module)); - m_inner_cred = new wxPAPCredentialsPanel(m_prov, *cfg_inner_pap, *(eap::credentials_pap*)((eap::credentials_ttls&)cred).m_inner.get(), pszCredTarget, this, is_config); + eap::credentials_ttls &cred_ttls = (eap::credentials_ttls&)cred; + if (!cred_ttls.m_inner) cred_ttls.m_inner.reset(new eap::credentials_pap(cred.m_module)); + m_inner_cred = new wxPAPCredentialsPanel(m_prov, *cfg_inner_pap, *(eap::credentials_pap*)cred_ttls.m_inner.get(), pszCredTarget, this, is_config); sb_content->Add(m_inner_cred, 0, wxALL|wxEXPAND, 5); } else assert(0); // Unsupported inner authentication method type.