IKEv1 XAuth: Add "initiate xauth" method, which adds the xauth task into the queue for initiation.

This commit is contained in:
Clavister OpenSource 2011-11-29 09:15:59 +01:00
parent 9eefb5f9b4
commit 65359ccbbc
2 changed files with 14 additions and 0 deletions

View File

@ -1018,6 +1018,14 @@ METHOD(ike_sa_t, initiate_mediated, status_t,
} }
#endif /* ME */ #endif /* ME */
METHOD(ike_sa_t, initiate_xauth, status_t,
private_ike_sa_t *this)
{
xauth_request_t *task = xauth_request_create(&this->public, TRUE);
this->task_manager->queue_task(this->task_manager, (task_t*)task);
return this->task_manager->initiate(this->task_manager);
}
/** /**
* Resolve DNS host in configuration * Resolve DNS host in configuration
*/ */
@ -2085,6 +2093,7 @@ ike_sa_t * ike_sa_create(ike_sa_id_t *ike_sa_id, bool initiator,
.callback = _callback, .callback = _callback,
.respond = _respond, .respond = _respond,
#endif /* ME */ #endif /* ME */
.initiate_xauth = _initiate_xauth,
}, },
.ike_sa_id = ike_sa_id->clone(ike_sa_id), .ike_sa_id = ike_sa_id->clone(ike_sa_id),
.version = version, .version = version,

View File

@ -966,6 +966,11 @@ struct ike_sa_t {
* Destroys a ike_sa_t object. * Destroys a ike_sa_t object.
*/ */
void (*destroy) (ike_sa_t *this); void (*destroy) (ike_sa_t *this);
/**
* Initiate an XAuth authentication exchange.
*/
status_t (*initiate_xauth) (ike_sa_t *this);
}; };
/** /**