config_method_ttls: Split to make reusable

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
2020-01-14 15:30:14 +01:00
parent a943a14d0f
commit 248e15641a
10 changed files with 195 additions and 88 deletions

View File

@@ -127,7 +127,7 @@ void eap::peer_ttls::get_identity(
}
// Build our identity. ;)
wstring identity(std::move(cfg_method->get_public_identity(*dynamic_cast<const credentials_tls_tunnel*>(cred_out.m_cred.get()))));
wstring identity(std::move(cfg_method->get_public_identity(*cred_out.m_cred.get())));
log_event(&EAPMETHOD_TRACE_EVT_CRED_OUTER_ID1, event_data((unsigned int)eap_type_t::ttls), event_data(identity), event_data::blank);
size_t size = sizeof(WCHAR)*(identity.length() + 1);
*ppwszIdentity = (WCHAR*)alloc_memory(size);