how did this test ever work without assigning core handles?
[oweals/gnunet.git] / src / core / gnunet-service-core_kx.c
index 879939b180a2951c7f466325938a26e322490d78..9f904742dac12052952f8bf714f3548af7817ddd 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2009, 2010, 2011, 2012 Christian Grothoff (and other contributing authors)
+     (C) 2009-2013 Christian Grothoff (and other contributing authors)
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -498,7 +498,7 @@ derive_aes_key (const struct GNUNET_PeerIdentity *sender,
 
   GNUNET_CRYPTO_kdf (skey, sizeof (struct GNUNET_CRYPTO_AesSessionKey),
                     ctx, sizeof (ctx),
-                    skey, sizeof (struct GNUNET_CRYPTO_AesSessionKey),
+                    key_material, sizeof (struct GNUNET_HashCode),
                     sender, sizeof (struct GNUNET_PeerIdentity),
                     receiver, sizeof (struct GNUNET_PeerIdentity),
                     NULL);
@@ -1518,7 +1518,7 @@ do_rekey (void *cls,
                                             &do_rekey,
                                             NULL);
   if (NULL != my_ephemeral_key)
-    GNUNET_CRYPTO_ecc_key_free (my_ephemeral_key);
+    GNUNET_free (my_ephemeral_key);
   my_ephemeral_key = GNUNET_CRYPTO_ecc_key_create ();
   GNUNET_assert (NULL != my_ephemeral_key);
   sign_ephemeral_key ();
@@ -1553,7 +1553,7 @@ GSC_KX_init (struct GNUNET_CRYPTO_EccPrivateKey *pk)
     if (NULL == my_ephemeral_key)
     {
       GNUNET_break (0);
-      GNUNET_CRYPTO_ecc_key_free (my_private_key);
+      GNUNET_free (my_private_key);
       my_private_key = NULL;
       return GNUNET_SYSERR;
     }
@@ -1586,12 +1586,12 @@ GSC_KX_done ()
   if ( (NULL != my_ephemeral_key) &&
        (my_ephemeral_key != my_private_key) )
   {
-    GNUNET_CRYPTO_ecc_key_free (my_ephemeral_key);
+    GNUNET_free (my_ephemeral_key);
     my_ephemeral_key = NULL;
   }
   if (NULL != my_private_key)
   {
-    GNUNET_CRYPTO_ecc_key_free (my_private_key);
+    GNUNET_free (my_private_key);
     my_private_key = NULL;
   }
   if (NULL != mst)