Trait rustls::quic::QuicExt [−][src]
pub trait QuicExt {
fn quic_transport_parameters(&self) -> Option<&[u8]>;
fn zero_rtt_keys(&self) -> Option<DirectionalKeys>;
fn read_hs(&mut self, plaintext: &[u8]) -> Result<(), Error>;
fn write_hs(&mut self, buf: &mut Vec<u8>) -> Option<KeyChange>;
fn alert(&self) -> Option<AlertDescription>;
}
quic
only.Expand description
Generic methods for QUIC sessions
Required methods
Return the TLS-encoded transport parameters for the session’s peer.
While the transport parameters are technically available prior to the completion of the handshake, they cannot be fully trusted until the handshake completes, and reliance on them should be minimized. However, any tampering with the parameters will cause the handshake to fail.
fn zero_rtt_keys(&self) -> Option<DirectionalKeys>
fn zero_rtt_keys(&self) -> Option<DirectionalKeys>
Compute the keys for encrypting/decrypting 0-RTT packets, if available
Consume unencrypted TLS handshake data.
Handshake data obtained from separate encryption levels should be supplied in separate calls.
Emit unencrypted TLS handshake data.
When this returns Some(_)
, the new keys must be used for future handshake data.
fn alert(&self) -> Option<AlertDescription>
fn alert(&self) -> Option<AlertDescription>
Emit the TLS description code of a fatal alert, if one has arisen.
Check after read_hs
returns Err(_)
.