Function s2n_tls_sys::s2n_connection_get_session

source ·
pub unsafe extern "C" fn s2n_connection_get_session(
    conn: *mut s2n_connection,
    session: *mut u8,
    max_length: usize
) -> c_int
Expand description

Serializes the session state from connection and copies into the session buffer and returns the number of copied bytes

@note This function is not recommended for > TLS 1.2 because in TLS1.3 servers can send multiple session tickets and this function will only return the most recently received ticket.

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

@returns The number of copied bytes