Type Alias s2n_tls_sys::s2n_verify_host_fn
source · pub type s2n_verify_host_fn = Option<unsafe extern "C" fn(host_name: *const c_char, host_name_len: usize, data: *mut c_void) -> u8>;
Expand description
A callback function invoked (usually multiple times) during X.509 validation for each name encountered in the leaf certificate.
Return 1 to trust that hostname or 0 to not trust the hostname.
If this function returns 1, then the certificate is considered trusted and that portion of the X.509 validation will succeed.
If no hostname results in a 1 being returned, the certificate will be untrusted and the validation will terminate immediately.
Data is a opaque user context set in s2n_config_set_verify_host_callback() or s2n_connection_set_verify_host_callback().
Aliased Type§
enum s2n_verify_host_fn {
None,
Some(unsafe extern "C" fn(_: *const i8, _: usize, _: *mut c_void) -> u8),
}