Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name ="client"
version="0.7.0"
version="0.7.1"
edition="2021"
build ="build.rs"
publish=false
Expand Down
2 changes: 1 addition & 1 deletion client_ios/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name ="client_ios"
version="0.7.0"
version="0.7.1"
edition="2021"
build ="build.rs"
publish=false
Expand Down
2 changes: 1 addition & 1 deletion client_wasm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name ="client_wasm"
version="0.7.0"
version="0.7.1"
edition="2021"
build ="build.rs"
publish=false
Expand Down
2 changes: 1 addition & 1 deletion notary/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name ="notary"
version="0.7.0"
version="0.7.1"
edition="2021"
build ="build.rs"

Expand Down
18 changes: 9 additions & 9 deletions notary/src/tee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::sync::{Arc, OnceLock};

use axum::{
extract::{Query, State},
response::Response,
response::{self, Response},
};
#[cfg(feature = "tee-google-confidential-space-token-generator")]
use caratls_ekm_google_confidential_space_server::GoogleConfidentialSpaceTokenGenerator;
Expand All @@ -13,7 +13,8 @@ use client::origo::OrigoSecrets;
use futures_util::SinkExt;
use hyper::{body::Bytes, upgrade::Upgraded};
use hyper_util::rt::TokioIo;
use serde::Deserialize;
use serde::{de::value, Deserialize};
use serde_json::Value;
use tokio::{
io::{AsyncRead, AsyncReadExt, AsyncWrite, AsyncWriteExt},
time::{timeout, Duration},
Expand Down Expand Up @@ -245,15 +246,14 @@ pub fn create_tee_proof(
) -> Result<TeeProof, NotaryServerError> {
validate_notarization_legal(manifest, request, response)?;

let value = response.notary_response_body.clone().json.unwrap();
let serialized_value = serde_json::to_string(&value).unwrap();
debug!("value: {:?}", value);
let manifest_hash = manifest.to_keccak_digest()?;
let to_sign = VerifyOutput {
// Using manifest hash as a value here since we are not exposing any values extracted
// from the request or response
value: format!("0x{}", hex::encode(manifest_hash)),
manifest: manifest.clone(),
};
let to_sign = VerifyOutput { value: serialized_value, manifest: manifest.clone() };
let signature = sign_verification(to_sign, State(state)).unwrap();
let data = TeeProofData { manifest_hash: manifest_hash.to_vec() };
let data =
TeeProofData { manifest_hash: manifest_hash.to_vec(), value: value.to_string() };

Ok(TeeProof { data, signature })
}
Expand Down
1 change: 1 addition & 0 deletions web-prover-core/src/proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ impl TryFrom<TeeProof> for Vec<u8> {

#[derive(Debug, Deserialize, Serialize, Clone)]
pub struct TeeProofData {
pub value: String,
pub manifest_hash: Vec<u8>,
}
Loading