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 13:59:02 UTC
[trafficserver] branch quic-latest updated: Add a check for kdf.h
and hkdf.h
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 3fac60a Add a check for kdf.h and hkdf.h
3fac60a is described below
commit 3fac60a83568d2ba00c2b71b1cde7a4790b05442
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Mon Nov 20 22:57:22 2017 +0900
Add a check for kdf.h and hkdf.h
---
build/crypto.m4 | 11 +++++++++++
configure.ac | 4 ++++
lib/ts/Makefile.am | 22 +++++++++++++---------
3 files changed, 28 insertions(+), 9 deletions(-)
diff --git a/build/crypto.m4 b/build/crypto.m4
index 0405671..e9f8cf7 100644
--- a/build/crypto.m4
+++ b/build/crypto.m4
@@ -231,6 +231,17 @@ AC_DEFUN([TS_CHECK_CRYPTO_DH_GET_2048_256], [
AC_SUBST(use_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
+ ])
+ TS_ARG_ENABLE_VAR([use], [hkdf])
+ AC_SUBST(use_hkdf)
+])
+
AC_DEFUN([TS_CHECK_CRYPTO_TLS13], [
enable_tls13=yes
_tls13_saved_LIBS=$LIBS
diff --git a/configure.ac b/configure.ac
index 4bfaea2..f5e5ca4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1137,6 +1137,10 @@ TS_CHECK_CRYPTO_SET_RBIO
# Check for DH_get_2048_256
TS_CHECK_CRYPTO_DH_GET_2048_256
+# Check for HKDF support
+TS_CHECK_CRYPTO_HKDF
+AM_CONDITIONAL([HAS_HKDF], [test "x$enable_hkdf" = "xyes"])
+
# Check for TLS 1.3 support
TS_CHECK_CRYPTO_TLS13
diff --git a/lib/ts/Makefile.am b/lib/ts/Makefile.am
index 5062644..370bf55 100644
--- a/lib/ts/Makefile.am
+++ b/lib/ts/Makefile.am
@@ -44,12 +44,6 @@ libtsutil_la_LIBADD = \
@LIBCAP@ \
-lc
-if OPENSSL_IS_BORINGSSL
-HKDF_impl = HKDF_boringssl.cc
-else
-HKDF_impl = HKDF_openssl.cc
-endif
-
libtsutil_la_SOURCES = \
Allocator.h \
Arena.cc \
@@ -79,9 +73,6 @@ libtsutil_la_SOURCES = \
HashSip.cc \
HashSip.h \
History.h \
- HKDF.h \
- HKDF.cc \
- $(HKDF_impl) \
HostLookup.cc \
HostLookup.h \
hugepages.cc \
@@ -209,6 +200,19 @@ libtsutil_la_SOURCES = \
X509HostnameValidator.cc \
X509HostnameValidator.h
+if HAS_HKDF
+if OPENSSL_IS_BORINGSSL
+HKDF_impl = HKDF_boringssl.cc
+else
+HKDF_impl = HKDF_openssl.cc
+endif
+libtsutil_la_SOURCES += \
+ HKDF.h \
+ HKDF.cc \
+ $(HKDF_impl)
+endif
+
+
#test_UNUSED_SOURCES = \
# load_http_hdr.cc \
# IntrusivePtrTest.cc \
--
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].