From 43743ea57d97c8bc92b13abc30ac0b89effd4424 Mon Sep 17 00:00:00 2001 From: Sandrine Bailleux Date: Wed, 15 Jan 2020 10:11:07 +0100 Subject: [PATCH] cert_create: Introduce COT build option It allows to select the desired chain of trust. Right now, only the TBBR CoT is available. At this stage, this build option only affects the tool itself. It is not plugged into the rest of the build system yet. To use it: > make -C tools/cert_create COT=tbbr Change-Id: I4484418f76d3c7b330d8653c978499a181534dcd Signed-off-by: Sandrine Bailleux --- tools/cert_create/Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/cert_create/Makefile b/tools/cert_create/Makefile index 76de6660b..eff929ef0 100644 --- a/tools/cert_create/Makefile +++ b/tools/cert_create/Makefile @@ -10,6 +10,7 @@ V ?= 0 DEBUG := 0 BINARY := ${PROJECT}${BIN_EXT} OPENSSL_DIR := /usr +COT := tbbr MAKE_HELPERS_DIRECTORY := ../../make_helpers/ include ${MAKE_HELPERS_DIRECTORY}build_macros.mk @@ -23,8 +24,12 @@ OBJECTS := src/cert.o \ src/main.o \ src/sha.o -# TBBR chain of trust definitions. -include src/tbbr/tbbr.mk +# Chain of trust. +ifeq (${COT},tbbr) + include src/tbbr/tbbr.mk +else + $(error Unknown chain of trust ${COT}) +endif HOSTCCFLAGS := -Wall -std=c99