gnunet-svn
[Top][All Lists]
Advanced

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

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


From: gnunet
Subject: [GNUnet-SVN] r35582 - gnunet/src/cadet
Date: Mon, 27 Apr 2015 21:14:19 +0200

Author: bartpolot
Date: 2015-04-27 21:14:19 +0200 (Mon, 27 Apr 2015)
New Revision: 35582

Modified:
   gnunet/src/cadet/gnunet-service-cadet_tunnel.c
Log:
- cast own key

Modified: gnunet/src/cadet/gnunet-service-cadet_tunnel.c
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_tunnel.c      2015-04-27 19:14:18 UTC 
(rev 35581)
+++ gnunet/src/cadet/gnunet-service-cadet_tunnel.c      2015-04-27 19:14:19 UTC 
(rev 35582)
@@ -456,14 +456,9 @@
 /**
  * Own Axolotl private key (derived from @a my_private_key).
  */
-struct GNUNET_CRYPTO_EcdhePrivateKey *ax_identity;
+const struct GNUNET_CRYPTO_EcdhePrivateKey *ax_identity;
 
 /**
- * Own Axolotl public key.
- */
-static struct GNUNET_CRYPTO_EcdhePrivateKey *ax_key;
-
-/**
  * Own OTR ephemeral private key.
  */
 static struct GNUNET_CRYPTO_EcdhePrivateKey *my_ephemeral_key;
@@ -2305,7 +2300,7 @@
   struct GNUNET_HashCode key_material[3];
   struct GNUNET_CRYPTO_SymmetricSessionKey keys[5];
   const struct GNUNET_CRYPTO_EcdhePublicKey *DHIr;
-  struct GNUNET_CRYPTO_EcdhePrivateKey *DHIs;
+  const struct GNUNET_CRYPTO_EcdhePrivateKey *DHIs;
   const char salt[] = "CADET Axolotl salt";
 
   if (NULL == t->ax)
@@ -2545,6 +2540,8 @@
   }
 
   my_private_key = key;
+  ax_identity = get_private_ecdhe_from_eddsa (key);
+
   kx_msg.header.size = htons (sizeof (kx_msg));
   kx_msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_KX_EPHEMERAL);
   kx_msg.purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_CADET_KX);
@@ -2553,8 +2550,6 @@
   rekey_task = GNUNET_SCHEDULER_add_now (&rekey, NULL);
 
   tunnels = GNUNET_CONTAINER_multipeermap_create (128, GNUNET_YES);
-
-  ax_key = GNUNET_CRYPTO_ecdhe_key_create();
 }
 
 
@@ -2571,8 +2566,6 @@
   }
   GNUNET_CONTAINER_multipeermap_iterate (tunnels, &destroy_iterator, NULL);
   GNUNET_CONTAINER_multipeermap_destroy (tunnels);
-
-  GNUNET_free (ax_key);
 }
 
 




reply via email to

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