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
10 changes: 5 additions & 5 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 app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ crypto = { path = "../modules/crypto" }
keymanager = { path = "../modules/keymanager" }
remote-attestation = { path = "../modules/remote-attestation" }
attestation-report = { path = "../modules/attestation-report", features = ["dcap-quote-parser"] }
zkdcap-risc0 = { git = "https://github.com/datachainlab/zkdcap", rev = "v0.0.2" }
zkdcap-risc0 = { git = "https://github.com/datachainlab/zkdcap", rev = "v0.0.3" }

[build-dependencies]
git2 = { version = "0.20", default-features = false }
Expand Down
27 changes: 4 additions & 23 deletions app/src/commands/attestation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -248,36 +248,17 @@ pub struct SgxCollateralService {
)]
pub certs_service_url: Option<String>,
#[clap(
long = "update_policy",
default_value = "early",
help = "Update policy (early(default) or standard)"
long = "tcb_evaluation_data_number",
Copy link

Copilot AI May 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider specifying a default_value for tcb_evaluation_data_number if a default behavior is expected, or update the help message to clarify that the absence of a value implies the latest available TCB Evaluation Data Number.

Copilot uses AI. Check for mistakes.
help = "TCB Evaluation Data Number for TCB Info and QE Identity (default: Latest TCB Evaluation Data Number)"
)]
pub update_policy: UpdatePolicy,
pub tcb_evaluation_data_number: Option<u32>,
#[clap(
long = "expected_tcb_evaluation_data_number",
help = "Expected TCB Evaluation Data Number for TCB Info and QE Identity"
)]
pub expected_tcb_evaluation_data_number: Option<u32>,
}

#[derive(Clone, Debug, PartialEq)]
pub enum UpdatePolicy {
Early,
Standard,
}

impl FromStr for UpdatePolicy {
type Err = anyhow::Error;

fn from_str(s: &str) -> Result<Self, Self::Err> {
match s.to_lowercase().as_str() {
"early" => Ok(Self::Early),
"standard" => Ok(Self::Standard),
_ => Err(anyhow!("invalid update policy: {}", s)),
}
}
}

impl SgxCollateralService {
pub fn get_pccs_url(&self) -> String {
self.pccs_url
Expand All @@ -298,7 +279,7 @@ impl From<SgxCollateralService> for ValidatedPCSClient {
PCSClient::new(
service.get_pccs_url().as_str(),
service.get_certs_service_url().as_str(),
service.update_policy == UpdatePolicy::Early,
service.tcb_evaluation_data_number,
),
service.expected_tcb_evaluation_data_number,
)
Expand Down
2 changes: 1 addition & 1 deletion modules/attestation-report/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pem = { version = "2.0", default-features = false }
webpki = { version = "0.22", features = ["alloc"] }
anyhow = { version = "1", default-features = false }

dcap-quote-verifier = { git = "https://github.com/datachainlab/zkdcap", rev = "v0.0.2", optional = true }
dcap-quote-verifier = { git = "https://github.com/datachainlab/zkdcap", rev = "v0.0.3", optional = true }

[dev-dependencies]
tokio = { version = "1.0", default-features = false, features = ["macros"] }
Expand Down
2 changes: 1 addition & 1 deletion modules/lcp-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ flex-error = { version = "0.4.4", default-features = false }
tiny-keccak = { version = "2.0" }
hex-literal = { version = "0.4.1" }
alloy-sol-types = { version = "0.8", default-features = false }
dcap-quote-verifier = { git = "https://github.com/datachainlab/zkdcap", rev = "v0.0.2" }
dcap-quote-verifier = { git = "https://github.com/datachainlab/zkdcap", rev = "v0.0.3" }

attestation-report = { path = "../attestation-report", default-features = false }
remote-attestation = { path = "../remote-attestation", default-features = false }
Expand Down
6 changes: 3 additions & 3 deletions modules/remote-attestation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ serde_json = { version = "1.0", features = ["preserve_order"] }
rsa = { version = "0.9.2", features = ["pem"], optional = true }
chrono = { version = "0.4.38", features = ["now"], optional = true }

dcap-quote-verifier = { git = "https://github.com/datachainlab/zkdcap", rev = "v0.0.2" }
dcap-pcs = { git = "https://github.com/datachainlab/zkdcap", rev = "v0.0.2" }
dcap-collaterals = { git = "https://github.com/datachainlab/zkdcap", rev = "v0.0.2" }
dcap-quote-verifier = { git = "https://github.com/datachainlab/zkdcap", rev = "v0.0.3" }
dcap-pcs = { git = "https://github.com/datachainlab/zkdcap", rev = "v0.0.3" }
dcap-collaterals = { git = "https://github.com/datachainlab/zkdcap", rev = "v0.0.3" }

lcp-types = { path = "../types" }
crypto = { path = "../crypto", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion modules/remote-attestation/src/dcap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ mod tests {
let pcs_client = PCSClient::new(
"https://api.trustedservices.intel.com/",
"https://certificates.trustedservices.intel.com/",
false,
None,
);
let collateral = pcs_client
.get_collateral(true, &quote.signature.qe_cert_data)
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ attestation-report = { path = "../../modules/attestation-report" }
keymanager = { path = "../../modules/keymanager" }
remote-attestation = { path = "../../modules/remote-attestation" }

zkdcap-risc0 = { git = "https://github.com/datachainlab/zkdcap", rev = "v0.0.2" }
zkdcap-risc0 = { git = "https://github.com/datachainlab/zkdcap", rev = "v0.0.3" }

[features]
default = []
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ mod tests {
PCSClient::new(
"https://api.trustedservices.intel.com/",
"https://certificates.trustedservices.intel.com/",
false,
None,
),
None,
),
Expand Down
Loading