diff --git a/configure.ac b/configure.ac index 284696564a..ef511b45eb 100644 --- a/configure.ac +++ b/configure.ac @@ -878,6 +878,18 @@ EOF ])], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([missing EVP entry for SHA-2])]) + dnl Check HMAC API + AC_MSG_CHECKING([HMAC functions returning ints]) + AC_LINK_IFELSE( + [AC_LANG_PROGRAM([#include ], + [HMAC_CTX ctx, tmp; + int n = HMAC_Init(&ctx, NULL, 0, NULL); + n += HMAC_Update(&ctx, NULL, 0); + n += HMAC_CTX_copy(&tmp, &ctx); + n += HMAC_Final(&tmp, NULL, NULL); + ])], + [AC_MSG_RESULT([yes])], + [AC_MSG_ERROR([HMAC functions return void: the OpenSSL version should be too old, please change for >= 1.0.0])]) LIBS=${LIBS_SAVED} CPPFLAGS=${CPPFLAGS_SAVED} fi