mirror of
https://github.com/opnsense/src.git
synced 2026-03-27 21:23:11 -04:00
Used by loader and veriexec Depends on libbearssl Reviewed by: emaste Sponsored by: Juniper Networks Differential Revision: D16335
48 lines
1.4 KiB
Makefile
48 lines
1.4 KiB
Makefile
# $FreeBSD$
|
|
|
|
# decode OpenPGP signatures per rfc4880
|
|
.PATH: ${.PARSEDIR}
|
|
|
|
CFLAGS+= -DUSE_BEARSSL
|
|
|
|
BRSSL_SRCS+= dearmor.c
|
|
SRCS+= \
|
|
decode.c \
|
|
opgp_key.c \
|
|
opgp_sig.c
|
|
|
|
opgp_key.o opgp_key.po opgp_key.pico: ta_asc.h
|
|
|
|
# Generate ta_asc.h containing one or more OpenPGP trust anchors.
|
|
#
|
|
# Since each trust anchor must be processed individually,
|
|
# we create ta_ASC as a list of pointers to them.
|
|
#
|
|
# If we are doing self-tests, we define another arrary vc_ASC
|
|
# containing pointers to a signature of each trust anchor.
|
|
# It is assumed that these v*.asc files are named similarly to
|
|
# the appropriate t*.asc so that the relative order of vc_ASC
|
|
# entries matches ta_ASC.
|
|
#
|
|
ta_asc.h: ${.ALLTARGETS:M[tv]*.asc:O:u}
|
|
.if ${VE_SIGNATURE_LIST:MOPENPGP} != ""
|
|
@( echo '/* Autogenerated - DO NOT EDIT!!! */'; echo; \
|
|
echo "#define HAVE_TA_ASC 1"; \
|
|
set -- ${.ALLSRC:Mt*.asc:@f@$f ${f:T:R}@}; \
|
|
while test $$# -ge 2; do \
|
|
file2c -sx "static const char $$2[] = {" ', 0x00 };' < $$1; \
|
|
shift 2; \
|
|
done; \
|
|
echo 'static const char *ta_ASC[] = { ${.ALLSRC:Mt*.asc:T:R:ts,}, NULL };'; \
|
|
echo; ) > ${.TARGET}
|
|
.if ${VE_SELF_TESTS} != "no"
|
|
@( echo "#define HAVE_VC_ASC 1"; \
|
|
set -- ${.ALLSRC:Mv*.asc:@f@$f ${f:T:R}@}; \
|
|
while test $$# -ge 2; do \
|
|
file2c -sx "static const char $$2[] = {" ', 0x00 };' < $$1; \
|
|
shift 2; \
|
|
done; \
|
|
echo 'static const char *vc_ASC[] = { ${.ALLSRC:Mv*.asc:T:R:ts,}, NULL };'; \
|
|
echo; ) >> ${.TARGET}
|
|
.endif
|
|
.endif
|