Type Alias s2n_quic::provider::tls::default::ffi::s2n_client_hello_cb_mode::Type

source ·
pub type Type = u32;
Expand description

Client Hello callback modes

  • S2N_CLIENT_HELLO_CB_BLOCKING (default):
    • In this mode s2n-tls expects the callback to complete its work and return the appropriate response code before the handshake continues. If any of the connection properties were changed based on the server_name extension the callback must either return a value greater than 0 or invoke s2n_connection_server_name_extension_used, otherwise the callback returns 0 to continue the handshake.
  • S2N_CLIENT_HELLO_CB_NONBLOCKING:
    • In non-blocking mode, s2n-tls expects the callback to not complete its work. If the callback returns a response code of 0, s2n-tls will return S2N_FAILURE with S2N_ERR_T_BLOCKED error type and s2n_blocked_status set to S2N_BLOCKED_ON_APPLICATION_INPUT. The handshake is paused and further calls to s2n_negotiate will continue to return the same error until s2n_client_hello_cb_done is invoked for the s2n_connection to resume the handshake. If any of the connection properties were changed on the basis of the server_name extension then s2n_connection_server_name_extension_used must be invoked before marking the callback done.