diff --git a/src/async_impl/client.rs b/src/async_impl/client.rs index a6d508032..44cff22ac 100644 --- a/src/async_impl/client.rs +++ b/src/async_impl/client.rs @@ -372,6 +372,13 @@ impl ClientBuilder { id.add_to_native_tls(&mut tls)?; } } + #[cfg(all(feature = "__rustls", not(feature = "native-tls")))] + { + // Default backend + rustls Identity doesn't work. + if let Some(_id) = config.identity { + return Err(crate::error::builder("incompatible TLS identity type")); + } + } if let Some(min_tls_version) = config.min_tls_version { let protocol = min_tls_version.to_native_tls().ok_or_else(|| {