Struct telos::TlsStream
[−]
[src]
pub struct TlsStream<T> { // some fields omitted }
Methods
impl<T> TlsStream<T>
fn handshake(&mut self) -> TlsResult<()>
Executes the TLS handshake. This function is automatically called when reading or writing, you usually don't need to call it unless you want to force the handshake to finish sooner.
Calling handshake multiple times, if the other end of the connection is not expecting it will usually result in an error.
fn shutdown(&mut self) -> Result<()>
Close TLS connection. This will not close the underlying transport.
fn certificate_issuer(&self) -> String
Calling this method before the handshake is complete causes this method to return an empty string. See handshake().
fn certificate_hash(&self) -> String
Calling this method before the handshake is complete causes this method to return an empty string. See handshake().
fn certificate_subject(&self) -> String
Calling this method before the handshake is complete causes this method to return an empty string. See handshake().
fn peer_cert_provided(&self) -> bool
fn peer_cert_notbefore(&self) -> TlsResult<DateTime<UTC>>
fn peer_cert_notafter(&self) -> TlsResult<DateTime<UTC>>
fn peer_cert_contains_name(&self, name: &str) -> bool
fn version(&self) -> String
Calling this method before the handshake is complete causes this method to return an empty string. See handshake().
fn cipher(&self) -> String
Calling this method before the handshake is complete causes this method to return an empty string. See handshake().
fn inner(&self) -> &T
Returns a reference to the inner object holding the socket.
fn inner_mut(&mut self) -> &mut T
If available returns a mutable reference to the inner object holding the socket.