aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2011-12-15 13:13:30 +0100
committerMartin Willi <martin@revosec.ch>2012-03-20 17:31:23 +0100
commit5f6a37eb9b439751f7e0825a740cc32e500061f2 (patch)
tree79cdd7d927c4bdf0deea488e5c1afa4e47383155 /src
parent21a4fc832ea64a6abb194a14ee64ff42ca214a44 (diff)
downloadstrongswan-5f6a37eb9b439751f7e0825a740cc32e500061f2.tar.bz2
strongswan-5f6a37eb9b439751f7e0825a740cc32e500061f2.tar.xz
Be a little more verbose about XAuth configs in ipsec statusall
Diffstat (limited to 'src')
-rw-r--r--src/libcharon/plugins/stroke/stroke_list.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/libcharon/plugins/stroke/stroke_list.c b/src/libcharon/plugins/stroke/stroke_list.c
index 2246e748d..d2fda1b3c 100644
--- a/src/libcharon/plugins/stroke/stroke_list.c
+++ b/src/libcharon/plugins/stroke/stroke_list.c
@@ -319,11 +319,7 @@ static void log_auth_cfgs(FILE *out, peer_cfg_t *peer_cfg, bool local)
auth->get(auth, AUTH_RULE_IDENTITY));
auth_class = (uintptr_t)auth->get(auth, AUTH_RULE_AUTH_CLASS);
- if (auth_class != AUTH_CLASS_EAP)
- {
- fprintf(out, "%N authentication\n", auth_class_names, auth_class);
- }
- else
+ if (auth_class == AUTH_CLASS_EAP)
{
if ((uintptr_t)auth->get(auth, AUTH_RULE_EAP_TYPE) == EAP_NAK)
{
@@ -350,6 +346,21 @@ static void log_auth_cfgs(FILE *out, peer_cfg_t *peer_cfg, bool local)
}
fprintf(out, "\n");
}
+ else if (auth_class == AUTH_CLASS_XAUTH)
+ {
+ fprintf(out, "%N authentication: %s", auth_class_names, auth_class,
+ auth->get(auth, AUTH_RULE_XAUTH_BACKEND) ?: "any");
+ id = auth->get(auth, AUTH_RULE_XAUTH_IDENTITY);
+ if (id)
+ {
+ fprintf(out, " with XAuth identity '%Y'", id);
+ }
+ fprintf(out, "\n");
+ }
+ else
+ {
+ fprintf(out, "%N authentication\n", auth_class_names, auth_class);
+ }
cert = auth->get(auth, AUTH_RULE_CA_CERT);
if (cert)