store IKE proposal implicitly during derive_keys

This commit is contained in:
Martin Willi
2008-10-28 10:12:21 +00:00
parent 20fb671904
commit 3c8234d408
4 changed files with 18 additions and 46 deletions
+1 -17
View File
@@ -433,15 +433,7 @@ static status_t build_r(private_ike_init_t *this, message_t *message)
message->add_notify(message, TRUE, NO_PROPOSAL_CHOSEN, chunk_empty);
return FAILED;
}
/* Keep the selected IKE proposal for status information purposes */
{
char buf[BUF_LEN];
snprintf(buf, BUF_LEN, "%P", this->proposal);
this->ike_sa->set_proposal(this->ike_sa, buf+4);
}
build_payloads(this, message);
return SUCCESS;
}
@@ -565,14 +557,6 @@ static status_t process_i(private_ike_init_t *this, message_t *message)
return FAILED;
}
/* Keep the selected IKE proposal for status information purposes */
{
char buf[BUF_LEN];
snprintf(buf, BUF_LEN, "%P", this->proposal);
this->ike_sa->set_proposal(this->ike_sa, buf+4);
}
return SUCCESS;
}