Skip to content

Conversation

@themighty1
Copy link
Member

This PR adds the missing verification of the signature during attestation validation.
I realized that we can use a simpler approach than what we discussed in #794

Closes: #622

@themighty1
Copy link
Member Author

@sinui0 , ready for review.

I also made pub the inner string of a SignatureError type, otherwise I wasn't able to construct a custom sig verifier.

@themighty1 themighty1 requested a review from sinui0 October 28, 2025 08:33
#[derive(Debug, thiserror::Error)]
#[error("signature verification failed: {0}")]
pub struct SignatureError(String);
pub struct SignatureError(pub String);
Copy link
Member

Choose a reason for hiding this comment

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

Please add a from_str(msg: &str) -> Self method instead

pub fn validate(
&self,
attestation: &Attestation,
provider: &SignatureVerifierProvider,
Copy link
Member

Choose a reason for hiding this comment

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

This should accept CryptoProvider instead, in case this method ever changes to validate more things than the signature

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.

3 participants