bus: Extend and reorder arguments of ike_derived_keys() hook
This now includes all key material derived for IKE_SAs in the order
defined in the RFC:
{SK_d | SK_ai | SK_ar | SK_ei | SK_er | SK_pi | SK_pr}
= prf+ (SKEYSEED, Ni | Nr | SPIi | SPIr)
Signed-off-by: Thomas Egerer <[email protected]>
This commit is contained in:
committed by
Tobias Brunner
parent
9c85a52956
commit
4e29d6fac1
@@ -604,8 +604,8 @@ METHOD(bus_t, ike_keys, void,
|
||||
}
|
||||
|
||||
METHOD(bus_t, ike_derived_keys, void,
|
||||
private_bus_t *this, chunk_t sk_ei, chunk_t sk_er, chunk_t sk_ai,
|
||||
chunk_t sk_ar)
|
||||
private_bus_t *this, chunk_t sk_d, chunk_t sk_ai, chunk_t sk_ar,
|
||||
chunk_t sk_ei, chunk_t sk_er, chunk_t sk_pi, chunk_t sk_pr)
|
||||
{
|
||||
enumerator_t *enumerator;
|
||||
ike_sa_t *ike_sa;
|
||||
@@ -623,8 +623,9 @@ METHOD(bus_t, ike_derived_keys, void,
|
||||
continue;
|
||||
}
|
||||
entry->calling++;
|
||||
keep = entry->listener->ike_derived_keys(entry->listener, ike_sa, sk_ei,
|
||||
sk_er, sk_ai, sk_ar);
|
||||
keep = entry->listener->ike_derived_keys(entry->listener, ike_sa, sk_d,
|
||||
sk_ai, sk_ar, sk_ei, sk_er,
|
||||
sk_pi, sk_pr);
|
||||
entry->calling--;
|
||||
if (!keep)
|
||||
{
|
||||
|
||||
@@ -363,13 +363,17 @@ struct bus_t {
|
||||
/**
|
||||
* IKE_SA derived keys hook.
|
||||
*
|
||||
* @param sk_ei SK_ei, or Ka for IKEv1
|
||||
* @param sk_er SK_er
|
||||
* @param sk_d SK_d, or SKEYID_d for IKEv1
|
||||
* @param sk_ai SK_ai, or SKEYID_a for IKEv1
|
||||
* @param sk_ar SK_ar
|
||||
* @param sk_ei SK_ei, or Ka for IKEv1
|
||||
* @param sk_er SK_er
|
||||
* @param sk_pi SK_pi
|
||||
* @param sk_pr SK_pr
|
||||
*/
|
||||
void (*ike_derived_keys)(bus_t *this, chunk_t sk_ei, chunk_t sk_er,
|
||||
chunk_t sk_ai, chunk_t sk_ar);
|
||||
void (*ike_derived_keys)(bus_t *this, chunk_t sk_d, chunk_t sk_ai,
|
||||
chunk_t sk_ar, chunk_t sk_ei, chunk_t sk_er,
|
||||
chunk_t sk_pi, chunk_t sk_pr);
|
||||
|
||||
/**
|
||||
* CHILD_SA keymat hook.
|
||||
|
||||
@@ -100,13 +100,17 @@ struct listener_t {
|
||||
* Hook called with derived IKE_SA keys.
|
||||
*
|
||||
* @param ike_sa IKE_SA these keys belong to
|
||||
* @param sk_ei SK_ei, or Ka for IKEv1
|
||||
* @param sk_er SK_er
|
||||
* @param sk_d SK_d, or SKEYID_d for IKEv1
|
||||
* @param sk_ai SK_ai, or SKEYID_a for IKEv1
|
||||
* @param sk_ar SK_ar
|
||||
* @param sk_ei SK_ei, or Ka for IKEv1
|
||||
* @param sk_er SK_er
|
||||
* @param sk_pi SK_pi
|
||||
* @param sk_pr SK_pr
|
||||
*/
|
||||
bool (*ike_derived_keys)(listener_t *this, ike_sa_t *ike_sa, chunk_t sk_ei,
|
||||
chunk_t sk_er, chunk_t sk_ai, chunk_t sk_ar);
|
||||
bool (*ike_derived_keys)(listener_t *this, ike_sa_t *ike_sa, chunk_t sk_d,
|
||||
chunk_t sk_ai, chunk_t sk_ar, chunk_t sk_ei,
|
||||
chunk_t sk_er, chunk_t sk_pi, chunk_t sk_pr);
|
||||
|
||||
/**
|
||||
* Hook called with CHILD_SA key material.
|
||||
|
||||
Reference in New Issue
Block a user