File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,30 @@ impl<S> TlsStream<S> {
49
49
{
50
50
& mut self . 0 . get_mut ( ) . inner
51
51
}
52
+
53
+ /// Returns the number of bytes that can be read without resulting in any network calls.
54
+ pub fn buffered_read_size ( & self ) -> crate :: Result < usize >
55
+ where
56
+ S : AsyncRead + AsyncWrite + Unpin ,
57
+ {
58
+ self . 0 . buffered_read_size ( )
59
+ }
60
+
61
+ /// Returns the peer's leaf certificate, if available.
62
+ pub fn peer_certificate ( & self ) -> crate :: Result < Option < crate :: Certificate > >
63
+ where
64
+ S : AsyncRead + AsyncWrite + Unpin ,
65
+ {
66
+ self . 0 . peer_certificate ( )
67
+ }
68
+
69
+ /// Returns the tls-server-end-point channel binding data as defined in [RFC 5929](https://tools.ietf.org/html/rfc5929).
70
+ pub fn tls_server_end_point ( & self ) -> crate :: Result < Option < Vec < u8 > > >
71
+ where
72
+ S : AsyncRead + AsyncWrite + Unpin ,
73
+ {
74
+ self . 0 . tls_server_end_point ( )
75
+ }
52
76
}
53
77
54
78
impl < S > AsyncRead for TlsStream < S >
You can’t perform that action at this time.
0 commit comments