mirror of
https://github.com/matter-labs/teepot.git
synced 2025-07-21 23:23:57 +02:00
chore(deps): update crates and nix flakes
- Updated multiple Rust dependencies, including `opentelemetry`, `const-oid`, and `webpki-roots` for enhanced features and bug fixes. - Upgraded `nixpkgs` and `crane` in the nix flake configuration. - Removed unused dependencies and introduced missing dependencies for improved build integrity. Signed-off-by: Harald Hoyer <harald@matterlabs.dev>
This commit is contained in:
parent
37e7f7f8e2
commit
716c782e6f
16 changed files with 947 additions and 792 deletions
|
@ -7,7 +7,7 @@ use pesign::PE;
|
|||
use sha2::{Digest, Sha384};
|
||||
use std::{
|
||||
fmt::{Display, Formatter},
|
||||
io::{Error, ErrorKind, Read, Seek, SeekFrom},
|
||||
io::{Error, Read, Seek, SeekFrom},
|
||||
path::PathBuf,
|
||||
};
|
||||
use teepot::{
|
||||
|
@ -125,7 +125,7 @@ fn main() -> Result<()> {
|
|||
let pstart = header
|
||||
.part_start
|
||||
.checked_mul(lb_size.as_u64())
|
||||
.ok_or_else(|| Error::new(ErrorKind::Other, "partition overflow - start offset"))?;
|
||||
.ok_or_else(|| Error::other("partition overflow - start offset"))?;
|
||||
let _ = device.seek(SeekFrom::Start(pstart))?;
|
||||
|
||||
assert_eq!(header.part_size, 128);
|
||||
|
|
|
@ -27,10 +27,9 @@ fn main_with_error() -> Result<()> {
|
|||
use anyhow::Context;
|
||||
use secp256k1::{rand, Secp256k1};
|
||||
use std::{os::unix::process::CommandExt, process::Command};
|
||||
use teepot::tdx::rtmr::TdxRtmrEvent;
|
||||
use teepot::{
|
||||
ethereum::public_key_to_ethereum_address, prover::reportdata::ReportDataV1,
|
||||
quote::get_quote,
|
||||
quote::get_quote, tdx::rtmr::TdxRtmrEvent,
|
||||
};
|
||||
use tracing_log::LogTracer;
|
||||
use tracing_subscriber::{fmt, prelude::*, EnvFilter, Registry};
|
||||
|
@ -45,7 +44,7 @@ fn main_with_error() -> Result<()> {
|
|||
tracing::subscriber::set_global_default(subscriber).context("Failed to set logger")?;
|
||||
|
||||
let args = Args::parse();
|
||||
let mut rng = rand::thread_rng();
|
||||
let mut rng = rand::rng();
|
||||
let secp = Secp256k1::new();
|
||||
let (signing_key, verifying_key) = secp.generate_keypair(&mut rng);
|
||||
let ethereum_address = public_key_to_ethereum_address(&verifying_key);
|
||||
|
|
|
@ -12,7 +12,7 @@ bytes.workspace = true
|
|||
clap.workspace = true
|
||||
enumset.workspace = true
|
||||
hex.workspace = true
|
||||
jsonrpsee-types = "0.24"
|
||||
jsonrpsee-types = "0.25.1"
|
||||
reqwest.workspace = true
|
||||
secp256k1.workspace = true
|
||||
serde.workspace = true
|
||||
|
|
|
@ -59,7 +59,7 @@ impl SignatureVerifier {
|
|||
let signature = Signature::from_compact(signature)
|
||||
.map_err(|e| error::Error::signature_verification(e.to_string()))?;
|
||||
let root_hash_msg = Message::from_digest(root_hash.0);
|
||||
Ok(signature.verify(&root_hash_msg, &report.pubkey).is_ok())
|
||||
Ok(signature.verify(root_hash_msg, &report.pubkey).is_ok())
|
||||
}
|
||||
|
||||
/// Verify a V1 report
|
||||
|
@ -139,7 +139,7 @@ impl SignatureVerifier {
|
|||
continue;
|
||||
};
|
||||
|
||||
let Ok(public) = SECP256K1.recover_ecdsa(message, &rec_sig) else {
|
||||
let Ok(public) = SECP256K1.recover_ecdsa(*message, &rec_sig) else {
|
||||
continue;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue