pub unsafe extern "C" fn s2n_client_hello_get_session_id(
ch: *mut s2n_client_hello,
out: *mut u8,
out_length: *mut u32,
max_length: u32
) -> i32
Expand description
Copies up to max_length
bytes of the ClientHello session_id into the out
buffer and stores the number of copied bytes in out_length
.
Retrieve the session id as sent by the client in the ClientHello message. The session id on the s2n_connection
may change later
when the server sends the ServerHello; see s2n_connection_get_session_id
for how to get the final session id used for future session resumption.
Use s2n_client_hello_get_session_id_length() to get the the ClientHello session id length in bytes. ch
is a pointer to the s2n_client_hello
of the s2n_connection
which can be obtained using s2n_connection_get_client_hello().
@param ch A pointer to the Client Hello
@param out A pointer to the buffer that s2n will write the client session id to. This buffer MUST be the size of max_length
@param out_length An out pointer. s2n will set it’s value to the size of the session_id in bytes.
@param max_length The size of out
.
@returns S2N_SUCCESS on success. S2N_FAILURE on failure