From 2da3ff7a5235cd86146a02e0a57f63a1a2b8e3e8 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Tue, 3 Jan 2012 11:27:41 +0100 Subject: [PATCH] Set a condition flag if peer has been authenticated using XAuth --- src/libcharon/sa/ike_sa.h | 5 +++++ src/libcharon/sa/ikev1/tasks/xauth.c | 1 + 2 files changed, 6 insertions(+) diff --git a/src/libcharon/sa/ike_sa.h b/src/libcharon/sa/ike_sa.h index c5bf60b5d..b7c96fdfb 100644 --- a/src/libcharon/sa/ike_sa.h +++ b/src/libcharon/sa/ike_sa.h @@ -159,6 +159,11 @@ enum ike_condition_t { * Initial contact received */ COND_INIT_CONTACT_SEEN = (1<<8), + + /** + * Peer has been authenticated using XAuth + */ + COND_XAUTH_AUTHENTICATED = (1<<9), }; /** diff --git a/src/libcharon/sa/ikev1/tasks/xauth.c b/src/libcharon/sa/ikev1/tasks/xauth.c index 20d6d8a17..7e7e84a8e 100755 --- a/src/libcharon/sa/ikev1/tasks/xauth.c +++ b/src/libcharon/sa/ikev1/tasks/xauth.c @@ -310,6 +310,7 @@ METHOD(task_t, process_i_status, status_t, return FAILED; } establish(this); + this->ike_sa->set_condition(this->ike_sa, COND_XAUTH_AUTHENTICATED, TRUE); return SUCCESS; }