#[non_exhaustive]pub enum TlsError {
Unreadable {
path: PathBuf,
key: &'static str,
source: Error,
},
PermissiveKey {
path: PathBuf,
mode: u32,
},
UnusablePem {
path: PathBuf,
key: &'static str,
},
UnusableKey {
path: PathBuf,
},
NoCertificates {
path: PathBuf,
key: &'static str,
},
UnusableClientCa {
path: PathBuf,
source: Error,
},
KeyDoesNotMatch {
certificate: PathBuf,
key: PathBuf,
},
Provider,
}tls only.Expand description
Why TLS did not start.
No variant carries key material, and two of them deliberately carry no
source either: a PEM parse error’s one useful field is the input it
choked on, and for key that input is the private key. A path, the
configuration key that names it, and what to do about it is the whole
budget.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unreadable
A configured file could not be opened or read.
Fields
PermissiveKey
A private key’s permissions let somebody other than its owner read it.
UnusablePem
A file that should hold PEM does not.
UnusableKey
The key file holds no private key this build can use.
NoCertificates
A PEM file that should hold certificates holds none.
UnusableClientCa
client_ca holds nothing that can act as a trust anchor.
Fields
KeyDoesNotMatch
The private key is not the certificate’s key, or is of a type this build cannot sign with.
Provider
The cryptography provider would not accept the default protocol versions, which is a build problem rather than a configuration one.
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()