]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3908] Added old HMAC API detection trac3634b_base
authorFrancis Dupont <fdupont@isc.org>
Mon, 22 Jun 2015 13:26:27 +0000 (15:26 +0200)
committerFrancis Dupont <fdupont@isc.org>
Mon, 22 Jun 2015 13:26:27 +0000 (15:26 +0200)
configure.ac

index 284696564a86285603c3531aaebb6c4d4b34b1e7..ef511b45ebb132592d3b4b9671789bf2c5e5a080 100644 (file)
@@ -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 <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