Skip to content

Commit b2c7383

Browse files
committed
update rust-openssl and fix cert validation test
Signed-off-by: Jun Kimura <jun.kimura@datachain.jp>
1 parent e2686c9 commit b2c7383

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ sha2 = { version = "0.10.8" }
2525
sha3 = { version = "0.10.8" }
2626
urlencoding = { version = "2" }
2727
x509-parser = { version = "0.15.1" }
28-
openssl = { git = "https://github.com/datachainlab/rust-openssl", rev = "6fdf2f32721719d173bf909c97e982fe4e2e2819" }
28+
openssl = { git = "https://github.com/datachainlab/rust-openssl", rev = "1e4f9af40f9e2d74c9775482f7f5e6449cc7b8e1" }
2929

3030
dcap-types = { path = "crates/types" }
3131
dcap-collaterals = { path = "crates/collaterals" }

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()

0 commit comments

Comments
 (0)