Introduce TKM specific charon daemon (charon-tkm)
Analogous to charon-nm the charon-tkm daemon is a specialized charon instance used in combination with the trusted key manager (TKM) written in Ada. The charon-tkm is basically a copy of the charon-nm code which will register it's own TKM specific plugins. The daemon binary is built using the gprbuild utility. This is needed because it uses the tkm-rpc Ada library and consequently the Ada runtime. gprbuild takes care of the complete binding and linker steps required to properly initialize the Ada runtime.
This commit is contained in:
committed by
Tobias Brunner
parent
4dc3ef94a1
commit
559fe48c50
@@ -0,0 +1,63 @@
|
||||
SRC = $(top_builddir)/src
|
||||
|
||||
# includes relative to obj directory
|
||||
INCLUDES = \
|
||||
-include $(top_builddir)/config.h \
|
||||
-I../$(SRC)/libstrongswan \
|
||||
-I../$(SRC)/libhydra \
|
||||
-I../$(SRC)/libcharon
|
||||
|
||||
LIBLD = \
|
||||
-L$(SRC)/libstrongswan/.libs \
|
||||
-L$(SRC)/libhydra/.libs \
|
||||
-L$(SRC)/libcharon/.libs
|
||||
LIBPT = $(SRC)/libstrongswan/.libs:$(SRC)/libhydra/.libs:$(SRC)/libcharon/.libs
|
||||
LIBFL = -lstrongswan -lhydra -lcharon
|
||||
|
||||
DEFS += -DPLUGINS=\""$(PLUGINS)\"" -DIPSEC_PIDDIR=\"${piddir}\"
|
||||
|
||||
BUILD_OPTS = \
|
||||
-cargs $(INCLUDES) $(DEFS) \
|
||||
-largs $(LIBLD) $(LIBFL)
|
||||
|
||||
# plugins to enable
|
||||
PLUGINS = \
|
||||
aes \
|
||||
constraints \
|
||||
gmp \
|
||||
hmac \
|
||||
kernel-netlink \
|
||||
nonce \
|
||||
pem \
|
||||
pkcs1 \
|
||||
pkcs8 \
|
||||
random \
|
||||
sha1 \
|
||||
sha2 \
|
||||
stroke \
|
||||
socket-default \
|
||||
x509
|
||||
|
||||
all: build_charon
|
||||
|
||||
build_charon: build_charon.gpr src/charon-tkm.c
|
||||
@$(GPRBUILD) -p $< $(BUILD_OPTS)
|
||||
|
||||
build_tests: build_tests.gpr
|
||||
@$(GPRBUILD) -p $< $(BUILD_OPTS) -cargs @CHECK_CFLAGS@ -largs @CHECK_LIBS@
|
||||
|
||||
if UNITTESTS
|
||||
check: build_tests
|
||||
@LD_LIBRARY_PATH=$(LIBPT) obj/test_runner
|
||||
else
|
||||
check:
|
||||
@echo "reconfigure with --enable-unit-tests"
|
||||
endif
|
||||
|
||||
install: build_charon
|
||||
$(INSTALL) -m 755 obj/charon-tkm $(DESTDIR)$(ipsecdir)
|
||||
|
||||
clean:
|
||||
rm -rf obj
|
||||
|
||||
EXTRA_DIST = build_charon.gpr build_common.gpr build_tests.gpr src tests
|
||||
Reference in New Issue
Block a user