credentials: Move user impersonation to peer::get_identity()
To retrieve user credentials, EapHost provides us the interactive user's token we can use to impersonate. By doing the impersonation early in peer::get_identity(), we don't need to pass the token down the lower methods. This is rather a simplification than a performance optimization. Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
@@ -174,7 +174,6 @@ void eap::peer_ttls_ui::invoke_identity_ui(
|
||||
wstring target_name(std::move(cfg_prov->get_id()));
|
||||
eap::credentials::source_t src_outer = cred->credentials_tls::combine(
|
||||
dwFlags,
|
||||
NULL,
|
||||
#if EAP_USE_NATIVE_CREDENTIAL_CACHE
|
||||
has_cached ? cred_in.m_cred.get() : NULL,
|
||||
#else
|
||||
@@ -222,7 +221,6 @@ void eap::peer_ttls_ui::invoke_identity_ui(
|
||||
// Combine inner credentials.
|
||||
eap::credentials::source_t src_inner = cred->m_inner->combine(
|
||||
dwFlags,
|
||||
NULL,
|
||||
#if EAP_USE_NATIVE_CREDENTIAL_CACHE
|
||||
has_cached ? dynamic_cast<credentials_tls_tunnel*>(cred_in.m_cred.get())->m_inner.get() : NULL,
|
||||
#else
|
||||
|
Reference in New Issue
Block a user