CFLAGS_embedded = -DEMBED_ALL="$(EMBED_ALL)"
-# List of trusted root certificates
+# List of trusted root certificate configuration
#
TRUSTED_LIST := $(BIN)/.trusted.list
ifeq ($(wildcard $(TRUSTED_LIST)),)
else
TRUST_OLD := $(shell cat $(TRUSTED_LIST))
endif
-ifneq ($(TRUST_OLD),$(TRUST))
-$(shell $(ECHO) "$(TRUST)" > $(TRUSTED_LIST))
+TRUST_CFG := $(TRUST) $(TRUST_EXT)
+ifneq ($(TRUST_OLD),$(TRUST_CFG))
+$(shell $(ECHO) "$(TRUST_CFG)" > $(TRUSTED_LIST))
endif
$(TRUSTED_LIST) : $(MAKEDEPS)
rootcert_DEPS += $(TRUSTED_FILES) $(TRUSTED_LIST)
-CFLAGS_rootcert = $(if $(TRUSTED_FPS),-DTRUSTED="$(TRUSTED_FPS)")
+CFLAGS_rootcert += $(if $(TRUST_EXT),-DALLOW_TRUST_OVERRIDE=$(TRUST_EXT))
+CFLAGS_rootcert += $(if $(TRUSTED_FPS),-DTRUSTED="$(TRUSTED_FPS)")
# List of embedded certificates
#
#define FINGERPRINT_LEN SHA256_DIGEST_SIZE
/* Allow trusted certificates to be overridden if not explicitly specified */
-#ifdef TRUSTED
-#define ALLOW_TRUST_OVERRIDE 0
-#else
-#define ALLOW_TRUST_OVERRIDE 1
+#ifndef ALLOW_TRUST_OVERRIDE
+ #ifdef TRUSTED
+ #define ALLOW_TRUST_OVERRIDE 0
+ #else
+ #define ALLOW_TRUST_OVERRIDE 1
+ #endif
#endif
/* Use iPXE root CA if no trusted certificates are explicitly specified */