summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2009-03-04 18:21:38 +0100
committerSimon Josefsson <simon@josefsson.org>2009-03-04 18:21:38 +0100
commit6039c30c9fbae8e29b9b91e5cb86c8482411c443 (patch)
tree098ac5941c6de60edcb52e6bbde4da14181c8295
parent65c422c2cfddf4380bb372757816241fa0e324ab (diff)
downloadgnutls-6039c30c9fbae8e29b9b91e5cb86c8482411c443.tar.gz
Be compatible with libtasn1 before v1.6.
-rw-r--r--lib/gnutls_global.c5
-rw-r--r--lib/x509/x509_int.h10
2 files changed, 14 insertions, 1 deletions
diff --git a/lib/gnutls_global.c b/lib/gnutls_global.c
index beb2d4a243..ae39229ab7 100644
--- a/lib/gnutls_global.c
+++ b/lib/gnutls_global.c
@@ -34,6 +34,11 @@
#include "sockets.h"
#include "gettext.h"
+/* Remove this when we require libtasn1 v1.6 or later. */
+#ifndef ASN1_VERSION
+# define ASN1_VERSION LIBTASN1_VERSION
+#endif
+
/* created by asn1c */
extern const ASN1_ARRAY_TYPE gnutls_asn1_tab[];
extern const ASN1_ARRAY_TYPE pkix_asn1_tab[];
diff --git a/lib/x509/x509_int.h b/lib/x509/x509_int.h
index 1dd9806ca6..2186e8c287 100644
--- a/lib/x509/x509_int.h
+++ b/lib/x509/x509_int.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003, 2004, 2005, 2007, 2008 Free Software Foundation
+ * Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation
*
* Author: Nikos Mavrogiannopoulos
*
@@ -29,6 +29,14 @@
#include <libtasn1.h>
+/* Remove these when we require libtasn1 v1.6 or later. */
+#ifndef ASN1_MAX_NAME_SIZE
+# define ASN1_MAX_NAME_SIZE MAX_NAME_SIZE
+#endif
+#ifndef ASN1_MAX_ERROR_DESCRIPTION_SIZE
+# define ASN1_MAX_ERROR_DESCRIPTION_SIZE MAX_ERROR_DESCRIPTION_SIZE
+#endif
+
#define MAX_CRQ_EXTENSIONS_SIZE 8*1024
#define MAX_OID_SIZE 128