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.
- 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_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
withS2N_ERR_T_BLOCKED
error type ands2n_blocked_status
set toS2N_BLOCKED_ON_APPLICATION_INPUT
. The handshake is paused and further calls tos2n_negotiate
will continue to return the same error untils2n_client_hello_cb_done
is invoked for thes2n_connection
to resume the handshake. If any of the connection properties were changed on the basis of the server_name extension thens2n_connection_server_name_extension_used
must be invoked before marking the callback done.
- 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