Revert "IKEv1 XAuth: Temporarilty add an "initiate_later" flag to the task manager...
authorClavister OpenSource <opensource@clavister.com>
Fri, 25 Nov 2011 07:41:41 +0000 (08:41 +0100)
committerClavister OpenSource <opensource@clavister.com>
Tue, 20 Mar 2012 16:31:07 +0000 (17:31 +0100)
This reverts commit c6c28f4ac522dd8afb457847bca79eee77f78706.

Revert "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."

This reverts commit 5529dc50477e25df9dd5f3c442bb1521c0baf225.

src/libcharon/sa/ike_sa.c
src/libcharon/sa/ike_sa.h
src/libcharon/sa/task_manager.h
src/libcharon/sa/task_manager_v1.c

index 7bccfbb..841fde3 100644 (file)
@@ -2132,18 +2132,6 @@ 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.
  */
@@ -2233,7 +2221,6 @@ 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,
index f215855..2753fca 100644 (file)
@@ -958,11 +958,6 @@ 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);
 };
 
 /**
index f0a1921..42a04fb 100644 (file)
@@ -192,11 +192,6 @@ struct task_manager_t {
         * Destroy the task_manager_t.
         */
        void (*destroy) (task_manager_t *this);
-
-       /**
-        * Signals the task manager to initiate immediately after completing a response
-        */
-       void (*initiate_later) (task_manager_t *this);
 };
 
 /**
index eaab362..65bab99 100644 (file)
@@ -147,11 +147,6 @@ struct private_task_manager_t {
         * Base to calculate retransmission timeout
         */
        double retransmit_base;
-
-       /**
-        * Signal to the task manager that we need to initiate a transaction after the response is sent.
-        */
-       bool initiate_later_flag;
 };
 
 /**
@@ -325,10 +320,6 @@ METHOD(task_manager_t, initiate, status_t,
                                case TASK_QUICK_MODE:
                                        exchange = QUICK_MODE;
                                        break;
-                               case TASK_XAUTH_REQUEST:
-                                       exchange = TRANSACTION;
-                                       new_mid = TRUE;
-                                       break;
                                default:
                                        continue;
                        }
@@ -528,7 +519,6 @@ static status_t process_request(private_task_manager_t *this,
 {
        enumerator_t *enumerator;
        task_t *task = NULL;
-       status_t process_status;
 
        if (this->passive_tasks->get_count(this->passive_tasks) == 0)
        {       /* create tasks depending on request type, if not already some queued */
@@ -596,14 +586,7 @@ static status_t process_request(private_task_manager_t *this,
        }
        enumerator->destroy(enumerator);
 
-       process_status = build_response(this, message);
-
-       if(((process_status == SUCCESS) || (process_status == NEED_MORE)) && (this->initiate_later_flag == TRUE))
-       {
-               this->initiate_later_flag = FALSE;
-               return initiate(this);
-       }
-       return process_status;
+       return build_response(this, message);
 }
 
 /**
@@ -777,12 +760,6 @@ METHOD(task_manager_t, destroy, void,
        free(this);
 }
 
-METHOD(task_manager_t, initiate_later, void,
-       private_task_manager_t *this)
-{
-       this->initiate_later_flag = TRUE;
-}
-
 /*
  * see header file
  */
@@ -803,7 +780,6 @@ task_manager_v1_t *task_manager_v1_create(ike_sa_t *ike_sa)
                                .busy = _busy,
                                .create_task_enumerator = _create_task_enumerator,
                                .destroy = _destroy,
-                               .initiate_later = _initiate_later,
                        },
                },
                .ike_sa = ike_sa,
@@ -818,7 +794,6 @@ task_manager_v1_t *task_manager_v1_create(ike_sa_t *ike_sa)
                                                                "charon.retransmit_timeout", RETRANSMIT_TIMEOUT),
                .retransmit_base = lib->settings->get_double(lib->settings,
                                                                "charon.retransmit_base", RETRANSMIT_BASE),
-               .initiate_later_flag = FALSE,
        );
 
        return &this->public;