Skip to content

tdate not validating as I'd expect #183

@chalford

Description

@chalford

I'm relatively inexperienced with CBOR & CDDL, so I may be interpreting the spec incorrectly, but I'm having a problem with the tdate type.

CDDL file:

root = tdate

CBOR file (as CBOR-Diag)

0("2020-02-11T09:00:00Z")

CBOR file (as base64)

dDIwMjAtMDItMTFUMDk6MDA6MDBa

My understanding was that a tdate was defined as #6.0(tstr), which is a tstr with a tag of 0. When I run validation with the above files, I get the following validation error:

[ERROR] Validation of "date.cbor" failed: error validating at cbor location : expected type tdate, got Tag(0, Text("2020-02-11T09:00:00Z"))

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions