Type Alias s2n_tls_sys::s2n_early_data_cb

source ·
pub type s2n_early_data_cb = Option<unsafe extern "C" fn(conn: *mut s2n_connection, early_data: *mut s2n_offered_early_data) -> c_int>;
Expand description

A callback which can be implemented to accept or reject early data.

This callback is triggered only after the server has determined early data is otherwise acceptable according to the TLS early data specification. Implementations therefore only need to cover application-specific checks, not the standard TLS early data validation.

This callback can be synchronous or asynchronous. For asynchronous behavior, return success without calling s2n_offered_early_data_reject or s2n_offered_early_data_accept. early_data will still be a valid reference, and the connection will block until s2n_offered_early_data_reject or s2n_offered_early_data_accept is called.

@param conn A pointer to the connection @param early_data A pointer which can be used to access information about the proposed early data and then accept or reject it. @returns A POSIX error signal. If unsuccessful, the connection will be closed with an error.

Aliased Type§

enum s2n_early_data_cb {
    None,
    Some(unsafe extern "C" fn(_: *mut s2n_connection, _: *mut s2n_offered_early_data) -> i32),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(_: *mut s2n_connection, _: *mut s2n_offered_early_data) -> i32)

Some value of type T.