Skip to content

Commit 57c1045

Browse files
authored
Merge pull request #30 from datachainlab/update-rust-openssl
Update rust-openssl Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
2 parents fe58362 + 4510193 commit 57c1045

File tree

7 files changed

+988
-766
lines changed

7 files changed

+988
-766
lines changed

Cargo.toml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,26 @@ members = [
77
"crates/collaterals",
88
]
99
exclude = ["zkvm/risc0", "zkvm/risc0/guest"]
10+
11+
[workspace.dependencies]
12+
alloy-sol-types = { version = "0.8.12" }
13+
anyhow = { version = "1" }
14+
chrono = { version = "0.4" }
15+
der = { version = "0.7", features = ["alloc", "derive"] }
16+
hex = { version = "0.4" }
17+
log = { version = "0.4.8" }
18+
p256 = { version = "0.13.2" }
19+
pem = { version = "3", default-features = false }
20+
proptest = { version = "1.6" }
21+
reqwest = { version = "0.12.9", default-features = false, features = ["rustls-tls", "blocking", "hickory-dns"] }
22+
serde = { version = "1.0", features = ["derive"] }
23+
serde_json = { version = "1.0" }
24+
sha2 = { version = "0.10.8" }
25+
sha3 = { version = "0.10.8" }
26+
urlencoding = { version = "2" }
27+
x509-parser = { version = "0.15.1" }
28+
openssl = { git = "https://github.com/datachainlab/rust-openssl", rev = "1e4f9af40f9e2d74c9775482f7f5e6449cc7b8e1" }
29+
30+
dcap-types = { path = "crates/types" }
31+
dcap-collaterals = { path = "crates/collaterals" }
32+
dcap-quote-verifier = { path = "crates/quote-verifier" }

crates/collaterals/Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ version = "0.1.0"
44
edition = "2021"
55

66
[dependencies]
7-
anyhow = "1"
8-
hex = "0.4"
9-
x509-parser = "0.15.1"
10-
der = { version = "0.7", features = ["alloc", "derive"] }
11-
chrono = { version = "0.4" }
12-
serde_json = { version = "1", features = ["preserve_order"] }
13-
openssl = { git = "https://github.com/datachainlab/rust-openssl", rev = "6fdf2f32721719d173bf909c97e982fe4e2e2819" }
14-
dcap-types = { path = "../types" }
7+
anyhow = { workspace = true }
8+
hex = { workspace = true }
9+
x509-parser = { workspace = true }
10+
der = { workspace = true }
11+
chrono = { workspace = true }
12+
serde_json = { workspace = true, features = ["preserve_order"] }
13+
openssl = { workspace = true }
14+
dcap-types = { workspace = true }
1515

1616
[features]
1717
default = []

crates/pcs/Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ version = "0.1.0"
44
edition = "2021"
55

66
[dependencies]
7-
anyhow = { version = "1" }
8-
log = { version = "0.4.8" }
9-
hex = { version = "0.4" }
10-
urlencoding = { version = "2" }
11-
pem = { version = "3", default-features = false }
12-
reqwest = { version = "0.12.9", default-features = false, features = ["rustls-tls", "blocking", "hickory-dns"] }
13-
dcap-types = { path = "../types" }
14-
dcap-quote-verifier = { path = "../quote-verifier" }
7+
anyhow = { workspace = true }
8+
log = { workspace = true }
9+
hex = { workspace = true }
10+
urlencoding = { workspace = true }
11+
pem = { workspace = true }
12+
reqwest = { workspace = true }
13+
dcap-types = { workspace = true }
14+
dcap-quote-verifier = { workspace = true }
1515

1616
[features]
1717
default = []

crates/quote-verifier/Cargo.toml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@ edition = "2021"
88
crate-type = ["lib"]
99

1010
[dependencies]
11-
hex = { version = "0.4" }
12-
x509-parser = { version = "0.15.1" }
13-
serde = { version = "1.0", features = ["derive"] }
14-
serde_json = { version = "1.0" }
15-
anyhow = { version = "1" }
16-
p256 = { version = "0.13.2" }
17-
sha2 = { version = "0.10.8" }
18-
sha3 = { version = "0.10.8" }
19-
alloy-sol-types = { version = "0.8.12" }
20-
dcap-types = { path = "../types" }
11+
hex = { workspace = true }
12+
x509-parser = { workspace = true }
13+
serde = { workspace = true }
14+
serde_json = { workspace = true }
15+
anyhow = { workspace = true }
16+
p256 = { workspace = true }
17+
sha2 = { workspace = true }
18+
sha3 = { workspace = true }
19+
alloy-sol-types = { workspace = true }
20+
dcap-types = { workspace = true }
2121

2222
[features]
2323
default = []
2424

2525
[dev-dependencies]
26-
serde_json = { version = "1.0", features = ["preserve_order"] }
27-
dcap-collaterals = { path = "../collaterals" }
26+
serde_json = { workspace = true, features = ["preserve_order"] }
27+
dcap-collaterals = { workspace = true }

crates/quote-verifier/src/tcb_info.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -210,13 +210,17 @@ mod tests {
210210
}
211211
}
212212
{
213-
let pck_ca_crl = gen_crl_der(
214-
&pck_certchain.pck_cert_ca,
215-
&pck_certchain.pck_cert_ca_key,
216-
vec![tcb_certchain.cert.clone()],
217-
None,
213+
// Generate another TCB signing cert from root CA to use as revoked cert
214+
let another_tcb_key = gen_key();
215+
let another_tcb_cert = gen_tcb_signing_ca(
216+
&root_ca.cert,
217+
&root_ca.key,
218+
&another_tcb_key,
219+
Validity::new_with_duration(1730000001, 1000),
218220
)
219221
.unwrap();
222+
let root_ca_crl =
223+
gen_crl_der(&root_ca.cert, &root_ca.key, vec![another_tcb_cert], None).unwrap();
220224
let crls = IntelSgxCrls::new(
221225
CertificateRevocationList::from_der(root_ca_crl.as_ref())
222226
.unwrap()

crates/types/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ edition = "2021"
88
crate-type = ["lib"]
99

1010
[dependencies]
11-
x509-parser = { version = "0.15.1" }
12-
serde = { version = "1.0", features = ["derive"] }
13-
chrono = { version = "0.4" }
14-
anyhow = { version = "1" }
15-
hex = { version = "0.4" }
11+
x509-parser = { workspace = true }
12+
serde = { workspace = true }
13+
chrono = { workspace = true }
14+
anyhow = { workspace = true }
15+
hex = { workspace = true }
1616

1717
[features]
1818
default = []
1919

2020
[dev-dependencies]
21-
proptest = "1.6"
21+
proptest = { workspace = true }

0 commit comments

Comments
 (0)