You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2017/11/20 15:38:10 UTC
[trafficserver] branch quic-latest updated: Make the check for HKDF
support more strict
This is an automated email from the ASF dual-hosted git repository.
maskit pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/quic-latest by this push:
new e9c499b Make the check for HKDF support more strict
e9c499b is described below
commit e9c499b297487f96e9526e5e3ebced8c1bb93fd2
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Tue Nov 21 00:36:21 2017 +0900
Make the check for HKDF support more strict
---
build/crypto.m4 | 30 +++++++++++++++++++++++++-----
lib/ts/Makefile.am | 6 +++++-
2 files changed, 30 insertions(+), 6 deletions(-)
diff --git a/build/crypto.m4 b/build/crypto.m4
index e9f8cf7..dc05e59 100644
--- a/build/crypto.m4
+++ b/build/crypto.m4
@@ -232,12 +232,32 @@ AC_DEFUN([TS_CHECK_CRYPTO_DH_GET_2048_256], [
])
AC_DEFUN([TS_CHECK_CRYPTO_HKDF], [
- enable_hkdf=yes
- AC_CHECK_HEADERS([openssl/kdf.h openssl/hkdf.h], [
- break
- ], [
- enable_hkdf=no
+ enable_hkdf=no
+ _hkdf_saved_LIBS=$LIBS
+ TS_ADDTO(LIBS, [$OPENSSL_LIBS])
+ AC_MSG_CHECKING([for EVP_PKEY_CTX_hkdf_mode])
+ AC_LINK_IFELSE(
+ [
+ AC_LANG_PROGRAM([[
+#include <openssl/kdf.h>
+ ]],
+ [[
+#ifndef EVP_PKEY_CTX_hkdf_mode
+# error no EVP_PKEY_CTX_hkdf_mode support
+#endif
+ ]])
+ ],
+ [
+ AC_MSG_RESULT([yes])
+ enable_hkdf=yes
+ ],
+ [
+ AC_MSG_RESULT([no])
])
+ AC_CHECK_FUNC(HKDF_extract, [
+ enable_hkdf=yes
+ ], [])
+ LIBS=$_hkdf_saved_LIBS
TS_ARG_ENABLE_VAR([use], [hkdf])
AC_SUBST(use_hkdf)
])
diff --git a/lib/ts/Makefile.am b/lib/ts/Makefile.am
index 370bf55..55514de 100644
--- a/lib/ts/Makefile.am
+++ b/lib/ts/Makefile.am
@@ -272,8 +272,12 @@ test_tslib_SOURCES = \
unit-tests/test_IpMap.cc \
unit-tests/test_layout.cc \
unit-tests/test_string_view.cc \
- unit-tests/test_TextView.cc \
+ unit-tests/test_TextView.cc
+
+if HAS_HKDF
+test_tslib_SOURCES += \
unit-tests/test_HKDF.cc
+endif
CompileParseRules_SOURCES = CompileParseRules.cc
--
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].