Function s2n_tls_sys::s2n_psk_set_application_protocol
source · [−]pub unsafe extern "C" fn s2n_psk_set_application_protocol(
psk: *mut s2n_psk,
application_protocol: *const u8,
size: u8
) -> c_int
Expand description
Sets the optional application_protocol
associated with the given pre-shared key.
In order to use early data, the application_protocol
set on the pre-shared key must match
the application_protocol
ultimately negotiated by the TLS handshake.
@param psk A pointer to the pre-shared key, created with s2n_external_psk_new
.
@param application_protocol A pointer to the associated application protocol data. This data will be copied.
@param size The size of the data to read from the application_protocol
pointer.
@return A POSIX error signal. If successful, the application protocol was set.