diffie-hellman: Add a bool return value to get_my_public_value()
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user