aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/plugins/xauth_generic/xauth_generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcharon/plugins/xauth_generic/xauth_generic.c')
-rw-r--r--src/libcharon/plugins/xauth_generic/xauth_generic.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libcharon/plugins/xauth_generic/xauth_generic.c b/src/libcharon/plugins/xauth_generic/xauth_generic.c
index 907de4322..f0e675ac0 100644
--- a/src/libcharon/plugins/xauth_generic/xauth_generic.c
+++ b/src/libcharon/plugins/xauth_generic/xauth_generic.c
@@ -136,6 +136,10 @@ METHOD(xauth_method_t, process_server, status_t,
this->peer->destroy(this->peer);
this->peer = id;
}
+ if (pass.len && pass.ptr[pass.len - 1] == 0)
+ { /* fix null-terminated passwords (Android etc.) */
+ pass.len -= 1;
+ }
enumerator = lib->credmgr->create_shared_enumerator(lib->credmgr,
SHARED_EAP, this->server, this->peer);