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

fix(data-formats): use serde_tuple serializer for error messages #629

Merged
merged 1 commit into from
Mar 1, 2024

Conversation

mmartinv
Copy link
Contributor

Use serde_tuple to serialize/deserialize the error messages
as a CBOR arrays instead of a CBOR maps as described in the
FIDO Device Onboard Specification.

Fixes: #620

Signed-off-by: Miguel Martín [email protected]

@7flying
Copy link
Contributor

7flying commented Feb 27, 2024

Can we add some integration tests to check that the ErrorMessage structs are indeed serialised as arrays instead of maps?

Copy link
Contributor

@7flying 7flying left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Se comment above

@mmartinv mmartinv force-pushed the fix-cbor-error-serialization branch from 8bb1e0c to e488946 Compare February 29, 2024 10:08
data-formats/src/messages/v11/error.rs Dismissed Show dismissed Hide dismissed
data-formats/src/messages/v10/error.rs Dismissed Show dismissed Hide dismissed
@mmartinv mmartinv force-pushed the fix-cbor-error-serialization branch from e488946 to 33f03d2 Compare February 29, 2024 10:13
@mmartinv mmartinv changed the title fix(data-formats): Use correct CBOR serializer for Error messages fix(data-formats): Use serde_tuple serializer for Error messages Feb 29, 2024
@mmartinv mmartinv changed the title fix(data-formats): Use serde_tuple serializer for Error messages fix(data-formats): Use serde_tuple serializer for Error messages Feb 29, 2024
@mmartinv mmartinv changed the title fix(data-formats): Use serde_tuple serializer for Error messages fix(data-formats): use serde_tuple serializer for Error messages Feb 29, 2024
@mmartinv mmartinv changed the title fix(data-formats): use serde_tuple serializer for Error messages fix(data-formats): use serde_tuple serializer for error messages Feb 29, 2024
@mmartinv mmartinv requested a review from 7flying February 29, 2024 10:34
Use `serde_tuple` to serialize/deserialize the error messages
as a CBOR arrays instead of a CBOR maps as described in the
FIDO Device Onboard Specification.

Fixes: fdo-rs#620

Signed-off-by: Miguel Martín <[email protected]>
@mmartinv mmartinv force-pushed the fix-cbor-error-serialization branch from 33f03d2 to d3d65d6 Compare February 29, 2024 17:23
Copy link
Contributor

@7flying 7flying left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@7flying 7flying merged commit bbadde5 into fdo-rs:main Mar 1, 2024
19 checks passed
@7flying
Copy link
Contributor

7flying commented Mar 1, 2024

I've merged this one manually since mergify did not kick in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong serialization of error messages.
2 participants