rename Incompatile error kind to TlsIncompatible
This commit is contained in:
		| @@ -138,7 +138,7 @@ impl ClientBuilder { | |||||||
|                             tls_inner::Identity::Pkcs12(buf, passwd) => |                             tls_inner::Identity::Pkcs12(buf, passwd) => | ||||||
|                                 try_!(::native_tls::Identity::from_pkcs12(&buf, &passwd)), |                                 try_!(::native_tls::Identity::from_pkcs12(&buf, &passwd)), | ||||||
|                             #[cfg(feature = "rustls-tls")] |                             #[cfg(feature = "rustls-tls")] | ||||||
|                             _ => return Err(::error::from(::error::Kind::Incompatible)) |                             _ => return Err(::error::from(::error::Kind::TlsIncompatible)) | ||||||
|                         }; |                         }; | ||||||
|                         tls.identity(id); |                         tls.identity(id); | ||||||
|                     } |                     } | ||||||
| @@ -195,7 +195,7 @@ impl ClientBuilder { | |||||||
|                                 } |                                 } | ||||||
|                             }, |                             }, | ||||||
|                             #[cfg(feature = "default-tls")] |                             #[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); |                         tls.set_single_client_cert(certs, key); | ||||||
|                     } |                     } | ||||||
|   | |||||||
							
								
								
									
										10
									
								
								src/error.rs
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								src/error.rs
									
									
									
									
									
								
							| @@ -135,7 +135,7 @@ impl Error { | |||||||
|             Kind::Mime(ref e) => Some(e), |             Kind::Mime(ref e) => Some(e), | ||||||
|             Kind::Url(ref e) => Some(e), |             Kind::Url(ref e) => Some(e), | ||||||
|             #[cfg(all(feature = "default-tls", feature = "rustls-tls"))] |             #[cfg(all(feature = "default-tls", feature = "rustls-tls"))] | ||||||
|             Kind::Incompatible => None, |             Kind::TlsIncompatible => None, | ||||||
|             #[cfg(feature = "default-tls")] |             #[cfg(feature = "default-tls")] | ||||||
|             Kind::NativeTls(ref e) => Some(e), |             Kind::NativeTls(ref e) => Some(e), | ||||||
|             #[cfg(feature = "rustls-tls")] |             #[cfg(feature = "rustls-tls")] | ||||||
| @@ -232,7 +232,7 @@ impl fmt::Display for Error { | |||||||
|             Kind::Url(ref e) => fmt::Display::fmt(e, f), |             Kind::Url(ref e) => fmt::Display::fmt(e, f), | ||||||
|             Kind::UrlBadScheme => f.write_str("URL scheme is not allowed"), |             Kind::UrlBadScheme => f.write_str("URL scheme is not allowed"), | ||||||
|             #[cfg(all(feature = "default-tls", feature = "rustls-tls"))] |             #[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")] |             #[cfg(feature = "default-tls")] | ||||||
|             Kind::NativeTls(ref e) => fmt::Display::fmt(e, f), |             Kind::NativeTls(ref e) => fmt::Display::fmt(e, f), | ||||||
|             #[cfg(feature = "rustls-tls")] |             #[cfg(feature = "rustls-tls")] | ||||||
| @@ -263,7 +263,7 @@ impl StdError for Error { | |||||||
|             Kind::Url(ref e) => e.description(), |             Kind::Url(ref e) => e.description(), | ||||||
|             Kind::UrlBadScheme => "URL scheme is not allowed", |             Kind::UrlBadScheme => "URL scheme is not allowed", | ||||||
|             #[cfg(all(feature = "default-tls", feature = "rustls-tls"))] |             #[cfg(all(feature = "default-tls", feature = "rustls-tls"))] | ||||||
|             Kind::Incompatible => "Incompatible identity type", |             Kind::TlsIncompatible => "Incompatible TLS identity type", | ||||||
|             #[cfg(feature = "default-tls")] |             #[cfg(feature = "default-tls")] | ||||||
|             Kind::NativeTls(ref e) => e.description(), |             Kind::NativeTls(ref e) => e.description(), | ||||||
|             #[cfg(feature = "rustls-tls")] |             #[cfg(feature = "rustls-tls")] | ||||||
| @@ -286,7 +286,7 @@ impl StdError for Error { | |||||||
|             Kind::Mime(ref e) => e.cause(), |             Kind::Mime(ref e) => e.cause(), | ||||||
|             Kind::Url(ref e) => e.cause(), |             Kind::Url(ref e) => e.cause(), | ||||||
|             #[cfg(all(feature = "default-tls", feature = "rustls-tls"))] |             #[cfg(all(feature = "default-tls", feature = "rustls-tls"))] | ||||||
|             Kind::Incompatible => None, |             Kind::TlsIncompatible => None, | ||||||
|             #[cfg(feature = "default-tls")] |             #[cfg(feature = "default-tls")] | ||||||
|             Kind::NativeTls(ref e) => e.cause(), |             Kind::NativeTls(ref e) => e.cause(), | ||||||
|             #[cfg(feature = "rustls-tls")] |             #[cfg(feature = "rustls-tls")] | ||||||
| @@ -311,7 +311,7 @@ pub(crate) enum Kind { | |||||||
|     Url(::url::ParseError), |     Url(::url::ParseError), | ||||||
|     UrlBadScheme, |     UrlBadScheme, | ||||||
|     #[cfg(all(feature = "default-tls", feature = "rustls-tls"))] |     #[cfg(all(feature = "default-tls", feature = "rustls-tls"))] | ||||||
|     Incompatible, |     TlsIncompatible, | ||||||
|     #[cfg(feature = "default-tls")] |     #[cfg(feature = "default-tls")] | ||||||
|     NativeTls(::native_tls::Error), |     NativeTls(::native_tls::Error), | ||||||
|     #[cfg(feature = "rustls-tls")] |     #[cfg(feature = "rustls-tls")] | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user