Struct native_tls::TlsConnectorBuilder
[−]
[src]
pub struct TlsConnectorBuilder(_);
A builder for TlsConnector
s.
Methods
impl TlsConnectorBuilder
[src]
fn identity(&mut self, pkcs12: Pkcs12) -> Result<&mut TlsConnectorBuilder>
[src]
Sets the identity to be used for client certificate authentication.
fn supported_protocols(
&mut self,
protocols: &[Protocol]
) -> Result<&mut TlsConnectorBuilder>
[src]
&mut self,
protocols: &[Protocol]
) -> Result<&mut TlsConnectorBuilder>
Sets the protocols which the connector will support.
The protocols supported by default are currently TLS 1.0, TLS 1.1, and TLS 1.2, though this is subject to change.
fn add_root_certificate(
&mut self,
cert: Certificate
) -> Result<&mut TlsConnectorBuilder>
[src]
&mut self,
cert: Certificate
) -> Result<&mut TlsConnectorBuilder>
Adds a certificate to the set of roots that the connector will trust.
The connector will use the system's trust root by default. This method can be used to add to that set when communicating with servers not trusted by the system.
fn build(self) -> Result<TlsConnector>
[src]
Consumes the builder, returning a TlsConnector
.
Trait Implementations
impl TlsConnectorBuilderExt for TlsConnectorBuilder
[src]
fn anchor_certificates(&mut self, certs: &[SecCertificate]) -> &mut Self
[src]
Deprecated since 0.1.2
: use add_root_certificate
Deprecated