keymat: Store signature info in auth octets

Store the ISA context id and the initial message in the auth octets
chunk using the sign_info_t struct. Charon will pass on this information
to the TKM private key sign operation where it is extracted.
This commit is contained in:
Reto Buerki
2013-03-19 15:23:49 +01:00
committed by Tobias Brunner
parent a2f97ff860
commit fe504b745d
+14 -2
View File
@@ -366,12 +366,24 @@ METHOD(keymat_v2_t, get_auth_octets, bool,
{ {
/* store peer init message for authentication step */ /* store peer init message for authentication step */
this->other_init_msg = chunk_clone(ike_sa_init); this->other_init_msg = chunk_clone(ike_sa_init);
}
DBG1(DBG_IKE, "returning auth octets");
*octets = chunk_empty; *octets = chunk_empty;
return TRUE; return TRUE;
} }
sign_info_t *sign;
INIT(sign,
.isa_id = this->isa_ctx_id,
.init_message = chunk_clone(ike_sa_init),
);
/*
* store signature info in AUTH octets, which is passed to the private key
* sign() operation
*/
*octets = chunk_create((u_char *)sign, sizeof(sign_info_t));
return TRUE;
}
METHOD(keymat_v2_t, get_skd, pseudo_random_function_t, METHOD(keymat_v2_t, get_skd, pseudo_random_function_t,
private_tkm_keymat_t *this, chunk_t *skd) private_tkm_keymat_t *this, chunk_t *skd)
{ {