mirror of
https://github.com/matter-labs/teepot.git
synced 2025-07-21 15:13:56 +02:00
fix(verify-attestation): bail out, if no quote provided
Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
This commit is contained in:
parent
89145514b0
commit
55ea2a6069
1 changed files with 5 additions and 2 deletions
|
@ -1,9 +1,9 @@
|
|||
// SPDX-License-Identifier: Apache-2.0
|
||||
// Copyright (c) 2023-2024 Matter Labs
|
||||
// Copyright (c) 2023-2025 Matter Labs
|
||||
|
||||
//! Tool for SGX attestation and batch signature verification
|
||||
|
||||
use anyhow::{anyhow, Context, Result};
|
||||
use anyhow::{anyhow, bail, Context, Result};
|
||||
use clap::{Args, Parser, Subcommand};
|
||||
use core::convert::TryInto;
|
||||
use hex::encode;
|
||||
|
@ -113,6 +113,9 @@ fn verify_signature(
|
|||
}
|
||||
|
||||
fn verify_attestation_quote(attestation_quote_bytes: &[u8]) -> Result<QuoteVerificationResult> {
|
||||
if attestation_quote_bytes.is_empty() {
|
||||
bail!("Empty quote provided!");
|
||||
}
|
||||
println!(
|
||||
"Verifying quote ({} bytes)...",
|
||||
attestation_quote_bytes.len()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue