From: Adrian-Ken Rueegsegger Date: Wed, 22 Aug 2012 09:27:30 +0000 (+0200) Subject: keymat: Log nonce and DH context ids X-Git-Tag: 5.0.3rc1~39^2~84 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d61cea752472a211166c88f1559c3677ae2ddcc0;p=thirdparty%2Fstrongswan.git keymat: Log nonce and DH context ids --- diff --git a/src/charon-tkm/src/tkm/tkm_keymat.c b/src/charon-tkm/src/tkm/tkm_keymat.c index 644e42d745..e3fcfa0aa4 100644 --- a/src/charon-tkm/src/tkm/tkm_keymat.c +++ b/src/charon-tkm/src/tkm/tkm_keymat.c @@ -18,6 +18,7 @@ #include #include "tkm.h" +#include "tkm_diffie_hellman.h" #include "tkm_keymat.h" typedef struct private_tkm_keymat_t private_tkm_keymat_t; @@ -67,8 +68,9 @@ METHOD(tkm_keymat_t, derive_ike_keys, bool, chunk_t nonce_i, chunk_t nonce_r, ike_sa_id_t *id, pseudo_random_function_t rekey_function, chunk_t rekey_skd) { - DBG1(DBG_IKE, "deriving IKE keys"); + tkm_diffie_hellman_t * const tkm_dh = (tkm_diffie_hellman_t *)dh; chunk_t * const nonce = this->initiator ? &nonce_i : &nonce_r; + const uint64_t nc_id = tkm->chunk_map->get_id(tkm->chunk_map, nonce); if (!nc_id) { @@ -76,6 +78,8 @@ METHOD(tkm_keymat_t, derive_ike_keys, bool, return FALSE; } + DBG1(DBG_IKE, "deriving IKE keys (nc: %llu, dh: %llu)", nc_id, + tkm_dh->get_id(tkm_dh)); if (this->proxy->derive_ike_keys(this->proxy, proposal, dh, nonce_i, nonce_r, id, rekey_function, rekey_skd)) {