pub unsafe extern "C" fn s2n_psk_configure_early_data(
psk: *mut s2n_psk,
max_early_data_size: u32,
cipher_suite_first_byte: u8,
cipher_suite_second_byte: u8,
) -> i32
Expand description
Configures a particular pre-shared key to allow early data.
max_early_data_size
must be set to the maximum early data accepted by the server.
In order to use early data, the cipher suite set on the pre-shared key must match the cipher suite ultimately negotiated by the TLS handshake. Additionally, the cipher suite must have the same hmac algorithm as the pre-shared key.
@param psk A pointer to the pre-shared key, created with s2n_external_psk_new
.
@param max_early_data_size The maximum early data that can be sent or received using this key.
@param cipher_suite_first_byte The first byte in the registered IANA value of the associated cipher suite.
@param cipher_suite_second_byte The second byte in the registered IANA value of the associated cipher suite.
@returns A POSIX error signal. If successful, psk
was updated.