diff options
author | Martin Willi <martin@strongswan.org> | 2006-02-14 14:52:00 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2006-02-14 14:52:00 +0000 |
commit | ce461bbd13c5ea6a94ba0b34cbb4d1be8159b67e (patch) | |
tree | d3ba1aa2e97e7aeb7b24163d4b8671abbeb9a7c9 /Source/charon/sa/authenticator.c | |
parent | 409d010131f14e551e0645e9b88ad7621d08b781 (diff) | |
download | strongswan-ce461bbd13c5ea6a94ba0b34cbb4d1be8159b67e.tar.bz2 strongswan-ce461bbd13c5ea6a94ba0b34cbb4d1be8159b67e.tar.xz |
- refactored ike proposal
- uses now proposal_t, wich is also used by child proposals
- ike key derivation refactored
- crypter_t api has get_key_size now
- some other improvements here and there
Diffstat (limited to 'Source/charon/sa/authenticator.c')
-rw-r--r-- | Source/charon/sa/authenticator.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/charon/sa/authenticator.c b/Source/charon/sa/authenticator.c index 7d40c78c2..5aaa2d983 100644 --- a/Source/charon/sa/authenticator.c +++ b/Source/charon/sa/authenticator.c @@ -116,6 +116,7 @@ static chunk_t allocate_octets(private_authenticator_t *this, id_payload_t *my_id, bool initiator) { + prf_t *prf; chunk_t id_chunk = my_id->get_data(my_id); u_int8_t id_with_header[4 + id_chunk.len]; /* @@ -139,23 +140,22 @@ static chunk_t allocate_octets(private_authenticator_t *this, if (initiator) { - this->prf->set_key(this->prf,this->ike_sa->get_key_pi(this->ike_sa)); + prf = this->ike_sa->get_prf_auth_i(this->ike_sa); } else { - this->prf->set_key(this->prf,this->ike_sa->get_key_pr(this->ike_sa)); + prf = this->ike_sa->get_prf_auth_r(this->ike_sa); } - /* 4 bytes are id type and reserved fields of id payload */ - octets.len = last_message.len + other_nonce.len + this->prf->get_block_size(this->prf); + octets.len = last_message.len + other_nonce.len + prf->get_block_size(prf); octets.ptr = allocator_alloc(octets.len); current_pos = octets.ptr; memcpy(current_pos,last_message.ptr,last_message.len); current_pos += last_message.len; memcpy(current_pos,other_nonce.ptr,other_nonce.len); current_pos += other_nonce.len; - this->prf->get_bytes(this->prf,id_with_header_chunk,current_pos); + prf->get_bytes(prf, id_with_header_chunk, current_pos); this->logger->log_chunk(this->logger,RAW | LEVEL2, "Octets (Mesage + Nonce + prf(Sk_px,Idx)",&octets); return octets; |