Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CoTL Example #382

Merged
merged 3 commits into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ endef # cddl_targets

$(eval $(call cddl_targets,corim,$(CORIM_FRAGS)))
$(eval $(call cddl_targets,comid,$(COMID_FRAGS)))
$(eval $(call cddl_targets,cotl,$(COTL_FRAGS)))
$(eval $(call cddl_targets,intrep,$(INTREP_FRAGS)))

cddl/concise-swid-tag.cddl: ; $(MAKE) -C cddl $(notdir $@)
Expand Down
2 changes: 2 additions & 0 deletions cddl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ check:: cbor-tags-unique
check:: check-intrep check-intrep-examples
check:: check-corim check-corim-examples
check:: check-comid check-comid-examples
check:: check-cotl check-cotl-examples

# $1: label
# $2: cddl fragments
Expand Down Expand Up @@ -63,6 +64,7 @@ endef # cddl_check_template
include corim-frags.mk

$(eval $(call cddl_check_template,comid,$(COMID_FRAGS),$(COMID_EXAMPLES)))
$(eval $(call cddl_check_template,cotl,$(COTL_FRAGS),$(COTL_EXAMPLES)))
$(eval $(call cddl_check_template,corim,$(CORIM_FRAGS),$(CORIM_EXAMPLES)))
$(eval $(call cddl_check_template,intrep,$(INTREP_FRAGS),$(INTREP_EXAMPLES)))

Expand Down
11 changes: 11 additions & 0 deletions cddl/corim-frags.mk
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,17 @@ COMID_FRAGS += concise-swid-tag.cddl

COMID_EXAMPLES := $(wildcard examples/comid-*.diag)

COTL_FRAGS := concise-tl-tag.cddl
COTL_FRAGS += validity-map.cddl
COTL_FRAGS += version-map.cddl
COTL_FRAGS += tag-id-type-choice.cddl
COTL_FRAGS += tag-identity-map.cddl
COTL_FRAGS += uuid.cddl
COTL_FRAGS += tag-version-type.cddl
COTL_FRAGS += concise-swid-tag.cddl

COTL_EXAMPLES := $(wildcard examples/cotl-*.diag)

CORIM_FRAGS := corim.cddl
CORIM_FRAGS += concise-tl-tag.cddl
CORIM_FRAGS += concise-tag-type-choice.cddl
Expand Down
21 changes: 21 additions & 0 deletions cddl/examples/cotl-1.diag
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/ concise-tl-tag / {
/ cotl.tag-identity / 0 : {
/ cotl.tag-id / 0 : h'3f06af63a93c11e4979700505690773a',
/ cotl.tag-version / 1 : 1
},
/ cotl.tags-list / 1 : [ {
/ comid.tag-id / 0 : h'3f06af63a93c11e4979700505690773e'
},
{
/ comid.tag-id / 0 : h'3f06af63a93c11e4979700505690773f',
/ comid.tag-version / 1 : 5
},
{
/ coswid.tag-id / 0 : h'3f06af63a93c11e4979700505690774f',
/ coswid.tag-version / 1 : 2
}],
/ cotl.tl-validity / 2 : {
/ cotl.not-before / 0 : "2023-02-15T00:00:00Z",
/ cotl.not-after / 1 : "2026-02-27T00:00:00Z"
}
}
Loading