- doc
[oweals/gnunet.git] / src / util / test_crypto_ecc.c
index 4cb8f1dbc3a20d8269cbabd2a19b009f2a62d634..d8329a0ae523a2309312427df0059878cce58fee 100644 (file)
@@ -27,6 +27,7 @@
 #include "gnunet_common.h"
 #include "gnunet_util_lib.h"
 #include "gnunet_signatures.h"
+#include <gcrypt.h>
 
 #define TESTSTRING "Hello World\0"
 #define MAX_TESTVAL sizeof(struct GNUNET_CRYPTO_AesSessionKey)
@@ -183,6 +184,14 @@ main (int argc, char *argv[])
 {
   int failureCount = 0;
 
+  if (!gcry_check_version ("1.5.0"))
+  {
+    FPRINTF (stderr,
+             _
+             ("libgcrypt has not the expected version (version %s is required).\n"),
+             "1.5.0");
+    return 0;
+  }
   GNUNET_log_setup ("test-crypto-ecc", "WARNING", NULL);
   GNUNET_CRYPTO_random_disable_entropy_gathering ();
   if (GNUNET_OK != testCreateFromFile ())
@@ -203,4 +212,6 @@ main (int argc, char *argv[])
     return -1;
   }
   return 0;
-}                               /* end of main */
+}
+
+/* end of test_crypto_ecc.c */