mirror of https://github.com/aria2/aria2
Check libgcrypt version is greater or equal to required version.
This will fixes Debian bug#642989.pull/2/head
parent
9fb6edd60f
commit
5ce9af94ce
|
@ -144,7 +144,7 @@ if test "x$have_openssl" != "xyes"; then
|
||||||
fi
|
fi
|
||||||
if test "x$with_libgcrypt" = "xyes" &&
|
if test "x$with_libgcrypt" = "xyes" &&
|
||||||
test "x$have_libnettle" != "xyes"; then
|
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
|
if test "x$have_libgcrypt" = "xyes"; then
|
||||||
AC_DEFINE([HAVE_LIBGCRYPT], [1], [Define to 1 if you have libgcrypt.])
|
AC_DEFINE([HAVE_LIBGCRYPT], [1], [Define to 1 if you have libgcrypt.])
|
||||||
LIBS="$LIBGCRYPT_LIBS $LIBS"
|
LIBS="$LIBGCRYPT_LIBS $LIBS"
|
||||||
|
|
|
@ -77,6 +77,8 @@
|
||||||
# include "a2gmp.h"
|
# include "a2gmp.h"
|
||||||
#endif // HAVE_LIBGMP
|
#endif // HAVE_LIBGMP
|
||||||
|
|
||||||
|
#define A2_MIN_GCRYPT_VERSION "1.2.4"
|
||||||
|
|
||||||
namespace aria2 {
|
namespace aria2 {
|
||||||
|
|
||||||
bool Platform::initialized_ = false;
|
bool Platform::initialized_ = false;
|
||||||
|
@ -113,7 +115,7 @@ bool Platform::setUp()
|
||||||
SSL_library_init();
|
SSL_library_init();
|
||||||
#endif // HAVE_OPENSSL
|
#endif // HAVE_OPENSSL
|
||||||
#ifdef HAVE_LIBGCRYPT
|
#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.");
|
throw DL_ABORT_EX("gcry_check_version() failed.");
|
||||||
}
|
}
|
||||||
gcry_control(GCRYCTL_DISABLE_SECMEM, 0);
|
gcry_control(GCRYCTL_DISABLE_SECMEM, 0);
|
||||||
|
|
Loading…
Reference in New Issue