aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2009-10-14 09:55:14 +0200
committerMartin Willi <martin@strongswan.org>2009-10-14 09:55:14 +0200
commitbb56e3f962255563af890ee58338a7552d7a12e0 (patch)
tree84026ec21413f1bf2d423ac69a9537639083f804
parent247794827e8ac7b7aa5f9dd8eb36d5f35e067e0d (diff)
downloadstrongswan-bb56e3f962255563af890ee58338a7552d7a12e0.tar.bz2
strongswan-bb56e3f962255563af890ee58338a7552d7a12e0.tar.xz
Improved debugging log in SIM triplet lookup
-rw-r--r--src/charon/plugins/eap_sim_file/eap_sim_file_card.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/charon/plugins/eap_sim_file/eap_sim_file_card.c b/src/charon/plugins/eap_sim_file/eap_sim_file_card.c
index c2c51e2ea..d9e386be1 100644
--- a/src/charon/plugins/eap_sim_file/eap_sim_file_card.c
+++ b/src/charon/plugins/eap_sim_file/eap_sim_file_card.c
@@ -45,17 +45,18 @@ static bool get_triplet(private_eap_sim_file_card_t *this,
identification_t *id;
char *c_rand, *c_sres, *c_kc;
- DBG2(DBG_CFG, "looking for rand: %b from %Y", rand, SIM_RAND_LEN, imsi);
+ DBG2(DBG_CFG, "looking for triplet: %Y rand %b", imsi, rand, SIM_RAND_LEN);
enumerator = this->triplets->create_enumerator(this->triplets);
while (enumerator->enumerate(enumerator, &id, &c_rand, &c_sres, &c_kc))
{
+ DBG2(DBG_CFG, "got a triplet: %Y rand %b\nsres %b\n kc %b", id,
+ c_rand, SIM_RAND_LEN, c_sres, SIM_SRES_LEN, c_kc, SIM_KC_LEN);
if (imsi->matches(imsi, id))
{
- DBG2(DBG_CFG, "found triplet: rand %b\nsres %b\n kc %b",
- c_rand, SIM_RAND_LEN, c_sres, SIM_SRES_LEN, c_kc, SIM_KC_LEN);
if (memeq(c_rand, rand, SIM_RAND_LEN))
{
+ DBG2(DBG_CFG, " => triplet matches");
memcpy(sres, c_sres, SIM_SRES_LEN);
memcpy(kc, c_kc, SIM_KC_LEN);
enumerator->destroy(enumerator);