Skip to content

Commit 3343d94

Browse files
committed
fix to remove dcap-quote-verifier from std feature
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
1 parent 20a721f commit 3343d94

File tree

3 files changed

+6
-16
lines changed

3 files changed

+6
-16
lines changed

app/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ ecall-commands = { path = "../modules/ecall-commands" }
2626
crypto = { path = "../modules/crypto" }
2727
keymanager = { path = "../modules/keymanager" }
2828
remote-attestation = { path = "../modules/remote-attestation" }
29-
attestation-report = { path = "../modules/attestation-report" }
29+
attestation-report = { path = "../modules/attestation-report", features = ["dcap-quote-parser"] }
3030
zkdcap-risc0 = { git = "https://github.com/datachainlab/zkdcap", rev = "9616d7976a84e97a128fa02175ec994b95e3c137" }
3131

3232
[build-dependencies]

modules/attestation-report/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,12 @@ tokio = { version = "1.0", default-features = false, features = ["macros"] }
2626
[features]
2727
default = ["std"]
2828
std = [
29-
"dcap-quote-verifier",
3029
"webpki/std",
3130
"flex-error/std",
3231
"lcp-types/std",
3332
"serde_json/preserve_order"
3433
]
34+
dcap-quote-parser = [
35+
"std",
36+
"dcap-quote-verifier"
37+
]

modules/attestation-report/src/dcap.rs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ impl DCAPQuote {
3838
}
3939

4040
/// Returns the report data from the quote
41-
#[cfg(feature = "std")]
41+
#[cfg(feature = "dcap-quote-parser")]
4242
pub fn report_data(&self) -> Result<crate::ReportData, Error> {
4343
use dcap_quote_verifier::types::quotes::version_3::QuoteV3;
4444
let (quote, _) = QuoteV3::from_bytes(&self.raw).map_err(Error::dcap_quote_verifier)?;
@@ -128,17 +128,4 @@ impl ZKDCAPQuote {
128128
pub fn from_json(json: &str) -> Result<Self, Error> {
129129
serde_json::from_str(json).map_err(Error::serde_json)
130130
}
131-
132-
/// Returns the report data from the quote
133-
#[cfg(feature = "std")]
134-
pub fn report_data(&self) -> Result<crate::ReportData, Error> {
135-
self.dcap_quote.report_data()
136-
}
137-
138-
/// Returns the commit corresponding to the zkVM proof
139-
#[cfg(feature = "std")]
140-
pub fn commit(&self) -> Result<dcap_quote_verifier::verifier::QuoteVerificationOutput, Error> {
141-
dcap_quote_verifier::verifier::QuoteVerificationOutput::from_bytes(self.zkp.output())
142-
.map_err(Error::dcap_quote_verifier)
143-
}
144131
}

0 commit comments

Comments
 (0)