pub unsafe extern "C" fn s2n_offered_psk_list_choose_psk(
    psk_list: *mut s2n_offered_psk_list,
    psk: *mut s2n_offered_psk
) -> c_int
Expand description

Chooses a PSK from the offered PSK list to be used for the connection. This API matches the PSK identity received from the client against the server’s known PSK identities list, in order to choose the PSK to be used for the connection. If the PSK identity sent from the client is NULL, no PSK is chosen for the connection. If the client offered PSK identity has no matching PSK identity with the server, an error will be returned. Use this API along with the s2n_psk_selection_callback callback to select a PSK identity.

@param psk_list A pointer to the server’s known PSK list used to compare for a matching PSK with the client. @param psk A pointer to the client’s PSK object used to compare with the server’s known PSK identities.