aggressive-mode: Determine local identity before deriving keys
This might require a PSK, for which the local identity might be necessary.
This commit is contained in:
@@ -604,14 +604,15 @@ METHOD(task_t, build_r, status_t,
|
|||||||
{
|
{
|
||||||
return send_notify(this, NO_PROPOSAL_CHOSEN);
|
return send_notify(this, NO_PROPOSAL_CHOSEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
id = this->ph1->get_id(this->ph1, this->peer_cfg, TRUE);
|
||||||
|
this->ike_sa->set_my_id(this->ike_sa, id->clone(id));
|
||||||
|
|
||||||
if (!this->ph1->derive_keys(this->ph1, this->peer_cfg, this->method))
|
if (!this->ph1->derive_keys(this->ph1, this->peer_cfg, this->method))
|
||||||
{
|
{
|
||||||
return send_notify(this, INVALID_KEY_INFORMATION);
|
return send_notify(this, INVALID_KEY_INFORMATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
id = this->ph1->get_id(this->ph1, this->peer_cfg, TRUE);
|
|
||||||
this->ike_sa->set_my_id(this->ike_sa, id->clone(id));
|
|
||||||
|
|
||||||
id_payload = id_payload_create_from_identification(PLV1_ID, id);
|
id_payload = id_payload_create_from_identification(PLV1_ID, id);
|
||||||
message->add_payload(message, &id_payload->payload_interface);
|
message->add_payload(message, &id_payload->payload_interface);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user