Skip to content

mDL date fields are encoded as strings instead of dates #6

@juangj

Description

@juangj

Using CMWallet with https://digital-credentials.dev/ to request org.iso.18013.5.1/birth_date, I see the birth date returned as a tstr (CBOR major type 3), but the mDL spec calls for a full-date (major type 6, tag 1004). The same issue occurs for org.iso.18013.5.1/expiry_date, which should be encoded as a tdate (tag 0) or a full-date (tag 1004), but is actually encoded as tstr.

This is the CBOR I receive for birth_date:

A4                                      # map(4)
   68                                   # text(8)
      6469676573744944                  # "digestID"
   04                                   # unsigned(4)
   66                                   # text(6)
      72616E646F6D                      # "random"
   50                                   # bytes(16)
      99C1F724A397436ACBF40C2D5BC90BF0  # "\x99\xC1\xF7$\xA3\x97Cj\xCB\xF4\f-[\xC9\v\xF0"
   71                                   # text(17)
      656C656D656E744964656E746966696572 # "elementIdentifier"
   6A                                   # text(10)
      62697274685F64617465              # "birth_date"
   6C                                   # text(12)
      656C656D656E7456616C7565          # "elementValue"
   6A                                   # text(10)
      313938382D30392D3031              # "1988-09-01"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions