Ver Fonte

Check libgcrypt version is greater or equal to required version.

This will fixes Debian bug#642989.
Tatsuhiro Tsujikawa há 14 anos atrás
pai
commit
5ce9af94ce
2 ficheiros alterados com 4 adições e 2 exclusões
  1. 1 1
      configure.ac
  2. 3 1
      src/Platform.cc

+ 1 - 1
configure.ac

@@ -144,7 +144,7 @@ if test "x$have_openssl" != "xyes"; then
   fi
   if test "x$with_libgcrypt" = "xyes" &&
      test "x$have_libnettle" != "xyes"; then
-    AM_PATH_LIBGCRYPT([1.2.2], [have_libgcrypt=yes])
+    AM_PATH_LIBGCRYPT([1.2.4], [have_libgcrypt=yes])
     if test "x$have_libgcrypt" = "xyes"; then
       AC_DEFINE([HAVE_LIBGCRYPT], [1], [Define to 1 if you have libgcrypt.])
       LIBS="$LIBGCRYPT_LIBS $LIBS"

+ 3 - 1
src/Platform.cc

@@ -77,6 +77,8 @@
 # include "a2gmp.h"
 #endif // HAVE_LIBGMP
 
+#define A2_MIN_GCRYPT_VERSION "1.2.4"
+
 namespace aria2 {
 
 bool Platform::initialized_ = false;
@@ -113,7 +115,7 @@ bool Platform::setUp()
   SSL_library_init();
 #endif // HAVE_OPENSSL
 #ifdef HAVE_LIBGCRYPT
-  if(!gcry_check_version(GCRYPT_VERSION)) {
+  if(!gcry_check_version(A2_MIN_GCRYPT_VERSION)) {
     throw DL_ABORT_EX("gcry_check_version() failed.");
   }
   gcry_control(GCRYCTL_DISABLE_SECMEM, 0);