summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/x509/common.c4
-rw-r--r--m4/hooks.m49
2 files changed, 1 insertions, 12 deletions
diff --git a/lib/x509/common.c b/lib/x509/common.c
index d92290a2ac..55400bfc57 100644
--- a/lib/x509/common.c
+++ b/lib/x509/common.c
@@ -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 */
diff --git a/m4/hooks.m4 b/m4/hooks.m4
index ce756eeca8..a5c215606c 100644
--- a/m4/hooks.m4
+++ b/m4/hooks.m4
@@ -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(,
[