diff options
| author | Manuel Schölling <[email protected]> | 2015-03-15 15:52:09 +0100 |
|---|---|---|
| committer | Manuel Schölling <[email protected]> | 2015-04-06 12:23:11 +0200 |
| commit | dbef985e328f97905ce58ef14914100bd7e55e62 (patch) | |
| tree | 3b73290978d74ef74181267b73819e49613dcb67 /openssl/src/ssl/mod.rs | |
| parent | Use latest OpenSSL version in travis tests and more verbose error message in ... (diff) | |
| download | rust-openssl-dbef985e328f97905ce58ef14914100bd7e55e62.tar.xz rust-openssl-dbef985e328f97905ce58ef14914100bd7e55e62.zip | |
Move connected_socket to its own crate and fix SSL_CTX_set_read_ahead()
Diffstat (limited to 'openssl/src/ssl/mod.rs')
| -rw-r--r-- | openssl/src/ssl/mod.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs index fa388c3a..01d65220 100644 --- a/openssl/src/ssl/mod.rs +++ b/openssl/src/ssl/mod.rs @@ -25,7 +25,6 @@ use x509::{X509StoreContext, X509FileType, X509}; use crypto::pkey::PKey; pub mod error; -pub mod connected_socket; #[cfg(test)] mod tests; @@ -377,7 +376,7 @@ impl SslContext { let ctx = SslContext { ctx: ctx }; if method.is_dtls() { - ctx.set_read_ahead(); + ctx.set_read_ahead(1); } Ok(ctx) @@ -424,9 +423,9 @@ impl SslContext { } } - pub fn set_read_ahead(&self) { + pub fn set_read_ahead(&self, m: c_long) { unsafe { - ffi::SSL_CTX_ctrl(*self.ctx, ffi::SSL_CTRL_SET_READ_AHEAD, 1, ptr::null_mut()); + ffi::SSL_CTX_set_read_ahead(*self.ctx, m); } } |