Function s2n_tls_sys::s2n_connection_get_session_id

source ยท
pub unsafe extern "C" fn s2n_connection_get_session_id(
    conn: *mut s2n_connection,
    session_id: *mut u8,
    max_length: usize
) -> c_int
Expand description

Gets the latest session id from the connection, copies it into the session_id buffer, and returns the number of copied bytes.

The session id may change between s2n receiving the ClientHello and sending the ServerHello, but this function will always describe the latest session id.

See s2n_client_hello_get_session_id() to get the session id as it was sent by the client in the ClientHello message.

@param conn A pointer to the s2n_connection object @param session_id A pointer to a buffer of size max_length @param max_length The size of the session_id buffer

@returns The number of copied bytes.