diff --git a/dcap/ql/src/quote_enclave.rs b/dcap/ql/src/quote_enclave.rs index 21cdb0b7..e2fd4bec 100644 --- a/dcap/ql/src/quote_enclave.rs +++ b/dcap/ql/src/quote_enclave.rs @@ -48,7 +48,7 @@ impl PathInitializer { Self::with_paths( "/usr/lib/x86_64-linux-gnu/libsgx_qe3.signed.so.1", "/usr/lib/x86_64-linux-gnu/libsgx_pce.signed.so.1", - None, + None::<&Path>, "/usr/lib/x86_64-linux-gnu/libsgx_id_enclave.signed.so.1", ) } @@ -73,12 +73,18 @@ impl PathInitializer { /// * one of the paths does not point to a file /// * one of the paths is longer than 259 (bytes) /// * one of the paths contains a null (0) byte. - pub fn with_paths>( - quoting_enclave: P, - provisioning_certificate_enclave: P, - quote_provider_library: Option

, - id_enclave: P, - ) -> Result<()> { + pub fn with_paths( + quoting_enclave: P1, + provisioning_certificate_enclave: P2, + quote_provider_library: Option, + id_enclave: P4, + ) -> Result<()> + where + P1: AsRef, + P2: AsRef, + P3: AsRef, + P4: AsRef, + { let mut value = PATH_INITIALIZER.lock().expect("Mutex has been poisoned"); if value.is_none() { Self::set_paths( @@ -110,12 +116,18 @@ impl PathInitializer { } } - fn set_paths>( - quoting_enclave: P, - provisioning_certificate_enclave: P, - quote_provider_library: Option

, - id_enclave: P, - ) -> Result { + fn set_paths( + quoting_enclave: P1, + provisioning_certificate_enclave: P2, + quote_provider_library: Option, + id_enclave: P4, + ) -> Result + where + P1: AsRef, + P2: AsRef, + P3: AsRef, + P4: AsRef, + { Self::set_path(PathKind::QuotingEnclave, quoting_enclave)?; Self::set_path( PathKind::ProvisioningCertificateEnclave,