diff options
| author | Joe Wilm <[email protected]> | 2016-04-04 15:20:13 -0700 |
|---|---|---|
| committer | Joe Wilm <[email protected]> | 2016-04-04 16:08:38 -0700 |
| commit | c4b7b85d99b3e9ca154ba03be67bd6281825973c (patch) | |
| tree | 018fbec8c85dfa250d16d0416186aced34d13e37 /openssl/src/ssl/mod.rs | |
| parent | Cleanup (diff) | |
| download | rust-openssl-c4b7b85d99b3e9ca154ba03be67bd6281825973c.tar.xz rust-openssl-c4b7b85d99b3e9ca154ba03be67bd6281825973c.zip | |
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.
Diffstat (limited to 'openssl/src/ssl/mod.rs')
| -rw-r--r-- | openssl/src/ssl/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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<S> { ssl: Ssl, - _method: Arc<ffi::BIO_METHOD>, // NOTE: this *must* be after the Ssl field so things drop right + _method: Arc<BioMethod>, // NOTE: this *must* be after the Ssl field so things drop right _p: PhantomData<S>, } -unsafe impl<S: Send> Send for SslStream<S> {} - /// # Deprecated /// /// This method does not behave as expected and will be removed in a future |