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

manifest: add improved cbor manifest support with cbor-diag #50

Merged
merged 2 commits into from
Feb 29, 2024

Conversation

twilfredo
Copy link
Collaborator

@twilfredo twilfredo commented Feb 28, 2024

Overview

Integrates cbor-diag support to spdm-utils. This allows us to better encode/decode the cbor manifests. This allows us to reproduce similar results to that of https://cbor.me/ site.

README has been updated to add required build instructions, we no longer depends on CBOR2 as well.

New Features

  • When building spdm-utils it will now use the manifest/manifest.in.cbor file to create two files, a serialised cbor file (manifest.out.cbor) and one in pretty format (manifest.pretty). The hex stream can be retrieved with xxd -p manifest.out.cbor.

  • When handling a get-measurements request, the requester will now decode and display the responders measurement manifest in both the pretty and the diagnostic formats into stdout. See image below:

Screenshot_20240228_154619

  • similary, it will also save these as manifest/responder_manifest.cbor and manifest/responder_manifest.pretty. The aim is for these to be used to test for correctness/compliance of the manifest.

Signed-off-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
@twilfredo twilfredo force-pushed the wilfred/fixup-manifest-support branch 2 times, most recently from 8be6693 to 8d1686d Compare February 28, 2024 05:55
src/libspdm/spdm.rs Outdated Show resolved Hide resolved
Use the `cbor-diag` ruby gem instead of CBOR2 to manifest encoding and
decoding. It seems to encode and decode more accurately over the CBOR2
module. Manifests serialized by CBOR2 could not be properly
decoded by `cbor.me`.

Signed-off-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
@twilfredo twilfredo force-pushed the wilfred/fixup-manifest-support branch from 8d1686d to 0352371 Compare February 29, 2024 04:53
@alistair23 alistair23 merged commit f2af95e into master Feb 29, 2024
@alistair23 alistair23 deleted the wilfred/fixup-manifest-support branch February 29, 2024 06:20
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.

2 participants