pub struct ReceivedEarlyData { /* private fields */ }Expand description
A piece of early data received from the client during the handshake.
“Early data” is also known as “0-RTT data”.
Beware that early data is subject to replay by an attacker; see RFC 9846 appendix F.5 for more detail.
The data is received in arbitrary-sized pieces. Avoid writing your application to be sensitive to the boundaries.
Implementations§
Source§impl ReceivedEarlyData
impl ReceivedEarlyData
Sourcepub fn into_next(self) -> (Vec<u8>, NeedsInput<ServerSide>)
pub fn into_next(self) -> (Vec<u8>, NeedsInput<ServerSide>)
Obtain the received early data.
The returned NeedsInput should be given the same input buffer: it may
already contain further messages from the client.
Sourcepub fn early_exporter(&mut self) -> Result<KeyingMaterialExporter, Error>
pub fn early_exporter(&mut self) -> Result<KeyingMaterialExporter, Error>
Returns the “early” exporter that can derive key material for use in early data
See RFC 5705 for general details on what exporters are, and RFC 9846 S7.5 for specific details on the “early” exporter.
Beware that the early exporter requires care, as it is subject to the same potential for replay as early data itself. See RFC 9846 appendix F.5.1 for more detail.
This function can be called at most once per connection. This function will error if called more than once per connection.
If you are looking for the normal exporter, this is available from
Connection::exporter().