diff --git a/src/async_impl/client.rs b/src/async_impl/client.rs index 0ee60d4..673f9f9 100644 --- a/src/async_impl/client.rs +++ b/src/async_impl/client.rs @@ -138,7 +138,7 @@ impl ClientBuilder { tls_inner::Identity::Pkcs12(buf, passwd) => try_!(::native_tls::Identity::from_pkcs12(&buf, &passwd)), #[cfg(feature = "rustls-tls")] - _ => return Err(::error::from(::error::Kind::Incompatible)) + _ => return Err(::error::from(::error::Kind::TlsIncompatible)) }; tls.identity(id); } @@ -195,7 +195,7 @@ impl ClientBuilder { } }, #[cfg(feature = "default-tls")] - _ => return Err(::error::from(::error::Kind::Incompatible)) + _ => return Err(::error::from(::error::Kind::TlsIncompatible)) }; tls.set_single_client_cert(certs, key); } diff --git a/src/error.rs b/src/error.rs index 88e2946..11446ad 100644 --- a/src/error.rs +++ b/src/error.rs @@ -135,7 +135,7 @@ impl Error { Kind::Mime(ref e) => Some(e), Kind::Url(ref e) => Some(e), #[cfg(all(feature = "default-tls", feature = "rustls-tls"))] - Kind::Incompatible => None, + Kind::TlsIncompatible => None, #[cfg(feature = "default-tls")] Kind::NativeTls(ref e) => Some(e), #[cfg(feature = "rustls-tls")] @@ -232,7 +232,7 @@ impl fmt::Display for Error { Kind::Url(ref e) => fmt::Display::fmt(e, f), Kind::UrlBadScheme => f.write_str("URL scheme is not allowed"), #[cfg(all(feature = "default-tls", feature = "rustls-tls"))] - Kind::Incompatible => f.write_str("Incompatible identity type"), + Kind::TlsIncompatible => f.write_str("Incompatible TLS identity type"), #[cfg(feature = "default-tls")] Kind::NativeTls(ref e) => fmt::Display::fmt(e, f), #[cfg(feature = "rustls-tls")] @@ -263,7 +263,7 @@ impl StdError for Error { Kind::Url(ref e) => e.description(), Kind::UrlBadScheme => "URL scheme is not allowed", #[cfg(all(feature = "default-tls", feature = "rustls-tls"))] - Kind::Incompatible => "Incompatible identity type", + Kind::TlsIncompatible => "Incompatible TLS identity type", #[cfg(feature = "default-tls")] Kind::NativeTls(ref e) => e.description(), #[cfg(feature = "rustls-tls")] @@ -286,7 +286,7 @@ impl StdError for Error { Kind::Mime(ref e) => e.cause(), Kind::Url(ref e) => e.cause(), #[cfg(all(feature = "default-tls", feature = "rustls-tls"))] - Kind::Incompatible => None, + Kind::TlsIncompatible => None, #[cfg(feature = "default-tls")] Kind::NativeTls(ref e) => e.cause(), #[cfg(feature = "rustls-tls")] @@ -311,7 +311,7 @@ pub(crate) enum Kind { Url(::url::ParseError), UrlBadScheme, #[cfg(all(feature = "default-tls", feature = "rustls-tls"))] - Incompatible, + TlsIncompatible, #[cfg(feature = "default-tls")] NativeTls(::native_tls::Error), #[cfg(feature = "rustls-tls")]