Struct tcp_stream::RustlsConnectorConfig [−][src]
pub struct RustlsConnectorConfig(_);
Expand description
Reexport rustls-connector’s TlsConnector
Configuration helper for RustlsConnector
Implementations
Reexport rustls-connector’s TlsConnector
Create a new RustlsConnector
from the given [ClientConfig
]
Create a new RustlsConnector
using the webpki-roots certs (requires webpki-roots-certs feature enabled)
Create a new RustlsConnector
using the system certs (requires native-certs feature enabled)
Errors
Returns an error if we fail to load the native certs.
Methods from Deref<Target = ClientConfig>
Set the ALPN protocol list to the given protocol names.
Overwrites any existing configured protocols.
The first element in the protocols
list is the most
preferred, the last is the least preferred.
pub fn set_persistence(
&mut self,
persist: Arc<dyn StoresClientSessions + 'static>
)
pub fn set_persistence(
&mut self,
persist: Arc<dyn StoresClientSessions + 'static>
)
Sets persistence layer to persist
.
Sets MTU to mtu
. If None, the default is used.
If Some(x) then x must be greater than 5 bytes.
pub fn set_single_client_cert(
&mut self,
cert_chain: Vec<Certificate, Global>,
key_der: PrivateKey
) -> Result<(), TLSError>
pub fn set_single_client_cert(
&mut self,
cert_chain: Vec<Certificate, Global>,
key_der: PrivateKey
) -> Result<(), TLSError>
Sets a single client authentication certificate and private key. This is blindly used for all servers that ask for client auth.
cert_chain
is a vector of DER-encoded certificates,
key_der
is a DER-encoded RSA or ECDSA private key.
pub fn dangerous(&mut self) -> DangerousClientConfig<'_>
pub fn dangerous(&mut self) -> DangerousClientConfig<'_>
Access configuration options whose use is dangerous and requires extra care.
Trait Implementations
Returns the “default value” for a type. Read more
Mutably dereferences the value.
Performs the conversion.
Performs the conversion.
Auto Trait Implementations
impl !RefUnwindSafe for RustlsConnectorConfig
impl Send for RustlsConnectorConfig
impl Sync for RustlsConnectorConfig
impl Unpin for RustlsConnectorConfig
impl !UnwindSafe for RustlsConnectorConfig
Blanket Implementations
Mutably borrows from an owned value. Read more