mirror of
https://github.com/matter-labs/teepot.git
synced 2025-07-22 15:34:48 +02:00
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:
parent
a677615474
commit
8cf7651781
7 changed files with 34 additions and 19 deletions
|
@ -21,7 +21,7 @@ use teepot::{
|
|||
server::signatures::verify_sig,
|
||||
sgx::sign::Signature,
|
||||
};
|
||||
use tracing::{error, info, level_filters::LevelFilter};
|
||||
use tracing::{error, level_filters::LevelFilter};
|
||||
|
||||
#[derive(Args, Debug)]
|
||||
struct SendArgs {
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@ pub fn verify_attestation_quote(attestation_quote_bytes: &[u8]) -> Result<QuoteV
|
|||
let unix_time: i64 = std::time::SystemTime::now()
|
||||
.duration_since(std::time::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!")
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue