aboutsummaryrefslogtreecommitdiff
path: root/openssl/src/ssl/mod.rs
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2016-10-29 15:00:46 -0700
committerSteven Fackler <[email protected]>2016-10-29 15:00:46 -0700
commite72533c058967f56b302e40c63175cb1b078d052 (patch)
tree7d1e20ebe59c5ea043623a24c09fb6ae0a4ac9d3 /openssl/src/ssl/mod.rs
parentAdd PKeyRef (diff)
downloadrust-openssl-e72533c058967f56b302e40c63175cb1b078d052.tar.xz
rust-openssl-e72533c058967f56b302e40c63175cb1b078d052.zip
Docs for connectors
Diffstat (limited to 'openssl/src/ssl/mod.rs')
-rw-r--r--openssl/src/ssl/mod.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs
index 9e39d8bf..ddf27460 100644
--- a/openssl/src/ssl/mod.rs
+++ b/openssl/src/ssl/mod.rs
@@ -342,6 +342,7 @@ pub enum SniError {
NoAck,
}
+/// A builder for `SslContext`s.
pub struct SslContextBuilder(*mut ffi::SSL_CTX);
impl Drop for SslContextBuilder {
@@ -793,6 +794,7 @@ impl SslCipherRef {
}
}
+/// A reference to an `Ssl`.
pub struct SslRef(Opaque);
unsafe impl Send for SslRef {}
@@ -1104,6 +1106,11 @@ impl Ssl {
}
/// Creates an SSL/TLS client operating over the provided stream.
+ ///
+ /// # Warning
+ ///
+ /// OpenSSL's default configuration is insecure. It is highly recommended to use
+ /// `ClientConnector` rather than `Ssl` directly, as it manages that configuration.
pub fn connect<S>(self, stream: S) -> Result<SslStream<S>, HandshakeError<S>>
where S: Read + Write
{
@@ -1131,6 +1138,11 @@ impl Ssl {
}
/// Creates an SSL/TLS server operating over the provided stream.
+ ///
+ /// # Warning
+ ///
+ /// OpenSSL's default configuration is insecure. It is highly recommended to use
+ /// `ServerConnector` rather than `Ssl` directly, as it manages that configuration.
pub fn accept<S>(self, stream: S) -> Result<SslStream<S>, HandshakeError<S>>
where S: Read + Write
{