# to PRODUCT_PACKAGES in
# build/target/product/core.mk
# possible executables are
-# starter - allows to control and configure the daemons from the command line
+# starter - allows to control and configure the daemon from the command line
# charon - the IKE daemon
+# scepclient - SCEP client
-# if you enable starter (see above) uncomment this line too
+# if you enable starter or scepclient (see above) uncomment the proper
+# lines here
# strongswan_BUILD_STARTER := true
+# strongswan_BUILD_SCEPCLIENT := true
# this is the list of plugins that are built into libstrongswan and charon
# also these plugins are loaded by default (if not changed in strongswan.conf)
pem xcbc hmac kernel-netlink socket-default android \
stroke eap-identity eap-mschapv2 eap-md5
+ifneq ($(strongswan_BUILD_SCEPCLIENT),)
+# plugins loaded by scepclient
+strongswan_SCEPCLIENT_PLUGINS := openssl curl fips-prf random pkcs1 pem
+endif
+
strongswan_STARTER_PLUGINS := kernel-netlink
# list of all plugins - used to enable them with the function below
strongswan_PLUGINS := $(sort $(strongswan_CHARON_PLUGINS) \
- $(strongswan_STARTER_PLUGINS))
+ $(strongswan_STARTER_PLUGINS) \
+ $(strongswan_SCEPCLIENT_PLUGINS))
# helper macros to only add source files for plugins included in the list above
# source files are relative to the android.mk that called the macro
ipsec
endif
+ifneq ($(strongswan_BUILD_SCEPCLIENT),)
+strongswan_BUILD += \
+ scepclient
+endif
+
include $(addprefix $(LOCAL_PATH)/src/,$(addsuffix /Android.mk, \
$(sort $(strongswan_BUILD))))
--- /dev/null
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+# copy-n-paste from Makefile.am
+LOCAL_SRC_FILES := \
+scepclient.c scep.c scep.h
+
+# build scepclient -------------------------------------------------------------
+
+LOCAL_C_INCLUDES += \
+ $(libvstr_PATH) \
+ $(strongswan_PATH)/src/libstrongswan
+
+LOCAL_CFLAGS := $(strongswan_CFLAGS) \
+ -DPLUGINS='"$(strongswan_SCEPCLIENT_PLUGINS)"'
+
+LOCAL_MODULE := scepclient
+
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_ARM_MODE := arm
+
+LOCAL_PRELINK_MODULE := false
+
+LOCAL_SHARED_LIBRARIES += libstrongswan
+
+include $(BUILD_EXECUTABLE)
\ No newline at end of file