summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2009-08-10 14:15:29 +0200
committerSimon Josefsson <simon@josefsson.org>2009-08-10 14:16:34 +0200
commitd6e02bbb69217df91d7370826e0fc8bddfe761ca (patch)
tree987b53a110c174bf963e5e822361402fbd047e78 /lib
parentde6fc9bcff6e00ff18ead89f15b1cad4d280487d (diff)
downloadgnutls-d6e02bbb69217df91d7370826e0fc8bddfe761ca.tar.gz
Look only for latest _required_ libgcrypt/libtasn1 version.
Reported by Marco d'Itri <md@linux.it> via Andreas Metzler <ametzler@downhill.at.eu.org> as Debian BTS #540449.
Diffstat (limited to 'lib')
-rw-r--r--lib/gnutls_global.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/gnutls_global.c b/lib/gnutls_global.c
index f04e7e590e..d98f51040c 100644
--- a/lib/gnutls_global.c
+++ b/lib/gnutls_global.c
@@ -34,6 +34,10 @@
#include "sockets.h"
#include "gettext.h"
+/* Minimum library versions we accept. */
+#define GNUTLS_MIN_LIBGCRYPT_VERSION "1.2.4"
+#define GNUTLS_MIN_LIBTASN1_VERSION "0.3.4"
+
/* Remove this when we require libtasn1 v1.6 or later. */
#ifndef ASN1_VERSION
# define ASN1_VERSION LIBTASN1_VERSION
@@ -187,13 +191,14 @@ gnutls_global_init (void)
{
const char *p;
- p = gcry_check_version (GCRYPT_VERSION);
+ p = gcry_check_version (GNUTLS_MIN_LIBGCRYPT_VERSION);
if (p == NULL)
{
gnutls_assert ();
_gnutls_debug_log ("Checking for libgcrypt failed: %s < %s\n",
- gcry_check_version (NULL), GCRYPT_VERSION);
+ gcry_check_version (NULL),
+ GNUTLS_MIN_LIBGCRYPT_VERSION);
return GNUTLS_E_INCOMPATIBLE_GCRYPT_LIBRARY;
}
@@ -207,9 +212,12 @@ gnutls_global_init (void)
* This should not deal with files in the final
* version.
*/
- if (asn1_check_version (ASN1_VERSION) == NULL)
+ if (asn1_check_version (GNUTLS_MIN_LIBTASN1_VERSION) == NULL)
{
gnutls_assert ();
+ _gnutls_debug_log ("Checking for libtasn1 failed: %s < %s\n",
+ asn1_check_version (NULL),
+ GNUTLS_MIN_LIBTASN1_VERSION);
return GNUTLS_E_INCOMPATIBLE_LIBTASN1_LIBRARY;
}