Struct openssl::ssl::ConnectConfiguration
[−]
[src]
pub struct ConnectConfiguration(_);
A type which allows for configuration of a client-side TLS session before connection.
Methods
impl ConnectConfiguration
[src]
pub fn ssl(&self) -> &Ssl
[src]
Returns a shared reference to the inner Ssl
.
pub fn ssl_mut(&mut self) -> &mut Ssl
[src]
Returns a mutable reference to the inner Ssl
.
pub fn connect<S>(
self,
domain: &str,
stream: S
) -> Result<SslStream<S>, HandshakeError<S>> where
S: Read + Write,
[src]
self,
domain: &str,
stream: S
) -> Result<SslStream<S>, HandshakeError<S>> where
S: Read + Write,
Initiates a client-side TLS session on a stream.
The domain is used for SNI and hostname verification.
pub fn danger_connect_without_providing_domain_for_certificate_verification_and_server_name_indication<S>(
self,
stream: S
) -> Result<SslStream<S>, HandshakeError<S>> where
S: Read + Write,
[src]
self,
stream: S
) -> Result<SslStream<S>, HandshakeError<S>> where
S: Read + Write,
Initiates a client-side TLS session on a stream without performing hostname verification.
The verification configuration of the connector's SslContext
is not overridden.
Warning
You should think very carefully before you use this method. If hostname verification is not used, any valid certificate for any site will be trusted for use from any other. This introduces a significant vulnerability to man-in-the-middle attacks.