aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac12
-rw-r--r--src/lib/protocols/quic.c5
2 files changed, 3 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index 51a1cecc5..92b3a17cd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -248,15 +248,9 @@ dnl> libgcrypt (external)
USE_HOST_LIBGCRYPT=0
AS_IF([test "${with_local_libgcrypt+set}" = set],[
USE_HOST_LIBGCRYPT=1
- AC_CHECK_LIB(gcrypt, gcry_cipher_checktag)
- if test "x$ac_cv_lib_gcrypt_gcry_cipher_checktag" = xyes; then :
- ADDITIONAL_LIBS="${ADDITIONAL_LIBS} -lgcrypt"
- else
- $as_unset ac_cv_lib_gcrypt_gcry_cipher_checktag
- AC_CHECK_LIB(gpg-error, gpg_strerror_r, [], AC_MSG_ERROR([libgpg-error required (because of --with-local-libgcrypt) but not found or too old.]))
- AC_CHECK_LIB(gcrypt, gcry_cipher_checktag, [], AC_MSG_ERROR([libgcrypt required (because of --with-local-libgcrypt) but not found or too old.]))
- ADDITIONAL_LIBS="${ADDITIONAL_LIBS} -lgcrypt -lgpg-error"
- fi
+ AC_CHECK_LIB(gpg-error, gpg_strerror_r, [], AC_MSG_ERROR([libgpg-error required (because of --with-local-libgcrypt) but not found or too old.]))
+ AC_CHECK_LIB(gcrypt, gcry_cipher_checktag, [], AC_MSG_ERROR([libgcrypt required (because of --with-local-libgcrypt) but not found or too old.]))
+ ADDITIONAL_LIBS="${ADDITIONAL_LIBS} -lgcrypt -lgpg-error"
AC_DEFINE_UNQUOTED(USE_HOST_LIBGCRYPT, 1, [Use locally installed libgcrypt instead of builtin gcrypt-light])
])
diff --git a/src/lib/protocols/quic.c b/src/lib/protocols/quic.c
index 39fc968f5..f107f87fb 100644
--- a/src/lib/protocols/quic.c
+++ b/src/lib/protocols/quic.c
@@ -246,16 +246,11 @@ static uint16_t gquic_get_u16(const uint8_t *buf, uint32_t version)
#ifdef DEBUG_CRYPT
char *__gcry_err(gpg_error_t err, char *buf, size_t buflen)
{
-#if defined(HAVE_LIBGPG_ERROR) || !defined(USE_HOST_LIBGCRYPT)
gpg_strerror_r(err, buf, buflen);
/* I am not sure if the string will be always null-terminated...
Better safe than sorry */
if(buflen > 0)
buf[buflen - 1] = '\0';
-#else
- if(buflen > 0)
- buf[0] = '\0';
-#endif
return buf;
}
#endif /* DEBUG_CRYPT */