pub unsafe extern "C" fn s2n_connection_set_verify_host_callback(
    conn: *mut s2n_connection,
    host_fn: s2n_verify_host_fn,
    data: *mut c_void
) -> c_int
Expand description

Sets the callback to use for verifying that a hostname from an X.509 certificate is trusted.

The default behavior is to require that the hostname match the server name set with s2n_set_server_name(). This will likely lead to all client certificates being rejected, so the callback will need to be overriden when using client authentication.

If a single callback for different connections using the same config is desired, see s2n_config_set_verify_host_callback().

@param conn A pointer to a s2n_connection object @param host_fn A pointer to a callback function that s2n will invoke in order to verify the hostname of an X.509 certificate @param data Opaque pointer to data that the verify host function will be invoked with @returns S2N_SUCCESS on success. S2N_FAILURE on failure