int
set_monotime_sig (struct GNUNET_CADET_ConnectionCreateMessage * msg)
{
- struct GNUNET_CRYPTO_EddsaPrivateKey *key;
-
struct CadetConnectionCreatePS cp = { .purpose.purpose = htonl (GNUNET_SIGNATURE_PURPOSE_CADET_CONNECTION_INITIATOR),
.purpose.size = htonl (sizeof(cp)),
.monotonic_time = msg->monotime};
// Check for CADET state in case the other side has lost the tunnel (xrs,t3ss)
if ((GNUNET_YES == msg->has_monotime) &&
(GNUNET_YES == GCP_check_monotime(origin, msg->monotime)) &&
- ( GNUNET_OK == GCP_check_monotime_sig(&origin, &msg)) &&
+ ( GNUNET_OK == GCP_check_monotime_sig(origin, msg)) &&
(CADET_TUNNEL_KEY_OK == GCT_get_estate(t)))
{
GCT_change_estate (t, CADET_TUNNEL_KEY_UNINITIALIZED);
* FIXME: documentation here
*/
int
-GCP_check_monotime_sig (struct CadetPeer *peer, struct GNUNET_CADET_ConnectionCreateMessage *msg)
+GCP_check_monotime_sig (struct CadetPeer *peer, const struct GNUNET_CADET_ConnectionCreateMessage *msg)
{
//struct CadetPeer *peer;
//const struct GNUNET_CADET_ConnectionCreateMessage *msg;
struct GNUNET_MQ_Handle *mq);
int
-GCP_check_monotime_sig (struct CadetPeer *peer, struct GNUNET_CADET_ConnectionCreateMessage *msg);
+GCP_check_monotime_sig (struct CadetPeer *peer, const struct GNUNET_CADET_ConnectionCreateMessage *msg);
void
GCP_update_monotime (struct CadetPeer *cp);
enum CadetTunnelEState
GCT_get_estate (struct CadetTunnel *t);
+/**
+ * Change the tunnel encryption state.
+ * If the encryption state changes to OK, stop the rekey task.
+ *
+ * @param t Tunnel whose encryption state to change, or NULL.
+ * @param state New encryption state.
+ */
+void
+GCT_change_estate (struct CadetTunnel *t,
+ enum CadetTunnelEState state);
/**
* Handle KX message.