diff options
author | Martin Willi <martin@revosec.ch> | 2012-07-06 11:16:49 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2012-07-16 14:53:34 +0200 |
commit | a7e65391353d0eddd448367c8d9674af9b17cd51 (patch) | |
tree | 9bb8e96df453d0a165fa0fbb260924b941fa7ead /src/libcharon/encoding/message.c | |
parent | e4c5c1d03e44b246677b467b0f4abf9bfb377dfc (diff) | |
download | strongswan-a7e65391353d0eddd448367c8d9674af9b17cd51.tar.bz2 strongswan-a7e65391353d0eddd448367c8d9674af9b17cd51.tar.xz |
Use a bool return value in keymat_v1_t.get_hash_phase2()
Diffstat (limited to 'src/libcharon/encoding/message.c')
-rw-r--r-- | src/libcharon/encoding/message.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libcharon/encoding/message.c b/src/libcharon/encoding/message.c index 63114c93d..1aef7c243 100644 --- a/src/libcharon/encoding/message.c +++ b/src/libcharon/encoding/message.c @@ -1455,8 +1455,7 @@ METHOD(message_t, generate, status_t, if (keymat && keymat->get_version(keymat) == IKEV1) { /* get a hash for this message, if any is required */ - hash = keymat_v1->get_hash_phase2(keymat_v1, &this->public); - if (hash.ptr) + if (keymat_v1->get_hash_phase2(keymat_v1, &this->public, &hash)) { /* insert a HASH payload as first payload */ hash_payload_t *hash_payload; @@ -2003,8 +2002,7 @@ METHOD(message_t, parse_body, status_t, keymat_v1_t *keymat_v1 = (keymat_v1_t*)keymat; chunk_t hash; - hash = keymat_v1->get_hash_phase2(keymat_v1, &this->public); - if (hash.ptr) + if (keymat_v1->get_hash_phase2(keymat_v1, &this->public, &hash)) { hash_payload_t *hash_payload; chunk_t other_hash; |