]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
depend on libtasn1 4.3
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Mon, 9 Mar 2015 20:57:25 +0000 (21:57 +0100)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Mon, 9 Mar 2015 20:57:25 +0000 (21:57 +0100)
lib/x509/common.c
m4/hooks.m4

index d92290a2ac59546a9acd21f9edc10fe81bd89475..55400bfc5773c524154f75cf6d09b7ae8e63d37a 100644 (file)
@@ -975,12 +975,10 @@ _gnutls_x509_decode_string(unsigned int etype,
        unsigned int str_size, len;
        gnutls_datum_t td;
 
-#ifdef HAVE_ASN1_DECODE_SIMPLE_BER
        if (allow_ber)
                ret =
                    asn1_decode_simple_ber(etype, der, der_size, &str, &str_size, NULL);
        else
-#endif
                ret =
                    asn1_decode_simple_der(etype, der, der_size, (const uint8_t**)&str, &str_size);
        if (ret != ASN1_SUCCESS) {
@@ -997,10 +995,8 @@ _gnutls_x509_decode_string(unsigned int etype,
        memcpy(td.data, str, str_size);
        td.data[str_size] = 0;
 
-#ifdef HAVE_ASN1_DECODE_SIMPLE_BER
        if (allow_ber)
                free(str);
-#endif
 
        ret = make_printable_string(etype, &td, output);
        if (ret == GNUTLS_E_INVALID_REQUEST) {  /* unsupported etype */
index ce756eeca81381e918cdab61ee9f7dea23fb33ed..a5c215606cca07573e0ae9ed9e5fa23f61f0d3fc 100644 (file)
@@ -108,7 +108,7 @@ AC_MSG_ERROR([[
       included_libtasn1=$withval,
       included_libtasn1=no)
   if test "$included_libtasn1" = "no"; then
-    PKG_CHECK_MODULES(LIBTASN1, [libtasn1 >= 3.9], [], [included_libtasn1=yes])
+    PKG_CHECK_MODULES(LIBTASN1, [libtasn1 >= 4.3], [], [included_libtasn1=yes])
     if test "$included_libtasn1" = yes; then
       AC_MSG_WARN([[
   *** 
@@ -124,13 +124,6 @@ AC_MSG_ERROR([[
     GNUTLS_REQUIRES_PRIVATE="${GNUTLS_REQUIRES_PRIVATE}, libtasn1"
   fi
 
-  oldlibs="$LIBS"
-  LIBS="$LIBS $LIBTASN1_LIBS"
-  oldcflags="$CFLAGS"
-  CFLAGS="$CFLAGS $LIBTASN1_CFLAGS"
-  AC_CHECK_FUNC(asn1_decode_simple_ber,
-                [AC_DEFINE(HAVE_ASN1_DECODE_SIMPLE_BER, 1, [Have this function])], [])
-
   AC_MSG_CHECKING([whether C99 macros are supported])
   AC_TRY_COMPILE(,
   [