Type Alias s2n_tls_sys::s2n_cert_tiebreak_callback

source ·
pub type s2n_cert_tiebreak_callback = Option<unsafe extern "C" fn(cert1: *mut s2n_cert_chain_and_key, cert2: *mut s2n_cert_chain_and_key, name: *mut u8, name_len: u32) -> *mut s2n_cert_chain_and_key>;
Expand description

A callback function that is invoked if s2n-tls cannot resolve a conflict between two certificates with the same domain name. This function is invoked while certificates are added to an s2n_config.

Currently, the only builtin resolution for domain name conflicts is certificate type(RSA, ECDSA, etc). The callback should return a pointer to the s2n_cert_chain_and_key that should be used for dns name name.

If NULL is returned, the first certificate will be used. Typically an application will use properties like trust and expiry to implement tiebreaking.

Aliased Type§

enum s2n_cert_tiebreak_callback {
    None,
    Some(unsafe extern "C" fn(_: *mut s2n_cert_chain_and_key, _: *mut s2n_cert_chain_and_key, _: *mut u8, _: u32) -> *mut s2n_cert_chain_and_key),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(_: *mut s2n_cert_chain_and_key, _: *mut s2n_cert_chain_and_key, _: *mut u8, _: u32) -> *mut s2n_cert_chain_and_key)

Some value of type T.