- doc
[oweals/gnunet.git] / src / util / test_crypto_ecc.c
index 44ece1658a07774efcd0b4235a98c7b67981be04..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 ())