pub struct TlsConfig {
pub root_cert_pem: Option<Vec<u8>>,
pub accept_invalid_certs: bool,
}Expand description
Optional TLS customization. When all fields are default the SDK uses
the OS trust store loaded by rustls-native-certs.
Fields§
§root_cert_pem: Option<Vec<u8>>PEM-encoded additional root CA. Added to the rustls RootCertStore
alongside the system trust store, so the client accepts chains
signed by either this CA or any OS-trusted root.
accept_invalid_certs: boolDisable ALL TLS verification (chain + hostname + expiry + EKU).
Equivalent to wscat --no-check or curl -k. Do not use in
production — exposes the client to trivial MITM. Prefer
root_cert_pem with a properly-issued server cert.
Trait Implementations§
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