pub unsafe extern "C" fn s2n_config_set_psk_selection_callback(
    config: *mut s2n_config,
    cb: Option<unsafe extern "C" fn(_: *mut s2n_connection, _: *mut c_void, _: *mut s2n_offered_psk_list) -> i32>,
    context: *mut c_void
) -> i32
Expand description

Sets the callback to select the matching PSK. If this callback is not set s2n-tls uses a default PSK selection logic that selects the first matching server PSK.

@param config A pointer to the s2n_config object. @param cb The function that should be called when the callback is triggered. @param context A pointer to a context for the caller to pass state to the callback, if needed.