Outer and inner TTLS credentials are combined separately now to provide finer feedback for more accurate logging (again)
This commit is contained in:
parent
ceece01b99
commit
aa7c5bebda
@ -103,22 +103,40 @@ void eap::peer_ttls::get_identity(
|
|||||||
*pfInvokeUI = FALSE;
|
*pfInvokeUI = FALSE;
|
||||||
|
|
||||||
{
|
{
|
||||||
// Combine credentials.
|
// Combine credentials. We could use eap::credentials_ttls() to do all the work, but we would not know which credentials is missing then.
|
||||||
user_impersonator impersonating(hTokenImpersonateUser);
|
user_impersonator impersonating(hTokenImpersonateUser);
|
||||||
eap::credentials::source_t cred_source = cred_out.combine(
|
|
||||||
|
// Combine outer credentials.
|
||||||
|
LPCTSTR target_name = (dwFlags & EAP_FLAG_GUEST_ACCESS) == 0 ? cfg_prov.m_id.c_str() : NULL;
|
||||||
|
eap::credentials::source_t src_outer = cred_out.credentials_tls::combine(
|
||||||
#ifdef EAP_USE_NATIVE_CREDENTIAL_CACHE
|
#ifdef EAP_USE_NATIVE_CREDENTIAL_CACHE
|
||||||
&cred_in,
|
&cred_in,
|
||||||
#else
|
#else
|
||||||
NULL,
|
NULL,
|
||||||
#endif
|
#endif
|
||||||
*cfg_method,
|
*cfg_method,
|
||||||
(dwFlags & EAP_FLAG_GUEST_ACCESS) == 0 ? cfg_prov.m_id.c_str() : NULL);
|
target_name);
|
||||||
|
if (src_outer == eap::credentials::source_unknown) {
|
||||||
// If either of credentials is unknown, request UI.
|
log_event(&EAPMETHOD_TRACE_EVT_CRED_INVOKE_UI1, event_data((unsigned int)eap_type_tls), event_data::blank);
|
||||||
if (cred_source == eap::credentials::source_unknown)
|
|
||||||
*pfInvokeUI = TRUE;
|
*pfInvokeUI = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Combine inner credentials.
|
||||||
|
eap::credentials::source_t src_inner = cred_out.m_inner->combine(
|
||||||
|
#ifdef EAP_USE_NATIVE_CREDENTIAL_CACHE
|
||||||
|
cred_in.m_inner.get(),
|
||||||
|
#else
|
||||||
|
NULL,
|
||||||
|
#endif
|
||||||
|
*cfg_method->m_inner,
|
||||||
|
target_name);
|
||||||
|
if (src_inner == eap::credentials::source_unknown) {
|
||||||
|
log_event(&EAPMETHOD_TRACE_EVT_CRED_INVOKE_UI1, event_data((unsigned int)cfg_method->m_inner->get_method_id()), event_data::blank);
|
||||||
|
*pfInvokeUI = TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If either of credentials is unknown, request UI.
|
||||||
if (*pfInvokeUI) {
|
if (*pfInvokeUI) {
|
||||||
if ((dwFlags & EAP_FLAG_MACHINE_AUTH) == 0) {
|
if ((dwFlags & EAP_FLAG_MACHINE_AUTH) == 0) {
|
||||||
// Per-user authentication
|
// Per-user authentication
|
||||||
|
Loading…
x
Reference in New Issue
Block a user