Skip to content

attestation: refactor to expose get/verification functions#164

Merged
benma merged 1 commit intoBitBoxSwiss:masterfrom
benma:attest
Mar 14, 2026
Merged

attestation: refactor to expose get/verification functions#164
benma merged 1 commit intoBitBoxSwiss:masterfrom
benma:attest

Conversation

@benma
Copy link
Contributor

@benma benma commented Mar 11, 2026

Could be useful for BitBoxCloud for the server to verify attestations.

@benma benma requested a review from bznein March 11, 2026 13:09
@benma benma changed the title attestation: refactor to expose verification function attestation: refactor to expose get/verification functions Mar 11, 2026
Copy link
Collaborator

@bznein bznein left a comment

Choose a reason for hiding this comment

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

LGTM, one minor comment

return false, errp.New("could not verify challenge signature")
}

return true, nil
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure if it's worth noting or not, but basically this function never returns false and nil, so we could drop one of the two return values and just check the error. Indeed, in performAttestation we directly drop the first returned value and only use the error. But not strong feelings about it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, fixed!

Expose expose verification and GetAttestation.

Could be useful for BitBoxCloud for the server to verify attestations,
and the client to perform attestation proofs for the server.
@benma benma merged commit c3430d8 into BitBoxSwiss:master Mar 14, 2026
3 checks passed
@benma benma deleted the attest branch March 14, 2026 07:21
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