From c4b7b85d99b3e9ca154ba03be67bd6281825973c Mon Sep 17 00:00:00 2001 From: Joe Wilm Date: Mon, 4 Apr 2016 15:20:13 -0700 Subject: Add safe wrapper BioMethod for ffi::BIO_METHOD Adds a wrapper for ffi::BIO_METHOD located at ssl::bio::BioMethod. This enables SslStream to be Send without doing an unsafe impl on the ffi struct. --- openssl/src/ssl/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'openssl/src/ssl/mod.rs') diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs index ebaffb18..7b5cf492 100644 --- a/openssl/src/ssl/mod.rs +++ b/openssl/src/ssl/mod.rs @@ -35,6 +35,8 @@ mod bio; #[cfg(test)] mod tests; +use self::bio::BioMethod; + #[doc(inline)] pub use ssl::error::Error; @@ -1117,12 +1119,10 @@ make_LibSslError! { /// A stream wrapper which handles SSL encryption for an underlying stream. pub struct SslStream { ssl: Ssl, - _method: Arc, // NOTE: this *must* be after the Ssl field so things drop right + _method: Arc, // NOTE: this *must* be after the Ssl field so things drop right _p: PhantomData, } -unsafe impl Send for SslStream {} - /// # Deprecated /// /// This method does not behave as expected and will be removed in a future -- cgit v1.2.3