diffie-hellman: Add a bool return value to set_other_public_value()
This commit is contained in:
@@ -745,7 +745,11 @@ METHOD(phase1_t, get_nonce_ke, bool,
|
||||
return FALSE;
|
||||
}
|
||||
this->dh_value = chunk_clone(ke_payload->get_key_exchange_data(ke_payload));
|
||||
this->dh->set_other_public_value(this->dh, this->dh_value);
|
||||
if (!this->dh->set_other_public_value(this->dh, this->dh_value))
|
||||
{
|
||||
DBG1(DBG_IKE, "unable to apply received KE value");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
nonce_payload = (nonce_payload_t*)message->get_payload(message, PLV1_NONCE);
|
||||
if (!nonce_payload)
|
||||
|
||||
@@ -493,8 +493,12 @@ static bool get_ke(private_quick_mode_t *this, message_t *message)
|
||||
DBG1(DBG_IKE, "KE payload missing");
|
||||
return FALSE;
|
||||
}
|
||||
this->dh->set_other_public_value(this->dh,
|
||||
ke_payload->get_key_exchange_data(ke_payload));
|
||||
if (this->dh->set_other_public_value(this->dh,
|
||||
ke_payload->get_key_exchange_data(ke_payload)))
|
||||
{
|
||||
DBG1(DBG_IKE, "unable to apply received KE value");
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user