[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r35594 - gnunet/src/cadet
From: |
gnunet |
Subject: |
[GNUnet-SVN] r35594 - gnunet/src/cadet |
Date: |
Mon, 27 Apr 2015 21:14:35 +0200 |
Author: bartpolot
Date: 2015-04-27 21:14:35 +0200 (Mon, 27 Apr 2015)
New Revision: 35594
Modified:
gnunet/src/cadet/gnunet-service-cadet_tunnel.c
gnunet/src/cadet/gnunet-service-cadet_tunnel.h
Log:
- add send kx for axolotl
Modified: gnunet/src/cadet/gnunet-service-cadet_tunnel.c
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_tunnel.c 2015-04-27 19:14:34 UTC
(rev 35593)
+++ gnunet/src/cadet/gnunet-service-cadet_tunnel.c 2015-04-27 19:14:35 UTC
(rev 35594)
@@ -2325,13 +2325,6 @@
}
-static void
-send_ax_kx ()
-{
- //FIXME
-}
-
-
/**
* WARNING! DANGER! Do not use this if you don't know what you are doing!
* Ask Christian Grothoff, Werner Koch, Dan Bernstein and $GOD!
@@ -3643,7 +3636,34 @@
return send_prebuilt_message (message, t, c, force, cont, cont_cls, NULL);
}
+
/**
+ * Send an Axolotl KX message.
+ *
+ * @param t Tunnel on which to send it.
+ */
+void
+GCT_send_ax_kx (struct CadetTunnel *t)
+{
+ struct GNUNET_CADET_AX_KX msg;
+ struct CadetConnection *c;
+
+ LOG (GNUNET_ERROR_TYPE_INFO, "===> AX_KX for %s\n", GCT_2s (t));
+
+ msg.header.size = sizeof (msg);
+ msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_AX_KX);
+ GNUNET_CRYPTO_ecdhe_key_get_public (t->ax->kx_0, &msg.ephemeral_key);
+ GNUNET_CRYPTO_ecdhe_key_get_public (t->ax->DHRs, &msg.ratchet_key);
+
+ c = tunnel_get_connection (t);
+ /* TODO: save queue */
+ GCC_send_prebuilt_message (&msg.header, GNUNET_MESSAGE_TYPE_CADET_AX_KX, 0,
+ c, GCC_is_origin (c, GNUNET_YES), GNUNET_NO,
+ NULL, NULL);
+}
+
+
+/**
* Sends an already built and encrypted message on a tunnel, choosing the best
* connection. Useful for re-queueing messages queued on a destroyed
connection.
*
Modified: gnunet/src/cadet/gnunet-service-cadet_tunnel.h
===================================================================
--- gnunet/src/cadet/gnunet-service-cadet_tunnel.h 2015-04-27 19:14:34 UTC
(rev 35593)
+++ gnunet/src/cadet/gnunet-service-cadet_tunnel.h 2015-04-27 19:14:35 UTC
(rev 35594)
@@ -443,6 +443,14 @@
int force, GCT_sent cont, void *cont_cls);
/**
+ * Send an Axolotl KX message.
+ *
+ * @param t Tunnel on which to send it.
+ */
+void
+GCT_send_ax_kx (struct CadetTunnel *t);
+
+/**
* Sends an already built and encrypted message on a tunnel, choosing the best
* connection. Useful for re-queueing messages queued on a destroyed
connection.
*
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r35594 - gnunet/src/cadet,
gnunet <=