mirror of
https://github.com/matter-labs/teepot.git
synced 2025-07-21 23:23:57 +02:00
Merge pull request #21 from matter-labs/no_hash
fix(tee-key-preexec): don't hash public key
This commit is contained in:
commit
5a0bddf850
3 changed files with 1 additions and 6 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -2401,7 +2401,6 @@ dependencies = [
|
||||||
"hex",
|
"hex",
|
||||||
"k256",
|
"k256",
|
||||||
"rand",
|
"rand",
|
||||||
"sha2",
|
|
||||||
"teepot",
|
"teepot",
|
||||||
"tracing",
|
"tracing",
|
||||||
"tracing-log",
|
"tracing-log",
|
||||||
|
|
|
@ -13,7 +13,6 @@ anyhow.workspace = true
|
||||||
hex.workspace = true
|
hex.workspace = true
|
||||||
k256.workspace = true
|
k256.workspace = true
|
||||||
rand.workspace = true
|
rand.workspace = true
|
||||||
sha2.workspace = true
|
|
||||||
teepot.workspace = true
|
teepot.workspace = true
|
||||||
tracing-log.workspace = true
|
tracing-log.workspace = true
|
||||||
tracing-subscriber.workspace = true
|
tracing-subscriber.workspace = true
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
use anyhow::{Context, Result};
|
use anyhow::{Context, Result};
|
||||||
use hex::ToHex;
|
use hex::ToHex;
|
||||||
use k256::ecdsa::SigningKey;
|
use k256::ecdsa::SigningKey;
|
||||||
use sha2::Digest;
|
|
||||||
use sha2::Sha256;
|
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::os::unix::process::CommandExt;
|
use std::os::unix::process::CommandExt;
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
|
@ -41,9 +39,8 @@ fn main_with_error() -> Result<()> {
|
||||||
let mut rng = rand::thread_rng();
|
let mut rng = rand::thread_rng();
|
||||||
let signing_key = SigningKey::random(&mut rng);
|
let signing_key = SigningKey::random(&mut rng);
|
||||||
let verifying_key_bytes = signing_key.verifying_key().to_sec1_bytes();
|
let verifying_key_bytes = signing_key.verifying_key().to_sec1_bytes();
|
||||||
let hash_verifying_key = Sha256::digest(verifying_key_bytes);
|
|
||||||
let signing_key_string = signing_key.to_bytes().encode_hex::<String>();
|
let signing_key_string = signing_key.to_bytes().encode_hex::<String>();
|
||||||
let tee_type = match get_quote(&hash_verifying_key) {
|
let tee_type = match get_quote(&verifying_key_bytes) {
|
||||||
Ok(quote) => {
|
Ok(quote) => {
|
||||||
// save quote to file
|
// save quote to file
|
||||||
std::fs::write(TEE_QUOTE_FILE, quote)?;
|
std::fs::write(TEE_QUOTE_FILE, quote)?;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue