Create negotiated hasher earlier during Main Mode so it is available for building...
authorTobias Brunner <tobias@strongswan.org>
Wed, 30 Nov 2011 16:04:21 +0000 (17:04 +0100)
committerTobias Brunner <tobias@strongswan.org>
Tue, 20 Mar 2012 16:31:10 +0000 (17:31 +0100)
src/libcharon/sa/tasks/main_mode.c

index a88f7a4..4d4ca34 100644 (file)
@@ -376,6 +376,10 @@ METHOD(task_t, build_i, status_t,
                {
                        u_int16_t group;
 
+                       if (!this->keymat->create_hasher(this->keymat, this->proposal))
+                       {
+                               return FAILED;
+                       }
                        if (!this->proposal->get_algorithm(this->proposal,
                                                                                DIFFIE_HELLMAN_GROUP, &group, NULL))
                        {
@@ -470,6 +474,10 @@ METHOD(task_t, process_r, status_t,
                {
                        u_int16_t group;
 
+                       if (!this->keymat->create_hasher(this->keymat, this->proposal))
+                       {
+                               return FAILED;
+                       }
                        if (!this->proposal->get_algorithm(this->proposal,
                                                                                DIFFIE_HELLMAN_GROUP, &group, NULL))
                        {