| 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 | /// |