diffie-hellman: Add a bool return value to set_other_public_value()

This commit is contained in:
Martin Willi
2015-03-23 17:54:03 +01:00
parent 42431690e0
commit a777155ffe
19 changed files with 123 additions and 55 deletions
+5 -1
View File
@@ -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)
+6 -2
View File
@@ -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;
}