pub struct TlsConfig {
pub ca_certs: Vec<PathBuf>,
pub insecure: bool,
}Expand description
How an HTTP client should establish TLS trust.
The OS trust store and SSL_CERT_FILE are always honoured; the fields here
carry the explicit, opt-in CLI overrides.
Fields§
§ca_certs: Vec<PathBuf>Extra PEM trust anchors supplied via --ca-cert (each file may hold one
or more certificates).
insecure: boolDisable certificate verification entirely (--insecure). Last resort.
Implementations§
Source§impl TlsConfig
impl TlsConfig
Sourcepub fn apply(&self, builder: ClientBuilder) -> Result<ClientBuilder, Error>
pub fn apply(&self, builder: ClientBuilder) -> Result<ClientBuilder, Error>
Apply the trust configuration to a reqwest client builder.
When insecure is set, verification is turned off and trust-anchor
assembly is skipped. Otherwise the OS store is loaded (falling back to
webpki only when it is empty), then SSL_CERT_FILE and --ca-cert
certificates are layered on as additional roots.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TlsConfig
impl<'de> Deserialize<'de> for TlsConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TlsConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TlsConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TlsConfig
impl RefUnwindSafe for TlsConfig
impl Send for TlsConfig
impl Sync for TlsConfig
impl Unpin for TlsConfig
impl UnsafeUnpin for TlsConfig
impl UnwindSafe for TlsConfig
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