Skip to content

Add JSON output option for the host TCB - #207

Open
LakshmiSaiHarika wants to merge 1 commit into
virtee:mainfrom
LakshmiSaiHarika:show-tcb-json
Open

LakshmiSaiHarika wants to merge 1 commit into
virtee:mainfrom
LakshmiSaiHarika:show-tcb-json

Conversation

@LakshmiSaiHarika

Copy link
Copy Markdown

Add an --output/-o flag to snphost show tcb accepting default or json.
The default output is unchanged.
With json, the reported and platform TCB versions are printed as a pretty-printed JSON object with per-component fields (bootloader, tee, snp_fw, microcode, fmc), making the values easier to consume from scripts.

Move the OutputFormat enum from the ok module to main.rs so it can be shared by both snphost ok and snphost show tcb.

Document the new option and example JSON output in the README.

Add an --output/-o flag to `snphost show tcb` accepting `default` or
`json`. The default output is unchanged. With `json`, the reported and
platform TCB versions are printed as a pretty-printed JSON object with
per-component fields (bootloader, tee, snp_fw, microcode, fmc), making
the values easier to consume from scripts.

Move the OutputFormat enum from the ok module to main.rs so it can be
shared by both `snphost ok` and `snphost show tcb`.

Document the new option and example JSON output in the README.

Signed-off-by: Harika Nittala <[email protected]>
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.

1 participant