Skip to content

Commit

Permalink
added exports dir
Browse files Browse the repository at this point in the history
Added exports directory and added make target to generate a ce.cddl file containing only the cddl that is specific to tagged-concise-evidence and tagged-spdm-toc
  • Loading branch information
nedmsmith committed Jan 6, 2025
1 parent 8eb5efb commit adbeba7
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 664 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*-autogen.cddl
draft-ietf-rats-corim
exports/ce.cddl
19 changes: 11 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ SHELL := /bin/bash

CORIM_DIR := draft-ietf-rats-corim/cddl/
IMPORTS_DIR := imports/
export EXPORTS_DIR := exports/
CE_DIR := ./

include $(CORIM_DIR)corim-frags.mk
Expand All @@ -20,7 +21,7 @@ CORIM_IMPORT := $(addprefix $(IMPORTS_DIR), corim-import.cddl )

check:: check-comidx check-comidx-examples
check:: check-spdm check-spdm-examples
check:: check-ce check-ce-examples
check:: check-ce check-ce-examples exp-ce

include $(CE_DIR)ce-frags.mk
CE_DEPS := $(addprefix $(CE_DIR), $(CE_FRAGS))
Expand All @@ -33,13 +34,14 @@ SPDM_EXAMPLES := $(wildcard examples/spdm-*.diag) # spdm toc example filenames h

$(eval $(call cddl_check_template,spdm,$(SPDM_FRAGS),$(SPDM_EXAMPLES)))

CE_FRAGS := ce-start.cddl
CE_FRAGS += $(CE_DEPS)
CE_FRAGS += $(CORIM_IMPORT)
EV_FRAGS := ce-start.cddl
EV_FRAGS += $(CE_DEPS)
EV_FRAGS += $(CORIM_IMPORT)

CE_EXAMPLES := $(wildcard examples/ce-*.diag) # concise-evidence example filenames have 'ce-' prefix
EV_EXAMPLES := $(wildcard examples/ce-*.diag) # concise-evidence example filenames have 'ce-' prefix

$(eval $(call cddl_check_template,ce,$(CE_FRAGS),$(CE_EXAMPLES)))
$(eval $(call cddl_check_template,ce,$(EV_FRAGS),$(EV_EXAMPLES)))
$(eval $(call cddl_exp_template,ce,$(CE_DEPS)))

COMID_X_FRAGS := comid-x-start.cddl
COMID_X_FRAGS += $(CE_DEPS)
Expand All @@ -53,6 +55,7 @@ clean: ; rm -f $(CLEANFILES)

clean-extra: clean ; $(MAKE) -C $(CORIM_DIR) clean

export-ce: ce-autogen.cddl
exce: ce-autogen.cddl
@echo -n "copying ce.cddl to exports"
@cp $(CE_DIR)/ce-autogen.cddl exports/ce.cddl
# @cp $(CE_DIR)/ce-autogen.cddl exports/ce.cddl
$(eval $(call cddl_exports_template, exports/ce, $(CE_DEPS)))
6 changes: 3 additions & 3 deletions comid-extensions.cddl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spdm-indirect-map = {
; Flags map extensions
;
$$flags-map-extension //= (
? &(runtime-meas: 6) => bool
? &(immutable: 7) => bool
? &(tcb: 8) => bool
? &(is-runtime-meas: 6) => bool
? &(is-immutable: 7) => bool
? &(is-tcb: 8) => bool
)
Loading

0 comments on commit adbeba7

Please sign in to comment.