Changing TLS configuration resets TLS session resumption

This commit is contained in:
Simon Rozman 2016-08-13 08:31:03 +02:00
parent 6408dbe237
commit 537d0c0cbc
2 changed files with 25 additions and 1 deletions

View File

@ -331,9 +331,12 @@ public:
protected: protected:
/// \cond internal /// \cond internal
virtual void OnInitDialog(wxInitDialogEvent& event); virtual void OnInitDialog(wxInitDialogEvent& event);
virtual bool TransferDataFromWindow();
/// \endcond /// \endcond
protected: protected:
const eap::config_provider &m_prov; ///< EAP provider
eap::config_method_tls &m_cfg; ///< TLS configuration
wxTLSServerTrustPanel *m_server_trust; ///< Server trust configuration panel wxTLSServerTrustPanel *m_server_trust; ///< Server trust configuration panel
wxTLSCredentialsConfigPanel *m_credentials; ///< Credentials configuration panel wxTLSCredentialsConfigPanel *m_credentials; ///< Credentials configuration panel
}; };

View File

@ -566,7 +566,10 @@ bool wxTLSServerTrustPanel::AddRootCA(PCCERT_CONTEXT cert)
// wxTLSConfigPanel // wxTLSConfigPanel
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
wxTLSConfigPanel::wxTLSConfigPanel(const eap::config_provider &prov, eap::config_method_tls &cfg, LPCTSTR pszCredTarget, wxWindow* parent) : wxPanel(parent) wxTLSConfigPanel::wxTLSConfigPanel(const eap::config_provider &prov, eap::config_method_tls &cfg, LPCTSTR pszCredTarget, wxWindow* parent) :
m_prov(prov),
m_cfg(cfg),
wxPanel(parent)
{ {
wxBoxSizer* sb_content; wxBoxSizer* sb_content;
sb_content = new wxBoxSizer( wxVERTICAL ); sb_content = new wxBoxSizer( wxVERTICAL );
@ -599,3 +602,21 @@ void wxTLSConfigPanel::OnInitDialog(wxInitDialogEvent& event)
if (m_credentials) if (m_credentials)
m_credentials->GetEventHandler()->ProcessEvent(event); m_credentials->GetEventHandler()->ProcessEvent(event);
} }
bool wxTLSConfigPanel::TransferDataFromWindow()
{
wxCHECK(wxPanel::TransferDataFromWindow(), false);
if (!m_prov.m_read_only) {
// This is not a provider-locked configuration. The data will get saved.
// Reset session ID and master secret to force clean connect next time.
m_cfg.m_session_id.clear();
m_cfg.m_master_secret.clear();
}
return true;
}