Function prepare_resumption

Source
fn prepare_resumption<'a>(
    resuming: &'a Option<Retrieved<ClientSessionValue>>,
    exts: &mut ClientExtensions<'_>,
    suite: Option<SupportedCipherSuite>,
    cx: &mut Context<'_, ClientConnectionData>,
    config: &ClientConfig,
) -> Option<Retrieved<&'a Tls13ClientSessionValue>>
Expand description

Prepares exts and cx with TLS 1.2 or TLS 1.3 session resumption.

  • suite is None if this is the initial ClientHello, or Some if we’re retrying in response to a HelloRetryRequest.

This function will push onto exts to

(a) request a new ticket if we don’t have one, (b) send our TLS 1.2 ticket after retrieving an 1.2 session, (c) send a request for 1.3 early data if allowed and (d) send a 1.3 preshared key if we have one.

It returns the TLS 1.3 PSKs, if any, for further processing.