Function verify_callback

Source
pub fn verify_callback(
    domain: &str,
    preverify_ok: bool,
    x509_ctx: &X509StoreContext,
) -> bool
Expand description

A convenience wrapper around verify_hostname that implements the logic for OpenSSL’s certificate verification callback.

If preverify_ok is false or the certificate depth is not 0, it will simply return the value of preverify_ok. It will otherwise validate the that the provided fully qualified domain name matches that of the leaf certificate.