pub enum TlsError {
Show 16 variants
CertificateReadError {
path: PathBuf,
source: Error,
},
KeyReadError {
path: PathBuf,
source: Error,
},
InvalidCertificate(String),
InvalidPrivateKey(String),
CertificateChainError(String),
HandshakeError(String),
ConnectionError(String),
ConfigError(String),
CertificateExpired(String),
CertificateNotYetValid(String),
CertificateRevoked(String),
HostnameVerificationFailed {
expected: String,
actual: String,
},
ClientCertificateRequired,
SelfSignedGenerationError(String),
AlpnNegotiationFailed,
RustlsError(String),
}Expand description
TLS-related errors
Variants§
CertificateReadError
Certificate file not found or unreadable
KeyReadError
Private key file not found or unreadable
InvalidCertificate(String)
Invalid certificate format
InvalidPrivateKey(String)
Invalid private key format
CertificateChainError(String)
Certificate chain validation failed
HandshakeError(String)
TLS handshake failed
ConnectionError(String)
Connection error
ConfigError(String)
Configuration error
CertificateExpired(String)
Certificate expired
CertificateNotYetValid(String)
Certificate not yet valid
CertificateRevoked(String)
Certificate revoked
HostnameVerificationFailed
Hostname verification failed
ClientCertificateRequired
mTLS required but client certificate not provided
SelfSignedGenerationError(String)
Self-signed certificate generation failed
AlpnNegotiationFailed
ALPN negotiation failed
RustlsError(String)
Internal rustls error
Trait Implementations§
Source§impl Error for TlsError
impl Error for TlsError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for TlsError
impl !RefUnwindSafe for TlsError
impl Send for TlsError
impl Sync for TlsError
impl Unpin for TlsError
impl !UnwindSafe for TlsError
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more