File tree Expand file tree Collapse file tree 7 files changed +34
-20
lines changed Expand file tree Collapse file tree 7 files changed +34
-20
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,6 @@ workflows:
63
63
jobs :
64
64
- linux :
65
65
name : openssl
66
- image : 1.30 .0-stretch
66
+ image : 1.32 .0-stretch
67
67
- macos :
68
- version : 1.30 .0
68
+ version : 1.32 .0
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ libc = "0.2"
18
18
tempfile = " 3.0"
19
19
20
20
[target .'cfg(target_os = "windows")' .dependencies ]
21
- schannel = " 0.1.13 "
21
+ schannel = " 0.1.16 "
22
22
23
23
[target .'cfg(not(any(target_os = "windows", target_os = "macos", target_os = "ios")))' .dependencies ]
24
24
log = " 0.4.5"
Original file line number Diff line number Diff line change 1
1
environment :
2
- RUST_VERSION : 1.30 .0
2
+ RUST_VERSION : 1.32 .0
3
3
TARGET : x86_64-pc-windows-msvc
4
4
install :
5
5
- ps : Start-FileDownload "https://static.rust-lang.org/dist/rust-${env:RUST_VERSION}-${env:TARGET}.exe"
Original file line number Diff line number Diff line change @@ -332,15 +332,17 @@ impl<S: fmt::Debug> fmt::Debug for TlsStream<S> {
332
332
}
333
333
}
334
334
335
- impl < S : io :: Read + io :: Write > TlsStream < S > {
335
+ impl < S > TlsStream < S > {
336
336
pub fn get_ref ( & self ) -> & S {
337
337
self . 0 . get_ref ( )
338
338
}
339
339
340
340
pub fn get_mut ( & mut self ) -> & mut S {
341
341
self . 0 . get_mut ( )
342
342
}
343
+ }
343
344
345
+ impl < S : io:: Read + io:: Write > TlsStream < S > {
344
346
pub fn buffered_read_size ( & self ) -> Result < usize , Error > {
345
347
Ok ( self . 0 . ssl ( ) . pending ( ) )
346
348
}
Original file line number Diff line number Diff line change @@ -135,18 +135,20 @@ where
135
135
}
136
136
}
137
137
138
- impl < S > MidHandshakeTlsStream < S >
139
- where
140
- S : io:: Read + io:: Write ,
141
- {
138
+ impl < S > MidHandshakeTlsStream < S > {
142
139
pub fn get_ref ( & self ) -> & S {
143
140
self . 0 . get_ref ( )
144
141
}
145
142
146
143
pub fn get_mut ( & mut self ) -> & mut S {
147
144
self . 0 . get_mut ( )
148
145
}
146
+ }
149
147
148
+ impl < S > MidHandshakeTlsStream < S >
149
+ where
150
+ S : io:: Read + io:: Write ,
151
+ {
150
152
pub fn handshake ( self ) -> Result < TlsStream < S > , HandshakeError < S > > {
151
153
match self . 0 . handshake ( ) {
152
154
Ok ( s) => Ok ( TlsStream ( s) ) ,
@@ -273,15 +275,17 @@ impl<S: fmt::Debug> fmt::Debug for TlsStream<S> {
273
275
}
274
276
}
275
277
276
- impl < S : io :: Read + io :: Write > TlsStream < S > {
278
+ impl < S > TlsStream < S > {
277
279
pub fn get_ref ( & self ) -> & S {
278
280
self . 0 . get_ref ( )
279
281
}
280
282
281
283
pub fn get_mut ( & mut self ) -> & mut S {
282
284
self . 0 . get_mut ( )
283
285
}
286
+ }
284
287
288
+ impl < S : io:: Read + io:: Write > TlsStream < S > {
285
289
pub fn buffered_read_size ( & self ) -> Result < usize , Error > {
286
290
Ok ( self . 0 . get_buf ( ) . len ( ) )
287
291
}
Original file line number Diff line number Diff line change @@ -218,10 +218,7 @@ where
218
218
}
219
219
}
220
220
221
- impl < S > MidHandshakeTlsStream < S >
222
- where
223
- S : io:: Read + io:: Write ,
224
- {
221
+ impl < S > MidHandshakeTlsStream < S > {
225
222
pub fn get_ref ( & self ) -> & S {
226
223
match * self {
227
224
MidHandshakeTlsStream :: Server ( ref s, _) => s. get_ref ( ) ,
@@ -235,7 +232,12 @@ where
235
232
MidHandshakeTlsStream :: Client ( ref mut s) => s. get_mut ( ) ,
236
233
}
237
234
}
235
+ }
238
236
237
+ impl < S > MidHandshakeTlsStream < S >
238
+ where
239
+ S : io:: Read + io:: Write ,
240
+ {
239
241
pub fn handshake ( self ) -> Result < TlsStream < S > , HandshakeError < S > > {
240
242
match self {
241
243
MidHandshakeTlsStream :: Server ( s, cert) => match s. handshake ( ) {
@@ -362,15 +364,17 @@ impl<S: fmt::Debug> fmt::Debug for TlsStream<S> {
362
364
}
363
365
}
364
366
365
- impl < S : io :: Read + io :: Write > TlsStream < S > {
367
+ impl < S > TlsStream < S > {
366
368
pub fn get_ref ( & self ) -> & S {
367
369
self . stream . get_ref ( )
368
370
}
369
371
370
372
pub fn get_mut ( & mut self ) -> & mut S {
371
373
self . stream . get_mut ( )
372
374
}
375
+ }
373
376
377
+ impl < S : io:: Read + io:: Write > TlsStream < S > {
374
378
pub fn buffered_read_size ( & self ) -> Result < usize , Error > {
375
379
Ok ( self . stream . context ( ) . buffered_read_size ( ) ?)
376
380
}
Original file line number Diff line number Diff line change @@ -220,10 +220,7 @@ where
220
220
}
221
221
}
222
222
223
- impl < S > MidHandshakeTlsStream < S >
224
- where
225
- S : io:: Read + io:: Write ,
226
- {
223
+ impl < S > MidHandshakeTlsStream < S > {
227
224
/// Returns a shared reference to the inner stream.
228
225
pub fn get_ref ( & self ) -> & S {
229
226
self . 0 . get_ref ( )
@@ -233,7 +230,12 @@ where
233
230
pub fn get_mut ( & mut self ) -> & mut S {
234
231
self . 0 . get_mut ( )
235
232
}
233
+ }
236
234
235
+ impl < S > MidHandshakeTlsStream < S >
236
+ where
237
+ S : io:: Read + io:: Write ,
238
+ {
237
239
/// Restarts the handshake process.
238
240
///
239
241
/// If the handshake completes successfully then the negotiated stream is
@@ -608,7 +610,7 @@ impl<S: fmt::Debug> fmt::Debug for TlsStream<S> {
608
610
}
609
611
}
610
612
611
- impl < S : io :: Read + io :: Write > TlsStream < S > {
613
+ impl < S > TlsStream < S > {
612
614
/// Returns a shared reference to the inner stream.
613
615
pub fn get_ref ( & self ) -> & S {
614
616
self . 0 . get_ref ( )
@@ -618,7 +620,9 @@ impl<S: io::Read + io::Write> TlsStream<S> {
618
620
pub fn get_mut ( & mut self ) -> & mut S {
619
621
self . 0 . get_mut ( )
620
622
}
623
+ }
621
624
625
+ impl < S : io:: Read + io:: Write > TlsStream < S > {
622
626
/// Returns the number of bytes that can be read without resulting in any
623
627
/// network calls.
624
628
pub fn buffered_read_size ( & self ) -> Result < usize > {
You can’t perform that action at this time.
0 commit comments