diff options
author | Clavister OpenSource <opensource@clavister.com> | 2011-11-24 11:21:43 +0100 |
---|---|---|
committer | Clavister OpenSource <opensource@clavister.com> | 2012-03-20 17:30:51 +0100 |
commit | e3bb68841a3a441d6770ec76ae14176b71f70495 (patch) | |
tree | d411ac2655aef510959d93835abe002ce3c0f734 /src | |
parent | adf7b76f4c7e01963ab0fac1f7e2456d501a55fc (diff) | |
download | strongswan-e3bb68841a3a441d6770ec76ae14176b71f70495.tar.bz2 strongswan-e3bb68841a3a441d6770ec76ae14176b71f70495.tar.xz |
IKEv1 XAuth: Added temporary "initiate_xauth" public method to ike_sa_t. This allows us to initiate an XAuth password authentication exchange after responding to the final message of Main Mode. This change should be reverted once we have a better method to initiate this exchange.
Diffstat (limited to 'src')
-rw-r--r-- | src/libcharon/sa/ike_sa.c | 13 | ||||
-rw-r--r-- | src/libcharon/sa/ike_sa.h | 5 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/libcharon/sa/ike_sa.c b/src/libcharon/sa/ike_sa.c index 6be8471f2..088fd0ab5 100644 --- a/src/libcharon/sa/ike_sa.c +++ b/src/libcharon/sa/ike_sa.c @@ -2129,6 +2129,18 @@ METHOD(ike_sa_t, destroy, void, free(this); } +METHOD(ike_sa_t, initiate_xauth, void, + private_ike_sa_t *this) +{ + if(this->extensions & EXT_XAUTH) + { + xauth_request_t *xauth_request_task = xauth_request_create(&this->public, TRUE); + this->task_manager->queue_task(this->task_manager, (task_t*)xauth_request_task); + + this->task_manager->initiate_later(this->task_manager); + } +} + /* * Described in header. */ @@ -2218,6 +2230,7 @@ ike_sa_t * ike_sa_create(ike_sa_id_t *ike_sa_id, bool initiator, .callback = _callback, .respond = _respond, #endif /* ME */ + .initiate_xauth = _initiate_xauth, }, .ike_sa_id = ike_sa_id->clone(ike_sa_id), .version = version, diff --git a/src/libcharon/sa/ike_sa.h b/src/libcharon/sa/ike_sa.h index 2753fca1c..f21585525 100644 --- a/src/libcharon/sa/ike_sa.h +++ b/src/libcharon/sa/ike_sa.h @@ -958,6 +958,11 @@ struct ike_sa_t { * Destroys a ike_sa_t object. */ void (*destroy) (ike_sa_t *this); + + /** + * Initiate an XAuth transaction + */ + void (*initiate_xauth) (ike_sa_t *this); }; /** |