#[non_exhaustive]pub enum TlsError {
NoHosts,
Clock,
Key,
Cert,
Host(String),
Uncovered {
host: String,
why: String,
},
NoRoots,
Certificate(String),
Config(String),
}Expand description
Why a CA cannot be made or used, or a terminated connection set up.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NoHosts
No host to make a CA for.
Clock
The clock reads a day no certificate can be written for.
Key
The CA key file holds no ECDSA P-256 key.
Cert
The CA certificate file holds no certificate.
Host(String)
A host no certificate can name.
Uncovered
A leaf the CA signs for the host does not verify: another key, a host outside its name constraints, or a CA that expired.
NoRoots
No root certificate to verify upstream hosts with.
Certificate(String)
rcgen could not make a certificate.
Config(String)
rustls refused a configuration.
Trait Implementations§
Source§impl Error for TlsError
impl Error for TlsError
1.30.0 · 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 UnsafeUnpin for TlsError
impl UnwindSafe for TlsError
Blanket Implementations§
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