gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r33682 - gnunet/src/cadet


From: gnunet
Subject: [GNUnet-SVN] r33682 - gnunet/src/cadet
Date: Tue, 17 Jun 2014 14:13:20 +0200

Author: bartpolot
Date: 2014-06-17 14:13:20 +0200 (Tue, 17 Jun 2014)
New Revision: 33682

Modified:
   gnunet/src/cadet/gnunet-service-cadet_tunnel.c
Log:
- intialize a new kx_ctx on receipt of a new ephemeral key if none exists

Modified: gnunet/src/cadet/gnunet-service-cadet_tunnel.c
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_tunnel.c      2014-06-17 12:13:19 UTC 
(rev 33681)
+++ gnunet/src/cadet/gnunet-service-cadet_tunnel.c      2014-06-17 12:13:20 UTC 
(rev 33682)
@@ -1668,6 +1668,15 @@
     GNUNET_break_op (0);
     return;
   }
+  if (NULL == t->kx_ctx)
+  {
+    t->kx_ctx = GNUNET_new (struct CadetTunnelKXCtx);
+    t->kx_ctx->rekey_start_time = GNUNET_TIME_absolute_get ();
+    t->kx_ctx->e_key_old = t->e_key;
+    t->kx_ctx->d_key_old = t->d_key;
+    t->kx_ctx->challenge =
+        GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_NONCE, UINT32_MAX);
+  }
   t->peers_ephemeral_key = msg->ephemeral_key;
   create_keys (t);
   if (CADET_TUNNEL3_KEY_SENT == t->estate)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]