pub enum BuildCustomCaTransportError {
ReadCaFile {
source_env: &'static str,
path: PathBuf,
source: Error,
},
InvalidCaFile {
source_env: &'static str,
path: PathBuf,
detail: String,
},
RegisterCertificate {
source_env: &'static str,
path: PathBuf,
certificate_index: usize,
source: Error,
},
BuildClientWithCustomCa {
source_env: &'static str,
path: PathBuf,
source: Error,
},
BuildClientWithSystemRoots(Error),
RegisterRustlsCertificate {
source_env: &'static str,
path: PathBuf,
certificate_index: usize,
source: Error,
},
}Expand description
Describes why a transport using shared custom CA support could not be constructed.
These failure modes apply to both reqwest client construction and websocket TLS
configuration. A build can fail because the configured CA file could not be read, could not be
parsed as certificates, contained certs that the target TLS stack refused to register, or
because the final reqwest client builder failed. Callers that do not care about the
distinction can rely on the From<BuildCustomCaTransportError> for io::Error conversion.
Variants§
ReadCaFile
Reading the selected CA file from disk failed before any PEM parsing could happen.
InvalidCaFile
The selected CA file was readable, but did not produce usable certificate material.
RegisterCertificate
One parsed certificate block could not be registered with the reqwest client builder.
BuildClientWithCustomCa
Reqwest rejected the final client configuration after a custom CA bundle was loaded.
BuildClientWithSystemRoots(Error)
Reqwest rejected the final client configuration while using only system roots.
RegisterRustlsCertificate
One parsed certificate block could not be registered with the websocket TLS root store.
Trait Implementations§
Source§impl Debug for BuildCustomCaTransportError
impl Debug for BuildCustomCaTransportError
Source§impl Error for BuildCustomCaTransportError
impl Error for BuildCustomCaTransportError
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()