#[non_exhaustive]pub enum TlsError {
Io(Error),
NoCertificates,
NoPrivateKey,
MissingField(&'static str),
Rustls(Error),
ClientVerifier(VerifierBuilderError),
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io(Error)
Reading a PemSource::Path from disk failed.
The underlying std::io::Error is the source.
NoCertificates
The PEM parsed but contained no CERTIFICATE blocks where at least one was required (a cert chain or a CA bundle).
NoPrivateKey
The PEM parsed but contained no private key (PKCS#8, PKCS#1, or SEC1).
MissingField(&'static str)
A required builder field was absent at build() time, or a paired field was supplied alone (e.g. a client cert without its key).
Carries the field name ("cert", "key", "ca", "client_cert", "client_key").
Rustls(Error)
rustls rejected the assembled configuration - most commonly a certificate/key mismatch caught by with_single_cert.
The rustls::Error is the source.
ClientVerifier(VerifierBuilderError)
Building the mTLS client-certificate verifier failed - e.g. an empty trust anchor set or an invalid CRL.
The structured rustls::server::VerifierBuilderError is preserved as the source.
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()