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

Add sample for retrieving signing information at runtime #1472

Open
vtikoo opened this issue Jun 15, 2023 · 0 comments
Open

Add sample for retrieving signing information at runtime #1472

vtikoo opened this issue Jun 15, 2023 · 0 comments

Comments

@vtikoo
Copy link
Collaborator

vtikoo commented Jun 15, 2023

Usecase:

User application wants to verify mrsigner, mrenclave information at runtime.

High level solution:

Mystikos exposes OE functions to fetch and parse raw SGX report via syscalls.

SYS_myst_oe_get_report_v2 -> returns a raw int8_t* report

Pass raw report to SYS_myst_oe_parse_report -> returns oe_report_t*
In the output of oe_parse_report (the third paramater), it will have type oe_report_t, one can access its enclave_report member
and then cast with sgx_report_body_t: openenclave/include/openenclave/bits/sgx/sgxtypes.h at 70bde076bd15bf786758a458c07dba33bb0e6938 · openenclave/openenclave · GitHub

From there you can access mrsigner and mrenclave
oe_report_t is defined here: openenclave/include/openenclave/bits/report.h at 70bde076bd15bf786758a458c07dba33bb0e6938 · openenclave/openenclave · GitHub

Exit criteria:

Samples in dotnet and C.

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

No branches or pull requests

1 participant