aboutsummaryrefslogtreecommitdiff
path: root/openssl/src/ssl/mod.rs
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2016-01-30 10:44:01 -0800
committerSteven Fackler <[email protected]>2016-05-03 20:24:07 -0700
commit58654bc49140d37f28837ba1982ed4aa9fc5c466 (patch)
treeb30a84f015d28016131e8c1d125ccddb4eca406f /openssl/src/ssl/mod.rs
parentRemove NonblockingSslStream (diff)
downloadrust-openssl-58654bc49140d37f28837ba1982ed4aa9fc5c466.tar.xz
rust-openssl-58654bc49140d37f28837ba1982ed4aa9fc5c466.zip
Remove deprecated methods
Diffstat (limited to 'openssl/src/ssl/mod.rs')
-rw-r--r--openssl/src/ssl/mod.rs62
1 files changed, 1 insertions, 61 deletions
diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs
index 4404eb55..c713aeb2 100644
--- a/openssl/src/ssl/mod.rs
+++ b/openssl/src/ssl/mod.rs
@@ -7,7 +7,6 @@ use std::io;
use std::io::prelude::*;
use std::mem;
use std::str;
-use std::net;
use std::path::Path;
use std::ptr;
use std::sync::{Once, ONCE_INIT, Mutex, Arc};
@@ -922,15 +921,6 @@ impl Drop for Ssl {
}
}
-impl Clone for Ssl {
- /// # Deprecated
- fn clone(&self) -> Ssl {
- unsafe { rust_SSL_clone(self.ssl) };
- Ssl { ssl: self.ssl }
-
- }
-}
-
impl Ssl {
pub fn new(ctx: &SslContext) -> Result<Ssl, SslError> {
let ssl = try_ssl_null!(unsafe { ffi::SSL_new(ctx.ctx) });
@@ -1210,19 +1200,7 @@ pub struct SslStream<S> {
_p: PhantomData<S>,
}
-/// # Deprecated
-///
-/// This method does not behave as expected and will be removed in a future
-/// release.
-impl<S: Clone + Read + Write> Clone for SslStream<S> {
- fn clone(&self) -> SslStream<S> {
- SslStream {
- ssl: self.ssl.clone(),
- _method: self._method.clone(),
- _p: PhantomData,
- }
- }
-}
+unsafe impl<S: Send> Send for SslStream<S> {}
impl<S> fmt::Debug for SslStream<S> where S: fmt::Debug
{
@@ -1292,20 +1270,6 @@ impl<S: Read + Write> SslStream<S> {
}
}
- /// ### Deprecated
- ///
- /// Use `connect`.
- pub fn connect_generic<T: IntoSsl>(ssl: T, stream: S) -> Result<SslStream<S>, SslError> {
- Self::connect(ssl, stream)
- }
-
- /// ### Deprecated
- ///
- /// Use `accept`.
- pub fn accept_generic<T: IntoSsl>(ssl: T, stream: S) -> Result<SslStream<S>, SslError> {
- Self::accept(ssl, stream)
- }
-
/// Like `read`, but returns an `ssl::Error` rather than an `io::Error`.
///
/// This is particularly useful with a nonblocking socket, where the error
@@ -1442,20 +1406,6 @@ impl<S> SslStream<S> {
}
}
-impl SslStream<::std::net::TcpStream> {
- /// # Deprecated
- ///
- /// This method does not behave as expected and will be removed in a future
- /// release.
- pub fn try_clone(&self) -> io::Result<SslStream<::std::net::TcpStream>> {
- Ok(SslStream {
- ssl: self.ssl.clone(),
- _method: self._method.clone(),
- _p: PhantomData,
- })
- }
-}
-
impl<S: Read + Write> Read for SslStream<S> {
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
match self.ssl_read(buf) {
@@ -1562,13 +1512,3 @@ 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),
- }
- }
-}