mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-04 00:00:14 -04:00
auth-cfg: Improve log message for identity constraint mismatch error
Closes strongswan/strongswan#2088
This commit is contained in:
parent
0d61efdf02
commit
e6176bf19c
@ -956,13 +956,34 @@ METHOD(auth_cfg_t, complies, bool,
|
|||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (log_error)
|
||||||
|
{
|
||||||
|
DBG1(DBG_CFG, "constraint check failed: certificate"
|
||||||
|
" does not confirm identity '%Y' (%N)",
|
||||||
|
id1, id_type_names, id1->get_type(id1));
|
||||||
|
}
|
||||||
|
success = FALSE;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
success = FALSE;
|
success = FALSE;
|
||||||
if (log_error)
|
if (!log_error)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (id2)
|
||||||
{
|
{
|
||||||
DBG1(DBG_CFG, "constraint check failed: %sidentity '%Y'"
|
DBG1(DBG_CFG, "constraint check failed: %sidentity '%Y'"
|
||||||
" required ", t1 == AUTH_RULE_IDENTITY ? "" :
|
" (%N) required, not matched by '%Y' (%N)",
|
||||||
"EAP ", id1);
|
t1 == AUTH_RULE_IDENTITY ? "" : "EAP ",
|
||||||
|
id1, id_type_names, id1->get_type(id1),
|
||||||
|
id2, id_type_names, id2->get_type(id2));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DBG1(DBG_CFG, "constraint check failed: %sidentity '%Y'"
|
||||||
|
" (%N) required",
|
||||||
|
t1 == AUTH_RULE_IDENTITY ? "" : "EAP ",
|
||||||
|
id1, id_type_names, id1->get_type(id1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user