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

DeconstructAttestationElements disallows unknown context tags #11247

Closed
bzbarsky-apple opened this issue Oct 30, 2021 · 0 comments · Fixed by #11946
Closed

DeconstructAttestationElements disallows unknown context tags #11247

bzbarsky-apple opened this issue Oct 30, 2021 · 0 comments · Fixed by #11946
Assignees
Labels
attestation spec Mismatch between spec and implementation

Comments

@bzbarsky-apple
Copy link
Contributor

Problem

DeconstructAttestationElements requires that no context-specific tags are present other than the ones it knows about. This means that future specification versions will not be able to add fields to the attestation-elements due to existing commissioners failing with the new devices.

Proposed Solution

Allow unknown tags, for future-proofing.

@bzbarsky-apple bzbarsky-apple added attestation spec Mismatch between spec and implementation labels Oct 30, 2021
tcarmelveilleux added a commit to tcarmelveilleux/connectedhomeip that referenced this issue Nov 17, 2021
DeviceAttestationDeconstructor was too stringent in expecting no
unknown tags at all, preventing future tags from breaking backward
compatibility when they are benign if ignored.

- Fix DeviceAttestationDeconstructor to skip unexpected tags
- Simplify logic for ensuring in-order tags
- Fix a corner case of the vendor-specific data iterator not
  caught before
- Clean-up extraction of profileNum in CHIP tags

Fixes project-chip#11247
tcarmelveilleux added a commit that referenced this issue Nov 19, 2021
* Make device attestation data parser future proof

DeviceAttestationDeconstructor was too stringent in expecting no
unknown tags at all, preventing future tags from breaking backward
compatibility when they are benign if ignored.

- Fix DeviceAttestationDeconstructor to skip unexpected tags
- Simplify logic for ensuring in-order tags
- Fix a corner case of the vendor-specific data iterator not
  caught before
- Clean-up extraction of profileNum in CHIP tags

Fixes #11247

* Restyled by clang-format

* Update src/lib/core/CHIPTLVTags.h

* Update src/credentials/DeviceAttestationVendorReserved.h

Co-authored-by: Boris Zbarsky <[email protected]>

* Add mandatory existence of timestamp

Co-authored-by: Restyled.io <[email protected]>
Co-authored-by: Boris Zbarsky <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
attestation spec Mismatch between spec and implementation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants