TTLS config and credentials are now expected to always have inner config and credentials object present; it can be blank, but it must not be nullptr

This commit is contained in:
2016-08-28 17:43:06 +02:00
parent fc5e54db05
commit 6c66862eed
3 changed files with 25 additions and 40 deletions

View File

@@ -105,11 +105,15 @@ void eap::peer_ttls_ui::invoke_config_ui(
// This is a blank network profile. Create default configuraton.
// Start with PAP inner configuration.
config_method_pap *cfg_method_inner = new config_method_pap(*this);
cfg_method_inner->m_use_preshared = false;
cfg_method_inner->m_preshared(new credentials_pap(*this));
unique_ptr<config_method_ttls> cfg_method(new config_method_ttls(*this));
cfg_method->m_inner.reset(new config_method_pap(*this));
cfg_method->m_anonymous_identity = L"@";
cfg_method->m_use_preshared = true;
cfg_method->m_preshared.reset(new credentials_tls(*this));
cfg_method->m_inner.reset(cfg_method_inner);
// Start with one method.
config_provider cfg_provider(*this);