-fix time assertion introduce in last patch
[oweals/gnunet.git] / src / util / test_crypto_hash.c
index a8ef39a380f47c4912d7fecbc59e540d23ccf7b3..1a3f90957b310b90cf60d2c4513d9fb888ad254c 100644 (file)
@@ -24,9 +24,7 @@
  * @brief Test for crypto_hash.c
  */
 #include "platform.h"
-#include "gnunet_common.h"
-#include "gnunet_crypto_lib.h"
-#include "gnunet_scheduler_lib.h"
+#include "gnunet_util_lib.h"
 
 static char block[65536];
 
@@ -65,14 +63,12 @@ testEncoding ()
 static int
 testArithmetic ()
 {
-  static struct GNUNET_CRYPTO_AesSessionKey zskey;
-  static struct GNUNET_CRYPTO_AesInitializationVector ziv;
   struct GNUNET_HashCode h1;
   struct GNUNET_HashCode h2;
   struct GNUNET_HashCode d;
   struct GNUNET_HashCode s;
-  struct GNUNET_CRYPTO_AesSessionKey skey;
-  struct GNUNET_CRYPTO_AesInitializationVector iv;
+  struct GNUNET_CRYPTO_SymmetricSessionKey skey;
+  struct GNUNET_CRYPTO_SymmetricInitializationVector iv;
 
   GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK, &h1);
   GNUNET_CRYPTO_hash_create_random (GNUNET_CRYPTO_QUALITY_WEAK, &h2);
@@ -100,9 +96,6 @@ testArithmetic ()
     return 1;
   memset (&d, 0, sizeof (d));
   GNUNET_CRYPTO_hash_to_aes_key (&d, &skey, &iv);
-  if ((0 != memcmp (&skey, &zskey, sizeof (skey) - sizeof (unsigned int))) ||
-      (0 != memcmp (&iv, &ziv, sizeof (iv))))
-    return 1;
   return 0;
 }