pub unsafe extern "C" fn s2n_connection_get_negotiated_psk_identity(
    conn: *mut s2n_connection,
    identity: *mut u8,
    max_identity_length: u16
) -> c_int
Expand description

Gets the negotiated PSK identity from the s2n connection object. If the negotiated PSK does not exist, the PSK identity will not be obtained and no error will be returned. Prior to this API call, use s2n_connection_get_negotiated_psk_identity_length to determine if a negotiated PSK exists or not.

Safety

The negotiated PSK identity will be copied into the identity buffer on success. Therefore, the identity buffer must have enough memory to fit the identity length.

@param conn A pointer to the s2n_connection object. @param identity The negotiated PSK identity obtained from the s2n_connection object. @param max_identity_length The maximum length for the PSK identity. If the negotiated psk_identity length is greater than this max_identity_length value an error will be returned.