refactor: update collateral handling

- Simplify collateral handling by removing unnecessary references and matches.
- Add `collateral` field to `QuoteVerificationResult` for improved data clarity.

Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
This commit is contained in:
Harald Hoyer 2025-03-06 15:25:15 +01:00
parent a677615474
commit 8cf7651781
Signed by: harald
GPG key ID: F519A1143B3FBE32
7 changed files with 34 additions and 19 deletions

View file

@ -127,7 +127,7 @@ fn verify_attestation_quote(attestation_quote_bytes: &[u8]) -> Result<QuoteVerif
let unix_time: i64 = std::time::SystemTime::now()
.duration_since(UNIX_EPOCH)?
.as_secs() as _;
verify_quote_with_collateral(attestation_quote_bytes, Some(&collateral), unix_time)
verify_quote_with_collateral(attestation_quote_bytes, Some(collateral), unix_time)
.context("Failed to verify quote with collateral")
}