diff options
author | Tobias Brunner <tobias@strongswan.org> | 2011-11-30 17:04:21 +0100 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2012-03-20 17:31:10 +0100 |
commit | 61e2a1ad8a6a3ea2d4a4c6f5298d685b9dcde60c (patch) | |
tree | 9c38c399a7db0b0813c530511c49123bc5442a14 /src | |
parent | 4ace4daf0c40ac5be48b66f7bd755c7aff4d554e (diff) | |
download | strongswan-61e2a1ad8a6a3ea2d4a4c6f5298d685b9dcde60c.tar.bz2 strongswan-61e2a1ad8a6a3ea2d4a4c6f5298d685b9dcde60c.tar.xz |
Create negotiated hasher earlier during Main Mode so it is available for building NAT-D payloads.
Diffstat (limited to 'src')
-rw-r--r-- | src/libcharon/sa/tasks/main_mode.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libcharon/sa/tasks/main_mode.c b/src/libcharon/sa/tasks/main_mode.c index a88f7a419..4d4ca340a 100644 --- a/src/libcharon/sa/tasks/main_mode.c +++ b/src/libcharon/sa/tasks/main_mode.c @@ -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)) { |