cddl 0.8.1 → 0.8.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,5 @@
1
+ top = { topgroup }
2
+
3
+ topgroup = ( first: tstr, second: tstr,
4
+ (option1: uint //
5
+ option2: uint) )
@@ -0,0 +1,13 @@
1
+ map = {
2
+ first_group,
3
+ ? second_group,
4
+ }
5
+
6
+ first_group = ( e1, e2,)
7
+ second_group = (e3, e4, e5)
8
+
9
+ e1 = (1: uint)
10
+ e2 = (2: tstr)
11
+ e3 = (3: tdate)
12
+ e4 = (4: tstr)
13
+ e5 = (5: uint)
@@ -0,0 +1,2 @@
1
+ foo = { foo: bool, "foob" => bar, * tstr => uint }
2
+ bar = "blba"
@@ -0,0 +1,9 @@
1
+ BLEIdentification = {
2
+ ? 0 : bool,
3
+ ? 1 : bool,
4
+ ? 10 : bstr,
5
+ ; Indicates support for Peripheral server mode
6
+ ; Indicates support for Central client mode
7
+ ; Optional UUID for peripheral server mode
8
+ ? 11 : bstr ; Optional MAC address for peripheral server mode
9
+ }
@@ -0,0 +1,54 @@
1
+ deviceEngagement = [
2
+ uint,
3
+ security,
4
+ transferMethods,
5
+ options,
6
+ ? proprietary
7
+ ]
8
+ security = [
9
+ bstr,
10
+ uint, uint
11
+ ]
12
+ transferMethods = [
13
+ * transferMethod
14
+ ]
15
+ options = {
16
+ ?"WebAPI" : WebAPI,
17
+ ?"OIDC" : OIDC,
18
+ ?"compact" : bool
19
+ }
20
+ proprietary = {
21
+ * tstr => any
22
+ }
23
+ transferMethod = [
24
+ uint,
25
+ uint, * any
26
+ ]
27
+ OIDC = [
28
+ uint,
29
+ tstr,
30
+ tstr
31
+ ]
32
+ WebAPI = [
33
+ uint,
34
+ tstr, tstr
35
+ ]
36
+ ; Version of device engagement structure, currently 1
37
+ ; Security structure
38
+ ; Transfer methods
39
+ ; Optional elements
40
+ ; Proprietary elements
41
+ ; mDL public ephemeral key, mDL.EPub
42
+ ; curve identifier, see Table 23
43
+ ; cipher suite identifier, see Table 22
44
+ ; details for transfer methods
45
+ ; any number of elements
46
+ ; type
47
+ ; version
48
+ ; specific option(s) to the type
49
+ ; version
50
+ ; url
51
+ ; token
52
+ ; version
53
+ ; url
54
+ ; token
@@ -0,0 +1,11 @@
1
+ driving_privileges = [
2
+ * driving_privilege
3
+ ]
4
+ driving_privilege = {
5
+ vehicle_category_code: tstr
6
+ ?issue_date: #6.0(tstr)
7
+ ?expiry_date: #6.0(tstr)
8
+ ?code: tstr
9
+ ?sign: tstr
10
+ ?value: int
11
+ }
@@ -0,0 +1,20 @@
1
+ MobileSecurityObject = {
2
+ "DigestAlgorithm" : tstr,
3
+ "ValueDigests" : ValueDigests,
4
+ "DeviceKey" : COSE_Key,
5
+ "DocType" : tstr
6
+ }
7
+ ValueDigests = {
8
+ "NameSpaces" : NameSpaces
9
+ }
10
+ NameSpaces = {
11
+ + NameSpace => DigestIDs
12
+ }
13
+ DigestIDs = {
14
+ + DigestID => Digest
15
+ }
16
+ NameSpace = tstr
17
+ DigestID = uint
18
+ Digest = bstr
19
+
20
+ COSE_Key = "COSE_Key"
@@ -0,0 +1,26 @@
1
+ Request = {
2
+ "Version" : tstr,
3
+ "DocRequests" : [+ DocRequest]
4
+ }
5
+ DocRequest = {
6
+ "ItemsRequest" : ItemsRequest,
7
+ ? "ReaderAuth" : COSE_Sign1
8
+ }
9
+ ItemsRequest = {
10
+ ? "DocType" : DocType,
11
+ "NameSpaces" : NameSpaces,
12
+ ? "RequestInfo" : {* tstr => any}
13
+ }
14
+ NameSpaces = {
15
+ + NameSpace => DataItemNames
16
+ }
17
+ DocType = tstr
18
+ NameSpace = tstr
19
+ DataItemNames = [ + tstr ]
20
+ ; Additional info the reader wants to provide
21
+ ; Requested data elements for each NameSpace
22
+ ; See 7.3.2
23
+ ; See 7.3.3
24
+ ; See Table 2
25
+
26
+ COSE_Sign1 = "COSE_Sign1"
@@ -0,0 +1,66 @@
1
+ Response = {
2
+ "Version" : tstr,
3
+ ? "Documents" : Documents,
4
+ ? "Error" : int
5
+ }
6
+ Documents = {
7
+ + DocType => ResponseData
8
+ }
9
+ ; Version of the structure, currently 1.0
10
+ ; Returned documents, may be absent if Error is present
11
+ ; Error codes according to Table 8
12
+ ResponseData = {
13
+ "IssuerSigned" : IssuerSigned, ; Responded data elements signed by the issuer
14
+ "DeviceSigned" : DeviceSigned, ; Responded data elements signed by the mDL
15
+ "Errors" : Errors
16
+ }
17
+ IssuerSigned = {
18
+ "NameSpaces" : IssuerNameSpaces,
19
+ "IssuerAuth" : COSE_Sign1 ; The payload is the MobileSecurityObject, see 9.2.1.4
20
+ }
21
+ IssuerNameSpaces = {
22
+ + NameSpace => [ + IssuerSignedItem ]
23
+ }
24
+ IssuerSignedItem = [
25
+ uint,
26
+ bstr,
27
+ tstr,
28
+ any
29
+ ]
30
+ DeviceSigned = {
31
+ "NameSpaces" : DeviceNameSpaces, ; Currently only online token and URL are defined as DeviceSignedItems
32
+ "DeviceAuth" : DeviceAuth
33
+ }
34
+ DeviceNameSpaces = {
35
+ * NameSpace => DeviceSignedItems
36
+ }
37
+ DeviceSignedItems = {
38
+ + DataItemName => DataItemValue
39
+ }
40
+ DeviceAuth = {
41
+ "Signature" : COSE_Sign1, //
42
+ ; Use a nil value for the payload, the detached content is the DeviceAuthentication structure, see 9.2.2.4
43
+ "MAC" : COSE_Mac0
44
+ }
45
+ Errors = {
46
+ * NameSpace => [ + ErrorItem ]
47
+ }
48
+ ErrorItem = {
49
+ DataItemName => ErrorCode
50
+ }
51
+ DocType = tstr
52
+ NameSpace = tstr
53
+ DataItemName = tstr
54
+ DataItemValue = any
55
+ ErrorCode = int
56
+ ; See table 9
57
+ ; See 7.3.2
58
+ ; See 7.3.3
59
+ ; See Table 2
60
+ ; See Table 2
61
+ ; Error codes according to Table 9
62
+ ; Structures used for DeviceAuth signature or MAC generation, see 9.2.2.4
63
+ ; Structures used for MobileSecurityObject, see 9.2.1.4
64
+
65
+ COSE_Sign1 = "COSE_Sign1"
66
+ COSE_Mac0 = "COSE_Mac0"
@@ -0,0 +1,11 @@
1
+ driving_privileges = [
2
+ * driving_privilege
3
+ ]
4
+ driving_privilege = {
5
+ vehicle_category_code: tstr
6
+ ?issue_date: #6.0(tstr)
7
+ ?expiry_date: #6.0(tstr)
8
+ ?code: tstr
9
+ ?sign: tstr
10
+ ?value: int
11
+ }
@@ -0,0 +1 @@
1
+ decimal-monetary-value = text .regexp "-?[0-9]+(\\.[0-9]+)?"
@@ -0,0 +1,2 @@
1
+ multipart-core = [* multipart-part]
2
+ multipart-part = (type: uint .size 2, part: bytes / null)
@@ -0,0 +1,7 @@
1
+ foo = { + $$elements }
2
+
3
+ $$elements //= element1
4
+ $$elements //= element2
5
+
6
+ element1 = (1: "a")
7
+ element2 = (2: "b")
@@ -0,0 +1,3 @@
1
+ foo = arr<mapa<arr<int>, arr<text>>>
2
+ arr<X> = [* X]
3
+ mapa<X, Y> = {a: X, b: Y}
@@ -0,0 +1,14 @@
1
+
2
+ foo = { 1*relement }
3
+
4
+ context-element = 4711
5
+
6
+ relement = $$relement .within relement-generic
7
+
8
+ relement-generic = ( relement-codepoint => relement-value ) ; [1]
9
+ relement-codepoint = uint ; [1]
10
+ relement-value = any ; [1]
11
+
12
+ $$relement //= ( &(sender-loop-count:1) => 1..255 ) ; [2]
13
+ $$relement //= ( &(srv-element:2) => context-element ) ; [2]
14
+
@@ -0,0 +1,11 @@
1
+ foo = foo-specific .within foo-generic
2
+ foo-specific = { 1*$$relement }
3
+ foo-generic = { 1*relement-generic }
4
+
5
+ relement-generic = ( relement-codepoint => relement-value ) ; [1]
6
+ relement-codepoint = uint ; [1]
7
+ relement-value = any ; [1]
8
+
9
+ $$relement //= ( &(sender-loop-count:1) => 1..255 ) ; [2]
10
+ $$relement //= ( &(srv-element:2) => context-element ) ; [2]
11
+ context-element = "and so on"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cddl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carsten Bormann
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-12 00:00:00.000000000 Z
11
+ date: 2020-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cbor-diag
@@ -97,17 +97,32 @@ files:
97
97
  - test-data/7071-concise-cut.cddl
98
98
  - test-data/7071-concise.cddl
99
99
  - test-data/7071-verbose.cddl
100
+ - test-data/7807.cddl
100
101
  - test-data/a.cddl
102
+ - test-data/abignum.cddl
103
+ - test-data/ambig.cddl
101
104
  - test-data/b.cddl
105
+ - test-data/badaddr.cddl
102
106
  - test-data/basic_syntax_example.cddl
107
+ - test-data/bpv7.cddl
108
+ - test-data/bpv7a.cddl
109
+ - test-data/bpv7b.cddl
103
110
  - test-data/cdni-ct.cddl
111
+ - test-data/coral.cddl
112
+ - test-data/coral1.cddl
113
+ - test-data/coral2.cddl
114
+ - test-data/coral3.cddl
104
115
  - test-data/cose.cddl
105
116
  - test-data/dcaf.cddl
106
117
  - test-data/dcaf1.cddl
118
+ - test-data/dotsize.cddl
107
119
  - test-data/extractor-demo.cddl
120
+ - test-data/feat1.cddl
121
+ - test-data/foo.cddl
108
122
  - test-data/grasp-01-extract.cddl
109
123
  - test-data/grasp-01-test.cddl
110
124
  - test-data/grasp-01.cddl
125
+ - test-data/grasp-09.cddl
111
126
  - test-data/grasp-v1.cddl
112
127
  - test-data/grasp-v2X.cddl
113
128
  - test-data/ifmap-base-2.0v17.cddl
@@ -115,10 +130,29 @@ files:
115
130
  - test-data/ifmap-metadata-2.2v9_fh-cabo.cddl
116
131
  - test-data/ifmap2.cddl
117
132
  - test-data/jcr-ex.cddl
133
+ - test-data/jim-cut-2.cddl
134
+ - test-data/jim-cut.cddl
135
+ - test-data/jsoniodef.cddl
136
+ - test-data/kevin5.cddl
137
+ - test-data/map-group.cddl
138
+ - test-data/mapkey.cddl
139
+ - test-data/mdl-ble.cddl
140
+ - test-data/mdl-deve.cddl
141
+ - test-data/mdl-dp.cddl
142
+ - test-data/mdl-mso.cddl
143
+ - test-data/mdl-request.cddl
144
+ - test-data/mdl-response.cddl
145
+ - test-data/mdl.cddl
118
146
  - test-data/minimal.cddl
147
+ - test-data/mon-val.cddl
148
+ - test-data/multipart-ct.cddl
149
+ - test-data/named-group.cddl
119
150
  - test-data/patch1.cddl
120
151
  - test-data/reused_named_group.cddl
121
152
  - test-data/structure.cddl
153
+ - test-data/test-gen.cddl
154
+ - test-data/toerless0.cddl
155
+ - test-data/toerless1.cddl
122
156
  - test-data/two_anonymous_groups.cddl
123
157
  - test-data/wrong1.cddl
124
158
  - test-data/wrong1a.cddl
@@ -130,7 +164,7 @@ homepage: http://github.com/cabo/cddl
130
164
  licenses:
131
165
  - MIT
132
166
  metadata: {}
133
- post_install_message:
167
+ post_install_message:
134
168
  rdoc_options: []
135
169
  require_paths:
136
170
  - lib
@@ -145,9 +179,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
179
  - !ruby/object:Gem::Version
146
180
  version: '0'
147
181
  requirements: []
148
- rubyforge_project:
149
- rubygems_version: 2.6.7
150
- signing_key:
182
+ rubygems_version: 3.1.2
183
+ signing_key:
151
184
  specification_version: 4
152
185
  summary: CDDL generator and validator.
153
186
  test_files: []