Skip to content

Commit

Permalink
Fix error handling in entropy-tss
Browse files Browse the repository at this point in the history
  • Loading branch information
ameba23 committed Dec 12, 2024
1 parent eda5589 commit 2884836
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion crates/threshold-signature-server/src/attestation/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ pub async fn create_quote(
let mut pck_seeder = StdRng::from_seed(signer.signer().public().0);
let pck = tdx_quote::SigningKey::random(&mut pck_seeder);

let pck_encoded = tdx_quote::encode_verifying_key(pck.verifying_key()).to_vec();
let pck_encoded = tdx_quote::encode_verifying_key(pck.verifying_key())?.to_vec();
let quote = tdx_quote::Quote::mock(signing_key.clone(), pck, input_data.0, pck_encoded)
.as_bytes()
.to_vec();
Expand Down
3 changes: 3 additions & 0 deletions crates/threshold-signature-server/src/attestation/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ pub enum AttestationErr {
#[cfg(feature = "production")]
#[error("Quote generation: {0}")]
QuoteGeneration(String),
#[cfg(not(feature = "production"))]
#[error("Cannot encode verifying key: {0}")]
EncodeVerifyingKey(#[from] tdx_quote::VerifyingKeyError),
#[error("Vec<u8> Conversion Error: {0}")]
Conversion(&'static str),
#[error("Data is repeated")]
Expand Down

0 comments on commit 2884836

Please sign in to comment.