ha: Add auth method for HA IKEv1 key derivation

Signed-off-by: Thomas Egerer <[email protected]>
This commit is contained in:
Thomas Egerer
2018-12-07 10:17:56 +01:00
committed by Tobias Brunner
parent 13f92f649e
commit eed20c21d3
9 changed files with 24 additions and 8 deletions
+3 -2
View File
@@ -575,7 +575,7 @@ METHOD(bus_t, message, void,
METHOD(bus_t, ike_keys, void,
private_bus_t *this, ike_sa_t *ike_sa, diffie_hellman_t *dh,
chunk_t dh_other, chunk_t nonce_i, chunk_t nonce_r,
ike_sa_t *rekey, shared_key_t *shared)
ike_sa_t *rekey, shared_key_t *shared, auth_method_t method)
{
enumerator_t *enumerator;
entry_t *entry;
@@ -591,7 +591,8 @@ METHOD(bus_t, ike_keys, void,
}
entry->calling++;
keep = entry->listener->ike_keys(entry->listener, ike_sa, dh, dh_other,
nonce_i, nonce_r, rekey, shared);
nonce_i, nonce_r, rekey, shared,
method);
entry->calling--;
if (!keep)
{
+3 -1
View File
@@ -353,10 +353,12 @@ struct bus_t {
* @param nonce_r responder's nonce
* @param rekey IKE_SA we are rekeying, if any (IKEv2 only)
* @param shared shared key used for key derivation (IKEv1-PSK only)
* @param method auth method for key derivation (IKEv1-non-PSK only)
*/
void (*ike_keys)(bus_t *this, ike_sa_t *ike_sa, diffie_hellman_t *dh,
chunk_t dh_other, chunk_t nonce_i, chunk_t nonce_r,
ike_sa_t *rekey, shared_key_t *shared);
ike_sa_t *rekey, shared_key_t *shared,
auth_method_t method);
/**
* IKE_SA derived keys hook.
+3 -1
View File
@@ -88,11 +88,13 @@ struct listener_t {
* @param nonce_r responder's nonce
* @param rekey IKE_SA we are rekeying, if any (IKEv2 only)
* @param shared shared key used for key derivation (IKEv1-PSK only)
* @param method auth method for key derivation (IKEv1-non-PSK only)
* @return TRUE to stay registered, FALSE to unregister
*/
bool (*ike_keys)(listener_t *this, ike_sa_t *ike_sa, diffie_hellman_t *dh,
chunk_t dh_other, chunk_t nonce_i, chunk_t nonce_r,
ike_sa_t *rekey, shared_key_t *shared);
ike_sa_t *rekey, shared_key_t *shared,
auth_method_t method);
/**
* Hook called with derived IKE_SA keys.