])],
[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 <openssl/hmac.h>],
+ [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