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

source ·
pub type s2n_verify_host_fn = Option<unsafe extern "C" fn(_: *const i8, _: usize, _: *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),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(_: *const i8, _: usize, _: *mut c_void) -> u8)

Some value of type T.