diff options
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | openssl-sys-extras/Cargo.toml | 6 | ||||
| -rw-r--r-- | openssl-sys-extras/src/lib.rs | 2 | ||||
| -rw-r--r-- | openssl-sys/Cargo.toml | 4 | ||||
| -rw-r--r-- | openssl-sys/src/lib.rs | 3 | ||||
| -rw-r--r-- | openssl/Cargo.toml | 9 | ||||
| -rw-r--r-- | openssl/src/lib.rs | 2 | ||||
| -rw-r--r-- | openssl/src/ssl/mod.rs | 36 |
8 files changed, 30 insertions, 34 deletions
@@ -2,7 +2,7 @@ [](https://travis-ci.org/sfackler/rust-openssl) -[Documentation](https://sfackler.github.io/rust-openssl/doc/v0.7.4/openssl). +[Documentation](https://sfackler.github.io/rust-openssl/doc/v0.7.5/openssl). ## Building diff --git a/openssl-sys-extras/Cargo.toml b/openssl-sys-extras/Cargo.toml index 01a49e78..99bb3b71 100644 --- a/openssl-sys-extras/Cargo.toml +++ b/openssl-sys-extras/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "openssl-sys-extras" -version = "0.7.4" +version = "0.7.5" authors = ["Steven Fackler <[email protected]>"] license = "MIT" description = "Extra FFI bindings to OpenSSL that require a C shim" repository = "https://github.com/sfackler/rust-openssl" -documentation = "https://sfackler.github.io/rust-openssl/doc/v0.7.4/openssl_sys_extras" +documentation = "https://sfackler.github.io/rust-openssl/doc/v0.7.5/openssl_sys_extras" build = "build.rs" [features] @@ -13,7 +13,7 @@ ecdh_auto = [] [dependencies] libc = "0.2" -openssl-sys = { version = "0.7.4", path = "../openssl-sys" } +openssl-sys = { version = "0.7.5", path = "../openssl-sys" } [build-dependencies] gcc = "0.3" diff --git a/openssl-sys-extras/src/lib.rs b/openssl-sys-extras/src/lib.rs index 6097155a..a6b372a7 100644 --- a/openssl-sys-extras/src/lib.rs +++ b/openssl-sys-extras/src/lib.rs @@ -1,5 +1,5 @@ #![allow(non_upper_case_globals, non_snake_case)] -#![doc(html_root_url="https://sfackler.github.io/rust-openssl/doc/v0.7.4")] +#![doc(html_root_url="https://sfackler.github.io/rust-openssl/doc/v0.7.5")] extern crate openssl_sys; extern crate libc; diff --git a/openssl-sys/Cargo.toml b/openssl-sys/Cargo.toml index 735c4d51..25957320 100644 --- a/openssl-sys/Cargo.toml +++ b/openssl-sys/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "openssl-sys" -version = "0.7.4" +version = "0.7.5" authors = ["Alex Crichton <[email protected]>", "Steven Fackler <[email protected]>"] license = "MIT" description = "FFI bindings to OpenSSL" repository = "https://github.com/sfackler/rust-openssl" -documentation = "https://sfackler.github.io/rust-openssl/doc/v0.7.4/openssl_sys" +documentation = "https://sfackler.github.io/rust-openssl/doc/v0.7.5/openssl_sys" links = "openssl" build = "build.rs" diff --git a/openssl-sys/src/lib.rs b/openssl-sys/src/lib.rs index 28d4a59c..ff221935 100644 --- a/openssl-sys/src/lib.rs +++ b/openssl-sys/src/lib.rs @@ -1,6 +1,6 @@ #![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)] #![allow(dead_code)] -#![doc(html_root_url="https://sfackler.github.io/rust-openssl/doc/v0.7.4")] +#![doc(html_root_url="https://sfackler.github.io/rust-openssl/doc/v0.7.5")] extern crate libc; @@ -46,7 +46,6 @@ pub type bio_info_cb = Option<unsafe extern "C" fn(*mut BIO, #[repr(C)] #[derive(Copy, Clone)] -#[allow(raw_pointer_derive)] pub struct BIO_METHOD { pub type_: c_int, pub name: *const c_char, diff --git a/openssl/Cargo.toml b/openssl/Cargo.toml index 2dd9c32f..3275c2ae 100644 --- a/openssl/Cargo.toml +++ b/openssl/Cargo.toml @@ -1,14 +1,15 @@ [package] name = "openssl" -version = "0.7.4" +version = "0.7.5" authors = ["Steven Fackler <[email protected]>"] license = "Apache-2.0" description = "OpenSSL bindings" repository = "https://github.com/sfackler/rust-openssl" -documentation = "https://sfackler.github.io/rust-openssl/doc/v0.7.4/openssl" +documentation = "https://sfackler.github.io/rust-openssl/doc/v0.7.5/openssl" readme = "../README.md" keywords = ["crypto", "tls", "ssl", "dtls"] build = "build.rs" +exclude = ["test/*"] [features] tlsv1_2 = ["openssl-sys/tlsv1_2"] @@ -31,8 +32,8 @@ nightly = [] bitflags = ">= 0.2, < 0.4" lazy_static = "0.1" libc = "0.2" -openssl-sys = { version = "0.7.4", path = "../openssl-sys" } -openssl-sys-extras = { version = "0.7.4", path = "../openssl-sys-extras" } +openssl-sys = { version = "0.7.5", path = "../openssl-sys" } +openssl-sys-extras = { version = "0.7.5", path = "../openssl-sys-extras" } [build-dependencies] gcc = "0.3" diff --git a/openssl/src/lib.rs b/openssl/src/lib.rs index 54feab0d..ac68fecb 100644 --- a/openssl/src/lib.rs +++ b/openssl/src/lib.rs @@ -1,4 +1,4 @@ -#![doc(html_root_url="https://sfackler.github.io/rust-openssl/doc/v0.7.4")] +#![doc(html_root_url="https://sfackler.github.io/rust-openssl/doc/v0.7.5")] #![cfg_attr(feature = "nightly", feature(const_fn, recover, panic_propagate))] #[macro_use] diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs index 7366cc4a..8e6d061d 100644 --- a/openssl/src/ssl/mod.rs +++ b/openssl/src/ssl/mod.rs @@ -1094,10 +1094,9 @@ impl<S: Read + Write> SslStream<S> { if ret > 0 { Ok(stream) } else { - match stream.make_error(ret) { - // This is fine - nonblocking sockets will finish the handshake in read/write - Error::WantRead(..) | Error::WantWrite(..) => Ok(stream), - _ => Err(stream.make_old_error(ret)), + match stream.make_old_error(ret) { + Some(err) => Err(err), + None => Ok(stream), } } } @@ -1110,10 +1109,9 @@ impl<S: Read + Write> SslStream<S> { if ret > 0 { Ok(stream) } else { - match stream.make_error(ret) { - // This is fine - nonblocking sockets will finish the handshake in read/write - Error::WantRead(..) | Error::WantWrite(..) => Ok(stream), - _ => Err(stream.make_old_error(ret)), + match stream.make_old_error(ret) { + Some(err) => Err(err), + None => Ok(stream), } } } @@ -1188,11 +1186,11 @@ impl<S> SslStream<S> { } } - fn make_old_error(&mut self, ret: c_int) -> SslError { + fn make_old_error(&mut self, ret: c_int) -> Option<SslError> { self.check_panic(); match self.ssl.get_error(ret) { - LibSslError::ErrorSsl => SslError::get(), + LibSslError::ErrorSsl => Some(SslError::get()), LibSslError::ErrorSyscall => { let err = SslError::get(); let count = match err { @@ -1201,22 +1199,20 @@ impl<S> SslStream<S> { }; if count == 0 { if ret == 0 { - SslError::StreamError(io::Error::new(io::ErrorKind::ConnectionAborted, - "unexpected EOF observed")) + Some(SslError::StreamError(io::Error::new(io::ErrorKind::ConnectionAborted, + "unexpected EOF observed"))) } else { - SslError::StreamError(self.get_bio_error()) + Some(SslError::StreamError(self.get_bio_error())) } } else { - err + Some(err) } } - LibSslError::ErrorZeroReturn => SslError::SslSessionClosed, - LibSslError::ErrorWantWrite | LibSslError::ErrorWantRead => { - SslError::StreamError(self.get_bio_error()) - } + LibSslError::ErrorZeroReturn => Some(SslError::SslSessionClosed), + LibSslError::ErrorWantWrite | LibSslError::ErrorWantRead => None, err => { - SslError::StreamError(io::Error::new(io::ErrorKind::Other, - format!("unexpected error {:?}", err))) + Some(SslError::StreamError(io::Error::new(io::ErrorKind::Other, + format!("unexpected error {:?}", err)))) } } } |