Skip to content

add attest and eph key #571

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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

narimonf
Copy link
Contributor

@narimonf narimonf commented Aug 6, 2025

Summary & Motivation (Problem vs. Solution)

How I Tested These Changes

Pre merge check list

  • Update CHANGELOG.MD

let bytes =
fs::read(attestation_doc_path).map_err(|e| Error::ReadShare(e.to_string()))?;
let attestation_doc: AttestationDoc = extract_attestation_doc(bytes.as_ref(), true, None);
let ephemeral_key: P256Public = P256Public::from_bytes(&attestation_doc.public_key.expect("No ephemeral key in the attestation doc"),).expect("Ephemeral key not valid public key");
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a note for the future if anyone ever wants to cleanup the CLI - the code is super inconsistent on when it chooses to panic vs bubble up an error. The expects are easier to write but probably better practice to bubble up an error. The issue is we don't use any error handling libraries so the error enum stuff is very unergonomic. If we didn't care about supply chain stuff I would suggest using anyhow or eyre. They are super popular and allow you to mix declaring error messages in place and using enums

https://docs.rs/anyhow/latest/anyhow/
https://docs.rs/eyre/latest/eyre/

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