Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 2 additions & 3 deletions cddl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ examples/corim-4.diag: examples/corim-4.sig examples/corim-4.diag.tmpl examples/
include corim-frags.mk
COMID_START := concise-mid-tag
CORIM_START := tagged-corim-map
$(eval $(call cddl_check_template,comid,$(COMID_FRAGS),$(COMID_EXAMPLES),$(COMID_START)))
$(eval $(call cddl_check_template,comid,$(COMID_FRAGS) $(IMPORT_FRAGS),$(COMID_EXAMPLES),$(COMID_START)))
#$(eval $(call cddl_check_template,cotl,$(COTL_FRAGS),$(COTL_EXAMPLES)))
$(eval $(call cddl_check_template,corim,$(CORIM_FRAGS),$(CORIM_EXAMPLES),$(CORIM_START)))
$(eval $(call cddl_check_template,corim,$(CORIM_FRAGS) $(IMPORT_FRAGS),$(CORIM_EXAMPLES),$(CORIM_START)))

GITHUB := https://raw.githubusercontent.com/
COSWID_REPO := sacmwg/draft-ietf-sacm-coswid/master
Expand All @@ -52,7 +52,6 @@ concise-swid-tag.cddl: ; $(curl) -O $(COSWID_REPO_URL)/$@
CLEANFILES += concise-swid-tag.cddl

# Make exports - used by cddl-releases
IMPORT_FRAGS := concise-swid-tag.cddl
$(eval $(call cddl_exp_template,dice-corim,$(CORIM_FRAGS),$(EXPORTS_DIR),$(IMPORT_FRAGS)))
AUTOGEN_FRAGS := $(addprefix $(DC_DIR), corim-autogen.cddl)
AUTOGEN_EXPORTS := $(addprefix $(EXPORTS_DIR), corim-autogen.cddl)
Expand Down
2 changes: 1 addition & 1 deletion cddl/concise-tag-type-choice.cddl
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
$concise-tag-type-choice /= tagged-concise-swid-tag
;$concise-tag-type-choice /= tagged-concise-swid-tag
$concise-tag-type-choice /= tagged-concise-mid-tag
;$concise-tag-type-choice /= tagged-concise-tl-tag
5 changes: 3 additions & 2 deletions cddl/corim-frags.mk
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ COMID_FRAGS += ueid.cddl
COMID_FRAGS += uuid.cddl
COMID_FRAGS += version-map.cddl
COMID_FRAGS += digest.cddl
COMID_FRAGS += integrity-registers.cddl
COMID_FRAGS += concise-swid-tag.cddl
#COMID_FRAGS += integrity-registers.cddl

IMPORT_FRAGS += concise-swid-tag.cddl

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

Expand Down
280 changes: 0 additions & 280 deletions cddl/exports/dice-corim.cddl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ concise-tl-tag = {
&(tl-validity: 2) => validity-map
}

$concise-tag-type-choice /= tagged-concise-swid-tag
$concise-tag-type-choice /= tagged-concise-mid-tag

corim-entity-map =
Expand Down Expand Up @@ -360,282 +359,3 @@ digest = [

digests-type = [ + digest ]

integrity-register-id-type-choice = uint / text

integrity-registers = {
+ integrity-register-id-type-choice => digests-type
}

concise-swid-tag = {
tag-id => text / bstr .size 16,
tag-version => integer,
? corpus => bool,
? patch => bool,
? supplemental => bool,
software-name => text,
? software-version => text,
? version-scheme => $version-scheme,
? media => text,
? software-meta => one-or-more<software-meta-entry>,
entity => one-or-more<entity-entry>,
? link => one-or-more<link-entry>,
? payload-or-evidence,
* $$coswid-extension,
global-attributes,
}

payload-or-evidence //= ( payload => payload-entry )
payload-or-evidence //= ( evidence => evidence-entry )

any-uri = uri
label = text / int

$version-scheme /= multipartnumeric
$version-scheme /= multipartnumeric-suffix
$version-scheme /= alphanumeric
$version-scheme /= decimal
$version-scheme /= semver
$version-scheme /= int / text

any-attribute = (
label => one-or-more<text> / one-or-more<int>
)

one-or-more<T> = T / [ 2* T ]

global-attributes = (
? lang => text,
* any-attribute,
)

hash-entry = [
hash-alg-id: int,
hash-value: bytes,
]

entity-entry = {
entity-name => text,
? reg-id => any-uri,
role => one-or-more<$role>,
? thumbprint => hash-entry,
* $$entity-extension,
global-attributes,
}

$role /= tag-creator
$role /= software-creator
$role /= aggregator
$role /= distributor
$role /= licensor
$role /= maintainer
$role /= int / text

link-entry = {
? artifact => text,
href => any-uri,
? media => text,
? ownership => $ownership,
rel => $rel,
? media-type => text,
? use => $use,
* $$link-extension,
global-attributes,
}

$ownership /= shared
$ownership /= private
$ownership /= abandon
$ownership /= int / text

$rel /= ancestor
$rel /= component
$rel /= feature
$rel /= installationmedia
$rel /= packageinstaller
$rel /= parent
$rel /= patches
$rel /= requires
$rel /= see-also
$rel /= supersedes
$rel /= supplemental
$rel /= -256..64436 / text

$use /= optional
$use /= required
$use /= recommended
$use /= int / text

software-meta-entry = {
? activation-status => text,
? channel-type => text,
? colloquial-version => text,
? description => text,
? edition => text,
? entitlement-data-required => bool,
? entitlement-key => text,
? generator => text / bstr .size 16,
? persistent-id => text,
? product => text,
? product-family => text,
? revision => text,
? summary => text,
? unspsc-code => text,
? unspsc-version => text,
* $$software-meta-extension,
global-attributes,
}

path-elements-group = ( ? directory => one-or-more<directory-entry>,
? file => one-or-more<file-entry>,
)

resource-collection = (
path-elements-group,
? process => one-or-more<process-entry>,
? resource => one-or-more<resource-entry>,
* $$resource-collection-extension,
)

file-entry = {
filesystem-item,
? size => uint,
? file-version => text,
? hash => hash-entry,
* $$file-extension,
global-attributes,
}

directory-entry = {
filesystem-item,
? path-elements => { path-elements-group },
* $$directory-extension,
global-attributes,
}

process-entry = {
process-name => text,
? pid => integer,
* $$process-extension,
global-attributes,
}

resource-entry = {
type => text,
* $$resource-extension,
global-attributes,
}

filesystem-item = (
? key => bool,
? location => text,
fs-name => text,
? root => text,
)

payload-entry = {
resource-collection,
* $$payload-extension,
global-attributes,
}

evidence-entry = {
resource-collection,
? date => integer-time,
? device-id => text,
? location => text,
* $$evidence-extension,
global-attributes,
}

integer-time = #6.1(int)

tag-id = 0
software-name = 1
entity = 2
evidence = 3
link = 4
software-meta = 5
payload = 6
hash = 7
corpus = 8
patch = 9
media = 10
supplemental = 11
tag-version = 12
software-version = 13
version-scheme = 14
lang = 15
directory = 16
file = 17
process = 18
resource = 19
size = 20
file-version = 21
key = 22
location = 23
fs-name = 24
root = 25
path-elements = 26
process-name = 27
pid = 28
type = 29
entity-name = 31
reg-id = 32
role = 33
thumbprint = 34
date = 35
device-id = 36
artifact = 37
href = 38
ownership = 39
rel = 40
media-type = 41
use = 42
activation-status = 43
channel-type = 44
colloquial-version = 45
description = 46
edition = 47
entitlement-data-required = 48
entitlement-key = 49
generator = 50
persistent-id = 51
product = 52
product-family = 53
revision = 54
summary = 55
unspsc-code = 56
unspsc-version = 57

multipartnumeric = 1
multipartnumeric-suffix = 2
alphanumeric = 3
decimal = 4
semver = 16384

tag-creator=1
software-creator=2
aggregator=3
distributor=4
licensor=5
maintainer=6

abandon=1
private=2
shared=3

ancestor=1
component=2
feature=3
installationmedia=4
packageinstaller=5
parent=6
patches=7
requires=8
see-also=9
supersedes=10

optional=1
required=2
recommended=3