A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.rs/rustls/latest/rustls/struct.CommonState.html below:

CommonState in rustls - Rust

pub struct CommonState {  }
Expand description

Connection state common to both client and server connections.

Source§ Source

Returns true if the caller should call Connection::write_tls as soon as possible.

Source

Returns true if the connection is currently performing the TLS handshake.

During this time plaintext written to the connection is buffered in memory. After Connection::process_new_packets() has been called, this might start to return false while the final handshake packets still need to be extracted from the connection’s buffers.

Source

Retrieves the certificate chain or the raw public key used by the peer to authenticate.

The order of the certificate chain is as it appears in the TLS protocol: the first certificate relates to the peer, the second certifies the first, the third certifies the second, and so on.

When using raw public keys, the first and only element is the raw public key.

This is made available for both full and resumed handshakes.

For clients, this is the certificate chain or the raw public key of the server.

For servers, this is the certificate chain or the raw public key of the client, if client authentication was completed.

The return value is None until this value is available.

Note: the return type of the ‘certificate’, when using raw public keys is CertificateDer<'static> even though this should technically be a SubjectPublicKeyInfoDer<'static>. This choice simplifies the API and ensures backwards compatibility.

Source

Retrieves the protocol agreed with the peer via ALPN.

A return value of None after handshake completion means no protocol was agreed (because no protocols were offered or accepted by the peer).

Source

Retrieves the ciphersuite agreed with the peer.

This returns None until the ciphersuite is agreed.

Source Source

Retrieves the protocol version agreed with the peer.

This returns None until the version is agreed.

Source

Which kind of handshake was performed.

This tells you whether the handshake was a resumption or not.

This will return None before it is known which sort of handshake occurred.

Source

Queues a close_notify warning alert to be sent in the next Connection::write_tls call. This informs the peer that the connection is being closed.

Does nothing if any close_notify or fatal alert was already sent.

Source

Returns true if the caller should call Connection::read_tls as soon as possible.

If there is pending plaintext data to read with Connection::reader, this returns false. If your application respects this mechanism, only one full TLS message will be buffered by rustls.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4