From: Bart Polot Date: Mon, 27 Apr 2015 19:14:51 +0000 (+0000) Subject: - debug info X-Git-Tag: initial-import-from-subversion-38251~2025 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1ea92e8c3ffa47e72337f459e604d00c0f90a9f9;p=oweals%2Fgnunet.git - debug info --- diff --git a/src/cadet/gnunet-service-cadet_tunnel.c b/src/cadet/gnunet-service-cadet_tunnel.c index cd79c03cd..5f150d471 100644 --- a/src/cadet/gnunet-service-cadet_tunnel.c +++ b/src/cadet/gnunet-service-cadet_tunnel.c @@ -2380,6 +2380,8 @@ handle_kx_ax (struct CadetTunnel *t, const struct GNUNET_CADET_AX_KX *msg) const struct GNUNET_PeerIdentity *pid; int is_alice; + LOG (GNUNET_ERROR_TYPE_INFO, "<=== AX_KX on %s\n", GCT_2s (t)); + if (NULL == t->ax) { /* Something is wrong if ax is NULL. Whose fault it is? */ @@ -2399,6 +2401,8 @@ handle_kx_ax (struct CadetTunnel *t, const struct GNUNET_CADET_AX_KX *msg) return; } + LOG (GNUNET_ERROR_TYPE_INFO, " is Alice? %s\n", is_alice ? "YES" : "NO"); + ax = t->ax; ax->DHRr = msg->ratchet_key; @@ -2433,6 +2437,15 @@ handle_kx_ax (struct CadetTunnel *t, const struct GNUNET_CADET_AX_KX *msg) pub = &msg->ephemeral_key; /* B0 or A0 */ GNUNET_CRYPTO_ecc_ecdh (priv, pub, &key_material[2]); + #if DUMP_KEYS_TO_STDERR + { + unsigned int i; + for (i = 0; i < 3; i++) + LOG (GNUNET_ERROR_TYPE_INFO, "km[%u]: %s\n", + i, GNUNET_h2s (&key_material[i])); + } + #endif + /* KDF */ GNUNET_CRYPTO_kdf (keys, sizeof (keys), salt, sizeof (salt), @@ -2741,6 +2754,10 @@ GCT_change_cstate (struct CadetTunnel* t, enum CadetTunnelCState cstate) LOG (GNUNET_ERROR_TYPE_DEBUG, " cstate triggered kx\n"); GCT_send_ax_kx (t); } + else + { + LOG (GNUNET_ERROR_TYPE_DEBUG, "estate %s\n", estate2s (t->estate)); + } } t->cstate = cstate;