pub unsafe extern "C" fn s2n_psk_set_identity(
    psk: *mut s2n_psk,
    identity: *const u8,
    identity_size: u16
) -> c_int
Expand description

Sets the identity for a given external PSK object. The identity is a unique identifier for the pre-shared secret. It is a non-secret value represented by raw bytes.

Safety

The identity is transmitted over the network unencrypted and is a non-secret value. Do not include confidential information in the identity.

Note that the identity is copied into s2n-tls memory and the caller is responsible for freeing the memory associated with the identity input.

@param psk A pointer to a PSK object to be updated with the identity. @param identity The identity in raw bytes format to be copied. @param identity_size The length of the PSK identity being set.