[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 11/19: add more logging for core KX to improve dia
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 11/19: add more logging for core KX to improve diagnostics |
Date: |
Mon, 04 Jun 2018 19:19:02 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
commit bc64df2cff173cb1656be4874fe1d9f225c70709
Author: Christian Grothoff <address@hidden>
AuthorDate: Thu May 31 12:43:11 2018 +0200
add more logging for core KX to improve diagnostics
---
src/core/gnunet-service-core_kx.c | 53 ++++++++++++++++++++++++++++++++++++---
1 file changed, 49 insertions(+), 4 deletions(-)
diff --git a/src/core/gnunet-service-core_kx.c
b/src/core/gnunet-service-core_kx.c
index 944d1e692..69001a50f 100644
--- a/src/core/gnunet-service-core_kx.c
+++ b/src/core/gnunet-service-core_kx.c
@@ -1454,10 +1454,18 @@ GSC_KX_encrypt_and_transmit (struct GSC_KeyExchangeInfo
*kx,
&ph->sequence_number,
&em->sequence_number,
used - ENCRYPTED_HEADER_SIZE));
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Encrypted %u bytes for %s\n",
- (unsigned int) (used - ENCRYPTED_HEADER_SIZE),
- GNUNET_i2s (kx->peer));
+ {
+ struct GNUNET_HashCode hc;
+
+ GNUNET_CRYPTO_hash (&ph->sequence_number,
+ used - ENCRYPTED_HEADER_SIZE,
+ &hc);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Encrypted payload `%s' of %u bytes for %s\n",
+ GNUNET_h2s (&hc),
+ (unsigned int) (used - ENCRYPTED_HEADER_SIZE),
+ GNUNET_i2s (kx->peer));
+ }
derive_auth_key (&auth_key,
&kx->encrypt_key,
ph->iv_seed);
@@ -1465,6 +1473,18 @@ GSC_KX_encrypt_and_transmit (struct GSC_KeyExchangeInfo
*kx,
&em->sequence_number,
used - ENCRYPTED_HEADER_SIZE,
&em->hmac);
+ {
+ struct GNUNET_HashCode hc;
+
+ GNUNET_CRYPTO_hash (&auth_key,
+ sizeof (auth_key),
+ &hc);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "For peer %s, used AC %s to create hmac %s\n",
+ GNUNET_i2s (kx->peer),
+ GNUNET_h2s (&hc),
+ GNUNET_h2s2 (&em->hmac));
+ }
kx->has_excess_bandwidth = GNUNET_NO;
GNUNET_MQ_send (kx->mq,
env);
@@ -1544,6 +1564,19 @@ handle_encrypted (void *cls,
}
/* validate hash */
+ {
+ struct GNUNET_HashCode hc;
+
+ GNUNET_CRYPTO_hash (&m->sequence_number,
+ size - ENCRYPTED_HEADER_SIZE,
+ &hc);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Received encrypted payload `%s' of %u bytes from %s\n",
+ GNUNET_h2s (&hc),
+ (unsigned int) (size - ENCRYPTED_HEADER_SIZE),
+ GNUNET_i2s (kx->peer));
+ }
+
derive_auth_key (&auth_key,
&kx->decrypt_key,
m->iv_seed);
@@ -1551,6 +1584,18 @@ handle_encrypted (void *cls,
&m->sequence_number,
size - ENCRYPTED_HEADER_SIZE,
&ph);
+ {
+ struct GNUNET_HashCode hc;
+
+ GNUNET_CRYPTO_hash (&auth_key,
+ sizeof (auth_key),
+ &hc);
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "For peer %s, used AC %s to verify hmac %s\n",
+ GNUNET_i2s (kx->peer),
+ GNUNET_h2s (&hc),
+ GNUNET_h2s2 (&m->hmac));
+ }
if (0 != memcmp (&ph,
&m->hmac,
sizeof (struct GNUNET_HashCode)))
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] 06/19: skip validation logic, (continued)
- [GNUnet-SVN] [gnunet] 06/19: skip validation logic, gnunet, 2018/06/04
- [GNUnet-SVN] [gnunet] 04/19: Merge branch 'h2020' of git+ssh://gnunet.org/gnunet into h2020, gnunet, 2018/06/04
- [GNUnet-SVN] [gnunet] 05/19: track hello passing, gnunet, 2018/06/04
- [GNUnet-SVN] [gnunet] 12/19: more logging, gnunet, 2018/06/04
- [GNUnet-SVN] [gnunet] 09/19: disable xu transport, header missing, gnunet, 2018/06/04
- [GNUnet-SVN] [gnunet] 14/19: fix logic, gnunet, 2018/06/04
- [GNUnet-SVN] [gnunet] 07/19: skip validation logic, gnunet, 2018/06/04
- [GNUnet-SVN] [gnunet] 16/19: more crypto KX logging, gnunet, 2018/06/04
- [GNUnet-SVN] [gnunet] 17/19: more logging, gnunet, 2018/06/04
- [GNUnet-SVN] [gnunet] 15/19: more core KX logging, gnunet, 2018/06/04
- [GNUnet-SVN] [gnunet] 11/19: add more logging for core KX to improve diagnostics,
gnunet <=
- [GNUnet-SVN] [gnunet] 19/19: merge benchmark changes, gnunet, 2018/06/04
- [GNUnet-SVN] [gnunet] 18/19: add function for getopt uint16_t arguments, gnunet, 2018/06/04
- [GNUnet-SVN] [gnunet] 13/19: proper datacache expiration by proximity first, gnunet, 2018/06/04
- [GNUnet-SVN] [gnunet] 10/19: add proximity considerations to datacache, gnunet, 2018/06/04
- [GNUnet-SVN] [gnunet] 08/19: adding xu transport, gnunet, 2018/06/04
- [GNUnet-SVN] [gnunet] 01/19: xt transport for experiments:, gnunet, 2018/06/04