aboutsummaryrefslogtreecommitdiff
path: root/openssl/src/ssl
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2015-11-28 16:15:16 -0800
committerSteven Fackler <[email protected]>2015-11-28 16:15:16 -0800
commitbadec803cb9e496e8c6a6ca5a00bbdc3180fb4f6 (patch)
treeb491290d3ed0e2cb5e22876582db083cf82bf46b /openssl/src/ssl
parentMerge branch 'release-v0.7.0' into release (diff)
parentRelease v0.7.1 (diff)
downloadrust-openssl-0.7.1.tar.xz
rust-openssl-0.7.1.zip
Merge branch 'release-v0.7.1' into releasev0.7.1
Diffstat (limited to 'openssl/src/ssl')
-rw-r--r--openssl/src/ssl/mod.rs12
1 files changed, 11 insertions, 1 deletions
diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs
index 23364ef1..cca369a2 100644
--- a/openssl/src/ssl/mod.rs
+++ b/openssl/src/ssl/mod.rs
@@ -588,7 +588,7 @@ impl SslContext {
/// If `onoff` is set to `true`, enable ECDHE for key exchange with compatible
/// clients, and automatically select an appropriate elliptic curve.
///
- /// This method requires OpenSSL >= 1.2.0 or LibreSSL and the `ecdh_auto` feature.
+ /// This method requires OpenSSL >= 1.0.2 or LibreSSL and the `ecdh_auto` feature.
#[cfg(feature = "ecdh_auto")]
pub fn set_ecdh_auto(&mut self, onoff: bool) -> Result<(),SslError> {
wrap_ssl_result(
@@ -1416,6 +1416,16 @@ impl<S> MaybeSslStream<S> where S: Read+Write {
}
}
+impl MaybeSslStream<net::TcpStream> {
+ /// Like `TcpStream::try_clone`.
+ pub fn try_clone(&self) -> io::Result<MaybeSslStream<net::TcpStream>> {
+ match *self {
+ MaybeSslStream::Ssl(ref s) => s.try_clone().map(MaybeSslStream::Ssl),
+ MaybeSslStream::Normal(ref s) => s.try_clone().map(MaybeSslStream::Normal),
+ }
+ }
+}
+
/// An SSL stream wrapping a nonblocking socket.
#[derive(Clone)]
pub struct NonblockingSslStream<S> {