MCPcopy Create free account
hub / github.com/ceramicnetwork/rust-ceramic / try_new_https_mutual

Method try_new_https_mutual

kubo-rpc-server/src/client/mod.rs:294–312  ·  view source on GitHub ↗
(
        base_path: &str,
        ca_certificate: CA,
        client_key: K,
        client_certificate: D,
    )

Source from the content-addressed store, hash-verified

292 /// * `client_certificate` - Path to the client's public certificate associated with the private key
293 #[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))]
294 pub fn try_new_https_mutual<CA, K, D>(
295 base_path: &str,
296 ca_certificate: CA,
297 client_key: K,
298 client_certificate: D,
299 ) -> Result<Self, ClientInitError>
300 where
301 CA: AsRef<Path>,
302 K: AsRef<Path>,
303 D: AsRef<Path>,
304 {
305 let https_connector = Connector::builder()
306 .https()
307 .pin_server_certificate(ca_certificate)
308 .client_authentication(client_key, client_certificate)
309 .build()
310 .map_err(ClientInitError::SslError)?;
311 Self::try_new_with_connector(base_path, Some("https"), https_connector)
312 }
313}
314
315impl<S, C> Client<S, C>

Callers

nothing calls this directly

Calls 1

buildMethod · 0.45

Tested by

no test coverage detected