pub struct CommonState { }
Expand description
Connection state common to both client and server connections.
Source§ SourceReturns true if the caller should call Connection::write_tls
as soon as possible.
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.
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.
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).
Retrieves the ciphersuite agreed with the peer.
This returns None until the ciphersuite is agreed.
Source SourceRetrieves the protocol version agreed with the peer.
This returns None
until the version is agreed.
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.
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.
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