diff options
author | Martin Willi <martin@revosec.ch> | 2015-03-23 11:37:27 +0100 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2015-03-23 17:54:03 +0100 |
commit | 42431690e04a8614e759e0a3a3bcd76e30e6207e (patch) | |
tree | 4c473700dffe096c07d8117fb7a0df71fc5be56f /src/libcharon/plugins | |
parent | 8a7dbf3c2a0a4e8a4a503b630dbad0d46ae25756 (diff) | |
download | strongswan-42431690e04a8614e759e0a3a3bcd76e30e6207e.tar.bz2 strongswan-42431690e04a8614e759e0a3a3bcd76e30e6207e.tar.xz |
diffie-hellman: Add a bool return value to get_my_public_value()
Diffstat (limited to 'src/libcharon/plugins')
-rw-r--r-- | src/libcharon/plugins/ha/ha_dispatcher.c | 3 | ||||
-rw-r--r-- | src/libcharon/plugins/ha/ha_ike.c | 8 | ||||
-rw-r--r-- | src/libcharon/plugins/load_tester/load_tester_diffie_hellman.c | 3 |
3 files changed, 9 insertions, 5 deletions
diff --git a/src/libcharon/plugins/ha/ha_dispatcher.c b/src/libcharon/plugins/ha/ha_dispatcher.c index abd08e2fe..31eeb934e 100644 --- a/src/libcharon/plugins/ha/ha_dispatcher.c +++ b/src/libcharon/plugins/ha/ha_dispatcher.c @@ -88,10 +88,11 @@ METHOD(diffie_hellman_t, dh_get_shared_secret, bool, return TRUE; } -METHOD(diffie_hellman_t, dh_get_my_public_value, void, +METHOD(diffie_hellman_t, dh_get_my_public_value, bool, ha_diffie_hellman_t *this, chunk_t *value) { *value = chunk_clone(this->pub); + return TRUE; } METHOD(diffie_hellman_t, dh_destroy, void, diff --git a/src/libcharon/plugins/ha/ha_ike.c b/src/libcharon/plugins/ha/ha_ike.c index 815cb5389..6b4b53c9c 100644 --- a/src/libcharon/plugins/ha/ha_ike.c +++ b/src/libcharon/plugins/ha/ha_ike.c @@ -127,9 +127,11 @@ METHOD(listener_t, ike_keys, bool, chunk_clear(&secret); if (ike_sa->get_version(ike_sa) == IKEV1) { - dh->get_my_public_value(dh, &secret); - m->add_attribute(m, HA_LOCAL_DH, secret); - chunk_free(&secret); + if (dh->get_my_public_value(dh, &secret)) + { + m->add_attribute(m, HA_LOCAL_DH, secret); + chunk_free(&secret); + } m->add_attribute(m, HA_REMOTE_DH, dh_other); if (shared) { diff --git a/src/libcharon/plugins/load_tester/load_tester_diffie_hellman.c b/src/libcharon/plugins/load_tester/load_tester_diffie_hellman.c index b248e78c5..faa586d17 100644 --- a/src/libcharon/plugins/load_tester/load_tester_diffie_hellman.c +++ b/src/libcharon/plugins/load_tester/load_tester_diffie_hellman.c @@ -15,10 +15,11 @@ #include "load_tester_diffie_hellman.h" -METHOD(diffie_hellman_t, get_my_public_value, void, +METHOD(diffie_hellman_t, get_my_public_value, bool, load_tester_diffie_hellman_t *this, chunk_t *value) { *value = chunk_empty; + return TRUE; } METHOD(diffie_hellman_t, set_other_public_value, void, |