aboutsummaryrefslogtreecommitdiff
path: root/openssl/src
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2016-10-23 21:54:49 -0700
committerSteven Fackler <[email protected]>2016-10-23 21:54:49 -0700
commit938fdd71374b040609cdf3d2a8e1f28abbf15203 (patch)
treef0b90990177ed964e8477b099e3c639e636893bc /openssl/src
parentMerge pull request #488 from sfackler/sslstream-kinds (diff)
downloadrust-openssl-938fdd71374b040609cdf3d2a8e1f28abbf15203.tar.xz
rust-openssl-938fdd71374b040609cdf3d2a8e1f28abbf15203.zip
Add into_error
Diffstat (limited to 'openssl/src')
-rw-r--r--openssl/src/ssl/mod.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs
index 92e0c159..3327ff22 100644
--- a/openssl/src/ssl/mod.rs
+++ b/openssl/src/ssl/mod.rs
@@ -1254,6 +1254,11 @@ impl<S> MidHandshakeSslStream<S> {
&self.error
}
+ /// Consumes `self`, returning its error.
+ pub fn into_error(self) -> Error {
+ self.error
+ }
+
/// Restarts the handshake process.
pub fn handshake(mut self) -> Result<SslStream<S>, HandshakeError<S>> {
let ret = unsafe { ffi::SSL_do_handshake(self.stream.ssl.as_ptr()) };