| { | ||
| "git": { | ||
| "sha1": "0ccbc63df37c846691d87670c412decb3c4f23a1" | ||
| "sha1": "647ece13463bbb6eaf756146596fe182644424b1" | ||
| }, | ||
| "path_in_vcs": "rustls" | ||
| } |
| #![cfg(feature = "ring")] | ||
| #![allow(clippy::disallowed_types)] | ||
| use std::io; | ||
| use std::sync::Arc; | ||
@@ -10,3 +9,3 @@ | ||
| use rustls::crypto::ring as provider; | ||
| use rustls_test::{FailsReads, KeyType, make_server_config}; | ||
| use rustls_test::{KeyType, TestNonBlockIo, make_server_config}; | ||
@@ -16,4 +15,3 @@ fn bench_ewouldblock(c: &mut Bencher) { | ||
| let mut server = ServerConnection::new(Arc::new(server_config)).unwrap(); | ||
| let mut read_ewouldblock = FailsReads::new(io::ErrorKind::WouldBlock); | ||
| c.iter(|| server.read_tls(&mut read_ewouldblock)); | ||
| c.iter(|| server.read_tls(&mut TestNonBlockIo::default())); | ||
| } | ||
@@ -20,0 +18,0 @@ |
+11
-68
@@ -506,3 +506,3 @@ # This file is automatically @generated by Cargo. | ||
| "cfg-if", | ||
| "windows-targets 0.48.5", | ||
| "windows-targets", | ||
| ] | ||
@@ -772,3 +772,3 @@ | ||
| name = "rustls" | ||
| version = "0.23.30" | ||
| version = "0.23.31" | ||
| dependencies = [ | ||
@@ -1012,3 +1012,3 @@ "aws-lc-rs", | ||
| dependencies = [ | ||
| "windows-targets 0.52.6", | ||
| "windows-targets", | ||
| ] | ||
@@ -1022,3 +1022,3 @@ | ||
| dependencies = [ | ||
| "windows-targets 0.52.6", | ||
| "windows-targets", | ||
| ] | ||
@@ -1028,17 +1028,2 @@ | ||
| name = "windows-targets" | ||
| version = "0.48.5" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" | ||
| dependencies = [ | ||
| "windows_aarch64_gnullvm 0.48.5", | ||
| "windows_aarch64_msvc 0.48.5", | ||
| "windows_i686_gnu 0.48.5", | ||
| "windows_i686_msvc 0.48.5", | ||
| "windows_x86_64_gnu 0.48.5", | ||
| "windows_x86_64_gnullvm 0.48.5", | ||
| "windows_x86_64_msvc 0.48.5", | ||
| ] | ||
| [[package]] | ||
| name = "windows-targets" | ||
| version = "0.52.6" | ||
@@ -1048,10 +1033,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| dependencies = [ | ||
| "windows_aarch64_gnullvm 0.52.6", | ||
| "windows_aarch64_msvc 0.52.6", | ||
| "windows_i686_gnu 0.52.6", | ||
| "windows_aarch64_gnullvm", | ||
| "windows_aarch64_msvc", | ||
| "windows_i686_gnu", | ||
| "windows_i686_gnullvm", | ||
| "windows_i686_msvc 0.52.6", | ||
| "windows_x86_64_gnu 0.52.6", | ||
| "windows_x86_64_gnullvm 0.52.6", | ||
| "windows_x86_64_msvc 0.52.6", | ||
| "windows_i686_msvc", | ||
| "windows_x86_64_gnu", | ||
| "windows_x86_64_gnullvm", | ||
| "windows_x86_64_msvc", | ||
| ] | ||
@@ -1061,8 +1046,2 @@ | ||
| name = "windows_aarch64_gnullvm" | ||
| version = "0.48.5" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" | ||
| [[package]] | ||
| name = "windows_aarch64_gnullvm" | ||
| version = "0.52.6" | ||
@@ -1074,8 +1053,2 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| name = "windows_aarch64_msvc" | ||
| version = "0.48.5" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" | ||
| [[package]] | ||
| name = "windows_aarch64_msvc" | ||
| version = "0.52.6" | ||
@@ -1087,8 +1060,2 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| name = "windows_i686_gnu" | ||
| version = "0.48.5" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" | ||
| [[package]] | ||
| name = "windows_i686_gnu" | ||
| version = "0.52.6" | ||
@@ -1106,8 +1073,2 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| name = "windows_i686_msvc" | ||
| version = "0.48.5" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" | ||
| [[package]] | ||
| name = "windows_i686_msvc" | ||
| version = "0.52.6" | ||
@@ -1119,8 +1080,2 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| name = "windows_x86_64_gnu" | ||
| version = "0.48.5" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" | ||
| [[package]] | ||
| name = "windows_x86_64_gnu" | ||
| version = "0.52.6" | ||
@@ -1132,8 +1087,2 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| name = "windows_x86_64_gnullvm" | ||
| version = "0.48.5" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" | ||
| [[package]] | ||
| name = "windows_x86_64_gnullvm" | ||
| version = "0.52.6" | ||
@@ -1145,8 +1094,2 @@ source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| name = "windows_x86_64_msvc" | ||
| version = "0.48.5" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" | ||
| [[package]] | ||
| name = "windows_x86_64_msvc" | ||
| version = "0.52.6" | ||
@@ -1153,0 +1096,0 @@ source = "registry+https://github.com/rust-lang/crates.io-index" |
+1
-1
@@ -16,3 +16,3 @@ # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO | ||
| name = "rustls" | ||
| version = "0.23.30" | ||
| version = "0.23.31" | ||
| build = "build.rs" | ||
@@ -19,0 +19,0 @@ exclude = [ |
+19
-1
@@ -641,2 +641,11 @@ use alloc::boxed::Box; | ||
| // If we want to write, but are WouldBlocked by the underlying IO, *and* | ||
| // have no desire to read; that is everything. | ||
| if let (Some(_), false) = (&blocked_write, self.wants_read()) { | ||
| return match wrlen { | ||
| 0 => Err(blocked_write.unwrap()), | ||
| _ => Ok((rdlen, wrlen)), | ||
| }; | ||
| } | ||
| while !eof && self.wants_read() { | ||
@@ -672,2 +681,11 @@ let read_size = match self.read_tls(io) { | ||
| // If we want to read, but are WouldBlocked by the underlying IO, *and* | ||
| // have no desire to write; that is everything. | ||
| if let (Some(_), false) = (&blocked_read, self.wants_write()) { | ||
| return match rdlen { | ||
| 0 => Err(blocked_read.unwrap()), | ||
| _ => Ok((rdlen, wrlen)), | ||
| }; | ||
| } | ||
| // if we're doing IO until handshaked, and we believe we've finished handshaking, | ||
@@ -683,5 +701,5 @@ // but process_new_packets() has queued TLS data to send, loop around again to write | ||
| (_, true, false, _) => return Ok((rdlen, wrlen)), | ||
| (_, _, _, Some((e, _))) if rdlen == 0 && wrlen == 0 => return Err(e), | ||
| (_, false, _, _) => return Ok((rdlen, wrlen)), | ||
| (true, true, true, _) => return Err(io::Error::from(io::ErrorKind::UnexpectedEof)), | ||
| (_, _, _, Some((e, _))) => return Err(e), | ||
| _ => {} | ||
@@ -688,0 +706,0 @@ } |
Sorry, the diff of this file is not supported yet