Skip to content

Commit 025f392

Browse files
feat(pki): Use client inter certs to obtain root certs for request check
Closes #11760
1 parent 17e9b24 commit 025f392

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

libparsec/crates/client/src/client/pki_enrollment_list.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ pub async fn verify_untrusted_items(
9898
let root_certs = libparsec_platform_pki::list_trusted_root_certificate_anchors()
9999
.context("Failed to list trusted root certificates")
100100
.map_err(PkiEnrollmentListError::Internal)?;
101+
let client_inter_certs = libparsec_platform_pki::list_intermediate_certificates()
102+
.context("Failed to list trusted root certificates")
103+
.map_err(PkiEnrollmentListError::Internal)?;
101104

102105
// Obtain the root cert used by the PKI
103106
let base_raw_cert = libparsec_platform_pki::get_der_encoded_certificate(&cert_ref)
@@ -113,9 +116,7 @@ pub async fn verify_untrusted_items(
113116
let verified_path = libparsec_platform_pki::verify_certificate(
114117
&base_cert,
115118
&root_certs,
116-
// TODO: list client intermediate certs
117-
// https://github.com/Scille/parsec-cloud/issues/11760
118-
&[],
119+
&client_inter_certs,
119120
now,
120121
libparsec_platform_pki::KeyUsage::client_auth(),
121122
)

0 commit comments

Comments
 (0)