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

Method try_new_https_pinned

kubo-rpc-server/src/client/mod.rs:271–284  ·  view source on GitHub ↗
(
        base_path: &str,
        ca_certificate: CA,
    )

Source from the content-addressed store, hash-verified

269 /// * `ca_certificate` - Path to CA certificate used to authenticate the server
270 #[cfg(not(any(target_os = "macos", target_os = "windows", target_os = "ios")))]
271 pub fn try_new_https_pinned<CA>(
272 base_path: &str,
273 ca_certificate: CA,
274 ) -> Result<Self, ClientInitError>
275 where
276 CA: AsRef<Path>,
277 {
278 let https_connector = Connector::builder()
279 .https()
280 .pin_server_certificate(ca_certificate)
281 .build()
282 .map_err(ClientInitError::SslError)?;
283 Self::try_new_with_connector(base_path, Some("https"), https_connector)
284 }
285
286 /// Create a client with a mutually authenticated TLS connection to the server.
287 ///

Callers

nothing calls this directly

Calls 1

buildMethod · 0.45

Tested by

no test coverage detected