From 1ce9af6ccfa3136e62d0c429adb38460bece058f Mon Sep 17 00:00:00 2001 From: Tan En De Date: Sat, 15 Oct 2022 16:47:57 +0800 Subject: [PATCH] package/libkcapi: support enabling lib-asym and lib-kpp Add Kconfig options to allow enabling asymmetric cipher support (--enable-lib-asym) and key protocol primitives support (--enable-lib-kpp) in library. Signed-off-by: Tan En De Signed-off-by: Thomas Petazzoni --- package/libkcapi/Config.in | 14 ++++++++++++++ package/libkcapi/libkcapi.mk | 12 ++++++++++++ 2 files changed, 26 insertions(+) diff --git a/package/libkcapi/Config.in b/package/libkcapi/Config.in index 8f2cf7ecc4..bf9c95270c 100644 --- a/package/libkcapi/Config.in +++ b/package/libkcapi/Config.in @@ -8,6 +8,13 @@ config BR2_PACKAGE_LIBKCAPI if BR2_PACKAGE_LIBKCAPI +config BR2_PACKAGE_LIBKCAPI_ASYM + bool "build asymmetric ciphers library" + help + Using this library requires the Linux kernel to be patched + with libkcapi Linux kernel patches found in libkcapi + kernel-patches/ directory. + config BR2_PACKAGE_LIBKCAPI_DGSTAPP bool "build dgst application" @@ -21,6 +28,13 @@ config BR2_PACKAGE_LIBKCAPI_HASHER comment "hasher application needs a toolchain w/ dynamic library" depends on BR2_STATIC_LIBS +config BR2_PACKAGE_LIBKCAPI_KPP + bool "build KPP library" + help + Using this library requires the Linux kernel to be patched + with libkcapi Linux kernel patches found in libkcapi + kernel-patches/ directory. + config BR2_PACKAGE_LIBKCAPI_RNGAPP bool "build rng read application" diff --git a/package/libkcapi/libkcapi.mk b/package/libkcapi/libkcapi.mk index c6e58c6a9b..e88928a74d 100644 --- a/package/libkcapi/libkcapi.mk +++ b/package/libkcapi/libkcapi.mk @@ -17,6 +17,12 @@ LIBKCAPI_CONF_ENV = \ ac_cv_path_XMLTO="" LIBKCAPI_MAKE_OPTS = CPPFLAGS="$(TARGET_CPPFLAGS)" +ifeq ($(BR2_PACKAGE_LIBKCAPI_ASYM),y) +LIBKCAPI_CONF_OPTS += --enable-lib-asym +else +LIBKCAPI_CONF_OPTS += --disable-lib-asym +endif + ifeq ($(BR2_PACKAGE_LIBKCAPI_DGSTAPP),y) LIBKCAPI_CONF_OPTS += --enable-kcapi-dgstapp else @@ -35,6 +41,12 @@ else LIBKCAPI_CONF_OPTS += --disable-kcapi-hasher endif +ifeq ($(BR2_PACKAGE_LIBKCAPI_KPP),y) +LIBKCAPI_CONF_OPTS += --enable-lib-kpp +else +LIBKCAPI_CONF_OPTS += --disable-lib-kpp +endif + ifeq ($(BR2_PACKAGE_LIBKCAPI_RNGAPP),y) LIBKCAPI_CONF_OPTS += --enable-kcapi-rngapp else